quizdown-extended
Version:
Markdown for generating interactive quiz apps in the browser. (With more functions)
15 lines (13 loc) • 300 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).quizdown=t()}(this,(function(){"use strict";function e(){}const t=e=>e;function n(e,t){for(const n in t)e[n]=t[n];return e}function i(e){return e()}function s(){return Object.create(null)}function r(e){e.forEach(i)}function o(e){return"function"==typeof e}function a(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function l(t,...n){if(null==t)return e;const i=t.subscribe(...n);return i.unsubscribe?()=>i.unsubscribe():i}function c(e){let t;return l(e,(e=>t=e))(),t}function u(e,t,n){e.$$.on_destroy.push(l(t,n))}function f(e,t,n,i){if(e){const s=h(e,t,n,i);return e[0](s)}}function h(e,t,i,s){return e[1]&&s?n(i.ctx.slice(),e[1](s(t))):i.ctx}function p(e,t,n,i){if(e[2]&&i){const s=e[2](i(n));if(void 0===t.dirty)return s;if("object"==typeof s){const e=[],n=Math.max(t.dirty.length,s.length);for(let i=0;i<n;i+=1)e[i]=t.dirty[i]|s[i];return e}return t.dirty|s}return t.dirty}function d(e,t,n,i,s,r){if(s){const o=h(t,n,i,r);e.p(o,s)}}function m(e){if(e.ctx.length>32){const t=[],n=e.ctx.length/32;for(let e=0;e<n;e++)t[e]=-1;return t}return-1}function g(e){return null==e?"":e}const y="undefined"!=typeof window;let b=y?()=>window.performance.now():()=>Date.now(),k=y?e=>requestAnimationFrame(e):e;const v=new Set;function w(e){v.forEach((t=>{t.c(e)||(v.delete(t),t.f())})),0!==v.size&&k(w)}function x(e){let t;return 0===v.size&&k(w),{promise:new Promise((n=>{v.add(t={c:e,f:n})})),abort(){v.delete(t)}}}function z(e,t){e.appendChild(t)}function E(e,t,n){const i=_(e);if(!i.getElementById(t)){const e=N("style");e.id=t,e.textContent=n,T(i,e)}}function _(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function T(e,t){z(e.head||e,t)}function $(e,t,n){e.insertBefore(t,n||null)}function S(e){e.parentNode.removeChild(e)}function A(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function N(e){return document.createElement(e)}function O(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function L(e){return document.createTextNode(e)}function I(){return L(" ")}function C(){return L("")}function M(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function R(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function P(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function q(e,t,n,i){e.style.setProperty(t,n,i?"important":"")}let D;function j(){if(void 0===D){D=!1;try{"undefined"!=typeof window&&window.parent&&window.parent.document}catch(e){D=!0}}return D}function U(e,t,n=!1){const i=document.createEvent("CustomEvent");return i.initCustomEvent(e,n,!1,t),i}class K{constructor(){this.e=this.n=null}c(e){this.h(e)}m(e,t,n=null){this.e||(this.e=N(t.nodeName),this.t=t,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let t=0;t<this.n.length;t+=1)$(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(S)}}const B=new Set;let F,X=0;function G(e,t,n,i,s,r,o,a=0){const l=16.666/i;let c="{\n";for(let e=0;e<=1;e+=l){const i=t+(n-t)*r(e);c+=100*e+`%{${o(i,1-i)}}\n`}const u=c+`100% {${o(n,1-n)}}\n}`,f=`__svelte_${function(e){let t=5381,n=e.length;for(;n--;)t=(t<<5)-t^e.charCodeAt(n);return t>>>0}(u)}_${a}`,h=_(e);B.add(h);const p=h.__svelte_stylesheet||(h.__svelte_stylesheet=function(e){const t=N("style");return T(_(e),t),t}(e).sheet),d=h.__svelte_rules||(h.__svelte_rules={});d[f]||(d[f]=!0,p.insertRule(`@keyframes ${f} ${u}`,p.cssRules.length));const m=e.style.animation||"";return e.style.animation=`${m?`${m}, `:""}${f} ${i}ms linear ${s}ms 1 both`,X+=1,f}function V(e,t){const n=(e.style.animation||"").split(", "),i=n.filter(t?e=>e.indexOf(t)<0:e=>-1===e.indexOf("__svelte")),s=n.length-i.length;s&&(e.style.animation=i.join(", "),X-=s,X||k((()=>{X||(B.forEach((e=>{const t=e.__svelte_stylesheet;let n=t.cssRules.length;for(;n--;)t.deleteRule(n);e.__svelte_rules={}})),B.clear())})))}function H(e){const t=getComputedStyle(e);if("absolute"!==t.position&&"fixed"!==t.position){const{width:n,height:i}=t,s=e.getBoundingClientRect();e.style.position="absolute",e.style.width=n,e.style.height=i,function(e,t){const n=e.getBoundingClientRect();if(t.left!==n.left||t.top!==n.top){const i=getComputedStyle(e),s="none"===i.transform?"":i.transform;e.style.transform=`${s} translate(${t.left-n.left}px, ${t.top-n.top}px)`}}(e,s)}}function W(e){F=e}function Y(){if(!F)throw new Error("Function called outside component initialization");return F}function J(e){Y().$$.before_update.push(e)}function Q(e){Y().$$.on_mount.push(e)}const Z=[],ee=[],te=[],ne=[],ie=Promise.resolve();let se=!1;function re(e){te.push(e)}let oe=!1;const ae=new Set;function le(){if(!oe){oe=!0;do{for(let e=0;e<Z.length;e+=1){const t=Z[e];W(t),ce(t.$$)}for(W(null),Z.length=0;ee.length;)ee.pop()();for(let e=0;e<te.length;e+=1){const t=te[e];ae.has(t)||(ae.add(t),t())}te.length=0}while(Z.length);for(;ne.length;)ne.pop()();se=!1,oe=!1,ae.clear()}}function ce(e){if(null!==e.fragment){e.update(),r(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(re)}}let ue;function fe(e,t,n){e.dispatchEvent(U(`${t?"intro":"outro"}${n}`))}const he=new Set;let pe;function de(){pe={r:0,c:[],p:pe}}function me(){pe.r||r(pe.c),pe=pe.p}function ge(e,t){e&&e.i&&(he.delete(e),e.i(t))}function ye(e,t,n,i){if(e&&e.o){if(he.has(e))return;he.add(e),pe.c.push((()=>{he.delete(e),i&&(n&&e.d(1),i())})),e.o(t)}}const be={duration:0};function ke(n,i,s){let r,a,l=i(n,s),c=!1,u=0;function f(){r&&V(n,r)}function h(){const{delay:i=0,duration:s=300,easing:o=t,tick:h=e,css:p}=l||be;p&&(r=G(n,0,1,s,i,o,p,u++)),h(0,1);const d=b()+i,m=d+s;a&&a.abort(),c=!0,re((()=>fe(n,!0,"start"))),a=x((e=>{if(c){if(e>=m)return h(1,0),fe(n,!0,"end"),f(),c=!1;if(e>=d){const t=o((e-d)/s);h(t,1-t)}}return c}))}let p=!1;return{start(){p||(p=!0,V(n),o(l)?(l=l(),(ue||(ue=Promise.resolve(),ue.then((()=>{ue=null}))),ue).then(h)):h())},invalidate(){p=!1},end(){c&&(f(),c=!1)}}}function ve(e,t){const n=t.token={};function i(e,i,s,r){if(t.token!==n)return;t.resolved=r;let o=t.ctx;void 0!==s&&(o=o.slice(),o[s]=r);const a=e&&(t.current=e)(o);let l=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==i&&e&&(de(),ye(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),me())})):t.block.d(1),a.c(),ge(a,1),a.m(t.mount(),t.anchor),l=!0),t.block=a,t.blocks&&(t.blocks[i]=a),l&&le()}if((s=e)&&"object"==typeof s&&"function"==typeof s.then){const n=Y();if(e.then((e=>{W(n),i(t.then,1,t.value,e),W(null)}),(e=>{if(W(n),i(t.catch,2,t.error,e),W(null),!t.hasCatch)throw e})),t.current!==t.pending)return i(t.pending,0),!0}else{if(t.current!==t.then)return i(t.then,1,t.value,e),!0;t.resolved=e}var s}function we(e,t){e.f(),function(e,t){e.d(1),t.delete(e.key)}(e,t)}function xe(e){e&&e.c()}function ze(e,t,n,s){const{fragment:a,on_mount:l,on_destroy:c,after_update:u}=e.$$;a&&a.m(t,n),s||re((()=>{const t=l.map(i).filter(o);c?c.push(...t):r(t),e.$$.on_mount=[]})),u.forEach(re)}function Ee(e,t){const n=e.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function _e(e,t){-1===e.$$.dirty[0]&&(Z.push(e),se||(se=!0,ie.then(le)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Te(t,n,i,o,a,l,c,u=[-1]){const f=F;W(t);const h=t.$$={fragment:null,ctx:null,props:l,update:e,not_equal:a,bound:s(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(f?f.$$.context:[])),callbacks:s(),dirty:u,skip_bound:!1,root:n.target||f.$$.root};c&&c(h.root);let p=!1;if(h.ctx=i?i(t,n.props||{},((e,n,...i)=>{const s=i.length?i[0]:n;return h.ctx&&a(h.ctx[e],h.ctx[e]=s)&&(!h.skip_bound&&h.bound[e]&&h.bound[e](s),p&&_e(t,e)),n})):[],h.update(),p=!0,r(h.before_update),h.fragment=!!o&&o(h.ctx),n.target){if(n.hydrate){const e=function(e){return Array.from(e.childNodes)}(n.target);h.fragment&&h.fragment.l(e),e.forEach(S)}else h.fragment&&h.fragment.c();n.intro&&ge(t.$$.fragment),ze(t,n.target,n.anchor,n.customElement),le()}W(f)}class $e{$destroy(){Ee(this,1),this.$destroy=e}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Se=[];function Ae(t,n=e){let i;const s=new Set;function r(e){if(a(t,e)&&(t=e,i)){const e=!Se.length;for(const e of s)e[1](),Se.push(e,t);if(e){for(let e=0;e<Se.length;e+=2)Se[e][0](Se[e+1]);Se.length=0}}}return{set:r,update:function(e){r(e(t))},subscribe:function(o,a=e){const l=[o,a];return s.add(l),1===s.size&&(i=n(r)||e),o(t),()=>{s.delete(l),0===s.size&&(i(),i=null)}}}}function Ne(t,n,i){const s=!Array.isArray(t),a=s?[t]:t,c=n.length<2;return{subscribe:Ae(i,(t=>{let i=!1;const u=[];let f=0,h=e;const p=()=>{if(f)return;h();const i=n(s?u[0]:u,t);c?t(i):h=o(i)?i:e},d=a.map(((e,t)=>l(e,(e=>{u[t]=e,f&=~(1<<t),i&&p()}),(()=>{f|=1<<t}))));return i=!0,p(),function(){r(d),h()}})).subscribe}}function Oe(e){const t=e-1;return t*t*t+1}function Le(e){return"[object Date]"===Object.prototype.toString.call(e)}function Ie(e,t){if(e===t||e!=e)return()=>e;const n=typeof e;if(n!==typeof t||Array.isArray(e)!==Array.isArray(t))throw new Error("Cannot interpolate values of different type");if(Array.isArray(e)){const n=t.map(((t,n)=>Ie(e[n],t)));return e=>n.map((t=>t(e)))}if("object"===n){if(!e||!t)throw new Error("Object cannot be null");if(Le(e)&&Le(t)){e=e.getTime();const n=(t=t.getTime())-e;return t=>new Date(e+t*n)}const n=Object.keys(t),i={};return n.forEach((n=>{i[n]=Ie(e[n],t[n])})),e=>{const t={};return n.forEach((n=>{t[n]=i[n](e)})),t}}if("number"===n){const n=t-e;return t=>e+t*n}throw new Error(`Cannot interpolate ${n} values`)}function Ce(e,i={}){const s=Ae(e);let r,o=e;function a(a,l){if(null==e)return s.set(e=a),Promise.resolve();o=a;let c=r,u=!1,{delay:f=0,duration:h=400,easing:p=t,interpolate:d=Ie}=n(n({},i),l);if(0===h)return c&&(c.abort(),c=null),s.set(e=o),Promise.resolve();const m=b()+f;let g;return r=x((t=>{if(t<m)return!0;u||(g=d(e,a),"function"==typeof h&&(h=h(e,a)),u=!0),c&&(c.abort(),c=null);const n=t-m;return n>h?(s.set(e=a),!1):(s.set(e=g(p(n/h))),!0)})),r.promise}return{set:a,update:(t,n)=>a(t(o,e),n),subscribe:s.subscribe}}function Me(e){E(e,"svelte-1po3g9q",".progress.svelte-1po3g9q.svelte-1po3g9q{grid-area:auto;height:0.4em;width:100%;position:relative}.progress.svelte-1po3g9q .progress-slider.svelte-1po3g9q{background-color:var(--quizdown-color-primary);height:100%;display:block}")}function Re(t){let n,i;return{c(){n=N("div"),i=N("div"),R(i,"class","progress-slider svelte-1po3g9q"),q(i,"width",t[0]),R(n,"class","progress svelte-1po3g9q"),R(n,"data-label","")},m(e,t){$(e,n,t),z(n,i)},p(e,[t]){1&t&&q(i,"width",e[0])},i:e,o:e,d(e){e&&S(n)}}}function Pe(e,t,n){let i,s,{value:r}=t,{max:o}=t;const a=Ce(0,{duration:400,easing:Oe});return u(e,a,(e=>n(4,s=e))),e.$$set=e=>{"value"in e&&n(2,r=e.value),"max"in e&&n(3,o=e.max)},e.$$.update=()=>{12&e.$$.dirty&&a.set(Math.min(o,r)+.5),24&e.$$.dirty&&n(0,i=String(s/(o+.5)*100)+"%")},[i,a,r,o,s]}class qe extends $e{constructor(e){super(),Te(this,e,Pe,Re,a,{value:2,max:3},Me)}}var De=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===je}(e)}(e)};var je="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function Ue(e,t){return!1!==t.clone&&t.isMergeableObject(e)?Ge((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Ke(e,t,n){return e.concat(t).map((function(e){return Ue(e,n)}))}function Be(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function Fe(e,t){try{return t in e}catch(e){return!1}}function Xe(e,t,n){var i={};return n.isMergeableObject(e)&&Be(e).forEach((function(t){i[t]=Ue(e[t],n)})),Be(t).forEach((function(s){(function(e,t){return Fe(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,s)||(Fe(e,s)&&n.isMergeableObject(t[s])?i[s]=function(e,t){if(!t.customMerge)return Ge;var n=t.customMerge(e);return"function"==typeof n?n:Ge}(s,n)(e[s],t[s],n):i[s]=Ue(t[s],n))})),i}function Ge(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Ke,n.isMergeableObject=n.isMergeableObject||De,n.cloneUnlessOtherwiseSpecified=Ue;var i=Array.isArray(t);return i===Array.isArray(e)?i?n.arrayMerge(e,t,n):Xe(e,t,n):Ue(t,n)}Ge.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return Ge(e,n,t)}),{})};var Ve=Ge,He=function(e,t){return(He=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function We(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}He(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Ye,Je,Qe,Ze=function(){return(Ze=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)};function et(e,t,n){if(n||2===arguments.length)for(var i,s=0,r=t.length;s<r;s++)!i&&s in t||(i||(i=Array.prototype.slice.call(t,0,s)),i[s]=t[s]);return e.concat(i||t)}function tt(e){return e.type===Je.literal}function nt(e){return e.type===Je.argument}function it(e){return e.type===Je.number}function st(e){return e.type===Je.date}function rt(e){return e.type===Je.time}function ot(e){return e.type===Je.select}function at(e){return e.type===Je.plural}function lt(e){return e.type===Je.pound}function ct(e){return e.type===Je.tag}function ut(e){return!(!e||"object"!=typeof e||e.type!==Qe.number)}function ft(e){return!(!e||"object"!=typeof e||e.type!==Qe.dateTime)}!function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(Ye||(Ye={})),function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(Je||(Je={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(Qe||(Qe={}));var ht=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,pt=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function dt(e){var t={};return e.replace(pt,(function(e){var n=e.length;switch(e[0]){case"G":t.era=4===n?"long":5===n?"narrow":"short";break;case"y":t.year=2===n?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=4===n?"short":5===n?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),t}var mt=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var gt,yt=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,bt=/^(@+)?(\+|#+)?$/g,kt=/(\*)(0+)|(#+)(0+)|(0+)/g,vt=/^(0+)$/;function wt(e){var t={};return e.replace(bt,(function(e,n,i){return"string"!=typeof i?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):"+"===i?t.minimumSignificantDigits=n.length:"#"===n[0]?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+("string"==typeof i?i.length:0)),""})),t}function xt(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function zt(e){var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if("+!"===n?(t.signDisplay="always",e=e.slice(2)):"+?"===n&&(t.signDisplay="exceptZero",e=e.slice(2)),!vt.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Et(e){var t=xt(e);return t||{}}function _t(e){for(var t={},n=0,i=e;n<i.length;n++){var s=i[n];switch(s.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=s.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=s.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=Ze(Ze(Ze({},t),{notation:"scientific"}),s.options.reduce((function(e,t){return Ze(Ze({},e),Et(t))}),{}));continue;case"engineering":t=Ze(Ze(Ze({},t),{notation:"engineering"}),s.options.reduce((function(e,t){return Ze(Ze({},e),Et(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(s.options[0]);continue;case"integer-width":if(s.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");s.options[0].replace(kt,(function(e,n,i,s,r,o){if(n)t.minimumIntegerDigits=i.length;else{if(s&&r)throw new Error("We currently do not support maximum integer digits");if(o)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(vt.test(s.stem))t.minimumIntegerDigits=s.stem.length;else if(yt.test(s.stem)){if(s.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");s.stem.replace(yt,(function(e,n,i,s,r,o){return"*"===i?t.minimumFractionDigits=n.length:s&&"#"===s[0]?t.maximumFractionDigits=s.length:r&&o?(t.minimumFractionDigits=r.length,t.maximumFractionDigits=r.length+o.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),""})),s.options.length&&(t=Ze(Ze({},t),wt(s.options[0])))}else if(bt.test(s.stem))t=Ze(Ze({},t),wt(s.stem));else{var r=xt(s.stem);r&&(t=Ze(Ze({},t),r));var o=zt(s.stem);o&&(t=Ze(Ze({},t),o))}}return t}var Tt=new RegExp("^"+ht.source+"*"),$t=new RegExp(ht.source+"*$");function St(e,t){return{start:e,end:t}}var At=!!String.prototype.startsWith,Nt=!!String.fromCodePoint,Ot=!!Object.fromEntries,Lt=!!String.prototype.codePointAt,It=!!String.prototype.trimStart,Ct=!!String.prototype.trimEnd,Mt=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Rt=!0;try{Rt="a"===(null===(gt=Ft("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===gt?void 0:gt[0])}catch(e){Rt=!1}var Pt,qt=At?function(e,t,n){return e.startsWith(t,n)}:function(e,t,n){return e.slice(n,n+t.length)===t},Dt=Nt?String.fromCodePoint:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n,i="",s=e.length,r=0;s>r;){if((n=e[r++])>1114111)throw RangeError(n+" is not a valid code point");i+=n<65536?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),n%1024+56320)}return i},jt=Ot?Object.fromEntries:function(e){for(var t={},n=0,i=e;n<i.length;n++){var s=i[n],r=s[0],o=s[1];t[r]=o}return t},Ut=Lt?function(e,t){return e.codePointAt(t)}:function(e,t){var n=e.length;if(!(t<0||t>=n)){var i,s=e.charCodeAt(t);return s<55296||s>56319||t+1===n||(i=e.charCodeAt(t+1))<56320||i>57343?s:i-56320+(s-55296<<10)+65536}},Kt=It?function(e){return e.trimStart()}:function(e){return e.replace(Tt,"")},Bt=Ct?function(e){return e.trimEnd()}:function(e){return e.replace($t,"")};function Ft(e,t){return new RegExp(e,t)}if(Rt){var Xt=Ft("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Pt=function(e,t){var n;return Xt.lastIndex=t,null!==(n=Xt.exec(e)[1])&&void 0!==n?n:""}}else Pt=function(e,t){for(var n=[];;){var i=Ut(e,t);if(void 0===i||Wt(i)||Yt(i))break;n.push(i),t+=i>=65536?2:1}return Dt.apply(void 0,n)};var Gt=function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,n){for(var i=[];!this.isEOF();){var s=this.char();if(123===s){if((r=this.parseArgument(e,n)).err)return r;i.push(r.val)}else{if(125===s&&e>0)break;if(35!==s||"plural"!==t&&"selectordinal"!==t){if(60===s&&!this.ignoreTag&&47===this.peek()){if(n)break;return this.error(Ye.UNMATCHED_CLOSING_TAG,St(this.clonePosition(),this.clonePosition()))}if(60===s&&!this.ignoreTag&&Vt(this.peek()||0)){if((r=this.parseTag(e,t)).err)return r;i.push(r.val)}else{var r;if((r=this.parseLiteral(e,t)).err)return r;i.push(r.val)}}else{var o=this.clonePosition();this.bump(),i.push({type:Je.pound,location:St(o,this.clonePosition())})}}}return{val:i,err:null}},e.prototype.parseTag=function(e,t){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:Je.literal,value:"<"+i+"/>",location:St(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var s=this.parseMessage(e+1,t,!0);if(s.err)return s;var r=s.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Vt(this.char()))return this.error(Ye.INVALID_TAG,St(o,this.clonePosition()));var a=this.clonePosition();return i!==this.parseTagName()?this.error(Ye.UNMATCHED_CLOSING_TAG,St(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:Je.tag,value:i,children:r,location:St(n,this.clonePosition())},err:null}:this.error(Ye.INVALID_TAG,St(o,this.clonePosition())))}return this.error(Ye.UNCLOSED_TAG,St(n,this.clonePosition()))}return this.error(Ye.INVALID_TAG,St(n,this.clonePosition()))},e.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&Ht(this.char());)this.bump();return this.message.slice(e,this.offset())},e.prototype.parseLiteral=function(e,t){for(var n=this.clonePosition(),i="";;){var s=this.tryParseQuote(t);if(s)i+=s;else{var r=this.tryParseUnquoted(e,t);if(r)i+=r;else{var o=this.tryParseLeftAngleBracket();if(!o)break;i+=o}}}var a=St(n,this.clonePosition());return{val:{type:Je.literal,value:i,location:a},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(Vt(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(39===n){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(n);this.bump()}return Dt.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var n=this.char();return 60===n||123===n||35===n&&("plural"===t||"selectordinal"===t)||125===n&&e>0?null:(this.bump(),Dt(n))},e.prototype.parseArgument=function(e,t){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(Ye.EXPECT_ARGUMENT_CLOSING_BRACE,St(n,this.clonePosition()));if(125===this.char())return this.bump(),this.error(Ye.EMPTY_ARGUMENT,St(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(Ye.MALFORMED_ARGUMENT,St(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Ye.EXPECT_ARGUMENT_CLOSING_BRACE,St(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Je.argument,value:i,location:St(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(Ye.EXPECT_ARGUMENT_CLOSING_BRACE,St(n,this.clonePosition())):this.parseArgumentOptions(e,t,i,n);default:return this.error(Ye.MALFORMED_ARGUMENT,St(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=Pt(this.message,t),i=t+n.length;return this.bumpTo(i),{value:n,location:St(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,i){var s,r=this.clonePosition(),o=this.parseIdentifierIfPossible().value,a=this.clonePosition();switch(o){case"":return this.error(Ye.EXPECT_ARGUMENT_TYPE,St(r,a));case"number":case"date":case"time":this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition();if((g=this.parseSimpleArgStyleIfPossible()).err)return g;if(0===(h=Bt(g.val)).length)return this.error(Ye.EXPECT_ARGUMENT_STYLE,St(this.clonePosition(),this.clonePosition()));l={style:h,styleLocation:St(c,this.clonePosition())}}if((y=this.tryParseArgumentClose(i)).err)return y;var u=St(i,this.clonePosition());if(l&&qt(null==l?void 0:l.style,"::",0)){var f=Kt(l.style.slice(2));if("number"===o)return(g=this.parseNumberSkeletonFromString(f,l.styleLocation)).err?g:{val:{type:Je.number,value:n,location:u,style:g.val},err:null};if(0===f.length)return this.error(Ye.EXPECT_DATE_TIME_SKELETON,u);var h={type:Qe.dateTime,pattern:f,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?dt(f):{}};return{val:{type:"date"===o?Je.date:Je.time,value:n,location:u,style:h},err:null}}return{val:{type:"number"===o?Je.number:"date"===o?Je.date:Je.time,value:n,location:u,style:null!==(s=null==l?void 0:l.style)&&void 0!==s?s:null},err:null};case"plural":case"selectordinal":case"select":var p=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Ye.EXPECT_SELECT_ARGUMENT_OPTIONS,St(p,Ze({},p)));this.bumpSpace();var d=this.parseIdentifierIfPossible(),m=0;if("select"!==o&&"offset"===d.value){if(!this.bumpIf(":"))return this.error(Ye.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,St(this.clonePosition(),this.clonePosition()));var g;if(this.bumpSpace(),(g=this.tryParseDecimalInteger(Ye.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ye.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return g;this.bumpSpace(),d=this.parseIdentifierIfPossible(),m=g.val}var y,b=this.tryParsePluralOrSelectOptions(e,o,t,d);if(b.err)return b;if((y=this.tryParseArgumentClose(i)).err)return y;var k=St(i,this.clonePosition());return"select"===o?{val:{type:Je.select,value:n,options:jt(b.val),location:k},err:null}:{val:{type:Je.plural,value:n,options:jt(b.val),offset:m,pluralType:"plural"===o?"cardinal":"ordinal",location:k},err:null};default:return this.error(Ye.INVALID_ARGUMENT_TYPE,St(r,a))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(Ye.EXPECT_ARGUMENT_CLOSING_BRACE,St(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39:this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Ye.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,St(n,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var n=[];try{n=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");for(var t=[],n=0,i=e.split(mt).filter((function(e){return e.length>0}));n<i.length;n++){var s=i[n].split("/");if(0===s.length)throw new Error("Invalid number skeleton");for(var r=s[0],o=s.slice(1),a=0,l=o;a<l.length;a++)if(0===l[a].length)throw new Error("Invalid number skeleton");t.push({stem:r,options:o})}return t}(e)}catch(e){return this.error(Ye.INVALID_NUMBER_SKELETON,t)}return{val:{type:Qe.number,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?_t(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,n,i){for(var s,r=!1,o=[],a=new Set,l=i.value,c=i.location;;){if(0===l.length){var u=this.clonePosition();if("select"===t||!this.bumpIf("="))break;var f=this.tryParseDecimalInteger(Ye.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ye.INVALID_PLURAL_ARGUMENT_SELECTOR);if(f.err)return f;c=St(u,this.clonePosition()),l=this.message.slice(u.offset,this.offset())}if(a.has(l))return this.error("select"===t?Ye.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Ye.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);"other"===l&&(r=!0),this.bumpSpace();var h=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?Ye.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Ye.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,St(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(e+1,t,n);if(p.err)return p;var d=this.tryParseArgumentClose(h);if(d.err)return d;o.push([l,{value:p.val,location:St(h,this.clonePosition())}]),a.add(l),this.bumpSpace(),l=(s=this.parseIdentifierIfPossible()).value,c=s.location}return 0===o.length?this.error("select"===t?Ye.EXPECT_SELECT_ARGUMENT_SELECTOR:Ye.EXPECT_PLURAL_ARGUMENT_SELECTOR,St(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!r?this.error(Ye.MISSING_OTHER_CLAUSE,St(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var s=!1,r=0;!this.isEOF();){var o=this.char();if(!(o>=48&&o<=57))break;s=!0,r=10*r+(o-48),this.bump()}var a=St(i,this.clonePosition());return s?Mt(r*=n)?{val:r,err:null}:this.error(t,a):this.error(e,a)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=Ut(this.message,e);if(void 0===t)throw Error("Offset "+e+" is at invalid UTF-16 code unit boundary");return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if(qt(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(e){var t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset "+e+" must be greater than or equal to the current offset "+this.offset());for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset "+e+" is at invalid UTF-16 code unit boundary");if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Wt(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),n=this.message.charCodeAt(t+(e>=65536?2:1));return null!=n?n:null},e}();function Vt(e){return e>=97&&e<=122||e>=65&&e<=90}function Ht(e){return 45===e||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Wt(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function Yt(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function Jt(e){e.forEach((function(e){if(delete e.location,ot(e)||at(e))for(var t in e.options)delete e.options[t].location,Jt(e.options[t].value);else it(e)&&ut(e.style)||(st(e)||rt(e))&&ft(e.style)?delete e.style.location:ct(e)&&Jt(e.children)}))}function Qt(e,t){void 0===t&&(t={}),t=Ze({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Gt(e,t).parse();if(n.err){var i=SyntaxError(Ye[n.err.kind]);throw i.location=n.err.location,i.originalMessage=n.err.message,i}return(null==t?void 0:t.captureLocation)||Jt(n.val),n.val}function Zt(e,t){var n=t&&t.cache?t.cache:ln,i=t&&t.serializer?t.serializer:rn;return(t&&t.strategy?t.strategy:sn)(e,{cache:n,serializer:i})}function en(e,t,n,i){var s,r=null==(s=i)||"number"==typeof s||"boolean"==typeof s?i:n(i),o=t.get(r);return void 0===o&&(o=e.call(this,i),t.set(r,o)),o}function tn(e,t,n){var i=Array.prototype.slice.call(arguments,3),s=n(i),r=t.get(s);return void 0===r&&(r=e.apply(this,i),t.set(s,r)),r}function nn(e,t,n,i,s){return n.bind(t,e,i,s)}function sn(e,t){return nn(e,this,1===e.length?en:tn,t.cache.create(),t.serializer)}var rn=function(){return JSON.stringify(arguments)};function on(){this.cache=Object.create(null)}on.prototype.has=function(e){return e in this.cache},on.prototype.get=function(e){return this.cache[e]},on.prototype.set=function(e,t){this.cache[e]=t};var an,ln={create:function(){return new on}},cn={variadic:function(e,t){return nn(e,this,tn,t.cache.create(),t.serializer)},monadic:function(e,t){return nn(e,this,en,t.cache.create(),t.serializer)}};!function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"}(an||(an={}));var un,fn=function(e){function t(t,n,i){var s=e.call(this,t)||this;return s.code=n,s.originalMessage=i,s}return We(t,e),t.prototype.toString=function(){return"[formatjs Error: "+this.code+"] "+this.message},t}(Error),hn=function(e){function t(t,n,i,s){return e.call(this,'Invalid values for "'+t+'": "'+n+'". Options are "'+Object.keys(i).join('", "')+'"',an.INVALID_VALUE,s)||this}return We(t,e),t}(fn),pn=function(e){function t(t,n,i){return e.call(this,'Value for "'+t+'" must be of type '+n,an.INVALID_VALUE,i)||this}return We(t,e),t}(fn),dn=function(e){function t(t,n){return e.call(this,'The intl string context variable "'+t+'" was not provided to the string "'+n+'"',an.MISSING_VALUE,n)||this}return We(t,e),t}(fn);function mn(e){return"function"==typeof e}function gn(e,t,n,i,s,r,o){if(1===e.length&&tt(e[0]))return[{type:un.literal,value:e[0].value}];for(var a=[],l=0,c=e;l<c.length;l++){var u=c[l];if(tt(u))a.push({type:un.literal,value:u.value});else if(lt(u))"number"==typeof r&&a.push({type:un.literal,value:n.getNumberFormat(t).format(r)});else{var f=u.value;if(!s||!(f in s))throw new dn(f,o);var h=s[f];if(nt(u))h&&"string"!=typeof h&&"number"!=typeof h||(h="string"==typeof h||"number"==typeof h?String(h):""),a.push({type:"string"==typeof h?un.literal:un.object,value:h});else if(st(u)){var p="string"==typeof u.style?i.date[u.style]:ft(u.style)?u.style.parsedOptions:void 0;a.push({type:un.literal,value:n.getDateTimeFormat(t,p).format(h)})}else if(rt(u)){p="string"==typeof u.style?i.time[u.style]:ft(u.style)?u.style.parsedOptions:void 0;a.push({type:un.literal,value:n.getDateTimeFormat(t,p).format(h)})}else if(it(u)){(p="string"==typeof u.style?i.number[u.style]:ut(u.style)?u.style.parsedOptions:void 0)&&p.scale&&(h*=p.scale||1),a.push({type:un.literal,value:n.getNumberFormat(t,p).format(h)})}else{if(ct(u)){var d=u.children,m=u.value,g=s[m];if(!mn(g))throw new pn(m,"function",o);var y=g(gn(d,t,n,i,s,r).map((function(e){return e.value})));Array.isArray(y)||(y=[y]),a.push.apply(a,y.map((function(e){return{type:"string"==typeof e?un.literal:un.object,value:e}})))}if(ot(u)){if(!(b=u.options[h]||u.options.other))throw new hn(u.value,h,Object.keys(u.options),o);a.push.apply(a,gn(b.value,t,n,i,s))}else if(at(u)){var b;if(!(b=u.options["="+h])){if(!Intl.PluralRules)throw new fn('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',an.MISSING_INTL_API,o);var k=n.getPluralRules(t,{type:u.pluralType}).select(h-(u.offset||0));b=u.options[k]||u.options.other}if(!b)throw new hn(u.value,h,Object.keys(u.options),o);a.push.apply(a,gn(b.value,t,n,i,s,h-(u.offset||0)))}else;}}}return function(e){return e.length<2?e:e.reduce((function(e,t){var n=e[e.length-1];return n&&n.type===un.literal&&t.type===un.literal?n.value+=t.value:e.push(t),e}),[])}(a)}function yn(e,t){return t?Object.keys(e).reduce((function(n,i){var s,r;return n[i]=(s=e[i],(r=t[i])?Ze(Ze(Ze({},s||{}),r||{}),Object.keys(s).reduce((function(e,t){return e[t]=Ze(Ze({},s[t]),r[t]||{}),e}),{})):s),n}),Ze({},e)):e}function bn(e){return{create:function(){return{has:function(t){return t in e},get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}!function(e){e[e.literal=0]="literal",e[e.object=1]="object"}(un||(un={}));var kn=function(){function e(t,n,i,s){var r,o=this;if(void 0===n&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=o.formatToParts(e);if(1===t.length)return t[0].value;var n=t.reduce((function(e,t){return e.length&&t.type===un.literal&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e}),[]);return n.length<=1?n[0]||"":n},this.formatToParts=function(e){return gn(o.ast,o.locales,o.formatters,o.formats,e,void 0,o.message)},this.resolvedOptions=function(){return{locale:Intl.NumberFormat.supportedLocalesOf(o.locales)[0]}},this.getAst=function(){return o.ast},"string"==typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");this.ast=e.__parse(t,{ignoreTag:null==s?void 0:s.ignoreTag})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=yn(e.formats,i),this.locales=n,this.formatters=s&&s.formatters||(void 0===(r=this.formatterCache)&&(r={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Zt((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,et([void 0],t)))}),{cache:bn(r.number),strategy:cn.variadic}),getDateTimeFormat:Zt((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,et([void 0],t)))}),{cache:bn(r.dateTime),strategy:cn.variadic}),getPluralRules:Zt((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,et([void 0],t)))}),{cache:bn(r.pluralRules),strategy:cn.variadic})})}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.__parse=Qt,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();const vn={},wn=(e,t,n)=>n?(t in vn||(vn[t]={}),e in vn[t]||(vn[t][e]=n),n):n,xn=(e,t)=>{if(null==t)return;if(t in vn&&e in vn[t])return vn[t][e];const n=jn(t);for(let i=0;i<n.length;i++){const s=Tn(n[i],e);if(s)return wn(e,t,s)}};let zn;const En=Ae({});function _n(e){return e in zn}function Tn(e,t){return _n(e)?function(e,t){if(t in e)return e[t];const n=t.split(".");let i=e;for(let e=0;e<n.length;e++)if("object"==typeof i){if(e>0){const t=n.slice(e,n.length).join(".");if(t in i){i=i[t];break}}i=i[n[e]]}else i=void 0;return i}(function(e){return zn[e]||null}(e),t):null}function $n(e,...t){delete vn[e],En.update((n=>(n[e]=Ve.all([n[e]||{},...t]),n)))}Ne([En],(([e])=>Object.keys(e))),En.subscribe((e=>zn=e));const Sn={};function An(e){return Sn[e]}function Nn(e){return jn(e).some((e=>{var t;return null===(t=An(e))||void 0===t?void 0:t.size}))}const On={};function Ln(e){if(!Nn(e))return e in On?On[e]:void 0;const t=function(e){return jn(e).map((e=>{const t=An(e);return[e,t?[...t]:[]]})).filter((([,e])=>e.length>0))}(e);return On[e]=Promise.all(t.map((([e,t])=>function(e,t){return Promise.all(t.map((t=>(function(e,t){Sn[e].delete(t),0===Sn[e].size&&delete Sn[e]}(e,t),t().then((e=>e.default||e)))))).then((t=>$n(e,...t)))}(e,t)))).then((()=>{if(Nn(e))return Ln(e);delete On[e]})),On[e]}
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function In(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n}const Cn={fallbackLocale:null,initialLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,ignoreTag:!0};function Mn(){return Cn}const Rn=Ae(!1);let Pn;const qn=Ae(null);function Dn(e){return e.split("-").map(((e,t,n)=>n.slice(0,t+1).join("-"))).reverse()}function jn(e,t=Mn().fallbac