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

vue-intl

Package Overview
Dependencies
Maintainers
2
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-intl - npm Package Compare versions

Comparing version 0.5.0 to 2.0.0

5

dist/vue-intl.min.js

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VueIntl=e()}(this,function(){"use strict";function t(t){var e,r,n,o,a=Array.prototype.slice.call(arguments,1);for(e=0,r=a.length;r>e;e+=1)if(n=a[e])for(o in n)R.call(n,o)&&(t[o]=n[o]);return t}function e(t,e,r){this.locales=t,this.formats=e,this.pluralFn=r}function r(t){this.id=t}function n(t,e,r,n,o){this.id=t,this.useOrdinal=e,this.offset=r,this.options=n,this.pluralFn=o}function o(t,e,r,n){this.id=t,this.offset=e,this.numberFormat=r,this.string=n}function a(t,e){this.id=t,this.options=e}function i(t,e,r){var n="string"==typeof t?i.__parse(t):t;if(!n||"messageFormatPattern"!==n.type)throw new TypeError("A message must be provided as a String or AST.");r=this._mergeFormats(i.formats,r),S(this,"_locale",{value:this._resolveLocale(e)});var o=this._findPluralRuleFunction(this._locale),a=this._compilePattern(n,e,r,o),l=this;this.format=function(t){return l._format(a,t)}}function l(t){return 400*t/146097}function u(t,e){t=+t,e=+e;var r=k(e-t),n=k(r/1e3),o=k(n/60),a=k(o/60),i=k(a/24),u=k(i/7),s=l(i),c=k(12*s),f=k(s);return{millisecond:r,second:n,minute:o,hour:a,day:i,week:u,month:c,year:f}}function s(t,e){e=e||{},J(t)&&(t=t.concat()),Z(this,"_locale",{value:this._resolveLocale(t)}),Z(this,"_options",{value:{style:this._resolveStyle(e.style),units:this._isValidUnits(e.units)&&e.units}}),Z(this,"_locales",{value:t}),Z(this,"_fields",{value:this._findFields(this._locale)}),Z(this,"_messages",{value:$(null)});var r=this;this.format=function(t,e){return r._format(t,e)}}function c(){var t=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],e=Array.isArray(t)?t:[t];e.forEach(function(t){t&&t.locale&&(i.__addLocaleData(t),s.__addLocaleData(t))})}function f(t,e,r){t.__allMessages=t.__allMessages||{},t.__allMessages[e]=t.__allMessages[e]||{},Object.assign(t.__allMessages[e],r)}function p(t,e,r){t.__allFormats=t.__allFormats||{},t.__allFormats[e]=t.__allFormats[e]||{},Object.assign(t.__allFormats[e],r)}function m(t,e){t.set(t,"locale",e);var r=Object.getOwnPropertyNames((t.__allFormats||{})[e]||{}).length>0;t.__format_config.formats=r?t.__allFormats[e]:t.__format_config.defaultFormats,t.__format_config.messages=(t.__allMessages||{})[e]||{}}function h(t){var e=t.locale,r=Object.getOwnPropertyNames((t.__allFormats||{})[e]||{}).length>0,n=r?t.__allFormats[e]:t.__format_config.defaultFormats,o=(t.__allMessages||{})[e]||{};return{formats:n,messages:o,defaultLocale:t.__format_config.defaultLocale,defaultFormats:t.__format_config.defaultFormats}}function d(t){return i.prototype._resolveLocale(t)}function y(t){return i.prototype._findPluralRuleFunction(t)}function v(t){var e=et(null);return function(){var r=Array.prototype.slice.call(arguments),n=g(r),o=n&&e[n];return o||(o=new(Q.apply(t,[null].concat(r))),n&&(e[n]=o)),o}}function g(t){if("undefined"!=typeof JSON){var e,r,n,o=[];for(e=0,r=t.length;r>e;e+=1)n=t[e],n&&"object"===("undefined"==typeof n?"undefined":x["typeof"](n))?o.push(_(n)):o.push(n);return JSON.stringify(o)}}function _(t){var e,r,n,o,a=[],i=[];for(e in t)t.hasOwnProperty(e)&&i.push(e);var l=i.sort();for(r=0,n=l.length;n>r;r+=1)e=l[r],o={},o[e]=t[e],a[r]=o;return a}function b(t){return(""+t).replace(pt,function(t){return ft[t]})}function w(t,e){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return e.reduce(function(e,n){return t.hasOwnProperty(n)?e[n]=t[n]:r.hasOwnProperty(n)&&(e[n]=r[n]),e},{})}function F(t){var e=s.thresholds;e.second=t.second,e.minute=t.minute,e.hour=t.hour,e.day=t.day,e.month=t.month}function O(t,e,r){var n=t&&t[e]&&t[e][r];return n?n:void 0}function A(t,e,r){var n=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],o=t.locale,a=t.formats,i=n.format,l=new Date(r),u=i&&O(a,"date",i),s=w(n,mt,u);try{return e.getDateTimeFormat(o,s).format(l)}catch(c){}return String(l)}function j(t,e,r){var n=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],o=t.locale,a=t.formats,i=n.format,l=new Date(r),u=i&&O(a,"time",i),s=w(n,mt,u);0===Object.keys(s).length&&(s={hour:"numeric",minute:"numeric"});try{return e.getDateTimeFormat(o,s).format(l)}catch(c){}return String(l)}function L(t,e,r){var n=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],o=t.locale,a=t.formats,i=n.format,l=new Date(r),u=new Date(n.now),c=i&&O(a,"relative",i),f=w(n,dt,c),p=Object.assign({},s.thresholds);F(vt);try{return e.getRelativeFormat(o,f).format(l,{now:isFinite(u)?u:e.now()})}catch(m){}finally{F(p)}return String(l)}function P(t,e,r){var n=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],o=t.locale,a=t.formats,i=n.format,l=i&&O(a,"number",i),u=w(n,ht,l);try{return e.getNumberFormat(o,u).format(r)}catch(s){}return String(r)}function D(t,e,r){var n=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],o=t.locale,a=w(n,yt);try{return e.getPluralFormat(o,a).format(r)}catch(i){}return"other"}function M(t,e){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],n=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],o=t.locale,a=t.formats,i=t.messages,l=t.defaultLocale,u=t.defaultFormats,s=r.id,c=r.defaultMessage;if(!s)throw new TypeError("[Vue Intl] An `id` must be provided to format a message.");var f=i&&i[s],p=Object.keys(n).length>0;if(!p)return f||c||s;var m=void 0;if(f)try{var h=e.getMessageFormat(f,o,a);m=h.format(n)}catch(d){}if(!m&&c)try{var y=e.getMessageFormat(c,l,u);m=y.format(n)}catch(d){}return m||f||c||s}function C(t,e,r){var n=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],o=Object.keys(n).reduce(function(t,e){var r=n[e];return t[e]="string"==typeof r?b(r):r,t},{});return M(t,e,r,o)}var x={};x["typeof"]="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},x.classCallCheck=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};var R=Object.prototype.hasOwnProperty,E=function(){try{return!!Object.defineProperty({},"a",{})}catch(t){return!1}}(),S=(!E&&!Object.prototype.__defineGetter__,E?Object.defineProperty:function(t,e,r){"get"in r&&t.__defineGetter__?t.__defineGetter__(e,r.get):(!R.call(t,e)||"value"in r)&&(t[e]=r.value)}),N=Object.create||function(t,e){function r(){}var n,o;r.prototype=t,n=new r;for(o in e)R.call(e,o)&&S(n,o,e[o]);return n};e.prototype.compile=function(t){return this.pluralStack=[],this.currentPlural=null,this.pluralNumberFormat=null,this.compileMessage(t)},e.prototype.compileMessage=function(t){if(!t||"messageFormatPattern"!==t.type)throw new Error('Message AST is not of type: "messageFormatPattern"');var e,r,n,o=t.elements,a=[];for(e=0,r=o.length;r>e;e+=1)switch(n=o[e],n.type){case"messageTextElement":a.push(this.compileMessageText(n));break;case"argumentElement":a.push(this.compileArgument(n));break;default:throw new Error("Message element does not have a valid type")}return a},e.prototype.compileMessageText=function(t){return this.currentPlural&&/(^|[^\\])#/g.test(t.value)?(this.pluralNumberFormat||(this.pluralNumberFormat=new Intl.NumberFormat(this.locales)),new o(this.currentPlural.id,this.currentPlural.format.offset,this.pluralNumberFormat,t.value)):t.value.replace(/\\#/g,"#")},e.prototype.compileArgument=function(t){var e=t.format;if(!e)return new r(t.id);var o,i=this.formats,l=this.locales,u=this.pluralFn;switch(e.type){case"numberFormat":return o=i.number[e.style],{id:t.id,format:new Intl.NumberFormat(l,o).format};case"dateFormat":return o=i.date[e.style],{id:t.id,format:new Intl.DateTimeFormat(l,o).format};case"timeFormat":return o=i.time[e.style],{id:t.id,format:new Intl.DateTimeFormat(l,o).format};case"pluralFormat":return o=this.compileOptions(t),new n(t.id,e.ordinal,e.offset,o,u);case"selectFormat":return o=this.compileOptions(t),new a(t.id,o);default:throw new Error("Message element does not have a valid format type")}},e.prototype.compileOptions=function(t){var e=t.format,r=e.options,n={};this.pluralStack.push(this.currentPlural),this.currentPlural="pluralFormat"===e.type?t:null;var o,a,i;for(o=0,a=r.length;a>o;o+=1)i=r[o],n[i.selector]=this.compileMessage(i.value);return this.currentPlural=this.pluralStack.pop(),n},r.prototype.format=function(t){return t?"string"==typeof t?t:String(t):""},n.prototype.getOption=function(t){var e=this.options,r=e["="+t]||e[this.pluralFn(t-this.offset,this.useOrdinal)];return r||e.other},o.prototype.format=function(t){var e=this.numberFormat.format(t-this.offset);return this.string.replace(/(^|[^\\])#/g,"$1"+e).replace(/\\#/g,"#")},a.prototype.getOption=function(t){var e=this.options;return e[t]||e.other};var T=function(){function t(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function e(t,e,r,n,o,a){this.message=t,this.expected=e,this.found=r,this.offset=n,this.line=o,this.column=a,this.name="SyntaxError"}function r(t){function r(e){function r(e,r,n){var o,a;for(o=r;n>o;o++)a=t.charAt(o),"\n"===a?(e.seenCR||e.line++,e.column=1,e.seenCR=!1):"\r"===a||"\u2028"===a||"\u2029"===a?(e.line++,e.column=1,e.seenCR=!0):(e.column++,e.seenCR=!1)}return Wt!==e&&(Wt>e&&(Wt=0,Kt={line:1,column:1,seenCR:!1}),r(Kt,Wt,e),Wt=e),Kt}function n(t){Qt>zt||(zt>Qt&&(Qt=zt,Xt=[]),Xt.push(t))}function o(n,o,a){function i(t){var e=1;for(t.sort(function(t,e){return t.description<e.description?-1:t.description>e.description?1:0});e<t.length;)t[e-1]===t[e]?t.splice(e,1):e++}function l(t,e){function r(t){function e(t){return t.charCodeAt(0).toString(16).toUpperCase()}return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,function(t){return"\\x0"+e(t)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(t){return"\\x"+e(t)}).replace(/[\u0180-\u0FFF]/g,function(t){return"\\u0"+e(t)}).replace(/[\u1080-\uFFFF]/g,function(t){return"\\u"+e(t)})}var n,o,a,i=new Array(t.length);for(a=0;a<t.length;a++)i[a]=t[a].description;return n=t.length>1?i.slice(0,-1).join(", ")+" or "+i[t.length-1]:i[0],o=e?'"'+r(e)+'"':"end of input","Expected "+n+" but "+o+" found."}var u=r(a),s=a<t.length?t.charAt(a):null;return null!==o&&i(o),new e(null!==n?n:l(o,s),o,s,a,u.line,u.column)}function a(){var t;return t=i()}function i(){var t,e,r;for(t=zt,e=[],r=l();r!==C;)e.push(r),r=l();return e!==C&&(Ht=t,e=E(e)),t=e}function l(){var t;return t=s(),t===C&&(t=f()),t}function u(){var e,r,n,o,a,i;if(e=zt,r=[],n=zt,o=F(),o!==C?(a=P(),a!==C?(i=F(),i!==C?(o=[o,a,i],n=o):(zt=n,n=S)):(zt=n,n=S)):(zt=n,n=S),n!==C)for(;n!==C;)r.push(n),n=zt,o=F(),o!==C?(a=P(),a!==C?(i=F(),i!==C?(o=[o,a,i],n=o):(zt=n,n=S)):(zt=n,n=S)):(zt=n,n=S);else r=S;return r!==C&&(Ht=e,r=N(r)),e=r,e===C&&(e=zt,r=w(),r!==C&&(r=t.substring(e,zt)),e=r),e}function s(){var t,e;return t=zt,e=u(),e!==C&&(Ht=t,e=T(e)),t=e}function c(){var e,r,o;if(e=j(),e===C){if(e=zt,r=[],I.test(t.charAt(zt))?(o=t.charAt(zt),zt++):(o=C,0===Yt&&n(k)),o!==C)for(;o!==C;)r.push(o),I.test(t.charAt(zt))?(o=t.charAt(zt),zt++):(o=C,0===Yt&&n(k));else r=S;r!==C&&(r=t.substring(e,zt)),e=r}return e}function f(){var e,r,o,a,i,l,u,s,f;return e=zt,123===t.charCodeAt(zt)?(r=G,zt++):(r=C,0===Yt&&n(U)),r!==C?(o=F(),o!==C?(a=c(),a!==C?(i=F(),i!==C?(l=zt,44===t.charCodeAt(zt)?(u=Z,zt++):(u=C,0===Yt&&n($)),u!==C?(s=F(),s!==C?(f=p(),f!==C?(u=[u,s,f],l=u):(zt=l,l=S)):(zt=l,l=S)):(zt=l,l=S),l===C&&(l=V),l!==C?(u=F(),u!==C?(125===t.charCodeAt(zt)?(s=B,zt++):(s=C,0===Yt&&n(J)),s!==C?(Ht=e,r=q(a,l),e=r):(zt=e,e=S)):(zt=e,e=S)):(zt=e,e=S)):(zt=e,e=S)):(zt=e,e=S)):(zt=e,e=S)):(zt=e,e=S),e}function p(){var t;return t=m(),t===C&&(t=h(),t===C&&(t=d(),t===C&&(t=y()))),t}function m(){var e,r,o,a,i,l,u;return e=zt,t.substr(zt,6)===z?(r=z,zt+=6):(r=C,0===Yt&&n(H)),r===C&&(t.substr(zt,4)===W?(r=W,zt+=4):(r=C,0===Yt&&n(K)),r===C&&(t.substr(zt,4)===Q?(r=Q,zt+=4):(r=C,0===Yt&&n(X)))),r!==C?(o=F(),o!==C?(a=zt,44===t.charCodeAt(zt)?(i=Z,zt++):(i=C,0===Yt&&n($)),i!==C?(l=F(),l!==C?(u=P(),u!==C?(i=[i,l,u],a=i):(zt=a,a=S)):(zt=a,a=S)):(zt=a,a=S),a===C&&(a=V),a!==C?(Ht=e,r=Y(r,a),e=r):(zt=e,e=S)):(zt=e,e=S)):(zt=e,e=S),e}function h(){var e,r,o,a,i,l;return e=zt,t.substr(zt,6)===tt?(r=tt,zt+=6):(r=C,0===Yt&&n(et)),r!==C?(o=F(),o!==C?(44===t.charCodeAt(zt)?(a=Z,zt++):(a=C,0===Yt&&n($)),a!==C?(i=F(),i!==C?(l=b(),l!==C?(Ht=e,r=rt(l),e=r):(zt=e,e=S)):(zt=e,e=S)):(zt=e,e=S)):(zt=e,e=S)):(zt=e,e=S),e}function d(){var e,r,o,a,i,l;return e=zt,t.substr(zt,13)===nt?(r=nt,zt+=13):(r=C,0===Yt&&n(ot)),r!==C?(o=F(),o!==C?(44===t.charCodeAt(zt)?(a=Z,zt++):(a=C,0===Yt&&n($)),a!==C?(i=F(),i!==C?(l=b(),l!==C?(Ht=e,r=at(l),e=r):(zt=e,e=S)):(zt=e,e=S)):(zt=e,e=S)):(zt=e,e=S)):(zt=e,e=S),e}function y(){var e,r,o,a,i,l,u;if(e=zt,t.substr(zt,6)===it?(r=it,zt+=6):(r=C,0===Yt&&n(lt)),r!==C)if(o=F(),o!==C)if(44===t.charCodeAt(zt)?(a=Z,zt++):(a=C,0===Yt&&n($)),a!==C)if(i=F(),i!==C){if(l=[],u=g(),u!==C)for(;u!==C;)l.push(u),u=g();else l=S;l!==C?(Ht=e,r=ut(l),e=r):(zt=e,e=S)}else zt=e,e=S;else zt=e,e=S;else zt=e,e=S;else zt=e,e=S;return e}function v(){var e,r,o,a;return e=zt,r=zt,61===t.charCodeAt(zt)?(o=st,zt++):(o=C,0===Yt&&n(ct)),o!==C?(a=j(),a!==C?(o=[o,a],r=o):(zt=r,r=S)):(zt=r,r=S),r!==C&&(r=t.substring(e,zt)),e=r,e===C&&(e=P()),e}function g(){var e,r,o,a,l,u,s,c,f;return e=zt,r=F(),r!==C?(o=v(),o!==C?(a=F(),a!==C?(123===t.charCodeAt(zt)?(l=G,zt++):(l=C,0===Yt&&n(U)),l!==C?(u=F(),u!==C?(s=i(),s!==C?(c=F(),c!==C?(125===t.charCodeAt(zt)?(f=B,zt++):(f=C,0===Yt&&n(J)),f!==C?(Ht=e,r=ft(o,s),e=r):(zt=e,e=S)):(zt=e,e=S)):(zt=e,e=S)):(zt=e,e=S)):(zt=e,e=S)):(zt=e,e=S)):(zt=e,e=S)):(zt=e,e=S),e}function _(){var e,r,o,a;return e=zt,t.substr(zt,7)===pt?(r=pt,zt+=7):(r=C,0===Yt&&n(mt)),r!==C?(o=F(),o!==C?(a=j(),a!==C?(Ht=e,r=ht(a),e=r):(zt=e,e=S)):(zt=e,e=S)):(zt=e,e=S),e}function b(){var t,e,r,n,o;if(t=zt,e=_(),e===C&&(e=V),e!==C)if(r=F(),r!==C){if(n=[],o=g(),o!==C)for(;o!==C;)n.push(o),o=g();else n=S;n!==C?(Ht=t,e=dt(e,n),t=e):(zt=t,t=S)}else zt=t,t=S;else zt=t,t=S;return t}function w(){var e,r;if(Yt++,e=[],vt.test(t.charAt(zt))?(r=t.charAt(zt),zt++):(r=C,0===Yt&&n(gt)),r!==C)for(;r!==C;)e.push(r),vt.test(t.charAt(zt))?(r=t.charAt(zt),zt++):(r=C,0===Yt&&n(gt));else e=S;return Yt--,e===C&&(r=C,0===Yt&&n(yt)),e}function F(){var e,r,o;for(Yt++,e=zt,r=[],o=w();o!==C;)r.push(o),o=w();return r!==C&&(r=t.substring(e,zt)),e=r,Yt--,e===C&&(r=C,0===Yt&&n(_t)),e}function O(){var e;return bt.test(t.charAt(zt))?(e=t.charAt(zt),zt++):(e=C,0===Yt&&n(wt)),e}function A(){var e;return Ft.test(t.charAt(zt))?(e=t.charAt(zt),zt++):(e=C,0===Yt&&n(Ot)),e}function j(){var e,r,o,a,i,l;if(e=zt,48===t.charCodeAt(zt)?(r=At,zt++):(r=C,0===Yt&&n(jt)),r===C){if(r=zt,o=zt,Lt.test(t.charAt(zt))?(a=t.charAt(zt),zt++):(a=C,0===Yt&&n(Pt)),a!==C){for(i=[],l=O();l!==C;)i.push(l),l=O();i!==C?(a=[a,i],o=a):(zt=o,o=S)}else zt=o,o=S;o!==C&&(o=t.substring(r,zt)),r=o}return r!==C&&(Ht=e,r=Dt(r)),e=r}function L(){var e,r,o,a,i,l,u,s;return Mt.test(t.charAt(zt))?(e=t.charAt(zt),zt++):(e=C,0===Yt&&n(Ct)),e===C&&(e=zt,t.substr(zt,2)===xt?(r=xt,zt+=2):(r=C,0===Yt&&n(Rt)),r!==C&&(Ht=e,r=Et()),e=r,e===C&&(e=zt,t.substr(zt,2)===St?(r=St,zt+=2):(r=C,0===Yt&&n(Nt)),r!==C&&(Ht=e,r=Tt()),e=r,e===C&&(e=zt,t.substr(zt,2)===It?(r=It,zt+=2):(r=C,0===Yt&&n(kt)),r!==C&&(Ht=e,r=Gt()),e=r,e===C&&(e=zt,t.substr(zt,2)===Ut?(r=Ut,zt+=2):(r=C,0===Yt&&n(Vt)),r!==C&&(Ht=e,r=Zt()),e=r,e===C&&(e=zt,t.substr(zt,2)===$t?(r=$t,zt+=2):(r=C,0===Yt&&n(Bt)),r!==C?(o=zt,a=zt,i=A(),i!==C?(l=A(),l!==C?(u=A(),u!==C?(s=A(),s!==C?(i=[i,l,u,s],a=i):(zt=a,a=S)):(zt=a,a=S)):(zt=a,a=S)):(zt=a,a=S),a!==C&&(a=t.substring(o,zt)),o=a,o!==C?(Ht=e,r=Jt(o),e=r):(zt=e,e=S)):(zt=e,e=S)))))),e}function P(){var t,e,r;if(t=zt,e=[],r=L(),r!==C)for(;r!==C;)e.push(r),r=L();else e=S;return e!==C&&(Ht=t,e=qt(e)),t=e}var D,M=arguments.length>1?arguments[1]:{},C={},x={start:a},R=a,E=function(t){return{type:"messageFormatPattern",elements:t}},S=C,N=function(t){var e,r,n,o,a,i="";for(e=0,n=t.length;n>e;e+=1)for(o=t[e],r=0,a=o.length;a>r;r+=1)i+=o[r];return i},T=function(t){return{type:"messageTextElement",value:t}},I=/^[^ \t\n\r,.+={}#]/,k={type:"class",value:"[^ \\t\\n\\r,.+={}#]",description:"[^ \\t\\n\\r,.+={}#]"},G="{",U={type:"literal",value:"{",description:'"{"'},V=null,Z=",",$={type:"literal",value:",",description:'","'},B="}",J={type:"literal",value:"}",description:'"}"'},q=function(t,e){return{type:"argumentElement",id:t,format:e&&e[2]}},z="number",H={type:"literal",value:"number",description:'"number"'},W="date",K={type:"literal",value:"date",description:'"date"'},Q="time",X={type:"literal",value:"time",description:'"time"'},Y=function(t,e){return{type:t+"Format",style:e&&e[2]}},tt="plural",et={type:"literal",value:"plural",description:'"plural"'},rt=function(t){return{type:t.type,ordinal:!1,offset:t.offset||0,options:t.options}},nt="selectordinal",ot={type:"literal",value:"selectordinal",description:'"selectordinal"'},at=function(t){return{type:t.type,ordinal:!0,offset:t.offset||0,options:t.options}},it="select",lt={type:"literal",value:"select",description:'"select"'},ut=function(t){return{type:"selectFormat",options:t}},st="=",ct={type:"literal",value:"=",description:'"="'},ft=function(t,e){return{type:"optionalFormatPattern",selector:t,value:e}},pt="offset:",mt={type:"literal",value:"offset:",description:'"offset:"'},ht=function(t){return t},dt=function(t,e){return{type:"pluralFormat",offset:t,options:e}},yt={type:"other",description:"whitespace"},vt=/^[ \t\n\r]/,gt={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},_t={type:"other",description:"optionalWhitespace"},bt=/^[0-9]/,wt={type:"class",value:"[0-9]",description:"[0-9]"},Ft=/^[0-9a-f]/i,Ot={type:"class",value:"[0-9a-f]i",description:"[0-9a-f]i"},At="0",jt={type:"literal",value:"0",description:'"0"'},Lt=/^[1-9]/,Pt={type:"class",value:"[1-9]",description:"[1-9]"},Dt=function(t){return parseInt(t,10)},Mt=/^[^{}\\\0-\x1F \t\n\r]/,Ct={type:"class",value:"[^{}\\\\\\0-\\x1F \\t\\n\\r]",description:"[^{}\\\\\\0-\\x1F \\t\\n\\r]"},xt="\\\\",Rt={type:"literal",value:"\\\\",description:'"\\\\\\\\"'},Et=function(){return"\\"},St="\\#",Nt={type:"literal",value:"\\#",description:'"\\\\#"'},Tt=function(){return"\\#"},It="\\{",kt={type:"literal",value:"\\{",description:'"\\\\{"'},Gt=function(){return"{"},Ut="\\}",Vt={type:"literal",value:"\\}",description:'"\\\\}"'},Zt=function(){return"}"},$t="\\u",Bt={type:"literal",value:"\\u",description:'"\\\\u"'},Jt=function(t){return String.fromCharCode(parseInt(t,16))},qt=function(t){return t.join("")},zt=0,Ht=0,Wt=0,Kt={line:1,column:1,seenCR:!1},Qt=0,Xt=[],Yt=0;if("startRule"in M){if(!(M.startRule in x))throw new Error("Can't start parsing from rule \""+M.startRule+'".');R=x[M.startRule]}if(D=R(),D!==C&&zt===t.length)return D;throw D!==C&&zt<t.length&&n({type:"end",description:"end of input"}),o(null,Xt,Qt)}return t(e,Error),{SyntaxError:e,parse:r}}();S(i,"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"}}}}),S(i,"__localeData__",{value:N(null)}),S(i,"__addLocaleData",{value:function(t){if(!t||!t.locale)throw new Error("Locale data provided to IntlMessageFormat is missing a `locale` property");i.__localeData__[t.locale.toLowerCase()]=t}}),S(i,"__parse",{value:T.parse}),S(i,"defaultLocale",{enumerable:!0,writable:!0,value:void 0}),i.prototype.resolvedOptions=function(){return{locale:this._locale}},i.prototype._compilePattern=function(t,r,n,o){var a=new e(r,n,o);return a.compile(t)},i.prototype._findPluralRuleFunction=function(t){for(var e=i.__localeData__,r=e[t.toLowerCase()];r;){if(r.pluralRuleFunction)return r.pluralRuleFunction;r=r.parentLocale&&e[r.parentLocale.toLowerCase()]}throw new Error("Locale data added to IntlMessageFormat is missing a `pluralRuleFunction` for :"+t)},i.prototype._format=function(t,e){var r,n,o,a,i,l="";for(r=0,n=t.length;n>r;r+=1)if(o=t[r],"string"!=typeof o){if(a=o.id,!e||!R.call(e,a))throw new Error("A value must be provided for: "+a);i=e[a],l+=o.options?this._format(o.getOption(i),e):o.format(i)}else l+=o;return l},i.prototype._mergeFormats=function(e,r){var n,o,a={};for(n in e)R.call(e,n)&&(a[n]=o=N(e[n]),r&&R.call(r,n)&&t(o,r[n]));return a},i.prototype._resolveLocale=function(t){"string"==typeof t&&(t=[t]),t=(t||[]).concat(i.defaultLocale);var e,r,n,o,a=i.__localeData__;for(e=0,r=t.length;r>e;e+=1)for(n=t[e].toLowerCase().split("-");n.length;){if(o=a[n.join("-")])return o.locale;n.pop()}var l=t.pop();throw new Error("No locale data has been added to IntlMessageFormat for: "+t.join(", ")+", or the default locale: "+l)};var I={locale:"en",pluralRuleFunction:function(t,e){var r=String(t).split("."),n=!r[1],o=Number(r[0])==t,a=o&&r[0].slice(-1),i=o&&r[0].slice(-2);return e?1==a&&11!=i?"one":2==a&&12!=i?"two":3==a&&13!=i?"few":"other":1==t&&n?"one":"other"}};i.__addLocaleData(I),i.defaultLocale="en";var k=Math.round,G=Object.prototype.hasOwnProperty,U=Object.prototype.toString,V=function(){try{return!!Object.defineProperty({},"a",{})}catch(t){return!1}}(),Z=(!V&&!Object.prototype.__defineGetter__,V?Object.defineProperty:function(t,e,r){"get"in r&&t.__defineGetter__?t.__defineGetter__(e,r.get):(!G.call(t,e)||"value"in r)&&(t[e]=r.value)}),$=Object.create||function(t,e){function r(){}var n,o;r.prototype=t,n=new r;for(o in e)G.call(e,o)&&Z(n,o,e[o]);return n},B=Array.prototype.indexOf||function(t,e){var r=this;if(!r.length)return-1;for(var n=e||0,o=r.length;o>n;n++)if(r[n]===t)return n;return-1},J=Array.isArray||function(t){return"[object Array]"===U.call(t)},q=Date.now||function(){return(new Date).getTime()},z=["second","minute","hour","day","month","year"],H=["best fit","numeric"];Z(s,"__localeData__",{value:$(null)}),Z(s,"__addLocaleData",{value:function(t){if(!t||!t.locale)throw new Error("Locale data provided to IntlRelativeFormat is missing a `locale` property value");s.__localeData__[t.locale.toLowerCase()]=t,i.__addLocaleData(t)}}),Z(s,"defaultLocale",{enumerable:!0,writable:!0,value:void 0}),Z(s,"thresholds",{enumerable:!0,value:{second:45,minute:45,hour:22,day:26,month:11}}),s.prototype.resolvedOptions=function(){return{locale:this._locale,style:this._options.style,units:this._options.units}},s.prototype._compileMessage=function(t){var e,r=this._locales,n=(this._locale,this._fields[t]),o=n.relativeTime,a="",l="";for(e in o.future)o.future.hasOwnProperty(e)&&(a+=" "+e+" {"+o.future[e].replace("{0}","#")+"}");for(e in o.past)o.past.hasOwnProperty(e)&&(l+=" "+e+" {"+o.past[e].replace("{0}","#")+"}");var u="{when, select, future {{0, plural, "+a+"}}past {{0, plural, "+l+"}}}";return new i(u,r)},s.prototype._getMessage=function(t){var e=this._messages;return e[t]||(e[t]=this._compileMessage(t)),e[t]},s.prototype._getRelativeUnits=function(t,e){var r=this._fields[e];return r.relative?r.relative[t]:void 0},s.prototype._findFields=function(t){for(var e=s.__localeData__,r=e[t.toLowerCase()];r;){if(r.fields)return r.fields;r=r.parentLocale&&e[r.parentLocale.toLowerCase()]}throw new Error("Locale data added to IntlRelativeFormat is missing `fields` for :"+t)},s.prototype._format=function(t,e){var r=e&&void 0!==e.now?e.now:q();if(void 0===t&&(t=r),!isFinite(r))throw new RangeError("The `now` option provided to IntlRelativeFormat#format() is not in valid range.");if(!isFinite(t))throw new RangeError("The date value provided to IntlRelativeFormat#format() is not in valid range.");var n=u(r,t),o=this._options.units||this._selectUnits(n),a=n[o];if("numeric"!==this._options.style){var i=this._getRelativeUnits(a,o);if(i)return i}return this._getMessage(o).format({0:Math.abs(a),when:0>a?"past":"future"})},s.prototype._isValidUnits=function(t){if(!t||B.call(z,t)>=0)return!0;if("string"==typeof t){var e=/s$/.test(t)&&t.substr(0,t.length-1);if(e&&B.call(z,e)>=0)throw new Error('"'+t+'" is not a valid IntlRelativeFormat `units` value, did you mean: '+e)}throw new Error('"'+t+'" is not a valid IntlRelativeFormat `units` value, it must be one of: "'+z.join('", "')+'"')},s.prototype._resolveLocale=function(t){"string"==typeof t&&(t=[t]),t=(t||[]).concat(s.defaultLocale);var e,r,n,o,a=s.__localeData__;for(e=0,r=t.length;r>e;e+=1)for(n=t[e].toLowerCase().split("-");n.length;){if(o=a[n.join("-")])return o.locale;n.pop()}var i=t.pop();throw new Error("No locale data has been added to IntlRelativeFormat for: "+t.join(", ")+", or the default locale: "+i)},s.prototype._resolveStyle=function(t){if(!t)return H[0];if(B.call(H,t)>=0)return t;throw new Error('"'+t+'" is not a valid IntlRelativeFormat `style` value, it must be one of: "'+H.join('", "')+'"')},s.prototype._selectUnits=function(t){var e,r,n;for(e=0,r=z.length;r>e&&(n=z[e],!(Math.abs(t[n])<s.thresholds[n]));e+=1);return n};var W={locale:"en",pluralRuleFunction:function(t,e){var r=String(t).split("."),n=!r[1],o=Number(r[0])==t,a=o&&r[0].slice(-1),i=o&&r[0].slice(-2);return e?1==a&&11!=i?"one":2==a&&12!=i?"two":3==a&&13!=i?"few":"other":1==t&&n?"one":"other"},fields:{year:{displayName:"year",relative:{0:"this year",1:"next year","-1":"last year"},relativeTime:{future:{one:"in {0} year",other:"in {0} years"},past:{one:"{0} year ago",other:"{0} years ago"}}},month:{displayName:"month",relative:{0:"this month",1:"next month","-1":"last month"},relativeTime:{future:{one:"in {0} month",other:"in {0} months"},past:{one:"{0} month ago",other:"{0} months ago"}}},day:{displayName:"day",relative:{0:"today",1:"tomorrow","-1":"yesterday"},relativeTime:{future:{one:"in {0} day",other:"in {0} days"},past:{one:"{0} day ago",other:"{0} days ago"}}},hour:{displayName:"hour",relativeTime:{future:{one:"in {0} hour",other:"in {0} hours"},past:{one:"{0} hour ago",other:"{0} hours ago"}}},minute:{displayName:"minute",relativeTime:{future:{one:"in {0} minute",other:"in {0} minutes"},past:{one:"{0} minute ago",other:"{0} minutes ago"}}},second:{displayName:"second",relative:{0:"now"},relativeTime:{future:{one:"in {0} second",other:"in {0} seconds"},past:{one:"{0} second ago",other:"{0} seconds ago"}}}}};s.__addLocaleData(W),s.defaultLocale="en";var K=function bt(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];x.classCallCheck(this,bt);var r="ordinal"===e.style,n=y(d(t));this.format=function(t){return n(t,r)}},Q=Function.prototype.bind||function(t){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var e=Array.prototype.slice.call(arguments,1),r=this,n=function(){},o=function(){return r.apply(this instanceof n?this:t,e.concat(Array.prototype.slice.call(arguments)))};return this.prototype&&(n.prototype=this.prototype),o.prototype=new n,o},X=Object.prototype.hasOwnProperty,Y=function(){try{return!!Object.defineProperty({},"a",{})}catch(t){return!1}}(),tt=(!Y&&!Object.prototype.__defineGetter__,Y?Object.defineProperty:function(t,e,r){"get"in r&&t.__defineGetter__?t.__defineGetter__(e,r.get):(!X.call(t,e)||"value"in r)&&(t[e]=r.value)}),et=Object.create||function(t,e){function r(){}var n,o;r.prototype=t,n=new r;for(o in e)X.call(e,o)&&tt(n,o,e[o]);return n},rt={getDateTimeFormat:v(Intl.DateTimeFormat),getNumberFormat:v(Intl.NumberFormat),getMessageFormat:v(i),getRelativeFormat:v(s),getPluralFormat:v(K),now:Date.now()},nt={type:Boolean},ot={type:Number},at={type:String},it=function(t){return{validator:function(e){return t.indexOf(e)>-1}}},lt={localeMatcher:it(["best fit","lookup"]),formatMatcher:it(["basic","best fit"]),timeZone:at,hour12:nt,weekday:it(["narrow","short","long"]),era:it(["narrow","short","long"]),year:it(["numeric","2-digit"]),month:it(["numeric","2-digit","narrow","short","long"]),day:it(["numeric","2-digit"]),hour:it(["numeric","2-digit"]),minute:it(["numeric","2-digit"]),second:it(["numeric","2-digit"]),timeZoneName:it(["short","long"])},ut={localeMatcher:it(["best fit","lookup"]),style:it(["decimal","currency","percent"]),currency:at,currencyDisplay:it(["symbol","code","name"]),useGrouping:nt,minimumIntegerDigits:ot,minimumFractionDigits:ot,maximumFractionDigits:ot,minimumSignificantDigits:ot,maximumSignificantDigits:ot},st={style:it(["best fit","numeric"]),units:it(["second","minute","hour","day","month","year"])},ct={style:it(["cardinal","ordinal"])},ft={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},pt=/[&><"']/g,mt=Object.keys(lt),ht=Object.keys(ut),dt=Object.keys(st),yt=Object.keys(ct),vt={second:60,minute:60,hour:24,day:30,month:12},gt=Object.freeze({formatDate:A,formatTime:j,formatRelative:L,formatNumber:P,formatPlural:D,formatMessage:M,formatHTMLMessage:C}),_t={install:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];t.addLocaleData=c,t.registerMessages=f.bind(null,t),t.registerFormats=p.bind(null,t),t.setLocale=m.bind(null,t),t.__format_state=rt,t.__format_config={defaultLocale:e.defaultLocale||"en",defaultFormats:e.defaultFormats||{}};var r=!0,n=!1,o=void 0;try{for(var a,i=function(){var e=a.value;t.prototype["$"+e]=function(){var r={locale:t.locale};Object.assign(r,h(t));for(var n=t.__format_state,o=arguments.length,a=Array(o),i=0;o>i;i++)a[i]=arguments[i];return gt[e].apply(gt,[r,n].concat(a))}},l=Object.getOwnPropertyNames(gt).filter(function(t){return gt[t]instanceof Function})[Symbol.iterator]();!(r=(a=l.next()).done);r=!0)i()}catch(u){n=!0,o=u}finally{try{!r&&l["return"]&&l["return"]()}finally{if(n)throw o}}}};return _t});
//# sourceMappingURL=vue-intl.min.js.map
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VueIntl=e()}(this,function(){"use strict";function t(t){var e,r,n,o,a=Array.prototype.slice.call(arguments,1);for(e=0,r=a.length;e<r;e+=1)if(n=a[e])for(o in n)D.call(n,o)&&(t[o]=n[o]);return t}function e(t,e,r){this.locales=t,this.formats=e,this.pluralFn=r}function r(t){this.id=t}function n(t,e,r,n,o){this.id=t,this.useOrdinal=e,this.offset=r,this.options=n,this.pluralFn=o}function o(t,e,r,n){this.id=t,this.offset=e,this.numberFormat=r,this.string=n}function a(t,e){this.id=t,this.options=e}function i(t,e,r){var n="string"==typeof t?i.__parse(t):t;if(!n||"messageFormatPattern"!==n.type)throw new TypeError("A message must be provided as a String or AST.");r=this._mergeFormats(i.formats,r),C(this,"_locale",{value:this._resolveLocale(e)});var o=this._findPluralRuleFunction(this._locale),a=this._compilePattern(n,e,r,o),l=this;this.format=function(t){return l._format(a,t)}}function l(t){return 400*t/146097}function u(t,e){e=e||{},Z(t)&&(t=t.concat()),z(this,"_locale",{value:this._resolveLocale(t)}),z(this,"_options",{value:{style:this._resolveStyle(e.style),units:this._isValidUnits(e.units)&&e.units}}),z(this,"_locales",{value:t}),z(this,"_fields",{value:this._findFields(this._locale)}),z(this,"_messages",{value:$(null)});var r=this;this.format=function(t,e){return r._format(t,e)}}function s(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=Array.isArray(t)?t:[t];e.forEach(function(t){t&&t.locale&&(i.__addLocaleData(t),u.__addLocaleData(t))})}function c(t,e,r){t.__allMessages=t.__allMessages||{},t.__allMessages[e]=t.__allMessages[e]||{},Object.assign(t.__allMessages[e],r)}function f(t,e,r){t.__allFormats=t.__allFormats||{},t.__allFormats[e]=t.__allFormats[e]||{},Object.assign(t.__allFormats[e],r)}function p(t,e){t.set(t,"locale",e);var r=Object.getOwnPropertyNames((t.__allFormats||{})[e]||{}).length>0;t.__format_config.formats=r?t.__allFormats[e]:t.__format_config.defaultFormats,t.__format_config.messages=(t.__allMessages||{})[e]||{}}function m(t){var e=t.locale,r=Object.getOwnPropertyNames((t.__allFormats||{})[e]||{}).length>0,n=r?t.__allFormats[e]:t.__format_config.defaultFormats,o=(t.__allMessages||{})[e]||{};return{formats:n,messages:o,defaultLocale:t.__format_config.defaultLocale,defaultFormats:t.__format_config.defaultFormats}}function h(t){return i.prototype._resolveLocale(t)}function y(t){return i.prototype._findPluralRuleFunction(t)}function d(t){var e=Ct(null);return function(){var r=Array.prototype.slice.call(arguments),n=v(r),o=n&&e[n];return o||(o=new(xt.apply(t,[null].concat(r))),n&&(e[n]=o)),o}}function v(t){if("undefined"!=typeof JSON){var e,r,n,o=[];for(e=0,r=t.length;e<r;e+=1)n=t[e],n&&"object"===("undefined"==typeof n?"undefined":Pt.typeof(n))?o.push(g(n)):o.push(n);return JSON.stringify(o)}}function g(t){var e,r,n,o,a=[],i=[];for(e in t)t.hasOwnProperty(e)&&i.push(e);var l=i.sort();for(r=0,n=l.length;r<n;r+=1)e=l[r],o={},o[e]=t[e],a[r]=o;return a}function _(t){return(""+t).replace(Vt,function(t){return $t[t]})}function b(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.reduce(function(e,n){return t.hasOwnProperty(n)?e[n]=t[n]:r.hasOwnProperty(n)&&(e[n]=r[n]),e},{})}function w(t){var e=u.thresholds;e.second=t.second,e.minute=t.minute,e.hour=t.hour,e.day=t.day,e.month=t.month}function F(t,e,r){var n=t&&t[e]&&t[e][r];if(n)return n}function O(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=t.locale,a=t.formats,i=n.format,l=new Date(r),u=i&&F(a,"date",i),s=b(n,Zt,u);try{return e.getDateTimeFormat(o,s).format(l)}catch(t){}return String(l)}function j(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=t.locale,a=t.formats,i=n.format,l=new Date(r),u=i&&F(a,"time",i),s=b(n,Zt,u);0===Object.keys(s).length&&(s={hour:"numeric",minute:"numeric"});try{return e.getDateTimeFormat(o,s).format(l)}catch(t){}return String(l)}function A(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=t.locale,a=t.formats,i=n.format,l=new Date(r),s=new Date(n.now),c=i&&F(a,"relative",i),f=b(n,Wt,c),p=Object.assign({},u.thresholds);w(Jt);try{return e.getRelativeFormat(o,f).format(l,{now:isFinite(s)?s:e.now()})}catch(t){}finally{w(p)}return String(l)}function P(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=t.locale,a=t.formats,i=n.format,l=i&&F(a,"number",i),u=b(n,qt,l);try{return e.getNumberFormat(o,u).format(r)}catch(t){}return String(r)}function S(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=t.locale,a=b(n,Bt);try{return e.getPluralFormat(o,a).format(r)}catch(t){}return"other"}function x(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=t.locale,a=t.formats,i=t.messages,l=t.defaultLocale,u=t.defaultFormats,s=r.id,c=r.defaultMessage;if(!s)throw new TypeError("[Vue Intl] An `id` must be provided to format a message.");var f=i&&i[s],p=Object.keys(n).length>0;if(!p)return f||c||s;var m=void 0;if(f)try{var h=e.getMessageFormat(f,o,a);m=h.format(n)}catch(t){}if(!m&&c)try{var y=e.getMessageFormat(c,l,u);m=y.format(n)}catch(t){}return m||f||c||s}function L(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=Object.keys(n).reduce(function(t,e){var r=n[e];return t[e]="string"==typeof r?_(r):r,t},{});return x(t,e,r,o)}var D=Object.prototype.hasOwnProperty,E=function(){try{return!!Object.defineProperty({},"a",{})}catch(t){return!1}}(),C=E?Object.defineProperty:function(t,e,r){"get"in r&&t.__defineGetter__?t.__defineGetter__(e,r.get):(!D.call(t,e)||"value"in r)&&(t[e]=r.value)},R=Object.create||function(t,e){function r(){}var n,o;r.prototype=t,n=new r;for(o in e)D.call(e,o)&&C(n,o,e[o]);return n};e.prototype.compile=function(t){return this.pluralStack=[],this.currentPlural=null,this.pluralNumberFormat=null,this.compileMessage(t)},e.prototype.compileMessage=function(t){if(!t||"messageFormatPattern"!==t.type)throw new Error('Message AST is not of type: "messageFormatPattern"');var e,r,n,o=t.elements,a=[];for(e=0,r=o.length;e<r;e+=1)switch(n=o[e],n.type){case"messageTextElement":a.push(this.compileMessageText(n));break;case"argumentElement":a.push(this.compileArgument(n));break;default:throw new Error("Message element does not have a valid type")}return a},e.prototype.compileMessageText=function(t){return this.currentPlural&&/(^|[^\\])#/g.test(t.value)?(this.pluralNumberFormat||(this.pluralNumberFormat=new Intl.NumberFormat(this.locales)),new o(this.currentPlural.id,this.currentPlural.format.offset,this.pluralNumberFormat,t.value)):t.value.replace(/\\#/g,"#")},e.prototype.compileArgument=function(t){var e=t.format;if(!e)return new r(t.id);var o,i=this.formats,l=this.locales,u=this.pluralFn;switch(e.type){case"numberFormat":return o=i.number[e.style],{id:t.id,format:new Intl.NumberFormat(l,o).format};case"dateFormat":return o=i.date[e.style],{id:t.id,format:new Intl.DateTimeFormat(l,o).format};case"timeFormat":return o=i.time[e.style],{id:t.id,format:new Intl.DateTimeFormat(l,o).format};case"pluralFormat":return o=this.compileOptions(t),new n(t.id,e.ordinal,e.offset,o,u);case"selectFormat":return o=this.compileOptions(t),new a(t.id,o);default:throw new Error("Message element does not have a valid format type")}},e.prototype.compileOptions=function(t){var e=t.format,r=e.options,n={};this.pluralStack.push(this.currentPlural),this.currentPlural="pluralFormat"===e.type?t:null;var o,a,i;for(o=0,a=r.length;o<a;o+=1)i=r[o],n[i.selector]=this.compileMessage(i.value);return this.currentPlural=this.pluralStack.pop(),n},r.prototype.format=function(t){return t?"string"==typeof t?t:String(t):""},n.prototype.getOption=function(t){var e=this.options,r=e["="+t]||e[this.pluralFn(t-this.offset,this.useOrdinal)];return r||e.other},o.prototype.format=function(t){var e=this.numberFormat.format(t-this.offset);return this.string.replace(/(^|[^\\])#/g,"$1"+e).replace(/\\#/g,"#")},a.prototype.getOption=function(t){var e=this.options;return e[t]||e.other};var T=function(){function t(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function e(t,e,r,n,o,a){this.message=t,this.expected=e,this.found=r,this.offset=n,this.line=o,this.column=a,this.name="SyntaxError"}function r(t){function r(e){function r(e,r,n){var o,a;for(o=r;o<n;o++)a=t.charAt(o),"\n"===a?(e.seenCR||e.line++,e.column=1,e.seenCR=!1):"\r"===a||"\u2028"===a||"\u2029"===a?(e.line++,e.column=1,e.seenCR=!0):(e.column++,e.seenCR=!1)}return Ht!==e&&(Ht>e&&(Ht=0,Kt={line:1,column:1,seenCR:!1}),r(Kt,Ht,e),Ht=e),Kt}function n(t){Bt<Qt||(Bt>Qt&&(Qt=Bt,Xt=[]),Xt.push(t))}function o(n,o,a){function i(t){var e=1;for(t.sort(function(t,e){return t.description<e.description?-1:t.description>e.description?1:0});e<t.length;)t[e-1]===t[e]?t.splice(e,1):e++}function l(t,e){function r(t){function e(t){return t.charCodeAt(0).toString(16).toUpperCase()}return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,function(t){return"\\x0"+e(t)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(t){return"\\x"+e(t)}).replace(/[\u0180-\u0FFF]/g,function(t){return"\\u0"+e(t)}).replace(/[\u1080-\uFFFF]/g,function(t){return"\\u"+e(t)})}var n,o,a,i=new Array(t.length);for(a=0;a<t.length;a++)i[a]=t[a].description;return n=t.length>1?i.slice(0,-1).join(", ")+" or "+i[t.length-1]:i[0],o=e?'"'+r(e)+'"':"end of input","Expected "+n+" but "+o+" found."}var u=r(a),s=a<t.length?t.charAt(a):null;return null!==o&&i(o),new e(null!==n?n:l(o,s),o,s,a,u.line,u.column)}function a(){var t;return t=i()}function i(){var t,e,r;for(t=Bt,e=[],r=l();r!==D;)e.push(r),r=l();return e!==D&&(Jt=t,e=R(e)),t=e}function l(){var t;return t=s(),t===D&&(t=f()),t}function u(){var e,r,n,o,a,i;if(e=Bt,r=[],n=Bt,o=F(),o!==D?(a=S(),a!==D?(i=F(),i!==D?(o=[o,a,i],n=o):(Bt=n,n=T)):(Bt=n,n=T)):(Bt=n,n=T),n!==D)for(;n!==D;)r.push(n),n=Bt,o=F(),o!==D?(a=S(),a!==D?(i=F(),i!==D?(o=[o,a,i],n=o):(Bt=n,n=T)):(Bt=n,n=T)):(Bt=n,n=T);else r=T;return r!==D&&(Jt=e,r=M(r)),e=r,e===D&&(e=Bt,r=w(),r!==D&&(r=t.substring(e,Bt)),e=r),e}function s(){var t,e;return t=Bt,e=u(),e!==D&&(Jt=t,e=I(e)),t=e}function c(){var e,r,o;if(e=A(),e===D){if(e=Bt,r=[],N.test(t.charAt(Bt))?(o=t.charAt(Bt),Bt++):(o=D,0===Yt&&n(k)),o!==D)for(;o!==D;)r.push(o),N.test(t.charAt(Bt))?(o=t.charAt(Bt),Bt++):(o=D,0===Yt&&n(k));else r=T;r!==D&&(r=t.substring(e,Bt)),e=r}return e}function f(){var e,r,o,a,i,l,u,s,f;return e=Bt,123===t.charCodeAt(Bt)?(r=G,Bt++):(r=D,0===Yt&&n(U)),r!==D?(o=F(),o!==D?(a=c(),a!==D?(i=F(),i!==D?(l=Bt,44===t.charCodeAt(Bt)?(u=$,Bt++):(u=D,0===Yt&&n(V)),u!==D?(s=F(),s!==D?(f=p(),f!==D?(u=[u,s,f],l=u):(Bt=l,l=T)):(Bt=l,l=T)):(Bt=l,l=T),l===D&&(l=z),l!==D?(u=F(),u!==D?(125===t.charCodeAt(Bt)?(s=Z,Bt++):(s=D,0===Yt&&n(q)),s!==D?(Jt=e,r=W(a,l),e=r):(Bt=e,e=T)):(Bt=e,e=T)):(Bt=e,e=T)):(Bt=e,e=T)):(Bt=e,e=T)):(Bt=e,e=T)):(Bt=e,e=T),e}function p(){var t;return t=m(),t===D&&(t=h(),t===D&&(t=y(),t===D&&(t=d()))),t}function m(){var e,r,o,a,i,l,u;return e=Bt,t.substr(Bt,6)===B?(r=B,Bt+=6):(r=D,0===Yt&&n(J)),r===D&&(t.substr(Bt,4)===H?(r=H,Bt+=4):(r=D,0===Yt&&n(K)),r===D&&(t.substr(Bt,4)===Q?(r=Q,Bt+=4):(r=D,0===Yt&&n(X)))),r!==D?(o=F(),o!==D?(a=Bt,44===t.charCodeAt(Bt)?(i=$,Bt++):(i=D,0===Yt&&n(V)),i!==D?(l=F(),l!==D?(u=S(),u!==D?(i=[i,l,u],a=i):(Bt=a,a=T)):(Bt=a,a=T)):(Bt=a,a=T),a===D&&(a=z),a!==D?(Jt=e,r=Y(r,a),e=r):(Bt=e,e=T)):(Bt=e,e=T)):(Bt=e,e=T),e}function h(){var e,r,o,a,i,l;return e=Bt,t.substr(Bt,6)===tt?(r=tt,Bt+=6):(r=D,0===Yt&&n(et)),r!==D?(o=F(),o!==D?(44===t.charCodeAt(Bt)?(a=$,Bt++):(a=D,0===Yt&&n(V)),a!==D?(i=F(),i!==D?(l=b(),l!==D?(Jt=e,r=rt(l),e=r):(Bt=e,e=T)):(Bt=e,e=T)):(Bt=e,e=T)):(Bt=e,e=T)):(Bt=e,e=T),e}function y(){var e,r,o,a,i,l;return e=Bt,t.substr(Bt,13)===nt?(r=nt,Bt+=13):(r=D,0===Yt&&n(ot)),r!==D?(o=F(),o!==D?(44===t.charCodeAt(Bt)?(a=$,Bt++):(a=D,0===Yt&&n(V)),a!==D?(i=F(),i!==D?(l=b(),l!==D?(Jt=e,r=at(l),e=r):(Bt=e,e=T)):(Bt=e,e=T)):(Bt=e,e=T)):(Bt=e,e=T)):(Bt=e,e=T),e}function d(){var e,r,o,a,i,l,u;if(e=Bt,t.substr(Bt,6)===it?(r=it,Bt+=6):(r=D,0===Yt&&n(lt)),r!==D)if(o=F(),o!==D)if(44===t.charCodeAt(Bt)?(a=$,Bt++):(a=D,0===Yt&&n(V)),a!==D)if(i=F(),i!==D){if(l=[],u=g(),u!==D)for(;u!==D;)l.push(u),u=g();else l=T;l!==D?(Jt=e,r=ut(l),e=r):(Bt=e,e=T)}else Bt=e,e=T;else Bt=e,e=T;else Bt=e,e=T;else Bt=e,e=T;return e}function v(){var e,r,o,a;return e=Bt,r=Bt,61===t.charCodeAt(Bt)?(o=st,Bt++):(o=D,0===Yt&&n(ct)),o!==D?(a=A(),a!==D?(o=[o,a],r=o):(Bt=r,r=T)):(Bt=r,r=T),r!==D&&(r=t.substring(e,Bt)),e=r,e===D&&(e=S()),e}function g(){var e,r,o,a,l,u,s,c,f;return e=Bt,r=F(),r!==D?(o=v(),o!==D?(a=F(),a!==D?(123===t.charCodeAt(Bt)?(l=G,Bt++):(l=D,0===Yt&&n(U)),l!==D?(u=F(),u!==D?(s=i(),s!==D?(c=F(),c!==D?(125===t.charCodeAt(Bt)?(f=Z,Bt++):(f=D,0===Yt&&n(q)),f!==D?(Jt=e,r=ft(o,s),e=r):(Bt=e,e=T)):(Bt=e,e=T)):(Bt=e,e=T)):(Bt=e,e=T)):(Bt=e,e=T)):(Bt=e,e=T)):(Bt=e,e=T)):(Bt=e,e=T),e}function _(){var e,r,o,a;return e=Bt,t.substr(Bt,7)===pt?(r=pt,Bt+=7):(r=D,0===Yt&&n(mt)),r!==D?(o=F(),o!==D?(a=A(),a!==D?(Jt=e,r=ht(a),e=r):(Bt=e,e=T)):(Bt=e,e=T)):(Bt=e,e=T),e}function b(){var t,e,r,n,o;if(t=Bt,e=_(),e===D&&(e=z),e!==D)if(r=F(),r!==D){if(n=[],o=g(),o!==D)for(;o!==D;)n.push(o),o=g();else n=T;n!==D?(Jt=t,e=yt(e,n),t=e):(Bt=t,t=T)}else Bt=t,t=T;else Bt=t,t=T;return t}function w(){var e,r;if(Yt++,e=[],vt.test(t.charAt(Bt))?(r=t.charAt(Bt),Bt++):(r=D,0===Yt&&n(gt)),r!==D)for(;r!==D;)e.push(r),vt.test(t.charAt(Bt))?(r=t.charAt(Bt),Bt++):(r=D,0===Yt&&n(gt));else e=T;return Yt--,e===D&&(r=D,0===Yt&&n(dt)),e}function F(){var e,r,o;for(Yt++,e=Bt,r=[],o=w();o!==D;)r.push(o),o=w();return r!==D&&(r=t.substring(e,Bt)),e=r,Yt--,e===D&&(r=D,0===Yt&&n(_t)),e}function O(){var e;return bt.test(t.charAt(Bt))?(e=t.charAt(Bt),Bt++):(e=D,0===Yt&&n(wt)),e}function j(){var e;return Ft.test(t.charAt(Bt))?(e=t.charAt(Bt),Bt++):(e=D,0===Yt&&n(Ot)),e}function A(){var e,r,o,a,i,l;if(e=Bt,48===t.charCodeAt(Bt)?(r=jt,Bt++):(r=D,0===Yt&&n(At)),r===D){if(r=Bt,o=Bt,Pt.test(t.charAt(Bt))?(a=t.charAt(Bt),Bt++):(a=D,0===Yt&&n(St)),a!==D){for(i=[],l=O();l!==D;)i.push(l),l=O();i!==D?(a=[a,i],o=a):(Bt=o,o=T)}else Bt=o,o=T;o!==D&&(o=t.substring(r,Bt)),r=o}return r!==D&&(Jt=e,r=xt(r)),e=r}function P(){var e,r,o,a,i,l,u,s;return Lt.test(t.charAt(Bt))?(e=t.charAt(Bt),Bt++):(e=D,0===Yt&&n(Dt)),e===D&&(e=Bt,t.substr(Bt,2)===Et?(r=Et,Bt+=2):(r=D,0===Yt&&n(Ct)),r!==D&&(Jt=e,r=Rt()),e=r,e===D&&(e=Bt,t.substr(Bt,2)===Tt?(r=Tt,Bt+=2):(r=D,0===Yt&&n(Mt)),r!==D&&(Jt=e,r=It()),e=r,e===D&&(e=Bt,t.substr(Bt,2)===Nt?(r=Nt,Bt+=2):(r=D,0===Yt&&n(kt)),r!==D&&(Jt=e,r=Gt()),e=r,e===D&&(e=Bt,t.substr(Bt,2)===Ut?(r=Ut,Bt+=2):(r=D,0===Yt&&n(zt)),r!==D&&(Jt=e,r=$t()),e=r,e===D&&(e=Bt,t.substr(Bt,2)===Vt?(r=Vt,Bt+=2):(r=D,0===Yt&&n(Zt)),r!==D?(o=Bt,a=Bt,i=j(),i!==D?(l=j(),l!==D?(u=j(),u!==D?(s=j(),s!==D?(i=[i,l,u,s],a=i):(Bt=a,a=T)):(Bt=a,a=T)):(Bt=a,a=T)):(Bt=a,a=T),a!==D&&(a=t.substring(o,Bt)),o=a,o!==D?(Jt=e,r=qt(o),e=r):(Bt=e,e=T)):(Bt=e,e=T)))))),e}function S(){var t,e,r;if(t=Bt,e=[],r=P(),r!==D)for(;r!==D;)e.push(r),r=P();else e=T;return e!==D&&(Jt=t,e=Wt(e)),t=e}var x,L=arguments.length>1?arguments[1]:{},D={},E={start:a},C=a,R=function(t){return{type:"messageFormatPattern",elements:t}},T=D,M=function(t){var e,r,n,o,a,i="";for(e=0,n=t.length;e<n;e+=1)for(o=t[e],r=0,a=o.length;r<a;r+=1)i+=o[r];return i},I=function(t){return{type:"messageTextElement",value:t}},N=/^[^ \t\n\r,.+={}#]/,k={type:"class",value:"[^ \\t\\n\\r,.+={}#]",description:"[^ \\t\\n\\r,.+={}#]"},G="{",U={type:"literal",value:"{",description:'"{"'},z=null,$=",",V={type:"literal",value:",",description:'","'},Z="}",q={type:"literal",value:"}",description:'"}"'},W=function(t,e){return{type:"argumentElement",id:t,format:e&&e[2]}},B="number",J={type:"literal",value:"number",description:'"number"'},H="date",K={type:"literal",value:"date",description:'"date"'},Q="time",X={type:"literal",value:"time",description:'"time"'},Y=function(t,e){return{type:t+"Format",style:e&&e[2]}},tt="plural",et={type:"literal",value:"plural",description:'"plural"'},rt=function(t){return{type:t.type,ordinal:!1,offset:t.offset||0,options:t.options}},nt="selectordinal",ot={type:"literal",value:"selectordinal",description:'"selectordinal"'},at=function(t){return{type:t.type,ordinal:!0,offset:t.offset||0,options:t.options}},it="select",lt={type:"literal",value:"select",description:'"select"'},ut=function(t){return{type:"selectFormat",options:t}},st="=",ct={type:"literal",value:"=",description:'"="'},ft=function(t,e){return{type:"optionalFormatPattern",selector:t,value:e}},pt="offset:",mt={type:"literal",value:"offset:",description:'"offset:"'},ht=function(t){return t},yt=function(t,e){return{type:"pluralFormat",offset:t,options:e}},dt={type:"other",description:"whitespace"},vt=/^[ \t\n\r]/,gt={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},_t={type:"other",description:"optionalWhitespace"},bt=/^[0-9]/,wt={type:"class",value:"[0-9]",description:"[0-9]"},Ft=/^[0-9a-f]/i,Ot={type:"class",value:"[0-9a-f]i",description:"[0-9a-f]i"},jt="0",At={type:"literal",value:"0",description:'"0"'},Pt=/^[1-9]/,St={type:"class",value:"[1-9]",description:"[1-9]"},xt=function(t){return parseInt(t,10)},Lt=/^[^{}\\\0-\x1F \t\n\r]/,Dt={type:"class",value:"[^{}\\\\\\0-\\x1F \\t\\n\\r]",description:"[^{}\\\\\\0-\\x1F \\t\\n\\r]"},Et="\\\\",Ct={type:"literal",value:"\\\\",description:'"\\\\\\\\"'},Rt=function(){return"\\"},Tt="\\#",Mt={type:"literal",value:"\\#",description:'"\\\\#"'},It=function(){return"\\#"},Nt="\\{",kt={type:"literal",value:"\\{",description:'"\\\\{"'},Gt=function(){return"{"},Ut="\\}",zt={type:"literal",value:"\\}",description:'"\\\\}"'},$t=function(){return"}"},Vt="\\u",Zt={type:"literal",value:"\\u",description:'"\\\\u"'},qt=function(t){return String.fromCharCode(parseInt(t,16))},Wt=function(t){return t.join("")},Bt=0,Jt=0,Ht=0,Kt={line:1,column:1,seenCR:!1},Qt=0,Xt=[],Yt=0;if("startRule"in L){if(!(L.startRule in E))throw new Error("Can't start parsing from rule \""+L.startRule+'".');C=E[L.startRule]}if(x=C(),x!==D&&Bt===t.length)return x;throw x!==D&&Bt<t.length&&n({type:"end",description:"end of input"}),o(null,Xt,Qt)}return t(e,Error),{SyntaxError:e,parse:r}}();C(i,"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"}}}}),C(i,"__localeData__",{value:R(null)}),C(i,"__addLocaleData",{value:function(t){if(!t||!t.locale)throw new Error("Locale data provided to IntlMessageFormat is missing a `locale` property");i.__localeData__[t.locale.toLowerCase()]=t}}),C(i,"__parse",{value:T.parse}),C(i,"defaultLocale",{enumerable:!0,writable:!0,value:void 0}),i.prototype.resolvedOptions=function(){return{locale:this._locale}},i.prototype._compilePattern=function(t,r,n,o){var a=new e(r,n,o);return a.compile(t)},i.prototype._findPluralRuleFunction=function(t){for(var e=i.__localeData__,r=e[t.toLowerCase()];r;){if(r.pluralRuleFunction)return r.pluralRuleFunction;r=r.parentLocale&&e[r.parentLocale.toLowerCase()]}throw new Error("Locale data added to IntlMessageFormat is missing a `pluralRuleFunction` for :"+t)},i.prototype._format=function(t,e){var r,n,o,a,i,l="";for(r=0,n=t.length;r<n;r+=1)if(o=t[r],"string"!=typeof o){if(a=o.id,!e||!D.call(e,a))throw new Error("A value must be provided for: "+a);i=e[a],l+=o.options?this._format(o.getOption(i),e):o.format(i)}else l+=o;return l},i.prototype._mergeFormats=function(e,r){var n,o,a={};for(n in e)D.call(e,n)&&(a[n]=o=R(e[n]),r&&D.call(r,n)&&t(o,r[n]));return a},i.prototype._resolveLocale=function(t){"string"==typeof t&&(t=[t]),t=(t||[]).concat(i.defaultLocale);var e,r,n,o,a=i.__localeData__;for(e=0,r=t.length;e<r;e+=1)for(n=t[e].toLowerCase().split("-");n.length;){if(o=a[n.join("-")])return o.locale;n.pop()}var l=t.pop();throw new Error("No locale data has been added to IntlMessageFormat for: "+t.join(", ")+", or the default locale: "+l)};var M={locale:"en",pluralRuleFunction:function(t,e){var r=String(t).split("."),n=!r[1],o=Number(r[0])==t,a=o&&r[0].slice(-1),i=o&&r[0].slice(-2);return e?1==a&&11!=i?"one":2==a&&12!=i?"two":3==a&&13!=i?"few":"other":1==t&&n?"one":"other"}};i.__addLocaleData(M),i.defaultLocale="en";var I=Math.round,N=function(t,e){t=+t,e=+e;var r=I(e-t),n=I(r/1e3),o=I(n/60),a=I(o/60),i=I(a/24),u=I(i/7),s=l(i),c=I(12*s),f=I(s);return{millisecond:r,second:n,minute:o,hour:a,day:i,week:u,month:c,year:f}},k=Object.prototype.hasOwnProperty,G=Object.prototype.toString,U=function(){try{return!!Object.defineProperty({},"a",{})}catch(t){return!1}}(),z=U?Object.defineProperty:function(t,e,r){"get"in r&&t.__defineGetter__?t.__defineGetter__(e,r.get):(!k.call(t,e)||"value"in r)&&(t[e]=r.value)},$=Object.create||function(t,e){function r(){}var n,o;r.prototype=t,n=new r;for(o in e)k.call(e,o)&&z(n,o,e[o]);return n},V=Array.prototype.indexOf||function(t,e){var r=this;if(!r.length)return-1;for(var n=e||0,o=r.length;n<o;n++)if(r[n]===t)return n;return-1},Z=Array.isArray||function(t){return"[object Array]"===G.call(t)},q=Date.now||function(){return(new Date).getTime()},W=["second","minute","hour","day","month","year"],B=["best fit","numeric"];z(u,"__localeData__",{value:$(null)}),z(u,"__addLocaleData",{value:function(t){if(!t||!t.locale)throw new Error("Locale data provided to IntlRelativeFormat is missing a `locale` property value");u.__localeData__[t.locale.toLowerCase()]=t,i.__addLocaleData(t)}}),z(u,"defaultLocale",{enumerable:!0,writable:!0,value:void 0}),z(u,"thresholds",{enumerable:!0,value:{second:45,minute:45,hour:22,day:26,month:11}}),u.prototype.resolvedOptions=function(){return{locale:this._locale,style:this._options.style,units:this._options.units}},u.prototype._compileMessage=function(t){var e,r=this._locales,n=(this._locale,this._fields[t]),o=n.relativeTime,a="",l="";for(e in o.future)o.future.hasOwnProperty(e)&&(a+=" "+e+" {"+o.future[e].replace("{0}","#")+"}");for(e in o.past)o.past.hasOwnProperty(e)&&(l+=" "+e+" {"+o.past[e].replace("{0}","#")+"}");var u="{when, select, future {{0, plural, "+a+"}}past {{0, plural, "+l+"}}}";return new i(u,r)},u.prototype._getMessage=function(t){var e=this._messages;return e[t]||(e[t]=this._compileMessage(t)),e[t]},u.prototype._getRelativeUnits=function(t,e){var r=this._fields[e];if(r.relative)return r.relative[t]},u.prototype._findFields=function(t){for(var e=u.__localeData__,r=e[t.toLowerCase()];r;){if(r.fields)return r.fields;r=r.parentLocale&&e[r.parentLocale.toLowerCase()]}throw new Error("Locale data added to IntlRelativeFormat is missing `fields` for :"+t)},u.prototype._format=function(t,e){var r=e&&void 0!==e.now?e.now:q();if(void 0===t&&(t=r),!isFinite(r))throw new RangeError("The `now` option provided to IntlRelativeFormat#format() is not in valid range.");if(!isFinite(t))throw new RangeError("The date value provided to IntlRelativeFormat#format() is not in valid range.");var n=N(r,t),o=this._options.units||this._selectUnits(n),a=n[o];if("numeric"!==this._options.style){var i=this._getRelativeUnits(a,o);if(i)return i}return this._getMessage(o).format({0:Math.abs(a),when:a<0?"past":"future"})},u.prototype._isValidUnits=function(t){if(!t||V.call(W,t)>=0)return!0;if("string"==typeof t){var e=/s$/.test(t)&&t.substr(0,t.length-1);if(e&&V.call(W,e)>=0)throw new Error('"'+t+'" is not a valid IntlRelativeFormat `units` value, did you mean: '+e)}throw new Error('"'+t+'" is not a valid IntlRelativeFormat `units` value, it must be one of: "'+W.join('", "')+'"')},u.prototype._resolveLocale=function(t){"string"==typeof t&&(t=[t]),t=(t||[]).concat(u.defaultLocale);var e,r,n,o,a=u.__localeData__;for(e=0,r=t.length;e<r;e+=1)for(n=t[e].toLowerCase().split("-");n.length;){if(o=a[n.join("-")])return o.locale;n.pop()}var i=t.pop();throw new Error("No locale data has been added to IntlRelativeFormat for: "+t.join(", ")+", or the default locale: "+i)},u.prototype._resolveStyle=function(t){if(!t)return B[0];if(V.call(B,t)>=0)return t;throw new Error('"'+t+'" is not a valid IntlRelativeFormat `style` value, it must be one of: "'+B.join('", "')+'"')},u.prototype._selectUnits=function(t){var e,r,n;for(e=0,r=W.length;e<r&&(n=W[e],!(Math.abs(t[n])<u.thresholds[n]));e+=1);return n};var J={locale:"en",pluralRuleFunction:function(t,e){var r=String(t).split("."),n=!r[1],o=Number(r[0])==t,a=o&&r[0].slice(-1),i=o&&r[0].slice(-2);return e?1==a&&11!=i?"one":2==a&&12!=i?"two":3==a&&13!=i?"few":"other":1==t&&n?"one":"other"},fields:{year:{displayName:"year",relative:{0:"this year",1:"next year","-1":"last year"},relativeTime:{future:{one:"in {0} year",other:"in {0} years"},past:{one:"{0} year ago",other:"{0} years ago"}}},month:{displayName:"month",relative:{0:"this month",1:"next month","-1":"last month"},relativeTime:{future:{one:"in {0} month",other:"in {0} months"},past:{one:"{0} month ago",other:"{0} months ago"}}},day:{displayName:"day",relative:{0:"today",1:"tomorrow","-1":"yesterday"},relativeTime:{future:{one:"in {0} day",other:"in {0} days"},past:{one:"{0} day ago",other:"{0} days ago"}}},hour:{displayName:"hour",relativeTime:{future:{one:"in {0} hour",other:"in {0} hours"},past:{one:"{0} hour ago",other:"{0} hours ago"}}},minute:{displayName:"minute",relativeTime:{future:{one:"in {0} minute",other:"in {0} minutes"},past:{one:"{0} minute ago",other:"{0} minutes ago"}}},second:{displayName:"second",relative:{0:"now"},relativeTime:{future:{one:"in {0} second",other:"in {0} seconds"},past:{one:"{0} second ago",other:"{0} seconds ago"}}}}};u.__addLocaleData(J),u.defaultLocale="en";var H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},K=function(){var t="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;return function(e,r,n,o){var a=e&&e.defaultProps,i=arguments.length-3;if(r||0===i||(r={}),r&&a)for(var l in a)void 0===r[l]&&(r[l]=a[l]);else r||(r=a||{});if(1===i)r.children=o;else if(i>1){for(var u=Array(i),s=0;s<i;s++)u[s]=arguments[s+3];r.children=u}return{$$typeof:t,type:e,key:void 0===n?null:""+n,ref:null,props:r,_owner:null}}}(),Q=function(t){if("function"==typeof Symbol){if(Symbol.asyncIterator){var e=t[Symbol.asyncIterator];if(null!=e)return e.call(t)}if(Symbol.iterator)return t[Symbol.iterator]()}throw new TypeError("Object is not async iterable")},X=function(){function t(t){this.value=t}function e(e){function r(t,e){return new Promise(function(r,o){var l={key:t,arg:e,resolve:r,reject:o,next:null};i?i=i.next=l:(a=i=l,n(t,e))})}function n(r,a){try{var i=e[r](a),l=i.value;l instanceof t?Promise.resolve(l.value).then(function(t){n("next",t)},function(t){n("throw",t)}):o(i.done?"return":"normal",i.value)}catch(t){o("throw",t)}}function o(t,e){switch(t){case"return":a.resolve({value:e,done:!0});break;case"throw":a.reject(e);break;default:a.resolve({value:e,done:!1})}a=a.next,a?n(a.key,a.arg):i=null}var a,i;this._invoke=r,"function"!=typeof e.return&&(this.return=void 0)}return"function"==typeof Symbol&&Symbol.asyncIterator&&(e.prototype[Symbol.asyncIterator]=function(){return this}),e.prototype.next=function(t){return this._invoke("next",t)},e.prototype.throw=function(t){return this._invoke("throw",t)},e.prototype.return=function(t){return this._invoke("return",t)},{wrap:function(t){return function(){return new e(t.apply(this,arguments))}},await:function(e){return new t(e)}}}(),Y=function(t,e){function r(r,n){return o=!0,n=new Promise(function(e){e(t[r](n))}),{done:!1,value:e(n)}}var n={},o=!1;return"function"==typeof Symbol&&Symbol.iterator&&(n[Symbol.iterator]=function(){return this}),n.next=function(t){return o?(o=!1,t):r("next",t)},"function"==typeof t.throw&&(n.throw=function(t){if(o)throw o=!1,t;return r("throw",t)}),"function"==typeof t.return&&(n.return=function(t){return r("return",t)}),n},tt=function(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,r){function n(o,a){try{var i=e[o](a),l=i.value}catch(t){return void r(t)}return i.done?void t(l):Promise.resolve(l).then(function(t){n("next",t)},function(t){n("throw",t)})}return n("next")})}},et=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},rt=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),nt=function(t,e){for(var r in e){var n=e[r];n.configurable=n.enumerable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,r,n)}return t},ot=function(t,e){for(var r=Object.getOwnPropertyNames(e),n=0;n<r.length;n++){var o=r[n],a=Object.getOwnPropertyDescriptor(e,o);a&&a.configurable&&void 0===t[o]&&Object.defineProperty(t,o,a)}return t},at=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},it=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},lt=function t(e,r,n){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,r);if(void 0===o){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,r,n)}if("value"in o)return o.value;var i=o.get;if(void 0!==i)return i.call(n)},ut=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},st=function(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?e[Symbol.hasInstance](t):t instanceof e},ct=function(t){return t&&t.__esModule?t:{default:t}},ft=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e},pt=function(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")},mt=function(t){if(null==t)throw new TypeError("Cannot destructure undefined")},ht=function(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r},yt=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},dt="undefined"==typeof global?self:global,vt=function t(e,r,n,o){var a=Object.getOwnPropertyDescriptor(e,r);if(void 0===a){var i=Object.getPrototypeOf(e);null!==i&&t(i,r,n,o)}else if("value"in a&&a.writable)a.value=n;else{var l=a.set;void 0!==l&&l.call(o,n)}return n},gt=function(){function t(t,e){var r=[],n=!0,o=!1,a=void 0;try{for(var i,l=t[Symbol.iterator]();!(n=(i=l.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(t){o=!0,a=t}finally{try{!n&&l.return&&l.return()}finally{if(o)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_t=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t)){for(var r,n=[],o=t[Symbol.iterator]();!(r=o.next()).done&&(n.push(r.value),!e||n.length!==e););return n}throw new TypeError("Invalid attempt to destructure non-iterable instance")},bt=function(t,e){
return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))},wt=function(t,e){return t.raw=e,t},Ft=function(t,e,r){if(t===r)throw new ReferenceError(e+" is not defined - temporal dead zone");return t},Ot={},jt=function(t){return Array.isArray(t)?t:Array.from(t)},At=function(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)},Pt=Object.freeze({jsx:K,asyncIterator:Q,asyncGenerator:X,asyncGeneratorDelegate:Y,asyncToGenerator:tt,classCallCheck:et,createClass:rt,defineEnumerableProperties:nt,defaults:ot,defineProperty:at,get:lt,inherits:ut,interopRequireDefault:ct,interopRequireWildcard:ft,newArrowCheck:pt,objectDestructuringEmpty:mt,objectWithoutProperties:ht,possibleConstructorReturn:yt,selfGlobal:dt,set:vt,slicedToArray:gt,slicedToArrayLoose:_t,taggedTemplateLiteral:bt,taggedTemplateLiteralLoose:wt,temporalRef:Ft,temporalUndefined:Ot,toArray:jt,toConsumableArray:At,typeof:H,extends:it,instanceof:st}),St=function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};et(this,t);var n="ordinal"===r.style,o=y(h(e));this.format=function(t){return o(t,n)}},xt=Function.prototype.bind||function(t){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var e=Array.prototype.slice.call(arguments,1),r=this,n=function(){},o=function(){return r.apply(this instanceof n?this:t,e.concat(Array.prototype.slice.call(arguments)))};return this.prototype&&(n.prototype=this.prototype),o.prototype=new n,o},Lt=Object.prototype.hasOwnProperty,Dt=function(){try{return!!Object.defineProperty({},"a",{})}catch(t){return!1}}(),Et=Dt?Object.defineProperty:function(t,e,r){"get"in r&&t.__defineGetter__?t.__defineGetter__(e,r.get):(!Lt.call(t,e)||"value"in r)&&(t[e]=r.value)},Ct=Object.create||function(t,e){function r(){}var n,o;r.prototype=t,n=new r;for(o in e)Lt.call(e,o)&&Et(n,o,e[o]);return n},Rt={getDateTimeFormat:d(Intl.DateTimeFormat),getNumberFormat:d(Intl.NumberFormat),getMessageFormat:d(i),getRelativeFormat:d(u),getPluralFormat:d(St),now:Date.now()},Tt={type:Boolean},Mt={type:Number},It={type:String},Nt=function(t){return{validator:function(e){return t.indexOf(e)>-1}}},kt={localeMatcher:Nt(["best fit","lookup"]),formatMatcher:Nt(["basic","best fit"]),timeZone:It,hour12:Tt,weekday:Nt(["narrow","short","long"]),era:Nt(["narrow","short","long"]),year:Nt(["numeric","2-digit"]),month:Nt(["numeric","2-digit","narrow","short","long"]),day:Nt(["numeric","2-digit"]),hour:Nt(["numeric","2-digit"]),minute:Nt(["numeric","2-digit"]),second:Nt(["numeric","2-digit"]),timeZoneName:Nt(["short","long"])},Gt={localeMatcher:Nt(["best fit","lookup"]),style:Nt(["decimal","currency","percent"]),currency:It,currencyDisplay:Nt(["symbol","code","name"]),useGrouping:Tt,minimumIntegerDigits:Mt,minimumFractionDigits:Mt,maximumFractionDigits:Mt,minimumSignificantDigits:Mt,maximumSignificantDigits:Mt},Ut={style:Nt(["best fit","numeric"]),units:Nt(["second","minute","hour","day","month","year"])},zt={style:Nt(["cardinal","ordinal"])},$t={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},Vt=/[&><"']/g,Zt=Object.keys(kt),qt=Object.keys(Gt),Wt=Object.keys(Ut),Bt=Object.keys(zt),Jt={second:60,minute:60,hour:24,day:30,month:12},Ht=Object.freeze({formatDate:O,formatTime:j,formatRelative:A,formatNumber:P,formatPlural:S,formatMessage:x,formatHTMLMessage:L}),Kt={install:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.addLocaleData=s,t.registerMessages=c.bind(null,t),t.registerFormats=f.bind(null,t),t.setLocale=p.bind(null,t),t.__format_state=Rt,t.__format_config={defaultLocale:e.defaultLocale||"en",defaultFormats:e.defaultFormats||{}};var r=!0,n=!1,o=void 0;try{for(var a,i=function(){var e=a.value;t.prototype["$"+e]=function(){var r={locale:t.locale};Object.assign(r,m(t));for(var n=t.__format_state,o=arguments.length,a=Array(o),i=0;i<o;i++)a[i]=arguments[i];return Ht[e].apply(Ht,[r,n].concat(a))}},l=Object.getOwnPropertyNames(Ht).filter(function(t){return Ht[t]instanceof Function})[Symbol.iterator]();!(r=(a=l.next()).done);r=!0)i()}catch(t){n=!0,o=t}finally{try{!r&&l.return&&l.return()}finally{if(n)throw o}}}};return Kt});
//# sourceMappingURL=vue-intl.min.js.map

15

package.json
{
"name": "vue-intl",
"version": "0.5.0",
"version": "2.0.0",
"description": "Vue Plugin for FormatJS Internalization and Localization",

@@ -57,3 +57,3 @@ "main": "dist/vue-intl.js",

"peerDependencies": {
"vue": "^1.0.0"
"vue": "^2.0.0"
},

@@ -75,9 +75,10 @@ "devDependencies": {

"rimraf": "^2.5.2",
"rollup": "^0.26.2",
"rollup-plugin-babel": "^2.4.0",
"rollup-plugin-commonjs": "^2.2.1",
"rollup-plugin-node-resolve": "^1.5.0",
"rollup": "^0.40.2",
"rollup-plugin-babel": "^2.3.9",
"rollup-plugin-commonjs": "^7.0.0",
"rollup-plugin-memory": "^2.0.0",
"rollup-plugin-node-resolve": "^2.0.0",
"rollup-plugin-replace": "^1.1.0",
"rollup-plugin-uglify": "^0.3.1"
"rollup-plugin-uglify": "^1.0.0"
}
}

@@ -86,3 +86,3 @@ # vue-intl

```html
<p>{{{ $formatDate(now) }}}</p>
<p v-html="$formatDate(now)"></p>
```

@@ -103,3 +103,3 @@

```html
<p>{{{ $formatDate(now, { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }) }}}</p>
<p v-html="$formatDate(now, { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' })"></p>
```

@@ -124,3 +124,3 @@

```html
<p>{{{ $formatTime(now, {format: 'short'}) }}}</p>
<p v-html="$formatTime(now, {format: 'short'})"></p>
```

@@ -148,3 +148,3 @@

```html
<p>{{{ $formatRelative(two_days_ago) }}}</p>
<p v-html="$formatRelative(two_days_ago)"></p>
```

@@ -170,3 +170,3 @@

```html
<p>{{{ $formatNumber(number_of_things) }}}</p>
<p v-html="$formatNumber(number_of_things)"></p>
```

@@ -185,3 +185,3 @@

```html
<p>{{{ $formatNumber(pct_of_things, {style: 'percent'}) }}}</p>
<p v-html="$formatNumber(pct_of_things, {style: 'percent'})"></p>
```

@@ -205,3 +205,3 @@

```html
<p>{{{ $formatPlural(number_of_things, {style: 'cardinal') }}}</p>
<p v-html="$formatPlural(number_of_things, {style: 'cardinal')"></p>
```

@@ -220,3 +220,3 @@

```html
<p>{{{ $formatPlural(number_of_things, {style: 'ordinal') }}}</p>
<p v-html="$formatPlural(number_of_things, {style: 'ordinal')"></p>
```

@@ -244,3 +244,3 @@

```html
<p>{{{ $formatMessage({id: 'example_message_id', defaultMessage: "It's my cat's {year, selectordinal,
<p v-html="$formatMessage({id: 'example_message_id', defaultMessage: 'It\'s my cat\'s {year, selectordinal,
one {#st}

@@ -250,3 +250,3 @@ two {#nd}

other {#th}
} birthday!"}, {year: year}) }}}</p>
} birthday!'}, {year: year})"></p>
```

@@ -253,0 +253,0 @@

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc