UNPKG

@smals-belgium-shared/vidis-medication-scheme-list

Version:

Medication scheme list web component

12 lines 1.45 MB
var Hte=Object.defineProperty;var Og=e=>{throw TypeError(e)};var Ute=(e,t,n)=>t in e?Hte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var o=(e,t,n)=>Ute(e,typeof t!="symbol"?t+"":t,n),Ng=(e,t,n)=>t.has(e)||Og("Cannot "+n);var yn=(e,t,n)=>(Ng(e,t,"read from private field"),n?n.call(e):t.get(e)),Pg=(e,t,n)=>t.has(e)?Og("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Mg=(e,t,n,a)=>(Ng(e,t,"write to private field"),a?a.call(e,n):t.set(e,n),n);var Wte=Object.create,Ed=Object.defineProperty,Gte=Object.defineProperties,qte=Object.getOwnPropertyDescriptor,Yte=Object.getOwnPropertyDescriptors,$te=Object.getOwnPropertyNames,Bc=Object.getOwnPropertySymbols,Kte=Object.getPrototypeOf,rm=Object.prototype.hasOwnProperty,Y0=Object.prototype.propertyIsEnumerable,Lg=(e,t,n)=>t in e?Ed(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ve=(e,t)=>{for(var n in t||(t={}))rm.call(t,n)&&Lg(e,n,t[n]);if(Bc)for(var n of Bc(t))Y0.call(t,n)&&Lg(e,n,t[n]);return e},ht=(e,t)=>Gte(e,Yte(t)),Zte=(e,t)=>{var n={};for(var a in e)rm.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&Bc)for(var a of Bc(e))t.indexOf(a)<0&&Y0.call(e,a)&&(n[a]=e[a]);return n},Re=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),pe=(e,t)=>{for(var n in t)Ed(e,n,{get:t[n],enumerable:!0})},Jte=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of $te(t))!rm.call(e,i)&&i!==n&&Ed(e,i,{get:()=>t[i],enumerable:!(a=qte(t,i))||a.enumerable});return e},$0=(e,t,n)=>(n=e!=null?Wte(Kte(e)):{},Jte(t||!e||!e.__esModule?Ed(n,"default",{value:e,enumerable:!0}):n,e)),kn=(e,t,n)=>new Promise((a,i)=>{var r=c=>{try{l(n.next(c))}catch(d){i(d)}},s=c=>{try{l(n.throw(c))}catch(d){i(d)}},l=c=>c.done?a(c.value):Promise.resolve(c.value).then(r,s);l((n=n.apply(e,t)).next())}),Qte=Re((e,t)=>{(function(n,a){typeof e=="object"&&typeof t<"u"?t.exports=a():typeof define=="function"&&define.amd?define(a):(n=typeof globalThis<"u"?globalThis:n||self,n.MessageFormat=a())})(e,function(){var n=function(){return n=Object.assign||function(p){for(var f,v=1,y=arguments.length;v<y;v++){f=arguments[v];for(var _ in f)Object.prototype.hasOwnProperty.call(f,_)&&(p[_]=f[_])}return p},n.apply(this,arguments)};function a(p){var f=typeof Symbol=="function"&&Symbol.iterator,v=f&&p[f],y=0;if(v)return v.call(p);if(p&&typeof p.length=="number")return{next:function(){return p&&y>=p.length&&(p=void 0),{value:p&&p[y++],done:!p}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")}function i(p,f){var v=typeof Symbol=="function"&&p[Symbol.iterator];if(!v)return p;var y=v.call(p),_,E=[],D;try{for(;(f===void 0||f-- >0)&&!(_=y.next()).done;)E.push(_.value)}catch(O){D={error:O}}finally{try{_&&!_.done&&(v=y.return)&&v.call(y)}finally{if(D)throw D.error}}return E}function r(p,f,v){if(arguments.length===2)for(var y=0,_=f.length,E;y<_;y++)(E||!(y in f))&&(E||(E=Array.prototype.slice.call(f,0,y)),E[y]=f[y]);return p.concat(E||Array.prototype.slice.call(f))}typeof SuppressedError=="function"&&SuppressedError;class s extends Error{constructor(f,v,y){super(f),this.token=v,this.type=y||"error"}}let l=p=>p<4?"short":p===4?"long":"narrow",c=p=>p%2===0?"2-digit":"numeric";function d(p,f){switch(p.char){case"y":return{year:c(p.width)};case"r":return{calendar:"gregory",year:"numeric"};case"u":case"U":case"Y":default:return f(`${p.desc} is not supported; falling back to year:numeric`,s.WARNING),{year:"numeric"}}}function h(p,f){switch(p.width){case 1:return"numeric";case 2:return"2-digit";case 3:return"short";case 4:return"long";case 5:return"narrow";default:f(`${p.desc} is not supported with width ${p.width}`);return}}function m(p,f){let{char:v,desc:y,width:_}=p;if(v==="d")return c(_);f(`${y} is not supported`)}function b(p,f){let{char:v,desc:y,width:_}=p;if((v==="c"||v==="e")&&_<3){let E=`Numeric value is not supported for ${y}; falling back to weekday:short`;f(E,s.WARNING)}return l(_)}function g(p){let f=c(p.width),v;switch(p.char){case"h":v="h12";break;case"H":v="h23";break;case"k":v="h24";break;case"K":v="h11";break}return v?{hour:f,hourCycle:v}:{hour:f}}function k(p,f){let{char:v,desc:y,width:_}=p;switch(v){case"v":case"z":return _===4?"long":"short";case"V":if(_===4)return"long";f(`${y} is not supported with width ${_}`);return;case"X":f(`${y} is not supported`);return}return"short"}function w(p,f){switch(p.field){case"era":return{era:l(p.width)};case"year":return d(p,f);case"month":return{month:h(p,f)};case"day":return{day:m(p,f)};case"weekday":return{weekday:b(p,f)};case"period":return;case"hour":return g(p);case"min":return{minute:c(p.width)};case"sec":return{second:c(p.width)};case"tz":return{timeZoneName:k(p,f)};case"quarter":case"week":case"sec-frac":case"ms":f(`${p.desc} is not supported`)}}function S(p,f){let v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:E=>{throw E},y={timeZone:f},_=[];for(let E of p){let{error:D,field:O,str:L}=E;if(D){let ke=new s(D.message,E);ke.stack=D.stack,v(ke)}if(L){let ke=`Ignoring string part: ${L}`;v(new s(ke,E,s.WARNING))}O&&(_.indexOf(O)===-1?_.push(O):v(new s(`Duplicate ${O} token`,E)));let $=w(E,(ke,Le)=>v(new s(ke,E,Le)));$&&Object.assign(y,$)}return y}let A={G:{field:"era",desc:"Era"},y:{field:"year",desc:"Year"},Y:{field:"year",desc:'Year of "Week of Year"'},u:{field:"year",desc:"Extended year"},U:{field:"year",desc:"Cyclic year name"},r:{field:"year",desc:"Related Gregorian year"},Q:{field:"quarter",desc:"Quarter"},q:{field:"quarter",desc:"Stand-alone quarter"},M:{field:"month",desc:"Month in year"},L:{field:"month",desc:"Stand-alone month in year"},w:{field:"week",desc:"Week of year"},W:{field:"week",desc:"Week of month"},d:{field:"day",desc:"Day in month"},D:{field:"day",desc:"Day of year"},F:{field:"day",desc:"Day of week in month"},g:{field:"day",desc:"Modified julian day"},E:{field:"weekday",desc:"Day of week"},e:{field:"weekday",desc:"Local day of week"},c:{field:"weekday",desc:"Stand-alone local day of week"},a:{field:"period",desc:"AM/PM marker"},b:{field:"period",desc:"AM/PM/noon/midnight marker"},B:{field:"period",desc:"Flexible day period"},h:{field:"hour",desc:"Hour in AM/PM (1~12)"},H:{field:"hour",desc:"Hour in day (0~23)"},k:{field:"hour",desc:"Hour in day (1~24)"},K:{field:"hour",desc:"Hour in AM/PM (0~11)"},j:{field:"hour",desc:"Hour in preferred cycle"},J:{field:"hour",desc:"Hour in preferred cycle without marker"},C:{field:"hour",desc:"Hour in preferred cycle with flexible marker"},m:{field:"min",desc:"Minute in hour"},s:{field:"sec",desc:"Second in minute"},S:{field:"sec-frac",desc:"Fractional second"},A:{field:"ms",desc:"Milliseconds in day"},z:{field:"tz",desc:"Time Zone: specific non-location"},Z:{field:"tz",desc:"Time Zone"},O:{field:"tz",desc:"Time Zone: localized"},v:{field:"tz",desc:"Time Zone: generic non-location"},V:{field:"tz",desc:"Time Zone: ID"},X:{field:"tz",desc:"Time Zone: ISO8601 with Z"},x:{field:"tz",desc:"Time Zone: ISO8601"}},W=p=>p>="A"&&p<="Z"||p>="a"&&p<="z";function U(p,f){let v=p[f],y=1;for(;p[++f]===v;)++y;let _=A[v];if(!_){let E=`The letter ${v} is not a valid field identifier`;return{char:v,error:new Error(E),width:y}}return{char:v,field:_.field,desc:_.desc,width:y}}function tt(p,f){let v=p[++f],y=2;if(v==="'")return{char:"'",str:v,width:y};for(;;){let _=p[++f];if(++y,_===void 0){let E=`Unterminated quoted literal in pattern: ${v||p}`;return{char:"'",error:new Error(E),str:v,width:y}}else if(_==="'"){if(p[++f]!=="'")return{char:"'",str:v,width:y};++y}v+=_}}function Dt(p,f){let v=p[f];if(!v)return null;if(W(v))return U(p,f);if(v==="'")return tt(p,f);let y=v,_=1;for(;;){let E=p[++f];if(!E||W(E)||E==="'")return{char:v,str:y,width:_};y+=E,_+=1}}function ct(p){let f=[],v=0;for(;;){let y=Dt(p,v);if(!y)return f;f.push(y),v+=y.width}}function Aa(p,f,v,y){typeof f=="string"&&(f=ct(f)),typeof v=="function"&&(y=v,v=void 0);let _=S(f,v,y),E=new Intl.DateTimeFormat(p,_);return D=>E.format(D)}function wa(p,f,v,y){typeof f=="string"&&(f=ct(f)),typeof v=="function"&&(y=v,v=void 0);let _=S(f,v,y);return["(function() {",`var opt = ${JSON.stringify(_)};`,`var dtf = new Intl.DateTimeFormat(${JSON.stringify(p)}, opt);`,"return function(value) { return dtf.format(value); }"].join(` `)+` })()`}class Wt extends Error{constructor(f,v){super(v),this.code=f}}class ka extends Wt{constructor(f,v){super("BAD_OPTION",`Unknown ${f} option: ${v}`),this.stem=f,this.option=v}}class he extends Wt{constructor(f){super("BAD_STEM",`Unknown stem: ${f}`),this.stem=f}}class ie extends Wt{constructor(f,v){super("MASKED_VALUE",`Value for ${f} is set multiple times`),this.type=f,this.prev=v}}class He extends Wt{constructor(f){super("MISSING_OPTION",`Required option missing for ${f}`),this.stem=f}}class G extends Wt{constructor(f,v){super("BAD_PATTERN",v),this.char=f}}class Z extends Wt{constructor(f,v,y){let _=y>1?`${y} options`:"one option";super("TOO_MANY_OPTIONS",`Token ${f} only supports ${_} (got ${v.length})`),this.stem=f,this.options=v}}function oe(p,f){let{numberingSystem:v}=f;return Array.isArray(p)||(p=[p]),v?p.map(y=>{let _=y.indexOf("-u-")===-1?"u-nu":"nu";return`${y}-${_}-${v}`}).concat(p):p}function Ze(p,f){let v=+p+f/2;return v-v%+f}function It(p){let{scale:f,unit:v}=p,y=typeof f=="number"&&f>=0?f:1;return v&&v.style==="percent"&&(y*=.01),y}function Ra(p){let f=It(p),{precision:v}=p;return v&&v.style==="precision-increment"?y=>Ze(y,v.increment)*f:y=>y*f}function at(p){let f=It(p),{precision:v}=p;if(v&&v.style==="precision-increment"){let y=`+n + ${v.increment/2}`,_=`x - (x % +${v.increment})`;return f!==1&&(_=`(${_}) * ${f}`),`function(n) { var x = ${y}; return ${_}; }`}return f!==1?`function(n) { return n * ${f}; }`:null}function lt(p,f){let{decimal:v,group:y,integerWidth:_,notation:E,precision:D,roundingMode:O,sign:L,unit:$,unitPer:ke,unitWidth:Le}=p,Xe=(Nt,Kt)=>{},ce={};if($)switch($.style){case"base-unit":ce.style="decimal";break;case"currency":ce.style="currency",ce.currency=$.currency;break;case"measure-unit":ce.style="unit",ce.unit=$.unit.replace(/.*-/,""),ke&&(ce.unit+="-per-"+ke.replace(/.*-/,""));break;case"percent":ce.style="percent";break}switch(Le){case"unit-width-full-name":ce.currencyDisplay="name",ce.unitDisplay="long";break;case"unit-width-hidden":break;case"unit-width-iso-code":ce.currencyDisplay="code";break;case"unit-width-narrow":ce.currencyDisplay="narrowSymbol",ce.unitDisplay="narrow";break;case"unit-width-short":ce.currencyDisplay="symbol",ce.unitDisplay="short";break}switch(y){case"group-off":ce.useGrouping=!1;break;case"group-auto":ce.useGrouping=!0;break;case"group-min2":case"group-on-aligned":case"group-thousands":ce.useGrouping=!0;break}if(D)switch(D.style){case"precision-fraction":{let{minFraction:Nt,maxFraction:Kt,minSignificant:ua,maxSignificant:za,source:Ii}=D;typeof Nt=="number"&&(ce.minimumFractionDigits=Nt,typeof ua=="number"&&Xe()),typeof Kt=="number"&&(ce.maximumFractionDigits=Kt),typeof ua=="number"&&(ce.minimumSignificantDigits=ua),typeof za=="number"&&(ce.maximumSignificantDigits=za);break}case"precision-integer":ce.maximumFractionDigits=0;break;case"precision-unlimited":ce.maximumFractionDigits=20;break;case"precision-increment":break;case"precision-currency-standard":ce.trailingZeroDisplay=D.trailingZero;break;case"precision-currency-cash":Xe(D.style);break}if(E)switch(E.style){case"compact-short":ce.notation="compact",ce.compactDisplay="short";break;case"compact-long":ce.notation="compact",ce.compactDisplay="long";break;case"notation-simple":ce.notation="standard";break;case"scientific":case"engineering":{let{expDigits:Nt,expSign:Kt,source:ua,style:za}=E;ce.notation=za;break}}if(_){let{min:Nt,max:Kt,source:ua}=_;if(Nt>0&&(ce.minimumIntegerDigits=Nt),Number(Kt)>0){let za=ce.notation==="engineering"||ce.notation==="scientific";Kt===3&&za?ce.notation="engineering":Xe()}}switch(L){case"sign-auto":ce.signDisplay="auto";break;case"sign-always":ce.signDisplay="always";break;case"sign-except-zero":ce.signDisplay="exceptZero";break;case"sign-never":ce.signDisplay="never";break;case"sign-accounting":ce.currencySign="accounting";break;case"sign-accounting-always":ce.currencySign="accounting",ce.signDisplay="always";break;case"sign-accounting-except-zero":ce.currencySign="accounting",ce.signDisplay="exceptZero";break}return ce}function zt(p,f,v){let y=p[f];switch(y){case"%":return{char:"%",style:"percent",width:1};case"‰":return{char:"%",style:"permille",width:1};case"¤":{let _=1;for(;p[++f]==="¤";)++_;switch(_){case 1:return{char:y,currency:"default",width:_};case 2:return{char:y,currency:"iso-code",width:_};case 3:return{char:y,currency:"full-name",width:_};case 5:return{char:y,currency:"narrow",width:_};default:{let E=`Invalid number (${_}) of ¤ chars in pattern`;return v(new G("¤",E)),null}}}case"*":{let _=p[f+1];if(_)return{char:y,pad:_,width:2};break}case"+":case"-":return{char:y,width:1};case"'":{let _=p[++f],E=2;if(_==="'")return{char:y,str:_,width:E};for(;;){let D=p[++f];if(++E,D===void 0){let O=`Unterminated quoted literal in pattern: ${_}`;return v(new G("'",O)),{char:y,str:_,width:E}}else if(D==="'"){if(p[++f]!=="'")return{char:y,str:_,width:E};++E}_+=D}}}return null}let Di=p=>p>="0"&&p<="9";function Ot(p,f){let v=p[f];if(Di(v)){let y=v;for(;;){let _=p[++f];if(Di(_))y+=_;else return{char:"0",digits:y,width:y.length}}}switch(v){case"#":{let y=1;for(;p[++f]==="#";)++y;return{char:v,width:y}}case"@":{let y=1;for(;p[++f]==="@";)++y;let _=y;for(f-=1;p[++f]==="#";)++_;return{char:v,min:y,width:_}}case"E":{let y=p[f+1]==="+";y&&++f;let _=0;for(;p[++f]==="0";)++_;let E=(y?2:1)+_;if(_)return{char:v,expDigits:_,plus:y,width:E};break}case".":case",":return{char:v,width:1}}return null}function Oa(p,f,v){let y;(function($){$[$.Prefix=0]="Prefix",$[$.Number=1]="Number",$[$.Suffix=2]="Suffix"})(y||(y={}));let _=[],E=[],D=[],O=y.Prefix,L="";for(;f<p.length;){let $=p[f];if($===";"){f+=1;break}switch(O){case y.Prefix:{let ke=zt(p,f,v);if(ke)L&&(_.push({char:"'",str:L,width:L.length}),L=""),_.push(ke),f+=ke.width;else{let Le=Ot(p,f);Le?(L&&(_.push({char:"'",str:L,width:L.length}),L=""),O=y.Number,E.push(Le),f+=Le.width):(L+=$,f+=1)}break}case y.Number:{let ke=Ot(p,f);ke?(E.push(ke),f+=ke.width):O=y.Suffix;break}case y.Suffix:{let ke=zt(p,f,v);ke?(L&&(D.push({char:"'",str:L,width:L.length}),L=""),D.push(ke),f+=ke.width):(L+=$,f+=1);break}}}return L&&D.push({char:"'",str:L,width:L.length}),{pattern:{prefix:_,number:E,suffix:D},pos:f}}function da(p,f){let{pattern:v,pos:y}=Oa(p,0,f);if(y<p.length){let{pattern:_}=Oa(p,y,f);return{tokens:v,negative:_}}return{tokens:v}}function ji(p,f){let v={},y=!1,_=!1,E=0,D="",O=-1,L="",$=0;for(let Le=0;Le<p.length;++Le){let Xe=p[Le];switch(Xe.char){case"#":{if(O===-1){if(D){let ce="Pattern has # after integer digits";f(new G("#",ce))}E+=Xe.width}else $+=Xe.width;break}case"0":{if(O===-1)D+=Xe.digits;else{if($){let ce="Pattern has digits after # in fraction";f(new G("0",ce))}L+=Xe.digits}break}case"@":{v.precision&&f(new ie("precision",v.precision)),v.precision={style:"precision-fraction",minSignificant:Xe.min,maxSignificant:Xe.width};break}case",":y=!0;break;case".":if(O===1){let ce="Pattern has more than one decimal separator";f(new G(".",ce))}O=Le;break;case"E":{if(_&&f(new ie("exponent",v.notation)),y){let ce="Exponential patterns may not contain grouping separators";f(new G("E",ce))}v.notation={style:"scientific"},Xe.expDigits>1&&(v.notation.expDigits=Xe.expDigits),Xe.plus&&(v.notation.expSign="sign-always"),_=!0}}}y?v.group="group-auto":E+D.length>3&&(v.group="group-off");let ke=+`${D||"0"}.${L}`;if(ke&&(v.precision={style:"precision-increment",increment:ke}),!_)D.length>1&&(v.integerWidth={min:D.length}),!v.precision&&(L.length||$)&&(v.precision={style:"precision-fraction",minFraction:L.length,maxFraction:L.length+$});else if((!v.precision||ke)&&(v.integerWidth=E?{min:1,max:E+D.length}:{min:Math.max(1,D.length)}),v.precision)ke||(v.integerWidth={min:1,max:1});else{let Le=D.length+L.length;O===-1?Le>0&&(v.precision={style:"precision-fraction",maxSignificant:Le}):(v.precision={style:"precision-fraction",maxSignificant:Math.max(1,Le)+$},Le>1&&(v.precision.minSignificant=Le))}return v}function Fn(p,f,v,y,_){let E=!1,D="";for(let O of p)switch(O.char){case"%":f.unit={style:O.style},_?E=!0:D="";break;case"¤":if(!v){let L="The ¤ pattern requires a currency";y(new G("¤",L));break}switch(f.unit={style:"currency",currency:v},O.currency){case"iso-code":f.unitWidth="unit-width-iso-code";break;case"full-name":f.unitWidth="unit-width-full-name";break;case"narrow":f.unitWidth="unit-width-narrow";break}_?E=!0:D="";break;case"*":break;case"+":E||(D+="+");break;case"'":E||(D+=O.str);break}return D}function Ml(p,f){let v=!1,y="";for(let _ of p)switch(_.char){case"%":case"¤":f?v=!0:y="";break;case"-":v||(y+="-");break;case"'":v||(y+=_.str);break}return y}function Ll(p,f){let v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:L=>{throw L},{tokens:y,negative:_}=da(p,v),E=ji(y.number,v),D=Fn(y.prefix,E,f,v,!0),O=Fn(y.suffix,E,f,v,!1);if(_){let L=Ml(_.prefix,!0),$=Ml(_.suffix,!1);E.affix={pos:[D,O],neg:[L,$]},E.sign="sign-never"}else(D||O)&&(E.affix={pos:[D,O]});return E}function ete(p){return["arab","arabext","bali","beng","deva","fullwide","gujr","guru","hanidec","khmr","knda","laoo","latn","limb","mlym","mong","mymr","orya","tamldec","telu","thai","tibt"].indexOf(p)!==-1}function _g(p){let f=["acceleration","angle","area","concentr","consumption","digital","duration","electric","energy","force","frequency","graphics","length","light","mass","power","pressure","speed","temperature","torque","volume"],[v]=p.split("-",1);return f.indexOf(v)!==-1}let xg={"compact-short":0,"compact-long":0,"notation-simple":0,scientific:2,engineering:2,percent:0,permille:0,"base-unit":0,currency:1,"measure-unit":1,"per-measure-unit":1,"unit-width-narrow":0,"unit-width-short":0,"unit-width-full-name":0,"unit-width-iso-code":0,"unit-width-hidden":0,"precision-integer":0,"precision-unlimited":0,"precision-currency-standard":1,"precision-currency-cash":0,"precision-increment":1,"rounding-mode-ceiling":0,"rounding-mode-floor":0,"rounding-mode-down":0,"rounding-mode-up":0,"rounding-mode-half-even":0,"rounding-mode-half-down":0,"rounding-mode-half-up":0,"rounding-mode-unnecessary":0,"integer-width":1,scale:1,"group-off":0,"group-min2":0,"group-auto":0,"group-on-aligned":0,"group-thousands":0,latin:0,"numbering-system":1,"sign-auto":0,"sign-always":0,"sign-never":0,"sign-accounting":0,"sign-accounting-always":0,"sign-except-zero":0,"sign-accounting-except-zero":0,"decimal-auto":0,"decimal-always":0},wg={currency:1,"integer-width":1,"measure-unit":1,"numbering-system":1,"per-measure-unit":1,"precision-increment":1,scale:1};function tte(p){return p in xg}function ate(p){return p in wg}function ite(p,f,v){if(tte(p)){let y=xg[p];if(f.length>y){if(y===0)for(let _ of f)v(new ka(p,_));else v(new Z(p,f,y));return!1}else if(ate(p)&&f.length<wg[p])return v(new He(p)),!1}return!0}function Cu(p,f){let v=f==="fraction"?/^\.(0*)(\+|#*)$/:/^(@+)(\+|#*)$/,y=p&&p.match(v);if(y){let _=y[1].length;switch(y[2].charAt(0)){case"":return{min:_,max:_};case"+":return{min:_,max:null};case"#":return{min:_,max:_+y[2].length}}}return null}function nte(p,f,v){let y=Cu(p,"fraction");if(y){f.length>1&&v(new Z(p,f,1));let E={style:"precision-fraction",source:p,minFraction:y.min};y.max!=null&&(E.maxFraction=y.max);let D=f[0],O=Cu(D,"significant");return O?(E.source=`${p}/${D}`,E.minSignificant=O.min,O.max!=null&&(E.maxSignificant=O.max)):D&&v(new ka(p,D)),E}let _=Cu(p,"significant");if(_){for(let D of f)v(new ka(p,D));let E={style:"precision-fraction",source:p,minSignificant:_.min};return _.max!=null&&(E.maxSignificant=_.max),E}return null}class rte{constructor(f){this.skeleton={},this.onError=f}badOption(f,v){this.onError(new ka(f,v))}assertEmpty(f){let v=this.skeleton[f];v&&this.onError(new ie(f,v))}parseToken(f,v){if(!ite(f,v,this.onError))return;let y=v[0],_=this.skeleton;switch(f){case"compact-short":case"compact-long":case"notation-simple":this.assertEmpty("notation"),_.notation={style:f};break;case"scientific":case"engineering":{let E=null,D;for(let L of v)switch(L){case"sign-auto":case"sign-always":case"sign-never":case"sign-accounting":case"sign-accounting-always":case"sign-except-zero":case"sign-accounting-except-zero":D=L;break;default:/^\+e+$/.test(L)?E=L.length-1:this.badOption(f,L)}this.assertEmpty("notation");let O=v.join("/");_.notation=E&&D?{style:f,source:O,expDigits:E,expSign:D}:E?{style:f,source:O,expDigits:E}:D?{style:f,source:O,expSign:D}:{style:f,source:O};break}case"percent":case"permille":case"base-unit":this.assertEmpty("unit"),_.unit={style:f};break;case"currency":/^[A-Z]{3}$/.test(y)?(this.assertEmpty("unit"),_.unit={style:f,currency:y}):this.badOption(f,y);break;case"measure-unit":{_g(y)?(this.assertEmpty("unit"),_.unit={style:f,unit:y}):this.badOption(f,y);break}case"per-measure-unit":{_g(y)?(this.assertEmpty("unitPer"),_.unitPer=y):this.badOption(f,y);break}case"unit-width-narrow":case"unit-width-short":case"unit-width-full-name":case"unit-width-iso-code":case"unit-width-hidden":this.assertEmpty("unitWidth"),_.unitWidth=f;break;case"precision-integer":case"precision-unlimited":case"precision-currency-cash":this.assertEmpty("precision"),_.precision={style:f};break;case"precision-currency-standard":this.assertEmpty("precision"),y==="w"?_.precision={style:f,trailingZero:"stripIfInteger"}:_.precision={style:f};break;case"precision-increment":{let E=Number(y);E>0?(this.assertEmpty("precision"),_.precision={style:f,increment:E}):this.badOption(f,y);break}case"rounding-mode-ceiling":case"rounding-mode-floor":case"rounding-mode-down":case"rounding-mode-up":case"rounding-mode-half-even":case"rounding-mode-half-odd":case"rounding-mode-half-ceiling":case"rounding-mode-half-floor":case"rounding-mode-half-down":case"rounding-mode-half-up":case"rounding-mode-unnecessary":this.assertEmpty("roundingMode"),_.roundingMode=f;break;case"integer-width":{if(/^\+0*$/.test(y))this.assertEmpty("integerWidth"),_.integerWidth={source:y,min:y.length-1};else{let E=y.match(/^#*(0*)$/);E?(this.assertEmpty("integerWidth"),_.integerWidth={source:y,min:E[1].length,max:E[0].length}):this.badOption(f,y)}break}case"scale":{let E=Number(y);E>0?(this.assertEmpty("scale"),_.scale=E):this.badOption(f,y);break}case"group-off":case"group-min2":case"group-auto":case"group-on-aligned":case"group-thousands":this.assertEmpty("group"),_.group=f;break;case"latin":this.assertEmpty("numberingSystem"),_.numberingSystem="latn";break;case"numbering-system":{ete(y)?(this.assertEmpty("numberingSystem"),_.numberingSystem=y):this.badOption(f,y);break}case"sign-auto":case"sign-always":case"sign-never":case"sign-accounting":case"sign-accounting-always":case"sign-except-zero":case"sign-accounting-except-zero":this.assertEmpty("sign"),_.sign=f;break;case"decimal-auto":case"decimal-always":this.assertEmpty("decimal"),_.decimal=f;break;default:{let E=nte(f,v,this.onError);E?(this.assertEmpty("precision"),_.precision=E):this.onError(new he(f))}}}}function kg(p){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_=>{throw _},v=[];for(let _ of p.split(" "))if(_){let E=_.split("/"),D=E.shift()||"";v.push({stem:D,options:E})}let y=new rte(f);for(let{stem:_,options:E}of v)y.parseToken(_,E);return y.skeleton}function ote(p,f,v,y){typeof f=="string"&&(f=f.indexOf("::")===0?kg(f.slice(2),y):Ll(f,v,y));let _=oe(p,f),E=lt(f),D=Ra(f),O=new Intl.NumberFormat(_,E);if(f.affix){let[L,$]=f.affix.pos,[ke,Le]=f.affix.neg||["",""];return Xe=>{let ce=O.format(D(Xe));return Xe<0?`${ke}${ce}${Le}`:`${L}${ce}${$}`}}return L=>O.format(D(L))}function ste(p,f,v,y){typeof f=="string"&&(f=f.indexOf("::")===0?kg(f.slice(2),y):Ll(f,v,y));let _=oe(p,f),E=lt(f),D=at(f),O=["(function() {",`var opt = ${JSON.stringify(E)};`,`var nf = new Intl.NumberFormat(${JSON.stringify(_)}, opt);`],L="nf.format(value)";if(D&&(O.push(`var mod = ${D};`),L="nf.format(mod(value))"),f.affix){let[$,ke]=f.affix.pos.map(Le=>JSON.stringify(Le));if(f.affix.neg){let[Le,Xe]=f.affix.neg.map(ce=>JSON.stringify(ce));L=`value < 0 ? ${Le} + ${L} + ${Xe} : ${$} + ${L} + ${ke}`}else L=`${$} + ${L} + ${ke}`}return O.push(`return function(value) { return ${L}; }`),O.join(` `)+` })()`}var Su=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function lte(p){return p&&p.__esModule&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p}var as={},Eg={},Cg={exports:{}};(function(p){(function(f,v){p.exports?p.exports=v():f.moo=v()})(Su,function(){var f=Object.prototype.hasOwnProperty,v=Object.prototype.toString,y=typeof new RegExp().sticky=="boolean";function _(V){return V&&v.call(V)==="[object RegExp]"}function E(V){return V&&typeof V=="object"&&!_(V)&&!Array.isArray(V)}function D(V){return V.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function O(V){var ae=new RegExp("|"+V);return ae.exec("").length-1}function L(V){return"("+V+")"}function $(V){if(!V.length)return"(?!)";var ae=V.map(function(xe){return"(?:"+xe+")"}).join("|");return"(?:"+ae+")"}function ke(V){if(typeof V=="string")return"(?:"+D(V)+")";if(_(V)){if(V.ignoreCase)throw new Error("RegExp /i flag not allowed");if(V.global)throw new Error("RegExp /g flag is implied");if(V.sticky)throw new Error("RegExp /y flag is implied");if(V.multiline)throw new Error("RegExp /m flag is implied");return V.source}else throw new Error("Not a pattern: "+V)}function Le(V,ae){return V.length>ae?V:Array(ae-V.length+1).join(" ")+V}function Xe(V,ae){for(var xe=V.length,Ee=0;;){var Be=V.lastIndexOf(` `,xe-1);if(Be===-1||(Ee++,xe=Be,Ee===ae)||xe===0)break}var Me=Ee<ae?0:xe+1;return V.substring(Me).split(` `)}function ce(V){for(var ae=Object.getOwnPropertyNames(V),xe=[],Ee=0;Ee<ae.length;Ee++){var Be=ae[Ee],Me=V[Be],it=[].concat(Me);if(Be==="include"){for(var Vt=0;Vt<it.length;Vt++)xe.push({include:it[Vt]});continue}var ft=[];it.forEach(function(Fe){E(Fe)?(ft.length&&xe.push(Kt(Be,ft)),xe.push(Kt(Be,Fe)),ft=[]):ft.push(Fe)}),ft.length&&xe.push(Kt(Be,ft))}return xe}function Nt(V){for(var ae=[],xe=0;xe<V.length;xe++){var Ee=V[xe];if(Ee.include){for(var Be=[].concat(Ee.include),Me=0;Me<Be.length;Me++)ae.push({include:Be[Me]});continue}if(!Ee.type)throw new Error("Rule has no type: "+JSON.stringify(Ee));ae.push(Kt(Ee.type,Ee))}return ae}function Kt(V,ae){if(E(ae)||(ae={match:ae}),ae.include)throw new Error("Matching rules cannot also include states");var xe={defaultType:V,lineBreaks:!!ae.error||!!ae.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var Ee in ae)f.call(ae,Ee)&&(xe[Ee]=ae[Ee]);if(typeof xe.type=="string"&&V!==xe.type)throw new Error("Type transform cannot be a string (type '"+xe.type+"' for token '"+V+"')");var Be=xe.match;return xe.match=Array.isArray(Be)?Be:Be?[Be]:[],xe.match.sort(function(Me,it){return _(Me)&&_(it)?0:_(it)?-1:_(Me)?1:it.length-Me.length}),xe}function ua(V){return Array.isArray(V)?Nt(V):ce(V)}var za=Kt("error",{lineBreaks:!0,shouldThrow:!0});function Ii(V,ae){for(var xe=null,Ee=Object.create(null),Be=!0,Me=null,it=[],Vt=[],ft=0;ft<V.length;ft++)V[ft].fallback&&(Be=!1);for(var ft=0;ft<V.length;ft++){var Fe=V[ft];if(Fe.include)throw new Error("Inheritance is not allowed in stateless lexers");if(Fe.error||Fe.fallback){if(xe)throw!Fe.fallback==!xe.fallback?new Error("Multiple "+(Fe.fallback?"fallback":"error")+" rules not allowed (for token '"+Fe.defaultType+"')"):new Error("fallback and error are mutually exclusive (for token '"+Fe.defaultType+"')");xe=Fe}var ea=Fe.match.slice();if(Be)for(;ea.length&&typeof ea[0]=="string"&&ea[0].length===1;){var Kr=ea.shift();Ee[Kr.charCodeAt(0)]=Fe}if(Fe.pop||Fe.push||Fe.next){if(!ae)throw new Error("State-switching options are not allowed in stateless lexers (for token '"+Fe.defaultType+"')");if(Fe.fallback)throw new Error("State-switching options are not allowed on fallback tokens (for token '"+Fe.defaultType+"')")}if(ea.length!==0){Be=!1,it.push(Fe);for(var Wi=0;Wi<ea.length;Wi++){var pr=ea[Wi];if(_(pr)){if(Me===null)Me=pr.unicode;else if(Me!==pr.unicode&&Fe.fallback===!1)throw new Error("If one rule is /u then all must be")}}var Zr=$(ea.map(ke)),Ti=new RegExp(Zr);if(Ti.test(""))throw new Error("RegExp matches empty string: "+Ti);var ns=O(Zr);if(ns>0)throw new Error("RegExp has capture groups: "+Ti+` Use (?: … ) instead`);if(!Fe.lineBreaks&&Ti.test(` `))throw new Error("Rule should declare lineBreaks: "+Ti);Vt.push(L(Zr))}}var Jr=xe&&xe.fallback,rs=y&&!Jr?"ym":"gm",Ul=y||Jr?"":"|";Me===!0&&(rs+="u");var jte=new RegExp($(Vt)+Ul,rs);return{regexp:jte,groups:it,fast:Ee,error:xe||za}}function zn(V){var ae=Ii(ua(V));return new Gt({start:ae},"start")}function fn(V,ae,xe){var Ee=V&&(V.push||V.next);if(Ee&&!xe[Ee])throw new Error("Missing state '"+Ee+"' (in token '"+V.defaultType+"' of state '"+ae+"')");if(V&&V.pop&&+V.pop!=1)throw new Error("pop must be 1 (in token '"+V.defaultType+"' of state '"+ae+"')")}function gn(V,ae){var xe=V.$all?ua(V.$all):[];delete V.$all;var Ee=Object.getOwnPropertyNames(V);ae||(ae=Ee[0]);for(var Be=Object.create(null),Me=0;Me<Ee.length;Me++){var it=Ee[Me];Be[it]=ua(V[it]).concat(xe)}for(var Me=0;Me<Ee.length;Me++)for(var it=Ee[Me],Vt=Be[it],ft=Object.create(null),Fe=0;Fe<Vt.length;Fe++){var ea=Vt[Fe];if(ea.include){var Kr=[Fe,1];if(ea.include!==it&&!ft[ea.include]){ft[ea.include]=!0;var Wi=Be[ea.include];if(!Wi)throw new Error("Cannot include nonexistent state '"+ea.include+"' (in state '"+it+"')");for(var pr=0;pr<Wi.length;pr++){var Zr=Wi[pr];Vt.indexOf(Zr)===-1&&Kr.push(Zr)}}Vt.splice.apply(Vt,Kr),Fe--}}for(var Ti=Object.create(null),Me=0;Me<Ee.length;Me++){var it=Ee[Me];Ti[it]=Ii(Be[it],!0)}for(var Me=0;Me<Ee.length;Me++){for(var ns=Ee[Me],Jr=Ti[ns],rs=Jr.groups,Fe=0;Fe<rs.length;Fe++)fn(rs[Fe],ns,Ti);for(var Ul=Object.getOwnPropertyNames(Jr.fast),Fe=0;Fe<Ul.length;Fe++)fn(Jr.fast[Ul[Fe]],ns,Ti)}return new Gt(Ti,ae)}function vn(V){for(var ae=typeof Map<"u",xe=ae?new Map:Object.create(null),Ee=Object.getOwnPropertyNames(V),Be=0;Be<Ee.length;Be++){var Me=Ee[Be],it=V[Me],Vt=Array.isArray(it)?it:[it];Vt.forEach(function(ft){if(typeof ft!="string")throw new Error("keyword must be string (in keyword '"+Me+"')");ae?xe.set(ft,Me):xe[ft]=Me})}return function(ft){return ae?xe.get(ft):xe[ft]}}var Gt=function(V,ae){this.startState=ae,this.states=V,this.buffer="",this.stack=[],this.reset()};Gt.prototype.reset=function(V,ae){return this.buffer=V||"",this.index=0,this.line=ae?ae.line:1,this.col=ae?ae.col:1,this.queuedToken=ae?ae.queuedToken:null,this.queuedText=ae?ae.queuedText:"",this.queuedThrow=ae?ae.queuedThrow:null,this.setState(ae?ae.state:this.startState),this.stack=ae&&ae.stack?ae.stack.slice():[],this},Gt.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedText:this.queuedText,queuedThrow:this.queuedThrow}},Gt.prototype.setState=function(V){if(!(!V||this.state===V)){this.state=V;var ae=this.states[V];this.groups=ae.groups,this.error=ae.error,this.re=ae.regexp,this.fast=ae.fast}},Gt.prototype.popState=function(){this.setState(this.stack.pop())},Gt.prototype.pushState=function(V){this.stack.push(this.state),this.setState(V)};var jl=y?function(V,ae){return V.exec(ae)}:function(V,ae){var xe=V.exec(ae);return xe[0].length===0?null:xe};Gt.prototype._getGroup=function(V){for(var ae=this.groups.length,xe=0;xe<ae;xe++)if(V[xe+1]!==void 0)return this.groups[xe];throw new Error("Cannot find token type for matched text")};function Hl(){return this.value}if(Gt.prototype.next=function(){var V=this.index;if(this.queuedGroup){var ae=this._token(this.queuedGroup,this.queuedText,V);return this.queuedGroup=null,this.queuedText="",ae}var xe=this.buffer;if(V!==xe.length){var it=this.fast[xe.charCodeAt(V)];if(it)return this._token(it,xe.charAt(V),V);var Ee=this.re;Ee.lastIndex=V;var Be=jl(Ee,xe),Me=this.error;if(Be==null)return this._token(Me,xe.slice(V,xe.length),V);var it=this._getGroup(Be),Vt=Be[0];return Me.fallback&&Be.index!==V?(this.queuedGroup=it,this.queuedText=Vt,this._token(Me,xe.slice(V,Be.index),V)):this._token(it,Vt,V)}},Gt.prototype._token=function(V,ae,xe){var Ee=0;if(V.lineBreaks){var Be=/\n/g,Me=1;if(ae===` `)Ee=1;else for(;Be.exec(ae);)Ee++,Me=Be.lastIndex}var it={type:typeof V.type=="function"&&V.type(ae)||V.defaultType,value:typeof V.value=="function"?V.value(ae):ae,text:ae,toString:Hl,offset:xe,lineBreaks:Ee,line:this.line,col:this.col},Vt=ae.length;if(this.index+=Vt,this.line+=Ee,Ee!==0?this.col=Vt-Me+1:this.col+=Vt,V.shouldThrow){var ft=new Error(this.formatError(it,"invalid syntax"));throw ft}return V.pop?this.popState():V.push?this.pushState(V.push):V.next&&this.setState(V.next),it},typeof Symbol<"u"&&Symbol.iterator){var bn=function(V){this.lexer=V};bn.prototype.next=function(){var V=this.lexer.next();return{value:V,done:!V}},bn.prototype[Symbol.iterator]=function(){return this},Gt.prototype[Symbol.iterator]=function(){return new bn(this)}}return Gt.prototype.formatError=function(Ee,ae){if(Ee==null)var xe=this.buffer.slice(this.index),Ee={text:xe,offset:this.index,lineBreaks:xe.indexOf(` `)===-1?0:1,line:this.line,col:this.col};var Be=2,Me=Math.max(Ee.line-Be,1),it=Ee.line+Be,Vt=String(it).length,ft=Xe(this.buffer,this.line-Ee.line+Be+1).slice(0,5),Fe=[];Fe.push(ae+" at line "+Ee.line+" col "+Ee.col+":"),Fe.push("");for(var ea=0;ea<ft.length;ea++){var Kr=ft[ea],Wi=Me+ea;Fe.push(Le(String(Wi),Vt)+" "+Kr),Wi===Ee.line&&Fe.push(Le("",Vt+Ee.col+1)+"^")}return Fe.join(` `)},Gt.prototype.clone=function(){return new Gt(this.states,this.state)},Gt.prototype.has=function(V){return!0},{compile:zn,states:gn,error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:vn}})})(Cg);var cte=Cg.exports;(function(p){var f=Su&&Su.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(p,"__esModule",{value:!0}),p.lexer=p.states=void 0;let v=f(cte);p.states={body:{doubleapos:{match:"''",value:()=>"'"},quoted:{lineBreaks:!0,match:/'[{}#](?:[^]*?[^'])?'(?!')/u,value:y=>y.slice(1,-1).replace(/''/g,"'")},argument:{lineBreaks:!0,match:/\{\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,push:"arg",value:y=>y.substring(1).trim()},octothorpe:"#",end:{match:"}",pop:1},content:{lineBreaks:!0,match:/[^][^{}#']*/u}},arg:{select:{lineBreaks:!0,match:/,\s*(?:plural|select|selectordinal)\s*,\s*/u,next:"select",value:y=>y.split(",")[1].trim()},"func-args":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*,/u,next:"body",value:y=>y.split(",")[1].trim()},"func-simple":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,value:y=>y.substring(1).trim()},end:{match:"}",pop:1}},select:{offset:{lineBreaks:!0,match:/\s*offset\s*:\s*\d+\s*/u,value:y=>y.split(":")[1].trim()},case:{lineBreaks:!0,match:/\s*(?:=\d+|[^\p{Pat_Syn}\p{Pat_WS}]+)\s*\{/u,push:"body",value:y=>y.substring(0,y.indexOf("{")).trim()},end:{match:/\s*\}/u,pop:1}}},p.lexer=v.default.states(p.states)})(Eg),Object.defineProperty(as,"__esModule",{value:!0});var Sg=as.parse=as.ParseError=void 0;let Dg=Eg,Fl=p=>({offset:p.offset,line:p.line,col:p.col,text:p.text,lineBreaks:p.lineBreaks}),Du=p=>p==="plural"||p==="select"||p==="selectordinal";function dte(p,f){let v="",y="";for(let _ of f){let E=_.ctx.text;switch(y+=E,_.type){case"content":v+=_.value;break;case"argument":case"function":case"octothorpe":v+=E;break;default:throw new ba(p,`Unsupported part in strict mode function arg style: ${E}`)}}return[{type:"content",value:v.trim(),ctx:Object.assign({},f[0].ctx,{text:y})}]}let ute=["number","date","time","spellout","ordinal","duration"],Ig=["zero","one","two","few","many","other"];class ba extends Error{constructor(f,v){super(Dg.lexer.formatError(f,v))}}as.ParseError=ba;class hte{constructor(f,v){var y,_,E,D;this.lexer=Dg.lexer.reset(f),this.cardinalKeys=(y=v==null?void 0:v.cardinal)!==null&&y!==void 0?y:Ig,this.ordinalKeys=(_=v==null?void 0:v.ordinal)!==null&&_!==void 0?_:Ig,this.strict=(E=v==null?void 0:v.strict)!==null&&E!==void 0?E:!1,this.strictPluralKeys=(D=v==null?void 0:v.strictPluralKeys)!==null&&D!==void 0?D:!0}parse(){return this.parseBody(!1,!0)}checkSelectKey(f,v,y){if(y[0]==="="){if(v==="select")throw new ba(f,`The case ${y} is not valid with select`)}else if(v!=="select"){let _=v==="plural"?this.cardinalKeys:this.ordinalKeys;if(this.strictPluralKeys&&_.length>0&&!_.includes(y)){let E=`The ${v} case ${y} is not valid in this locale`;throw new ba(f,E)}}}parseSelect(f,v,y,_){let{value:E}=f,D={type:_,arg:E,cases:[],ctx:y};_==="plural"||_==="selectordinal"?v=!0:this.strict&&(v=!1);for(let O of this.lexer)switch(O.type){case"offset":if(_==="select")throw new ba(O,"Unexpected plural offset for select");if(D.cases.length>0)throw new ba(O,"Plural offset must be set before cases");D.pluralOffset=Number(O.value),y.text+=O.text,y.lineBreaks+=O.lineBreaks;break;case"case":{this.checkSelectKey(O,_,O.value),D.cases.push({key:O.value,tokens:this.parseBody(v),ctx:Fl(O)});break}case"end":return D;default:throw new ba(O,`Unexpected lexer token: ${O.type}`)}throw new ba(null,"Unexpected message end")}parseArgToken(f,v){let y=Fl(f),_=this.lexer.next();if(!_)throw new ba(null,"Unexpected message end");if(y.text+=_.text,y.lineBreaks+=_.lineBreaks,this.strict&&(_.type==="func-simple"||_.type==="func-args")&&!ute.includes(_.value)){let E=`Invalid strict mode function arg type: ${_.value}`;throw new ba(f,E)}switch(_.type){case"end":return{type:"argument",arg:f.value,ctx:y};case"func-simple":{let E=this.lexer.next();if(!E)throw new ba(null,"Unexpected message end");if(E.type!=="end")throw new ba(E,`Unexpected lexer token: ${E.type}`);if(y.text+=E.text,Du(_.value.toLowerCase()))throw new ba(_,`Invalid type identifier: ${_.value}`);return{type:"function",arg:f.value,key:_.value,ctx:y}}case"func-args":{if(Du(_.value.toLowerCase())){let D=`Invalid type identifier: ${_.value}`;throw new ba(_,D)}let E=this.parseBody(this.strict?!1:v);return this.strict&&E.length>0&&(E=dte(f,E)),{type:"function",arg:f.value,key:_.value,param:E,ctx:y}}case"select":if(Du(_.value))return this.parseSelect(f,v,y,_.value);throw new ba(_,`Unexpected select type ${_.value}`);default:throw new ba(_,`Unexpected lexer token: ${_.type}`)}}parseBody(f,v){let y=[],_=null;for(let E of this.lexer)if(E.type==="argument")_&&(_=null),y.push(this.parseArgToken(E,f));else if(E.type==="octothorpe"&&f)_&&(_=null),y.push({type:"octothorpe",ctx:Fl(E)});else{if(E.type==="end"&&!v)return y;{let D=E.value;if(!f&&E.type==="quoted"&&D[0]==="#"){if(D.includes("{")){let O=`Unsupported escape pattern: ${D}`;throw new ba(E,O)}D=E.text}_?(_.value+=D,_.ctx.text+=E.text,_.ctx.lineBreaks+=E.lineBreaks):(_={type:"content",value:D,ctx:Fl(E)},y.push(_))}}if(v)return y;throw new ba(null,"Unexpected message end")}}function pte(p){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new hte(p,f).parse()}Sg=as.parse=pte;function is(p){return is[p]||(is[p]=new Intl.NumberFormat(p))}function mte(p,f,v){return is(p).format(f-v)}function fte(p,f,v,y){var _=f-v;if(isNaN(_))throw new Error("`"+y+"` or its offset is not a number");return is(p).format(_)}function gte(p,f,v,y,_){if({}.hasOwnProperty.call(y,p))return y[p];f&&(p-=f);var E=v(p,_);return E in y?y[E]:y.other}function vte(p,f){return{}.hasOwnProperty.call(f,p)?f[p]:f.other}function bte(p,f){for(var v=0;v<p.length;++v)if(!f||f[p[v]]===void 0)throw new Error("Message requires argument '".concat(p[v],"'"))}var yte=Object.freeze({__proto__:null,_nf:is,number:mte,plural:gte,reqArgs:bte,select:vte,strictNumber:fte});function _te(p,f,v){var y={day:"numeric",month:"short",year:"numeric"};switch(v){case"full":y.weekday="long";case"long":y.month="long";break;case"short":y.month="numeric"}return new Date(p).toLocaleDateString(f,y)}function xte(p){if(typeof p!="number"&&(p=Number(p)),!isFinite(p))return String(p);var f="";p<0?(f="-",p=Math.abs(p)):p=Number(p);var v=p%60,y=[Math.round(v)===v?v:v.toFixed(3)];p<60?y.unshift(0):(p=Math.round((p-Number(y[0]))/60),y.unshift(p%60),p>=60&&(p=Math.round((p-Number(y[0]))/60),y.unshift(p)));var _=y.shift();return f+_+":"+y.map(function(E){return Number(E)<10?"0"+String(E):String(E)}).join(":")}var Iu={};function Vl(p,f){var v=String(p)+JSON.stringify(f);return Iu[v]||(Iu[v]=new Intl.NumberFormat(p,f)),Iu[v]}function wte(p,f,v,y){var _=v&&v.split(":")||[],E=_[0],D=_[1],O={integer:{maximumFractionDigits:0},percent:{style:"percent"},currency:{style:"currency",currency:D&&D.trim()||y,minimumFractionDigits:2,maximumFractionDigits:2}};return Vl(f,O[E]||{}).format(p)}var kte=function(p,f,v){return Vl(f,{style:"currency",currency:v,minimumFractionDigits:2,maximumFractionDigits:2}).format(p)},Ete=function(p,f){return Vl(f,{maximumFractionDigits:0}).format(p)},Cte=function(p,f){return Vl(f,{style:"percent"}).format(p)};function Ste(p,f,v){var y={second:"numeric",minute:"numeric",hour:"numeric"};switch(v){case"full":case"long":y.timeZoneName="short";break;case"short":delete y.second}return new Date(p).toLocaleTimeString(f,y)}var Tu=Object.freeze({__proto__:null,date:_te,duration:xte,numberCurrency:kte,numberFmt:wte,numberInteger:Ete,numberPercent:Cte,time:Ste}),Dte={ES3:{break:!0,continue:!0,delete:!0,else:!0,for:!0,function:!0,if:!0,in:!0,new:!0,return:!0,this:!0,typeof:!0,var:!0,void:!0,while:!0,with:!0,case:!0,catch:!0,default:!0,do:!0,finally:!0,instanceof:!0,switch:!0,throw:!0,try:!0},ESnext:{await:!0,debugger:!0,class:!0,enum:!0,extends:!0,super:!0,const:!0,export:!0,import:!0,null:!0,true:!0,false:!0,implements:!0,let:!0,private:!0,public:!0,yield:!0,interface:!0,package:!0,protected:!0,static:!0}},Au=lte(Dte);function Ite(p){let f=0;for(let v=0;v<p.length;++v){let y=p.charCodeAt(v);f=(f<<5)-f+y,f|=0}return f}function Vn(p,f){f&&(p+=" "+Ite(p).toString(36));let v=p.trim().replace(/\W+/g,"_");return Au.ES3[v]||Au.ESnext[v]||/^\d/.test(v)?"_"+v:v}function Ru(p,f){if(/^[A-Z_$][0-9A-Z_$]*$/i.test(f)&&!Au.ES3[f])return p?p+"."+f:f;{let v=JSON.stringify(f);return p?p+"["+v+"]":v}}var Tte=["ar","ckb","fa","he","ks($|[^bfh])","lrc","mzn","pa-Arab","ps","ug","ur","uz-Arab","yi"],Ate=new RegExp("^"+Tte.join("|^"));function Rte(p,f){var v=Ate.test(f),y=JSON.stringify(v?"‏":"‎");return"".concat(y," + ").concat(p," + ").concat(y)}var Ote="@messageformat/runtime",Nte="@messageformat/runtime/lib/cardinals",Tg="@messageformat/runtime/lib/plurals",Pte="@messageformat/runtime/lib/formatters",Mte=function(){function p(f){this.arguments=[],this.runtime={},this.options=f}return p.prototype.compile=function(f,v,y){var _,E,D=this,O=this.options,L=O.localeCodeFromKey,$=O.requireAllArguments,ke=O.strict,Le=O.strictPluralKeys;if(typeof f=="object"){var Xe={};try{for(var ce=a(Object.keys(f)),Nt=ce.next();!Nt.done;Nt=ce.next()){var Kt=Nt.value,ua=L?L(Kt):Kt,za=y&&ua&&y[ua]||v;Xe[Kt]=this.compile(f[Kt],za,y)}}catch(Gt){_={error:Gt}}finally{try{Nt&&!Nt.done&&(E=ce.return)&&E.call(ce)}finally{if(_)throw _.error}}return Xe}this.plural=v;var Ii={cardinal:v.cardinals,ordinal:v.ordinals,strict:ke,strictPluralKeys:Le};this.arguments=[];var zn=Sg(f,Ii).map(function(Gt){return D.token(Gt,null)}),fn=this.arguments.length>0,gn=this.concatenate(zn,!0);if($&&fn){this.setRuntimeFn("reqArgs");var vn=JSON.stringify(this.arguments);return"(d) => { reqArgs(".concat(vn,", d); return ").concat(gn,"; }")}return"(".concat(fn?"d":"",") => ").concat(gn)},p.prototype.cases=function(f,v){var y=this,_=!0,E=f.cases.map(function(ke){var Le=ke.key,Xe=ke.tokens;Le==="other"&&(_=!1);var ce=Xe.map(function(Nt){return y.token(Nt,v)});return"".concat(Ru(null,Le.replace(/^=/,"")),": ").concat(y.concatenate(ce,!1))});if(_){var D=f.type,O=this.plural,L=O.cardinals,$=O.ordinals;if(D==="select"||D==="plural"&&L.includes("other")||D==="selectordinal"&&$.includes("other"))throw new Error("No 'other' form found in ".concat(JSON.stringify(f)))}return"{ ".concat(E.join(", ")," }")},p.prototype.concatenate=function(f,v){var y=this.options.returnType==="values";return y&&(v||f.length>1)?"["+f.join(", ")+"]":f.join(" + ")||'""'},p.prototype.token=function(f,v){if(f.type==="content")return JSON.stringify(f.value);var y=this.plural,_=y.id,E=y.lc,D,O;switch("arg"in f?(this.arguments.push(f.arg),D=[Ru("d",f.arg)]):D=[],f.type){case"argument":return this.options.biDiSupport?Rte(String(D[0]),E):String(D[0]);case"select":O="select",v&&this.options.strict&&(v=null),D.push(this.cases(f,v)),this.setRuntimeFn("select");break;case"selectordinal":O="plural",D.push(f.pluralOffset||0,_,this.cases(f,f),1),this.setLocale(_,!0),this.setRuntimeFn("plural");break;case"plural":O="plural",D.push(f.pluralOffset||0,_,this.cases(f,f)),this.setLocale(_,!1),this.setRuntimeFn("plural");break;case"function":{var L=this.options.customFormatters[f.key],$=L&&"module"in L&&typeof L.module=="function";if(!L){if(f.key==="date"){O=this.setDateFormatter(f,D,v);break}else if(f.key==="number"){O=this.setNumberFormatter(f,D,v);break}}if(D.push(JSON.stringify(this.plural.locale)),f.param){v&&this.options.strict&&(v=null);var ke=this.getFormatterArg(f,v);ke&&D.push(ke)}O=$?Vn("".concat(f.key,"__").concat(this.plural.locale)):f.key,this.setFormatter(O,f.key);break}case"octothorpe":if(!v)return'"#"';D=[JSON.stringify(this.plural.locale),Ru("d",v.arg),v.pluralOffset||0],this.options.strict?(O="strictNumber",D.push(JSON.stringify(v.arg)),this.setRuntimeFn("strictNumber")):(O="number",this.setRuntimeFn("number"));break}if(!O)throw new Error("Parser error for token "+JSON.stringify(f));return"".concat(O,"(").concat(D.join(", "),")")},p.prototype.runtimeIncludes=function(f,v){if(Vn(f)!==f)throw new SyntaxError("Reserved word used as ".concat(v," identifier: ").concat(f));var y=this.runtime[f];if(!y||y.type===v)return y;throw new TypeError("Cannot override ".concat(y.type," runtime function as ").concat(v,": ").concat(f))},p.prototype.setLocale=function(f,v){var y=this.runtimeIncludes(f,"locale"),_=this.plural,E=_.getCardinal,D=_.getPlural,O=_.isDefault,L,$,ke;if(!v&&O&&E){if(y)return;L=function(Le){return E(Le)},$=Nte,ke=function(){return String(E)}}else{if(y&&(!O||y.module===Tg))return;L=function(Le,Xe){return D(Le,Xe)},$=O?Tg:D.module||null,ke=function(){return String(D)}}this.runtime[f]=Object.assign(L,{id:f,module:$,toString:ke,type:"locale"})},p.prototype.setRuntimeFn=function(f){this.runtimeIncludes(f,"runtime")||(this.runtime[f]=Object.assign(yte[f],{id:f,module:Ote,type:"runtime"}))},p.prototype.getFormatterArg=function(f,v){var y,_,E,D,O=this,L=f.key,$=f.param,ke=this.options.customFormatters[L]||Ag(L)&&Tu[L];if(!ke||!$)return null;var Le="arg"in ke&&ke.arg||"string";if(Le==="options"){var Xe="";try{for(var ce=a($),Nt=ce.next();!Nt.done;Nt=ce.next()){var Kt=Nt.value;if(Kt.type==="content")Xe+=Kt.value;else throw new SyntaxError("Expected literal options for ".concat(L," formatter"))}}catch(bn){y={error:bn}}finally{try{Nt&&!Nt.done&&(_=ce.return)&&_.call(ce)}finally{if(y)throw y.error}}var ua={};try{for(var za=a(Xe.split(",")),Ii=za.next();!Ii.done;Ii=za.next()){var zn=Ii.value,fn=zn.indexOf(":");if(fn===-1)ua[zn.trim()]=null;else{var gn=zn.substring(0,fn).trim(),vn=zn.substring(fn+1).trim();if(vn==="true")ua[gn]=!0;else if(vn==="false")ua[gn]=!1;else if(vn==="null")ua[gn]=null;else{var Gt=Number(vn);ua[gn]=Number.isFinite(Gt)?Gt:vn}}}}catch(bn){E={error:bn}}finally{try{Ii&&!Ii.done&&(D=za.return)&&D.call(za)}finally{if(E)throw E.error}}return JSON.stringify(ua)}else{var jl=$.map(function(bn){return O.token(bn,v)});if(Le==="raw")return"[".concat(jl.join(", "),"]");var Hl=jl.join(" + ");return Hl?"(".concat(Hl,").trim()"):'""'}},p.prototype.setFormatter=function(f,v){if(!this.runtimeIncludes(f,"formatter")){var y=this.options.customFormatters[v||f];if(y){var _=typeof y=="function"?{formatter:y}:y;this.runtime[f]=Object.assign(_.formatter.bind({}),n(n({},_.formatter.prototype),{toString:function(){return String(_.formatter)}}),{type:"formatter"},"module"in y&&y.module&&y.id?{id:Vn(y.id),module:typeof y.module=="function"?y.module(this.plural.locale):y.module}:{id:null,module:null})}else if(Ag(f))this.runtime[f]=Object.assign(Tu[f],{type:"formatter"},{id:f,module:Pte});else throw new Error("Formatting function not found: ".concat(f))}},p.prototype.setDateFormatter=function(f,v,y){var _=this,E=f.param,D=this.plural.locale,O=E&&E.length===1&&E[0];if(O&&O.type==="content"&&/^\s*::/.test(O.value)){var L=O.value.trim().substr(2),$=Vn("date_".concat(D,"_").concat(L),!0);if(!this.runtimeIncludes($,"formatter")){var ke=Aa(D,L,this.options.timeZone);this.runtime[$]=Object.assign(ke,{id:$,module:null,toString:function(){return wa(D,L,_.options.timeZone)},type:"formatter"})}return $}if(v.push(JSON.stringify(D)),E&&E.length>0){y&&this.options.strict&&(y=null);var Le=E.map(function(Xe){return _.token(Xe,y)});v.push("("+(Le.join(" + ")||'""')+").trim()")}return this.setFormatter("date"),"date"},p.prototype.setNumberFormatter=function(f,v,y){var _=this,E=f.param,D=this.plural.locale;if(!E||E.length===0)return v.unshift(JSON.stringify(D)),v.push("0"),this.setRuntimeFn("number"),"number";if(v.push(JSON.stringify(D)),E.length===1&&E[0].type==="content"){var O=E[0].value.trim();switch(O){case"currency":return v.push(JSON.stringify(this.options.currency)),this.setFormatter("numberCurrency"),"numberCurrency";case"integer":return this.setFormatter("numberInteger"),"numberInteger";case"percent":return this.setFormatter("numberPercent"),"numberPercent"}var L=O.match(/^currency:([A-Z]+)$/);if(L)return v.push(JSON.stringify(L[1])),this.setFormatter("numberCurrency"),"numberCurrency";var $=Vn("number_".concat(D,"_").concat(O),!0);if(!this.runtimeIncludes($,"formatter")){var ke=this.options.currency,Le=ote(D,O,ke);this.runtime[$]=Object.assign(Le,{id:null,module:null,toString:function(){return ste(D,O,ke)},type:"formatter"})}return $}y&&this.options.strict&&(y=null);var Xe=E.map(function(ce){return _.token(ce,y)});return v.push("("+(Xe.join(" + ")||'""')+").trim()"),v.push(JSON.stringify(this.options.currency)),this.setFormatter("numberFmt"),"numberFmt"},p}();function Ag(p){return p in Tu}let Q=p=>p==1?"one":"othe