Socket
Socket
Sign inDemoInstall

intl-messageformat-parser

Package Overview
Dependencies
Maintainers
6
Versions
145
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

intl-messageformat-parser - npm Package Compare versions

Comparing version 5.0.3 to 5.0.4

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [5.0.4](https://github.com/formatjs/formatjs/compare/intl-messageformat-parser@5.0.3...intl-messageformat-parser@5.0.4) (2020-05-16)
**Note:** Version bump only for package intl-messageformat-parser
## [5.0.3](https://github.com/formatjs/formatjs/compare/intl-messageformat-parser@5.0.2...intl-messageformat-parser@5.0.3) (2020-05-05)

@@ -8,0 +16,0 @@

2

dist/umd/intl-messageformat-parser.min.js

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).IntlMessageFormatParser={})}(this,function(Xt){"use strict";var e,t;function f(e){return e.type===Xt.TYPE.literal}function n(e){return e.type===Xt.TYPE.select}function u(e){return e.type===Xt.TYPE.plural}(e=Xt.TYPE||(Xt.TYPE={}))[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag",(t=Xt.SKELETON_TYPE||(Xt.SKELETON_TYPE={}))[t.number=0]="number",t[t.dateTime=1]="dateTime";var a,i,r=(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Jt=function(){return(Jt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var u in t=arguments[r])Object.prototype.hasOwnProperty.call(t,u)&&(e[u]=t[u]);return e}).apply(this,arguments)},er=(i=Error,r(o,i),o.buildMessage=function(e,t){function r(e){return e.charCodeAt(0).toString(16).toUpperCase()}function n(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(e){return"\\x0"+r(e)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(e){return"\\x"+r(e)})}function u(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(e){return"\\x0"+r(e)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(e){return"\\x"+r(e)})}function a(e){switch(e.type){case"literal":return'"'+n(e.text)+'"';case"class":var t=e.parts.map(function(e){return Array.isArray(e)?u(e[0])+"-"+u(e[1]):u(e)});return"["+(e.inverted?"^":"")+t+"]";case"any":return"any character";case"end":return"end of input";case"other":return e.description}}return"Expected "+function(e){var t,r,n=e.map(a);if(n.sort(),0<n.length){for(r=t=1;t<n.length;t++)n[t-1]!==n[t]&&(n[r]=n[t],r++);n.length=r}switch(n.length){case 1:return n[0];case 2:return n[0]+" or "+n[1];default:return n.slice(0,-1).join(", ")+", or "+n[n.length-1]}}(e)+" but "+((i=t)?'"'+n(i)+'"':"end of input")+" found.";var i},o);function o(e,t,r,n){var u=i.call(this)||this;return u.message=e,u.expected=t,u.found=r,u.location=n,u.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(u,o),u}var p=function(f,e){var t,p={},r={start:xt},n=xt,u=function(e){return e.join("")},a=function(e){return Jt({type:Xt.TYPE.literal,value:e},Wt())},i="#",o=vt("#",!1),c=function(){return Jt({type:Xt.TYPE.pound},Wt())},s=At("tagElement"),l="<",h=vt("<",!1),g="/>",d=vt("/>",!1),m=function(e){return Jt({type:Xt.TYPE.literal,value:e.join("")},Wt())},v=function(e,t,r){return e!==r&&mt('Mismatch tag "'+e+'" !== "'+r+'"',dt()),Jt({type:Xt.TYPE.tag,value:e,children:t},Wt())},y=function(){return Gt.push("openingTag"),!0},A=">",b=vt(">",!1),E=function(e){return Gt.pop(),!0},w=function(e){return e},x="</",C=vt("</",!1),T=function(){return Gt.push("closingTag"),!0},D=At("argumentElement"),k="{",P=vt("{",!1),F="}",S=vt("}",!1),Y=function(e){return Jt({type:Xt.TYPE.argument,value:e},Wt())},O=At("numberSkeletonId"),j=/^['\/{}]/,R=yt(["'","/","{","}"],!1,!1),N={type:"any"},_=At("numberSkeletonTokenOption"),B="/",Z=vt("/",!1),z=function(e){return e},L=At("numberSkeletonToken"),M=function(e,t){return{stem:e,options:t}},K=function(e){return Jt({type:0,tokens:e},Wt())},$="::",q=vt("::",!1),H=function(e){return e},I=function(){return Gt.push("numberArgStyle"),!0},U=function(e){return Gt.pop(),e.replace(/\s*$/,"")},G=",",Q=vt(",",!1),V="number",W=vt("number",!1),X=function(e,t,r){return Jt({type:"number"===t?Xt.TYPE.number:"date"===t?Xt.TYPE.date:Xt.TYPE.time,style:r&&r[2],value:e},Wt())},J="'",ee=vt("'",!1),te=/^[^']/,re=yt(["'"],!0,!1),ne=/^[^a-zA-Z'{}]/,ue=yt([["a","z"],["A","Z"],"'","{","}"],!0,!1),ae=/^[a-zA-Z]/,ie=yt([["a","z"],["A","Z"]],!1,!1),oe=function(e){return Jt({type:1,pattern:e},Wt())},ce=function(){return Gt.push("dateOrTimeArgStyle"),!0},se="date",le=vt("date",!1),fe="time",pe=vt("time",!1),he="plural",ge=vt("plural",!1),de="selectordinal",me=vt("selectordinal",!1),ve="offset:",ye=vt("offset:",!1),Ae=function(e,t,r,n){return Jt({type:Xt.TYPE.plural,pluralType:"plural"===t?"cardinal":"ordinal",value:e,offset:r?r[2]:0,options:n.reduce(function(e,t){var r=t.id,n=t.value,u=t.location;return r in e&&mt('Duplicate option "'+r+'" in plural element: "'+gt()+'"',dt()),e[r]={value:n,location:u},e},{})},Wt())},be="select",Ee=vt("select",!1),we=function(e,t){return Jt({type:Xt.TYPE.select,value:e,options:t.reduce(function(e,t){var r=t.id,n=t.value,u=t.location;return r in e&&mt('Duplicate option "'+r+'" in select element: "'+gt()+'"',dt()),e[r]={value:n,location:u},e},{})},Wt())},xe="=",Ce=vt("=",!1),Te=function(e){return Gt.push("select"),!0},De=function(e,t){return Gt.pop(),Jt({id:e,value:t},Wt())},ke=function(e){return Gt.push("plural"),!0},Pe=function(e,t){return Gt.pop(),Jt({id:e,value:t},Wt())},Fe=At("whitespace"),Se=/^[\t-\r \x85\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Ye=yt([["\t","\r"]," ","…"," "," ",[" "," "],"\u2028","\u2029"," "," "," "],!1,!1),Oe=At("syntax pattern"),je=/^[!-\/:-@[-\^`{-~\xA1-\xA7\xA9\xAB\xAC\xAE\xB0\xB1\xB6\xBB\xBF\xD7\xF7\u2010-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u245F\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3020\u3030\uFD3E\uFD3F\uFE45\uFE46]/,Re=yt([["!","/"],[":","@"],["[","^"],"`",["{","~"],["¡","§"],"©","«","¬","®","°","±","¶","»","¿","×","÷",["‐","‧"],["‰","‾"],["⁁","⁓"],["⁕","⁞"],["←","⑟"],["─","❵"],["➔","⯿"],["⸀","⹿"],["、","〃"],["〈","〠"],"〰","﴾","﴿","﹅","﹆"],!1,!1),Ne=At("optional whitespace"),_e=At("number"),Be="-",Ze=vt("-",!1),ze=function(e,t){return t?e?-t:t:0},Le=At("double apostrophes"),Me="''",Ke=vt("''",!1),$e=function(){return"'"},qe=function(e,t){return e+t.replace("''","'")},He=function(e){return!("<"===e||"{"===e||Vt()&&"#"===e||Qt()&&"}"===e||Qt()&&">"===e)},Ie="\n",Ue=vt("\n",!1),Ge=function(e){return"<"===e||">"===e||"{"===e||"}"===e||Vt()&&"#"===e},Qe=At("argNameOrNumber"),Ve=At("validTag"),We=At("argNumber"),Xe="0",Je=vt("0",!1),et=function(){return 0},tt=/^[1-9]/,rt=yt([["1","9"]],!1,!1),nt=/^[0-9]/,ut=yt([["0","9"]],!1,!1),at=function(e){return parseInt(e.join(""),10)},it=At("argName"),ot=At("tagName"),ct=0,st=0,lt=[{line:1,column:1}],ft=0,pt=[],ht=0;if(void 0!==(e=void 0!==e?e:{}).startRule){if(!(e.startRule in r))throw new Error("Can't start parsing from rule \""+e.startRule+'".');n=r[e.startRule]}function gt(){return f.substring(st,ct)}function dt(){return Et(st,ct)}function mt(e,t){throw t=void 0!==t?t:Et(st,ct),new er(e,[],"",t)}function vt(e,t){return{type:"literal",text:e,ignoreCase:t}}function yt(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function At(e){return{type:"other",description:e}}function bt(e){var t,r=lt[e];if(r)return r;for(t=e-1;!lt[t];)t--;for(r={line:(r=lt[t]).line,column:r.column};t<e;)10===f.charCodeAt(t)?(r.line++,r.column=1):r.column++,t++;return lt[e]=r}function Et(e,t){var r=bt(e),n=bt(t);return{start:{offset:e,line:r.line,column:r.column},end:{offset:t,line:n.line,column:n.column}}}function wt(e){ct<ft||(ft<ct&&(ft=ct,pt=[]),pt.push(e))}function xt(){return Ct()}function Ct(){var e,t;for(e=[],t=Tt();t!==p;)e.push(t),t=Tt();return e}function Tt(){var e;return(e=function(){var e,t;e=ct,(t=Dt())!==p&&(st=e,t=a(t));return e=t}())===p&&(e=function(){var e,t,r,n,u;ht++,e=ct,123===f.charCodeAt(ct)?(t=k,ct++):(t=p,0===ht&&wt(P));e=t!==p?(r=_t(),r!==p?(n=Mt())!==p?_t()!==p?(125===f.charCodeAt(ct)?(u=F,ct++):(u=p,0===ht&&wt(S)),u!==p?(st=e,t=Y(n)):(ct=e,p)):(ct=e,p):(ct=e,p):(ct=e,p)):(ct=e,p);ht--,e===p&&(t=p,0===ht&&wt(D));return e}())===p&&(e=function(){var e;(e=function(){var e,t,r,n,u,a,i,o,c,s;e=ct,123===f.charCodeAt(ct)?(t=k,ct++):(t=p,0===ht&&wt(P));e=t!==p?(r=_t(),r!==p?(n=Mt())!==p?_t()!==p?(44===f.charCodeAt(ct)?(u=G,ct++):(u=p,0===ht&&wt(Q)),u!==p?_t()!==p?(f.substr(ct,6)===V?(a=V,ct+=6):(a=p,0===ht&&wt(W)),a!==p?_t()!==p?(i=ct,44===f.charCodeAt(ct)?(o=G,ct++):(o=p,0===ht&&wt(Q)),(i=o!==p?(c=_t())!==p?(s=function(){var e,t,r;e=ct,f.substr(ct,2)===$?(t=$,ct+=2):(t=p,0===ht&&wt(q));e=t!==p?(r=function(){var e,t,r;if(e=ct,t=[],(r=Ft())!==p)for(;r!==p;)t.push(r),r=Ft();else t=p;t!==p&&(st=e,t=K(t));return e=t}(),r!==p?(st=e,t=H(r)):(ct=e,p)):(ct=e,p);e===p&&(st=e=ct,t=I(),e=(t=t?void 0:p)!==p?(r=Dt())!==p?(st=e,t=U(r)):(ct=e,p):(ct=e,p));return e}())!==p?o=[o,c,s]:(ct=i,p):(ct=i,p):(ct=i,p))===p&&(i=null),i!==p?(o=_t())!==p?(125===f.charCodeAt(ct)?(c=F,ct++):(c=p,0===ht&&wt(S)),c!==p?(st=e,t=X(n,a,i)):(ct=e,p)):(ct=e,p):(ct=e,p)):(ct=e,p):(ct=e,p)):(ct=e,p):(ct=e,p)):(ct=e,p):(ct=e,p):(ct=e,p)):(ct=e,p);return e}())===p&&(e=function(){var e,t,r,n,u,a,i,o,c,s;e=ct,123===f.charCodeAt(ct)?(t=k,ct++):(t=p,0===ht&&wt(P));e=t!==p?(r=_t(),r!==p?(n=Mt())!==p?_t()!==p?(44===f.charCodeAt(ct)?(u=G,ct++):(u=p,0===ht&&wt(Q)),u!==p?_t()!==p?(f.substr(ct,4)===se?(a=se,ct+=4):(a=p,0===ht&&wt(le)),a===p&&(f.substr(ct,4)===fe?(a=fe,ct+=4):(a=p,0===ht&&wt(pe))),a!==p?_t()!==p?(i=ct,44===f.charCodeAt(ct)?(o=G,ct++):(o=p,0===ht&&wt(Q)),(i=o!==p?(c=_t())!==p?(s=function(){var e,t,r;e=ct,f.substr(ct,2)===$?(t=$,ct+=2):(t=p,0===ht&&wt(q));e=t!==p?(r=function(){var e,t,r,n;t=e=ct,r=[],(n=St())===p&&(n=Yt());if(n!==p)for(;n!==p;)r.push(n),(n=St())===p&&(n=Yt());else r=p;t=r!==p?f.substring(t,ct):r;t!==p&&(st=e,t=oe(t));return e=t}(),r!==p?(st=e,t=H(r)):(ct=e,p)):(ct=e,p);e===p&&(st=e=ct,t=ce(),e=(t=t?void 0:p)!==p?(r=Dt())!==p?(st=e,t=U(r)):(ct=e,p):(ct=e,p));return e}())!==p?o=[o,c,s]:(ct=i,p):(ct=i,p):(ct=i,p))===p&&(i=null),i!==p?(o=_t())!==p?(125===f.charCodeAt(ct)?(c=F,ct++):(c=p,0===ht&&wt(S)),c!==p?(st=e,t=X(n,a,i)):(ct=e,p)):(ct=e,p):(ct=e,p)):(ct=e,p):(ct=e,p)):(ct=e,p):(ct=e,p)):(ct=e,p):(ct=e,p):(ct=e,p)):(ct=e,p);return e}());return e}())===p&&(e=function(){var e,t,r,n,u,a,i,o,c,s,l;e=ct,123===f.charCodeAt(ct)?(t=k,ct++):(t=p,0===ht&&wt(P));if(t!==p)if(_t()!==p)if((r=Mt())!==p)if(_t()!==p)if(44===f.charCodeAt(ct)?(n=G,ct++):(n=p,0===ht&&wt(Q)),n!==p)if(_t()!==p)if(f.substr(ct,6)===he?(u=he,ct+=6):(u=p,0===ht&&wt(ge)),u===p&&(f.substr(ct,13)===de?(u=de,ct+=13):(u=p,0===ht&&wt(me))),u!==p)if(_t()!==p)if(44===f.charCodeAt(ct)?(a=G,ct++):(a=p,0===ht&&wt(Q)),a!==p)if(_t()!==p)if(i=ct,f.substr(ct,7)===ve?(o=ve,ct+=7):(o=p,0===ht&&wt(ye)),(i=o!==p?(c=_t())!==p?(s=Bt())!==p?o=[o,c,s]:(ct=i,p):(ct=i,p):(ct=i,p))===p&&(i=null),i!==p)if((o=_t())!==p){if(c=[],(s=jt())!==p)for(;s!==p;)c.push(s),s=jt();else c=p;e=c!==p?(s=_t())!==p?(125===f.charCodeAt(ct)?(l=F,ct++):(l=p,0===ht&&wt(S)),l!==p?(st=e,t=Ae(r,u,i,c)):(ct=e,p)):(ct=e,p):(ct=e,p)}else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;return e}())===p&&(e=function(){var e,t,r,n,u,a,i,o,c;e=ct,123===f.charCodeAt(ct)?(t=k,ct++):(t=p,0===ht&&wt(P));if(t!==p)if(_t()!==p)if((r=Mt())!==p)if(_t()!==p)if(44===f.charCodeAt(ct)?(n=G,ct++):(n=p,0===ht&&wt(Q)),n!==p)if(_t()!==p)if(f.substr(ct,6)===be?(u=be,ct+=6):(u=p,0===ht&&wt(Ee)),u!==p)if(_t()!==p)if(44===f.charCodeAt(ct)?(a=G,ct++):(a=p,0===ht&&wt(Q)),a!==p)if(_t()!==p){if(i=[],(o=Ot())!==p)for(;o!==p;)i.push(o),o=Ot();else i=p;e=i!==p?(o=_t())!==p?(125===f.charCodeAt(ct)?(c=F,ct++):(c=p,0===ht&&wt(S)),c!==p?(st=e,t=we(r,i)):(ct=e,p)):(ct=e,p):(ct=e,p)}else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;return e}())===p&&(e=function(){var e,t,r,n,u,a;ht++,t=e=ct,60===f.charCodeAt(ct)?(r=l,ct++):(r=p,0===ht&&wt(h));t=r!==p?(n=Kt(),n!==p?(u=_t())!==p?(f.substr(ct,2)===g?(a=g,ct+=2):(a=p,0===ht&&wt(d)),a!==p?r=[r,n,u,a]:(ct=t,p)):(ct=t,p):(ct=t,p)):(ct=t,p);t!==p&&(st=e,t=m(t));(e=t)===p&&(e=ct,t=function(){var e,t,r,n,u;e=ct,60===f.charCodeAt(ct)?(t=l,ct++):(t=p,0===ht&&wt(h));e=t!==p?(st=ct,r=y(),(r=r?void 0:p)!==p?(n=Kt())!==p?(62===f.charCodeAt(ct)?(u=A,ct++):(u=p,0===ht&&wt(b)),u!==p?(st=ct,(E()?void 0:p)!==p?(st=e,t=w(n)):(ct=e,p)):(ct=e,p)):(ct=e,p):(ct=e,p)):(ct=e,p);return e}(),e=t!==p?(r=Ct())!==p?(n=function(){var e,t,r,n,u;e=ct,f.substr(ct,2)===x?(t=x,ct+=2):(t=p,0===ht&&wt(C));e=t!==p?(st=ct,r=T(),(r=r?void 0:p)!==p?(n=Kt())!==p?(62===f.charCodeAt(ct)?(u=A,ct++):(u=p,0===ht&&wt(b)),u!==p?(st=ct,(E()?void 0:p)!==p?(st=e,t=w(n)):(ct=e,p)):(ct=e,p)):(ct=e,p):(ct=e,p)):(ct=e,p);return e}())!==p?(st=e,t=v(t,r,n)):(ct=e,p):(ct=e,p):(ct=e,p));ht--,e===p&&(t=p,0===ht&&wt(s));return e}())===p&&(e=function(){var e,t;e=ct,35===f.charCodeAt(ct)?(t=i,ct++):(t=p,0===ht&&wt(o));t!==p&&(st=e,t=c());return e=t}()),e}function Dt(){var e,t,r;if(e=ct,t=[],(r=Zt())===p&&(r=zt())===p&&(r=Lt()),r!==p)for(;r!==p;)t.push(r),(r=Zt())===p&&(r=zt())===p&&(r=Lt());else t=p;return t!==p&&(st=e,t=u(t)),e=t}function kt(){var e,t,r,n,u;if(ht++,t=[],n=r=e=ct,ht++,(u=Rt())===p&&(j.test(f.charAt(ct))?(u=f.charAt(ct),ct++):(u=p,0===ht&&wt(R))),ht--,(r=(n=u===p?void 0:(ct=n,p))!==p?(f.length>ct?(u=f.charAt(ct),ct++):(u=p,0===ht&&wt(N)),u!==p?n=[n,u]:(ct=r,p)):(ct=r,p))!==p)for(;r!==p;)t.push(r),n=r=ct,ht++,(u=Rt())===p&&(j.test(f.charAt(ct))?(u=f.charAt(ct),ct++):(u=p,0===ht&&wt(R))),ht--,r=(n=u===p?void 0:(ct=n,p))!==p?(f.length>ct?(u=f.charAt(ct),ct++):(u=p,0===ht&&wt(N)),u!==p?n=[n,u]:(ct=r,p)):(ct=r,p);else t=p;return e=t!==p?f.substring(e,ct):t,ht--,e===p&&(t=p,0===ht&&wt(O)),e}function Pt(){var e,t,r;return ht++,e=ct,47===f.charCodeAt(ct)?(t=B,ct++):(t=p,0===ht&&wt(Z)),e=t!==p&&(r=kt())!==p?(st=e,t=z(r)):(ct=e,p),ht--,e===p&&(t=p,0===ht&&wt(_)),e}function Ft(){var e,t,r,n;if(ht++,e=ct,_t()!==p)if((t=kt())!==p){for(r=[],n=Pt();n!==p;)r.push(n),n=Pt();e=r!==p?(st=e,M(t,r)):(ct=e,p)}else ct=e,e=p;else ct=e,e=p;return ht--,e===p&&(0===ht&&wt(L)),e}function St(){var e,t,r,n;if(e=ct,39===f.charCodeAt(ct)?(t=J,ct++):(t=p,0===ht&&wt(ee)),t!==p){if(r=[],(n=Zt())===p&&(te.test(f.charAt(ct))?(n=f.charAt(ct),ct++):(n=p,0===ht&&wt(re))),n!==p)for(;n!==p;)r.push(n),(n=Zt())===p&&(te.test(f.charAt(ct))?(n=f.charAt(ct),ct++):(n=p,0===ht&&wt(re)));else r=p;e=r!==p?(39===f.charCodeAt(ct)?(n=J,ct++):(n=p,0===ht&&wt(ee)),n!==p?t=[t,r,n]:(ct=e,p)):(ct=e,p)}else ct=e,e=p;if(e===p)if(e=[],(t=Zt())===p&&(ne.test(f.charAt(ct))?(t=f.charAt(ct),ct++):(t=p,0===ht&&wt(ue))),t!==p)for(;t!==p;)e.push(t),(t=Zt())===p&&(ne.test(f.charAt(ct))?(t=f.charAt(ct),ct++):(t=p,0===ht&&wt(ue)));else e=p;return e}function Yt(){var e,t;if(e=[],ae.test(f.charAt(ct))?(t=f.charAt(ct),ct++):(t=p,0===ht&&wt(ie)),t!==p)for(;t!==p;)e.push(t),ae.test(f.charAt(ct))?(t=f.charAt(ct),ct++):(t=p,0===ht&&wt(ie));else e=p;return e}function Ot(){var e,t,r,n,u;return e=ct,e=_t()!==p&&(t=qt())!==p&&_t()!==p?(123===f.charCodeAt(ct)?(r=k,ct++):(r=p,0===ht&&wt(P)),r!==p?(st=ct,(Te()?void 0:p)!==p&&(n=Ct())!==p?(125===f.charCodeAt(ct)?(u=F,ct++):(u=p,0===ht&&wt(S)),u!==p?(st=e,De(t,n)):(ct=e,p)):(ct=e,p)):(ct=e,p)):(ct=e,p)}function jt(){var e,t,r,n,u,a,i,o,c;return e=ct,e=_t()!==p?(i=a=ct,61===f.charCodeAt(ct)?(o=xe,ct++):(o=p,0===ht&&wt(Ce)),(a=(i=o!==p&&(c=Bt())!==p?o=[o,c]:(ct=i,p))!==p?f.substring(a,ct):i)===p&&(a=qt()),(t=a)!==p&&_t()!==p?(123===f.charCodeAt(ct)?(r=k,ct++):(r=p,0===ht&&wt(P)),r!==p?(st=ct,(ke()?void 0:p)!==p&&(n=Ct())!==p?(125===f.charCodeAt(ct)?(u=F,ct++):(u=p,0===ht&&wt(S)),u!==p?(st=e,Pe(t,n)):(ct=e,p)):(ct=e,p)):(ct=e,p)):(ct=e,p)):(ct=e,p)}function Rt(){var e;return ht++,Se.test(f.charAt(ct))?(e=f.charAt(ct),ct++):(e=p,0===ht&&wt(Ye)),ht--,e===p&&0===ht&&wt(Fe),e}function Nt(){var e;return ht++,je.test(f.charAt(ct))?(e=f.charAt(ct),ct++):(e=p,0===ht&&wt(Re)),ht--,e===p&&0===ht&&wt(Oe),e}function _t(){var e,t,r;for(ht++,e=ct,t=[],r=Rt();r!==p;)t.push(r),r=Rt();return e=t!==p?f.substring(e,ct):t,ht--,e===p&&(t=p,0===ht&&wt(Ne)),e}function Bt(){var e,t,r;return ht++,e=ct,45===f.charCodeAt(ct)?(t=Be,ct++):(t=p,0===ht&&wt(Ze)),t===p&&(t=null),e=t!==p&&(r=$t())!==p?(st=e,t=ze(t,r)):(ct=e,p),ht--,e===p&&(t=p,0===ht&&wt(_e)),e}function Zt(){var e,t;return ht++,e=ct,f.substr(ct,2)===Me?(t=Me,ct+=2):(t=p,0===ht&&wt(Ke)),t!==p&&(st=e,t=$e()),ht--,(e=t)===p&&(t=p,0===ht&&wt(Le)),e}function zt(){var e,t,r,n,u,a;if(e=ct,39===f.charCodeAt(ct)?(t=J,ct++):(t=p,0===ht&&wt(ee)),t!==p)if((r=function(){var e,t,r,n;t=e=ct,f.length>ct?(r=f.charAt(ct),ct++):(r=p,0===ht&&wt(N));t=r!==p?(st=ct,n=Ge(r),(n=n?void 0:p)!==p?r=[r,n]:(ct=t,p)):(ct=t,p);e=t!==p?f.substring(e,ct):t;return e}())!==p){for(n=ct,u=[],f.substr(ct,2)===Me?(a=Me,ct+=2):(a=p,0===ht&&wt(Ke)),a===p&&(te.test(f.charAt(ct))?(a=f.charAt(ct),ct++):(a=p,0===ht&&wt(re)));a!==p;)u.push(a),f.substr(ct,2)===Me?(a=Me,ct+=2):(a=p,0===ht&&wt(Ke)),a===p&&(te.test(f.charAt(ct))?(a=f.charAt(ct),ct++):(a=p,0===ht&&wt(re)));e=(n=u!==p?f.substring(n,ct):u)!==p?(39===f.charCodeAt(ct)?(u=J,ct++):(u=p,0===ht&&wt(ee)),u===p&&(u=null),u!==p?(st=e,t=qe(r,n)):(ct=e,p)):(ct=e,p)}else ct=e,e=p;else ct=e,e=p;return e}function Lt(){var e,t,r,n;return t=e=ct,f.length>ct?(r=f.charAt(ct),ct++):(r=p,0===ht&&wt(N)),(t=r!==p?(st=ct,(n=(n=He(r))?void 0:p)!==p?r=[r,n]:(ct=t,p)):(ct=t,p))===p&&(10===f.charCodeAt(ct)?(t=Ie,ct++):(t=p,0===ht&&wt(Ue))),e=t!==p?f.substring(e,ct):t}function Mt(){var e,t;return ht++,e=ct,(t=$t())===p&&(t=qt()),e=t!==p?f.substring(e,ct):t,ht--,e===p&&(t=p,0===ht&&wt(Qe)),e}function Kt(){var e,t;return ht++,e=ct,(t=$t())===p&&(t=function(){var e,t,r,n,u;ht++,e=ct,t=[],45===f.charCodeAt(ct)?(r=Be,ct++):(r=p,0===ht&&wt(Ze));r===p&&(n=r=ct,ht++,(u=Rt())===p&&(u=Nt()),ht--,n=u===p?void 0:(ct=n,p),r=n!==p?(f.length>ct?(u=f.charAt(ct),ct++):(u=p,0===ht&&wt(N)),u!==p?n=[n,u]:(ct=r,p)):(ct=r,p));if(r!==p)for(;r!==p;)t.push(r),45===f.charCodeAt(ct)?(r=Be,ct++):(r=p,0===ht&&wt(Ze)),r===p&&(n=r=ct,ht++,(u=Rt())===p&&(u=Nt()),ht--,n=u===p?void 0:(ct=n,p),r=n!==p?(f.length>ct?(u=f.charAt(ct),ct++):(u=p,0===ht&&wt(N)),u!==p?n=[n,u]:(ct=r,p)):(ct=r,p));else t=p;e=t!==p?f.substring(e,ct):t;ht--,e===p&&(t=p,0===ht&&wt(ot));return e}()),e=t!==p?f.substring(e,ct):t,ht--,e===p&&(t=p,0===ht&&wt(Ve)),e}function $t(){var e,t,r,n,u;if(ht++,e=ct,48===f.charCodeAt(ct)?(t=Xe,ct++):(t=p,0===ht&&wt(Je)),t!==p&&(st=e,t=et()),(e=t)===p){if(t=e=ct,tt.test(f.charAt(ct))?(r=f.charAt(ct),ct++):(r=p,0===ht&&wt(rt)),r!==p){for(n=[],nt.test(f.charAt(ct))?(u=f.charAt(ct),ct++):(u=p,0===ht&&wt(ut));u!==p;)n.push(u),nt.test(f.charAt(ct))?(u=f.charAt(ct),ct++):(u=p,0===ht&&wt(ut));t=n!==p?r=[r,n]:(ct=t,p)}else ct=t,t=p;t!==p&&(st=e,t=at(t)),e=t}return ht--,e===p&&(t=p,0===ht&&wt(We)),e}function qt(){var e,t,r,n,u;if(ht++,t=[],n=r=e=ct,ht++,(u=Rt())===p&&(u=Nt()),ht--,(r=(n=u===p?void 0:(ct=n,p))!==p?(f.length>ct?(u=f.charAt(ct),ct++):(u=p,0===ht&&wt(N)),u!==p?n=[n,u]:(ct=r,p)):(ct=r,p))!==p)for(;r!==p;)t.push(r),n=r=ct,ht++,(u=Rt())===p&&(u=Nt()),ht--,r=(n=u===p?void 0:(ct=n,p))!==p?(f.length>ct?(u=f.charAt(ct),ct++):(u=p,0===ht&&wt(N)),u!==p?n=[n,u]:(ct=r,p)):(ct=r,p);else t=p;return e=t!==p?f.substring(e,ct):t,ht--,e===p&&(t=p,0===ht&&wt(it)),e}var Ht,It,Ut,Gt=["root"];function Qt(){return 1<Gt.length}function Vt(){return"plural"===Gt[Gt.length-1]}function Wt(){return e&&e.captureLocation?{location:dt()}:{}}if((t=n())!==p&&ct===f.length)return t;throw t!==p&&ct<f.length&&wt({type:"end"}),Ht=pt,It=ft<f.length?f.charAt(ft):null,Ut=ft<f.length?Et(ft,ft+1):Et(ft,ft),new er(er.buildMessage(Ht,It),Ht,It,Ut)},h=function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),u=0;for(t=0;t<r;t++)for(var a=arguments[t],i=0,o=a.length;i<o;i++,u++)n[u]=a[i];return n},g=/(^|[^\\])#/g;var c=function(){return(c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var u in t=arguments[r])Object.prototype.hasOwnProperty.call(t,u)&&(e[u]=t[u]);return e}).apply(this,arguments)},s=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;var l=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,d=/^(@+)?(\+|#+)?$/g;function m(e){var n={};return e.replace(d,function(e,t,r){return"string"!=typeof r?(n.minimumSignificantDigits=t.length,n.maximumSignificantDigits=t.length):"+"===r?n.minimumSignificantDigits=t.length:"#"===t[0]?n.maximumSignificantDigits=t.length:(n.minimumSignificantDigits=t.length,n.maximumSignificantDigits=t.length+("string"==typeof r?r.length:0)),""}),n}function v(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":return{currencySign:"accounting"};case"sign-always":return{signDisplay:"always"};case"sign-accounting-always":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":return{signDisplay:"never"}}}function y(e){var t=v(e);return t||{}}Xt.SyntaxError=er,Xt.convertNumberSkeletonToNumberFormatOptions=function(e){for(var i={},t=0,r=e;t<r.length;t++){var n=r[t];switch(n.stem){case"percent":i.style="percent";continue;case"currency":i.style="currency",i.currency=n.options[0];continue;case"group-off":i.useGrouping=!1;continue;case"precision-integer":case".":i.maximumFractionDigits=0;continue;case"measure-unit":i.style="unit",i.unit=n.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":i.notation="compact",i.compactDisplay="short";continue;case"compact-long":i.notation="compact",i.compactDisplay="long";continue;case"scientific":i=c(c(c({},i),{notation:"scientific"}),n.options.reduce(function(e,t){return c(c({},e),y(t))},{}));continue;case"engineering":i=c(c(c({},i),{notation:"engineering"}),n.options.reduce(function(e,t){return c(c({},e),y(t))},{}));continue;case"notation-simple":i.notation="standard";continue;case"unit-width-narrow":i.currencyDisplay="narrowSymbol",i.unitDisplay="narrow";continue;case"unit-width-short":i.currencyDisplay="code",i.unitDisplay="short";continue;case"unit-width-full-name":i.currencyDisplay="name",i.unitDisplay="long";continue;case"unit-width-iso-code":i.currencyDisplay="symbol";continue}if(l.test(n.stem)){if(1<n.options.length)throw new RangeError("Fraction-precision stems only accept a single optional option");n.stem.replace(l,function(e,t,r,n,u,a){return"*"===r?i.minimumFractionDigits=t.length:n&&"#"===n[0]?i.maximumFractionDigits=n.length:u&&a?(i.minimumFractionDigits=u.length,i.maximumFractionDigits=u.length+a.length):(i.minimumFractionDigits=t.length,i.maximumFractionDigits=t.length),""}),n.options.length&&(i=c(c({},i),m(n.options[0])))}else if(d.test(n.stem))i=c(c({},i),m(n.stem));else{var u=v(n.stem);u&&(i=c(c({},i),u))}}return i},Xt.createLiteralElement=function(e){return{type:Xt.TYPE.literal,value:e}},Xt.createNumberElement=function(e,t){return{type:Xt.TYPE.number,value:e,style:t}},Xt.isArgumentElement=function(e){return e.type===Xt.TYPE.argument},Xt.isDateElement=function(e){return e.type===Xt.TYPE.date},Xt.isDateTimeSkeleton=function(e){return!(!e||"object"!=typeof e||1!==e.type)},Xt.isLiteralElement=f,Xt.isNumberElement=function(e){return e.type===Xt.TYPE.number},Xt.isNumberSkeleton=function(e){return!(!e||"object"!=typeof e||0!==e.type)},Xt.isPluralElement=u,Xt.isPoundElement=function(e){return e.type===Xt.TYPE.pound},Xt.isSelectElement=n,Xt.isTagElement=function(e){return e.type===Xt.TYPE.tag},Xt.isTimeElement=function(e){return e.type===Xt.TYPE.time},Xt.parse=function(e,t){var r=p(e,t);return t&&!1===t.normalizeHashtagInPlural||function l(e){e.forEach(function(s){(u(s)||n(s))&&Object.keys(s.options).forEach(function(e){for(var t,r=s.options[e],n=-1,u=void 0,a=0;a<r.value.length;a++){var i=r.value[a];if(f(i)&&g.test(i.value)){n=a,u=i;break}}if(u){var o=u.value.replace(g,"$1{"+s.value+", number}"),c=p(o);(t=r.value).splice.apply(t,h([n,1],c))}l(r.value)})})}(r),r},Xt.parseDateTimeSkeleton=function(e){var r={};return e.replace(s,function(e){var t=e.length;switch(e[0]){case"G":r.era=4===t?"long":5===t?"narrow":"short";break;case"y":r.year=2===t?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":r.month=["numeric","2-digit","short","long","narrow"][t-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":r.day=["numeric","2-digit"][t-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":r.weekday=4!==t&&5===t?"narrow":"short";break;case"e":if(t<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");r.weekday=["short","long","narrow","short"][t-4];break;case"c":if(t<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");r.weekday=["short","long","narrow","short"][t-4];break;case"a":r.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":r.hourCycle="h12",r.hour=["numeric","2-digit"][t-1];break;case"H":r.hourCycle="h23",r.hour=["numeric","2-digit"][t-1];break;case"K":r.hourCycle="h11",r.hour=["numeric","2-digit"][t-1];break;case"k":r.hourCycle="h24",r.hour=["numeric","2-digit"][t-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":r.minute=["numeric","2-digit"][t-1];break;case"s":r.second=["numeric","2-digit"][t-1];break;case"S":case"A":throw new RangeError("`S/A` (second) pattenrs are not supported, use `s` instead");case"z":r.timeZoneName=t<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) pattenrs are not supported, use `z` instead")}return""}),r},Xt.pegParse=p,Object.defineProperty(Xt,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).IntlMessageFormatParser={})}(this,function(Xt){"use strict";var e,t;function f(e){return e.type===Xt.TYPE.literal}function n(e){return e.type===Xt.TYPE.select}function u(e){return e.type===Xt.TYPE.plural}(e=Xt.TYPE||(Xt.TYPE={}))[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag",(t=Xt.SKELETON_TYPE||(Xt.SKELETON_TYPE={}))[t.number=0]="number",t[t.dateTime=1]="dateTime";var a,i,r=(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Jt=function(){return(Jt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var u in t=arguments[r])Object.prototype.hasOwnProperty.call(t,u)&&(e[u]=t[u]);return e}).apply(this,arguments)},er=(i=Error,r(o,i),o.buildMessage=function(e,t){function r(e){return e.charCodeAt(0).toString(16).toUpperCase()}function n(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(e){return"\\x0"+r(e)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(e){return"\\x"+r(e)})}function u(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(e){return"\\x0"+r(e)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(e){return"\\x"+r(e)})}function a(e){switch(e.type){case"literal":return'"'+n(e.text)+'"';case"class":var t=e.parts.map(function(e){return Array.isArray(e)?u(e[0])+"-"+u(e[1]):u(e)});return"["+(e.inverted?"^":"")+t+"]";case"any":return"any character";case"end":return"end of input";case"other":return e.description}}return"Expected "+function(e){var t,r,n=e.map(a);if(n.sort(),0<n.length){for(r=t=1;t<n.length;t++)n[t-1]!==n[t]&&(n[r]=n[t],r++);n.length=r}switch(n.length){case 1:return n[0];case 2:return n[0]+" or "+n[1];default:return n.slice(0,-1).join(", ")+", or "+n[n.length-1]}}(e)+" but "+((i=t)?'"'+n(i)+'"':"end of input")+" found.";var i},o);function o(e,t,r,n){var u=i.call(this)||this;return u.message=e,u.expected=t,u.found=r,u.location=n,u.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(u,o),u}var p=function(f,e){var t,p={},r={start:xt},n=xt,u=function(e){return e.join("")},a=function(e){return Jt({type:Xt.TYPE.literal,value:e},Wt())},i="#",o=vt("#",!1),c=function(){return Jt({type:Xt.TYPE.pound},Wt())},s=At("tagElement"),l="<",h=vt("<",!1),g="/>",d=vt("/>",!1),m=function(e){return Jt({type:Xt.TYPE.literal,value:e.join("")},Wt())},v=function(e,t,r){return e!==r&&mt('Mismatch tag "'+e+'" !== "'+r+'"',dt()),Jt({type:Xt.TYPE.tag,value:e,children:t},Wt())},y=function(){return Gt.push("openingTag"),!0},A=">",b=vt(">",!1),E=function(e){return Gt.pop(),!0},w=function(e){return e},x="</",C=vt("</",!1),T=function(){return Gt.push("closingTag"),!0},D=At("argumentElement"),k="{",P=vt("{",!1),F="}",S=vt("}",!1),Y=function(e){return Jt({type:Xt.TYPE.argument,value:e},Wt())},O=At("numberSkeletonId"),j=/^['\/{}]/,R=yt(["'","/","{","}"],!1,!1),N={type:"any"},_=At("numberSkeletonTokenOption"),B="/",Z=vt("/",!1),z=function(e){return e},L=At("numberSkeletonToken"),M=function(e,t){return{stem:e,options:t}},K=function(e){return Jt({type:0,tokens:e},Wt())},$="::",q=vt("::",!1),H=function(e){return e},I=function(){return Gt.push("numberArgStyle"),!0},U=function(e){return Gt.pop(),e.replace(/\s*$/,"")},G=",",Q=vt(",",!1),V="number",W=vt("number",!1),X=function(e,t,r){return Jt({type:"number"===t?Xt.TYPE.number:"date"===t?Xt.TYPE.date:Xt.TYPE.time,style:r&&r[2],value:e},Wt())},J="'",ee=vt("'",!1),te=/^[^']/,re=yt(["'"],!0,!1),ne=/^[^a-zA-Z'{}]/,ue=yt([["a","z"],["A","Z"],"'","{","}"],!0,!1),ae=/^[a-zA-Z]/,ie=yt([["a","z"],["A","Z"]],!1,!1),oe=function(e){return Jt({type:1,pattern:e},Wt())},ce=function(){return Gt.push("dateOrTimeArgStyle"),!0},se="date",le=vt("date",!1),fe="time",pe=vt("time",!1),he="plural",ge=vt("plural",!1),de="selectordinal",me=vt("selectordinal",!1),ve="offset:",ye=vt("offset:",!1),Ae=function(e,t,r,n){return Jt({type:Xt.TYPE.plural,pluralType:"plural"===t?"cardinal":"ordinal",value:e,offset:r?r[2]:0,options:n.reduce(function(e,t){var r=t.id,n=t.value,u=t.location;return r in e&&mt('Duplicate option "'+r+'" in plural element: "'+gt()+'"',dt()),e[r]={value:n,location:u},e},{})},Wt())},be="select",Ee=vt("select",!1),we=function(e,t){return Jt({type:Xt.TYPE.select,value:e,options:t.reduce(function(e,t){var r=t.id,n=t.value,u=t.location;return r in e&&mt('Duplicate option "'+r+'" in select element: "'+gt()+'"',dt()),e[r]={value:n,location:u},e},{})},Wt())},xe="=",Ce=vt("=",!1),Te=function(e){return Gt.push("select"),!0},De=function(e,t){return Gt.pop(),Jt({id:e,value:t},Wt())},ke=function(e){return Gt.push("plural"),!0},Pe=function(e,t){return Gt.pop(),Jt({id:e,value:t},Wt())},Fe=At("whitespace"),Se=/^[\t-\r \x85\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Ye=yt([["\t","\r"]," ","…"," "," ",[" "," "],"\u2028","\u2029"," "," "," "],!1,!1),Oe=At("syntax pattern"),je=/^[!-\/:-@[-\^`{-~\xA1-\xA7\xA9\xAB\xAC\xAE\xB0\xB1\xB6\xBB\xBF\xD7\xF7\u2010-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u245F\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3020\u3030\uFD3E\uFD3F\uFE45\uFE46]/,Re=yt([["!","/"],[":","@"],["[","^"],"`",["{","~"],["¡","§"],"©","«","¬","®","°","±","¶","»","¿","×","÷",["‐","‧"],["‰","‾"],["⁁","⁓"],["⁕","⁞"],["←","⑟"],["─","❵"],["➔","⯿"],["⸀","⹿"],["、","〃"],["〈","〠"],"〰","﴾","﴿","﹅","﹆"],!1,!1),Ne=At("optional whitespace"),_e=At("number"),Be="-",Ze=vt("-",!1),ze=function(e,t){return t?e?-t:t:0},Le=At("double apostrophes"),Me="''",Ke=vt("''",!1),$e=function(){return"'"},qe=function(e,t){return e+t.replace("''","'")},He=function(e){return!("<"===e||"{"===e||Vt()&&"#"===e||Qt()&&"}"===e||Qt()&&">"===e)},Ie="\n",Ue=vt("\n",!1),Ge=function(e){return"<"===e||">"===e||"{"===e||"}"===e||Vt()&&"#"===e},Qe=At("argNameOrNumber"),Ve=At("validTag"),We=At("argNumber"),Xe="0",Je=vt("0",!1),et=function(){return 0},tt=/^[1-9]/,rt=yt([["1","9"]],!1,!1),nt=/^[0-9]/,ut=yt([["0","9"]],!1,!1),at=function(e){return parseInt(e.join(""),10)},it=At("argName"),ot=At("tagName"),ct=0,st=0,lt=[{line:1,column:1}],ft=0,pt=[],ht=0;if(void 0!==(e=void 0!==e?e:{}).startRule){if(!(e.startRule in r))throw new Error("Can't start parsing from rule \""+e.startRule+'".');n=r[e.startRule]}function gt(){return f.substring(st,ct)}function dt(){return Et(st,ct)}function mt(e,t){throw t=void 0!==t?t:Et(st,ct),new er(e,[],"",t)}function vt(e,t){return{type:"literal",text:e,ignoreCase:t}}function yt(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function At(e){return{type:"other",description:e}}function bt(e){var t,r=lt[e];if(r)return r;for(t=e-1;!lt[t];)t--;for(r={line:(r=lt[t]).line,column:r.column};t<e;)10===f.charCodeAt(t)?(r.line++,r.column=1):r.column++,t++;return lt[e]=r}function Et(e,t){var r=bt(e),n=bt(t);return{start:{offset:e,line:r.line,column:r.column},end:{offset:t,line:n.line,column:n.column}}}function wt(e){ct<ft||(ft<ct&&(ft=ct,pt=[]),pt.push(e))}function xt(){return Ct()}function Ct(){for(var e=[],t=Tt();t!==p;)e.push(t),t=Tt();return e}function Tt(){var e=function(){var e,t;e=ct,(t=Dt())!==p&&(st=e,t=a(t));return e=t}();return e===p&&(e=function(){var e,t,r,n,u;ht++,e=ct,123===f.charCodeAt(ct)?(t=k,ct++):(t=p,0===ht&&wt(P));e=t!==p?(r=_t(),r!==p?(n=Mt())!==p?_t()!==p?(125===f.charCodeAt(ct)?(u=F,ct++):(u=p,0===ht&&wt(S)),u!==p?(st=e,t=Y(n)):(ct=e,p)):(ct=e,p):(ct=e,p):(ct=e,p)):(ct=e,p);ht--,e===p&&(t=p,0===ht&&wt(D));return e}())===p&&(e=function(){var e;(e=function(){var e,t,r,n,u,a,i,o,c,s;e=ct,123===f.charCodeAt(ct)?(t=k,ct++):(t=p,0===ht&&wt(P));e=t!==p?(r=_t(),r!==p?(n=Mt())!==p?_t()!==p?(44===f.charCodeAt(ct)?(u=G,ct++):(u=p,0===ht&&wt(Q)),u!==p?_t()!==p?(f.substr(ct,6)===V?(a=V,ct+=6):(a=p,0===ht&&wt(W)),a!==p?_t()!==p?(i=ct,44===f.charCodeAt(ct)?(o=G,ct++):(o=p,0===ht&&wt(Q)),(i=o!==p?(c=_t())!==p?(s=function(){var e,t,r;e=ct,f.substr(ct,2)===$?(t=$,ct+=2):(t=p,0===ht&&wt(q));e=t!==p?(r=function(){var e,t,r;if(e=ct,t=[],(r=Ft())!==p)for(;r!==p;)t.push(r),r=Ft();else t=p;t!==p&&(st=e,t=K(t));return e=t}(),r!==p?(st=e,t=H(r)):(ct=e,p)):(ct=e,p);e===p&&(st=e=ct,t=I(),e=(t=t?void 0:p)!==p?(r=Dt())!==p?(st=e,t=U(r)):(ct=e,p):(ct=e,p));return e}())!==p?o=[o,c,s]:(ct=i,p):(ct=i,p):(ct=i,p))===p&&(i=null),i!==p?(o=_t())!==p?(125===f.charCodeAt(ct)?(c=F,ct++):(c=p,0===ht&&wt(S)),c!==p?(st=e,t=X(n,a,i)):(ct=e,p)):(ct=e,p):(ct=e,p)):(ct=e,p):(ct=e,p)):(ct=e,p):(ct=e,p)):(ct=e,p):(ct=e,p):(ct=e,p)):(ct=e,p);return e}())===p&&(e=function(){var e,t,r,n,u,a,i,o,c,s;e=ct,123===f.charCodeAt(ct)?(t=k,ct++):(t=p,0===ht&&wt(P));e=t!==p?(r=_t(),r!==p?(n=Mt())!==p?_t()!==p?(44===f.charCodeAt(ct)?(u=G,ct++):(u=p,0===ht&&wt(Q)),u!==p?_t()!==p?(f.substr(ct,4)===se?(a=se,ct+=4):(a=p,0===ht&&wt(le)),a===p&&(f.substr(ct,4)===fe?(a=fe,ct+=4):(a=p,0===ht&&wt(pe))),a!==p?_t()!==p?(i=ct,44===f.charCodeAt(ct)?(o=G,ct++):(o=p,0===ht&&wt(Q)),(i=o!==p?(c=_t())!==p?(s=function(){var e,t,r;e=ct,f.substr(ct,2)===$?(t=$,ct+=2):(t=p,0===ht&&wt(q));e=t!==p?(r=function(){var e,t,r,n;t=e=ct,r=[],(n=St())===p&&(n=Yt());if(n!==p)for(;n!==p;)r.push(n),(n=St())===p&&(n=Yt());else r=p;t=r!==p?f.substring(t,ct):r;t!==p&&(st=e,t=oe(t));return e=t}(),r!==p?(st=e,t=H(r)):(ct=e,p)):(ct=e,p);e===p&&(st=e=ct,t=ce(),e=(t=t?void 0:p)!==p?(r=Dt())!==p?(st=e,t=U(r)):(ct=e,p):(ct=e,p));return e}())!==p?o=[o,c,s]:(ct=i,p):(ct=i,p):(ct=i,p))===p&&(i=null),i!==p?(o=_t())!==p?(125===f.charCodeAt(ct)?(c=F,ct++):(c=p,0===ht&&wt(S)),c!==p?(st=e,t=X(n,a,i)):(ct=e,p)):(ct=e,p):(ct=e,p)):(ct=e,p):(ct=e,p)):(ct=e,p):(ct=e,p)):(ct=e,p):(ct=e,p):(ct=e,p)):(ct=e,p);return e}());return e}())===p&&(e=function(){var e,t,r,n,u,a,i,o,c,s,l;e=ct,123===f.charCodeAt(ct)?(t=k,ct++):(t=p,0===ht&&wt(P));if(t!==p)if(_t()!==p)if((r=Mt())!==p)if(_t()!==p)if(44===f.charCodeAt(ct)?(n=G,ct++):(n=p,0===ht&&wt(Q)),n!==p)if(_t()!==p)if(f.substr(ct,6)===he?(u=he,ct+=6):(u=p,0===ht&&wt(ge)),u===p&&(f.substr(ct,13)===de?(u=de,ct+=13):(u=p,0===ht&&wt(me))),u!==p)if(_t()!==p)if(44===f.charCodeAt(ct)?(a=G,ct++):(a=p,0===ht&&wt(Q)),a!==p)if(_t()!==p)if(i=ct,f.substr(ct,7)===ve?(o=ve,ct+=7):(o=p,0===ht&&wt(ye)),(i=o!==p?(c=_t())!==p?(s=Bt())!==p?o=[o,c,s]:(ct=i,p):(ct=i,p):(ct=i,p))===p&&(i=null),i!==p)if((o=_t())!==p){if(c=[],(s=jt())!==p)for(;s!==p;)c.push(s),s=jt();else c=p;e=c!==p?(s=_t())!==p?(125===f.charCodeAt(ct)?(l=F,ct++):(l=p,0===ht&&wt(S)),l!==p?(st=e,t=Ae(r,u,i,c)):(ct=e,p)):(ct=e,p):(ct=e,p)}else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;return e}())===p&&(e=function(){var e,t,r,n,u,a,i,o,c;e=ct,123===f.charCodeAt(ct)?(t=k,ct++):(t=p,0===ht&&wt(P));if(t!==p)if(_t()!==p)if((r=Mt())!==p)if(_t()!==p)if(44===f.charCodeAt(ct)?(n=G,ct++):(n=p,0===ht&&wt(Q)),n!==p)if(_t()!==p)if(f.substr(ct,6)===be?(u=be,ct+=6):(u=p,0===ht&&wt(Ee)),u!==p)if(_t()!==p)if(44===f.charCodeAt(ct)?(a=G,ct++):(a=p,0===ht&&wt(Q)),a!==p)if(_t()!==p){if(i=[],(o=Ot())!==p)for(;o!==p;)i.push(o),o=Ot();else i=p;e=i!==p?(o=_t())!==p?(125===f.charCodeAt(ct)?(c=F,ct++):(c=p,0===ht&&wt(S)),c!==p?(st=e,t=we(r,i)):(ct=e,p)):(ct=e,p):(ct=e,p)}else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;else ct=e,e=p;return e}())===p&&(e=function(){var e,t,r,n,u,a;ht++,t=e=ct,60===f.charCodeAt(ct)?(r=l,ct++):(r=p,0===ht&&wt(h));t=r!==p?(n=Kt(),n!==p?(u=_t())!==p?(f.substr(ct,2)===g?(a=g,ct+=2):(a=p,0===ht&&wt(d)),a!==p?r=[r,n,u,a]:(ct=t,p)):(ct=t,p):(ct=t,p)):(ct=t,p);t!==p&&(st=e,t=m(t));(e=t)===p&&(e=ct,t=function(){var e,t,r,n,u;e=ct,60===f.charCodeAt(ct)?(t=l,ct++):(t=p,0===ht&&wt(h));e=t!==p?(st=ct,r=y(),(r=r?void 0:p)!==p?(n=Kt())!==p?(62===f.charCodeAt(ct)?(u=A,ct++):(u=p,0===ht&&wt(b)),u!==p?(st=ct,(E()?void 0:p)!==p?(st=e,t=w(n)):(ct=e,p)):(ct=e,p)):(ct=e,p):(ct=e,p)):(ct=e,p);return e}(),e=t!==p?(r=Ct())!==p?(n=function(){var e,t,r,n,u;e=ct,f.substr(ct,2)===x?(t=x,ct+=2):(t=p,0===ht&&wt(C));e=t!==p?(st=ct,r=T(),(r=r?void 0:p)!==p?(n=Kt())!==p?(62===f.charCodeAt(ct)?(u=A,ct++):(u=p,0===ht&&wt(b)),u!==p?(st=ct,(E()?void 0:p)!==p?(st=e,t=w(n)):(ct=e,p)):(ct=e,p)):(ct=e,p):(ct=e,p)):(ct=e,p);return e}())!==p?(st=e,t=v(t,r,n)):(ct=e,p):(ct=e,p):(ct=e,p));ht--,e===p&&(t=p,0===ht&&wt(s));return e}())===p&&(e=function(){var e,t;e=ct,35===f.charCodeAt(ct)?(t=i,ct++):(t=p,0===ht&&wt(o));t!==p&&(st=e,t=c());return e=t}()),e}function Dt(){var e=ct,t=[],r=Zt();if(r===p&&(r=zt())===p&&(r=Lt()),r!==p)for(;r!==p;)t.push(r),(r=Zt())===p&&(r=zt())===p&&(r=Lt());else t=p;return t!==p&&(st=e,t=u(t)),e=t}function kt(){var e,t,r,n,u;if(ht++,t=[],n=r=e=ct,ht++,(u=Rt())===p&&(j.test(f.charAt(ct))?(u=f.charAt(ct),ct++):(u=p,0===ht&&wt(R))),ht--,(r=(n=u===p?void 0:(ct=n,p))!==p?(f.length>ct?(u=f.charAt(ct),ct++):(u=p,0===ht&&wt(N)),u!==p?n=[n,u]:(ct=r,p)):(ct=r,p))!==p)for(;r!==p;)t.push(r),n=r=ct,ht++,(u=Rt())===p&&(j.test(f.charAt(ct))?(u=f.charAt(ct),ct++):(u=p,0===ht&&wt(R))),ht--,r=(n=u===p?void 0:(ct=n,p))!==p?(f.length>ct?(u=f.charAt(ct),ct++):(u=p,0===ht&&wt(N)),u!==p?n=[n,u]:(ct=r,p)):(ct=r,p);else t=p;return e=t!==p?f.substring(e,ct):t,ht--,e===p&&(t=p,0===ht&&wt(O)),e}function Pt(){var e,t,r;return ht++,e=ct,47===f.charCodeAt(ct)?(t=B,ct++):(t=p,0===ht&&wt(Z)),e=t!==p&&(r=kt())!==p?(st=e,t=z(r)):(ct=e,p),ht--,e===p&&(t=p,0===ht&&wt(_)),e}function Ft(){var e,t,r,n;if(ht++,e=ct,_t()!==p)if((t=kt())!==p){for(r=[],n=Pt();n!==p;)r.push(n),n=Pt();e=r!==p?(st=e,M(t,r)):(ct=e,p)}else ct=e,e=p;else ct=e,e=p;return ht--,e===p&&(0===ht&&wt(L)),e}function St(){var e,t,r,n=ct;if(39===f.charCodeAt(ct)?(e=J,ct++):(e=p,0===ht&&wt(ee)),e!==p){if(t=[],(r=Zt())===p&&(te.test(f.charAt(ct))?(r=f.charAt(ct),ct++):(r=p,0===ht&&wt(re))),r!==p)for(;r!==p;)t.push(r),(r=Zt())===p&&(te.test(f.charAt(ct))?(r=f.charAt(ct),ct++):(r=p,0===ht&&wt(re)));else t=p;n=t!==p?(39===f.charCodeAt(ct)?(r=J,ct++):(r=p,0===ht&&wt(ee)),r!==p?e=[e,t,r]:(ct=n,p)):(ct=n,p)}else ct=n,n=p;if(n===p)if(n=[],(e=Zt())===p&&(ne.test(f.charAt(ct))?(e=f.charAt(ct),ct++):(e=p,0===ht&&wt(ue))),e!==p)for(;e!==p;)n.push(e),(e=Zt())===p&&(ne.test(f.charAt(ct))?(e=f.charAt(ct),ct++):(e=p,0===ht&&wt(ue)));else n=p;return n}function Yt(){var e,t=[];if(ae.test(f.charAt(ct))?(e=f.charAt(ct),ct++):(e=p,0===ht&&wt(ie)),e!==p)for(;e!==p;)t.push(e),ae.test(f.charAt(ct))?(e=f.charAt(ct),ct++):(e=p,0===ht&&wt(ie));else t=p;return t}function Ot(){var e,t,r,n,u=ct,a=_t();return u=a!==p&&(e=qt())!==p&&_t()!==p?(123===f.charCodeAt(ct)?(t=k,ct++):(t=p,0===ht&&wt(P)),t!==p?(st=ct,(Te()?void 0:p)!==p&&(r=Ct())!==p?(125===f.charCodeAt(ct)?(n=F,ct++):(n=p,0===ht&&wt(S)),n!==p?(st=u,a=De(e,r)):(ct=u,p)):(ct=u,p)):(ct=u,p)):(ct=u,p)}function jt(){var e,t,r,n,u,a,i,o,c=ct,s=_t();return c=s!==p?(o=i=ct,61===f.charCodeAt(ct)?(u=xe,ct++):(u=p,0===ht&&wt(Ce)),(i=(o=u!==p&&(a=Bt())!==p?u=[u,a]:(ct=o,p))!==p?f.substring(i,ct):o)===p&&(i=qt()),(e=i)!==p&&_t()!==p?(123===f.charCodeAt(ct)?(t=k,ct++):(t=p,0===ht&&wt(P)),t!==p?(st=ct,(ke()?void 0:p)!==p&&(r=Ct())!==p?(125===f.charCodeAt(ct)?(n=F,ct++):(n=p,0===ht&&wt(S)),n!==p?(st=c,s=Pe(e,r)):(ct=c,p)):(ct=c,p)):(ct=c,p)):(ct=c,p)):(ct=c,p)}function Rt(){var e;return ht++,Se.test(f.charAt(ct))?(e=f.charAt(ct),ct++):(e=p,0===ht&&wt(Ye)),ht--,e===p&&0===ht&&wt(Fe),e}function Nt(){var e;return ht++,je.test(f.charAt(ct))?(e=f.charAt(ct),ct++):(e=p,0===ht&&wt(Re)),ht--,e===p&&0===ht&&wt(Oe),e}function _t(){var e,t,r;for(ht++,e=ct,t=[],r=Rt();r!==p;)t.push(r),r=Rt();return e=t!==p?f.substring(e,ct):t,ht--,e===p&&(t=p,0===ht&&wt(Ne)),e}function Bt(){var e,t,r;return ht++,e=ct,45===f.charCodeAt(ct)?(t=Be,ct++):(t=p,0===ht&&wt(Ze)),t===p&&(t=null),e=t!==p&&(r=$t())!==p?(st=e,t=ze(t,r)):(ct=e,p),ht--,e===p&&(t=p,0===ht&&wt(_e)),e}function Zt(){var e,t;return ht++,e=ct,f.substr(ct,2)===Me?(t=Me,ct+=2):(t=p,0===ht&&wt(Ke)),t!==p&&(st=e,t=$e()),ht--,(e=t)===p&&(t=p,0===ht&&wt(Le)),e}function zt(){var e,t,r,n,u,a=ct;if(39===f.charCodeAt(ct)?(e=J,ct++):(e=p,0===ht&&wt(ee)),e!==p)if((t=function(){var e,t,r,n;t=e=ct,f.length>ct?(r=f.charAt(ct),ct++):(r=p,0===ht&&wt(N));t=r!==p?(st=ct,n=Ge(r),(n=n?void 0:p)!==p?r=[r,n]:(ct=t,p)):(ct=t,p);e=t!==p?f.substring(e,ct):t;return e}())!==p){for(r=ct,n=[],f.substr(ct,2)===Me?(u=Me,ct+=2):(u=p,0===ht&&wt(Ke)),u===p&&(te.test(f.charAt(ct))?(u=f.charAt(ct),ct++):(u=p,0===ht&&wt(re)));u!==p;)n.push(u),f.substr(ct,2)===Me?(u=Me,ct+=2):(u=p,0===ht&&wt(Ke)),u===p&&(te.test(f.charAt(ct))?(u=f.charAt(ct),ct++):(u=p,0===ht&&wt(re)));a=(r=n!==p?f.substring(r,ct):n)!==p?(39===f.charCodeAt(ct)?(n=J,ct++):(n=p,0===ht&&wt(ee)),n===p&&(n=null),n!==p?(st=a,e=qe(t,r)):(ct=a,p)):(ct=a,p)}else ct=a,a=p;else ct=a,a=p;return a}function Lt(){var e,t,r=ct,n=ct;return f.length>ct?(e=f.charAt(ct),ct++):(e=p,0===ht&&wt(N)),(n=e!==p?(st=ct,(t=(t=He(e))?void 0:p)!==p?e=[e,t]:(ct=n,p)):(ct=n,p))===p&&(10===f.charCodeAt(ct)?(n=Ie,ct++):(n=p,0===ht&&wt(Ue))),r=n!==p?f.substring(r,ct):n}function Mt(){var e,t;return ht++,e=ct,(t=$t())===p&&(t=qt()),e=t!==p?f.substring(e,ct):t,ht--,e===p&&(t=p,0===ht&&wt(Qe)),e}function Kt(){var e,t;return ht++,e=ct,(t=$t())===p&&(t=function(){var e,t,r,n,u;ht++,e=ct,t=[],45===f.charCodeAt(ct)?(r=Be,ct++):(r=p,0===ht&&wt(Ze));r===p&&(n=r=ct,ht++,(u=Rt())===p&&(u=Nt()),ht--,n=u===p?void 0:(ct=n,p),r=n!==p?(f.length>ct?(u=f.charAt(ct),ct++):(u=p,0===ht&&wt(N)),u!==p?n=[n,u]:(ct=r,p)):(ct=r,p));if(r!==p)for(;r!==p;)t.push(r),45===f.charCodeAt(ct)?(r=Be,ct++):(r=p,0===ht&&wt(Ze)),r===p&&(n=r=ct,ht++,(u=Rt())===p&&(u=Nt()),ht--,n=u===p?void 0:(ct=n,p),r=n!==p?(f.length>ct?(u=f.charAt(ct),ct++):(u=p,0===ht&&wt(N)),u!==p?n=[n,u]:(ct=r,p)):(ct=r,p));else t=p;e=t!==p?f.substring(e,ct):t;ht--,e===p&&(t=p,0===ht&&wt(ot));return e}()),e=t!==p?f.substring(e,ct):t,ht--,e===p&&(t=p,0===ht&&wt(Ve)),e}function $t(){var e,t,r,n,u;if(ht++,e=ct,48===f.charCodeAt(ct)?(t=Xe,ct++):(t=p,0===ht&&wt(Je)),t!==p&&(st=e,t=et()),(e=t)===p){if(t=e=ct,tt.test(f.charAt(ct))?(r=f.charAt(ct),ct++):(r=p,0===ht&&wt(rt)),r!==p){for(n=[],nt.test(f.charAt(ct))?(u=f.charAt(ct),ct++):(u=p,0===ht&&wt(ut));u!==p;)n.push(u),nt.test(f.charAt(ct))?(u=f.charAt(ct),ct++):(u=p,0===ht&&wt(ut));t=n!==p?r=[r,n]:(ct=t,p)}else ct=t,t=p;t!==p&&(st=e,t=at(t)),e=t}return ht--,e===p&&(t=p,0===ht&&wt(We)),e}function qt(){var e,t,r,n,u;if(ht++,t=[],n=r=e=ct,ht++,(u=Rt())===p&&(u=Nt()),ht--,(r=(n=u===p?void 0:(ct=n,p))!==p?(f.length>ct?(u=f.charAt(ct),ct++):(u=p,0===ht&&wt(N)),u!==p?n=[n,u]:(ct=r,p)):(ct=r,p))!==p)for(;r!==p;)t.push(r),n=r=ct,ht++,(u=Rt())===p&&(u=Nt()),ht--,r=(n=u===p?void 0:(ct=n,p))!==p?(f.length>ct?(u=f.charAt(ct),ct++):(u=p,0===ht&&wt(N)),u!==p?n=[n,u]:(ct=r,p)):(ct=r,p);else t=p;return e=t!==p?f.substring(e,ct):t,ht--,e===p&&(t=p,0===ht&&wt(it)),e}var Ht,It,Ut,Gt=["root"];function Qt(){return 1<Gt.length}function Vt(){return"plural"===Gt[Gt.length-1]}function Wt(){return e&&e.captureLocation?{location:dt()}:{}}if((t=n())!==p&&ct===f.length)return t;throw t!==p&&ct<f.length&&wt({type:"end"}),Ht=pt,It=ft<f.length?f.charAt(ft):null,Ut=ft<f.length?Et(ft,ft+1):Et(ft,ft),new er(er.buildMessage(Ht,It),Ht,It,Ut)},h=function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),u=0,t=0;t<r;t++)for(var a=arguments[t],i=0,o=a.length;i<o;i++,u++)n[u]=a[i];return n},g=/(^|[^\\])#/g;var c=function(){return(c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var u in t=arguments[r])Object.prototype.hasOwnProperty.call(t,u)&&(e[u]=t[u]);return e}).apply(this,arguments)},s=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;var l=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,d=/^(@+)?(\+|#+)?$/g;function m(e){var n={};return e.replace(d,function(e,t,r){return"string"!=typeof r?(n.minimumSignificantDigits=t.length,n.maximumSignificantDigits=t.length):"+"===r?n.minimumSignificantDigits=t.length:"#"===t[0]?n.maximumSignificantDigits=t.length:(n.minimumSignificantDigits=t.length,n.maximumSignificantDigits=t.length+("string"==typeof r?r.length:0)),""}),n}function v(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":return{currencySign:"accounting"};case"sign-always":return{signDisplay:"always"};case"sign-accounting-always":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":return{signDisplay:"never"}}}function y(e){var t=v(e);return t||{}}Xt.SyntaxError=er,Xt.convertNumberSkeletonToNumberFormatOptions=function(e){for(var i={},t=0,r=e;t<r.length;t++){var n,u=r[t];switch(u.stem){case"percent":i.style="percent";continue;case"currency":i.style="currency",i.currency=u.options[0];continue;case"group-off":i.useGrouping=!1;continue;case"precision-integer":case".":i.maximumFractionDigits=0;continue;case"measure-unit":i.style="unit",i.unit=u.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":i.notation="compact",i.compactDisplay="short";continue;case"compact-long":i.notation="compact",i.compactDisplay="long";continue;case"scientific":i=c(c(c({},i),{notation:"scientific"}),u.options.reduce(function(e,t){return c(c({},e),y(t))},{}));continue;case"engineering":i=c(c(c({},i),{notation:"engineering"}),u.options.reduce(function(e,t){return c(c({},e),y(t))},{}));continue;case"notation-simple":i.notation="standard";continue;case"unit-width-narrow":i.currencyDisplay="narrowSymbol",i.unitDisplay="narrow";continue;case"unit-width-short":i.currencyDisplay="code",i.unitDisplay="short";continue;case"unit-width-full-name":i.currencyDisplay="name",i.unitDisplay="long";continue;case"unit-width-iso-code":i.currencyDisplay="symbol";continue}if(l.test(u.stem)){if(1<u.options.length)throw new RangeError("Fraction-precision stems only accept a single optional option");u.stem.replace(l,function(e,t,r,n,u,a){return"*"===r?i.minimumFractionDigits=t.length:n&&"#"===n[0]?i.maximumFractionDigits=n.length:u&&a?(i.minimumFractionDigits=u.length,i.maximumFractionDigits=u.length+a.length):(i.minimumFractionDigits=t.length,i.maximumFractionDigits=t.length),""}),u.options.length&&(i=c(c({},i),m(u.options[0])))}else{d.test(u.stem)?i=c(c({},i),m(u.stem)):(n=v(u.stem))&&(i=c(c({},i),n))}}return i},Xt.createLiteralElement=function(e){return{type:Xt.TYPE.literal,value:e}},Xt.createNumberElement=function(e,t){return{type:Xt.TYPE.number,value:e,style:t}},Xt.isArgumentElement=function(e){return e.type===Xt.TYPE.argument},Xt.isDateElement=function(e){return e.type===Xt.TYPE.date},Xt.isDateTimeSkeleton=function(e){return!(!e||"object"!=typeof e||1!==e.type)},Xt.isLiteralElement=f,Xt.isNumberElement=function(e){return e.type===Xt.TYPE.number},Xt.isNumberSkeleton=function(e){return!(!e||"object"!=typeof e||0!==e.type)},Xt.isPluralElement=u,Xt.isPoundElement=function(e){return e.type===Xt.TYPE.pound},Xt.isSelectElement=n,Xt.isTagElement=function(e){return e.type===Xt.TYPE.tag},Xt.isTimeElement=function(e){return e.type===Xt.TYPE.time},Xt.parse=function(e,t){var r=p(e,t);return t&&!1===t.normalizeHashtagInPlural||function l(e){e.forEach(function(s){(u(s)||n(s))&&Object.keys(s.options).forEach(function(e){for(var t,r,n,u=s.options[e],a=-1,i=void 0,o=0;o<u.value.length;o++){var c=u.value[o];if(f(c)&&g.test(c.value)){a=o,i=c;break}}i&&(r=i.value.replace(g,"$1{"+s.value+", number}"),n=p(r),(t=u.value).splice.apply(t,h([a,1],n))),l(u.value)})})}(r),r},Xt.parseDateTimeSkeleton=function(e){var r={};return e.replace(s,function(e){var t=e.length;switch(e[0]){case"G":r.era=4===t?"long":5===t?"narrow":"short";break;case"y":r.year=2===t?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":r.month=["numeric","2-digit","short","long","narrow"][t-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":r.day=["numeric","2-digit"][t-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":r.weekday=4!==t&&5===t?"narrow":"short";break;case"e":if(t<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");r.weekday=["short","long","narrow","short"][t-4];break;case"c":if(t<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");r.weekday=["short","long","narrow","short"][t-4];break;case"a":r.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":r.hourCycle="h12",r.hour=["numeric","2-digit"][t-1];break;case"H":r.hourCycle="h23",r.hour=["numeric","2-digit"][t-1];break;case"K":r.hourCycle="h11",r.hour=["numeric","2-digit"][t-1];break;case"k":r.hourCycle="h24",r.hour=["numeric","2-digit"][t-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":r.minute=["numeric","2-digit"][t-1];break;case"s":r.second=["numeric","2-digit"][t-1];break;case"S":case"A":throw new RangeError("`S/A` (second) pattenrs are not supported, use `s` instead");case"z":r.timeZoneName=t<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) pattenrs are not supported, use `z` instead")}return""}),r},Xt.pegParse=p,Object.defineProperty(Xt,"__esModule",{value:!0})});
//# sourceMappingURL=intl-messageformat-parser.min.js.map

@@ -8,5 +8,5 @@ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.

"packageName": "@microsoft/api-extractor",
"packageVersion": "7.7.13"
"packageVersion": "7.8.0"
}
]
}
{
"name": "intl-messageformat-parser",
"version": "5.0.3",
"version": "5.0.4",
"description": "Parses ICU Message strings into an AST via JavaScript.",

@@ -49,6 +49,6 @@ "main": "dist/index.js",

"dependencies": {
"@formatjs/intl-unified-numberformat": "^3.3.6"
"@formatjs/intl-unified-numberformat": "^3.3.7"
},
"homepage": "https://github.com/formatjs/formatjs",
"gitHead": "9c79d2dd356d0d136e7c3d435933acf522fb19a4",
"gitHead": "5b218606c3ec03e332f472706fffd04153c20dae",
"devDependencies": {

@@ -55,0 +55,0 @@ "@types/jest": "^25.2.1",

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