!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):e.IntlPolyfill=r()}(this,function(){"use strict";function e(e){if("function"==typeof Math.log10)return Math.floor(Math.log10(e));var r=Math.round(Math.log(e)*Math.LOG10E);return r-(Number("1e"+r)>e)}function r(e){for(var t in e)(e instanceof r||Ce.call(e,t))&&Ge(this,t,{value:e[t],enumerable:!0,writable:!0,configurable:!0})}function t(){Ge(this,"length",{writable:!0,value:0}),arguments.length&&Ke.apply(this,Ue.call(arguments))}function n(){if(Xe.disableRegExpRestore)return function(){};for(var e={lastMatch:RegExp.lastMatch||"",leftContext:RegExp.leftContext,multiline:RegExp.multiline,input:RegExp.input},r=!1,t=1;t<=9;t++)r=(e["$"+t]=RegExp["$"+t])||r;return function(){var t=/[.?*+^$[\]\\(){}|-]/g,n=e.lastMatch.replace(t,"\\$&"),a="";if(r)for(var i=1;i<=9;i++){var o=e["$"+i];o?(o=o.replace(t,"\\$&"),a+=n.substring(0,n.indexOf(o))+"(",n=o+")"+n.substring(n.indexOf(o)+o.length)):(a+="(",n=")"+n)}a+=n,a=a.replace(/((^|[^\\])((\\\\)*\\[()])+|[^()])+/g,function(e){return"[\\s\\S]{"+e.replace(/\\(.)/g,"$1").length+"}"});var s=new RegExp(a,e.multiline?"gm":"g");s.lastIndex=e.leftContext.length,s.exec(e.input)}}function a(e){if(null===e)throw new TypeError("Cannot convert null or undefined to object");return"object"===("undefined"==typeof e?"undefined":Ae.typeof(e))?e:Object(e)}function i(e){return"number"==typeof e?e:Number(e)}function o(e){var r=i(e);return isNaN(r)?0:0===r||r===-0||r===+(1/0)||r===-(1/0)?r:r<0?Math.floor(Math.abs(r))*-1:Math.floor(Math.abs(r))}function s(e){var r=o(e);return r<=0?0:r===1/0?Math.pow(2,53)-1:Math.min(r,Math.pow(2,53)-1)}function l(e){return Ce.call(e,"__getInternalProperties")?e.__getInternalProperties(Ve):Be(null)}function u(e){vr=e}function c(e){for(var r=e.length;r--;){var t=e.charAt(r);t>="a"&&t<="z"&&(e=e.slice(0,r)+t.toUpperCase()+e.slice(r+1))}return e}function f(e){return!!cr.test(e)&&(!fr.test(e)&&!gr.test(e))}function g(e){var r=void 0,t=void 0;e=e.toLowerCase(),t=e.split("-");for(var n=1,a=t.length;n1&&(r.sort(),e=e.replace(RegExp("(?:"+mr.source+")+","i"),Ye.call(r,""))),Ce.call(hr.tags,e)&&(e=hr.tags[e]),t=e.split("-");for(var i=1,o=t.length;i-1)return t;var n=t.lastIndexOf("-");if(n<0)return;n>=2&&"-"===t.charAt(n-2)&&(n-=2),t=t.substring(0,n)}}function p(e,t){for(var n=0,a=t.length,i=void 0,o=void 0,s=void 0;n1){var l=e.substring(o,i-1);t.push(l)}var u=e.substring(i,a);t.push(u),o=a+1,n=!1}else if(n===!0){var c=e.substring(i,a);t.push(c),o=a+1}i=a+1}a+=1}if(r-i===2){if(i-o>1){var f=e.substring(o,i-1);t.push(f)}o=i}var g=e.substring(o,r);return t.push(g),t}function w(e,t,n,a,i){if(0===e.length)throw new ReferenceError("No locale data has been provided for this object yet.");var o=n["[[localeMatcher]]"],s=void 0;s="lookup"===o?p(e,t):y(e,t);var l=s["[[locale]]"],u=void 0,c=void 0;if(Ce.call(s,"[[extension]]")){var f=s["[[extension]]"];u=b(f),c=u.length}var m=new r;m["[[dataLocale]]"]=l;for(var v="-u",h=0,d=a.length;h2){var S=u[O+1],F=z.call(j,S);F!==-1&&(k=S,D="-"+w+"-"+k)}else{var E=z(j,"true");E!==-1&&(k="true")}}if(Ce.call(n,"[["+w+"]]")){var P=n["[["+w+"]]"];z.call(j,P)!==-1&&P!==k&&(k=P,D="")}m["[["+w+"]]"]=k,v+=D,h++}if(v.length>2){var L=l.indexOf("-x-");if(L===-1)l+=v;else{var N=l.substring(0,L),_=l.substring(L);l=N+v+_}l=g(l)}return m["[[locale]]"]=l,m}function x(e,r){for(var n=r.length,a=new t,i=0;in)throw new RangeError("Value is not a number or outside accepted range");return Math.floor(i)}return a}function O(e){for(var r=h(e),t=[],n=r.length,a=0;a0&&void 0!==arguments[0]?arguments[0]:void 0,r=null!==this&&"object"===Ae.typeof(this)&&l(this);if(!r||!r["[[initializedNumberFormat]]"])throw new TypeError("`this` value for formatToParts() is not an initialized Intl.NumberFormat object.");var t=Number(e);return N(this,t)}function N(e,r){for(var t=T(e,r),n=[],a=0,i=0;t.length>i;i++){var o=t[i],s={};s.type=o["[[type]]"],s.value=o["[[value]]"],n[a]=s,a+=1}return n}function _(e,r){var t=l(e),n=void 0;return n=Ce.call(t,"[[minimumSignificantDigits]]")&&Ce.call(t,"[[maximumSignificantDigits]]")?M(r,t["[[minimumSignificantDigits]]"],t["[[maximumSignificantDigits]]"]):A(r,t["[[minimumIntegerDigits]]"],t["[[minimumFractionDigits]]"],t["[[maximumFractionDigits]]"])}function T(e,r){var n=l(e),a=n["[[dataLocale]]"],i=n["[[numberingSystem]]"],o=Xe.NumberFormat["[[localeData]]"][a],s=o.symbols[i]||o.symbols.latn,u=void 0;!isNaN(r)&&r<0?(r=-r,u=n["[[negativePattern]]"]):u=n["[[positivePattern]]"];for(var c=new t,f=u.indexOf("{",0),g=0,m=0,v=u.length;f>-1&&fm){var h=u.substring(m,f);Ke.call(c,{"[[type]]":"literal","[[value]]":h})}var d=u.substring(f+1,g);if("number"===d)if(isNaN(r)){var p=s.nan;Ke.call(c,{"[[type]]":"nan","[[value]]":p})}else if(isFinite(r)){"percent"===n["[[style]]"]&&(r*=100);var y=_(e,r);wr[i]?!function(){var e=wr[i];y=String(y).replace(/\d/g,function(r){return e[r]})}():y=String(y);var b=void 0,w=void 0,x=y.indexOf(".",0);if(x>0?(b=y.substring(0,x),w=y.substring(x+1,x.length)):(b=y,w=void 0),n["[[useGrouping]]"]===!0){var j=s.group,k=[],D=o.patterns.primaryGroupSize||3,z=o.patterns.secondaryGroupSize||D;if(b.length>D){var O=b.length-D,S=O%z,F=b.slice(0,S);for(F.length&&Ke.call(k,F);Sa;a++){var i=t[a];n+=i["[[value]]"]}return n}function M(r,t,n){var a=n,i=void 0,o=void 0;if(0===r)i=Ye.call(Array(a+1),"0"),o=0;else{o=e(Math.abs(r));var s=Math.round(Math.exp(Math.abs(o-a+1)*Math.LN10));i=String(Math.round(o-a+1<0?r*s:r/s))}if(o>=a)return i+Ye.call(Array(o-a+1+1),"0");if(o===a-1)return i;if(o>=0?i=i.slice(0,o+1)+"."+i.slice(o+1):o<0&&(i="0."+Ye.call(Array(-(o+1)+1),"0")+i),i.indexOf(".")>=0&&n>t){for(var l=n-t;l>0&&"0"===i.charAt(i.length-1);)i=i.slice(0,-1),l--;"."===i.charAt(i.length-1)&&(i=i.slice(0,-1))}return i}function A(e,r,t,n){var a=n,i=Math.pow(10,a)*e,o=0===i?"0":i.toFixed(0),s=void 0,l=(s=o.indexOf("e"))>-1?o.slice(s+1):0;l&&(o=o.slice(0,s).replace(".",""),o+=Ye.call(Array(l-(o.length-1)+1),"0"));var u=void 0;if(0!==a){var c=o.length;if(c<=a){var f=Ye.call(Array(a+1-c+1),"0");o=f+o,c=a+1}var g=o.substring(0,c-a),m=o.substring(c-a,o.length);o=g+"."+m,u=g.length}else u=o.length;for(var v=n-t;v>0&&"0"===o.slice(-1);)o=o.slice(0,-1),v--;if("."===o.slice(-1)&&(o=o.slice(0,-1)),ul&&(l=m,u=g),c++}return u}function J(e,r){var t=[];for(var n in Fr)Ce.call(Fr,n)&&void 0!==e["[["+n+"]]"]&&t.push(n);if(1===t.length){var a=$(t[0],e["[["+t[0]+"]]"]);if(a)return a}for(var i=120,o=20,s=8,l=6,u=6,c=3,f=2,g=1,m=-(1/0),v=void 0,h=0,d=r.length;h=2||z>=2&&D<=1?O>0?y-=l:O<0&&(y-=s):O>1?y-=c:O<-1&&(y-=u)}}p._.hour12!==e.hour12&&(y-=g),y>m&&(m=y,v=p),h++}return v}function Q(){var e=null!==this&&"object"===Ae.typeof(this)&&l(this);if(!e||!e["[[initializedDateTimeFormat]]"])throw new TypeError("`this` value for format() is not an initialized Intl.DateTimeFormat object.");if(void 0===e["[[boundFormat]]"]){var r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,r=void 0===e?Date.now():i(e);return te(this,r)},t=We.call(r,this);e["[[boundFormat]]"]=t}return e["[[boundFormat]]"]}function ee(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,r=null!==this&&"object"===Ae.typeof(this)&&l(this);if(!r||!r["[[initializedDateTimeFormat]]"])throw new TypeError("`this` value for formatToParts() is not an initialized Intl.DateTimeFormat object.");var t=void 0===e?Date.now():i(e);return ne(this,t)}function re(e,r){if(!isFinite(r))throw new RangeError("Invalid valid date passed to format");var a=e.__getInternalProperties(Ve);n();for(var i=a["[[locale]]"],o=new yr.NumberFormat([i],{useGrouping:!1}),s=new yr.NumberFormat([i],{minimumIntegerDigits:2,useGrouping:!1}),l=ae(r,a["[[calendar]]"],a["[[timeZone]]"]),u=a["[[pattern]]"],c=new t,f=0,g=u.indexOf("{"),m=0,v=a["[[dataLocale]]"],h=Xe.DateTimeFormat["[[localeData]]"][v].calendars,d=a["[[calendar]]"];g!==-1;){var p=void 0;if(m=u.indexOf("}",g),m===-1)throw new Error("Unclosed pattern");g>f&&Ke.call(c,{type:"literal",value:u.substring(f,g)});var y=u.substring(g+1,m);if(Fr.hasOwnProperty(y)){var b=a["[["+y+"]]"],w=l["[["+y+"]]"];if("year"===y&&w<=0?w=1-w:"month"===y?w++:"hour"===y&&a["[[hour12]]"]===!0&&(w%=12,0===w&&a["[[hourNo0]]"]===!0&&(w=12)),"numeric"===b)p=I(o,w);else if("2-digit"===b)p=I(s,w),p.length>2&&(p=p.slice(-2));else if(b in Sr)switch(y){case"month":p=K(h,d,"months",b,l["[["+y+"]]"]);break;case"weekday":try{p=K(h,d,"days",b,l["[["+y+"]]"])}catch(e){throw new Error("Could not find weekday data for locale "+i)}break;case"timeZoneName":p="";break;case"era":try{p=K(h,d,"eras",b,l["[["+y+"]]"])}catch(e){throw new Error("Could not find era data for locale "+i)}break;default:p=l["[["+y+"]]"]}Ke.call(c,{type:y,value:p})}else if("ampm"===y){var x=l["[[hour]]"];p=K(h,d,"dayPeriods",x>11?"pm":"am",null),Ke.call(c,{type:"dayPeriod",value:p})}else Ke.call(c,{type:"literal",value:u.substring(g,m+1)});f=m+1,g=u.indexOf("{",f)}return ma;a++){var i=t[a];n+=i.value}return n}function ne(e,r){for(var t=re(e,r),n=[],a=0;t.length>a;a++){var i=t[a];n.push({type:i.type,value:i.value})}return n}function ae(e,t,n){var a=new Date(e),i="get"+(n||"");return new r({"[[weekday]]":a[i+"Day"](),"[[era]]":+(a[i+"FullYear"]()>=0),"[[year]]":a[i+"FullYear"](),"[[month]]":a[i+"Month"](),"[[day]]":a[i+"Date"](),"[[hour]]":a[i+"Hours"](),"[[minute]]":a[i+"Minutes"](),"[[second]]":a[i+"Seconds"](),"[[inDST]]":!1})}function ie(e,r){if(!e.number)throw new Error("Object passed doesn't contain locale data for Intl.NumberFormat");var t=void 0,n=[r],a=r.split("-");for(a.length>2&&4===a[1].length&&Ke.call(n,a[0]+"-"+a[2]);t=He.call(n);)Ke.call(Xe.NumberFormat["[[availableLocales]]"],t),Xe.NumberFormat["[[localeData]]"][t]=e.number,e.date&&(e.date.nu=e.number.nu,Ke.call(Xe.DateTimeFormat["[[availableLocales]]"],t),Xe.DateTimeFormat["[[localeData]]"][t]=e.date);void 0===vr&&u(r)}var oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},se=function(){var e="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;return function(r,t,n,a){var i=r&&r.defaultProps,o=arguments.length-3;if(t||0===o||(t={}),t&&i)for(var s in i)void 0===t[s]&&(t[s]=i[s]);else t||(t=i||{});if(1===o)t.children=a;else if(o>1){for(var l=Array(o),u=0;u=0||Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},Oe=function(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r},Se="undefined"==typeof global?self:global,Fe=function e(r,t,n,a){var i=Object.getOwnPropertyDescriptor(r,t);if(void 0===i){var o=Object.getPrototypeOf(r);null!==o&&e(o,t,n,a)}else if("value"in i&&i.writable)i.value=n;else{var s=i.set;void 0!==s&&s.call(a,n)}return n},Ee=function(){function e(e,r){var t=[],n=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(t.push(o.value),!r||t.length!==r);n=!0);}catch(e){a=!0,i=e}finally{try{!n&&s.return&&s.return()}finally{if(a)throw i}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),Pe=function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){for(var t,n=[],a=e[Symbol.iterator]();!(t=a.next()).done&&(n.push(t.value),!r||n.length!==r););return n}throw new TypeError("Invalid attempt to destructure non-iterable instance")},Le=function(e,r){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))},Ne=function(e,r){return e.raw=r,e},_e=function(e,r,t){if(e===t)throw new ReferenceError(r+" is not defined - temporal dead zone");return e},Te={},Ie=function(e){return Array.isArray(e)?e:Array.from(e)},Me=function(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r