@smals-belgium-shared/vidis-medication-scheme-detail
Version:
Medication scheme detail web component
12 lines • 773 kB
JavaScript
var h$=Object.defineProperty;var qd=e=>{throw TypeError(e)};var m$=(e,t,a)=>t in e?h$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;var h=(e,t,a)=>m$(e,typeof t!="symbol"?t+"":t,a),$d=(e,t,a)=>t.has(e)||qd("Cannot "+a);var qn=(e,t,a)=>($d(e,t,"read from private field"),a?a.call(e):t.get(e)),Yd=(e,t,a)=>t.has(e)?qd("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,a),Zd=(e,t,a,n)=>($d(e,t,"write to private field"),n?n.call(e,a):t.set(e,a),a);var f$=Object.create,Cs=Object.defineProperty,g$=Object.defineProperties,v$=Object.getOwnPropertyDescriptor,y$=Object.getOwnPropertyDescriptors,b$=Object.getOwnPropertyNames,Jo=Object.getOwnPropertySymbols,E$=Object.getPrototypeOf,cc=Object.prototype.hasOwnProperty,Zh=Object.prototype.propertyIsEnumerable,Kd=(e,t,a)=>t in e?Cs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,ke=(e,t)=>{for(var a in t||(t={}))cc.call(t,a)&&Kd(e,a,t[a]);if(Jo)for(var a of Jo(t))Zh.call(t,a)&&Kd(e,a,t[a]);return e},Tt=(e,t)=>g$(e,y$(t)),w$=(e,t)=>{var a={};for(var n in e)cc.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&Jo)for(var n of Jo(e))t.indexOf(n)<0&&Zh.call(e,n)&&(a[n]=e[n]);return a},oe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),K=(e,t)=>{for(var a in t)Cs(e,a,{get:t[a],enumerable:!0})},x$=(e,t,a,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of b$(t))!cc.call(e,r)&&r!==a&&Cs(e,r,{get:()=>t[r],enumerable:!(n=v$(t,r))||n.enumerable});return e},Kh=(e,t,a)=>(a=e!=null?f$(E$(e)):{},x$(t||!e||!e.__esModule?Cs(a,"default",{value:e,enumerable:!0}):a,e)),Kn=(e,t,a)=>new Promise((n,r)=>{var i=p=>{try{s(a.next(p))}catch(u){r(u)}},o=p=>{try{s(a.throw(p))}catch(u){r(u)}},s=p=>p.done?n(p.value):Promise.resolve(p.value).then(i,o);s((a=a.apply(e,t)).next())}),_$=oe((e,t)=>{(function(a,n){typeof e=="object"&&typeof t<"u"?t.exports=n():typeof define=="function"&&define.amd?define(n):(a=typeof globalThis<"u"?globalThis:a||self,a.MessageFormat=n())})(e,function(){var a=function(){return a=Object.assign||function(c){for(var f,g=1,v=arguments.length;g<v;g++){f=arguments[g];for(var E in f)Object.prototype.hasOwnProperty.call(f,E)&&(c[E]=f[E])}return c},a.apply(this,arguments)};function n(c){var f=typeof Symbol=="function"&&Symbol.iterator,g=f&&c[f],v=0;if(g)return g.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&v>=c.length&&(c=void 0),{value:c&&c[v++],done:!c}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")}function r(c,f){var g=typeof Symbol=="function"&&c[Symbol.iterator];if(!g)return c;var v=g.call(c),E,_=[],k;try{for(;(f===void 0||f-- >0)&&!(E=v.next()).done;)_.push(E.value)}catch(I){k={error:I}}finally{try{E&&!E.done&&(g=v.return)&&g.call(v)}finally{if(k)throw k.error}}return _}function i(c,f,g){if(arguments.length===2)for(var v=0,E=f.length,_;v<E;v++)(_||!(v in f))&&(_||(_=Array.prototype.slice.call(f,0,v)),_[v]=f[v]);return c.concat(_||Array.prototype.slice.call(f))}typeof SuppressedError=="function"&&SuppressedError;class o extends Error{constructor(f,g,v){super(f),this.token=g,this.type=v||"error"}}let s=c=>c<4?"short":c===4?"long":"narrow",p=c=>c%2===0?"2-digit":"numeric";function u(c,f){switch(c.char){case"y":return{year:p(c.width)};case"r":return{calendar:"gregory",year:"numeric"};case"u":case"U":case"Y":default:return f(`${c.desc} is not supported; falling back to year:numeric`,o.WARNING),{year:"numeric"}}}function d(c,f){switch(c.width){case 1:return"numeric";case 2:return"2-digit";case 3:return"short";case 4:return"long";case 5:return"narrow";default:f(`${c.desc} is not supported with width ${c.width}`);return}}function m(c,f){let{char:g,desc:v,width:E}=c;if(g==="d")return p(E);f(`${v} is not supported`)}function b(c,f){let{char:g,desc:v,width:E}=c;if((g==="c"||g==="e")&&E<3){let _=`Numeric value is not supported for ${v}; falling back to weekday:short`;f(_,o.WARNING)}return s(E)}function y(c){let f=p(c.width),g;switch(c.char){case"h":g="h12";break;case"H":g="h23";break;case"k":g="h24";break;case"K":g="h11";break}return g?{hour:f,hourCycle:g}:{hour:f}}function x(c,f){let{char:g,desc:v,width:E}=c;switch(g){case"v":case"z":return E===4?"long":"short";case"V":if(E===4)return"long";f(`${v} is not supported with width ${E}`);return;case"X":f(`${v} is not supported`);return}return"short"}function w(c,f){switch(c.field){case"era":return{era:s(c.width)};case"year":return u(c,f);case"month":return{month:d(c,f)};case"day":return{day:m(c,f)};case"weekday":return{weekday:b(c,f)};case"period":return;case"hour":return y(c);case"min":return{minute:p(c.width)};case"sec":return{second:p(c.width)};case"tz":return{timeZoneName:x(c,f)};case"quarter":case"week":case"sec-frac":case"ms":f(`${c.desc} is not supported`)}}function S(c,f){let g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_=>{throw _},v={timeZone:f},E=[];for(let _ of c){let{error:k,field:I,str:C}=_;if(k){let Q=new o(k.message,_);Q.stack=k.stack,g(Q)}if(C){let Q=`Ignoring string part: ${C}`;g(new o(Q,_,o.WARNING))}I&&(E.indexOf(I)===-1?E.push(I):g(new o(`Duplicate ${I} token`,_)));let L=w(_,(Q,le)=>g(new o(Q,_,le)));L&&Object.assign(v,L)}return v}let D={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"}},V=c=>c>="A"&&c<="Z"||c>="a"&&c<="z";function A(c,f){let g=c[f],v=1;for(;c[++f]===g;)++v;let E=D[g];if(!E){let _=`The letter ${g} is not a valid field identifier`;return{char:g,error:new Error(_),width:v}}return{char:g,field:E.field,desc:E.desc,width:v}}function Ce(c,f){let g=c[++f],v=2;if(g==="'")return{char:"'",str:g,width:v};for(;;){let E=c[++f];if(++v,E===void 0){let _=`Unterminated quoted literal in pattern: ${g||c}`;return{char:"'",error:new Error(_),str:g,width:v}}else if(E==="'"){if(c[++f]!=="'")return{char:"'",str:g,width:v};++v}g+=E}}function He(c,f){let g=c[f];if(!g)return null;if(V(g))return A(c,f);if(g==="'")return Ce(c,f);let v=g,E=1;for(;;){let _=c[++f];if(!_||V(_)||_==="'")return{char:g,str:v,width:E};v+=_,E+=1}}function Le(c){let f=[],g=0;for(;;){let v=He(c,g);if(!v)return f;f.push(v),g+=v.width}}function xt(c,f,g,v){typeof f=="string"&&(f=Le(f)),typeof g=="function"&&(v=g,g=void 0);let E=S(f,g,v),_=new Intl.DateTimeFormat(c,E);return k=>_.format(k)}function vt(c,f,g,v){typeof f=="string"&&(f=Le(f)),typeof g=="function"&&(v=g,g=void 0);let E=S(f,g,v);return["(function() {",`var opt = ${JSON.stringify(E)};`,`var dtf = new Intl.DateTimeFormat(${JSON.stringify(c)}, opt);`,"return function(value) { return dtf.format(value); }"].join(`
`)+`
})()`}class Qe extends Error{constructor(f,g){super(g),this.code=f}}class yt extends Qe{constructor(f,g){super("BAD_OPTION",`Unknown ${f} option: ${g}`),this.stem=f,this.option=g}}class Y extends Qe{constructor(f){super("BAD_STEM",`Unknown stem: ${f}`),this.stem=f}}class H extends Qe{constructor(f,g){super("MASKED_VALUE",`Value for ${f} is set multiple times`),this.type=f,this.prev=g}}class fe extends Qe{constructor(f){super("MISSING_OPTION",`Required option missing for ${f}`),this.stem=f}}class R extends Qe{constructor(f,g){super("BAD_PATTERN",g),this.char=f}}class F extends Qe{constructor(f,g,v){let E=v>1?`${v} options`:"one option";super("TOO_MANY_OPTIONS",`Token ${f} only supports ${E} (got ${g.length})`),this.stem=f,this.options=g}}function q(c,f){let{numberingSystem:g}=f;return Array.isArray(c)||(c=[c]),g?c.map(v=>{let E=v.indexOf("-u-")===-1?"u-nu":"nu";return`${v}-${E}-${g}`}).concat(c):c}function Ee(c,f){let g=+c+f/2;return g-g%+f}function Ue(c){let{scale:f,unit:g}=c,v=typeof f=="number"&&f>=0?f:1;return g&&g.style==="percent"&&(v*=.01),v}function _t(c){let f=Ue(c),{precision:g}=c;return g&&g.style==="precision-increment"?v=>Ee(v,g.increment)*f:v=>v*f}function Te(c){let f=Ue(c),{precision:g}=c;if(g&&g.style==="precision-increment"){let v=`+n + ${g.increment/2}`,E=`x - (x % +${g.increment})`;return f!==1&&(E=`(${E}) * ${f}`),`function(n) { var x = ${v}; return ${E}; }`}return f!==1?`function(n) { return n * ${f}; }`:null}function Re(c,f){let{decimal:g,group:v,integerWidth:E,notation:_,precision:k,roundingMode:I,sign:C,unit:L,unitPer:Q,unitWidth:le}=c,_e=(qe,et)=>{},$={};if(L)switch(L.style){case"base-unit":$.style="decimal";break;case"currency":$.style="currency",$.currency=L.currency;break;case"measure-unit":$.style="unit",$.unit=L.unit.replace(/.*-/,""),Q&&($.unit+="-per-"+Q.replace(/.*-/,""));break;case"percent":$.style="percent";break}switch(le){case"unit-width-full-name":$.currencyDisplay="name",$.unitDisplay="long";break;case"unit-width-hidden":break;case"unit-width-iso-code":$.currencyDisplay="code";break;case"unit-width-narrow":$.currencyDisplay="narrowSymbol",$.unitDisplay="narrow";break;case"unit-width-short":$.currencyDisplay="symbol",$.unitDisplay="short";break}switch(v){case"group-off":$.useGrouping=!1;break;case"group-auto":$.useGrouping=!0;break;case"group-min2":case"group-on-aligned":case"group-thousands":$.useGrouping=!0;break}if(k)switch(k.style){case"precision-fraction":{let{minFraction:qe,maxFraction:et,minSignificant:ut,maxSignificant:It,source:hn}=k;typeof qe=="number"&&($.minimumFractionDigits=qe,typeof ut=="number"&&_e()),typeof et=="number"&&($.maximumFractionDigits=et),typeof ut=="number"&&($.minimumSignificantDigits=ut),typeof It=="number"&&($.maximumSignificantDigits=It);break}case"precision-integer":$.maximumFractionDigits=0;break;case"precision-unlimited":$.maximumFractionDigits=20;break;case"precision-increment":break;case"precision-currency-standard":$.trailingZeroDisplay=k.trailingZero;break;case"precision-currency-cash":_e(k.style);break}if(_)switch(_.style){case"compact-short":$.notation="compact",$.compactDisplay="short";break;case"compact-long":$.notation="compact",$.compactDisplay="long";break;case"notation-simple":$.notation="standard";break;case"scientific":case"engineering":{let{expDigits:qe,expSign:et,source:ut,style:It}=_;$.notation=It;break}}if(E){let{min:qe,max:et,source:ut}=E;if(qe>0&&($.minimumIntegerDigits=qe),Number(et)>0){let It=$.notation==="engineering"||$.notation==="scientific";et===3&&It?$.notation="engineering":_e()}}switch(C){case"sign-auto":$.signDisplay="auto";break;case"sign-always":$.signDisplay="always";break;case"sign-except-zero":$.signDisplay="exceptZero";break;case"sign-never":$.signDisplay="never";break;case"sign-accounting":$.currencySign="accounting";break;case"sign-accounting-always":$.currencySign="accounting",$.signDisplay="always";break;case"sign-accounting-except-zero":$.currencySign="accounting",$.signDisplay="exceptZero";break}return $}function Je(c,f,g){let v=c[f];switch(v){case"%":return{char:"%",style:"percent",width:1};case"‰":return{char:"%",style:"permille",width:1};case"¤":{let E=1;for(;c[++f]==="¤";)++E;switch(E){case 1:return{char:v,currency:"default",width:E};case 2:return{char:v,currency:"iso-code",width:E};case 3:return{char:v,currency:"full-name",width:E};case 5:return{char:v,currency:"narrow",width:E};default:{let _=`Invalid number (${E}) of ¤ chars in pattern`;return g(new R("¤",_)),null}}}case"*":{let E=c[f+1];if(E)return{char:v,pad:E,width:2};break}case"+":case"-":return{char:v,width:1};case"'":{let E=c[++f],_=2;if(E==="'")return{char:v,str:E,width:_};for(;;){let k=c[++f];if(++_,k===void 0){let I=`Unterminated quoted literal in pattern: ${E}`;return g(new R("'",I)),{char:v,str:E,width:_}}else if(k==="'"){if(c[++f]!=="'")return{char:v,str:E,width:_};++_}E+=k}}}return null}let pn=c=>c>="0"&&c<="9";function We(c,f){let g=c[f];if(pn(g)){let v=g;for(;;){let E=c[++f];if(pn(E))v+=E;else return{char:"0",digits:v,width:v.length}}}switch(g){case"#":{let v=1;for(;c[++f]==="#";)++v;return{char:g,width:v}}case"@":{let v=1;for(;c[++f]==="@";)++v;let E=v;for(f-=1;c[++f]==="#";)++E;return{char:g,min:v,width:E}}case"E":{let v=c[f+1]==="+";v&&++f;let E=0;for(;c[++f]==="0";)++E;let _=(v?2:1)+E;if(E)return{char:g,expDigits:E,plus:v,width:_};break}case".":case",":return{char:g,width:1}}return null}function St(c,f,g){let v;(function(L){L[L.Prefix=0]="Prefix",L[L.Number=1]="Number",L[L.Suffix=2]="Suffix"})(v||(v={}));let E=[],_=[],k=[],I=v.Prefix,C="";for(;f<c.length;){let L=c[f];if(L===";"){f+=1;break}switch(I){case v.Prefix:{let Q=Je(c,f,g);if(Q)C&&(E.push({char:"'",str:C,width:C.length}),C=""),E.push(Q),f+=Q.width;else{let le=We(c,f);le?(C&&(E.push({char:"'",str:C,width:C.length}),C=""),I=v.Number,_.push(le),f+=le.width):(C+=L,f+=1)}break}case v.Number:{let Q=We(c,f);Q?(_.push(Q),f+=Q.width):I=v.Suffix;break}case v.Suffix:{let Q=Je(c,f,g);Q?(C&&(k.push({char:"'",str:C,width:C.length}),C=""),k.push(Q),f+=Q.width):(C+=L,f+=1);break}}}return C&&k.push({char:"'",str:C,width:C.length}),{pattern:{prefix:E,number:_,suffix:k},pos:f}}function lt(c,f){let{pattern:g,pos:v}=St(c,0,f);if(v<c.length){let{pattern:E}=St(c,v,f);return{tokens:g,negative:E}}return{tokens:g}}function Nn(c,f){let g={},v=!1,E=!1,_=0,k="",I=-1,C="",L=0;for(let le=0;le<c.length;++le){let _e=c[le];switch(_e.char){case"#":{if(I===-1){if(k){let $="Pattern has # after integer digits";f(new R("#",$))}_+=_e.width}else L+=_e.width;break}case"0":{if(I===-1)k+=_e.digits;else{if(L){let $="Pattern has digits after # in fraction";f(new R("0",$))}C+=_e.digits}break}case"@":{g.precision&&f(new H("precision",g.precision)),g.precision={style:"precision-fraction",minSignificant:_e.min,maxSignificant:_e.width};break}case",":v=!0;break;case".":if(I===1){let $="Pattern has more than one decimal separator";f(new R(".",$))}I=le;break;case"E":{if(E&&f(new H("exponent",g.notation)),v){let $="Exponential patterns may not contain grouping separators";f(new R("E",$))}g.notation={style:"scientific"},_e.expDigits>1&&(g.notation.expDigits=_e.expDigits),_e.plus&&(g.notation.expSign="sign-always"),E=!0}}}v?g.group="group-auto":_+k.length>3&&(g.group="group-off");let Q=+`${k||"0"}.${C}`;if(Q&&(g.precision={style:"precision-increment",increment:Q}),!E)k.length>1&&(g.integerWidth={min:k.length}),!g.precision&&(C.length||L)&&(g.precision={style:"precision-fraction",minFraction:C.length,maxFraction:C.length+L});else if((!g.precision||Q)&&(g.integerWidth=_?{min:1,max:_+k.length}:{min:Math.max(1,k.length)}),g.precision)Q||(g.integerWidth={min:1,max:1});else{let le=k.length+C.length;I===-1?le>0&&(g.precision={style:"precision-fraction",maxSignificant:le}):(g.precision={style:"precision-fraction",maxSignificant:Math.max(1,le)+L},le>1&&(g.precision.minSignificant=le))}return g}function da(c,f,g,v,E){let _=!1,k="";for(let I of c)switch(I.char){case"%":f.unit={style:I.style},E?_=!0:k="";break;case"¤":if(!g){let C="The ¤ pattern requires a currency";v(new R("¤",C));break}switch(f.unit={style:"currency",currency:g},I.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:k="";break;case"*":break;case"+":_||(k+="+");break;case"'":_||(k+=I.str);break}return k}function eo(c,f){let g=!1,v="";for(let E of c)switch(E.char){case"%":case"¤":f?g=!0:v="";break;case"-":g||(v+="-");break;case"'":g||(v+=E.str);break}return v}function to(c,f){let g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:C=>{throw C},{tokens:v,negative:E}=lt(c,g),_=Nn(v.number,g),k=da(v.prefix,_,f,g,!0),I=da(v.suffix,_,f,g,!1);if(E){let C=eo(E.prefix,!0),L=eo(E.suffix,!1);_.affix={pos:[k,I],neg:[C,L]},_.sign="sign-never"}else(k||I)&&(_.affix={pos:[k,I]});return _}function kq(c){return["arab","arabext","bali","beng","deva","fullwide","gujr","guru","hanidec","khmr","knda","laoo","latn","limb","mlym","mong","mymr","orya","tamldec","telu","thai","tibt"].indexOf(c)!==-1}function Rd(c){let f=["acceleration","angle","area","concentr","consumption","digital","duration","electric","energy","force","frequency","graphics","length","light","mass","power","pressure","speed","temperature","torque","volume"],[g]=c.split("-",1);return f.indexOf(g)!==-1}let Ad={"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},Ld={currency:1,"integer-width":1,"measure-unit":1,"numbering-system":1,"per-measure-unit":1,"precision-increment":1,scale:1};function Iq(c){return c in Ad}function Nq(c){return c in Ld}function Dq(c,f,g){if(Iq(c)){let v=Ad[c];if(f.length>v){if(v===0)for(let E of f)g(new yt(c,E));else g(new F(c,f,v));return!1}else if(Nq(c)&&f.length<Ld[c])return g(new fe(c)),!1}return!0}function ul(c,f){let g=f==="fraction"?/^\.(0*)(\+|#*)$/:/^(@+)(\+|#*)$/,v=c&&c.match(g);if(v){let E=v[1].length;switch(v[2].charAt(0)){case"":return{min:E,max:E};case"+":return{min:E,max:null};case"#":return{min:E,max:E+v[2].length}}}return null}function Cq(c,f,g){let v=ul(c,"fraction");if(v){f.length>1&&g(new F(c,f,1));let _={style:"precision-fraction",source:c,minFraction:v.min};v.max!=null&&(_.maxFraction=v.max);let k=f[0],I=ul(k,"significant");return I?(_.source=`${c}/${k}`,_.minSignificant=I.min,I.max!=null&&(_.maxSignificant=I.max)):k&&g(new yt(c,k)),_}let E=ul(c,"significant");if(E){for(let k of f)g(new yt(c,k));let _={style:"precision-fraction",source:c,minSignificant:E.min};return E.max!=null&&(_.maxSignificant=E.max),_}return null}class Tq{constructor(f){this.skeleton={},this.onError=f}badOption(f,g){this.onError(new yt(f,g))}assertEmpty(f){let g=this.skeleton[f];g&&this.onError(new H(f,g))}parseToken(f,g){if(!Dq(f,g,this.onError))return;let v=g[0],E=this.skeleton;switch(f){case"compact-short":case"compact-long":case"notation-simple":this.assertEmpty("notation"),E.notation={style:f};break;case"scientific":case"engineering":{let _=null,k;for(let C of g)switch(C){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":k=C;break;default:/^\+e+$/.test(C)?_=C.length-1:this.badOption(f,C)}this.assertEmpty("notation");let I=g.join("/");E.notation=_&&k?{style:f,source:I,expDigits:_,expSign:k}:_?{style:f,source:I,expDigits:_}:k?{style:f,source:I,expSign:k}:{style:f,source:I};break}case"percent":case"permille":case"base-unit":this.assertEmpty("unit"),E.unit={style:f};break;case"currency":/^[A-Z]{3}$/.test(v)?(this.assertEmpty("unit"),E.unit={style:f,currency:v}):this.badOption(f,v);break;case"measure-unit":{Rd(v)?(this.assertEmpty("unit"),E.unit={style:f,unit:v}):this.badOption(f,v);break}case"per-measure-unit":{Rd(v)?(this.assertEmpty("unitPer"),E.unitPer=v):this.badOption(f,v);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"),E.unitWidth=f;break;case"precision-integer":case"precision-unlimited":case"precision-currency-cash":this.assertEmpty("precision"),E.precision={style:f};break;case"precision-currency-standard":this.assertEmpty("precision"),v==="w"?E.precision={style:f,trailingZero:"stripIfInteger"}:E.precision={style:f};break;case"precision-increment":{let _=Number(v);_>0?(this.assertEmpty("precision"),E.precision={style:f,increment:_}):this.badOption(f,v);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"),E.roundingMode=f;break;case"integer-width":{if(/^\+0*$/.test(v))this.assertEmpty("integerWidth"),E.integerWidth={source:v,min:v.length-1};else{let _=v.match(/^#*(0*)$/);_?(this.assertEmpty("integerWidth"),E.integerWidth={source:v,min:_[1].length,max:_[0].length}):this.badOption(f,v)}break}case"scale":{let _=Number(v);_>0?(this.assertEmpty("scale"),E.scale=_):this.badOption(f,v);break}case"group-off":case"group-min2":case"group-auto":case"group-on-aligned":case"group-thousands":this.assertEmpty("group"),E.group=f;break;case"latin":this.assertEmpty("numberingSystem"),E.numberingSystem="latn";break;case"numbering-system":{kq(v)?(this.assertEmpty("numberingSystem"),E.numberingSystem=v):this.badOption(f,v);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"),E.sign=f;break;case"decimal-auto":case"decimal-always":this.assertEmpty("decimal"),E.decimal=f;break;default:{let _=Cq(f,g,this.onError);_?(this.assertEmpty("precision"),E.precision=_):this.onError(new Y(f))}}}}function Fd(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:E=>{throw E},g=[];for(let E of c.split(" "))if(E){let _=E.split("/"),k=_.shift()||"";g.push({stem:k,options:_})}let v=new Tq(f);for(let{stem:E,options:_}of g)v.parseToken(E,_);return v.skeleton}function Mq(c,f,g,v){typeof f=="string"&&(f=f.indexOf("::")===0?Fd(f.slice(2),v):to(f,g,v));let E=q(c,f),_=Re(f),k=_t(f),I=new Intl.NumberFormat(E,_);if(f.affix){let[C,L]=f.affix.pos,[Q,le]=f.affix.neg||["",""];return _e=>{let $=I.format(k(_e));return _e<0?`${Q}${$}${le}`:`${C}${$}${L}`}}return C=>I.format(k(C))}function Pq(c,f,g,v){typeof f=="string"&&(f=f.indexOf("::")===0?Fd(f.slice(2),v):to(f,g,v));let E=q(c,f),_=Re(f),k=Te(f),I=["(function() {",`var opt = ${JSON.stringify(_)};`,`var nf = new Intl.NumberFormat(${JSON.stringify(E)}, opt);`],C="nf.format(value)";if(k&&(I.push(`var mod = ${k};`),C="nf.format(mod(value))"),f.affix){let[L,Q]=f.affix.pos.map(le=>JSON.stringify(le));if(f.affix.neg){let[le,_e]=f.affix.neg.map($=>JSON.stringify($));C=`value < 0 ? ${le} + ${C} + ${_e} : ${L} + ${C} + ${Q}`}else C=`${L} + ${C} + ${Q}`}return I.push(`return function(value) { return ${C}; }`),I.join(`
`)+`
})()`}var cl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Oq(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var $r={},jd={},Vd={exports:{}};(function(c){(function(f,g){c.exports?c.exports=g():f.moo=g()})(cl,function(){var f=Object.prototype.hasOwnProperty,g=Object.prototype.toString,v=typeof new RegExp().sticky=="boolean";function E(T){return T&&g.call(T)==="[object RegExp]"}function _(T){return T&&typeof T=="object"&&!E(T)&&!Array.isArray(T)}function k(T){return T.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function I(T){var B=new RegExp("|"+T);return B.exec("").length-1}function C(T){return"("+T+")"}function L(T){if(!T.length)return"(?!)";var B=T.map(function(J){return"(?:"+J+")"}).join("|");return"(?:"+B+")"}function Q(T){if(typeof T=="string")return"(?:"+k(T)+")";if(E(T)){if(T.ignoreCase)throw new Error("RegExp /i flag not allowed");if(T.global)throw new Error("RegExp /g flag is implied");if(T.sticky)throw new Error("RegExp /y flag is implied");if(T.multiline)throw new Error("RegExp /m flag is implied");return T.source}else throw new Error("Not a pattern: "+T)}function le(T,B){return T.length>B?T:Array(B-T.length+1).join(" ")+T}function _e(T,B){for(var J=T.length,X=0;;){var me=T.lastIndexOf(`
`,J-1);if(me===-1||(X++,J=me,X===B)||J===0)break}var se=X<B?0:J+1;return T.substring(se).split(`
`)}function $(T){for(var B=Object.getOwnPropertyNames(T),J=[],X=0;X<B.length;X++){var me=B[X],se=T[me],Me=[].concat(se);if(me==="include"){for(var Ke=0;Ke<Me.length;Ke++)J.push({include:Me[Ke]});continue}var Ve=[];Me.forEach(function(pe){_(pe)?(Ve.length&&J.push(et(me,Ve)),J.push(et(me,pe)),Ve=[]):Ve.push(pe)}),Ve.length&&J.push(et(me,Ve))}return J}function qe(T){for(var B=[],J=0;J<T.length;J++){var X=T[J];if(X.include){for(var me=[].concat(X.include),se=0;se<me.length;se++)B.push({include:me[se]});continue}if(!X.type)throw new Error("Rule has no type: "+JSON.stringify(X));B.push(et(X.type,X))}return B}function et(T,B){if(_(B)||(B={match:B}),B.include)throw new Error("Matching rules cannot also include states");var J={defaultType:T,lineBreaks:!!B.error||!!B.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var X in B)f.call(B,X)&&(J[X]=B[X]);if(typeof J.type=="string"&&T!==J.type)throw new Error("Type transform cannot be a string (type '"+J.type+"' for token '"+T+"')");var me=J.match;return J.match=Array.isArray(me)?me:me?[me]:[],J.match.sort(function(se,Me){return E(se)&&E(Me)?0:E(Me)?-1:E(se)?1:Me.length-se.length}),J}function ut(T){return Array.isArray(T)?qe(T):$(T)}var It=et("error",{lineBreaks:!0,shouldThrow:!0});function hn(T,B){for(var J=null,X=Object.create(null),me=!0,se=null,Me=[],Ke=[],Ve=0;Ve<T.length;Ve++)T[Ve].fallback&&(me=!1);for(var Ve=0;Ve<T.length;Ve++){var pe=T[Ve];if(pe.include)throw new Error("Inheritance is not allowed in stateless lexers");if(pe.error||pe.fallback){if(J)throw!pe.fallback==!J.fallback?new Error("Multiple "+(pe.fallback?"fallback":"error")+" rules not allowed (for token '"+pe.defaultType+"')"):new Error("fallback and error are mutually exclusive (for token '"+pe.defaultType+"')");J=pe}var it=pe.match.slice();if(me)for(;it.length&&typeof it[0]=="string"&&it[0].length===1;){var ar=it.shift();X[ar.charCodeAt(0)]=pe}if(pe.pop||pe.push||pe.next){if(!B)throw new Error("State-switching options are not allowed in stateless lexers (for token '"+pe.defaultType+"')");if(pe.fallback)throw new Error("State-switching options are not allowed on fallback tokens (for token '"+pe.defaultType+"')")}if(it.length!==0){me=!1,Me.push(pe);for(var Tn=0;Tn<it.length;Tn++){var Ta=it[Tn];if(E(Ta)){if(se===null)se=Ta.unicode;else if(se!==Ta.unicode&&pe.fallback===!1)throw new Error("If one rule is /u then all must be")}}var rr=L(it.map(Q)),mn=new RegExp(rr);if(mn.test(""))throw new Error("RegExp matches empty string: "+mn);var Zr=I(rr);if(Zr>0)throw new Error("RegExp has capture groups: "+mn+`
Use (?: … ) instead`);if(!pe.lineBreaks&&mn.test(`
`))throw new Error("Rule should declare lineBreaks: "+mn);Ke.push(C(rr))}}var ir=J&&J.fallback,Kr=v&&!ir?"ym":"gm",lo=v||ir?"":"|";se===!0&&(Kr+="u");var p$=new RegExp(L(Ke)+lo,Kr);return{regexp:p$,groups:Me,fast:X,error:J||It}}function ha(T){var B=hn(ut(T));return new Xe({start:B},"start")}function Hn(T,B,J){var X=T&&(T.push||T.next);if(X&&!J[X])throw new Error("Missing state '"+X+"' (in token '"+T.defaultType+"' of state '"+B+"')");if(T&&T.pop&&+T.pop!=1)throw new Error("pop must be 1 (in token '"+T.defaultType+"' of state '"+B+"')")}function Un(T,B){var J=T.$all?ut(T.$all):[];delete T.$all;var X=Object.getOwnPropertyNames(T);B||(B=X[0]);for(var me=Object.create(null),se=0;se<X.length;se++){var Me=X[se];me[Me]=ut(T[Me]).concat(J)}for(var se=0;se<X.length;se++)for(var Me=X[se],Ke=me[Me],Ve=Object.create(null),pe=0;pe<Ke.length;pe++){var it=Ke[pe];if(it.include){var ar=[pe,1];if(it.include!==Me&&!Ve[it.include]){Ve[it.include]=!0;var Tn=me[it.include];if(!Tn)throw new Error("Cannot include nonexistent state '"+it.include+"' (in state '"+Me+"')");for(var Ta=0;Ta<Tn.length;Ta++){var rr=Tn[Ta];Ke.indexOf(rr)===-1&&ar.push(rr)}}Ke.splice.apply(Ke,ar),pe--}}for(var mn=Object.create(null),se=0;se<X.length;se++){var Me=X[se];mn[Me]=hn(me[Me],!0)}for(var se=0;se<X.length;se++){for(var Zr=X[se],ir=mn[Zr],Kr=ir.groups,pe=0;pe<Kr.length;pe++)Hn(Kr[pe],Zr,mn);for(var lo=Object.getOwnPropertyNames(ir.fast),pe=0;pe<lo.length;pe++)Hn(ir.fast[lo[pe]],Zr,mn)}return new Xe(mn,B)}function Gn(T){for(var B=typeof Map<"u",J=B?new Map:Object.create(null),X=Object.getOwnPropertyNames(T),me=0;me<X.length;me++){var se=X[me],Me=T[se],Ke=Array.isArray(Me)?Me:[Me];Ke.forEach(function(Ve){if(typeof Ve!="string")throw new Error("keyword must be string (in keyword '"+se+"')");B?J.set(Ve,se):J[Ve]=se})}return function(Ve){return B?J.get(Ve):J[Ve]}}var Xe=function(T,B){this.startState=B,this.states=T,this.buffer="",this.stack=[],this.reset()};Xe.prototype.reset=function(T,B){return this.buffer=T||"",this.index=0,this.line=B?B.line:1,this.col=B?B.col:1,this.queuedToken=B?B.queuedToken:null,this.queuedText=B?B.queuedText:"",this.queuedThrow=B?B.queuedThrow:null,this.setState(B?B.state:this.startState),this.stack=B&&B.stack?B.stack.slice():[],this},Xe.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}},Xe.prototype.setState=function(T){if(!(!T||this.state===T)){this.state=T;var B=this.states[T];this.groups=B.groups,this.error=B.error,this.re=B.regexp,this.fast=B.fast}},Xe.prototype.popState=function(){this.setState(this.stack.pop())},Xe.prototype.pushState=function(T){this.stack.push(this.state),this.setState(T)};var oo=v?function(T,B){return T.exec(B)}:function(T,B){var J=T.exec(B);return J[0].length===0?null:J};Xe.prototype._getGroup=function(T){for(var B=this.groups.length,J=0;J<B;J++)if(T[J+1]!==void 0)return this.groups[J];throw new Error("Cannot find token type for matched text")};function so(){return this.value}if(Xe.prototype.next=function(){var T=this.index;if(this.queuedGroup){var B=this._token(this.queuedGroup,this.queuedText,T);return this.queuedGroup=null,this.queuedText="",B}var J=this.buffer;if(T!==J.length){var Me=this.fast[J.charCodeAt(T)];if(Me)return this._token(Me,J.charAt(T),T);var X=this.re;X.lastIndex=T;var me=oo(X,J),se=this.error;if(me==null)return this._token(se,J.slice(T,J.length),T);var Me=this._getGroup(me),Ke=me[0];return se.fallback&&me.index!==T?(this.queuedGroup=Me,this.queuedText=Ke,this._token(se,J.slice(T,me.index),T)):this._token(Me,Ke,T)}},Xe.prototype._token=function(T,B,J){var X=0;if(T.lineBreaks){var me=/\n/g,se=1;if(B===`
`)X=1;else for(;me.exec(B);)X++,se=me.lastIndex}var Me={type:typeof T.type=="function"&&T.type(B)||T.defaultType,value:typeof T.value=="function"?T.value(B):B,text:B,toString:so,offset:J,lineBreaks:X,line:this.line,col:this.col},Ke=B.length;if(this.index+=Ke,this.line+=X,X!==0?this.col=Ke-se+1:this.col+=Ke,T.shouldThrow){var Ve=new Error(this.formatError(Me,"invalid syntax"));throw Ve}return T.pop?this.popState():T.push?this.pushState(T.push):T.next&&this.setState(T.next),Me},typeof Symbol<"u"&&Symbol.iterator){var Wn=function(T){this.lexer=T};Wn.prototype.next=function(){var T=this.lexer.next();return{value:T,done:!T}},Wn.prototype[Symbol.iterator]=function(){return this},Xe.prototype[Symbol.iterator]=function(){return new Wn(this)}}return Xe.prototype.formatError=function(X,B){if(X==null)var J=this.buffer.slice(this.index),X={text:J,offset:this.index,lineBreaks:J.indexOf(`
`)===-1?0:1,line:this.line,col:this.col};var me=2,se=Math.max(X.line-me,1),Me=X.line+me,Ke=String(Me).length,Ve=_e(this.buffer,this.line-X.line+me+1).slice(0,5),pe=[];pe.push(B+" at line "+X.line+" col "+X.col+":"),pe.push("");for(var it=0;it<Ve.length;it++){var ar=Ve[it],Tn=se+it;pe.push(le(String(Tn),Ke)+" "+ar),Tn===X.line&&pe.push(le("",Ke+X.col+1)+"^")}return pe.join(`
`)},Xe.prototype.clone=function(){return new Xe(this.states,this.state)},Xe.prototype.has=function(T){return!0},{compile:ha,states:Un,error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:Gn}})})(Vd);var Rq=Vd.exports;(function(c){var f=cl&&cl.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(c,"__esModule",{value:!0}),c.lexer=c.states=void 0;let g=f(Rq);c.states={body:{doubleapos:{match:"''",value:()=>"'"},quoted:{lineBreaks:!0,match:/'[{}#](?:[^]*?[^'])?'(?!')/u,value:v=>v.slice(1,-1).replace(/''/g,"'")},argument:{lineBreaks:!0,match:/\{\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,push:"arg",value:v=>v.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:v=>v.split(",")[1].trim()},"func-args":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*,/u,next:"body",value:v=>v.split(",")[1].trim()},"func-simple":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,value:v=>v.substring(1).trim()},end:{match:"}",pop:1}},select:{offset:{lineBreaks:!0,match:/\s*offset\s*:\s*\d+\s*/u,value:v=>v.split(":")[1].trim()},case:{lineBreaks:!0,match:/\s*(?:=\d+|[^\p{Pat_Syn}\p{Pat_WS}]+)\s*\{/u,push:"body",value:v=>v.substring(0,v.indexOf("{")).trim()},end:{match:/\s*\}/u,pop:1}}},c.lexer=g.default.states(c.states)})(jd),Object.defineProperty($r,"__esModule",{value:!0});var zd=$r.parse=$r.ParseError=void 0;let Bd=jd,no=c=>({offset:c.offset,line:c.line,col:c.col,text:c.text,lineBreaks:c.lineBreaks}),dl=c=>c==="plural"||c==="select"||c==="selectordinal";function Aq(c,f){let g="",v="";for(let E of f){let _=E.ctx.text;switch(v+=_,E.type){case"content":g+=E.value;break;case"argument":case"function":case"octothorpe":g+=_;break;default:throw new ht(c,`Unsupported part in strict mode function arg style: ${_}`)}}return[{type:"content",value:g.trim(),ctx:Object.assign({},f[0].ctx,{text:v})}]}let Lq=["number","date","time","spellout","ordinal","duration"],Hd=["zero","one","two","few","many","other"];class ht extends Error{constructor(f,g){super(Bd.lexer.formatError(f,g))}}$r.ParseError=ht;class Fq{constructor(f,g){var v,E,_,k;this.lexer=Bd.lexer.reset(f),this.cardinalKeys=(v=g==null?void 0:g.cardinal)!==null&&v!==void 0?v:Hd,this.ordinalKeys=(E=g==null?void 0:g.ordinal)!==null&&E!==void 0?E:Hd,this.strict=(_=g==null?void 0:g.strict)!==null&&_!==void 0?_:!1,this.strictPluralKeys=(k=g==null?void 0:g.strictPluralKeys)!==null&&k!==void 0?k:!0}parse(){return this.parseBody(!1,!0)}checkSelectKey(f,g,v){if(v[0]==="="){if(g==="select")throw new ht(f,`The case ${v} is not valid with select`)}else if(g!=="select"){let E=g==="plural"?this.cardinalKeys:this.ordinalKeys;if(this.strictPluralKeys&&E.length>0&&!E.includes(v)){let _=`The ${g} case ${v} is not valid in this locale`;throw new ht(f,_)}}}parseSelect(f,g,v,E){let{value:_}=f,k={type:E,arg:_,cases:[],ctx:v};E==="plural"||E==="selectordinal"?g=!0:this.strict&&(g=!1);for(let I of this.lexer)switch(I.type){case"offset":if(E==="select")throw new ht(I,"Unexpected plural offset for select");if(k.cases.length>0)throw new ht(I,"Plural offset must be set before cases");k.pluralOffset=Number(I.value),v.text+=I.text,v.lineBreaks+=I.lineBreaks;break;case"case":{this.checkSelectKey(I,E,I.value),k.cases.push({key:I.value,tokens:this.parseBody(g),ctx:no(I)});break}case"end":return k;default:throw new ht(I,`Unexpected lexer token: ${I.type}`)}throw new ht(null,"Unexpected message end")}parseArgToken(f,g){let v=no(f),E=this.lexer.next();if(!E)throw new ht(null,"Unexpected message end");if(v.text+=E.text,v.lineBreaks+=E.lineBreaks,this.strict&&(E.type==="func-simple"||E.type==="func-args")&&!Lq.includes(E.value)){let _=`Invalid strict mode function arg type: ${E.value}`;throw new ht(f,_)}switch(E.type){case"end":return{type:"argument",arg:f.value,ctx:v};case"func-simple":{let _=this.lexer.next();if(!_)throw new ht(null,"Unexpected message end");if(_.type!=="end")throw new ht(_,`Unexpected lexer token: ${_.type}`);if(v.text+=_.text,dl(E.value.toLowerCase()))throw new ht(E,`Invalid type identifier: ${E.value}`);return{type:"function",arg:f.value,key:E.value,ctx:v}}case"func-args":{if(dl(E.value.toLowerCase())){let k=`Invalid type identifier: ${E.value}`;throw new ht(E,k)}let _=this.parseBody(this.strict?!1:g);return this.strict&&_.length>0&&(_=Aq(f,_)),{type:"function",arg:f.value,key:E.value,param:_,ctx:v}}case"select":if(dl(E.value))return this.parseSelect(f,g,v,E.value);throw new ht(E,`Unexpected select type ${E.value}`);default:throw new ht(E,`Unexpected lexer token: ${E.type}`)}}parseBody(f,g){let v=[],E=null;for(let _ of this.lexer)if(_.type==="argument")E&&(E=null),v.push(this.parseArgToken(_,f));else if(_.type==="octothorpe"&&f)E&&(E=null),v.push({type:"octothorpe",ctx:no(_)});else{if(_.type==="end"&&!g)return v;{let k=_.value;if(!f&&_.type==="quoted"&&k[0]==="#"){if(k.includes("{")){let I=`Unsupported escape pattern: ${k}`;throw new ht(_,I)}k=_.text}E?(E.value+=k,E.ctx.text+=_.text,E.ctx.lineBreaks+=_.lineBreaks):(E={type:"content",value:k,ctx:no(_)},v.push(E))}}if(g)return v;throw new ht(null,"Unexpected message end")}}function jq(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Fq(c,f).parse()}zd=$r.parse=jq;function Yr(c){return Yr[c]||(Yr[c]=new Intl.NumberFormat(c))}function Vq(c,f,g){return Yr(c).format(f-g)}function zq(c,f,g,v){var E=f-g;if(isNaN(E))throw new Error("`"+v+"` or its offset is not a number");return Yr(c).format(E)}function Bq(c,f,g,v,E){if({}.hasOwnProperty.call(v,c))return v[c];f&&(c-=f);var _=g(c,E);return _ in v?v[_]:v.other}function Hq(c,f){return{}.hasOwnProperty.call(f,c)?f[c]:f.other}function Uq(c,f){for(var g=0;g<c.length;++g)if(!f||f[c[g]]===void 0)throw new Error("Message requires argument '".concat(c[g],"'"))}var Gq=Object.freeze({__proto__:null,_nf:Yr,number:Vq,plural:Bq,reqArgs:Uq,select:Hq,strictNumber:zq});function Wq(c,f,g){var v={day:"numeric",month:"short",year:"numeric"};switch(g){case"full":v.weekday="long";case"long":v.month="long";break;case"short":v.month="numeric"}return new Date(c).toLocaleDateString(f,v)}function qq(c){if(typeof c!="number"&&(c=Number(c)),!isFinite(c))return String(c);var f="";c<0?(f="-",c=Math.abs(c)):c=Number(c);var g=c%60,v=[Math.round(g)===g?g:g.toFixed(3)];c<60?v.unshift(0):(c=Math.round((c-Number(v[0]))/60),v.unshift(c%60),c>=60&&(c=Math.round((c-Number(v[0]))/60),v.unshift(c)));var E=v.shift();return f+E+":"+v.map(function(_){return Number(_)<10?"0"+String(_):String(_)}).join(":")}var pl={};function ao(c,f){var g=String(c)+JSON.stringify(f);return pl[g]||(pl[g]=new Intl.NumberFormat(c,f)),pl[g]}function $q(c,f,g,v){var E=g&&g.split(":")||[],_=E[0],k=E[1],I={integer:{maximumFractionDigits:0},percent:{style:"percent"},currency:{style:"currency",currency:k&&k.trim()||v,minimumFractionDigits:2,maximumFractionDigits:2}};return ao(f,I[_]||{}).format(c)}var Yq=function(c,f,g){return ao(f,{style:"currency",currency:g,minimumFractionDigits:2,maximumFractionDigits:2}).format(c)},Zq=function(c,f){return ao(f,{maximumFractionDigits:0}).format(c)},Kq=function(c,f){return ao(f,{style:"percent"}).format(c)};function Jq(c,f,g){var v={second:"numeric",minute:"numeric",hour:"numeric"};switch(g){case"full":case"long":v.timeZoneName="short";break;case"short":delete v.second}return new Date(c).toLocaleTimeString(f,v)}var hl=Object.freeze({__proto__:null,date:Wq,duration:qq,numberCurrency:Yq,numberFmt:$q,numberInteger:Zq,numberPercent:Kq,time:Jq}),Qq={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}},ml=Oq(Qq);function Xq(c){let f=0;for(let g=0;g<c.length;++g){let v=c.charCodeAt(g);f=(f<<5)-f+v,f|=0}return f}function pa(c,f){f&&(c+=" "+Xq(c).toString(36));let g=c.trim().replace(/\W+/g,"_");return ml.ES3[g]||ml.ESnext[g]||/^\d/.test(g)?"_"+g:g}function fl(c,f){if(/^[A-Z_$][0-9A-Z_$]*$/i.test(f)&&!ml.ES3[f])return c?c+"."+f:f;{let g=JSON.stringify(f);return c?c+"["+g+"]":g}}var e$=["ar","ckb","fa","he","ks($|[^bfh])","lrc","mzn","pa-Arab","ps","ug","ur","uz-Arab","yi"],t$=new RegExp("^"+e$.join("|^"));function n$(c,f){var g=t$.test(f),v=JSON.stringify(g?"":"");return"".concat(v," + ").concat(c," + ").concat(v)}var a$="@messageformat/runtime",r$="@messageformat/runtime/lib/cardinals",Ud="@messageformat/runtime/lib/plurals",i$="@messageformat/runtime/lib/formatters",o$=function(){function c(f){this.arguments=[],this.runtime={},this.options=f}return c.prototype.compile=function(f,g,v){var E,_,k=this,I=this.options,C=I.localeCodeFromKey,L=I.requireAllArguments,Q=I.strict,le=I.strictPluralKeys;if(typeof f=="object"){var _e={};try{for(var $=n(Object.keys(f)),qe=$.next();!qe.done;qe=$.next()){var et=qe.value,ut=C?C(et):et,It=v&&ut&&v[ut]||g;_e[et]=this.compile(f[et],It,v)}}catch(Xe){E={error:Xe}}finally{try{qe&&!qe.done&&(_=$.return)&&_.call($)}finally{if(E)throw E.error}}return _e}this.plural=g;var hn={cardinal:g.cardinals,ordinal:g.ordinals,strict:Q,strictPluralKeys:le};this.arguments=[];var ha=zd(f,hn).map(function(Xe){return k.token(Xe,null)}),Hn=this.arguments.length>0,Un=this.concatenate(ha,!0);if(L&&Hn){this.setRuntimeFn("reqArgs");var Gn=JSON.stringify(this.arguments);return"(d) => { reqArgs(".concat(Gn,", d); return ").concat(Un,"; }")}return"(".concat(Hn?"d":"",") => ").concat(Un)},c.prototype.cases=function(f,g){var v=this,E=!0,_=f.cases.map(function(Q){var le=Q.key,_e=Q.tokens;le==="other"&&(E=!1);var $=_e.map(function(qe){return v.token(qe,g)});return"".concat(fl(null,le.replace(/^=/,"")),": ").concat(v.concatenate($,!1))});if(E){var k=f.type,I=this.plural,C=I.cardinals,L=I.ordinals;if(k==="select"||k==="plural"&&C.includes("other")||k==="selectordinal"&&L.includes("other"))throw new Error("No 'other' form found in ".concat(JSON.stringify(f)))}return"{ ".concat(_.join(", ")," }")},c.prototype.concatenate=function(f,g){var v=this.options.returnType==="values";return v&&(g||f.length>1)?"["+f.join(", ")+"]":f.join(" + ")||'""'},c.prototype.token=function(f,g){if(f.type==="content")return JSON.stringify(f.value);var v=this.plural,E=v.id,_=v.lc,k,I;switch("arg"in f?(this.arguments.push(f.arg),k=[fl("d",f.arg)]):k=[],f.type){case"argument":return this.options.biDiSupport?n$(String(k[0]),_):String(k[0]);case"select":I="select",g&&this.options.strict&&(g=null),k.push(this.cases(f,g)),this.setRuntimeFn("select");break;case"selectordinal":I="plural",k.push(f.pluralOffset||0,E,this.cases(f,f),1),this.setLocale(E,!0),this.setRuntimeFn("plural");break;case"plural":I="plural",k.push(f.pluralOffset||0,E,this.cases(f,f)),this.setLocale(E,!1),this.setRuntimeFn("plural");break;case"function":{var C=this.options.customFormatters[f.key],L=C&&"module"in C&&typeof C.module=="function";if(!C){if(f.key==="date"){I=this.setDateFormatter(f,k,g);break}else if(f.key==="number"){I=this.setNumberFormatter(f,k,g);break}}if(k.push(JSON.stringify(this.plural.locale)),f.param){g&&this.options.strict&&(g=null);var Q=this.getFormatterArg(f,g);Q&&k.push(Q)}I=L?pa("".concat(f.key,"__").concat(this.plural.locale)):f.key,this.setFormatter(I,f.key);break}case"octothorpe":if(!g)return'"#"';k=[JSON.stringify(this.plural.locale),fl("d",g.arg),g.pluralOffset||0],this.options.strict?(I="strictNumber",k.push(JSON.stringify(g.arg)),this.setRuntimeFn("strictNumber")):(I="number",this.setRuntimeFn("number"));break}if(!I)throw new Error("Parser error for token "+JSON.stringify(f));return"".concat(I,"(").concat(k.join(", "),")")},c.prototype.runtimeIncludes=function(f,g){if(pa(f)!==f)throw new SyntaxError("Reserved word used as ".concat(g," identifier: ").concat(f));var v=this.runtime[f];if(!v||v.type===g)return v;throw new TypeError("Cannot override ".concat(v.type," runtime function as ").concat(g,": ").concat(f))},c.prototype.setLocale=function(f,g){var v=this.runtimeIncludes(f,"locale"),E=this.plural,_=E.getCardinal,k=E.getPlural,I=E.isDefault,C,L,Q;if(!g&&I&&_){if(v)return;C=function(le){return _(le)},L=r$,Q=function(){return String(_)}}else{if(v&&(!I||v.module===Ud))return;C=function(le,_e){return k(le,_e)},L=I?Ud:k.module||null,Q=function(){return String(k)}}this.runtime[f]=Object.assign(C,{id:f,module:L,toString:Q,type:"locale"})},c.prototype.setRuntimeFn=function(f){this.runtimeIncludes(f,"runtime")||(this.runtime[f]=Object.assign(Gq[f],{id:f,module:a$,type:"runtime"}))},c.prototype.getFormatterArg=function(f,g){var v,E,_,k,I=this,C=f.key,L=f.param,Q=this.options.customFormatters[C]||Gd(C)&&hl[C];if(!Q||!L)return null;var le="arg"in Q&&Q.arg||"string";if(le==="options"){var _e="";try{for(var $=n(L),qe=$.next();!qe.done;qe=$.next()){var et=qe.value;if(et.type==="content")_e+=et.value;else throw new SyntaxError("Expected literal options for ".concat(C," formatter"))}}catch(Wn){v={error:Wn}}finally{try{qe&&!qe.done&&(E=$.return)&&E.call($)}finally{if(v)throw v.error}}var ut={};try{for(var It=n(_e.split(",")),hn=It.next();!hn.done;hn=It.next()){var ha=hn.value,Hn=ha.indexOf(":");if(Hn===-1)ut[ha.trim()]=null;else{var Un=ha.substring(0,Hn).trim(),Gn=ha.substring(Hn+1).trim();if(Gn==="true")ut[Un]=!0;else if(Gn==="false")ut[Un]=!1;else if(Gn==="null")ut[Un]=null;else{var Xe=Number(Gn);ut[Un]=Number.isFinite(Xe)?Xe:Gn}}}}catch(Wn){_={error:Wn}}finally{try{hn&&!hn.done&&(k=It.return)&&k.call(It)}finally{if(_)throw _.error}}return JSON.stringify(ut)}else{var oo=L.map(function(Wn){return I.token(Wn,g)});if(le==="raw")return"[".concat(oo.join(", "),"]");var so=oo.join(" + ");return so?"(".concat(so,").trim()"):'""'}},c.prototype.setFormatter=function(f,g){if(!this.runtimeIncludes(f,"formatter")){var v=this.options.customFormatters[g||f];if(v){var E=typeof v=="function"?{formatter:v}:v;this.runtime[f]=Object.assign(E.formatter.bind({}),a(a({},E.formatter.prototype),{toString:function(){return String(E.formatter)}}),{type:"formatter"},"module"in v&&v.module&&v.id?{id:pa(v.id),module:typeof v.module=="function"?v.module(this.plural.locale):v.module}:{id:null,module:null})}else if(Gd(f))this.runtime[f]=Object.assign(hl[f],{type:"formatter"},{id:f,module:i$});else throw new Error("Formatting function not found: ".concat(f))}},c.prototype.setDateFormatter=function(f,g,v){var E=this,_=f.param,k=this.plural.locale,I=_&&_.length===1&&_[0];if(I&&I.type==="content"&&/^\s*::/.test(I.value)){var C=I.value.trim().substr(2),L=pa("date_".concat(k,"_").concat(C),!0);if(!this.runtimeIncludes(L,"formatter")){var Q=xt(k,C,this.options.timeZone);this.runtime[L]=Object.assign(Q,{id:L,module:null,toString:function(){return vt(k,C,E.options.timeZone)},type:"formatter"})}return L}if(g.push(JSON.stringify(k)),_&&_.length>0){v&&this.options.strict&&(v=null);var le=_.map(function(_e){return E.token(_e,v)});g.push("("+(le.join(" + ")||'""')+").trim()")}return this.setFormatter("date"),"date"},c.prototype.setNumberFormatter=function(f,g,v){var E=this,_=f.param,k=this.plural.locale;if(!_||_.length===0)return g.unshift(JSON.stringify(k)),g.push("0"),this.setRuntimeFn("number"),"number";if(g.push(JSON.stringify(k)),_.length===1&&_[0].type==="content"){var I=_[0].value.trim();switch(I){case"currency":return g.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 C=I.match(/^currency:([A-Z]+)$/);if(C)return g.push(JSON.stringify(C[1])),this.setFormatter("numberCurrency"),"numberCurrency";var L=pa("number_".concat(k,"_").concat(I),!0);if(!this.runtimeIncludes(L,"formatter")){var Q=this.options.currency,le=Mq(k,I,Q);this.runtime[L]=Object.assign(le,{id:null,module:null,toString:function(){return Pq(k,I,Q)},type:"formatter"})}return L}v&&this.options.strict&&(v=null);var _e=_.map(function($){return E.token($,v)});return g.push("("+(_e.join(" + ")||'""')+").trim()"),g.push(JSON.stringify(this.options.currency)),this.setFormatter("numberFmt"),"numberFmt"},c}();function Gd(c){return c in hl}let j=c=>c==1?"one":"other",Fn=c=>c==0||c==1?"one":"other",Dn=c=>c>=0&&c<=1?"one":"other",bt=c=>{let f=String(c).split("."),g=!f[1];return c==1&&g?"one":"other"},Pe=c=>"other",jn=c=>c==1?"one":c==2?"two":"other";var s$=Object.freeze({__proto__:null,af:j,ak:Fn,am:Dn,an:j,ar:c=>{let f=String(c).split("."),g=Number(f[0])==c,v=g&&f[0].slice(-2);return c==0?"zero":c==1?"one":c==2?"two":v>=3&&v<=10?"few":v>=11&&v<=99?"many":"other"},ars:c=>{let f=String(c).split(