intl-messageformat 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -18
- package/dist/intl-messageformat-with-locales.js +1249 -321
- package/dist/intl-messageformat-with-locales.js.map +1 -0
- package/dist/intl-messageformat-with-locales.min.js +4 -2
- package/dist/intl-messageformat-with-locales.min.js.map +1 -0
- package/dist/intl-messageformat.js +265 -160
- package/dist/intl-messageformat.js.map +1 -1
- package/dist/intl-messageformat.min.js +1 -1
- package/dist/intl-messageformat.min.js.map +1 -1
- package/dist/locale-data/aa.js +4 -0
- package/dist/locale-data/af.js +3 -1
- package/dist/locale-data/agq.js +2 -0
- package/dist/locale-data/ak.js +2 -1
- package/dist/locale-data/am.js +2 -1
- package/dist/locale-data/ar.js +29 -1
- package/dist/locale-data/as.js +2 -1
- package/dist/locale-data/asa.js +2 -1
- package/dist/locale-data/ast.js +2 -1
- package/dist/locale-data/az.js +5 -1
- package/dist/locale-data/bas.js +2 -0
- package/dist/locale-data/be.js +2 -1
- package/dist/locale-data/bem.js +2 -1
- package/dist/locale-data/bez.js +2 -1
- package/dist/locale-data/bg.js +2 -1
- package/dist/locale-data/bh.js +1 -0
- package/dist/locale-data/bm.js +4 -1
- package/dist/locale-data/bn.js +3 -1
- package/dist/locale-data/bo.js +3 -1
- package/dist/locale-data/br.js +2 -1
- package/dist/locale-data/brx.js +2 -1
- package/dist/locale-data/bs.js +5 -1
- package/dist/locale-data/ca.js +6 -1
- package/dist/locale-data/cgg.js +2 -1
- package/dist/locale-data/chr.js +2 -1
- package/dist/locale-data/ckb.js +1 -0
- package/dist/locale-data/cs.js +2 -1
- package/dist/locale-data/cy.js +2 -1
- package/dist/locale-data/da.js +3 -1
- package/dist/locale-data/dav.js +2 -0
- package/dist/locale-data/de.js +7 -1
- package/dist/locale-data/dje.js +2 -0
- package/dist/locale-data/dsb.js +2 -0
- package/dist/locale-data/dua.js +2 -0
- package/dist/locale-data/dv.js +1 -0
- package/dist/locale-data/dyo.js +2 -0
- package/dist/locale-data/dz.js +2 -1
- package/dist/locale-data/ebu.js +2 -0
- package/dist/locale-data/ee.js +3 -1
- package/dist/locale-data/el.js +3 -1
- package/dist/locale-data/en.js +96 -1
- package/dist/locale-data/eo.js +2 -1
- package/dist/locale-data/es.js +27 -1
- package/dist/locale-data/et.js +2 -1
- package/dist/locale-data/eu.js +2 -1
- package/dist/locale-data/ewo.js +2 -0
- package/dist/locale-data/fa.js +3 -1
- package/dist/locale-data/ff.js +5 -1
- package/dist/locale-data/fi.js +2 -1
- package/dist/locale-data/fil.js +2 -1
- package/dist/locale-data/fo.js +2 -1
- package/dist/locale-data/fr.js +47 -1
- package/dist/locale-data/fur.js +2 -1
- package/dist/locale-data/fy.js +2 -1
- package/dist/locale-data/ga.js +2 -1
- package/dist/locale-data/gd.js +2 -1
- package/dist/locale-data/gl.js +2 -1
- package/dist/locale-data/gsw.js +4 -1
- package/dist/locale-data/gu.js +2 -1
- package/dist/locale-data/guw.js +1 -0
- package/dist/locale-data/guz.js +2 -0
- package/dist/locale-data/gv.js +2 -1
- package/dist/locale-data/ha.js +6 -1
- package/dist/locale-data/haw.js +2 -1
- package/dist/locale-data/he.js +2 -1
- package/dist/locale-data/hi.js +2 -1
- package/dist/locale-data/hr.js +3 -1
- package/dist/locale-data/hsb.js +2 -0
- package/dist/locale-data/hu.js +2 -1
- package/dist/locale-data/hy.js +2 -1
- package/dist/locale-data/ia.js +2 -0
- package/dist/locale-data/id.js +2 -1
- package/dist/locale-data/ig.js +2 -1
- package/dist/locale-data/ii.js +2 -1
- package/dist/locale-data/in.js +1 -0
- package/dist/locale-data/is.js +2 -1
- package/dist/locale-data/it.js +4 -1
- package/dist/locale-data/iu.js +1 -0
- package/dist/locale-data/iw.js +1 -0
- package/dist/locale-data/ja.js +2 -1
- package/dist/locale-data/jbo.js +1 -0
- package/dist/locale-data/jgo.js +2 -1
- package/dist/locale-data/ji.js +1 -0
- package/dist/locale-data/jmc.js +2 -1
- package/dist/locale-data/jv.js +1 -0
- package/dist/locale-data/jw.js +1 -0
- package/dist/locale-data/ka.js +2 -1
- package/dist/locale-data/kab.js +2 -1
- package/dist/locale-data/kaj.js +1 -0
- package/dist/locale-data/kam.js +2 -0
- package/dist/locale-data/kcg.js +1 -0
- package/dist/locale-data/kde.js +2 -1
- package/dist/locale-data/kea.js +2 -1
- package/dist/locale-data/khq.js +2 -0
- package/dist/locale-data/ki.js +2 -0
- package/dist/locale-data/kk.js +3 -1
- package/dist/locale-data/kkj.js +2 -1
- package/dist/locale-data/kl.js +2 -1
- package/dist/locale-data/kln.js +2 -0
- package/dist/locale-data/km.js +2 -1
- package/dist/locale-data/kn.js +2 -1
- package/dist/locale-data/ko.js +3 -1
- package/dist/locale-data/kok.js +2 -0
- package/dist/locale-data/ks.js +3 -1
- package/dist/locale-data/ksb.js +2 -1
- package/dist/locale-data/ksf.js +2 -0
- package/dist/locale-data/ksh.js +2 -1
- package/dist/locale-data/ku.js +1 -0
- package/dist/locale-data/kw.js +2 -1
- package/dist/locale-data/ky.js +3 -1
- package/dist/locale-data/lag.js +2 -1
- package/dist/locale-data/lb.js +2 -0
- package/dist/locale-data/lg.js +2 -1
- package/dist/locale-data/lkt.js +2 -1
- package/dist/locale-data/ln.js +5 -1
- package/dist/locale-data/lo.js +2 -1
- package/dist/locale-data/lt.js +2 -1
- package/dist/locale-data/lu.js +2 -0
- package/dist/locale-data/luo.js +2 -0
- package/dist/locale-data/luy.js +2 -0
- package/dist/locale-data/lv.js +2 -1
- package/dist/locale-data/mas.js +3 -1
- package/dist/locale-data/mer.js +2 -0
- package/dist/locale-data/mfe.js +2 -0
- package/dist/locale-data/mg.js +2 -1
- package/dist/locale-data/mgh.js +2 -0
- package/dist/locale-data/mgo.js +2 -1
- package/dist/locale-data/mk.js +2 -1
- package/dist/locale-data/ml.js +2 -1
- package/dist/locale-data/mn.js +4 -1
- package/dist/locale-data/mo.js +1 -0
- package/dist/locale-data/mr.js +2 -1
- package/dist/locale-data/ms.js +6 -1
- package/dist/locale-data/mt.js +2 -1
- package/dist/locale-data/mua.js +2 -0
- package/dist/locale-data/my.js +2 -1
- package/dist/locale-data/nah.js +1 -0
- package/dist/locale-data/naq.js +2 -1
- package/dist/locale-data/nb.js +3 -1
- package/dist/locale-data/nd.js +2 -1
- package/dist/locale-data/ne.js +3 -1
- package/dist/locale-data/nl.js +8 -1
- package/dist/locale-data/nmg.js +2 -0
- package/dist/locale-data/nn.js +2 -1
- package/dist/locale-data/nnh.js +2 -1
- package/dist/locale-data/no.js +1 -0
- package/dist/locale-data/nqo.js +1 -0
- package/dist/locale-data/nr.js +2 -1
- package/dist/locale-data/nso.js +2 -1
- package/dist/locale-data/nus.js +2 -0
- package/dist/locale-data/ny.js +1 -0
- package/dist/locale-data/nyn.js +2 -1
- package/dist/locale-data/om.js +3 -1
- package/dist/locale-data/or.js +2 -1
- package/dist/locale-data/os.js +3 -1
- package/dist/locale-data/pa.js +5 -1
- package/dist/locale-data/pap.js +1 -0
- package/dist/locale-data/pl.js +2 -1
- package/dist/locale-data/prg.js +1 -0
- package/dist/locale-data/ps.js +2 -1
- package/dist/locale-data/pt.js +10 -1
- package/dist/locale-data/qu.js +4 -0
- package/dist/locale-data/rm.js +2 -1
- package/dist/locale-data/rn.js +2 -0
- package/dist/locale-data/ro.js +3 -1
- package/dist/locale-data/rof.js +2 -1
- package/dist/locale-data/ru.js +7 -1
- package/dist/locale-data/rw.js +2 -0
- package/dist/locale-data/rwk.js +2 -1
- package/dist/locale-data/sah.js +2 -1
- package/dist/locale-data/saq.js +2 -1
- package/dist/locale-data/sbp.js +2 -0
- package/dist/locale-data/se.js +4 -1
- package/dist/locale-data/seh.js +2 -1
- package/dist/locale-data/ses.js +2 -1
- package/dist/locale-data/sg.js +2 -1
- package/dist/locale-data/sh.js +1 -0
- package/dist/locale-data/shi.js +5 -1
- package/dist/locale-data/si.js +2 -1
- package/dist/locale-data/sk.js +2 -1
- package/dist/locale-data/sl.js +2 -1
- package/dist/locale-data/sma.js +1 -0
- package/dist/locale-data/smi.js +1 -0
- package/dist/locale-data/smj.js +1 -0
- package/dist/locale-data/smn.js +2 -0
- package/dist/locale-data/sms.js +1 -0
- package/dist/locale-data/sn.js +2 -1
- package/dist/locale-data/so.js +5 -1
- package/dist/locale-data/sq.js +4 -1
- package/dist/locale-data/sr.js +11 -1
- package/dist/locale-data/ss.js +3 -1
- package/dist/locale-data/ssy.js +2 -1
- package/dist/locale-data/st.js +1 -1
- package/dist/locale-data/sv.js +4 -1
- package/dist/locale-data/sw.js +4 -1
- package/dist/locale-data/swc.js +2 -0
- package/dist/locale-data/syr.js +1 -0
- package/dist/locale-data/ta.js +5 -1
- package/dist/locale-data/te.js +2 -1
- package/dist/locale-data/teo.js +3 -1
- package/dist/locale-data/th.js +2 -1
- package/dist/locale-data/ti.js +3 -1
- package/dist/locale-data/tig.js +1 -1
- package/dist/locale-data/tk.js +1 -0
- package/dist/locale-data/tl.js +1 -0
- package/dist/locale-data/tn.js +3 -1
- package/dist/locale-data/to.js +2 -1
- package/dist/locale-data/tr.js +3 -1
- package/dist/locale-data/ts.js +2 -1
- package/dist/locale-data/twq.js +2 -0
- package/dist/locale-data/tzm.js +3 -1
- package/dist/locale-data/ug.js +3 -1
- package/dist/locale-data/uk.js +2 -1
- package/dist/locale-data/ur.js +3 -1
- package/dist/locale-data/uz.js +7 -1
- package/dist/locale-data/vai.js +5 -0
- package/dist/locale-data/ve.js +2 -1
- package/dist/locale-data/vi.js +2 -1
- package/dist/locale-data/vo.js +2 -1
- package/dist/locale-data/vun.js +2 -1
- package/dist/locale-data/wa.js +1 -0
- package/dist/locale-data/wae.js +2 -1
- package/dist/locale-data/wo.js +1 -0
- package/dist/locale-data/xh.js +1 -1
- package/dist/locale-data/xog.js +2 -1
- package/dist/locale-data/yav.js +2 -0
- package/dist/locale-data/yi.js +2 -0
- package/dist/locale-data/yo.js +3 -1
- package/dist/locale-data/zgh.js +2 -0
- package/dist/locale-data/zh.js +10 -1
- package/dist/locale-data/zu.js +2 -1
- package/index.js +4 -6
- package/lib/compiler.js +21 -21
- package/lib/core.js +54 -46
- package/lib/en.js +2 -12
- package/lib/es5.js +8 -18
- package/lib/locales.js +752 -161
- package/lib/main.js +5 -14
- package/lib/utils.js +9 -18
- package/package.json +18 -12
- package/src/compiler.js +13 -10
- package/src/core.js +44 -33
- package/src/en.js +1 -1
- package/bower.json +0 -40
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(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){this.id=a,this.offset=b,this.options=c,this.pluralFn=d}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=g.__localeData__[this._locale].pluralRuleFunction,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.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)];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 Ob!==b&&(Ob>b&&(Ob=0,Pb={line:1,column:1,seenCR:!1}),c(Pb,Ob,b),Ob=b),Pb}function d(a){Qb>Mb||(Mb>Qb&&(Qb=Mb,Rb=[]),Rb.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=Mb,b=[],c=h();c!==C;)b.push(c),c=h();return b!==C&&(Nb=a,b=F(b)),a=b}function h(){var a;return a=j(),a===C&&(a=l()),a}function i(){var b,c,d,e,f,g;if(b=Mb,c=[],d=Mb,e=u(),e!==C?(f=z(),f!==C?(g=u(),g!==C?(e=[e,f,g],d=e):(Mb=d,d=G)):(Mb=d,d=G)):(Mb=d,d=G),d!==C)for(;d!==C;)c.push(d),d=Mb,e=u(),e!==C?(f=z(),f!==C?(g=u(),g!==C?(e=[e,f,g],d=e):(Mb=d,d=G)):(Mb=d,d=G)):(Mb=d,d=G);else c=G;return c!==C&&(Nb=b,c=H(c)),b=c,b===C&&(b=Mb,c=t(),c!==C&&(c=a.substring(b,Mb)),b=c),b}function j(){var a,b;return a=Mb,b=i(),b!==C&&(Nb=a,b=I(b)),a=b}function k(){var b,c,e;if(b=x(),b===C){if(b=Mb,c=[],J.test(a.charAt(Mb))?(e=a.charAt(Mb),Mb++):(e=C,0===Sb&&d(K)),e!==C)for(;e!==C;)c.push(e),J.test(a.charAt(Mb))?(e=a.charAt(Mb),Mb++):(e=C,0===Sb&&d(K));else c=G;c!==C&&(c=a.substring(b,Mb)),b=c}return b}function l(){var b,c,e,f,g,h,i,j,l;return b=Mb,123===a.charCodeAt(Mb)?(c=L,Mb++):(c=C,0===Sb&&d(M)),c!==C?(e=u(),e!==C?(f=k(),f!==C?(g=u(),g!==C?(h=Mb,44===a.charCodeAt(Mb)?(i=O,Mb++):(i=C,0===Sb&&d(P)),i!==C?(j=u(),j!==C?(l=m(),l!==C?(i=[i,j,l],h=i):(Mb=h,h=G)):(Mb=h,h=G)):(Mb=h,h=G),h===C&&(h=N),h!==C?(i=u(),i!==C?(125===a.charCodeAt(Mb)?(j=Q,Mb++):(j=C,0===Sb&&d(R)),j!==C?(Nb=b,c=S(f,h),b=c):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G),b}function m(){var a;return a=n(),a===C&&(a=o(),a===C&&(a=p())),a}function n(){var b,c,e,f,g,h,i;return b=Mb,a.substr(Mb,6)===T?(c=T,Mb+=6):(c=C,0===Sb&&d(U)),c===C&&(a.substr(Mb,4)===V?(c=V,Mb+=4):(c=C,0===Sb&&d(W)),c===C&&(a.substr(Mb,4)===X?(c=X,Mb+=4):(c=C,0===Sb&&d(Y)))),c!==C?(e=u(),e!==C?(f=Mb,44===a.charCodeAt(Mb)?(g=O,Mb++):(g=C,0===Sb&&d(P)),g!==C?(h=u(),h!==C?(i=z(),i!==C?(g=[g,h,i],f=g):(Mb=f,f=G)):(Mb=f,f=G)):(Mb=f,f=G),f===C&&(f=N),f!==C?(Nb=b,c=Z(c,f),b=c):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G),b}function o(){var b,c,e,f,g,h,i,j,k;if(b=Mb,a.substr(Mb,6)===$?(c=$,Mb+=6):(c=C,0===Sb&&d(_)),c!==C)if(e=u(),e!==C)if(44===a.charCodeAt(Mb)?(f=O,Mb++):(f=C,0===Sb&&d(P)),f!==C)if(g=u(),g!==C)if(h=s(),h===C&&(h=N),h!==C)if(i=u(),i!==C){if(j=[],k=r(),k!==C)for(;k!==C;)j.push(k),k=r();else j=G;j!==C?(Nb=b,c=ab(h,j),b=c):(Mb=b,b=G)}else Mb=b,b=G;else Mb=b,b=G;else Mb=b,b=G;else Mb=b,b=G;else Mb=b,b=G;else Mb=b,b=G;return b}function p(){var b,c,e,f,g,h,i;if(b=Mb,a.substr(Mb,6)===bb?(c=bb,Mb+=6):(c=C,0===Sb&&d(cb)),c!==C)if(e=u(),e!==C)if(44===a.charCodeAt(Mb)?(f=O,Mb++):(f=C,0===Sb&&d(P)),f!==C)if(g=u(),g!==C){if(h=[],i=r(),i!==C)for(;i!==C;)h.push(i),i=r();else h=G;h!==C?(Nb=b,c=db(h),b=c):(Mb=b,b=G)}else Mb=b,b=G;else Mb=b,b=G;else Mb=b,b=G;else Mb=b,b=G;return b}function q(){var b,c,e,f;return b=Mb,c=Mb,61===a.charCodeAt(Mb)?(e=eb,Mb++):(e=C,0===Sb&&d(fb)),e!==C?(f=x(),f!==C?(e=[e,f],c=e):(Mb=c,c=G)):(Mb=c,c=G),c!==C&&(c=a.substring(b,Mb)),b=c,b===C&&(b=z()),b}function r(){var b,c,e,f,h,i,j,k,l;return b=Mb,c=u(),c!==C?(e=q(),e!==C?(f=u(),f!==C?(123===a.charCodeAt(Mb)?(h=L,Mb++):(h=C,0===Sb&&d(M)),h!==C?(i=u(),i!==C?(j=g(),j!==C?(k=u(),k!==C?(125===a.charCodeAt(Mb)?(l=Q,Mb++):(l=C,0===Sb&&d(R)),l!==C?(Nb=b,c=gb(e,j),b=c):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G),b}function s(){var b,c,e,f;return b=Mb,a.substr(Mb,7)===hb?(c=hb,Mb+=7):(c=C,0===Sb&&d(ib)),c!==C?(e=u(),e!==C?(f=x(),f!==C?(Nb=b,c=jb(f),b=c):(Mb=b,b=G)):(Mb=b,b=G)):(Mb=b,b=G),b}function t(){var b,c;if(Sb++,b=[],lb.test(a.charAt(Mb))?(c=a.charAt(Mb),Mb++):(c=C,0===Sb&&d(mb)),c!==C)for(;c!==C;)b.push(c),lb.test(a.charAt(Mb))?(c=a.charAt(Mb),Mb++):(c=C,0===Sb&&d(mb));else b=G;return Sb--,b===C&&(c=C,0===Sb&&d(kb)),b}function u(){var b,c,e;for(Sb++,b=Mb,c=[],e=t();e!==C;)c.push(e),e=t();return c!==C&&(c=a.substring(b,Mb)),b=c,Sb--,b===C&&(c=C,0===Sb&&d(nb)),b}function v(){var b;return ob.test(a.charAt(Mb))?(b=a.charAt(Mb),Mb++):(b=C,0===Sb&&d(pb)),b}function w(){var b;return qb.test(a.charAt(Mb))?(b=a.charAt(Mb),Mb++):(b=C,0===Sb&&d(rb)),b}function x(){var b,c,e,f,g,h;if(b=Mb,48===a.charCodeAt(Mb)?(c=sb,Mb++):(c=C,0===Sb&&d(tb)),c===C){if(c=Mb,e=Mb,ub.test(a.charAt(Mb))?(f=a.charAt(Mb),Mb++):(f=C,0===Sb&&d(vb)),f!==C){for(g=[],h=v();h!==C;)g.push(h),h=v();g!==C?(f=[f,g],e=f):(Mb=e,e=G)}else Mb=e,e=G;e!==C&&(e=a.substring(c,Mb)),c=e}return c!==C&&(Nb=b,c=wb(c)),b=c}function y(){var b,c,e,f,g,h,i,j;return xb.test(a.charAt(Mb))?(b=a.charAt(Mb),Mb++):(b=C,0===Sb&&d(yb)),b===C&&(b=Mb,a.substr(Mb,2)===zb?(c=zb,Mb+=2):(c=C,0===Sb&&d(Ab)),c!==C&&(Nb=b,c=Bb()),b=c,b===C&&(b=Mb,a.substr(Mb,2)===Cb?(c=Cb,Mb+=2):(c=C,0===Sb&&d(Db)),c!==C&&(Nb=b,c=Eb()),b=c,b===C&&(b=Mb,a.substr(Mb,2)===Fb?(c=Fb,Mb+=2):(c=C,0===Sb&&d(Gb)),c!==C&&(Nb=b,c=Hb()),b=c,b===C&&(b=Mb,a.substr(Mb,2)===Ib?(c=Ib,Mb+=2):(c=C,0===Sb&&d(Jb)),c!==C?(e=Mb,f=Mb,g=w(),g!==C?(h=w(),h!==C?(i=w(),i!==C?(j=w(),j!==C?(g=[g,h,i,j],f=g):(Mb=f,f=G)):(Mb=f,f=G)):(Mb=f,f=G)):(Mb=f,f=G),f!==C&&(f=a.substring(e,Mb)),e=f,e!==C?(Nb=b,c=Kb(e),b=c):(Mb=b,b=G)):(Mb=b,b=G))))),b}function z(){var a,b,c;if(a=Mb,b=[],c=y(),c!==C)for(;c!==C;)b.push(c),c=y();else b=G;return b!==C&&(Nb=a,b=Lb(b)),a=b}var A,B=arguments.length>1?arguments[1]:{},C={},D={start:f},E=f,F=function(a){return{type:"messageFormatPattern",elements:a}},G=C,H=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},I=function(a){return{type:"messageTextElement",value:a}},J=/^[^ \t\n\r,.+={}#]/,K={type:"class",value:"[^ \\t\\n\\r,.+={}#]",description:"[^ \\t\\n\\r,.+={}#]"},L="{",M={type:"literal",value:"{",description:'"{"'},N=null,O=",",P={type:"literal",value:",",description:'","'},Q="}",R={type:"literal",value:"}",description:'"}"'},S=function(a,b){return{type:"argumentElement",id:a,format:b&&b[2]}},T="number",U={type:"literal",value:"number",description:'"number"'},V="date",W={type:"literal",value:"date",description:'"date"'},X="time",Y={type:"literal",value:"time",description:'"time"'},Z=function(a,b){return{type:a+"Format",style:b&&b[2]}},$="plural",_={type:"literal",value:"plural",description:'"plural"'},ab=function(a,b){return{type:"pluralFormat",offset:a||0,options:b}},bb="select",cb={type:"literal",value:"select",description:'"select"'},db=function(a){return{type:"selectFormat",options:a}},eb="=",fb={type:"literal",value:"=",description:'"="'},gb=function(a,b){return{type:"optionalFormatPattern",selector:a,value:b}},hb="offset:",ib={type:"literal",value:"offset:",description:'"offset:"'},jb=function(a){return a},kb={type:"other",description:"whitespace"},lb=/^[ \t\n\r]/,mb={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},nb={type:"other",description:"optionalWhitespace"},ob=/^[0-9]/,pb={type:"class",value:"[0-9]",description:"[0-9]"},qb=/^[0-9a-f]/i,rb={type:"class",value:"[0-9a-f]i",description:"[0-9a-f]i"},sb="0",tb={type:"literal",value:"0",description:'"0"'},ub=/^[1-9]/,vb={type:"class",value:"[1-9]",description:"[1-9]"},wb=function(a){return parseInt(a,10)},xb=/^[^{}\\\0-\x1F \t\n\r]/,yb={type:"class",value:"[^{}\\\\\\0-\\x1F \\t\\n\\r]",description:"[^{}\\\\\\0-\\x1F \\t\\n\\r]"},zb="\\#",Ab={type:"literal",value:"\\#",description:'"\\\\#"'},Bb=function(){return"\\#"},Cb="\\{",Db={type:"literal",value:"\\{",description:'"\\\\{"'},Eb=function(){return"{"},Fb="\\}",Gb={type:"literal",value:"\\}",description:'"\\\\}"'},Hb=function(){return"}"},Ib="\\u",Jb={type:"literal",value:"\\u",description:'"\\\\u"'},Kb=function(a){return String.fromCharCode(parseInt(a,16))},Lb=function(a){return a.join("")},Mb=0,Nb=0,Ob=0,Pb={line:1,column:1,seenCR:!1},Qb=0,Rb=[],Sb=0;if("startRule"in B){if(!(B.startRule in D))throw new Error("Can't start parsing from rule \""+B.startRule+'".');E=D[B.startRule]}if(A=E(),A!==C&&Mb===a.length)return A;throw A!==C&&Mb<a.length&&d({type:"end",description:"end of input"}),e(null,Rb,Qb)}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");if(!a.pluralRuleFunction)throw new Error("Locale data provided to IntlMessageFormat is missing a `pluralRuleFunction` property");var b=a.locale.toLowerCase().split("-")[0];g.__localeData__[b]=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._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){a||(a=g.defaultLocale),"string"==typeof a&&(a=[a]);var b,c,d,e=g.__localeData__;for(b=0,c=a.length;c>b;b+=1){if(d=a[b].split("-")[0].toLowerCase(),!/[a-z]{2,3}/.test(d))throw new Error("Language tag provided to IntlMessageFormat is not structrually valid: "+d);if(h.call(e,d))return d}throw new Error("No locale data has been added to IntlMessageFormat for: "+a.join(", "))};var o={locale:"en",pluralRuleFunction:function(a){var b=Math.floor(Math.abs(a)),c=a.toString().replace(/^[^.]*\.?/,"").length;return a=Math.floor(a),1===b&&0===c?"one":"other"}};n.__addLocaleData(o),n.defaultLocale="en";var p=n;this.IntlMessageFormat=p}).call(this);
|
|
1
|
+
(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);
|
|
2
2
|
//# sourceMappingURL=intl-messageformat.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intl-messageformat.min.js","sources":["utils.js","compiler.js","core.js","es5.js","parser.js","en.js","main.js"],"names":[],"mappings":"wBAUO,SAAO,GAAS,GACnB,GACI,GAAG,EAAK,EAAQ,EADhB,EAAU,MAAM,UAAU,MAAM,KAAK,UAAW,EAGpD,KAAK,EAAI,EAAG,EAAM,EAAQ,OAAY,EAAJ,EAAS,GAAK,EAE5C,GADA,EAAS,EAAQ,GAGjB,IAAK,IAAO,GACL,EAAK,KAAK,EAAQ,KACjB,EAAI,GAAO,EAAO,GAK9B,OAAO,GCfX,QAAO,GAAW,EAAS,EAAS,GAChC,KAAK,QAAW,EAChB,KAAK,QAAW,EAChB,KAAK,SAAW,EA0IpB,QAAO,GAAe,GAClB,KAAK,GAAK,EAWd,QAAO,GAAe,EAAI,EAAQ,EAAS,GACvC,KAAK,GAAW,EAChB,KAAK,OAAW,EAChB,KAAK,QAAW,EAChB,KAAK,SAAW,EAYpB,QAAO,GAAqB,EAAI,EAAQ,EAAc,GAClD,KAAK,GAAe,EACpB,KAAK,OAAe,EACpB,KAAK,aAAe,EACpB,KAAK,OAAe,EAWxB,QAAO,GAAe,EAAI,GACtB,KAAK,GAAU,EACf,KAAK,QAAU,ECnLnB,QAAO,GAAgB,EAAS,EAAS,GAErC,GAAI,GAAyB,gBAAZ,KACK,QAAQ,GAAW,CAEzC,KAAM,GAAoB,yBAAb,EAAI,KACb,KAAM,IAAI,WAAU,iDAKxB,GAAU,KAAK,cAAa,EAAe,QAAS,KAGrC,KAAM,WAAa,MAAO,KAAK,eAAe,IAE7D,IAAI,GAAS,EAAgB,eAAe,KAAK,SAAS,mBAKtD,EAAU,KAAK,gBAAgB,EAA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\n/* jslint esnext: true */\n\nexport var hop = Object.prototype.hasOwnProperty;\n\nexport function extend(obj) {\n var sources = Array.prototype.slice.call(arguments, 1),\n i, len, source, key;\n\n for (i = 0, len = sources.length; i < len; i += 1) {\n source = sources[i];\n if (!source) { continue; }\n\n for (key in source) {\n if (hop.call(source, key)) {\n obj[key] = source[key];\n }\n }\n }\n\n return obj;\n}\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n/* jslint esnext: true */\n\nexport default Compiler;\n\nfunction Compiler(locales, formats, pluralFn) {\n this.locales = locales;\n this.formats = formats;\n this.pluralFn = pluralFn;\n}\n\nCompiler.prototype.compile = function (ast) {\n this.pluralStack = [];\n this.currentPlural = null;\n this.pluralNumberFormat = null;\n\n return this.compileMessage(ast);\n};\n\nCompiler.prototype.compileMessage = function (ast) {\n if (!(ast && ast.type === 'messageFormatPattern')) {\n throw new Error('Message AST is not of type: \"messageFormatPattern\"');\n }\n\n var elements = ast.elements,\n pattern = [];\n\n var i, len, element;\n\n for (i = 0, len = elements.length; i < len; i += 1) {\n element = elements[i];\n\n switch (element.type) {\n case 'messageTextElement':\n pattern.push(this.compileMessageText(element));\n break;\n\n case 'argumentElement':\n pattern.push(this.compileArgument(element));\n break;\n\n default:\n throw new Error('Message element does not have a valid type');\n }\n }\n\n return pattern;\n};\n\nCompiler.prototype.compileMessageText = function (element) {\n // When this `element` is part of plural sub-pattern and its value contains\n // an unescaped '#', use a `PluralOffsetString` helper to properly output\n // the number with the correct offset in the string.\n if (this.currentPlural && /(^|[^\\\\])#/g.test(element.value)) {\n // Create a cache a NumberFormat instance that can be reused for any\n // PluralOffsetString instance in this message.\n if (!this.pluralNumberFormat) {\n this.pluralNumberFormat = new Intl.NumberFormat(this.locales);\n }\n\n return new PluralOffsetString(\n this.currentPlural.id,\n this.currentPlural.format.offset,\n this.pluralNumberFormat,\n element.value);\n }\n\n // Unescape the escaped '#'s in the message text.\n return element.value.replace(/\\\\#/g, '#');\n};\n\nCompiler.prototype.compileArgument = function (element) {\n var format = element.format;\n\n if (!format) {\n return new StringFormat(element.id);\n }\n\n var formats = this.formats,\n locales = this.locales,\n pluralFn = this.pluralFn,\n options;\n\n switch (format.type) {\n case 'numberFormat':\n options = formats.number[format.style];\n return {\n id : element.id,\n format: new Intl.NumberFormat(locales, options).format\n };\n\n case 'dateFormat':\n options = formats.date[format.style];\n return {\n id : element.id,\n format: new Intl.DateTimeFormat(locales, options).format\n };\n\n case 'timeFormat':\n options = formats.time[format.style];\n return {\n id : element.id,\n format: new Intl.DateTimeFormat(locales, options).format\n };\n\n case 'pluralFormat':\n options = this.compileOptions(element);\n return new PluralFormat(element.id, format.offset, options, pluralFn);\n\n case 'selectFormat':\n options = this.compileOptions(element);\n return new SelectFormat(element.id, options);\n\n default:\n throw new Error('Message element does not have a valid format type');\n }\n};\n\nCompiler.prototype.compileOptions = function (element) {\n var format = element.format,\n options = format.options,\n optionsHash = {};\n\n // Save the current plural element, if any, then set it to a new value when\n // compiling the options sub-patterns. This conform's the spec's algorithm\n // for handling `\"#\"` synax in message text.\n this.pluralStack.push(this.currentPlural);\n this.currentPlural = format.type === 'pluralFormat' ? element : null;\n\n var i, len, option;\n\n for (i = 0, len = options.length; i < len; i += 1) {\n option = options[i];\n\n // Compile the sub-pattern and save it under the options's selector.\n optionsHash[option.selector] = this.compileMessage(option.value);\n }\n\n // Pop the plural stack to put back the original currnet plural value.\n this.currentPlural = this.pluralStack.pop();\n\n return optionsHash;\n};\n\n// -- Compiler Helper Classes --------------------------------------------------\n\nfunction StringFormat(id) {\n this.id = id;\n}\n\nStringFormat.prototype.format = function (value) {\n if (!value) {\n return '';\n }\n\n return typeof value === 'string' ? value : String(value);\n};\n\nfunction PluralFormat(id, offset, options, pluralFn) {\n this.id = id;\n this.offset = offset;\n this.options = options;\n this.pluralFn = pluralFn;\n}\n\nPluralFormat.prototype.getOption = function (value) {\n var options = this.options;\n\n var option = options['=' + value] ||\n options[this.pluralFn(value - this.offset)];\n\n return option || options.other;\n};\n\nfunction PluralOffsetString(id, offset, numberFormat, string) {\n this.id = id;\n this.offset = offset;\n this.numberFormat = numberFormat;\n this.string = string;\n}\n\nPluralOffsetString.prototype.format = function (value) {\n var number = this.numberFormat.format(value - this.offset);\n\n return this.string\n .replace(/(^|[^\\\\])#/g, '$1' + number)\n .replace(/\\\\#/g, '#');\n};\n\nfunction SelectFormat(id, options) {\n this.id = id;\n this.options = options;\n}\n\nSelectFormat.prototype.getOption = function (value) {\n var options = this.options;\n return options[value] || options.other;\n};\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n/* jslint esnext: true */\n\nimport {extend, hop} from './utils';\nimport {defineProperty, objCreate} from './es5';\nimport Compiler from './compiler';\nimport parser from 'intl-messageformat-parser';\n\nexport default MessageFormat;\n\n// -- MessageFormat --------------------------------------------------------\n\nfunction MessageFormat(message, locales, formats) {\n // Parse string messages into an AST.\n var ast = typeof message === 'string' ?\n MessageFormat.__parse(message) : message;\n\n if (!(ast && ast.type === 'messageFormatPattern')) {\n throw new TypeError('A message must be provided as a String or AST.');\n }\n\n // Creates a new object with the specified `formats` merged with the default\n // formats.\n formats = this._mergeFormats(MessageFormat.formats, formats);\n\n // Defined first because it's used to build the format pattern.\n defineProperty(this, '_locale', {value: this._resolveLocale(locales)});\n\n var pluralFn = MessageFormat.__localeData__[this._locale].pluralRuleFunction;\n\n // Compile the `ast` to a pattern that is highly optimized for repeated\n // `format()` invocations. **Note:** This passes the `locales` set provided\n // to the constructor instead of just the resolved locale.\n var pattern = this._compilePattern(ast, locales, formats, pluralFn);\n\n // \"Bind\" `format()` method to `this` so it can be passed by reference like\n // the other `Intl` APIs.\n var messageFormat = this;\n this.format = function (values) {\n return messageFormat._format(pattern, values);\n };\n}\n\n// Default format options used as the prototype of the `formats` provided to the\n// constructor. These are used when constructing the internal Intl.NumberFormat\n// and Intl.DateTimeFormat instances.\ndefineProperty(MessageFormat, 'formats', {\n enumerable: true,\n\n value: {\n number: {\n 'currency': {\n style: 'currency'\n },\n\n 'percent': {\n style: 'percent'\n }\n },\n\n date: {\n 'short': {\n month: 'numeric',\n day : 'numeric',\n year : '2-digit'\n },\n\n 'medium': {\n month: 'short',\n day : 'numeric',\n year : 'numeric'\n },\n\n 'long': {\n month: 'long',\n day : 'numeric',\n year : 'numeric'\n },\n\n 'full': {\n weekday: 'long',\n month : 'long',\n day : 'numeric',\n year : 'numeric'\n }\n },\n\n time: {\n 'short': {\n hour : 'numeric',\n minute: 'numeric'\n },\n\n 'medium': {\n hour : 'numeric',\n minute: 'numeric',\n second: 'numeric'\n },\n\n 'long': {\n hour : 'numeric',\n minute : 'numeric',\n second : 'numeric',\n timeZoneName: 'short'\n },\n\n 'full': {\n hour : 'numeric',\n minute : 'numeric',\n second : 'numeric',\n timeZoneName: 'short'\n }\n }\n }\n});\n\n// Define internal private properties for dealing with locale data.\ndefineProperty(MessageFormat, '__localeData__', {value: objCreate(null)});\ndefineProperty(MessageFormat, '__addLocaleData', {value: function (data) {\n if (!(data && data.locale)) {\n throw new Error(\n 'Locale data provided to IntlMessageFormat is missing a ' +\n '`locale` property'\n );\n }\n\n if (!data.pluralRuleFunction) {\n throw new Error(\n 'Locale data provided to IntlMessageFormat is missing a ' +\n '`pluralRuleFunction` property'\n );\n }\n\n // Message format locale data only requires the first part of the tag.\n var locale = data.locale.toLowerCase().split('-')[0];\n\n MessageFormat.__localeData__[locale] = data;\n}});\n\n// Defines `__parse()` static method as an exposed private.\ndefineProperty(MessageFormat, '__parse', {value: parser.parse});\n\n// Define public `defaultLocale` property which defaults to English, but can be\n// set by the developer.\ndefineProperty(MessageFormat, 'defaultLocale', {\n enumerable: true,\n writable : true,\n value : undefined\n});\n\nMessageFormat.prototype.resolvedOptions = function () {\n // TODO: Provide anything else?\n return {\n locale: this._locale\n };\n};\n\nMessageFormat.prototype._compilePattern = function (ast, locales, formats, pluralFn) {\n var compiler = new Compiler(locales, formats, pluralFn);\n return compiler.compile(ast);\n};\n\nMessageFormat.prototype._format = function (pattern, values) {\n var result = '',\n i, len, part, id, value;\n\n for (i = 0, len = pattern.length; i < len; i += 1) {\n part = pattern[i];\n\n // Exist early for string parts.\n if (typeof part === 'string') {\n result += part;\n continue;\n }\n\n id = part.id;\n\n // Enforce that all required values are provided by the caller.\n if (!(values && hop.call(values, id))) {\n throw new Error('A value must be provided for: ' + id);\n }\n\n value = values[id];\n\n // Recursively format plural and select parts' option — which can be a\n // nested pattern structure. The choosing of the option to use is\n // abstracted-by and delegated-to the part helper object.\n if (part.options) {\n result += this._format(part.getOption(value), values);\n } else {\n result += part.format(value);\n }\n }\n\n return result;\n};\n\nMessageFormat.prototype._mergeFormats = function (defaults, formats) {\n var mergedFormats = {},\n type, mergedType;\n\n for (type in defaults) {\n if (!hop.call(defaults, type)) { continue; }\n\n mergedFormats[type] = mergedType = objCreate(defaults[type]);\n\n if (formats && hop.call(formats, type)) {\n extend(mergedType, formats[type]);\n }\n }\n\n return mergedFormats;\n};\n\nMessageFormat.prototype._resolveLocale = function (locales) {\n if (!locales) {\n locales = MessageFormat.defaultLocale;\n }\n\n if (typeof locales === 'string') {\n locales = [locales];\n }\n\n var localeData = MessageFormat.__localeData__;\n var i, len, locale;\n\n for (i = 0, len = locales.length; i < len; i += 1) {\n // We just need the root part of the langage tag.\n locale = locales[i].split('-')[0].toLowerCase();\n\n // Validate that the langage tag is structurally valid.\n if (!/[a-z]{2,3}/.test(locale)) {\n throw new Error(\n 'Language tag provided to IntlMessageFormat is not ' +\n 'structrually valid: ' + locale\n );\n }\n\n // Return the first locale for which we have CLDR data registered.\n if (hop.call(localeData, locale)) {\n return locale;\n }\n }\n\n throw new Error(\n 'No locale data has been added to IntlMessageFormat for: ' +\n locales.join(', ')\n );\n};\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n/* jslint esnext: true */\n\nimport {hop} from './utils';\n\nexport {defineProperty, objCreate};\n\n// Purposely using the same implementation as the Intl.js `Intl` polyfill.\n// Copyright 2013 Andy Earnshaw, MIT License\n\nvar realDefineProp = (function () {\n try { return !!Object.defineProperty({}, 'a', {}); }\n catch (e) { return false; }\n})();\n\nvar es3 = !realDefineProp && !Object.prototype.__defineGetter__;\n\nvar defineProperty = realDefineProp ? Object.defineProperty :\n function (obj, name, desc) {\n\n if ('get' in desc && obj.__defineGetter__) {\n obj.__defineGetter__(name, desc.get);\n } else if (!hop.call(obj, name) || 'value' in desc) {\n obj[name] = desc.value;\n }\n};\n\nvar objCreate = Object.create || function (proto, props) {\n var obj, k;\n\n function F() {}\n F.prototype = proto;\n obj = new F();\n\n for (k in props) {\n if (hop.call(props, k)) {\n defineProperty(obj, k, props[k]);\n }\n }\n\n return obj;\n};\n","export default (function() {\n /*\n * Generated by PEG.js 0.8.0.\n *\n * http://pegjs.majda.cz/\n */\n\n function peg$subclass(child, parent) {\n function ctor() { this.constructor = child; }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor();\n }\n\n function SyntaxError(message, expected, found, offset, line, column) {\n this.message = message;\n this.expected = expected;\n this.found = found;\n this.offset = offset;\n this.line = line;\n this.column = column;\n\n this.name = \"SyntaxError\";\n }\n\n peg$subclass(SyntaxError, Error);\n\n function parse(input) {\n var options = arguments.length > 1 ? arguments[1] : {},\n\n peg$FAILED = {},\n\n peg$startRuleFunctions = { start: peg$parsestart },\n peg$startRuleFunction = peg$parsestart,\n\n peg$c0 = [],\n peg$c1 = function(elements) {\n return {\n type : 'messageFormatPattern',\n elements: elements\n };\n },\n peg$c2 = peg$FAILED,\n peg$c3 = function(text) {\n var string = '',\n i, j, outerLen, inner, innerLen;\n\n for (i = 0, outerLen = text.length; i < outerLen; i += 1) {\n inner = text[i];\n\n for (j = 0, innerLen = inner.length; j < innerLen; j += 1) {\n string += inner[j];\n }\n }\n\n return string;\n },\n peg$c4 = function(messageText) {\n return {\n type : 'messageTextElement',\n value: messageText\n };\n },\n peg$c5 = /^[^ \\t\\n\\r,.+={}#]/,\n peg$c6 = { type: \"class\", value: \"[^ \\\\t\\\\n\\\\r,.+={}#]\", description: \"[^ \\\\t\\\\n\\\\r,.+={}#]\" },\n peg$c7 = \"{\",\n peg$c8 = { type: \"literal\", value: \"{\", description: \"\\\"{\\\"\" },\n peg$c9 = null,\n peg$c10 = \",\",\n peg$c11 = { type: \"literal\", value: \",\", description: \"\\\",\\\"\" },\n peg$c12 = \"}\",\n peg$c13 = { type: \"literal\", value: \"}\", description: \"\\\"}\\\"\" },\n peg$c14 = function(id, format) {\n return {\n type : 'argumentElement',\n id : id,\n format: format && format[2]\n };\n },\n peg$c15 = \"number\",\n peg$c16 = { type: \"literal\", value: \"number\", description: \"\\\"number\\\"\" },\n peg$c17 = \"date\",\n peg$c18 = { type: \"literal\", value: \"date\", description: \"\\\"date\\\"\" },\n peg$c19 = \"time\",\n peg$c20 = { type: \"literal\", value: \"time\", description: \"\\\"time\\\"\" },\n peg$c21 = function(type, style) {\n return {\n type : type + 'Format',\n style: style && style[2]\n };\n },\n peg$c22 = \"plural\",\n peg$c23 = { type: \"literal\", value: \"plural\", description: \"\\\"plural\\\"\" },\n peg$c24 = function(offset, options) {\n return {\n type : 'pluralFormat',\n offset : offset || 0,\n options: options\n }\n },\n peg$c25 = \"select\",\n peg$c26 = { type: \"literal\", value: \"select\", description: \"\\\"select\\\"\" },\n peg$c27 = function(options) {\n return {\n type : 'selectFormat',\n options: options\n }\n },\n peg$c28 = \"=\",\n peg$c29 = { type: \"literal\", value: \"=\", description: \"\\\"=\\\"\" },\n peg$c30 = function(selector, pattern) {\n return {\n type : 'optionalFormatPattern',\n selector: selector,\n value : pattern\n };\n },\n peg$c31 = \"offset:\",\n peg$c32 = { type: \"literal\", value: \"offset:\", description: \"\\\"offset:\\\"\" },\n peg$c33 = function(number) {\n return number;\n },\n peg$c34 = { type: \"other\", description: \"whitespace\" },\n peg$c35 = /^[ \\t\\n\\r]/,\n peg$c36 = { type: \"class\", value: \"[ \\\\t\\\\n\\\\r]\", description: \"[ \\\\t\\\\n\\\\r]\" },\n peg$c37 = { type: \"other\", description: \"optionalWhitespace\" },\n peg$c38 = /^[0-9]/,\n peg$c39 = { type: \"class\", value: \"[0-9]\", description: \"[0-9]\" },\n peg$c40 = /^[0-9a-f]/i,\n peg$c41 = { type: \"class\", value: \"[0-9a-f]i\", description: \"[0-9a-f]i\" },\n peg$c42 = \"0\",\n peg$c43 = { type: \"literal\", value: \"0\", description: \"\\\"0\\\"\" },\n peg$c44 = /^[1-9]/,\n peg$c45 = { type: \"class\", value: \"[1-9]\", description: \"[1-9]\" },\n peg$c46 = function(digits) {\n return parseInt(digits, 10);\n },\n peg$c47 = /^[^{}\\\\\\0-\\x1F \\t\\n\\r]/,\n peg$c48 = { type: \"class\", value: \"[^{}\\\\\\\\\\\\0-\\\\x1F \\\\t\\\\n\\\\r]\", description: \"[^{}\\\\\\\\\\\\0-\\\\x1F \\\\t\\\\n\\\\r]\" },\n peg$c49 = \"\\\\#\",\n peg$c50 = { type: \"literal\", value: \"\\\\#\", description: \"\\\"\\\\\\\\#\\\"\" },\n peg$c51 = function() { return '\\\\#'; },\n peg$c52 = \"\\\\{\",\n peg$c53 = { type: \"literal\", value: \"\\\\{\", description: \"\\\"\\\\\\\\{\\\"\" },\n peg$c54 = function() { return '\\u007B'; },\n peg$c55 = \"\\\\}\",\n peg$c56 = { type: \"literal\", value: \"\\\\}\", description: \"\\\"\\\\\\\\}\\\"\" },\n peg$c57 = function() { return '\\u007D'; },\n peg$c58 = \"\\\\u\",\n peg$c59 = { type: \"literal\", value: \"\\\\u\", description: \"\\\"\\\\\\\\u\\\"\" },\n peg$c60 = function(digits) {\n return String.fromCharCode(parseInt(digits, 16));\n },\n peg$c61 = function(chars) { return chars.join(''); },\n\n peg$currPos = 0,\n peg$reportedPos = 0,\n peg$cachedPos = 0,\n peg$cachedPosDetails = { line: 1, column: 1, seenCR: false },\n peg$maxFailPos = 0,\n peg$maxFailExpected = [],\n peg$silentFails = 0,\n\n peg$result;\n\n if (\"startRule\" in options) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n\n function text() {\n return input.substring(peg$reportedPos, peg$currPos);\n }\n\n function offset() {\n return peg$reportedPos;\n }\n\n function line() {\n return peg$computePosDetails(peg$reportedPos).line;\n }\n\n function column() {\n return peg$computePosDetails(peg$reportedPos).column;\n }\n\n function expected(description) {\n throw peg$buildException(\n null,\n [{ type: \"other\", description: description }],\n peg$reportedPos\n );\n }\n\n function error(message) {\n throw peg$buildException(message, null, peg$reportedPos);\n }\n\n function peg$computePosDetails(pos) {\n function advance(details, startPos, endPos) {\n var p, ch;\n\n for (p = startPos; p < endPos; p++) {\n ch = input.charAt(p);\n if (ch === \"\\n\") {\n if (!details.seenCR) { details.line++; }\n details.column = 1;\n details.seenCR = false;\n } else if (ch === \"\\r\" || ch === \"\\u2028\" || ch === \"\\u2029\") {\n details.line++;\n details.column = 1;\n details.seenCR = true;\n } else {\n details.column++;\n details.seenCR = false;\n }\n }\n }\n\n if (peg$cachedPos !== pos) {\n if (peg$cachedPos > pos) {\n peg$cachedPos = 0;\n peg$cachedPosDetails = { line: 1, column: 1, seenCR: false };\n }\n advance(peg$cachedPosDetails, peg$cachedPos, pos);\n peg$cachedPos = pos;\n }\n\n return peg$cachedPosDetails;\n }\n\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) { return; }\n\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n\n peg$maxFailExpected.push(expected);\n }\n\n function peg$buildException(message, expected, pos) {\n function cleanupExpected(expected) {\n var i = 1;\n\n expected.sort(function(a, b) {\n if (a.description < b.description) {\n return -1;\n } else if (a.description > b.description) {\n return 1;\n } else {\n return 0;\n }\n });\n\n while (i < expected.length) {\n if (expected[i - 1] === expected[i]) {\n expected.splice(i, 1);\n } else {\n i++;\n }\n }\n }\n\n function buildMessage(expected, found) {\n function stringEscape(s) {\n function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); }\n\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/\\x08/g, '\\\\b')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\f/g, '\\\\f')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x07\\x0B\\x0E\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x80-\\xFF]/g, function(ch) { return '\\\\x' + hex(ch); })\n .replace(/[\\u0180-\\u0FFF]/g, function(ch) { return '\\\\u0' + hex(ch); })\n .replace(/[\\u1080-\\uFFFF]/g, function(ch) { return '\\\\u' + hex(ch); });\n }\n\n var expectedDescs = new Array(expected.length),\n expectedDesc, foundDesc, i;\n\n for (i = 0; i < expected.length; i++) {\n expectedDescs[i] = expected[i].description;\n }\n\n expectedDesc = expected.length > 1\n ? expectedDescs.slice(0, -1).join(\", \")\n + \" or \"\n + expectedDescs[expected.length - 1]\n : expectedDescs[0];\n\n foundDesc = found ? \"\\\"\" + stringEscape(found) + \"\\\"\" : \"end of input\";\n\n return \"Expected \" + expectedDesc + \" but \" + foundDesc + \" found.\";\n }\n\n var posDetails = peg$computePosDetails(pos),\n found = pos < input.length ? input.charAt(pos) : null;\n\n if (expected !== null) {\n cleanupExpected(expected);\n }\n\n return new SyntaxError(\n message !== null ? message : buildMessage(expected, found),\n expected,\n found,\n pos,\n posDetails.line,\n posDetails.column\n );\n }\n\n function peg$parsestart() {\n var s0;\n\n s0 = peg$parsemessageFormatPattern();\n\n return s0;\n }\n\n function peg$parsemessageFormatPattern() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsemessageFormatElement();\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsemessageFormatElement();\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c1(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parsemessageFormatElement() {\n var s0;\n\n s0 = peg$parsemessageTextElement();\n if (s0 === peg$FAILED) {\n s0 = peg$parseargumentElement();\n }\n\n return s0;\n }\n\n function peg$parsemessageText() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$currPos;\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n s4 = peg$parsechars();\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (s5 !== peg$FAILED) {\n s3 = [s3, s4, s5];\n s2 = s3;\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$currPos;\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n s4 = peg$parsechars();\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (s5 !== peg$FAILED) {\n s3 = [s3, s4, s5];\n s2 = s3;\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n }\n } else {\n s1 = peg$c2;\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c3(s1);\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parsews();\n if (s1 !== peg$FAILED) {\n s1 = input.substring(s0, peg$currPos);\n }\n s0 = s1;\n }\n\n return s0;\n }\n\n function peg$parsemessageTextElement() {\n var s0, s1;\n\n s0 = peg$currPos;\n s1 = peg$parsemessageText();\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c4(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parseargument() {\n var s0, s1, s2;\n\n s0 = peg$parsenumber();\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = [];\n if (peg$c5.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c6); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c5.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c6); }\n }\n }\n } else {\n s1 = peg$c2;\n }\n if (s1 !== peg$FAILED) {\n s1 = input.substring(s0, peg$currPos);\n }\n s0 = s1;\n }\n\n return s0;\n }\n\n function peg$parseargumentElement() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 123) {\n s1 = peg$c7;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseargument();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 44) {\n s6 = peg$c10;\n peg$currPos++;\n } else {\n s6 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s6 !== peg$FAILED) {\n s7 = peg$parse_();\n if (s7 !== peg$FAILED) {\n s8 = peg$parseelementFormat();\n if (s8 !== peg$FAILED) {\n s6 = [s6, s7, s8];\n s5 = s6;\n } else {\n peg$currPos = s5;\n s5 = peg$c2;\n }\n } else {\n peg$currPos = s5;\n s5 = peg$c2;\n }\n } else {\n peg$currPos = s5;\n s5 = peg$c2;\n }\n if (s5 === peg$FAILED) {\n s5 = peg$c9;\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s7 = peg$c12;\n peg$currPos++;\n } else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c13); }\n }\n if (s7 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c14(s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseelementFormat() {\n var s0;\n\n s0 = peg$parsesimpleFormat();\n if (s0 === peg$FAILED) {\n s0 = peg$parsepluralFormat();\n if (s0 === peg$FAILED) {\n s0 = peg$parseselectFormat();\n }\n }\n\n return s0;\n }\n\n function peg$parsesimpleFormat() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 6) === peg$c15) {\n s1 = peg$c15;\n peg$currPos += 6;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c16); }\n }\n if (s1 === peg$FAILED) {\n if (input.substr(peg$currPos, 4) === peg$c17) {\n s1 = peg$c17;\n peg$currPos += 4;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s1 === peg$FAILED) {\n if (input.substr(peg$currPos, 4) === peg$c19) {\n s1 = peg$c19;\n peg$currPos += 4;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c20); }\n }\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 44) {\n s4 = peg$c10;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (s5 !== peg$FAILED) {\n s6 = peg$parsechars();\n if (s6 !== peg$FAILED) {\n s4 = [s4, s5, s6];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n if (s3 === peg$FAILED) {\n s3 = peg$c9;\n }\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c21(s1, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parsepluralFormat() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 6) === peg$c22) {\n s1 = peg$c22;\n peg$currPos += 6;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c23); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s3 = peg$c10;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parseoffset();\n if (s5 === peg$FAILED) {\n s5 = peg$c9;\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = [];\n s8 = peg$parseoptionalFormatPattern();\n if (s8 !== peg$FAILED) {\n while (s8 !== peg$FAILED) {\n s7.push(s8);\n s8 = peg$parseoptionalFormatPattern();\n }\n } else {\n s7 = peg$c2;\n }\n if (s7 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c24(s5, s7);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseselectFormat() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 6) === peg$c25) {\n s1 = peg$c25;\n peg$currPos += 6;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c26); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s3 = peg$c10;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = [];\n s6 = peg$parseoptionalFormatPattern();\n if (s6 !== peg$FAILED) {\n while (s6 !== peg$FAILED) {\n s5.push(s6);\n s6 = peg$parseoptionalFormatPattern();\n }\n } else {\n s5 = peg$c2;\n }\n if (s5 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c27(s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseselector() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n s1 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c28;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c29); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parsenumber();\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$c2;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$c2;\n }\n if (s1 !== peg$FAILED) {\n s1 = input.substring(s0, peg$currPos);\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$parsechars();\n }\n\n return s0;\n }\n\n function peg$parseoptionalFormatPattern() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8;\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n s2 = peg$parseselector();\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 123) {\n s4 = peg$c7;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (s5 !== peg$FAILED) {\n s6 = peg$parsemessageFormatPattern();\n if (s6 !== peg$FAILED) {\n s7 = peg$parse_();\n if (s7 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s8 = peg$c12;\n peg$currPos++;\n } else {\n s8 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c13); }\n }\n if (s8 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c30(s2, s6);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseoffset() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 7) === peg$c31) {\n s1 = peg$c31;\n peg$currPos += 7;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c32); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parsenumber();\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c33(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parsews() {\n var s0, s1;\n\n peg$silentFails++;\n s0 = [];\n if (peg$c35.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c36); }\n }\n if (s1 !== peg$FAILED) {\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (peg$c35.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c36); }\n }\n }\n } else {\n s0 = peg$c2;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c34); }\n }\n\n return s0;\n }\n\n function peg$parse_() {\n var s0, s1, s2;\n\n peg$silentFails++;\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsews();\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsews();\n }\n if (s1 !== peg$FAILED) {\n s1 = input.substring(s0, peg$currPos);\n }\n s0 = s1;\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c37); }\n }\n\n return s0;\n }\n\n function peg$parsedigit() {\n var s0;\n\n if (peg$c38.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c39); }\n }\n\n return s0;\n }\n\n function peg$parsehexDigit() {\n var s0;\n\n if (peg$c40.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c41); }\n }\n\n return s0;\n }\n\n function peg$parsenumber() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 48) {\n s1 = peg$c42;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s1 === peg$FAILED) {\n s1 = peg$currPos;\n s2 = peg$currPos;\n if (peg$c44.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c45); }\n }\n if (s3 !== peg$FAILED) {\n s4 = [];\n s5 = peg$parsedigit();\n while (s5 !== peg$FAILED) {\n s4.push(s5);\n s5 = peg$parsedigit();\n }\n if (s4 !== peg$FAILED) {\n s3 = [s3, s4];\n s2 = s3;\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n if (s2 !== peg$FAILED) {\n s2 = input.substring(s1, peg$currPos);\n }\n s1 = s2;\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c46(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parsechar() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n if (peg$c47.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c48); }\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c49) {\n s1 = peg$c49;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c50); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c51();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c52) {\n s1 = peg$c52;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c54();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c55) {\n s1 = peg$c55;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c56); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c57();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c58) {\n s1 = peg$c58;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c59); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$currPos;\n s3 = peg$currPos;\n s4 = peg$parsehexDigit();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsehexDigit();\n if (s5 !== peg$FAILED) {\n s6 = peg$parsehexDigit();\n if (s6 !== peg$FAILED) {\n s7 = peg$parsehexDigit();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n if (s3 !== peg$FAILED) {\n s3 = input.substring(s2, peg$currPos);\n }\n s2 = s3;\n if (s2 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c60(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n }\n }\n }\n }\n\n return s0;\n }\n\n function peg$parsechars() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsechar();\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsechar();\n }\n } else {\n s1 = peg$c2;\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c61(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n peg$result = peg$startRuleFunction();\n\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n } else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail({ type: \"end\", description: \"end of input\" });\n }\n\n throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos);\n }\n }\n\n return {\n SyntaxError: SyntaxError,\n parse: parse\n };\n})();","// GENERATED FILE\nexport default {\"locale\":\"en\",\"pluralRuleFunction\":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\\.?/,\"\").length;n=Math.floor(n);if(i===1&&v===0)return\"one\";return\"other\";}};","/* jslint esnext: true */\n\nimport IntlMessageFormat from './core';\nimport defaultLocale from './en';\n\nIntlMessageFormat.__addLocaleData(defaultLocale);\nIntlMessageFormat.defaultLocale = 'en';\n\nexport default IntlMessageFormat;\n"]}
|
|
1
|
+
{"version":3,"file":"intl-messageformat.min.js","sources":["intl-messageformat/src/utils.js","intl-messageformat/src/compiler.js","intl-messageformat/src/core.js","intl-messageformat/src/es5.js","intl-messageformat/node_modules/intl-messageformat-parser/src/parser.js","intl-messageformat/src/en.js","intl-messageformat/src/main.js"],"names":["$$utils$$extend","obj","i","len","source","key","sources","Array","prototype","slice","call","arguments","length","$$utils$$hop","$$compiler$$Compiler","locales","formats","pluralFn","this","$$compiler$$StringFormat","id","$$compiler$$PluralFormat","useOrdinal","offset","options","$$compiler$$PluralOffsetString","numberFormat","string","$$compiler$$SelectFormat","$$core$$MessageFormat","message","ast","__parse","type","TypeError","_mergeFormats","value","_resolveLocale","_findPluralRuleFunction","_locale","pattern","_compilePattern","messageFormat","format","values","_format","Object","hasOwnProperty","$$es5$$realDefineProp","defineProperty","e","$$es5$$defineProperty","__defineGetter__","name","desc","get","$$es5$$objCreate","create","proto","props","F","k","compile","pluralStack","currentPlural","pluralNumberFormat","compileMessage","Error","element","elements","push","compileMessageText","compileArgument","test","Intl","NumberFormat","replace","number","style","date","DateTimeFormat","time","compileOptions","ordinal","optionsHash","option","selector","pop","String","getOption","other","peg$subclass","child","parent","ctor","constructor","SyntaxError","expected","found","line","column","parse","input","peg$computePosDetails","pos","advance","details","startPos","endPos","p","ch","charAt","seenCR","peg$cachedPos","peg$cachedPosDetails","peg$fail","peg$maxFailPos","peg$currPos","peg$maxFailExpected","peg$buildException","cleanupExpected","sort","a","b","description","splice","buildMessage","stringEscape","s","hex","charCodeAt","toString","toUpperCase","expectedDesc","foundDesc","expectedDescs","join","posDetails","peg$parsestart","s0","peg$parsemessageFormatPattern","s1","s2","peg$parsemessageFormatElement","peg$FAILED","peg$reportedPos","peg$c1","peg$parsemessageTextElement","peg$parseargumentElement","peg$parsemessageText","s3","s4","s5","peg$parse_","peg$parsechars","peg$c2","peg$c3","peg$parsews","substring","peg$c4","peg$parseargument","peg$parsenumber","peg$c5","peg$silentFails","peg$c6","s6","s7","s8","peg$c7","peg$c8","peg$c10","peg$c11","peg$parseelementFormat","peg$c9","peg$c12","peg$c13","peg$c14","peg$parsesimpleFormat","peg$parsepluralFormat","peg$parseselectOrdinalFormat","peg$parseselectFormat","substr","peg$c15","peg$c16","peg$c17","peg$c18","peg$c19","peg$c20","peg$c21","peg$c22","peg$c23","peg$parsepluralStyle","peg$c24","peg$c25","peg$c26","peg$c27","peg$c28","peg$c29","peg$parseoptionalFormatPattern","peg$c30","peg$parseselector","peg$c31","peg$c32","peg$c33","peg$parseoffset","peg$c34","peg$c35","peg$c36","peg$c37","peg$c39","peg$c40","peg$c38","peg$c41","peg$parsedigit","peg$c42","peg$c43","peg$parsehexDigit","peg$c44","peg$c45","peg$c46","peg$c47","peg$c48","peg$c49","peg$c50","peg$parsechar","peg$c51","peg$c52","peg$c53","peg$c54","peg$c55","peg$c56","peg$c57","peg$c58","peg$c59","peg$c60","peg$c61","peg$c62","peg$c63","peg$c64","peg$c65","peg$result","peg$startRuleFunctions","start","peg$startRuleFunction","text","j","outerLen","inner","innerLen","messageText","pluralStyle","digits","parseInt","fromCharCode","chars","startRule","enumerable","currency","percent","short","month","day","year","medium","long","full","weekday","hour","minute","second","timeZoneName","data","locale","__localeData__","toLowerCase","intl$messageformat$parser$$default","writable","undefined","resolvedOptions","compiler","$$compiler$$default","localeData","pluralRuleFunction","parentLocale","part","result","defaults","mergedType","mergedFormats","concat","defaultLocale","localeParts","split","n","ord","v0","t0","Number","n10","n100","__addLocaleData","$$en$$default"],"mappings":"wBAUO,SAAOA,GAASC,GACnB,GACI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MAAM,IAAIpB,OACN,2DACApD,EAAQyH,KAAK,MAAQ,4BAA8B0J,WGrQ3ClB,OAAS,KAAKU,mBAAqB,SAAUW,EAAEC,GAAK,GAAItK,GAAExC,OAAO6M,GAAGD,MAAM,KAAKG,GAAIvK,EAAE,GAAGwK,EAAGC,OAAOzK,EAAE,KAAKqK,EAAEK,EAAIF,GAAIxK,EAAE,GAAGvH,MAAM,IAAIkS,EAAKH,GAAIxK,EAAE,GAAGvH,MAAM,GAAI,OAAG6R,GAAgB,GAALI,GAAc,IAANC,EAAS,MAAW,GAALD,GAAc,IAANC,EAAS,MAAW,GAALD,GAAc,IAANC,EAAS,MAAM,QAAkB,GAAHN,GAAME,EAAG,MAAM,YCIzQK,gBAAeC,KACfX,cAAgB","sourcesContent":["/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n/* jslint esnext: true */\n\nexport var hop = Object.prototype.hasOwnProperty;\n\nexport function extend(obj) {\n var sources = Array.prototype.slice.call(arguments, 1),\n i, len, source, key;\n\n for (i = 0, len = sources.length; i < len; i += 1) {\n source = sources[i];\n if (!source) { continue; }\n\n for (key in source) {\n if (hop.call(source, key)) {\n obj[key] = source[key];\n }\n }\n }\n\n return obj;\n}\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n/* jslint esnext: true */\n\nexport default Compiler;\n\nfunction Compiler(locales, formats, pluralFn) {\n this.locales = locales;\n this.formats = formats;\n this.pluralFn = pluralFn;\n}\n\nCompiler.prototype.compile = function (ast) {\n this.pluralStack = [];\n this.currentPlural = null;\n this.pluralNumberFormat = null;\n\n return this.compileMessage(ast);\n};\n\nCompiler.prototype.compileMessage = function (ast) {\n if (!(ast && ast.type === 'messageFormatPattern')) {\n throw new Error('Message AST is not of type: \"messageFormatPattern\"');\n }\n\n var elements = ast.elements,\n pattern = [];\n\n var i, len, element;\n\n for (i = 0, len = elements.length; i < len; i += 1) {\n element = elements[i];\n\n switch (element.type) {\n case 'messageTextElement':\n pattern.push(this.compileMessageText(element));\n break;\n\n case 'argumentElement':\n pattern.push(this.compileArgument(element));\n break;\n\n default:\n throw new Error('Message element does not have a valid type');\n }\n }\n\n return pattern;\n};\n\nCompiler.prototype.compileMessageText = function (element) {\n // When this `element` is part of plural sub-pattern and its value contains\n // an unescaped '#', use a `PluralOffsetString` helper to properly output\n // the number with the correct offset in the string.\n if (this.currentPlural && /(^|[^\\\\])#/g.test(element.value)) {\n // Create a cache a NumberFormat instance that can be reused for any\n // PluralOffsetString instance in this message.\n if (!this.pluralNumberFormat) {\n this.pluralNumberFormat = new Intl.NumberFormat(this.locales);\n }\n\n return new PluralOffsetString(\n this.currentPlural.id,\n this.currentPlural.format.offset,\n this.pluralNumberFormat,\n element.value);\n }\n\n // Unescape the escaped '#'s in the message text.\n return element.value.replace(/\\\\#/g, '#');\n};\n\nCompiler.prototype.compileArgument = function (element) {\n var format = element.format;\n\n if (!format) {\n return new StringFormat(element.id);\n }\n\n var formats = this.formats,\n locales = this.locales,\n pluralFn = this.pluralFn,\n options;\n\n switch (format.type) {\n case 'numberFormat':\n options = formats.number[format.style];\n return {\n id : element.id,\n format: new Intl.NumberFormat(locales, options).format\n };\n\n case 'dateFormat':\n options = formats.date[format.style];\n return {\n id : element.id,\n format: new Intl.DateTimeFormat(locales, options).format\n };\n\n case 'timeFormat':\n options = formats.time[format.style];\n return {\n id : element.id,\n format: new Intl.DateTimeFormat(locales, options).format\n };\n\n case 'pluralFormat':\n options = this.compileOptions(element);\n return new PluralFormat(\n element.id, format.ordinal, format.offset, options, pluralFn\n );\n\n case 'selectFormat':\n options = this.compileOptions(element);\n return new SelectFormat(element.id, options);\n\n default:\n throw new Error('Message element does not have a valid format type');\n }\n};\n\nCompiler.prototype.compileOptions = function (element) {\n var format = element.format,\n options = format.options,\n optionsHash = {};\n\n // Save the current plural element, if any, then set it to a new value when\n // compiling the options sub-patterns. This conforms the spec's algorithm\n // for handling `\"#\"` syntax in message text.\n this.pluralStack.push(this.currentPlural);\n this.currentPlural = format.type === 'pluralFormat' ? element : null;\n\n var i, len, option;\n\n for (i = 0, len = options.length; i < len; i += 1) {\n option = options[i];\n\n // Compile the sub-pattern and save it under the options's selector.\n optionsHash[option.selector] = this.compileMessage(option.value);\n }\n\n // Pop the plural stack to put back the original current plural value.\n this.currentPlural = this.pluralStack.pop();\n\n return optionsHash;\n};\n\n// -- Compiler Helper Classes --------------------------------------------------\n\nfunction StringFormat(id) {\n this.id = id;\n}\n\nStringFormat.prototype.format = function (value) {\n if (!value) {\n return '';\n }\n\n return typeof value === 'string' ? value : String(value);\n};\n\nfunction PluralFormat(id, useOrdinal, offset, options, pluralFn) {\n this.id = id;\n this.useOrdinal = useOrdinal;\n this.offset = offset;\n this.options = options;\n this.pluralFn = pluralFn;\n}\n\nPluralFormat.prototype.getOption = function (value) {\n var options = this.options;\n\n var option = options['=' + value] ||\n options[this.pluralFn(value - this.offset, this.useOrdinal)];\n\n return option || options.other;\n};\n\nfunction PluralOffsetString(id, offset, numberFormat, string) {\n this.id = id;\n this.offset = offset;\n this.numberFormat = numberFormat;\n this.string = string;\n}\n\nPluralOffsetString.prototype.format = function (value) {\n var number = this.numberFormat.format(value - this.offset);\n\n return this.string\n .replace(/(^|[^\\\\])#/g, '$1' + number)\n .replace(/\\\\#/g, '#');\n};\n\nfunction SelectFormat(id, options) {\n this.id = id;\n this.options = options;\n}\n\nSelectFormat.prototype.getOption = function (value) {\n var options = this.options;\n return options[value] || options.other;\n};\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n/* jslint esnext: true */\n\nimport {extend, hop} from './utils';\nimport {defineProperty, objCreate} from './es5';\nimport Compiler from './compiler';\nimport parser from 'intl-messageformat-parser';\n\nexport default MessageFormat;\n\n// -- MessageFormat --------------------------------------------------------\n\nfunction MessageFormat(message, locales, formats) {\n // Parse string messages into an AST.\n var ast = typeof message === 'string' ?\n MessageFormat.__parse(message) : message;\n\n if (!(ast && ast.type === 'messageFormatPattern')) {\n throw new TypeError('A message must be provided as a String or AST.');\n }\n\n // Creates a new object with the specified `formats` merged with the default\n // formats.\n formats = this._mergeFormats(MessageFormat.formats, formats);\n\n // Defined first because it's used to build the format pattern.\n defineProperty(this, '_locale', {value: this._resolveLocale(locales)});\n\n // Compile the `ast` to a pattern that is highly optimized for repeated\n // `format()` invocations. **Note:** This passes the `locales` set provided\n // to the constructor instead of just the resolved locale.\n var pluralFn = this._findPluralRuleFunction(this._locale);\n var pattern = this._compilePattern(ast, locales, formats, pluralFn);\n\n // \"Bind\" `format()` method to `this` so it can be passed by reference like\n // the other `Intl` APIs.\n var messageFormat = this;\n this.format = function (values) {\n return messageFormat._format(pattern, values);\n };\n}\n\n// Default format options used as the prototype of the `formats` provided to the\n// constructor. These are used when constructing the internal Intl.NumberFormat\n// and Intl.DateTimeFormat instances.\ndefineProperty(MessageFormat, 'formats', {\n enumerable: true,\n\n value: {\n number: {\n 'currency': {\n style: 'currency'\n },\n\n 'percent': {\n style: 'percent'\n }\n },\n\n date: {\n 'short': {\n month: 'numeric',\n day : 'numeric',\n year : '2-digit'\n },\n\n 'medium': {\n month: 'short',\n day : 'numeric',\n year : 'numeric'\n },\n\n 'long': {\n month: 'long',\n day : 'numeric',\n year : 'numeric'\n },\n\n 'full': {\n weekday: 'long',\n month : 'long',\n day : 'numeric',\n year : 'numeric'\n }\n },\n\n time: {\n 'short': {\n hour : 'numeric',\n minute: 'numeric'\n },\n\n 'medium': {\n hour : 'numeric',\n minute: 'numeric',\n second: 'numeric'\n },\n\n 'long': {\n hour : 'numeric',\n minute : 'numeric',\n second : 'numeric',\n timeZoneName: 'short'\n },\n\n 'full': {\n hour : 'numeric',\n minute : 'numeric',\n second : 'numeric',\n timeZoneName: 'short'\n }\n }\n }\n});\n\n// Define internal private properties for dealing with locale data.\ndefineProperty(MessageFormat, '__localeData__', {value: objCreate(null)});\ndefineProperty(MessageFormat, '__addLocaleData', {value: function (data) {\n if (!(data && data.locale)) {\n throw new Error(\n 'Locale data provided to IntlMessageFormat is missing a ' +\n '`locale` property'\n );\n }\n\n MessageFormat.__localeData__[data.locale.toLowerCase()] = data;\n}});\n\n// Defines `__parse()` static method as an exposed private.\ndefineProperty(MessageFormat, '__parse', {value: parser.parse});\n\n// Define public `defaultLocale` property which defaults to English, but can be\n// set by the developer.\ndefineProperty(MessageFormat, 'defaultLocale', {\n enumerable: true,\n writable : true,\n value : undefined\n});\n\nMessageFormat.prototype.resolvedOptions = function () {\n // TODO: Provide anything else?\n return {\n locale: this._locale\n };\n};\n\nMessageFormat.prototype._compilePattern = function (ast, locales, formats, pluralFn) {\n var compiler = new Compiler(locales, formats, pluralFn);\n return compiler.compile(ast);\n};\n\nMessageFormat.prototype._findPluralRuleFunction = function (locale) {\n var localeData = MessageFormat.__localeData__;\n var data = localeData[locale.toLowerCase()];\n\n // The locale data is de-duplicated, so we have to traverse the locale's\n // hierarchy until we find a `pluralRuleFunction` to return.\n while (data) {\n if (data.pluralRuleFunction) {\n return data.pluralRuleFunction;\n }\n\n data = data.parentLocale && localeData[data.parentLocale.toLowerCase()];\n }\n\n throw new Error(\n 'Locale data added to IntlMessageFormat is missing a ' +\n '`pluralRuleFunction` for :' + locale\n );\n};\n\nMessageFormat.prototype._format = function (pattern, values) {\n var result = '',\n i, len, part, id, value;\n\n for (i = 0, len = pattern.length; i < len; i += 1) {\n part = pattern[i];\n\n // Exist early for string parts.\n if (typeof part === 'string') {\n result += part;\n continue;\n }\n\n id = part.id;\n\n // Enforce that all required values are provided by the caller.\n if (!(values && hop.call(values, id))) {\n throw new Error('A value must be provided for: ' + id);\n }\n\n value = values[id];\n\n // Recursively format plural and select parts' option — which can be a\n // nested pattern structure. The choosing of the option to use is\n // abstracted-by and delegated-to the part helper object.\n if (part.options) {\n result += this._format(part.getOption(value), values);\n } else {\n result += part.format(value);\n }\n }\n\n return result;\n};\n\nMessageFormat.prototype._mergeFormats = function (defaults, formats) {\n var mergedFormats = {},\n type, mergedType;\n\n for (type in defaults) {\n if (!hop.call(defaults, type)) { continue; }\n\n mergedFormats[type] = mergedType = objCreate(defaults[type]);\n\n if (formats && hop.call(formats, type)) {\n extend(mergedType, formats[type]);\n }\n }\n\n return mergedFormats;\n};\n\nMessageFormat.prototype._resolveLocale = function (locales) {\n if (typeof locales === 'string') {\n locales = [locales];\n }\n\n // Create a copy of the array so we can push on the default locale.\n locales = (locales || []).concat(MessageFormat.defaultLocale);\n\n var localeData = MessageFormat.__localeData__;\n var i, len, localeParts, data;\n\n // Using the set of locales + the default locale, we look for the first one\n // which that has been registered. When data does not exist for a locale, we\n // traverse its ancestors to find something that's been registered within\n // its hierarchy of locales. Since we lack the proper `parentLocale` data\n // here, we must take a naive approach to traversal.\n for (i = 0, len = locales.length; i < len; i += 1) {\n localeParts = locales[i].toLowerCase().split('-');\n\n while (localeParts.length) {\n data = localeData[localeParts.join('-')];\n if (data) {\n // Return the normalized locale string; e.g., we return \"en-US\",\n // instead of \"en-us\".\n return data.locale;\n }\n\n localeParts.pop();\n }\n }\n\n var defaultLocale = locales.pop();\n throw new Error(\n 'No locale data has been added to IntlMessageFormat for: ' +\n locales.join(', ') + ', or the default locale: ' + defaultLocale\n );\n};\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n/* jslint esnext: true */\n\nimport {hop} from './utils';\n\nexport {defineProperty, objCreate};\n\n// Purposely using the same implementation as the Intl.js `Intl` polyfill.\n// Copyright 2013 Andy Earnshaw, MIT License\n\nvar realDefineProp = (function () {\n try { return !!Object.defineProperty({}, 'a', {}); }\n catch (e) { return false; }\n})();\n\nvar es3 = !realDefineProp && !Object.prototype.__defineGetter__;\n\nvar defineProperty = realDefineProp ? Object.defineProperty :\n function (obj, name, desc) {\n\n if ('get' in desc && obj.__defineGetter__) {\n obj.__defineGetter__(name, desc.get);\n } else if (!hop.call(obj, name) || 'value' in desc) {\n obj[name] = desc.value;\n }\n};\n\nvar objCreate = Object.create || function (proto, props) {\n var obj, k;\n\n function F() {}\n F.prototype = proto;\n obj = new F();\n\n for (k in props) {\n if (hop.call(props, k)) {\n defineProperty(obj, k, props[k]);\n }\n }\n\n return obj;\n};\n","export default (function() {\n /*\n * Generated by PEG.js 0.8.0.\n *\n * http://pegjs.majda.cz/\n */\n\n function peg$subclass(child, parent) {\n function ctor() { this.constructor = child; }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor();\n }\n\n function SyntaxError(message, expected, found, offset, line, column) {\n this.message = message;\n this.expected = expected;\n this.found = found;\n this.offset = offset;\n this.line = line;\n this.column = column;\n\n this.name = \"SyntaxError\";\n }\n\n peg$subclass(SyntaxError, Error);\n\n function parse(input) {\n var options = arguments.length > 1 ? arguments[1] : {},\n\n peg$FAILED = {},\n\n peg$startRuleFunctions = { start: peg$parsestart },\n peg$startRuleFunction = peg$parsestart,\n\n peg$c0 = [],\n peg$c1 = function(elements) {\n return {\n type : 'messageFormatPattern',\n elements: elements\n };\n },\n peg$c2 = peg$FAILED,\n peg$c3 = function(text) {\n var string = '',\n i, j, outerLen, inner, innerLen;\n\n for (i = 0, outerLen = text.length; i < outerLen; i += 1) {\n inner = text[i];\n\n for (j = 0, innerLen = inner.length; j < innerLen; j += 1) {\n string += inner[j];\n }\n }\n\n return string;\n },\n peg$c4 = function(messageText) {\n return {\n type : 'messageTextElement',\n value: messageText\n };\n },\n peg$c5 = /^[^ \\t\\n\\r,.+={}#]/,\n peg$c6 = { type: \"class\", value: \"[^ \\\\t\\\\n\\\\r,.+={}#]\", description: \"[^ \\\\t\\\\n\\\\r,.+={}#]\" },\n peg$c7 = \"{\",\n peg$c8 = { type: \"literal\", value: \"{\", description: \"\\\"{\\\"\" },\n peg$c9 = null,\n peg$c10 = \",\",\n peg$c11 = { type: \"literal\", value: \",\", description: \"\\\",\\\"\" },\n peg$c12 = \"}\",\n peg$c13 = { type: \"literal\", value: \"}\", description: \"\\\"}\\\"\" },\n peg$c14 = function(id, format) {\n return {\n type : 'argumentElement',\n id : id,\n format: format && format[2]\n };\n },\n peg$c15 = \"number\",\n peg$c16 = { type: \"literal\", value: \"number\", description: \"\\\"number\\\"\" },\n peg$c17 = \"date\",\n peg$c18 = { type: \"literal\", value: \"date\", description: \"\\\"date\\\"\" },\n peg$c19 = \"time\",\n peg$c20 = { type: \"literal\", value: \"time\", description: \"\\\"time\\\"\" },\n peg$c21 = function(type, style) {\n return {\n type : type + 'Format',\n style: style && style[2]\n };\n },\n peg$c22 = \"plural\",\n peg$c23 = { type: \"literal\", value: \"plural\", description: \"\\\"plural\\\"\" },\n peg$c24 = function(pluralStyle) {\n return {\n type : pluralStyle.type,\n ordinal: false,\n offset : pluralStyle.offset || 0,\n options: pluralStyle.options\n };\n },\n peg$c25 = \"selectordinal\",\n peg$c26 = { type: \"literal\", value: \"selectordinal\", description: \"\\\"selectordinal\\\"\" },\n peg$c27 = function(pluralStyle) {\n return {\n type : pluralStyle.type,\n ordinal: true,\n offset : pluralStyle.offset || 0,\n options: pluralStyle.options\n }\n },\n peg$c28 = \"select\",\n peg$c29 = { type: \"literal\", value: \"select\", description: \"\\\"select\\\"\" },\n peg$c30 = function(options) {\n return {\n type : 'selectFormat',\n options: options\n };\n },\n peg$c31 = \"=\",\n peg$c32 = { type: \"literal\", value: \"=\", description: \"\\\"=\\\"\" },\n peg$c33 = function(selector, pattern) {\n return {\n type : 'optionalFormatPattern',\n selector: selector,\n value : pattern\n };\n },\n peg$c34 = \"offset:\",\n peg$c35 = { type: \"literal\", value: \"offset:\", description: \"\\\"offset:\\\"\" },\n peg$c36 = function(number) {\n return number;\n },\n peg$c37 = function(offset, options) {\n return {\n type : 'pluralFormat',\n offset : offset,\n options: options\n };\n },\n peg$c38 = { type: \"other\", description: \"whitespace\" },\n peg$c39 = /^[ \\t\\n\\r]/,\n peg$c40 = { type: \"class\", value: \"[ \\\\t\\\\n\\\\r]\", description: \"[ \\\\t\\\\n\\\\r]\" },\n peg$c41 = { type: \"other\", description: \"optionalWhitespace\" },\n peg$c42 = /^[0-9]/,\n peg$c43 = { type: \"class\", value: \"[0-9]\", description: \"[0-9]\" },\n peg$c44 = /^[0-9a-f]/i,\n peg$c45 = { type: \"class\", value: \"[0-9a-f]i\", description: \"[0-9a-f]i\" },\n peg$c46 = \"0\",\n peg$c47 = { type: \"literal\", value: \"0\", description: \"\\\"0\\\"\" },\n peg$c48 = /^[1-9]/,\n peg$c49 = { type: \"class\", value: \"[1-9]\", description: \"[1-9]\" },\n peg$c50 = function(digits) {\n return parseInt(digits, 10);\n },\n peg$c51 = /^[^{}\\\\\\0-\\x1F \\t\\n\\r]/,\n peg$c52 = { type: \"class\", value: \"[^{}\\\\\\\\\\\\0-\\\\x1F \\\\t\\\\n\\\\r]\", description: \"[^{}\\\\\\\\\\\\0-\\\\x1F \\\\t\\\\n\\\\r]\" },\n peg$c53 = \"\\\\#\",\n peg$c54 = { type: \"literal\", value: \"\\\\#\", description: \"\\\"\\\\\\\\#\\\"\" },\n peg$c55 = function() { return '\\\\#'; },\n peg$c56 = \"\\\\{\",\n peg$c57 = { type: \"literal\", value: \"\\\\{\", description: \"\\\"\\\\\\\\{\\\"\" },\n peg$c58 = function() { return '\\u007B'; },\n peg$c59 = \"\\\\}\",\n peg$c60 = { type: \"literal\", value: \"\\\\}\", description: \"\\\"\\\\\\\\}\\\"\" },\n peg$c61 = function() { return '\\u007D'; },\n peg$c62 = \"\\\\u\",\n peg$c63 = { type: \"literal\", value: \"\\\\u\", description: \"\\\"\\\\\\\\u\\\"\" },\n peg$c64 = function(digits) {\n return String.fromCharCode(parseInt(digits, 16));\n },\n peg$c65 = function(chars) { return chars.join(''); },\n\n peg$currPos = 0,\n peg$reportedPos = 0,\n peg$cachedPos = 0,\n peg$cachedPosDetails = { line: 1, column: 1, seenCR: false },\n peg$maxFailPos = 0,\n peg$maxFailExpected = [],\n peg$silentFails = 0,\n\n peg$result;\n\n if (\"startRule\" in options) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n\n function text() {\n return input.substring(peg$reportedPos, peg$currPos);\n }\n\n function offset() {\n return peg$reportedPos;\n }\n\n function line() {\n return peg$computePosDetails(peg$reportedPos).line;\n }\n\n function column() {\n return peg$computePosDetails(peg$reportedPos).column;\n }\n\n function expected(description) {\n throw peg$buildException(\n null,\n [{ type: \"other\", description: description }],\n peg$reportedPos\n );\n }\n\n function error(message) {\n throw peg$buildException(message, null, peg$reportedPos);\n }\n\n function peg$computePosDetails(pos) {\n function advance(details, startPos, endPos) {\n var p, ch;\n\n for (p = startPos; p < endPos; p++) {\n ch = input.charAt(p);\n if (ch === \"\\n\") {\n if (!details.seenCR) { details.line++; }\n details.column = 1;\n details.seenCR = false;\n } else if (ch === \"\\r\" || ch === \"\\u2028\" || ch === \"\\u2029\") {\n details.line++;\n details.column = 1;\n details.seenCR = true;\n } else {\n details.column++;\n details.seenCR = false;\n }\n }\n }\n\n if (peg$cachedPos !== pos) {\n if (peg$cachedPos > pos) {\n peg$cachedPos = 0;\n peg$cachedPosDetails = { line: 1, column: 1, seenCR: false };\n }\n advance(peg$cachedPosDetails, peg$cachedPos, pos);\n peg$cachedPos = pos;\n }\n\n return peg$cachedPosDetails;\n }\n\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) { return; }\n\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n\n peg$maxFailExpected.push(expected);\n }\n\n function peg$buildException(message, expected, pos) {\n function cleanupExpected(expected) {\n var i = 1;\n\n expected.sort(function(a, b) {\n if (a.description < b.description) {\n return -1;\n } else if (a.description > b.description) {\n return 1;\n } else {\n return 0;\n }\n });\n\n while (i < expected.length) {\n if (expected[i - 1] === expected[i]) {\n expected.splice(i, 1);\n } else {\n i++;\n }\n }\n }\n\n function buildMessage(expected, found) {\n function stringEscape(s) {\n function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); }\n\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/\\x08/g, '\\\\b')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\f/g, '\\\\f')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x07\\x0B\\x0E\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x80-\\xFF]/g, function(ch) { return '\\\\x' + hex(ch); })\n .replace(/[\\u0180-\\u0FFF]/g, function(ch) { return '\\\\u0' + hex(ch); })\n .replace(/[\\u1080-\\uFFFF]/g, function(ch) { return '\\\\u' + hex(ch); });\n }\n\n var expectedDescs = new Array(expected.length),\n expectedDesc, foundDesc, i;\n\n for (i = 0; i < expected.length; i++) {\n expectedDescs[i] = expected[i].description;\n }\n\n expectedDesc = expected.length > 1\n ? expectedDescs.slice(0, -1).join(\", \")\n + \" or \"\n + expectedDescs[expected.length - 1]\n : expectedDescs[0];\n\n foundDesc = found ? \"\\\"\" + stringEscape(found) + \"\\\"\" : \"end of input\";\n\n return \"Expected \" + expectedDesc + \" but \" + foundDesc + \" found.\";\n }\n\n var posDetails = peg$computePosDetails(pos),\n found = pos < input.length ? input.charAt(pos) : null;\n\n if (expected !== null) {\n cleanupExpected(expected);\n }\n\n return new SyntaxError(\n message !== null ? message : buildMessage(expected, found),\n expected,\n found,\n pos,\n posDetails.line,\n posDetails.column\n );\n }\n\n function peg$parsestart() {\n var s0;\n\n s0 = peg$parsemessageFormatPattern();\n\n return s0;\n }\n\n function peg$parsemessageFormatPattern() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsemessageFormatElement();\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsemessageFormatElement();\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c1(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parsemessageFormatElement() {\n var s0;\n\n s0 = peg$parsemessageTextElement();\n if (s0 === peg$FAILED) {\n s0 = peg$parseargumentElement();\n }\n\n return s0;\n }\n\n function peg$parsemessageText() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$currPos;\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n s4 = peg$parsechars();\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (s5 !== peg$FAILED) {\n s3 = [s3, s4, s5];\n s2 = s3;\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$currPos;\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n s4 = peg$parsechars();\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (s5 !== peg$FAILED) {\n s3 = [s3, s4, s5];\n s2 = s3;\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n }\n } else {\n s1 = peg$c2;\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c3(s1);\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parsews();\n if (s1 !== peg$FAILED) {\n s1 = input.substring(s0, peg$currPos);\n }\n s0 = s1;\n }\n\n return s0;\n }\n\n function peg$parsemessageTextElement() {\n var s0, s1;\n\n s0 = peg$currPos;\n s1 = peg$parsemessageText();\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c4(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parseargument() {\n var s0, s1, s2;\n\n s0 = peg$parsenumber();\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = [];\n if (peg$c5.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c6); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c5.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c6); }\n }\n }\n } else {\n s1 = peg$c2;\n }\n if (s1 !== peg$FAILED) {\n s1 = input.substring(s0, peg$currPos);\n }\n s0 = s1;\n }\n\n return s0;\n }\n\n function peg$parseargumentElement() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 123) {\n s1 = peg$c7;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseargument();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 44) {\n s6 = peg$c10;\n peg$currPos++;\n } else {\n s6 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s6 !== peg$FAILED) {\n s7 = peg$parse_();\n if (s7 !== peg$FAILED) {\n s8 = peg$parseelementFormat();\n if (s8 !== peg$FAILED) {\n s6 = [s6, s7, s8];\n s5 = s6;\n } else {\n peg$currPos = s5;\n s5 = peg$c2;\n }\n } else {\n peg$currPos = s5;\n s5 = peg$c2;\n }\n } else {\n peg$currPos = s5;\n s5 = peg$c2;\n }\n if (s5 === peg$FAILED) {\n s5 = peg$c9;\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s7 = peg$c12;\n peg$currPos++;\n } else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c13); }\n }\n if (s7 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c14(s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseelementFormat() {\n var s0;\n\n s0 = peg$parsesimpleFormat();\n if (s0 === peg$FAILED) {\n s0 = peg$parsepluralFormat();\n if (s0 === peg$FAILED) {\n s0 = peg$parseselectOrdinalFormat();\n if (s0 === peg$FAILED) {\n s0 = peg$parseselectFormat();\n }\n }\n }\n\n return s0;\n }\n\n function peg$parsesimpleFormat() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 6) === peg$c15) {\n s1 = peg$c15;\n peg$currPos += 6;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c16); }\n }\n if (s1 === peg$FAILED) {\n if (input.substr(peg$currPos, 4) === peg$c17) {\n s1 = peg$c17;\n peg$currPos += 4;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s1 === peg$FAILED) {\n if (input.substr(peg$currPos, 4) === peg$c19) {\n s1 = peg$c19;\n peg$currPos += 4;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c20); }\n }\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 44) {\n s4 = peg$c10;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (s5 !== peg$FAILED) {\n s6 = peg$parsechars();\n if (s6 !== peg$FAILED) {\n s4 = [s4, s5, s6];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n if (s3 === peg$FAILED) {\n s3 = peg$c9;\n }\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c21(s1, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parsepluralFormat() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 6) === peg$c22) {\n s1 = peg$c22;\n peg$currPos += 6;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c23); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s3 = peg$c10;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsepluralStyle();\n if (s5 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c24(s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseselectOrdinalFormat() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 13) === peg$c25) {\n s1 = peg$c25;\n peg$currPos += 13;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c26); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s3 = peg$c10;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsepluralStyle();\n if (s5 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c27(s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseselectFormat() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 6) === peg$c28) {\n s1 = peg$c28;\n peg$currPos += 6;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c29); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s3 = peg$c10;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = [];\n s6 = peg$parseoptionalFormatPattern();\n if (s6 !== peg$FAILED) {\n while (s6 !== peg$FAILED) {\n s5.push(s6);\n s6 = peg$parseoptionalFormatPattern();\n }\n } else {\n s5 = peg$c2;\n }\n if (s5 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c30(s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseselector() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n s1 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c31;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c32); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parsenumber();\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$c2;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$c2;\n }\n if (s1 !== peg$FAILED) {\n s1 = input.substring(s0, peg$currPos);\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$parsechars();\n }\n\n return s0;\n }\n\n function peg$parseoptionalFormatPattern() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8;\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n s2 = peg$parseselector();\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 123) {\n s4 = peg$c7;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (s5 !== peg$FAILED) {\n s6 = peg$parsemessageFormatPattern();\n if (s6 !== peg$FAILED) {\n s7 = peg$parse_();\n if (s7 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s8 = peg$c12;\n peg$currPos++;\n } else {\n s8 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c13); }\n }\n if (s8 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c33(s2, s6);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseoffset() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 7) === peg$c34) {\n s1 = peg$c34;\n peg$currPos += 7;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c35); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parsenumber();\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c36(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parsepluralStyle() {\n var s0, s1, s2, s3, s4;\n\n s0 = peg$currPos;\n s1 = peg$parseoffset();\n if (s1 === peg$FAILED) {\n s1 = peg$c9;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n s4 = peg$parseoptionalFormatPattern();\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n s4 = peg$parseoptionalFormatPattern();\n }\n } else {\n s3 = peg$c2;\n }\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c37(s1, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parsews() {\n var s0, s1;\n\n peg$silentFails++;\n s0 = [];\n if (peg$c39.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c40); }\n }\n if (s1 !== peg$FAILED) {\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (peg$c39.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c40); }\n }\n }\n } else {\n s0 = peg$c2;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c38); }\n }\n\n return s0;\n }\n\n function peg$parse_() {\n var s0, s1, s2;\n\n peg$silentFails++;\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsews();\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsews();\n }\n if (s1 !== peg$FAILED) {\n s1 = input.substring(s0, peg$currPos);\n }\n s0 = s1;\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c41); }\n }\n\n return s0;\n }\n\n function peg$parsedigit() {\n var s0;\n\n if (peg$c42.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n\n return s0;\n }\n\n function peg$parsehexDigit() {\n var s0;\n\n if (peg$c44.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c45); }\n }\n\n return s0;\n }\n\n function peg$parsenumber() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 48) {\n s1 = peg$c46;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c47); }\n }\n if (s1 === peg$FAILED) {\n s1 = peg$currPos;\n s2 = peg$currPos;\n if (peg$c48.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c49); }\n }\n if (s3 !== peg$FAILED) {\n s4 = [];\n s5 = peg$parsedigit();\n while (s5 !== peg$FAILED) {\n s4.push(s5);\n s5 = peg$parsedigit();\n }\n if (s4 !== peg$FAILED) {\n s3 = [s3, s4];\n s2 = s3;\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n if (s2 !== peg$FAILED) {\n s2 = input.substring(s1, peg$currPos);\n }\n s1 = s2;\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c50(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parsechar() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n if (peg$c51.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c53) {\n s1 = peg$c53;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c55();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c56) {\n s1 = peg$c56;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c57); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c58();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c59) {\n s1 = peg$c59;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c60); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c61();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c62) {\n s1 = peg$c62;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c63); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$currPos;\n s3 = peg$currPos;\n s4 = peg$parsehexDigit();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsehexDigit();\n if (s5 !== peg$FAILED) {\n s6 = peg$parsehexDigit();\n if (s6 !== peg$FAILED) {\n s7 = peg$parsehexDigit();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n if (s3 !== peg$FAILED) {\n s3 = input.substring(s2, peg$currPos);\n }\n s2 = s3;\n if (s2 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c64(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n }\n }\n }\n }\n\n return s0;\n }\n\n function peg$parsechars() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsechar();\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsechar();\n }\n } else {\n s1 = peg$c2;\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c65(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n peg$result = peg$startRuleFunction();\n\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n } else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail({ type: \"end\", description: \"end of input\" });\n }\n\n throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos);\n }\n }\n\n return {\n SyntaxError: SyntaxError,\n parse: parse\n };\n})();","// GENERATED FILE\nexport default {\"locale\":\"en\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return n10==1&&n100!=11?\"one\":n10==2&&n100!=12?\"two\":n10==3&&n100!=13?\"few\":\"other\";return n==1&&v0?\"one\":\"other\"}};\n","/* jslint esnext: true */\n\nimport IntlMessageFormat from './core';\nimport defaultLocale from './en';\n\nIntlMessageFormat.__addLocaleData(defaultLocale);\nIntlMessageFormat.defaultLocale = 'en';\n\nexport default IntlMessageFormat;\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
IntlMessageFormat.__addLocaleData({"locale":"aa","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}});
|
|
2
|
+
IntlMessageFormat.__addLocaleData({"locale":"aa-DJ","parentLocale":"aa"});
|
|
3
|
+
IntlMessageFormat.__addLocaleData({"locale":"aa-ER","parentLocale":"aa"});
|
|
4
|
+
IntlMessageFormat.__addLocaleData({"locale":"aa-ET","parentLocale":"aa"});
|
package/dist/locale-data/af.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
IntlMessageFormat.__addLocaleData({"locale":"af","pluralRuleFunction":function (n)
|
|
1
|
+
IntlMessageFormat.__addLocaleData({"locale":"af","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}});
|
|
2
|
+
IntlMessageFormat.__addLocaleData({"locale":"af-NA","parentLocale":"af"});
|
|
3
|
+
IntlMessageFormat.__addLocaleData({"locale":"af-ZA","parentLocale":"af"});
|
package/dist/locale-data/ak.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
IntlMessageFormat.__addLocaleData({"locale":"ak","pluralRuleFunction":function (n)
|
|
1
|
+
IntlMessageFormat.__addLocaleData({"locale":"ak","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==0||n==1?"one":"other"}});
|
|
2
|
+
IntlMessageFormat.__addLocaleData({"locale":"ak-GH","parentLocale":"ak"});
|
package/dist/locale-data/am.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
IntlMessageFormat.__addLocaleData({"locale":"am","pluralRuleFunction":function (n)
|
|
1
|
+
IntlMessageFormat.__addLocaleData({"locale":"am","pluralRuleFunction":function (n,ord){if(ord)return"other";return n>=0&&n<=1?"one":"other"}});
|
|
2
|
+
IntlMessageFormat.__addLocaleData({"locale":"am-ET","parentLocale":"am"});
|
package/dist/locale-data/ar.js
CHANGED
|
@@ -1 +1,29 @@
|
|
|
1
|
-
IntlMessageFormat.__addLocaleData({"locale":"ar","pluralRuleFunction":function (n)
|
|
1
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar","pluralRuleFunction":function (n,ord){var s=String(n).split("."),t0=Number(s[0])==n,n100=t0&&s[0].slice(-2);if(ord)return"other";return n==0?"zero":n==1?"one":n==2?"two":n100>=3&&n100<=10?"few":n100>=11&&n100<=99?"many":"other"}});
|
|
2
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar-001","parentLocale":"ar"});
|
|
3
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar-AE","parentLocale":"ar"});
|
|
4
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar-BH","parentLocale":"ar"});
|
|
5
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar-DJ","parentLocale":"ar"});
|
|
6
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar-DZ","parentLocale":"ar"});
|
|
7
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar-EG","parentLocale":"ar"});
|
|
8
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar-EH","parentLocale":"ar"});
|
|
9
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar-ER","parentLocale":"ar"});
|
|
10
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar-IL","parentLocale":"ar"});
|
|
11
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar-IQ","parentLocale":"ar"});
|
|
12
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar-JO","parentLocale":"ar"});
|
|
13
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar-KM","parentLocale":"ar"});
|
|
14
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar-KW","parentLocale":"ar"});
|
|
15
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar-LB","parentLocale":"ar"});
|
|
16
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar-LY","parentLocale":"ar"});
|
|
17
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar-MA","parentLocale":"ar"});
|
|
18
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar-MR","parentLocale":"ar"});
|
|
19
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar-OM","parentLocale":"ar"});
|
|
20
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar-PS","parentLocale":"ar"});
|
|
21
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar-QA","parentLocale":"ar"});
|
|
22
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar-SA","parentLocale":"ar"});
|
|
23
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar-SD","parentLocale":"ar"});
|
|
24
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar-SO","parentLocale":"ar"});
|
|
25
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar-SS","parentLocale":"ar"});
|
|
26
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar-SY","parentLocale":"ar"});
|
|
27
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar-TD","parentLocale":"ar"});
|
|
28
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar-TN","parentLocale":"ar"});
|
|
29
|
+
IntlMessageFormat.__addLocaleData({"locale":"ar-YE","parentLocale":"ar"});
|
package/dist/locale-data/as.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
IntlMessageFormat.__addLocaleData({"locale":"as","pluralRuleFunction":function (n)
|
|
1
|
+
IntlMessageFormat.__addLocaleData({"locale":"as","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}});
|
|
2
|
+
IntlMessageFormat.__addLocaleData({"locale":"as-IN","parentLocale":"as"});
|
package/dist/locale-data/asa.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
IntlMessageFormat.__addLocaleData({"locale":"asa","pluralRuleFunction":function (n)
|
|
1
|
+
IntlMessageFormat.__addLocaleData({"locale":"asa","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}});
|
|
2
|
+
IntlMessageFormat.__addLocaleData({"locale":"asa-TZ","parentLocale":"asa"});
|
package/dist/locale-data/ast.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
IntlMessageFormat.__addLocaleData({"locale":"ast","pluralRuleFunction":function (n)
|
|
1
|
+
IntlMessageFormat.__addLocaleData({"locale":"ast","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return"other";return n==1&&v0?"one":"other"}});
|
|
2
|
+
IntlMessageFormat.__addLocaleData({"locale":"ast-ES","parentLocale":"ast"});
|
package/dist/locale-data/az.js
CHANGED
|
@@ -1 +1,5 @@
|
|
|
1
|
-
IntlMessageFormat.__addLocaleData({"locale":"az","pluralRuleFunction":function (n)
|
|
1
|
+
IntlMessageFormat.__addLocaleData({"locale":"az","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],i10=i.slice(-1),i100=i.slice(-2),i1000=i.slice(-3);if(ord)return i10==1||i10==2||i10==5||i10==7||i10==8||(i100==20||i100==50||i100==70||i100==80)?"one":i10==3||i10==4||(i1000==100||i1000==200||i1000==300||i1000==400||i1000==500||i1000==600||i1000==700||i1000==800||i1000==900)?"few":i==0||i10==6||(i100==40||i100==60||i100==90)?"many":"other";return n==1?"one":"other"}});
|
|
2
|
+
IntlMessageFormat.__addLocaleData({"locale":"az-Cyrl","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}});
|
|
3
|
+
IntlMessageFormat.__addLocaleData({"locale":"az-Cyrl-AZ","parentLocale":"az-Cyrl"});
|
|
4
|
+
IntlMessageFormat.__addLocaleData({"locale":"az-Latn","parentLocale":"az"});
|
|
5
|
+
IntlMessageFormat.__addLocaleData({"locale":"az-Latn-AZ","parentLocale":"az-Latn"});
|
package/dist/locale-data/be.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
IntlMessageFormat.__addLocaleData({"locale":"be","pluralRuleFunction":function (n)
|
|
1
|
+
IntlMessageFormat.__addLocaleData({"locale":"be","pluralRuleFunction":function (n,ord){var s=String(n).split("."),t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return"other";return n10==1&&n100!=11?"one":n10>=2&&n10<=4&&(n100<12||n100>14)?"few":t0&&n10==0||n10>=5&&n10<=9||n100>=11&&n100<=14?"many":"other"}});
|
|
2
|
+
IntlMessageFormat.__addLocaleData({"locale":"be-BY","parentLocale":"be"});
|
package/dist/locale-data/bem.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
IntlMessageFormat.__addLocaleData({"locale":"bem","pluralRuleFunction":function (n)
|
|
1
|
+
IntlMessageFormat.__addLocaleData({"locale":"bem","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}});
|
|
2
|
+
IntlMessageFormat.__addLocaleData({"locale":"bem-ZM","parentLocale":"bem"});
|
package/dist/locale-data/bez.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
IntlMessageFormat.__addLocaleData({"locale":"bez","pluralRuleFunction":function (n)
|
|
1
|
+
IntlMessageFormat.__addLocaleData({"locale":"bez","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}});
|
|
2
|
+
IntlMessageFormat.__addLocaleData({"locale":"bez-TZ","parentLocale":"bez"});
|
package/dist/locale-data/bg.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
IntlMessageFormat.__addLocaleData({"locale":"bg","pluralRuleFunction":function (n)
|
|
1
|
+
IntlMessageFormat.__addLocaleData({"locale":"bg","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}});
|
|
2
|
+
IntlMessageFormat.__addLocaleData({"locale":"bg-BG","parentLocale":"bg"});
|