From 92feab9a5815a20e03667df5f2dbf13922c08a0d Mon Sep 17 00:00:00 2001 From: bonartm Date: Mon, 12 Jul 2021 18:17:38 +0200 Subject: [PATCH] Release 0.4.0 --- package-lock.json | 4 ++-- package.json | 2 +- public/build/quizdown.js | 14 +++++++++++--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2c4ed49..e1a68b8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "quizdown", - "version": "0.3.1", + "version": "0.4.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "quizdown", - "version": "0.3.1", + "version": "0.4.0", "license": "MIT", "dependencies": { "@fortawesome/fontawesome-svg-core": "^1.2.35", diff --git a/package.json b/package.json index 1413fb9..32433f3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "quizdown", - "version": "0.3.1", + "version": "0.4.0", "description": "Markdown for generating interactive quiz apps in the browser.", "private": false, "type": "module", diff --git a/public/build/quizdown.js b/public/build/quizdown.js index 0776d68..5d3292c 100644 --- a/public/build/quizdown.js +++ b/public/build/quizdown.js @@ -1,4 +1,4 @@ -!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 s(e){return e()}function r(){return Object.create(null)}function i(e){e.forEach(s)}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 s=t.subscribe(...n);return s.unsubscribe?()=>s.unsubscribe():s}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 h(e,t,s,r){return e[1]&&r?n(s.ctx.slice(),e[1](r(t))):s.ctx}function f(e,t,n,s,r,i,o){const a=function(e,t,n,s){if(e[2]&&s){const r=e[2](s(n));if(void 0===t.dirty)return r;if("object"==typeof r){const e=[],n=Math.max(t.dirty.length,r.length);for(let s=0;swindow.performance.now():()=>Date.now(),g=d?e=>requestAnimationFrame(e):e;const y=new Set;function b(e){y.forEach((t=>{t.c(e)||(y.delete(t),t.f())})),0!==y.size&&g(b)}function v(e){let t;return 0===y.size&&g(b),{promise:new Promise((n=>{y.add(t={c:e,f:n})})),abort(){y.delete(t)}}}let w=!1;function k(e,t,n,s){for(;e>1);n(r)<=s?e=r+1:t=r}return e}function E(e,t,n){const s=_(e);if(!function(e){let t,n=e[0],s=1;for(;sn.call(t,...e))),t=void 0)}return n}([s,"optionalAccess",e=>e.getElementById,"call",e=>e(t)])){const e=O("style");e.id=t,e.textContent=n,S(s,e)}}function x(e){return e?e.getRootNode?e.getRootNode():e.ownerDocument:document}function _(e){const t=x(e);return t.host,t}function S(e,t){T(e.head||e,t)}function T(e,t){w?(!function(e){if(e.hydrate_init)return;e.hydrate_init=!0;const t=e.childNodes,n=new Int32Array(t.length+1),s=new Int32Array(t.length);n[0]=-1;let r=0;for(let e=0;et[n[e]].claim_order),t[e].claim_order)-1;s[e]=n[i]+1;const o=i+1;n[o]=e,r=Math.max(o,r)}const i=[],o=[];let a=t.length-1;for(let e=n[r]+1;0!=e;e=s[e-1]){for(i.push(t[e-1]);a>=e;a--)o.push(t[a]);a--}for(;a>=0;a--)o.push(t[a]);i.reverse(),o.sort(((e,t)=>e.claim_order-t.claim_order));for(let t=0,n=0;t=i[n].claim_order;)n++;const s=ne.removeEventListener(t,n,s)}function P(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function q(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function D(e,t,n,s){e.style.setProperty(t,n,s?"important":"")}class z{constructor(e){this.e=this.n=null,this.l=e}m(e,t,n=null){this.e||(this.e=O(t.nodeName),this.t=t,this.l?this.n=this.l:this.h(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let t=0;t>>0}(u)}_${a}`,f=x(e);U.add(f);const p=f.__svelte_stylesheet||(f.__svelte_stylesheet=function(e){const t=O("style");return S(_(e),t),t}(e).sheet),d=f.__svelte_rules||(f.__svelte_rules={});d[h]||(d[h]=!0,p.insertRule(`@keyframes ${h} ${u}`,p.cssRules.length));const m=e.style.animation||"";return e.style.animation=`${m?`${m}, `:""}${h} ${s}ms linear ${r}ms 1 both`,F+=1,h}function G(e,t){const n=(e.style.animation||"").split(", "),s=n.filter(t?e=>e.indexOf(t)<0:e=>-1===e.indexOf("__svelte")),r=n.length-s.length;r&&(e.style.animation=s.join(", "),F-=r,F||g((()=>{F||(U.forEach((e=>{const t=e.__svelte_stylesheet;let n=t.cssRules.length;for(;n--;)t.deleteRule(n);e.__svelte_rules={}})),U.clear())})))}function K(e){const t=getComputedStyle(e);if("absolute"!==t.position&&"fixed"!==t.position){const{width:n,height:s}=t,r=e.getBoundingClientRect();e.style.position="absolute",e.style.width=n,e.style.height=s,function(e,t){const n=e.getBoundingClientRect();if(t.left!==n.left||t.top!==n.top){const s=getComputedStyle(e),r="none"===s.transform?"":s.transform;e.style.transform=`${r} translate(${t.left-n.left}px, ${t.top-n.top}px)`}}(e,r)}}function V(e){j=e}function H(e){(function(){if(!j)throw new Error("Function called outside component initialization");return j})().$$.on_mount.push(e)}const Y=[],X=[],W=[],J=[],Z=Promise.resolve();let Q=!1;function ee(e){W.push(e)}let te=!1;const ne=new Set;function se(){if(!te){te=!0;do{for(let e=0;e{ie.delete(e),s&&(n&&e.d(1),s())})),e.o(t)}}const he="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function fe(e,t){e.f(),function(e,t){e.d(1),t.delete(e.key)}(e,t)}function pe(e){e&&e.c()}function de(e,t,n,r){const{fragment:a,on_mount:l,on_destroy:c,after_update:u}=e.$$;a&&a.m(t,n),r||ee((()=>{const t=l.map(s).filter(o);c?c.push(...t):i(t),e.$$.on_mount=[]})),u.forEach(ee)}function me(e,t){const n=e.$$;null!==n.fragment&&(i(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function ge(e,t){-1===e.$$.dirty[0]&&(Y.push(e),Q||(Q=!0,Z.then(se)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const r=s.length?s[0]:n;return f.ctx&&a(f.ctx[e],f.ctx[e]=r)&&(!f.skip_bound&&f.bound[e]&&f.bound[e](r),p&&ge(t,e)),n})):[],f.update(),p=!0,i(f.before_update),f.fragment=!!o&&o(f.ctx),n.target){if(n.hydrate){w=!0;const e=function(e){return Array.from(e.childNodes)}(n.target);f.fragment&&f.fragment.l(e),e.forEach($)}else f.fragment&&f.fragment.c();n.intro&&ce(t.$$.fragment),de(t,n.target,n.anchor,n.customElement),w=!1,se()}V(h)}class be{$destroy(){me(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)}}function ve(e){const t=e-1;return t*t*t+1}function we(e,t,n={}){const s=getComputedStyle(e),r="none"===s.transform?"":s.transform,i=t.from.width/e.clientWidth,a=t.from.height/e.clientHeight,l=(t.from.left-t.to.left)/i,c=(t.from.top-t.to.top)/a,u=Math.sqrt(l*l+c*c),{delay:h=0,duration:f=(e=>120*Math.sqrt(e)),easing:p=ve}=n;return{delay:h,duration:o(f)?f(u):f,easing:p,css:(e,t)=>`transform: ${r} translate(${t*l}px, ${t*c}px);`}}const{Map:ke}=he;function Ee(e){E(e,"svelte-1imq117",".dragdroplist.svelte-1imq117.svelte-1imq117{position:relative;padding:0}.list.svelte-1imq117.svelte-1imq117{cursor:grab;z-index:5;display:flex;flex-direction:column}.item.svelte-1imq117.svelte-1imq117{box-sizing:border-box;display:inline-flex;width:100%;margin-bottom:0.5em;border-radius:2px;user-select:none;margin:5px;padding:0;background-color:var(--quizdown-color-secondary);border:3px solid transparent;color:var(--quizdown-color-text)}.item.svelte-1imq117.svelte-1imq117:last-child{margin-bottom:0}.item.svelte-1imq117.svelte-1imq117:not(#grabbed):not(#ghost){z-index:10}.item.svelte-1imq117>.svelte-1imq117{margin:auto auto auto 0}.buttons.svelte-1imq117.svelte-1imq117{width:32px;min-width:32px;margin:auto 0;display:flex;flex-direction:column}.buttons.svelte-1imq117 button.svelte-1imq117{cursor:pointer;width:18px;height:18px;margin:0 auto;padding:0;border:1px solid rgba(0, 0, 0, 0);background-color:inherit}.buttons.svelte-1imq117 button.svelte-1imq117:focus{border:1px solid black}.delete.svelte-1imq117.svelte-1imq117{width:32px}#grabbed.svelte-1imq117.svelte-1imq117{opacity:0}#ghost.svelte-1imq117.svelte-1imq117{pointer-events:none;z-index:-5;position:absolute;top:0;left:0;opacity:0;border:3px solid var(--quizdown-color-primary);background-color:var(--quizdown-color-secondary)}#ghost.svelte-1imq117 .svelte-1imq117{pointer-events:none}#ghost.haunting.svelte-1imq117.svelte-1imq117{z-index:20;opacity:1}")}function xe(e,t,n){const s=e.slice();return s[28]=t[n],s[30]=n,s}function _e(e){let t,n,s=e[28]+"";return{c(){t=O("p"),n=I(s)},m(e,s){A(e,t,s),T(t,n)},p(e,t){1&t&&s!==(s=e[28]+"")&&q(n,s)},d(e){e&&$(t)}}}function Se(e){let t,n,s=e[28].text+"";return{c(){t=O("p"),n=I(s)},m(e,s){A(e,t,s),T(t,n)},p(e,t){1&t&&s!==(s=e[28].text+"")&&q(n,s)},d(e){e&&$(t)}}}function Te(e){let t,n,s=e[28].html+"";return{c(){t=new z,n=M(),t.a=n},m(e,r){t.m(s,e,r),A(e,n,r)},p(e,n){1&n&&s!==(s=e[28].html+"")&&t.p(s)},d(e){e&&$(n),e&&t.d()}}}function Ae(e){let t,n,s;function r(...t){return e[17](e[30],...t)}return{c(){t=O("button"),t.innerHTML='',P(t,"class","svelte-1imq117")},m(e,i){A(e,t,i),n||(s=R(t,"click",r),n=!0)},p(t,n){e=t},d(e){e&&$(t),n=!1,s()}}}function $e(n,s){let r,o,a,l,c,u,h,f,p,d,g,y,b,w,k,E,x,_,S,N,I,M,q,D,z=e;function U(...e){return s[15](s[30],...e)}function j(...e){return s[16](s[30],...e)}function F(e,t){return e[28].html?Te:e[28].text?Se:_e}let V=F(s),H=V(s),Y=s[1]&&Ae(s);return{key:n,first:null,c(){r=O("div"),o=O("div"),a=O("button"),l=L("svg"),c=L("path"),u=L("path"),f=C(),p=O("button"),d=L("svg"),g=L("path"),y=L("path"),w=C(),k=O("div"),H.c(),E=C(),x=O("div"),Y&&Y.c(),_=C(),P(c,"d","M0 0h24v24H0V0z"),P(c,"fill","none"),P(u,"d","M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6 1.41 1.41z"),P(l,"xmlns","http://www.w3.org/2000/svg"),P(l,"viewBox","0 0 24 24"),P(l,"width","16px"),P(l,"height","16px"),P(a,"class","up svelte-1imq117"),P(a,"style",h="visibility: "+(s[30]>0?"":"hidden")+";"),P(g,"d","M0 0h24v24H0V0z"),P(g,"fill","none"),P(y,"d","M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"),P(d,"xmlns","http://www.w3.org/2000/svg"),P(d,"viewBox","0 0 24 24"),P(d,"width","16px"),P(d,"height","16px"),P(p,"class","down svelte-1imq117"),P(p,"style",b="visibility: "+(s[30]0?"":"hidden")+";")&&P(a,"style",h),1&t&&b!==(b="visibility: "+(s[30]{if(!y&&e>=u&&(y=!0),y&&e>=h&&(f(1,0),b()),!g)return!1;if(y){const t=0+1*c((e-u)/l);f(t,1-t)}return!0})),p&&(d=B(n,0,1,l,a,c,p)),a||(y=!0),f(0,1),b}(r,M,we,{duration:200})},d(e){e&&$(r),H.d(),Y&&Y.d(),q=!1,i(D)}}}function Ne(t){let n,s,r,o,a,l,c,u,h,f=[],d=new ke,m=t[0];const g=e=>e[28].id?e[28].id:JSON.stringify(e[28]);for(let e=0;eb.get(r)?(w.add(s),k(t)):(v.add(r),f--):(l(n,o),f--)}for(;f--;){const t=e[f];y.has(t.key)||l(t,o)}for(;p;)k(g[p-1]);return g}(f,t,g,1,e,m,d,c,fe,$e,null,xe);for(let e=0;e{"data"in e&&n(0,o=e.data),"removesItems"in e&&n(1,a=e.removesItems)},[o,a,s,r,l,c,u,h,f,p,d,m,g,y,function(e){X[e?"unshift":"push"]((()=>{s=e,n(2,s)}))},function(e,t){m(e,e-1)},function(e,t){m(e,e+1)},function(e,t){y(e)},function(e){h(e.clientY,this)},function(e){h(e.touches[0].clientY,this)},function(e){e.stopPropagation(),d(0,e.target)},function(e){e.stopPropagation(),e.preventDefault(),p(e.touches[0])},function(e){e.stopPropagation(),f(e.clientY)},function(e){e.stopPropagation(),f(e.touches[0].clientY)},function(e){e.stopPropagation(),g()},function(e){e.stopPropagation(),g()},function(e){e.stopPropagation(),g(e.touches[0])}]}class Le extends be{constructor(e){super(),ye(this,e,Oe,Ne,a,{data:0,removesItems:1},Ee)}}function Ie(e){let t,n,s;function r(t){e[4](t)}let i={};return void 0!==e[0].answers&&(i.data=e[0].answers),t=new Le({props:i}),X.push((()=>function(e,t,n){const s=e.$$.props[t];void 0!==s&&(e.$$.bound[s]=n,n(e.$$.ctx[s]))}(t,"data",r))),{c(){pe(t.$$.fragment)},m(e,n){de(t,e,n),s=!0},p(e,[s]){const r={};var i;!n&&1&s&&(n=!0,r.data=e[0].answers,i=()=>n=!1,J.push(i)),t.$set(r)},i(e){s||(ce(t.$$.fragment,e),s=!0)},o(e){ue(t.$$.fragment,e),s=!1},d(e){me(t,e)}}}function Ce(t,n,s){let r,i,o,a=e;t.$$.on_destroy.push((()=>a()));let{quiz:c}=n;return t.$$set=e=>{"quiz"in e&&s(2,c=e.quiz)},t.$$.update=()=>{4&t.$$.dirty&&(s(1,r=c.counter),a(),a=l(r,(e=>s(3,o=e)))),12&t.$$.dirty&&s(0,i=c.questions[o]),1&t.$$.dirty&&s(0,i.selected=i.answers.map((e=>e.id)),i)},[i,r,c,o,function(e){t.$$.not_equal(i.answers,e)&&(i.answers=e,s(0,i),s(2,c),s(3,o))}]}class Me extends be{constructor(e){super(),ye(this,e,Ce,Ie,a,{quiz:2})}}function Re(e){E(e,"svelte-1kynd15","[type='checkbox'].svelte-1kynd15.svelte-1kynd15,[type='radio'].svelte-1kynd15.svelte-1kynd15{display:none}[type='radio'].svelte-1kynd15+span.svelte-1kynd15{border-radius:0.5em}[type='checkbox'].svelte-1kynd15+span.svelte-1kynd15{border-radius:2px}[type='checkbox'].svelte-1kynd15+span.svelte-1kynd15,[type='radio'].svelte-1kynd15+span.svelte-1kynd15{transition-duration:0.3s;background-color:var(--quizdown-color-secondary);color:var(--quizdown-color-text);display:block;padding:0.5rem;margin:5px;border:3px solid transparent;cursor:pointer}[type='checkbox'].svelte-1kynd15:hover+span.svelte-1kynd15,[type='radio'].svelte-1kynd15:hover+span.svelte-1kynd15{filter:brightness(0.9)}[type='checkbox'].svelte-1kynd15:checked+span.svelte-1kynd15,[type='radio'].svelte-1kynd15:checked+span.svelte-1kynd15{border:3px solid var(--quizdown-color-primary)}")}function Pe(e,t,n){const s=e.slice();return s[7]=t[n],s[9]=n,s}function qe(e,t,n){const s=e.slice();return s[7]=t[n],s[9]=n,s}function De(e){let t,n=e[1].answers,s=[];for(let t=0;ta()));let{quiz:c}=n;const u=[[],[]];return t.$$set=e=>{"quiz"in e&&s(2,c=e.quiz)},t.$$.update=()=>{4&t.$$.dirty&&(s(0,r=c.counter),a(),a=l(r,(e=>s(3,o=e)))),12&t.$$.dirty&&s(1,i=c.questions[o])},[r,i,c,o,function(){i.selected=function(e,t,n){const s=new Set;for(let t=0;t{const e=r.indexOf(l);-1!==e&&r.splice(e,1),0===r.length&&(s(),s=null)}}}}function He(t,n,s){const r=!Array.isArray(t),a=r?[t]:t,c=n.length<2;return{subscribe:Ve(s,(t=>{let s=!1;const u=[];let h=0,f=e;const p=()=>{if(h)return;f();const s=n(r?u[0]:u,t);c?t(s):f=o(s)?s:e},d=a.map(((e,t)=>l(e,(e=>{u[t]=e,h&=~(1<{h|=1<1)throw new RangeError("integer-width stems only accept a single optional option");r.options[0].replace($t,(function(e,n,s,r,i,o){if(n)t.minimumIntegerDigits=s.length;else{if(r&&i)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(Nt.test(r.stem))t.minimumIntegerDigits=r.stem.length;else if(Tt.test(r.stem)){if(r.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");r.stem.replace(Tt,(function(e,n,s,r,i,o){return"*"===s?t.minimumFractionDigits=n.length:r&&"#"===r[0]?t.maximumFractionDigits=r.length:i&&o?(t.minimumFractionDigits=i.length,t.maximumFractionDigits=i.length+o.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),""})),r.options.length&&(t=lt(lt({},t),Ot(r.options[0])))}else if(At.test(r.stem))t=lt(lt({},t),Ot(r.stem));else{var i=Lt(r.stem);i&&(t=lt(lt({},t),i));var o=It(r.stem);o&&(t=lt(lt({},t),o))}}return t}var Rt=new RegExp("^"+kt.source+"*"),Pt=new RegExp(kt.source+"*$");function qt(e,t){return{start:e,end:t}}var Dt=!!String.prototype.startsWith,zt=!!String.fromCodePoint,Ut=!!Object.fromEntries,jt=!!String.prototype.codePointAt,Ft=!!String.prototype.trimStart,Bt=!!String.prototype.trimEnd,Gt=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Kt=!0;try{Kt="a"===(null===(St=Qt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===St?void 0:St[0])}catch(e){Kt=!1}var Vt,Ht=Dt?function(e,t,n){return e.startsWith(t,n)}:function(e,t,n){return e.slice(n,n+t.length)===t},Yt=zt?String.fromCodePoint:function(){for(var e=[],t=0;ti;){if((n=e[i++])>1114111)throw RangeError(n+" is not a valid code point");s+=n<65536?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),n%1024+56320)}return s},Xt=Ut?Object.fromEntries:function(e){for(var t={},n=0,s=e;n=n)){var s,r=e.charCodeAt(t);return r<55296||r>56319||t+1===n||(s=e.charCodeAt(t+1))<56320||s>57343?r:s-56320+(r-55296<<10)+65536}},Jt=Ft?function(e){return e.trimStart()}:function(e){return e.replace(Rt,"")},Zt=Bt?function(e){return e.trimEnd()}:function(e){return e.replace(Pt,"")};function Qt(e,t){return new RegExp(e,t)}if(Kt){var en=Qt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Vt=function(e,t){var n;return en.lastIndex=t,null!==(n=en.exec(e)[1])&&void 0!==n?n:""}}else Vt=function(e,t){for(var n=[];;){var s=Wt(e,t);if(void 0===s||rn(s)||on(s))break;n.push(s),t+=s>=65536?2:1}return Yt.apply(void 0,n)};var tn=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 s=[];!this.isEOF();){var r=this.char();if(123===r){if((i=this.parseArgument(e,n)).err)return i;s.push(i.val)}else{if(125===r&&e>0)break;if(35!==r||"plural"!==t&&"selectordinal"!==t){if(60===r&&!this.ignoreTag&&47===this.peek()){if(n)break;return this.error(it.UNMATCHED_CLOSING_TAG,qt(this.clonePosition(),this.clonePosition()))}if(60===r&&!this.ignoreTag&&nn(this.peek()||0)){if((i=this.parseTag(e,t)).err)return i;s.push(i.val)}else{var i;if((i=this.parseLiteral(e,t)).err)return i;s.push(i.val)}}else{var o=this.clonePosition();this.bump(),s.push({type:ot.pound,location:qt(o,this.clonePosition())})}}}return{val:s,err:null}},e.prototype.parseTag=function(e,t){var n=this.clonePosition();this.bump();var s=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:ot.literal,value:"<"+s+"/>",location:qt(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var r=this.parseMessage(e+1,t,!0);if(r.err)return r;var i=r.val,o=this.clonePosition();if(this.bumpIf("")?{val:{type:ot.tag,value:s,children:i,location:qt(n,this.clonePosition())},err:null}:this.error(it.INVALID_TAG,qt(o,this.clonePosition())))}return this.error(it.UNCLOSED_TAG,qt(n,this.clonePosition()))}return this.error(it.INVALID_TAG,qt(n,this.clonePosition()))},e.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&sn(this.char());)this.bump();return this.message.slice(e,this.offset())},e.prototype.parseLiteral=function(e,t){for(var n=this.clonePosition(),s="";;){var r=this.tryParseQuote(t);if(r)s+=r;else{var i=this.tryParseUnquoted(e,t);if(i)s+=i;else{var o=this.tryParseLeftAngleBracket();if(!o)break;s+=o}}}var a=qt(n,this.clonePosition());return{val:{type:ot.literal,value:s,location:a},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(nn(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 Yt.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(),Yt(n))},e.prototype.parseArgument=function(e,t){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(it.EXPECT_ARGUMENT_CLOSING_BRACE,qt(n,this.clonePosition()));if(125===this.char())return this.bump(),this.error(it.EMPTY_ARGUMENT,qt(n,this.clonePosition()));var s=this.parseIdentifierIfPossible().value;if(!s)return this.error(it.MALFORMED_ARGUMENT,qt(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(it.EXPECT_ARGUMENT_CLOSING_BRACE,qt(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:ot.argument,value:s,location:qt(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(it.EXPECT_ARGUMENT_CLOSING_BRACE,qt(n,this.clonePosition())):this.parseArgumentOptions(e,t,s,n);default:return this.error(it.MALFORMED_ARGUMENT,qt(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=Vt(this.message,t),s=t+n.length;return this.bumpTo(s),{value:n,location:qt(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,s){var r,i=this.clonePosition(),o=this.parseIdentifierIfPossible().value,a=this.clonePosition();switch(o){case"":return this.error(it.EXPECT_ARGUMENT_TYPE,qt(i,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===(f=Zt(g.val)).length)return this.error(it.EXPECT_ARGUMENT_STYLE,qt(this.clonePosition(),this.clonePosition()));l={style:f,styleLocation:qt(c,this.clonePosition())}}if((y=this.tryParseArgumentClose(s)).err)return y;var u=qt(s,this.clonePosition());if(l&&Ht(null==l?void 0:l.style,"::",0)){var h=Jt(l.style.slice(2));if("number"===o)return(g=this.parseNumberSkeletonFromString(h,l.styleLocation)).err?g:{val:{type:ot.number,value:n,location:u,style:g.val},err:null};if(0===h.length)return this.error(it.EXPECT_DATE_TIME_SKELETON,u);var f={type:at.dateTime,pattern:h,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?xt(h):{}};return{val:{type:"date"===o?ot.date:ot.time,value:n,location:u,style:f},err:null}}return{val:{type:"number"===o?ot.number:"date"===o?ot.date:ot.time,value:n,location:u,style:null!==(r=null==l?void 0:l.style)&&void 0!==r?r:null},err:null};case"plural":case"selectordinal":case"select":var p=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(it.EXPECT_SELECT_ARGUMENT_OPTIONS,qt(p,lt({},p)));this.bumpSpace();var d=this.parseIdentifierIfPossible(),m=0;if("select"!==o&&"offset"===d.value){if(!this.bumpIf(":"))return this.error(it.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,qt(this.clonePosition(),this.clonePosition()));var g;if(this.bumpSpace(),(g=this.tryParseDecimalInteger(it.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,it.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(s)).err)return y;var v=qt(s,this.clonePosition());return"select"===o?{val:{type:ot.select,value:n,options:Xt(b.val),location:v},err:null}:{val:{type:ot.plural,value:n,options:Xt(b.val),offset:m,pluralType:"plural"===o?"cardinal":"ordinal",location:v},err:null};default:return this.error(it.INVALID_ARGUMENT_TYPE,qt(i,a))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(it.EXPECT_ARGUMENT_CLOSING_BRACE,qt(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(it.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,qt(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,s=e.split(_t).filter((function(e){return e.length>0}));n=48&&o<=57))break;r=!0,i=10*i+(o-48),this.bump()}var a=qt(s,this.clonePosition());return r?Gt(i*=n)?{val:i,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=Wt(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(Ht(this.message,e,this.offset())){for(var t=0;t=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()&&rn(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 nn(e){return e>=97&&e<=122||e>=65&&e<=90}function sn(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 rn(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function on(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 an(e){e.forEach((function(e){if(delete e.location,mt(e)||gt(e))for(var t in e.options)delete e.options[t].location,an(e.options[t].value);else ft(e)&&vt(e.style)||(pt(e)||dt(e))&&wt(e.style)?delete e.style.location:bt(e)&&an(e.children)}))}function ln(e,t){void 0===t&&(t={}),t=lt({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new tn(e,t).parse();if(n.err){var s=SyntaxError(it[n.err.kind]);throw s.location=n.err.location,s.originalMessage=n.err.message,s}return(null==t?void 0:t.captureLocation)||an(n.val),n.val}function cn(e,t){var n=t&&t.cache?t.cache:yn,s=t&&t.serializer?t.serializer:dn;return(t&&t.strategy?t.strategy:pn)(e,{cache:n,serializer:s})}function un(e,t,n,s){var r,i=null==(r=s)||"number"==typeof r||"boolean"==typeof r?s:n(s),o=t.get(i);return void 0===o&&(o=e.call(this,s),t.set(i,o)),o}function hn(e,t,n){var s=Array.prototype.slice.call(arguments,3),r=n(s),i=t.get(r);return void 0===i&&(i=e.apply(this,s),t.set(r,i)),i}function fn(e,t,n,s,r){return n.bind(t,e,s,r)}function pn(e,t){return fn(e,this,1===e.length?un:hn,t.cache.create(),t.serializer)}var dn=function(){return JSON.stringify(arguments)};function mn(){this.cache=Object.create(null)}mn.prototype.has=function(e){return e in this.cache},mn.prototype.get=function(e){return this.cache[e]},mn.prototype.set=function(e,t){this.cache[e]=t};var gn,yn={create:function(){return new mn}},bn={variadic:function(e,t){return fn(e,this,hn,t.cache.create(),t.serializer)},monadic:function(e,t){return fn(e,this,un,t.cache.create(),t.serializer)}};!function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"}(gn||(gn={}));var vn,wn=function(e){function t(t,n,s){var r=e.call(this,t)||this;return r.code=n,r.originalMessage=s,r}return rt(t,e),t.prototype.toString=function(){return"[formatjs Error: "+this.code+"] "+this.message},t}(Error),kn=function(e){function t(t,n,s,r){return e.call(this,'Invalid values for "'+t+'": "'+n+'". Options are "'+Object.keys(s).join('", "')+'"',gn.INVALID_VALUE,r)||this}return rt(t,e),t}(wn),En=function(e){function t(t,n,s){return e.call(this,'Value for "'+t+'" must be of type '+n,gn.INVALID_VALUE,s)||this}return rt(t,e),t}(wn),xn=function(e){function t(t,n){return e.call(this,'The intl string context variable "'+t+'" was not provided to the string "'+n+'"',gn.MISSING_VALUE,n)||this}return rt(t,e),t}(wn);function _n(e){return"function"==typeof e}function Sn(e,t,n,s,r,i,o){if(1===e.length&&ut(e[0]))return[{type:vn.literal,value:e[0].value}];for(var a=[],l=0,c=e;ln?(t in Nn||(Nn[t]={}),e in Nn[t]||(Nn[t][e]=n),n):n,Ln=(e,t)=>{if(null==t)return;if(t in Nn&&e in Nn[t])return Nn[t][e];const n=Xn(t);for(let s=0;s0){const t=n.slice(e,n.length).join(".");if(t in s){s=s[t];break}}s=s[n[e]]}else s=void 0;return s}(function(e){return In[e]||null}(e),t):null}function Pn(e,...t){delete Nn[e],Cn.update((n=>(n[e]=nt.all([n[e]||{},...t]),n)))}He([Cn],(([e])=>Object.keys(e))),Cn.subscribe((e=>In=e));const qn={};function Dn(e){return qn[e]}function zn(e){return Xn(e).some((e=>{var t;return null===(t=Dn(e))||void 0===t?void 0:t.size}))}const Un={};function jn(e){if(!zn(e))return e in Un?Un[e]:void 0;const t=function(e){return Xn(e).map((e=>{const t=Dn(e);return[e,t?[...t]:[]]})).filter((([,e])=>e.length>0))}(e);return Un[e]=Promise.all(t.map((([e,t])=>function(e,t){return Promise.all(t.map((t=>(function(e,t){qn[e].delete(t),0===qn[e].size&&delete qn[e]}(e,t),t().then((e=>e.default||e)))))).then((t=>Pn(e,...t)))}(e,t)))).then((()=>{if(zn(e))return jn(e);delete Un[e]})),Un[e]} +!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,s,r,o){const a=function(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;iwindow.performance.now():()=>Date.now(),y=m?e=>requestAnimationFrame(e):e;const b=new Set;function k(e){b.forEach((t=>{t.c(e)||(b.delete(t),t.f())})),0!==b.size&&y(k)}function v(e){let t;return 0===b.size&&y(k),{promise:new Promise((n=>{b.add(t={c:e,f:n})})),abort(){b.delete(t)}}}let w,x=!1;function z(e,t,n,i){for(;e>1);n(s)<=i?e=s+1:t=s}return e}function E(e,t,n){const i=T(e);if(!function(e){let t,n=e[0],i=1;for(;in.call(t,...e))),t=void 0)}return n}([i,"optionalAccess",e=>e.getElementById,"call",e=>e(t)])){const e=L("style");e.id=t,e.textContent=n,$(i,e)}}function _(e){return e?e.getRootNode?e.getRootNode():e.ownerDocument:document}function T(e){const t=_(e);return t.host,t}function $(e,t){S(e.head||e,t)}function S(e,t){x?(!function(e){if(e.hydrate_init)return;e.hydrate_init=!0;const t=e.childNodes,n=new Int32Array(t.length+1),i=new Int32Array(t.length);n[0]=-1;let s=0;for(let e=0;et[n[e]].claim_order),t[e].claim_order)-1;i[e]=n[r]+1;const o=r+1;n[o]=e,s=Math.max(o,s)}const r=[],o=[];let a=t.length-1;for(let e=n[s]+1;0!=e;e=i[e-1]){for(r.push(t[e-1]);a>=e;a--)o.push(t[a]);a--}for(;a>=0;a--)o.push(t[a]);r.reverse(),o.sort(((e,t)=>e.claim_order-t.claim_order));for(let t=0,n=0;t=r[n].claim_order;)n++;const i=ne.removeEventListener(t,n,i)}function D(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function j(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function q(e,t,n,i){e.style.setProperty(t,n,i?"important":"")}function U(){if(void 0===w){w=!1;try{"undefined"!=typeof window&&window.parent&&window.parent.document}catch(e){w=!0}}return w}class K{constructor(e){this.e=this.n=null,this.l=e}m(e,t,n=null){this.e||(this.e=L(t.nodeName),this.t=t,this.l?this.n=this.l:this.h(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let t=0;t>>0}(u)}_${a}`,h=_(e);B.add(h);const p=h.__svelte_stylesheet||(h.__svelte_stylesheet=function(e){const t=L("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||y((()=>{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 Z(e){Y().$$.on_mount.push(e)}const Q=[],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{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=g()+i,m=d+s;a&&a.abort(),c=!0,re((()=>fe(n,!0,"start"))),a=v((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||(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}const we="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function xe(e,t){e.f(),function(e,t){e.d(1),t.delete(e.key)}(e,t)}function ze(e){e&&e.c()}function Ee(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 _e(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 Te(e,t){-1===e.$$.dirty[0]&&(Q.push(e),se||(se=!0,ie.then(le)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{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&&Te(t,e)),n})):[],h.update(),p=!0,r(h.before_update),h.fragment=!!o&&o(h.ctx),n.target){if(n.hydrate){x=!0;const e=function(e){return Array.from(e.childNodes)}(n.target);h.fragment&&h.fragment.l(e),e.forEach(N)}else h.fragment&&h.fragment.c();n.intro&&ge(t.$$.fragment),Ee(t,n.target,n.anchor,n.customElement),x=!1,le()}W(f)}class Se{$destroy(){_e(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 Ae=[];function Ne(t,n=e){let i;const s=[];function r(e){if(a(t,e)&&(t=e,i)){const e=!Ae.length;for(let e=0;e{const e=s.indexOf(l);-1!==e&&s.splice(e,1),0===s.length&&(i(),i=null)}}}}function Oe(t,n,i){const s=!Array.isArray(t),a=s?[t]:t,c=n.length<2;return{subscribe:Ne(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<{f|=1<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)=>Ce(e[n],t)));return e=>n.map((t=>t(e)))}if("object"===n){if(!e||!t)throw new Error("Object cannot be null");if(Ie(e)&&Ie(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]=Ce(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 Me(e,i={}){const s=Ne(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=Ce}=n(n({},i),l);if(0===h)return c&&(c.abort(),c=null),s.set(e=o),Promise.resolve();const m=g()+f;let y;return r=v((t=>{if(th?(s.set(e=a),!1):(s.set(e=y(p(n/h))),!0)})),r.promise}return{set:a,update:(t,n)=>a(t(o,e),n),subscribe:s.subscribe}}function Re(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 Pe(t){let n,i;return{c(){n=L("div"),i=L("div"),D(i,"class","progress-slider svelte-1po3g9q"),q(i,"width",t[0]),D(n,"class","progress svelte-1po3g9q"),D(n,"data-label","")},m(e,t){A(e,n,t),S(n,i)},p(e,[t]){1&t&&q(i,"width",e[0])},i:e,o:e,d(e){e&&N(n)}}}function De(e,t,n){let i,s,{value:r}=t,{max:o}=t;const a=Me(0,{duration:400,easing:Le});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 je extends Se{constructor(e){super(),$e(this,e,De,Pe,a,{value:2,max:3},Re)}}var qe=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===Ue}(e)}(e)};var Ue="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function Ke(e,t){return!1!==t.clone&&t.isMergeableObject(e)?Ve((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Be(e,t,n){return e.concat(t).map((function(e){return Ke(e,n)}))}function Fe(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function Xe(e,t){try{return t in e}catch(e){return!1}}function Ge(e,t,n){var i={};return n.isMergeableObject(e)&&Fe(e).forEach((function(t){i[t]=Ke(e[t],n)})),Fe(t).forEach((function(s){(function(e,t){return Xe(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,s)||(Xe(e,s)&&n.isMergeableObject(t[s])?i[s]=function(e,t){if(!t.customMerge)return Ve;var n=t.customMerge(e);return"function"==typeof n?n:Ve}(s,n)(e[s],t[s],n):i[s]=Ke(t[s],n))})),i}function Ve(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Be,n.isMergeableObject=n.isMergeableObject||qe,n.cloneUnlessOtherwiseSpecified=Ke;var i=Array.isArray(t);return i===Array.isArray(e)?i?n.arrayMerge(e,t,n):Ge(e,t,n):Ke(t,n)}Ve.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return Ve(e,n,t)}),{})};var He=Ve,We=function(e,t){return(We=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 Ye(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}We(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Je,Ze,Qe,et=function(){return(et=Object.assign||function(e){for(var t,n=1,i=arguments.length;n1)throw new RangeError("integer-width stems only accept a single optional option");s.options[0].replace(vt,(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(wt.test(s.stem))t.minimumIntegerDigits=s.stem.length;else if(bt.test(s.stem)){if(s.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");s.stem.replace(bt,(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=et(et({},t),xt(s.options[0])))}else if(kt.test(s.stem))t=et(et({},t),xt(s.stem));else{var r=zt(s.stem);r&&(t=et(et({},t),r));var o=Et(s.stem);o&&(t=et(et({},t),o))}}return t}var $t=new RegExp("^"+pt.source+"*"),St=new RegExp(pt.source+"*$");function At(e,t){return{start:e,end:t}}var Nt=!!String.prototype.startsWith,Ot=!!String.fromCodePoint,Lt=!!Object.fromEntries,It=!!String.prototype.codePointAt,Ct=!!String.prototype.trimStart,Mt=!!String.prototype.trimEnd,Rt=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Pt=!0;try{Pt="a"===(null===(yt=Xt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===yt?void 0:yt[0])}catch(e){Pt=!1}var Dt,jt=Nt?function(e,t,n){return e.startsWith(t,n)}:function(e,t,n){return e.slice(n,n+t.length)===t},qt=Ot?String.fromCodePoint:function(){for(var e=[],t=0;tr;){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},Ut=Lt?Object.fromEntries:function(e){for(var t={},n=0,i=e;n=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}},Bt=Ct?function(e){return e.trimStart()}:function(e){return e.replace($t,"")},Ft=Mt?function(e){return e.trimEnd()}:function(e){return e.replace(St,"")};function Xt(e,t){return new RegExp(e,t)}if(Pt){var Gt=Xt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Dt=function(e,t){var n;return Gt.lastIndex=t,null!==(n=Gt.exec(e)[1])&&void 0!==n?n:""}}else Dt=function(e,t){for(var n=[];;){var i=Kt(e,t);if(void 0===i||Yt(i)||Jt(i))break;n.push(i),t+=i>=65536?2:1}return qt.apply(void 0,n)};var Vt=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(Je.UNMATCHED_CLOSING_TAG,At(this.clonePosition(),this.clonePosition()))}if(60===s&&!this.ignoreTag&&Ht(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:Ze.pound,location:At(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:Ze.literal,value:"<"+i+"/>",location:At(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("")?{val:{type:Ze.tag,value:i,children:r,location:At(n,this.clonePosition())},err:null}:this.error(Je.INVALID_TAG,At(o,this.clonePosition())))}return this.error(Je.UNCLOSED_TAG,At(n,this.clonePosition()))}return this.error(Je.INVALID_TAG,At(n,this.clonePosition()))},e.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&Wt(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=At(n,this.clonePosition());return{val:{type:Ze.literal,value:i,location:a},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(Ht(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 qt.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(),qt(n))},e.prototype.parseArgument=function(e,t){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(Je.EXPECT_ARGUMENT_CLOSING_BRACE,At(n,this.clonePosition()));if(125===this.char())return this.bump(),this.error(Je.EMPTY_ARGUMENT,At(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(Je.MALFORMED_ARGUMENT,At(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Je.EXPECT_ARGUMENT_CLOSING_BRACE,At(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Ze.argument,value:i,location:At(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(Je.EXPECT_ARGUMENT_CLOSING_BRACE,At(n,this.clonePosition())):this.parseArgumentOptions(e,t,i,n);default:return this.error(Je.MALFORMED_ARGUMENT,At(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=Dt(this.message,t),i=t+n.length;return this.bumpTo(i),{value:n,location:At(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(Je.EXPECT_ARGUMENT_TYPE,At(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=Ft(g.val)).length)return this.error(Je.EXPECT_ARGUMENT_STYLE,At(this.clonePosition(),this.clonePosition()));l={style:h,styleLocation:At(c,this.clonePosition())}}if((y=this.tryParseArgumentClose(i)).err)return y;var u=At(i,this.clonePosition());if(l&&jt(null==l?void 0:l.style,"::",0)){var f=Bt(l.style.slice(2));if("number"===o)return(g=this.parseNumberSkeletonFromString(f,l.styleLocation)).err?g:{val:{type:Ze.number,value:n,location:u,style:g.val},err:null};if(0===f.length)return this.error(Je.EXPECT_DATE_TIME_SKELETON,u);var h={type:Qe.dateTime,pattern:f,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?mt(f):{}};return{val:{type:"date"===o?Ze.date:Ze.time,value:n,location:u,style:h},err:null}}return{val:{type:"number"===o?Ze.number:"date"===o?Ze.date:Ze.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(Je.EXPECT_SELECT_ARGUMENT_OPTIONS,At(p,et({},p)));this.bumpSpace();var d=this.parseIdentifierIfPossible(),m=0;if("select"!==o&&"offset"===d.value){if(!this.bumpIf(":"))return this.error(Je.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,At(this.clonePosition(),this.clonePosition()));var g;if(this.bumpSpace(),(g=this.tryParseDecimalInteger(Je.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Je.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=At(i,this.clonePosition());return"select"===o?{val:{type:Ze.select,value:n,options:Ut(b.val),location:k},err:null}:{val:{type:Ze.plural,value:n,options:Ut(b.val),offset:m,pluralType:"plural"===o?"cardinal":"ordinal",location:k},err:null};default:return this.error(Je.INVALID_ARGUMENT_TYPE,At(r,a))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(Je.EXPECT_ARGUMENT_CLOSING_BRACE,At(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(Je.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,At(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(gt).filter((function(e){return e.length>0}));n=48&&o<=57))break;s=!0,r=10*r+(o-48),this.bump()}var a=At(i,this.clonePosition());return s?Rt(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=Kt(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(jt(this.message,e,this.offset())){for(var t=0;t=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()&&Yt(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 Ht(e){return e>=97&&e<=122||e>=65&&e<=90}function Wt(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 Yt(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function Jt(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 Zt(e){e.forEach((function(e){if(delete e.location,at(e)||lt(e))for(var t in e.options)delete e.options[t].location,Zt(e.options[t].value);else st(e)&&ft(e.style)||(rt(e)||ot(e))&&ht(e.style)?delete e.style.location:ut(e)&&Zt(e.children)}))}function Qt(e,t){void 0===t&&(t={}),t=et({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Vt(e,t).parse();if(n.err){var i=SyntaxError(Je[n.err.kind]);throw i.location=n.err.location,i.originalMessage=n.err.message,i}return(null==t?void 0:t.captureLocation)||Zt(n.val),n.val}function en(e,t){var n=t&&t.cache?t.cache:cn,i=t&&t.serializer?t.serializer:on;return(t&&t.strategy?t.strategy:rn)(e,{cache:n,serializer:i})}function tn(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 nn(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 sn(e,t,n,i,s){return n.bind(t,e,i,s)}function rn(e,t){return sn(e,this,1===e.length?tn:nn,t.cache.create(),t.serializer)}var on=function(){return JSON.stringify(arguments)};function an(){this.cache=Object.create(null)}an.prototype.has=function(e){return e in this.cache},an.prototype.get=function(e){return this.cache[e]},an.prototype.set=function(e,t){this.cache[e]=t};var ln,cn={create:function(){return new an}},un={variadic:function(e,t){return sn(e,this,nn,t.cache.create(),t.serializer)},monadic:function(e,t){return sn(e,this,tn,t.cache.create(),t.serializer)}};!function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"}(ln||(ln={}));var fn,hn=function(e){function t(t,n,i){var s=e.call(this,t)||this;return s.code=n,s.originalMessage=i,s}return Ye(t,e),t.prototype.toString=function(){return"[formatjs Error: "+this.code+"] "+this.message},t}(Error),pn=function(e){function t(t,n,i,s){return e.call(this,'Invalid values for "'+t+'": "'+n+'". Options are "'+Object.keys(i).join('", "')+'"',ln.INVALID_VALUE,s)||this}return Ye(t,e),t}(hn),dn=function(e){function t(t,n,i){return e.call(this,'Value for "'+t+'" must be of type '+n,ln.INVALID_VALUE,i)||this}return Ye(t,e),t}(hn),mn=function(e){function t(t,n){return e.call(this,'The intl string context variable "'+t+'" was not provided to the string "'+n+'"',ln.MISSING_VALUE,n)||this}return Ye(t,e),t}(hn);function gn(e){return"function"==typeof e}function yn(e,t,n,i,s,r,o){if(1===e.length&&nt(e[0]))return[{type:fn.literal,value:e[0].value}];for(var a=[],l=0,c=e;ln?(t in wn||(wn[t]={}),e in wn[t]||(wn[t][e]=n),n):n,zn=(e,t)=>{if(null==t)return;if(t in wn&&e in wn[t])return wn[t][e];const n=Un(t);for(let i=0;i0){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 En[e]||null}(e),t):null}function Sn(e,...t){delete wn[e],_n.update((n=>(n[e]=He.all([n[e]||{},...t]),n)))}Oe([_n],(([e])=>Object.keys(e))),_n.subscribe((e=>En=e));const An={};function Nn(e){return An[e]}function On(e){return Un(e).some((e=>{var t;return null===(t=Nn(e))||void 0===t?void 0:t.size}))}const Ln={};function In(e){if(!On(e))return e in Ln?Ln[e]:void 0;const t=function(e){return Un(e).map((e=>{const t=Nn(e);return[e,t?[...t]:[]]})).filter((([,e])=>e.length>0))}(e);return Ln[e]=Promise.all(t.map((([e,t])=>function(e,t){return Promise.all(t.map((t=>(function(e,t){An[e].delete(t),0===An[e].size&&delete An[e]}(e,t),t().then((e=>e.default||e)))))).then((t=>Sn(e,...t)))}(e,t)))).then((()=>{if(On(e))return In(e);delete Ln[e]})),Ln[e]} /*! ***************************************************************************** Copyright (c) Microsoft Corporation. @@ -12,5 +12,13 @@ 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 Fn(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(e);rn.slice(0,t+1).join("-"))).reverse()}function Xn(e,t=Gn().fallbackLocale){const n=Yn(e);return t?[...new Set([...n,...Yn(t)])]:n}function Wn(){return Vn}Hn.subscribe((e=>{Vn=e,"undefined"!=typeof window&&null!==e&&document.documentElement.setAttribute("lang",e)}));const Jn=Hn.set;Hn.set=e=>{if(function(e){if(null==e)return;const t=Xn(e);for(let e=0;eKn.set(!0)),t):Kn.set(!0),jn(e).then((()=>{Jn(e)})).finally((()=>{clearTimeout(n),Kn.set(!1)}))}return Jn(e)},Hn.update=e=>Jn(e(Vn));const Zn=e=>{const t=Object.create(null);return n=>{const s=JSON.stringify(n);return s in t?t[s]:t[s]=e(n)}},Qn=(e,t)=>{const{formats:n}=Gn();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},es=Zn((e=>{var{locale:t,format:n}=e,s=Fn(e,["locale","format"]);if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(s=Qn("number",n)),new Intl.NumberFormat(t,s)})),ts=Zn((e=>{var{locale:t,format:n}=e,s=Fn(e,["locale","format"]);if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?s=Qn("date",n):0===Object.keys(s).length&&(s=Qn("date","short")),new Intl.DateTimeFormat(t,s)})),ns=Zn((e=>{var{locale:t,format:n}=e,s=Fn(e,["locale","format"]);if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?s=Qn("time",n):0===Object.keys(s).length&&(s=Qn("time","short")),new Intl.DateTimeFormat(t,s)})),ss=Zn(((e,t=Wn())=>new $n(e,t,Gn().formats,{ignoreTag:Gn().ignoreTag}))),rs=(e,t={})=>{"object"==typeof e&&(e=(t=e).id);const{values:n,locale:s=Wn(),default:r}=t;if(null==s)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let i=Ln(e,s);if(i){if("string"!=typeof i)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof i}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),i}else Gn().warnOnMissingMessages&&console.warn(`[svelte-i18n] The message "${e}" was not found in "${Xn(s).join('", "')}".${zn(Wn())?"\n\nNote: there are at least one loader still registered to this locale that wasn't executed.":""}`),i=r||e;if(!n)return i;let o=i;try{o=ss(i,s).format(n)}catch(t){console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,t.message)}return o},is=(e,t)=>((e={})=>{var{locale:t=Wn()}=e,n=Fn(e,["locale"]);return ns(Object.assign({locale:t},n))})(t).format(e),os=(e,t)=>((e={})=>{var{locale:t=Wn()}=e,n=Fn(e,["locale"]);return ts(Object.assign({locale:t},n))})(t).format(e),as=(e,t)=>((e={})=>{var{locale:t=Wn()}=e,n=Fn(e,["locale"]);return es(Object.assign({locale:t},n))})(t).format(e),ls=(e,t=Wn())=>Ln(e,t),cs=He([Hn,Cn],(()=>rs));function us(e){E(e,"svelte-xeqbwq",".top-list-item.svelte-xeqbwq.svelte-xeqbwq{margin-bottom:0.2rem;list-style-type:none}.top-list-item.svelte-xeqbwq.svelte-xeqbwq:hover{cursor:pointer;background-color:var(--quizdown-color-secondary)}.top-list-item.svelte-xeqbwq:hover .list-question.svelte-xeqbwq{text-decoration:underline}.list-comment.svelte-xeqbwq.svelte-xeqbwq{margin-left:2em;list-style-type:initial}")}function hs(e,t,n){const s=e.slice();return s[4]=t[n],s[6]=n,s}function fs(e,t,n){const s=e.slice();return s[7]=t[n],s}function ps(e){let t,n,s,r,i,o=e[4].answers[e[7]].html+"",a=e[4].answers[e[7]].comment+"";return{c(){t=O("li"),n=O("i"),s=I(":\n "),r=new z,i=C(),r.a=i,P(t,"class","list-comment svelte-xeqbwq")},m(e,l){A(e,t,l),T(t,n),n.innerHTML=o,T(t,s),r.m(a,t),T(t,i)},p(e,t){1&t&&o!==(o=e[4].answers[e[7]].html+"")&&(n.innerHTML=o),1&t&&a!==(a=e[4].answers[e[7]].comment+"")&&r.p(a)},d(e){e&&$(t)}}}function ds(e){let t,n=""!==e[4].answers[e[7]].comment&&ps(e);return{c(){n&&n.c(),t=M()},m(e,s){n&&n.m(e,s),A(e,t,s)},p(e,s){""!==e[4].answers[e[7]].comment?n?n.p(e,s):(n=ps(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},d(e){n&&n.d(e),e&&$(t)}}}function ms(e){let t,n,s,r,i,o,a,l,c,u,h,f,p=e[2][+e[4].solved]+"",d=e[6]+1+"",m=e[4].text+"",g=e[4].selected,y=[];for(let t=0;t${t[0].points}`,total:`${t[0].counter.max}`}})+"",u=t[0].questions,h=[];for(let e=0;e${e[0].points}`,total:`${e[0].counter.max}`}})+"")&&(i.innerHTML=c),5&t){let n;for(u=e[0].questions,n=0;nn(1,s=e)));let{quiz:r}=t;return e.$$set=e=>{"quiz"in e&&n(0,r=e.quiz)},[r,s,["❌","✅"],e=>r.jump(e)]}He([Hn],(()=>is)),He([Hn],(()=>os)),He([Hn],(()=>as)),He([Hn,Cn],(()=>ls));class bs extends be{constructor(e){super(),ye(this,e,ys,gs,a,{quiz:0},us)}}function vs(e){let t,n,s,r,i,o,a,l,c,u,h=e[1]+1+"",f=e[3].text+"",p=null!==e[3].explanation&&""!==e[3].explanation&&ks(e);var d=e[4][e[3].type];function m(e){return{props:{quiz:e[0]}}}return d&&(l=new d(m(e))),{c(){t=O("h3"),n=I("Q"),s=I(h),r=I(": "),i=new z,o=C(),p&&p.c(),a=C(),l&&pe(l.$$.fragment),c=M(),i.a=null},m(e,h){A(e,t,h),T(t,n),T(t,s),T(t,r),i.m(f,t),A(e,o,h),p&&p.m(e,h),A(e,a,h),l&&de(l,e,h),A(e,c,h),u=!0},p(e,t){(!u||2&t)&&h!==(h=e[1]+1+"")&&q(s,h),(!u||8&t)&&f!==(f=e[3].text+"")&&i.p(f),null!==e[3].explanation&&""!==e[3].explanation?p?p.p(e,t):(p=ks(e),p.c(),p.m(a.parentNode,a)):p&&(p.d(1),p=null);const n={};if(1&t&&(n.quiz=e[0]),d!==(d=e[4][e[3].type])){if(l){ae();const e=l;ue(e.$$.fragment,1,0,(()=>{me(e,1)})),le()}d?(l=new d(m(e)),pe(l.$$.fragment),ce(l.$$.fragment,1),de(l,c.parentNode,c)):l=null}else d&&l.$set(n)},i(e){u||(l&&ce(l.$$.fragment,e),u=!0)},o(e){l&&ue(l.$$.fragment,e),u=!1},d(e){e&&$(t),e&&$(o),p&&p.d(e),e&&$(a),e&&$(c),l&&me(l,e)}}}function ws(e){let t,n;return t=new bs({props:{quiz:e[0]}}),{c(){pe(t.$$.fragment)},m(e,s){de(t,e,s),n=!0},p(e,n){const s={};1&n&&(s.quiz=e[0]),t.$set(s)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function ks(e){let t,n=e[3].explanation+"";return{c(){t=O("p")},m(e,s){A(e,t,s),t.innerHTML=n},p(e,s){8&s&&n!==(n=e[3].explanation+"")&&(t.innerHTML=n)},d(e){e&&$(t)}}}function Es(e){let t,n,s,r;const i=[ws,vs],o=[];function a(e,t){return e[1]===e[2].max?0:1}return t=a(e),n=o[t]=i[t](e),{c(){n.c(),s=M()},m(e,n){o[t].m(e,n),A(e,s,n),r=!0},p(e,[r]){let l=t;t=a(e),t===l?o[t].p(e,r):(ae(),ue(o[l],1,1,(()=>{o[l]=null})),le(),n=o[t],n?n.p(e,r):(n=o[t]=i[t](e),n.c()),ce(n,1),n.m(s.parentNode,s))},i(e){r||(ce(n),r=!0)},o(e){ue(n),r=!1},d(e){o[t].d(e),e&&$(s)}}}function xs(t,n,s){let r,i,o,a=e;t.$$.on_destroy.push((()=>a()));let{quiz:c}=n,u={MultipleChoice:Ge,SingleChoice:Ge,Sequence:Me};return t.$$set=e=>{"quiz"in e&&s(0,c=e.quiz)},t.$$.update=()=>{1&t.$$.dirty&&(s(2,r=c.counter),a(),a=l(r,(e=>s(1,o=e)))),3&t.$$.dirty&&s(3,i=c.questions[o])},[c,o,r,i,u]}class _s extends be{constructor(e){super(),ye(this,e,xs,Es,a,{quiz:0})}}function Ss(e){E(e,"svelte-1wqt442","button.svelte-1wqt442:disabled{background-color:rgb(231, 231, 231);filter:grayscale(100%);color:gray;cursor:initial}button.svelte-1wqt442{background-color:var(--quizdown-color-secondary);color:var(--quizdown-color-text);padding:0.5rem 1rem;border-radius:4px;border:1px solid transparent;line-height:1;text-align:center;transition:opacity 0.2s ease;text-decoration:none;transform:scale(1);display:inline-block;cursor:pointer;margin:0.2rem;font-size:1em}button.svelte-1wqt442:hover:not(:checked):not(:active):not(:disabled){filter:brightness(0.9)}")}function Ts(e){let t,n,s,r;const i=e[3].default,a=function(e,t,n,s){if(e){const r=h(e,t,n,s);return e[0](r)}}(i,e,e[2],null),l=a||function(e){let t;return{c(){t=I("Hello World")},m(e,n){A(e,t,n)},d(e){e&&$(t)}}}();return{c(){t=O("button"),l&&l.c(),t.disabled=e[1],P(t,"class","svelte-1wqt442")},m(i,a){A(i,t,a),l&&l.m(t,null),n=!0,s||(r=R(t,"click",(function(){o(e[0])&&e[0].apply(this,arguments)})),s=!0)},p(s,[r]){e=s,a&&a.p&&(!n||4&r)&&f(a,i,e,e[2],n?r:-1,null,null),(!n||2&r)&&(t.disabled=e[1])},i(e){n||(ce(l,e),n=!0)},o(e){ue(l,e),n=!1},d(e){e&&$(t),l&&l.d(e),s=!1,r()}}}function As(e,t,n){let{$$slots:s={},$$scope:r}=t,{buttonAction:i=(()=>alert("Life has never Svelte better"))}=t,{disabled:o=!1}=t;return e.$$set=e=>{"buttonAction"in e&&n(0,i=e.buttonAction),"disabled"in e&&n(1,o=e.disabled),"$$scope"in e&&n(2,r=e.$$scope)},[i,o,r,s]}class $s extends be{constructor(e){super(),ye(this,e,As,Ts,a,{buttonAction:0,disabled:1},Ss)}}function Ns(e){E(e,"svelte-kh8fob",".button-row.svelte-kh8fob.svelte-kh8fob{margin-top:1em;display:flex;justify-content:left}.quizdown-credits.svelte-kh8fob a.svelte-kh8fob{color:gray;text-decoration:none}.quizdown-credits.svelte-kh8fob a.svelte-kh8fob:hover{text-decoration:underline}.quizdown-credits.svelte-kh8fob.svelte-kh8fob{margin-top:1rem;font-size:small;text-align:end;color:lightgray}.quizdown-hint.svelte-kh8fob.svelte-kh8fob{font-size:smaller}")}function Os(e){let t,n,s,r,i,o;t=new $s({props:{disabled:null===e[5].hint||""===e[5].hint||e[2],buttonAction:e[8],$$slots:{default:[Is]},$$scope:{ctx:e}}});const a=[Rs,Ms,Cs],l=[];function c(e,t){return e[7]?0:e[1]===e[3].max-1?1:2}return s=c(e),r=l[s]=a[s](e),{c(){pe(t.$$.fragment),n=C(),r.c(),i=M()},m(e,r){de(t,e,r),A(e,n,r),l[s].m(e,r),A(e,i,r),o=!0},p(e,n){const o={};36&n&&(o.disabled=null===e[5].hint||""===e[5].hint||e[2]),4&n&&(o.buttonAction=e[8]),576&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o);let u=s;s=c(e),s===u?l[s].p(e,n):(ae(),ue(l[u],1,1,(()=>{l[u]=null})),le(),r=l[s],r?r.p(e,n):(r=l[s]=a[s](e),r.c()),ce(r,1),r.m(i.parentNode,i))},i(e){o||(ce(t.$$.fragment,e),ce(r),o=!0)},o(e){ue(t.$$.fragment,e),ue(r),o=!1},d(e){me(t,e),e&&$(n),l[s].d(e),e&&$(i)}}}function Ls(e){let t,n;return t=new $s({props:{buttonAction:e[0].reset,$$slots:{default:[zs]},$$scope:{ctx:e}}}),{c(){pe(t.$$.fragment)},m(e,s){de(t,e,s),n=!0},p(e,n){const s={};1&n&&(s.buttonAction=e[0].reset),576&n&&(s.$$scope={dirty:n,ctx:e}),t.$set(s)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Is(e){let t,n=e[6]("hint")+"";return{c(){t=I(n)},m(e,n){A(e,t,n)},p(e,s){64&s&&n!==(n=e[6]("hint")+"")&&q(t,n)},d(e){e&&$(t)}}}function Cs(e){let t,n;return t=new $s({props:{buttonAction:e[0].next,$$slots:{default:[Ps]},$$scope:{ctx:e}}}),{c(){pe(t.$$.fragment)},m(e,s){de(t,e,s),n=!0},p(e,n){const s={};1&n&&(s.buttonAction=e[0].next),576&n&&(s.$$scope={dirty:n,ctx:e}),t.$set(s)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Ms(e){let t,n;return t=new $s({props:{buttonAction:e[0].evaluate,$$slots:{default:[qs]},$$scope:{ctx:e}}}),{c(){pe(t.$$.fragment)},m(e,s){de(t,e,s),n=!0},p(e,n){const s={};1&n&&(s.buttonAction=e[0].evaluate),576&n&&(s.$$scope={dirty:n,ctx:e}),t.$set(s)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Rs(e){let t,n;return t=new $s({props:{buttonAction:e[0].evaluate,$$slots:{default:[Ds]},$$scope:{ctx:e}}}),{c(){pe(t.$$.fragment)},m(e,s){de(t,e,s),n=!0},p(e,n){const s={};1&n&&(s.buttonAction=e[0].evaluate),576&n&&(s.$$scope={dirty:n,ctx:e}),t.$set(s)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Ps(e){let t,n=e[6]("next")+"";return{c(){t=I(n)},m(e,n){A(e,t,n)},p(e,s){64&s&&n!==(n=e[6]("next")+"")&&q(t,n)},d(e){e&&$(t)}}}function qs(e){let t,n=e[6]("evaluate")+"";return{c(){t=I(n)},m(e,n){A(e,t,n)},p(e,s){64&s&&n!==(n=e[6]("evaluate")+"")&&q(t,n)},d(e){e&&$(t)}}}function Ds(e){let t,n=e[6]("evaluate")+"";return{c(){t=I(n)},m(e,n){A(e,t,n)},p(e,s){64&s&&n!==(n=e[6]("evaluate")+"")&&q(t,n)},d(e){e&&$(t)}}}function zs(e){let t,n=e[6]("reset")+"";return{c(){t=I(n)},m(e,n){A(e,t,n)},p(e,s){64&s&&n!==(n=e[6]("reset")+"")&&q(t,n)},d(e){e&&$(t)}}}function Us(e){let t,n,s,r=e[5].hint+"";return{c(){t=O("p"),n=I("💡 "),s=new z,s.a=null,P(t,"class","quizdown-hint svelte-kh8fob")},m(e,i){A(e,t,i),T(t,n),s.m(r,t)},p(e,t){32&t&&r!==(r=e[5].hint+"")&&s.p(r)},d(e){e&&$(t)}}}function js(e){let t,n,s,r,i,o,a,l;const c=[Ls,Os],u=[];function h(e,t){return e[1]===e[3].max?0:1}n=h(e),s=u[n]=c[n](e);let f=e[2]&&Us(e);return{c(){t=O("div"),s.c(),r=C(),f&&f.c(),i=C(),o=O("div"),a=O("a"),a.textContent="quizdown v0.3.1",P(t,"class","button-row svelte-kh8fob"),P(a,"href","https://github.com/bonartm/quizdown-js"),P(a,"class","svelte-kh8fob"),P(o,"class","quizdown-credits svelte-kh8fob")},m(e,s){A(e,t,s),u[n].m(t,null),A(e,r,s),f&&f.m(e,s),A(e,i,s),A(e,o,s),T(o,a),l=!0},p(e,[r]){let o=n;n=h(e),n===o?u[n].p(e,r):(ae(),ue(u[o],1,1,(()=>{u[o]=null})),le(),s=u[n],s?s.p(e,r):(s=u[n]=c[n](e),s.c()),ce(s,1),s.m(t,null)),e[2]?f?f.p(e,r):(f=Us(e),f.c(),f.m(i.parentNode,i)):f&&(f.d(1),f=null)},i(e){l||(ce(s),l=!0)},o(e){ue(s),l=!1},d(e){e&&$(t),u[n].d(),e&&$(r),f&&f.d(e),e&&$(i),e&&$(o)}}}function Fs(t,n,s){let r,i,o,a,c,h,f=e,p=e;u(t,cs,(e=>s(6,c=e))),t.$$.on_destroy.push((()=>f())),t.$$.on_destroy.push((()=>p()));let{quiz:d}=n,m=!1;return t.$$set=e=>{"quiz"in e&&s(0,d=e.quiz)},t.$$.update=()=>{1&t.$$.dirty&&(s(3,r=d.counter),f(),f=l(r,(e=>s(1,a=e)))),1&t.$$.dirty&&(s(4,i=d.finished),p(),p=l(i,(e=>s(7,h=e)))),3&t.$$.dirty&&s(5,o=d.questions[a]),2&t.$$.dirty&&s(2,m=!1)},[d,a,m,r,i,o,c,h,()=>s(2,m=!m)]}class Bs extends be{constructor(e){super(),ye(this,e,Fs,js,a,{quiz:0},Ns)}}function Gs(e){return"[object Date]"===Object.prototype.toString.call(e)}function Ks(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)=>Ks(e[n],t)));return e=>n.map((t=>t(e)))}if("object"===n){if(!e||!t)throw new Error("Object cannot be null");if(Gs(e)&&Gs(t)){e=e.getTime();const n=(t=t.getTime())-e;return t=>new Date(e+t*n)}const n=Object.keys(t),s={};return n.forEach((n=>{s[n]=Ks(e[n],t[n])})),e=>{const t={};return n.forEach((n=>{t[n]=s[n](e)})),t}}if("number"===n){const n=t-e;return t=>e+t*n}throw new Error(`Cannot interpolate ${n} values`)}function Vs(e){E(e,"svelte-1ma47z2",".quizdown-progress.svelte-1ma47z2.svelte-1ma47z2{height:0.4em;width:100%;position:relative}.quizdown-progress.svelte-1ma47z2 .progress-slider.svelte-1ma47z2{background-color:var(--quizdown-color-primary);height:100%;display:block}")}function Hs(t){let n,s;return{c(){n=O("div"),s=O("div"),P(s,"class","progress-slider svelte-1ma47z2"),D(s,"width",t[2]),P(n,"class","quizdown-progress svelte-1ma47z2"),P(n,"data-label","")},m(e,t){A(e,n,t),T(n,s)},p(e,[t]){4&t&&D(s,"width",e[2])},i:e,o:e,d(e){e&&$(n)}}}function Ys(s,r,i){let o,a,c,h,f,p,d=e,g=e;s.$$.on_destroy.push((()=>d())),s.$$.on_destroy.push((()=>g()));let{quiz:y}=r;const b=function(e,s={}){const r=Ve(e);let i,o=e;function a(a,l){if(null==e)return r.set(e=a),Promise.resolve();o=a;let c=i,u=!1,{delay:h=0,duration:f=400,easing:p=t,interpolate:d=Ks}=n(n({},s),l);if(0===f)return c&&(c.abort(),c=null),r.set(e=o),Promise.resolve();const g=m()+h;let y;return i=v((t=>{if(tf?(r.set(e=a),!1):(r.set(e=y(p(n/f))),!0)})),i.promise}return{set:a,update:(t,n)=>a(t(o,e),n),subscribe:r.subscribe}}(0,{duration:400,easing:ve});return u(s,b,(e=>i(7,p=e))),s.$$set=e=>{"quiz"in e&&i(4,y=e.quiz)},s.$$.update=()=>{16&s.$$.dirty&&(i(0,o=y.counter),g(),g=l(o,(e=>i(6,f=e)))),16&s.$$.dirty&&(i(1,a=y.finished),d(),d=l(a,(e=>i(5,h=e)))),112&s.$$.dirty&&(h?b.set(y.counter.max-.5):b.set(f+.1)),144&s.$$.dirty&&i(2,c=String(p/(y.counter.max-.5)*100)+"%")},[o,a,c,b,y,h,f,p]}class Xs extends be{constructor(e){super(),ye(this,e,Ys,Hs,a,{quiz:4},Vs)}}var Ws={next:"Next",previous:"Previous",evaluate:"Evaluate",reset:"One more time!",hint:"💡 Show hint",resultsTitle:"Your quiz results",resultsText:"You have answered {points} out of {total} questions correctly!"},Js={next:"Weiter",previous:"Zurück",evaluate:"Zum Ergebnis",reset:"Noch einmal!",hint:"💡 Tipp anzeigen",resultsTitle:"Ihr Ergebnis",resultsText:"Sie haben {points} von {total} Fragen richtig beantwortet!"},Zs={next:"Suivant",previous:"Précédent",evaluate:"Réponse",reset:"Recommencer!",hint:"💡 Indice",resultsTitle:"Vos résultats",resultsText:"Vous avez répondu correctement à {points} questions sur {total}!"},Qs={next:"Siguiente",previous:"Anterior",evaluate:"Respuesta",reset:"Otra vez!",hint:"💡 Pista",resultsTitle:"Resultados",resultsText:"Ha acertado a {points} preguntas de {total}!"};function er(e){Pn("de",Js),Pn("en",Ws),Pn("fr",Zs),Pn("es",Qs),function(e){const{formats:t}=e,n=Fn(e,["formats"]),s=e.initialLocale||e.fallbackLocale;Object.assign(Bn,n,{initialLocale:s}),t&&("number"in t&&Object.assign(Bn.formats.number,t.number),"date"in t&&Object.assign(Bn.formats.date,t.date),"time"in t&&Object.assign(Bn.formats.time,t.time)),Hn.set(s)}({fallbackLocale:"en",initialLocale:null===e?"undefined"==typeof window?null:window.navigator.language||window.navigator.languages[0]:e})}function tr(e){E(e,"svelte-18qsn2d","@import 'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.6.0/build/styles/github.min.css';@import 'https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.css';img{max-height:400px;border-radius:4px;max-width:100%;height:auto}code{padding:0 0.4rem;font-size:85%;color:#333;white-space:pre-wrap;border-radius:4px;padding:0.2em 0.4em;background-color:#f8f8f8;font-family:Consolas, Monaco, monospace}a{color:var(--quizdown-color-primary)}.quizdown-content.svelte-18qsn2d{padding:1rem;max-width:900px;margin:auto}.quizdown-card.svelte-18qsn2d{box-shadow:0 4px 8px 0 rgba(0, 0, 0, 0.2);border-radius:0 0 4px 4px}.quizdown-container.svelte-18qsn2d{padding:2px 16px}")}function nr(e){let t,n,s,r,i,o,a,l,c;return s=new Xs({props:{quiz:e[0]}}),o=new _s({props:{quiz:e[0]}}),l=new Bs({props:{quiz:e[0]}}),{c(){t=O("div"),n=O("div"),pe(s.$$.fragment),r=C(),i=O("div"),pe(o.$$.fragment),a=C(),pe(l.$$.fragment),P(i,"class","quizdown-container svelte-18qsn2d"),P(n,"class","quizdown-card svelte-18qsn2d"),P(t,"class","quizdown-content svelte-18qsn2d")},m(u,h){A(u,t,h),T(t,n),de(s,n,null),T(n,r),T(n,i),de(o,i,null),T(i,a),de(l,i,null),e[2](t),c=!0},p(e,[t]){const n={};1&t&&(n.quiz=e[0]),s.$set(n);const r={};1&t&&(r.quiz=e[0]),o.$set(r);const i={};1&t&&(i.quiz=e[0]),l.$set(i)},i(e){c||(ce(s.$$.fragment,e),ce(o.$$.fragment,e),ce(l.$$.fragment,e),c=!0)},o(e){ue(s.$$.fragment,e),ue(o.$$.fragment,e),ue(l.$$.fragment,e),c=!1},d(n){n&&$(t),me(s),me(o),me(l),e[2](null)}}}function sr(e,t,n){var s=this&&this.__awaiter||function(e,t,n,s){return new(n||(n=Promise))((function(r,i){function o(e){try{l(s.next(e))}catch(e){i(e)}}function a(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}l((s=s.apply(e,t||[])).next())}))};let r,{quiz:i}=t;return er(i.config.locale),H((()=>s(void 0,void 0,void 0,(function*(){let e=i.config.primaryColor,t=i.config.secondaryColor,n=i.config.textColor;r.style.setProperty("--quizdown-color-primary",e),r.style.setProperty("--quizdown-color-secondary",t),r.style.setProperty("--quizdown-color-text",n)})))),e.$$set=e=>{"quiz"in e&&n(0,i=e.quiz)},[i,r,function(e){X[e?"unshift":"push"]((()=>{r=e,n(1,r)}))}]}class rr extends be{constructor(e){super(),ye(this,e,sr,nr,a,{quiz:0},tr)}} -/*! @license DOMPurify 2.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.0/LICENSE */var ir=Object.hasOwnProperty,or=Object.setPrototypeOf,ar=Object.isFrozen,lr=Object.getPrototypeOf,cr=Object.getOwnPropertyDescriptor,ur=Object.freeze,hr=Object.seal,fr=Object.create,pr="undefined"!=typeof Reflect&&Reflect,dr=pr.apply,mr=pr.construct;dr||(dr=function(e,t,n){return e.apply(t,n)}),ur||(ur=function(e){return e}),hr||(hr=function(e){return e}),mr||(mr=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1?n-1:0),r=1;r/gm),Gr=hr(/^data-[\-\w.\u00B7-\uFFFF]/),Kr=hr(/^aria-[\-\w]+$/),Vr=hr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Hr=hr(/^(?:\w+script|data):/i),Yr=hr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Xr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function Wr(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:Jr(),n=function(t){return e(t)};if(n.version="2.3.0",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var s=t.document,r=t.document,i=t.DocumentFragment,o=t.HTMLTemplateElement,a=t.Node,l=t.Element,c=t.NodeFilter,u=t.NamedNodeMap,h=void 0===u?t.NamedNodeMap||t.MozNamedAttrMap:u,f=t.Text,p=t.Comment,d=t.DOMParser,m=t.trustedTypes,g=l.prototype,y=Or(g,"cloneNode"),b=Or(g,"nextSibling"),v=Or(g,"childNodes"),w=Or(g,"parentNode");if("function"==typeof o){var k=r.createElement("template");k.content&&k.content.ownerDocument&&(r=k.content.ownerDocument)}var E=Zr(m,s),x=E&&te?E.createHTML(""):"",_=r,S=_.implementation,T=_.createNodeIterator,A=_.createDocumentFragment,$=_.getElementsByTagName,N=s.importNode,O={};try{O=Nr(r).documentMode?r.documentMode:{}}catch(e){}var L={};n.isSupported="function"==typeof w&&S&&void 0!==S.createHTMLDocument&&9!==O;var I=Fr,C=Br,M=Gr,R=Kr,P=Hr,q=Yr,D=Vr,z=null,U=$r({},[].concat(Wr(Lr),Wr(Ir),Wr(Cr),Wr(Rr),Wr(qr))),j=null,F=$r({},[].concat(Wr(Dr),Wr(zr),Wr(Ur),Wr(jr))),B=null,G=null,K=!0,V=!0,H=!1,Y=!1,X=!1,W=!1,J=!1,Z=!1,Q=!1,ee=!0,te=!1,ne=!0,se=!0,re=!1,ie={},oe=$r({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ae=null,le=$r({},["audio","video","img","source","image","track"]),ce=null,ue=$r({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),he="http://www.w3.org/1998/Math/MathML",fe="http://www.w3.org/2000/svg",pe="http://www.w3.org/1999/xhtml",de=pe,me=!1,ge=null,ye=r.createElement("form"),be=function(e){ge&&ge===e||(e&&"object"===(void 0===e?"undefined":Xr(e))||(e={}),e=Nr(e),z="ALLOWED_TAGS"in e?$r({},e.ALLOWED_TAGS):U,j="ALLOWED_ATTR"in e?$r({},e.ALLOWED_ATTR):F,ce="ADD_URI_SAFE_ATTR"in e?$r(Nr(ue),e.ADD_URI_SAFE_ATTR):ue,ae="ADD_DATA_URI_TAGS"in e?$r(Nr(le),e.ADD_DATA_URI_TAGS):le,B="FORBID_TAGS"in e?$r({},e.FORBID_TAGS):{},G="FORBID_ATTR"in e?$r({},e.FORBID_ATTR):{},ie="USE_PROFILES"in e&&e.USE_PROFILES,K=!1!==e.ALLOW_ARIA_ATTR,V=!1!==e.ALLOW_DATA_ATTR,H=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Y=e.SAFE_FOR_TEMPLATES||!1,X=e.WHOLE_DOCUMENT||!1,Z=e.RETURN_DOM||!1,Q=e.RETURN_DOM_FRAGMENT||!1,ee=!1!==e.RETURN_DOM_IMPORT,te=e.RETURN_TRUSTED_TYPE||!1,J=e.FORCE_BODY||!1,ne=!1!==e.SANITIZE_DOM,se=!1!==e.KEEP_CONTENT,re=e.IN_PLACE||!1,D=e.ALLOWED_URI_REGEXP||D,de=e.NAMESPACE||pe,Y&&(V=!1),Q&&(Z=!0),ie&&(z=$r({},[].concat(Wr(qr))),j=[],!0===ie.html&&($r(z,Lr),$r(j,Dr)),!0===ie.svg&&($r(z,Ir),$r(j,zr),$r(j,jr)),!0===ie.svgFilters&&($r(z,Cr),$r(j,zr),$r(j,jr)),!0===ie.mathMl&&($r(z,Rr),$r(j,Ur),$r(j,jr))),e.ADD_TAGS&&(z===U&&(z=Nr(z)),$r(z,e.ADD_TAGS)),e.ADD_ATTR&&(j===F&&(j=Nr(j)),$r(j,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&$r(ce,e.ADD_URI_SAFE_ATTR),se&&(z["#text"]=!0),X&&$r(z,["html","head","body"]),z.table&&($r(z,["tbody"]),delete B.tbody),ur&&ur(e),ge=e)},ve=$r({},["mi","mo","mn","ms","mtext"]),we=$r({},["foreignobject","desc","title","annotation-xml"]),ke=$r({},Ir);$r(ke,Cr),$r(ke,Mr);var Ee=$r({},Rr);$r(Ee,Pr);var xe=function(e){var t=w(e);t&&t.tagName||(t={namespaceURI:pe,tagName:"template"});var n=wr(e.tagName),s=wr(t.tagName);if(e.namespaceURI===fe)return t.namespaceURI===pe?"svg"===n:t.namespaceURI===he?"svg"===n&&("annotation-xml"===s||ve[s]):Boolean(ke[n]);if(e.namespaceURI===he)return t.namespaceURI===pe?"math"===n:t.namespaceURI===fe?"math"===n&&we[s]:Boolean(Ee[n]);if(e.namespaceURI===pe){if(t.namespaceURI===fe&&!we[s])return!1;if(t.namespaceURI===he&&!ve[s])return!1;var r=$r({},["title","style","font","a","script"]);return!Ee[n]&&(r[n]||!ke[n])}return!1},_e=function(e){vr(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=x}catch(t){e.remove()}}},Se=function(e,t){try{vr(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){vr(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!j[e])if(Z||Q)try{_e(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Te=function(e){var t=void 0,n=void 0;if(J)e=""+e;else{var s=kr(e,/^[\r\n\t ]+/);n=s&&s[0]}var i=E?E.createHTML(e):e;if(de===pe)try{t=(new d).parseFromString(i,"text/html")}catch(e){}if(!t||!t.documentElement){t=S.createDocument(de,"template",null);try{t.documentElement.innerHTML=me?"":i}catch(e){}}var o=t.body||t.documentElement;return e&&n&&o.insertBefore(r.createTextNode(n),o.childNodes[0]||null),de===pe?$.call(t,X?"html":"body")[0]:X?t.documentElement:o},Ae=function(e){return T.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},$e=function(e){return!(e instanceof f||e instanceof p)&&!("string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof h&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore)},Ne=function(e){return"object"===(void 0===a?"undefined":Xr(a))?e instanceof a:e&&"object"===(void 0===e?"undefined":Xr(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Oe=function(e,t,s){L[e]&&yr(L[e],(function(e){e.call(n,t,s,ge)}))},Le=function(e){var t=void 0;if(Oe("beforeSanitizeElements",e,null),$e(e))return _e(e),!0;if(kr(e.nodeName,/[\u0080-\uFFFF]/))return _e(e),!0;var s=wr(e.nodeName);if(Oe("uponSanitizeElement",e,{tagName:s,allowedTags:z}),!Ne(e.firstElementChild)&&(!Ne(e.content)||!Ne(e.content.firstElementChild))&&Sr(/<[/\w]/g,e.innerHTML)&&Sr(/<[/\w]/g,e.textContent))return _e(e),!0;if(!z[s]||B[s]){if(se&&!oe[s]){var r=w(e)||e.parentNode,i=v(e)||e.childNodes;if(i&&r)for(var o=i.length-1;o>=0;--o)r.insertBefore(y(i[o],!0),b(e))}return _e(e),!0}return e instanceof l&&!xe(e)?(_e(e),!0):"noscript"!==s&&"noembed"!==s||!Sr(/<\/no(script|embed)/i,e.innerHTML)?(Y&&3===e.nodeType&&(t=e.textContent,t=Er(t,I," "),t=Er(t,C," "),e.textContent!==t&&(vr(n.removed,{element:e.cloneNode()}),e.textContent=t)),Oe("afterSanitizeElements",e,null),!1):(_e(e),!0)},Ie=function(e,t,n){if(ne&&("id"===t||"name"===t)&&(n in r||n in ye))return!1;if(V&&!G[t]&&Sr(M,t));else if(K&&Sr(R,t));else{if(!j[t]||G[t])return!1;if(ce[t]);else if(Sr(D,Er(n,q,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==xr(n,"data:")||!ae[e]){if(H&&!Sr(P,Er(n,q,"")));else if(n)return!1}else;}return!0},Ce=function(e){var t=void 0,s=void 0,r=void 0,i=void 0;Oe("beforeSanitizeAttributes",e,null);var o=e.attributes;if(o){var a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:j};for(i=o.length;i--;){var l=t=o[i],c=l.name,u=l.namespaceURI;if(s=_r(t.value),r=wr(c),a.attrName=r,a.attrValue=s,a.keepAttr=!0,a.forceKeepAttr=void 0,Oe("uponSanitizeAttribute",e,a),s=a.attrValue,!a.forceKeepAttr&&(Se(c,e),a.keepAttr))if(Sr(/\/>/i,s))Se(c,e);else{Y&&(s=Er(s,I," "),s=Er(s,C," "));var h=e.nodeName.toLowerCase();if(Ie(h,r,s))try{u?e.setAttributeNS(u,c,s):e.setAttribute(c,s),br(n.removed)}catch(e){}}}Oe("afterSanitizeAttributes",e,null)}},Me=function e(t){var n=void 0,s=Ae(t);for(Oe("beforeSanitizeShadowDOM",t,null);n=s.nextNode();)Oe("uponSanitizeShadowNode",n,null),Le(n)||(n.content instanceof i&&e(n.content),Ce(n));Oe("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e,r){var o=void 0,l=void 0,c=void 0,u=void 0,h=void 0;if((me=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Ne(e)){if("function"!=typeof e.toString)throw Tr("toString is not a function");if("string"!=typeof(e=e.toString()))throw Tr("dirty is not a string, aborting")}if(!n.isSupported){if("object"===Xr(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(Ne(e))return t.toStaticHTML(e.outerHTML)}return e}if(W||be(r),n.removed=[],"string"==typeof e&&(re=!1),re);else if(e instanceof a)1===(l=(o=Te("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===l.nodeName||"HTML"===l.nodeName?o=l:o.appendChild(l);else{if(!Z&&!Y&&!X&&-1===e.indexOf("<"))return E&&te?E.createHTML(e):e;if(!(o=Te(e)))return Z?null:x}o&&J&&_e(o.firstChild);for(var f=Ae(re?e:o);c=f.nextNode();)3===c.nodeType&&c===u||Le(c)||(c.content instanceof i&&Me(c.content),Ce(c),u=c);if(u=null,re)return e;if(Z){if(Q)for(h=A.call(o.ownerDocument);o.firstChild;)h.appendChild(o.firstChild);else h=o;return ee&&(h=N.call(s,h,!0)),h}var p=X?o.outerHTML:o.innerHTML;return Y&&(p=Er(p,I," "),p=Er(p,C," ")),E&&te?E.createHTML(p):p},n.setConfig=function(e){be(e),W=!0},n.clearConfig=function(){ge=null,W=!1},n.isValidAttribute=function(e,t,n){ge||be({});var s=wr(e),r=wr(t);return Ie(s,r,n)},n.addHook=function(e,t){"function"==typeof t&&(L[e]=L[e]||[],vr(L[e],t))},n.removeHook=function(e){L[e]&&br(L[e])},n.removeHooks=function(e){L[e]&&(L[e]=[])},n.removeAllHooks=function(){L={}},n}();const ei=e=>{const t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce(((e,t)=>Math.min(e,t.length)),1/0):0};var ti=(e,{include:t,exclude:n}={})=>{const s=e=>{const s=t=>"string"==typeof t?e===t:t.test(e);return t?t.some(s):!n||!n.some(s)};for(const[t,n]of(e=>{const t=new Set;do{for(const n of Reflect.ownKeys(e))t.add([e,n])}while((e=Reflect.getPrototypeOf(e))&&e!==Object.prototype);return t})(e.constructor.prototype)){if("constructor"===n||!s(n))continue;const r=Reflect.getOwnPropertyDescriptor(t,n);r&&"function"==typeof r.value&&(e[n]=e[n].bind(e))}return e};class ni{constructor(e,t,n,s,r,i){if(0===s.length)throw"no answers for question provided";this.text=e,this.explanation=t,this.hint=n,this.solved=!1,this.options=i,this.answers=s,this.type=r,ti(this),this.reset()}static isEqual(e,t){return JSON.stringify(e)===JSON.stringify(t)}static shuffle(e){let t,n,s=e.length;for(;0!==s;)n=Math.floor(Math.random()*s),s-=1,t=e[s],e[s]=e[n],e[n]=t;return e}reset(){this.selected=[],this.solved=!1,this.options.shuffleAnswers&&(this.answers=ni.shuffle(this.answers))}}class si extends ni{constructor(e,t,n,s,r){r.shuffleAnswers=!0,super(e,t,n,s,"Sequence",r)}check(){let e=this.answers.map((e=>e.id));return this.solved=ni.isEqual(e.sort(),this.selected),this.solved}}class ri extends ni{check(){let e=this.answers.filter((e=>e.correct)).map((e=>e.id)),t=this.selected.map((e=>this.answers[e].id));return this.solved=ni.isEqual(e.sort(),t.sort()),this.solved}}class ii extends ri{constructor(e,t,n,s,r){super(e,t,n,s,"MultipleChoice",r)}}class oi extends ri{constructor(e,t,n,s,r){if(super(e,t,n,s,"SingleChoice",r),this.answers.filter((e=>e.correct)).length>1)throw"Single Choice questions can not have more than one correct answer."}}class ai{constructor(e,t,n,s){this.html=t,this.correct=n,this.id=e,this.comment=s,ti(this)}}class li{constructor(e){this.val=Ve(0),this.max=e,this.subscribe=this.val.subscribe,ti(this)}jump(e){this.val.set(e)}next(){this.val.update((e=>ee>0?e-1:e))}reset(){0==c(this.val)&&this.val.set(1),this.val.set(0)}}class ci{constructor(e,t){if(0==e.length)throw"No questions for quiz provided";this.questions=e,this.counter=new li(this.questions.length),this.finished=Ve(!1),this.points=0,this.config=t,t.shuffleQuestions&&(this.questions=ni.shuffle(e)),ti(this)}current(){let e=c(this.counter);return this.questions[e]}next(){this.counter.next()}previous(){this.counter.previous()}jump(e){this.counter.jump(e)}reset(){this.counter.reset(),this.questions.forEach((e=>e.reset())),this.finished.set(!1)}evaluate(){this.finished.set(!0);var e=0;for(var t of this.questions)t.check(),t.solved&&e++;this.points=e,this.jump(this.counter.max)}}function ui(e,t){return void 0!==e?e:t}const hi={start_on_load:"startOnLoad",shuffle_answers:"shuffleAnswers",shuffle_questions:"shuffleQuestions",primary_color:"primaryColor",secondary_color:"secondaryColor",text_color:"textColor"};class fi{constructor(e){for(const r in hi)n=hi[r],(t=r)in(s=e)&&(s[n]=s[t]);var t,n,s;this.startOnLoad=ui(e.startOnLoad,!0),this.shuffleAnswers=ui(e.shuffleAnswers,!0),this.shuffleQuestions=ui(e.shuffleQuestions,!1),this.primaryColor=ui(e.primaryColor,"steelblue"),this.secondaryColor=ui(e.secondaryColor,"#f2f2f2"),this.textColor=ui(e.textColor,"black"),this.locale=ui(e.locale,null)}}function pi(e,t){let n=new fi(e);for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}var di={exports:{}};function mi(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}di.exports={defaults:{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1},getDefaults:mi,changeDefaults:function(e){di.exports.defaults=e}};const gi=/[&<>"']/,yi=/[&<>"']/g,bi=/[<>"']|&(?!#?\w+;)/,vi=/[<>"']|&(?!#?\w+;)/g,wi={"&":"&","<":"<",">":">",'"':""","'":"'"},ki=e=>wi[e];const Ei=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function xi(e){return e.replace(Ei,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const _i=/(^|[^\[])\^/g;const Si=/[^\w:]/g,Ti=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;const Ai={},$i=/^[^:]+:\/*[^/]*$/,Ni=/^([^:]+:)[\s\S]*$/,Oi=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Li(e,t){Ai[" "+e]||($i.test(e)?Ai[" "+e]=e+"/":Ai[" "+e]=Ii(e,"/",!0));const n=-1===(e=Ai[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(Ni,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(Oi,"$1")+t:e+t}function Ii(e,t,n){const s=e.length;if(0===s)return"";let r=0;for(;r(s=(s=s.source||s).replace(_i,"$1"),e=e.replace(t,s),n),getRegex:()=>new RegExp(e,t)};return n},cleanUrl:function(e,t,n){if(e){let e;try{e=decodeURIComponent(xi(n)).replace(Si,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!Ti.test(n)&&(n=Li(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n},resolveUrl:Li,noopTest:{exec:function(){}},merge:function(e){let t,n,s=1;for(;s{let s=!1,r=t;for(;--r>=0&&"\\"===n[r];)s=!s;return s?"|":" |"})).split(/ \|/);let s=0;if(n.length>t)n.splice(t);else for(;n.length1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}};const{defaults:Mi}=di.exports,{rtrim:Ri,splitCells:Pi,escape:qi,findClosingBracket:Di}=Ci;function zi(e,t,n){const s=t.href,r=t.title?qi(t.title):null,i=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:n,href:s,title:r,text:i}:{type:"image",raw:n,href:s,title:r,text:qi(i)}}var Ui=class{constructor(e){this.options=e||Mi}space(e){const t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Ri(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const s=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=s.length?e.slice(s.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim():t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=Ri(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e}}}nptable(e){const t=this.rules.block.nptable.exec(e);if(t){const e={type:"table",header:Pi(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(e.header.length===e.align.length){let t,n=e.align.length;for(t=0;t ?/gm,"");return{type:"blockquote",raw:t[0],text:e}}}list(e){const t=this.rules.block.list.exec(e);if(t){let e=t[0];const n=t[2],s=n.length>1,r={type:"list",raw:e,ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]},i=t[0].match(this.rules.block.item);let o,a,l,c,u,h,f,p,d,m=!1,g=i.length;l=this.rules.block.listItemStart.exec(i[0]);for(let t=0;tl[1].length:c[1].length>=l[0].length||c[1].length>3){i.splice(t,2,i[t]+(!this.options.pedantic&&c[1].length/i.test(s[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(s[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(s[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:s[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(s[0]):qi(s[0]):s[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=Ri(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=Di(t[2],"()");if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],s="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],s=e[3])}else s=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(e)?n.slice(1):n.slice(1,-1)),zi(t,{href:n?n.replace(this.rules.inline._escapes,"$1"):n,title:s?s.replace(this.rules.inline._escapes,"$1"):s},t[0])}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=(n[2]||n[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e||!e.href){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return zi(n,e,n[0])}}emStrong(e,t,n=""){let s=this.rules.inline.emStrong.lDelim.exec(e);if(!s)return;if(s[3]&&n.match(/[\p{L}\p{N}]/u))return;const r=s[1]||s[2]||"";if(!r||r&&(""===n||this.rules.inline.punctuation.exec(n))){const n=s[0].length-1;let r,i,o=n,a=0;const l="*"===s[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+n);null!=(s=l.exec(t));)if(r=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],r)if(i=r.length,s[3]||s[4])o+=i;else if(!((s[5]||s[6])&&n%3)||(n+i)%3){if(o-=i,!(o>0))return i=Math.min(i,i+o+a),Math.min(n,i)%2?{type:"em",raw:e.slice(0,n+s.index+i+1),text:e.slice(1,n+s.index+i)}:{type:"strong",raw:e.slice(0,n+s.index+i+1),text:e.slice(2,n+s.index+i-1)}}else a+=i}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),s=/^ /.test(e)&&/ $/.test(e);return n&&s&&(e=e.substring(1,e.length-1)),e=qi(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2]}}autolink(e,t){const n=this.rules.inline.autolink.exec(e);if(n){let e,s;return"@"===n[2]?(e=qi(this.options.mangle?t(n[1]):n[1]),s="mailto:"+e):(e=qi(n[1]),s=e),{type:"link",raw:n[0],text:e,href:s,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let n;if(n=this.rules.inline.url.exec(e)){let e,s;if("@"===n[2])e=qi(this.options.mangle?t(n[0]):n[0]),s="mailto:"+e;else{let t;do{t=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(t!==n[0]);e=qi(n[0]),s="www."===n[1]?"http://"+e:e}return{type:"link",raw:n[0],text:e,href:s,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t,n){const s=this.rules.inline.text.exec(e);if(s){let e;return e=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(s[0]):qi(s[0]):s[0]:qi(this.options.smartypants?n(s[0]):s[0]),{type:"text",raw:s[0],text:e}}}};const{noopTest:ji,edit:Fi,merge:Bi}=Ci,Gi={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:ji,table:ji,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};Gi.def=Fi(Gi.def).replace("label",Gi._label).replace("title",Gi._title).getRegex(),Gi.bullet=/(?:[*+-]|\d{1,9}[.)])/,Gi.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,Gi.item=Fi(Gi.item,"gm").replace(/bull/g,Gi.bullet).getRegex(),Gi.listItemStart=Fi(/^( *)(bull) */).replace("bull",Gi.bullet).getRegex(),Gi.list=Fi(Gi.list).replace(/bull/g,Gi.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Gi.def.source+")").getRegex(),Gi._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Gi._comment=/|$)/,Gi.html=Fi(Gi.html,"i").replace("comment",Gi._comment).replace("tag",Gi._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Gi.paragraph=Fi(Gi._paragraph).replace("hr",Gi.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Gi._tag).getRegex(),Gi.blockquote=Fi(Gi.blockquote).replace("paragraph",Gi.paragraph).getRegex(),Gi.normal=Bi({},Gi),Gi.gfm=Bi({},Gi.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),Gi.gfm.nptable=Fi(Gi.gfm.nptable).replace("hr",Gi.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Gi._tag).getRegex(),Gi.gfm.table=Fi(Gi.gfm.table).replace("hr",Gi.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Gi._tag).getRegex(),Gi.pedantic=Bi({},Gi.normal,{html:Fi("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Gi._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ji,paragraph:Fi(Gi.normal._paragraph).replace("hr",Gi.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Gi.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const Ki={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ji,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/\_\_[^_*]*?\*[^_*]*?\_\_|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/\*\*[^_*]*?\_[^_*]*?\*\*|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ji,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};Ki.punctuation=Fi(Ki.punctuation).replace(/punctuation/g,Ki._punctuation).getRegex(),Ki.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Ki.escapedEmSt=/\\\*|\\_/g,Ki._comment=Fi(Gi._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),Ki.emStrong.lDelim=Fi(Ki.emStrong.lDelim).replace(/punct/g,Ki._punctuation).getRegex(),Ki.emStrong.rDelimAst=Fi(Ki.emStrong.rDelimAst,"g").replace(/punct/g,Ki._punctuation).getRegex(),Ki.emStrong.rDelimUnd=Fi(Ki.emStrong.rDelimUnd,"g").replace(/punct/g,Ki._punctuation).getRegex(),Ki._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Ki._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Ki._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,Ki.autolink=Fi(Ki.autolink).replace("scheme",Ki._scheme).replace("email",Ki._email).getRegex(),Ki._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Ki.tag=Fi(Ki.tag).replace("comment",Ki._comment).replace("attribute",Ki._attribute).getRegex(),Ki._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ki._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Ki._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Ki.link=Fi(Ki.link).replace("label",Ki._label).replace("href",Ki._href).replace("title",Ki._title).getRegex(),Ki.reflink=Fi(Ki.reflink).replace("label",Ki._label).getRegex(),Ki.reflinkSearch=Fi(Ki.reflinkSearch,"g").replace("reflink",Ki.reflink).replace("nolink",Ki.nolink).getRegex(),Ki.normal=Bi({},Ki),Ki.pedantic=Bi({},Ki.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Fi(/^!?\[(label)\]\((.*?)\)/).replace("label",Ki._label).getRegex(),reflink:Fi(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ki._label).getRegex()}),Ki.gfm=Bi({},Ki.normal,{escape:Fi(Ki.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),s+="&#"+n+";";return s}const{defaults:eo}=di.exports,{cleanUrl:to,escape:no}=Ci;var so=class{constructor(e){this.options=e||eo}code(e,t,n){const s=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,s);null!=t&&t!==e&&(n=!0,e=t)}return e=e.replace(/\n$/,"")+"\n",s?'
'+(n?e:no(e,!0))+"
\n":"
"+(n?e:no(e,!0))+"
\n"}blockquote(e){return"
\n"+e+"
\n"}html(e){return e}heading(e,t,n,s){return this.options.headerIds?"'+e+"\n":""+e+"\n"}hr(){return this.options.xhtml?"
\n":"
\n"}list(e,t,n){const s=t?"ol":"ul";return"<"+s+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"}listitem(e){return"
  • "+e+"
  • \n"}checkbox(e){return" "}paragraph(e){return"

    "+e+"

    \n"}table(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"}tablerow(e){return"\n"+e+"\n"}tablecell(e,t){const n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"}strong(e){return""+e+""}em(e){return""+e+""}codespan(e){return""+e+""}br(){return this.options.xhtml?"
    ":"
    "}del(e){return""+e+""}link(e,t,n){if(null===(e=to(this.options.sanitize,this.options.baseUrl,e)))return n;let s='",s}image(e,t,n){if(null===(e=to(this.options.sanitize,this.options.baseUrl,e)))return n;let s=''+n+'":">",s}text(e){return e}},ro=class{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}},io=class{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let n=e,s=0;if(this.seen.hasOwnProperty(n)){s=this.seen[e];do{s++,n=e+"-"+s}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=s,this.seen[n]=0),n}slug(e,t={}){const n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}};const oo=so,ao=ro,lo=io,{defaults:co}=di.exports,{unescape:uo}=Ci;const ho=class e{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Yi,this.options.tokenizer=this.options.tokenizer||new Hi,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;const t={block:Xi.normal,inline:Wi.normal};this.options.pedantic?(t.block=Xi.pedantic,t.inline=Wi.pedantic):this.options.gfm&&(t.block=Xi.gfm,this.options.breaks?t.inline=Wi.breaks:t.inline=Wi.gfm),this.tokenizer.rules=t}static get rules(){return{block:Xi,inline:Wi}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens}blockTokens(e,t=[],n=!0){let s,r,i,o,a,l;for(this.options.pedantic&&(e=e.replace(/^ +$/gm,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((n=>!!(s=n.call(this,e,t))&&(e=e.substring(s.raw.length),t.push(s),!0)))))if(s=this.tokenizer.space(e))e=e.substring(s.raw.length),s.type&&t.push(s);else if(s=this.tokenizer.code(e))e=e.substring(s.raw.length),o=t[t.length-1],o&&"paragraph"===o.type?(o.raw+="\n"+s.raw,o.text+="\n"+s.text):t.push(s);else if(s=this.tokenizer.fences(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.heading(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.nptable(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.hr(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.blockquote(e))e=e.substring(s.raw.length),s.tokens=this.blockTokens(s.text,[],n),t.push(s);else if(s=this.tokenizer.list(e)){for(e=e.substring(s.raw.length),i=s.items.length,r=0;r=0&&(t=Math.min(t,s))})),t<1/0&&t>=0&&(a=e.substring(0,t+1))}if(n&&(s=this.tokenizer.paragraph(a)))o=t[t.length-1],l&&"paragraph"===o.type?(o.raw+="\n"+s.raw,o.text+="\n"+s.text):t.push(s),l=a.length!==e.length,e=e.substring(s.raw.length);else if(s=this.tokenizer.text(e))e=e.substring(s.raw.length),o=t[t.length-1],o&&"text"===o.type?(o.raw+="\n"+s.raw,o.text+="\n"+s.text):t.push(s);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return t}inline(e){let t,n,s,r,i,o;const a=e.length;for(t=0;t0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(u));)e.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(u=u.slice(0,a.index)+"["+Ji("a",a[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(u));)u=u.slice(0,a.index)+"["+Ji("a",a[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(a=this.tokenizer.rules.inline.escapedEmSt.exec(u));)u=u.slice(0,a.index)+"++"+u.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(l||(c=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((n=>!!(r=n.call(this,e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))))if(r=this.tokenizer.escape(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.tag(e,n,s))e=e.substring(r.raw.length),n=r.inLink,s=r.inRawBlock,i=t[t.length-1],i&&"text"===r.type&&"text"===i.type?(i.raw+=r.raw,i.text+=r.text):t.push(r);else if(r=this.tokenizer.link(e))e=e.substring(r.raw.length),"link"===r.type&&(r.tokens=this.inlineTokens(r.text,[],!0,s)),t.push(r);else if(r=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(r.raw.length),i=t[t.length-1],"link"===r.type?(r.tokens=this.inlineTokens(r.text,[],!0,s),t.push(r)):i&&"text"===r.type&&"text"===i.type?(i.raw+=r.raw,i.text+=r.text):t.push(r);else if(r=this.tokenizer.emStrong(e,u,c))e=e.substring(r.raw.length),r.tokens=this.inlineTokens(r.text,[],n,s),t.push(r);else if(r=this.tokenizer.codespan(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.br(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.del(e))e=e.substring(r.raw.length),r.tokens=this.inlineTokens(r.text,[],n,s),t.push(r);else if(r=this.tokenizer.autolink(e,Qi))e=e.substring(r.raw.length),t.push(r);else if(n||!(r=this.tokenizer.url(e,Qi))){if(o=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let s;this.options.extensions.startInline.forEach((function(e){s=e.call(this,n),"number"==typeof s&&s>=0&&(t=Math.min(t,s))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(o,s,Zi))e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(c=r.raw.slice(-1)),l=!0,i=t[t.length-1],i&&"text"===i.type?(i.raw+=r.raw,i.text+=r.text):t.push(r);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(r.raw.length),t.push(r);return t}},fo=class e{constructor(e){this.options=e||co,this.options.renderer=this.options.renderer||new oo,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ao,this.slugger=new lo}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e,t=!0){let n,s,r,i,o,a,l,c,u,h,f,p,d,m,g,y,b,v,w,k="";const E=e.length;for(n=0;n0&&"text"===g.tokens[0].type?(g.tokens[0].text=v+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=v+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:v}):m+=v),m+=this.parse(g.tokens,d),u+=this.renderer.listitem(m,b,y);k+=this.renderer.list(u,f,p);continue;case"html":k+=this.renderer.html(h.text);continue;case"paragraph":k+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(u=h.tokens?this.parseInline(h.tokens):h.text;n+1{s(e.text,e.lang,(function(t,n){if(t)return i(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),o--,0===o&&i()}))}),0))})),void(0===o&&i())}try{const n=ho.lex(e,t);return t.walkTokens&&_o.walkTokens(n,t.walkTokens),fo.parse(n,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"

    An error occurred:

    "+wo(e.message+"",!0)+"
    ";throw e}}_o.options=_o.setOptions=function(e){return bo(_o.defaults,e),Eo(_o.defaults),_o},_o.getDefaults=ko,_o.defaults=xo,_o.use=function(...e){const t=bo({},...e),n=_o.defaults.extensions||{renderers:{},childTokens:{}};let s;e.forEach((e=>{if(e.extensions&&(s=!0,e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if(e.renderer){const t=n.renderers?n.renderers[e.name]:null;n.renderers[e.name]=t?function(...n){let s=e.renderer.apply(this,n);return!1===s&&(s=t.apply(this,n)),s}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");n[e.level]?n[e.level].unshift(e.tokenizer):n[e.level]=[e.tokenizer],e.start&&("block"===e.level?n.startBlock?n.startBlock.push(e.start):n.startBlock=[e.start]:"inline"===e.level&&(n.startInline?n.startInline.push(e.start):n.startInline=[e.start]))}e.childTokens&&(n.childTokens[e.name]=e.childTokens)}))),e.renderer){const n=_o.defaults.renderer||new mo;for(const t in e.renderer){const s=n[t];n[t]=(...r)=>{let i=e.renderer[t].apply(n,r);return!1===i&&(i=s.apply(n,r)),i}}t.renderer=n}if(e.tokenizer){const n=_o.defaults.tokenizer||new po;for(const t in e.tokenizer){const s=n[t];n[t]=(...r)=>{let i=e.tokenizer[t].apply(n,r);return!1===i&&(i=s.apply(n,r)),i}}t.tokenizer=n}if(e.walkTokens){const n=_o.defaults.walkTokens;t.walkTokens=t=>{e.walkTokens.call(this,t),n&&n(t)}}s&&(t.extensions=n),_o.setOptions(t)}))},_o.walkTokens=function(e,t){for(const n of e)switch(t(n),n.type){case"table":for(const e of n.tokens.header)_o.walkTokens(e,t);for(const e of n.tokens.cells)for(const n of e)_o.walkTokens(n,t);break;case"list":_o.walkTokens(n.items,t);break;default:_o.defaults.extensions&&_o.defaults.extensions.childTokens&&_o.defaults.extensions.childTokens[n.type]?_o.defaults.extensions.childTokens[n.type].forEach((function(e){_o.walkTokens(n[e],t)})):n.tokens&&_o.walkTokens(n.tokens,t)}},_o.parseInline=function(e,t){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");t=bo({},_o.defaults,t||{}),vo(t);try{const n=ho.lexInline(e,t);return t.walkTokens&&_o.walkTokens(n,t.walkTokens),fo.parseInline(n,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"

    An error occurred:

    "+wo(e.message+"",!0)+"
    ";throw e}},_o.Parser=fo,_o.parser=fo.parse,_o.Renderer=mo,_o.TextRenderer=go,_o.Lexer=ho,_o.lexer=ho.lex,_o.Tokenizer=po,_o.Slugger=yo,_o.parse=_o;var So=_o;const To=Symbol.for("yaml.alias"),Ao=Symbol.for("yaml.document"),$o=Symbol.for("yaml.map"),No=Symbol.for("yaml.pair"),Oo=Symbol.for("yaml.scalar"),Lo=Symbol.for("yaml.seq"),Io=Symbol.for("yaml.node.type"),Co=e=>!!e&&"object"==typeof e&&e[Io]===To,Mo=e=>!!e&&"object"==typeof e&&e[Io]===Ao,Ro=e=>!!e&&"object"==typeof e&&e[Io]===$o,Po=e=>!!e&&"object"==typeof e&&e[Io]===No,qo=e=>!!e&&"object"==typeof e&&e[Io]===Oo,Do=e=>!!e&&"object"==typeof e&&e[Io]===Lo;function zo(e){if(e&&"object"==typeof e)switch(e[Io]){case $o:case Lo:return!0}return!1}function Uo(e){if(e&&"object"==typeof e)switch(e[Io]){case To:case $o:case Oo:case Lo:return!0}return!1}class jo{constructor(e){Object.defineProperty(this,Io,{value:e})}}const Fo=Symbol("break visit"),Bo=Symbol("skip children"),Go=Symbol("remove node");function Ko(e,t){if("object"==typeof t&&(t.Collection||t.Node||t.Value)&&(t=Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t)),Mo(e)){Vo(null,e.contents,t,Object.freeze([e]))===Go&&(e.contents=null)}else Vo(null,e,t,Object.freeze([]))}function Vo(e,t,n,s){let r;if("function"==typeof n?r=n(e,t,s):Ro(t)?n.Map&&(r=n.Map(e,t,s)):Do(t)?n.Seq&&(r=n.Seq(e,t,s)):Po(t)?n.Pair&&(r=n.Pair(e,t,s)):qo(t)?n.Scalar&&(r=n.Scalar(e,t,s)):Co(t)&&n.Alias&&(r=n.Alias(e,t,s)),Uo(r)||Po(r)){const t=s[s.length-1];if(zo(t))t.items[e]=r;else if(Po(t))"key"===e?t.key=r:t.value=r;else{if(!Mo(t)){const e=Co(t)?"alias":"scalar";throw new Error(`Cannot replace node with ${e} parent`)}t.contents=r}return Vo(e,r,n,s)}if("symbol"!=typeof r)if(zo(t)){s=Object.freeze(s.concat(t));for(let e=0;e"!==e[e.length-1]&&t("Verbatim tags must end with a >"),n)}const[,n,s]=e.match(/^(.*!)([^!]*)$/);s||t(`The ${e} tag has no suffix`);const r=this.tags[n];return r?r+decodeURIComponent(s):"!"===n?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+e.substring(n.length).replace(/[!,[\]{}]/g,(e=>Ho[e]));return"!"===e[0]?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags);let s;if(e&&n.length>0&&Uo(e.contents)){const t={};Ko(e.contents,((e,n)=>{Uo(n)&&n.tag&&(t[n.tag]=!0)})),s=Object.keys(t)}else s=[];for(const[r,i]of n)"!!"===r&&"tag:yaml.org,2002:"===i||e&&!s.some((e=>e.startsWith(i)))||t.push(`%TAG ${r} ${i}`);return t.join("\n")}}function Xo(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);throw new Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0}function Wo(e){const t=new Set;return Ko(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function Jo(e,t){for(let n=1;;++n){const s=`${e}${n}`;if(!t.has(s))return s}}Yo.defaultYaml={explicit:!1,version:"1.2"},Yo.defaultTags={"!!":"tag:yaml.org,2002:"};class Zo extends jo{constructor(e){super(To),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t;return Ko(e,{Node:(e,n)=>{if(n===this)return Ko.BREAK;n.anchor===this.source&&(t=n)}}),t}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:s,maxAliasCount:r}=t,i=this.resolve(s);if(!i){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}const o=n.get(i);if(!o||void 0===o.res){throw new ReferenceError("This should not happen: Alias anchor was not resolved?")}if(r>=0&&(o.count+=1,0===o.aliasCount&&(o.aliasCount=Qo(s,i,n)),o.count*o.aliasCount>r)){throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return o.res}toString(e,t,n){const s=`*${this.source}`;if(e){if(Xo(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(e.implicitKey)return`${s} `}return s}}function Qo(e,t,n){if(Co(t)){const s=t.resolve(e),r=n&&s&&n.get(s);return r?r.count*r.aliasCount:0}if(zo(t)){let s=0;for(const r of t.items){const t=Qo(e,r,n);t>s&&(s=t)}return s}if(Po(t)){const s=Qo(e,t.key,n),r=Qo(e,t.value,n);return Math.max(s,r)}return 1}function ea(e,t,n){if(Array.isArray(e))return e.map(((e,t)=>ea(e,String(t),n)));if(e&&"function"==typeof e.toJSON){if(!n||(!qo(s=e)&&!zo(s)||!s.anchor))return e.toJSON(t,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};const i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}var s;return"bigint"!=typeof e||n&&n.keep?e:Number(e)}const ta=e=>!e||"function"!=typeof e&&"object"!=typeof e;class na extends jo{constructor(e){super(Oo),this.value=e}toJSON(e,t){return t&&t.keep?this.value:ea(this.value,e,t)}toString(){return String(this.value)}}na.BLOCK_FOLDED="BLOCK_FOLDED",na.BLOCK_LITERAL="BLOCK_LITERAL",na.PLAIN="PLAIN",na.QUOTE_DOUBLE="QUOTE_DOUBLE",na.QUOTE_SINGLE="QUOTE_SINGLE";function sa(e,t,n){var s,r;if(Uo(e))return e;if(Po(e)){const t=null===(r=(s=n.schema[$o]).createNode)||void 0===r?void 0:r.call(s,n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||"function"==typeof BigInt&&e instanceof BigInt)&&(e=e.valueOf());const{onAnchor:i,onTagObj:o,schema:a,sourceObjects:l}=n;let c;if(e&&"object"==typeof e){if(c=l.get(e),c)return c.anchor||(c.anchor=i(e)),new Zo(c.anchor);c={anchor:null,node:null},l.set(e,c)}t&&t.startsWith("!!")&&(t="tag:yaml.org,2002:"+t.slice(2));let u=function(e,t,n){if(t){const e=n.filter((e=>e.tag===t)),s=e.find((e=>!e.format))||e[0];if(!s)throw new Error(`Tag ${t} not found`);return s}return n.find((t=>t.identify&&t.identify(e)&&!t.format))}(e,t,a.tags);if(!u){if(e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e)return new na(e);u=e instanceof Map?a[$o]:Symbol.iterator in Object(e)?a[Lo]:a[$o]}o&&(o(u),delete n.onTagObj);const h=(null==u?void 0:u.createNode)?u.createNode(n.schema,e,n):new na(e);return t&&(h.tag=t),c&&(c.node=h),h}function ra(e,t,n){let s=n;for(let e=t.length-1;e>=0;--e){const n=t[e];if("number"==typeof n&&Number.isInteger(n)&&n>=0){const e=[];e[n]=s,s=e}else{const e={};Object.defineProperty(e,"symbol"==typeof n?n:String(n),{value:s,writable:!0,enumerable:!0,configurable:!0}),s=e}}return sa(s,void 0,{onAnchor(){throw new Error("Repeated objects are not supported here")},schema:e,sourceObjects:new Map})}const ia=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class oa extends jo{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}addIn(e,t){if(ia(e))this.add(t);else{const[n,...s]=e,r=this.get(n,!0);if(zo(r))r.addIn(s,t);else{if(void 0!==r||!this.schema)throw new Error(`Expected YAML collection at ${n}. Remaining path: ${s}`);this.set(n,ra(this.schema,s,t))}}}deleteIn([e,...t]){if(0===t.length)return this.delete(e);const n=this.get(e,!0);if(zo(n))return n.deleteIn(t);throw new Error(`Expected YAML collection at ${e}. Remaining path: ${t}`)}getIn([e,...t],n){const s=this.get(e,!0);return 0===t.length?!n&&qo(s)?s.value:s:zo(s)?s.getIn(t,n):void 0}hasAllNullValues(e){return this.items.every((t=>{if(!Po(t))return!1;const n=t.value;return null==n||e&&qo(n)&&null==n.value&&!n.commentBefore&&!n.comment&&!n.tag}))}hasIn([e,...t]){if(0===t.length)return this.has(e);const n=this.get(e,!0);return!!zo(n)&&n.hasIn(t)}setIn([e,...t],n){if(0===t.length)this.set(e,n);else{const s=this.get(e,!0);if(zo(s))s.setIn(t,n);else{if(void 0!==s||!this.schema)throw new Error(`Expected YAML collection at ${e}. Remaining path: ${t}`);this.set(e,ra(this.schema,t,n))}}}}function aa(e,t,n){return n?n.includes("\n")?`${e}\n`+n.replace(/^/gm,`${t||""}#`):e.endsWith(" ")?`${e}#${n}`:`${e} #${n}`:e}oa.maxFlowStringSingleLineLength=60;const la="flow",ca="block",ua="quoted";function ha(e,t,n="flow",{indentAtStart:s,lineWidth:r=80,minContentWidth:i=20,onFold:o,onOverflow:a}={}){if(!r||r<0)return e;const l=Math.max(1+i,1+r-t.length);if(e.length<=l)return e;const c=[],u={};let h,f,p=r-t.length;"number"==typeof s&&(s>r-Math.max(2,i)?c.push(0):p=r-s);let d,m=!1,g=-1,y=-1,b=-1;for(n===ca&&(g=fa(e,g),-1!==g&&(p=g+l));d=e[g+=1];){if(n===ua&&"\\"===d){switch(y=g,e[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}b=g}if("\n"===d)n===ca&&(g=fa(e,g)),p=g+l,h=void 0;else{if(" "===d&&f&&" "!==f&&"\n"!==f&&"\t"!==f){const t=e[g+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(h=g)}if(g>=p)if(h)c.push(h),p=h+l,h=void 0;else if(n===ua){for(;" "===f||"\t"===f;)f=d,d=e[g+=1],m=!0;const t=g>b+1?g-2:y-1;if(u[t])return e;c.push(t),u[t]=!0,p=t+l,h=void 0}else m=!0}f=d}if(m&&a&&a(),0===c.length)return e;o&&o();let v=e.slice(0,c[0]);for(let s=0;s({indentAtStart:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),da=e=>/^(%|---|\.\.\.)/m.test(e);function ma(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:s}=t,r=t.options.doubleQuotedMinMultiLineLength,i=t.indent||(da(e)?" ":"");let o="",a=0;for(let e=0,t=n[e];t;t=n[++e])if(" "===t&&"\\"===n[e+1]&&"n"===n[e+2]&&(o+=n.slice(a,e)+"\\ ",e+=1,a=e,t="\\"),"\\"===t)switch(n[e+1]){case"u":{o+=n.slice(a,e);const t=n.substr(e+2,4);switch(t){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:"00"===t.substr(0,2)?o+="\\x"+t.substr(2):o+=n.substr(e,6)}e+=5,a=e+1}break;case"n":if(s||'"'===n[e+2]||n.lengths)return!0;if(n=t+1,r-n<=s)return!1}return!0}(n,s.options.lineWidth,o.length));if(!n)return a?"|\n":">\n";let l,c;for(c=n.length;c>0;--c){const e=n[c-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let u=n.substring(c);const h=u.indexOf("\n");-1===h?l="-":n===u||h!==u.length-1?(l="+",i&&i()):l="",u&&(n=n.slice(0,-u.length),"\n"===u[u.length-1]&&(u=u.slice(0,-1)),u=u.replace(/\n+(?!\n|$)/g,`$&${o}`));let f,p=!1,d=-1;for(f=0;f")+(p?o?"2":"1":"")+l;if(e&&(g+=" #"+e.replace(/ ?[\r\n]+/g," "),r&&r()),a)return`${g}\n${o}${m}${n=n.replace(/\n+/g,`$&${o}`)}${u}`;return`${g}\n${o}${ha(`${m}${n=n.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${o}`)}${u}`,o,ca,pa(s))}`}function ba(e,t,n,s){const{implicitKey:r,inFlow:i}=t,o="string"==typeof e.value?e:Object.assign({},e,{value:String(e.value)});let{type:a}=e;a!==na.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=na.QUOTE_DOUBLE);const l=e=>{switch(e){case na.BLOCK_FOLDED:case na.BLOCK_LITERAL:return r||i?ma(o.value,t):ya(o,t,n,s);case na.QUOTE_DOUBLE:return ma(o.value,t);case na.QUOTE_SINGLE:return ga(o.value,t);case na.PLAIN:return function(e,t,n,s){var r;const{type:i,value:o}=e,{actualString:a,implicitKey:l,indent:c,inFlow:u}=t;if(l&&/[\n[\]{},]/.test(o)||u&&/[[\]{},]/.test(o))return ma(o,t);if(!o||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o)){const r=-1!==o.indexOf('"'),i=-1!==o.indexOf("'");let a;return a=r&&!i?ga:i&&!r?ma:t.options.singleQuote?ga:ma,l||u||-1===o.indexOf("\n")?a(o,t):ya(e,t,n,s)}if(!l&&!u&&i!==na.PLAIN&&-1!==o.indexOf("\n"))return ya(e,t,n,s);if(""===c&&da(o))return t.forceBlockIndent=!0,ya(e,t,n,s);const h=o.replace(/\n+/g,`$&\n${c}`);if(a)for(const e of t.doc.schema.tags)if(e.default&&"tag:yaml.org,2002:str"!==e.tag&&(null===(r=e.test)||void 0===r?void 0:r.test(h)))return ma(o,t);return l?h:ha(h,c,la,pa(t))}(o,t,n,s);default:return null}};let c=l(a);if(null===c){const{defaultKeyType:e,defaultStringType:n}=t.options,s=r&&e||n;if(c=l(s),null===c)throw new Error(`Unsupported default string type ${s}`)}return c}const va=(e,t)=>({anchors:new Set,doc:e,indent:"",indentStep:"number"==typeof t.indent?" ".repeat(t.indent):" ",options:Object.assign({defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:!1,trueStr:"true",verifyAliasOrder:!0},t)});function wa(e,t,n,s){if(Po(e))return e.toString(t,n,s);if(Co(e))return e.toString(t);let r;const i=Uo(e)?e:t.doc.createNode(e,{onTagObj:e=>r=e});r||(r=function(e,t){if(t.tag){const n=e.filter((e=>e.tag===t.tag));if(n.length>0)return n.find((e=>e.format===t.format))||n[0]}let n,s;if(qo(t)){s=t.value;const r=e.filter((e=>e.identify&&e.identify(s)));n=r.find((e=>e.format===t.format))||r.find((e=>!e.format))}else s=t,n=e.find((e=>e.nodeClass&&s instanceof e.nodeClass));if(!n){const e=s&&s.constructor?s.constructor.name:typeof s;throw new Error(`Tag not resolved for ${e} value`)}return n}(t.doc.schema.tags,i));const o=function(e,t,{anchors:n,doc:s}){const r=[],i=(qo(e)||zo(e))&&e.anchor;return i&&Xo(i)&&(n.add(i),r.push(`&${i}`)),e.tag?r.push(s.directives.tagString(e.tag)):t.default||r.push(s.directives.tagString(t.tag)),r.join(" ")}(i,r,t);o.length>0&&(t.indentAtStart=(t.indentAtStart||0)+o.length+1);const a="function"==typeof r.stringify?r.stringify(i,t,n,s):qo(i)?ba(i,t,n,s):i.toString(t,n,s);return o?qo(i)||"{"===a[0]||"["===a[0]?`${o} ${a}`:`${o}\n${t.indent}${a}`:a}function ka(e,t){"debug"!==e&&"warn"!==e||("undefined"!=typeof process&&process.emitWarning?process.emitWarning(t):console.warn(t))}function Ea(e,t,{key:n,value:s}){if(e&&e.doc.schema.merge&&xa(n))if(Do(s))for(const n of s.items)_a(e,t,n);else if(Array.isArray(s))for(const n of s)_a(e,t,n);else _a(e,t,s);else{const r=ea(n,"",e);if(t instanceof Map)t.set(r,ea(s,r,e));else if(t instanceof Set)t.add(r);else{const i=function(e,t,n){if(null===t)return"";if("object"!=typeof t)return String(t);if(Uo(e)&&n&&n.doc){const t=va(n.doc,{});t.anchors=new Set;for(const e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;const s=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(s);e.length>40&&(e=e.substring(0,36)+'..."'),ka(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return s}return JSON.stringify(t)}(n,r,e),o=ea(s,i,e);i in t?Object.defineProperty(t,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[i]=o}}return t}const xa=e=>"<<"===e||qo(e)&&"<<"===e.value&&(!e.type||e.type===na.PLAIN);function _a(e,t,n){const s=e&&Co(n)?n.resolve(e.doc):null;if(!Ro(s))throw new Error("Merge sources must be map aliases");const r=s.toJSON(null,e,Map);for(const[e,n]of r)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function Sa(e,t,n){const s=sa(e,void 0,n),r=sa(t,void 0,n);return new Ta(s,r)}class Ta{constructor(e,t=null){Object.defineProperty(this,Io,{value:No}),this.key=e,this.value=t}toJSON(e,t){return Ea(t,t&&t.mapAsMap?new Map:{},this)}toString(e,t,n){return e&&e.doc?function({key:e,value:t},n,s,r){const{allNullValues:i,doc:o,indent:a,indentStep:l,options:{indentSeq:c,simpleKeys:u}}=n;let h=Uo(e)&&e.comment||null;if(u){if(h)throw new Error("With simple keys, key nodes cannot have comments");if(zo(e))throw new Error("With simple keys, collection cannot be used as a key value")}let f=!u&&(!e||h&&null==t&&!n.inFlow||zo(e)||(qo(e)?e.type===na.BLOCK_FOLDED||e.type===na.BLOCK_LITERAL:"object"==typeof e));n=Object.assign({},n,{allNullValues:!1,implicitKey:!f&&(u||!i),indent:a+l});let p=!1,d=!1,m=wa(e,n,(()=>p=!0),(()=>d=!0));if(!f&&!n.inFlow&&m.length>1024){if(u)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(n.inFlow){if(i||null==t)return p&&s&&s(),f?`? ${m}`:m}else if(i&&!u||null==t&&f)return p&&(h=null),d&&!h&&r&&r(),aa(`? ${m}`,n.indent,h);p&&(h=null),m=f?`? ${aa(m,n.indent,h)}\n${a}:`:aa(`${m}:`,n.indent,h);let g="",y=null;Uo(t)?(t.spaceBefore&&(g="\n"),t.commentBefore&&(g+=`\n${t.commentBefore.replace(/^/gm,`${n.indent}#`)}`),y=t.comment):t&&"object"==typeof t&&(t=o.createNode(t));n.implicitKey=!1,f||h||!qo(t)||(n.indentAtStart=m.length+1),d=!1,c||!(l.length>=2)||n.inFlow||f||!Do(t)||t.flow||t.tag||t.anchor||(n.indent=n.indent.substr(2));let b=!1;const v=wa(t,n,(()=>b=!0),(()=>d=!0));let w=" ";g||h?w=`${g}\n${n.indent}`:!f&&zo(t)?("["===v[0]||"{"===v[0])&&!v.includes("\n")||(w=`\n${n.indent}`):"\n"===v[0]&&(w="");return n.inFlow?(b&&s&&s(),m+w+v):(b&&(y=null),d&&!y&&r&&r(),aa(m+w+v,n.indent,y))}(this,e,t,n):JSON.stringify(this)}}const Aa={intAsBigInt:!1,logLevel:"warn",prettyErrors:!0,strict:!0,version:"1.2"};function $a({comment:e,flow:t,items:n},s,{blockItem:r,flowChars:i,itemIndent:o,onChompKeep:a,onComment:l}){const{indent:c,indentStep:u}=s,h=t||s.inFlow;h&&(o+=u),s=Object.assign({},s,{indent:o,inFlow:h,type:null});let f=!0,p=!1;const d=n.reduce(((e,t,r)=>{let i=null;if(Uo(t)){if(!p&&t.spaceBefore&&e.push({comment:!0,str:""}),t.commentBefore)for(const n of t.commentBefore.match(/^.*$/gm))e.push({comment:!0,str:`#${n}`});t.comment&&(i=t.comment,f=!1)}else if(Po(t)){const n=Uo(t.key)?t.key:null;if(n){if(!p&&n.spaceBefore&&e.push({comment:!0,str:""}),n.commentBefore)for(const t of n.commentBefore.match(/^.*$/gm))e.push({comment:!0,str:`#${t}`});n.comment&&(f=!1)}if(h){const e=Uo(t.value)?t.value:null;e?(e.comment&&(i=e.comment),(e.comment||e.commentBefore)&&(f=!1)):null==t.value&&n&&n.comment&&(i=n.comment)}}p=!1;let a=wa(t,s,(()=>i=null),(()=>p=!0));return h&&re.str));let s=2;for(const e of d){if(e.comment||e.str.includes("\n")){f=!1;break}s+=e.str.length+2}if(!f||s>oa.maxFlowStringSingleLineLength){m=e;for(const e of n)m+=e?`\n${u}${c}${e}`:"\n";m+=`\n${c}${t}`}else m=`${e} ${n.join(" ")} ${t}`}else{const e=d.map(r);m=e.shift()||"";for(const t of e)m+=t?`\n${c}${t}`:"\n"}return e?(m+="\n"+e.replace(/^/gm,`${c}#`),l&&l()):p&&a&&a(),m}function Na(e,t){const n=qo(t)?t.value:t;for(const s of e)if(Po(s)){if(s.key===t||s.key===n)return s;if(qo(s.key)&&s.key.value===n)return s}}class Oa extends oa{constructor(e){super($o,e),this.items=[]}static get tagName(){return"tag:yaml.org,2002:map"}add(e,t){let n;n=Po(e)?e:new Ta(e&&"object"==typeof e&&"key"in e?e.key:e,e.value);const s=Na(this.items,n.key),r=this.schema&&this.schema.sortMapEntries;if(s){if(!t)throw new Error(`Key ${n.key} already set`);qo(s.value)&&ta(n.value)?s.value.value=n.value:s.value=n.value}else if(r){const e=this.items.findIndex((e=>r(n,e)<0));-1===e?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){const t=Na(this.items,e);if(!t)return!1;return this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const n=Na(this.items,e),s=n&&n.value;return!t&&qo(s)?s.value:s}has(e){return!!Na(this.items,e)}set(e,t){this.add(new Ta(e,t),!0)}toJSON(e,t,n){const s=n?new n:t&&t.mapAsMap?new Map:{};t&&t.onCreate&&t.onCreate(s);for(const e of this.items)Ea(t,s,e);return s}toString(e,t,n){if(!e)return JSON.stringify(this);for(const e of this.items)if(!Po(e))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),$a(this,e,{blockItem:e=>e.str,flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}}const La={collection:"map",createNode:function(e,t,n){const{keepUndefined:s,replacer:r}=n,i=new Oa(e),o=(e,o)=>{if("function"==typeof r)o=r.call(t,e,o);else if(Array.isArray(r)&&!r.includes(e))return;(void 0!==o||s)&&i.items.push(Sa(e,o,n))};if(t instanceof Map)for(const[e,n]of t)o(e,n);else if(t&&"object"==typeof t)for(const e of Object.keys(t))o(e,t[e]);return"function"==typeof e.sortMapEntries&&i.items.sort(e.sortMapEntries),i},default:!0,nodeClass:Oa,tag:"tag:yaml.org,2002:map",resolve:(e,t)=>(Ro(e)||t("Expected a mapping for this tag"),e)};class Ia extends oa{constructor(e){super(Lo,e),this.items=[]}static get tagName(){return"tag:yaml.org,2002:seq"}add(e){this.items.push(e)}delete(e){const t=Ca(e);if("number"!=typeof t)return!1;return this.items.splice(t,1).length>0}get(e,t){const n=Ca(e);if("number"!=typeof n)return;const s=this.items[n];return!t&&qo(s)?s.value:s}has(e){const t=Ca(e);return"number"==typeof t&&te.comment?e.str:`- ${e.str}`,flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:t}):JSON.stringify(this)}}function Ca(e){let t=qo(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}const Ma={collection:"seq",createNode:function(e,t,n){const{replacer:s}=n,r=new Ia(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let i of t){if("function"==typeof s){const n=t instanceof Set?i:String(e++);i=s.call(t,n,i)}r.items.push(sa(i,void 0,n))}}return r},default:!0,nodeClass:Ia,tag:"tag:yaml.org,2002:seq",resolve:(e,t)=>(Do(e)||t("Expected a sequence for this tag"),e)},Ra={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(e,t,n,s)=>ba(e,t=Object.assign({actualString:!0},t),n,s)},Pa={identify:e=>null==e,createNode:()=>new na(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new na(null),stringify:({source:e},t)=>e&&Pa.test.test(e)?e:t.options.nullStr},qa={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new na("t"===e[0]||"T"===e[0]),stringify({source:e,value:t},n){if(e&&qa.test.test(e)){if(t===("t"===e[0]||"T"===e[0]))return e}return t?n.options.trueStr:n.options.falseStr}};function Da({format:e,minFractionDigits:t,tag:n,value:s}){if("bigint"==typeof s)return String(s);const r="number"==typeof s?s:Number(s);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let i=JSON.stringify(s);if(!e&&t&&(!n||"tag:yaml.org,2002:float"===n)&&/^\d/.test(i)){let e=i.indexOf(".");e<0&&(e=i.length,i+=".");let n=t-(i.length-e-1);for(;n-- >0;)i+="0"}return i}const za={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN))$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Da},Ua={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify:({value:e})=>Number(e).toExponential()},ja={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new na(parseFloat(e)),n=e.indexOf(".");return-1!==n&&"0"===e[e.length-1]&&(t.minFractionDigits=e.length-n-1),t},stringify:Da},Fa=e=>"bigint"==typeof e||Number.isInteger(e),Ba=(e,t,n,{intAsBigInt:s})=>s?BigInt(e):parseInt(e.substring(t),n);function Ga(e,t,n){const{value:s}=e;return Fa(s)&&s>=0?n+s.toString(t):Da(e)}const Ka={identify:e=>Fa(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>Ba(e,2,8,n),stringify:e=>Ga(e,8,"0o")},Va={identify:Fa,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>Ba(e,0,10,n),stringify:Da},Ha={identify:e=>Fa(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>Ba(e,2,16,n),stringify:e=>Ga(e,16,"0x")},Ya=[La,Ma,Ra,Pa,qa,Ka,Va,Ha,za,Ua,ja];function Xa(e){return"bigint"==typeof e||Number.isInteger(e)}const Wa=({value:e})=>JSON.stringify(e),Ja=[La,Ma].concat([{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:Wa},{identify:e=>null==e,createNode:()=>new na(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Wa},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>"true"===e,stringify:Wa},{identify:Xa,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>Xa(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:Wa}],{default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)}),Za={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if("function"==typeof Buffer)return Buffer.from(e,"base64");if("function"==typeof atob){const t=atob(e.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let e=0;e1&&t("Each pair must have its own sequence indicator");const e=s.items[0]||new Ta(new na(null));if(s.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${s.commentBefore}\n${e.key.commentBefore}`:s.commentBefore),s.comment){const t=e.value||e.key;t.comment=t.comment?`${s.comment}\n${t.comment}`:s.comment}s=e}e.items[n]=Po(s)?s:new Ta(s)}}else t("Expected a sequence for this tag");return e}function el(e,t,n){const{replacer:s}=n,r=new Ia(e);r.tag="tag:yaml.org,2002:pairs";let i=0;if(t&&Symbol.iterator in Object(t))for(let e of t){let o,a;if("function"==typeof s&&(e=s.call(t,String(i++),e)),Array.isArray(e)){if(2!==e.length)throw new TypeError(`Expected [key, value] tuple: ${e}`);o=e[0],a=e[1]}else if(e&&e instanceof Object){const t=Object.keys(e);if(1!==t.length)throw new TypeError(`Expected { key: value } tuple: ${e}`);o=t[0],a=e[o]}else o=e;r.items.push(Sa(o,a,n))}return r}const tl={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Qa,createNode:el};class nl extends Ia{constructor(){super(),this.add=Oa.prototype.add.bind(this),this.delete=Oa.prototype.delete.bind(this),this.get=Oa.prototype.get.bind(this),this.has=Oa.prototype.has.bind(this),this.set=Oa.prototype.set.bind(this),this.tag=nl.tag}toJSON(e,t){if(!t)return super.toJSON(e);const n=new Map;t&&t.onCreate&&t.onCreate(n);for(const e of this.items){let s,r;if(Po(e)?(s=ea(e.key,"",t),r=ea(e.value,s,t)):s=ea(e,"",t),n.has(s))throw new Error("Ordered maps must not include duplicate keys");n.set(s,r)}return n}}nl.tag="tag:yaml.org,2002:omap";const sl={collection:"seq",identify:e=>e instanceof Map,nodeClass:nl,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=Qa(e,t),s=[];for(const{key:e}of n.items)qo(e)&&(s.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):s.push(e.value));return Object.assign(new nl,n)},createNode(e,t,n){const s=el(e,t,n),r=new nl;return r.items=s.items,r}};function rl({value:e,source:t},n){return t&&(e?il:ol).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const il={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new na(!0),stringify:rl},ol={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>new na(!1),stringify:rl},al={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Da},ll={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify:({value:e})=>Number(e).toExponential()},cl={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new na(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(-1!==n){const s=e.substring(n+1).replace(/_/g,"");"0"===s[s.length-1]&&(t.minFractionDigits=s.length)}return t},stringify:Da},ul=e=>"bigint"==typeof e||Number.isInteger(e);function hl(e,t,n,{intAsBigInt:s}){const r=e[0];if("-"!==r&&"+"!==r||(t+=1),e=e.substring(t).replace(/_/g,""),s){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===r?BigInt(-1)*t:t}const i=parseInt(e,n);return"-"===r?-1*i:i}function fl(e,t,n){const{value:s}=e;if(ul(s)){const e=s.toString(t);return s<0?"-"+n+e.substr(1):n+e}return Da(e)}const pl={identify:ul,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>hl(e,2,2,n),stringify:e=>fl(e,2,"0b")},dl={identify:ul,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>hl(e,1,8,n),stringify:e=>fl(e,8,"0")},ml={identify:ul,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>hl(e,0,10,n),stringify:Da},gl={identify:ul,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>hl(e,2,16,n),stringify:e=>fl(e,16,"0x")};class yl extends Oa{constructor(e){super(e),this.tag=yl.tag}add(e){let t;t=Po(e)?e:"object"==typeof e&&"key"in e&&"value"in e&&null===e.value?new Ta(e.key,null):new Ta(e,null);Na(this.items,t.key)||this.items.push(t)}get(e,t){const n=Na(this.items,e);return!t&&Po(n)?qo(n.key)?n.key.value:n.key:n}set(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof t);const n=Na(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new Ta(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}}yl.tag="tag:yaml.org,2002:set";const bl={collection:"map",identify:e=>e instanceof Set,nodeClass:yl,default:!1,tag:"tag:yaml.org,2002:set",resolve(e,t){if(Ro(e)){if(e.hasAllNullValues(!0))return Object.assign(new yl,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e},createNode(e,t,n){const{replacer:s}=n,r=new yl(e);if(t&&Symbol.iterator in Object(t))for(let e of t)"function"==typeof s&&(e=s.call(t,e,e)),r.items.push(Sa(e,null,n));return r}};function vl(e,t){const n=e[0],s="-"===n||"+"===n?e.substring(1):e,r=e=>t?BigInt(e):Number(e),i=s.replace(/_/g,"").split(":").reduce(((e,t)=>e*r(60)+r(t)),r(0));return"-"===n?r(-1)*i:i}function wl(e){let{value:t}=e,n=e=>e;if("bigint"==typeof t)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return Da(e);let s="";t<0&&(s="-",t*=n(-1));const r=n(60),i=[t%r];return t<60?i.unshift(0):(t=(t-i[0])/r,i.unshift(t%r),t>=60&&(t=(t-i[0])/r,i.unshift(t))),s+i.map((e=>e<10?"0"+String(e):String(e))).join(":").replace(/000000\d*$/,"")}const kl={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>vl(e,n),stringify:wl},El={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>vl(e,!1),stringify:wl},xl={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(xl.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,s,r,i,o,a]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0;let c=Date.UTC(n,s-1,r,i||0,o||0,a||0,l);const u=t[8];if(u&&"Z"!==u){let e=vl(u,!1);Math.abs(e)<30&&(e*=60),c-=6e4*e}return new Date(c)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")},_l=[La,Ma,Ra,Pa,il,ol,pl,dl,ml,gl,al,ll,cl,Za,sl,tl,bl,kl,El,xl],Sl={core:Ya,failsafe:[La,Ma,Ra],json:Ja,yaml11:_l,"yaml-1.1":_l},Tl={binary:Za,bool:qa,float:ja,floatExp:Ua,floatNaN:za,floatTime:El,int:Va,intHex:Ha,intOct:Ka,intTime:kl,map:La,null:Pa,omap:sl,pairs:tl,seq:Ma,set:bl,timestamp:xl},Al={"tag:yaml.org,2002:binary":Za,"tag:yaml.org,2002:omap":sl,"tag:yaml.org,2002:pairs":tl,"tag:yaml.org,2002:set":bl,"tag:yaml.org,2002:timestamp":xl};const $l=(e,t)=>e.keyt.key?1:0;class Nl{constructor({customTags:e,merge:t,resolveKnownTags:n,schema:s,sortMapEntries:r}){this.merge=!!t,this.name=s||"core",this.knownTags=n?Al:{},this.tags=function(e,t){let n=Sl[t];if(!n){const e=Object.keys(Sl).filter((e=>"yaml11"!==e)).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e}`)}if(Array.isArray(e))for(const t of e)n=n.concat(t);else"function"==typeof e&&(n=e(n.slice()));return n.map((e=>{if("string"!=typeof e)return e;const t=Tl[e];if(t)return t;const n=Object.keys(Tl).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown custom tag "${e}"; use one of ${n}`)}))}(e,this.name),Object.defineProperty(this,$o,{value:La}),Object.defineProperty(this,Oo,{value:Ra}),Object.defineProperty(this,Lo,{value:Ma}),this.sortMapEntries=!0===r?$l:r||null}}function Ol(e,t,n,s){if(s&&"object"==typeof s)if(Array.isArray(s))for(let t=0,n=s.length;t"number"==typeof e||e instanceof String||e instanceof Number,n=t.filter(e).map(String);n.length>0&&(t=t.concat(n)),s=t}else void 0===n&&t&&(n=t,t=void 0);const{anchorPrefix:r,flow:i,keepUndefined:o,onTagObj:a,tag:l}=n||{},{onAnchor:c,setAnchors:u,sourceObjects:h}=function(e,t){const n=[],s=new Map;let r=null;return{onAnchor(s){n.push(s),r||(r=Wo(e));const i=Jo(t,r);return r.add(i),i},setAnchors(){for(const e of n){const t=s.get(e);if("object"!=typeof t||!t.anchor||!qo(t.node)&&!zo(t.node)){const t=new Error("Failed to resolve repeated object (this should not happen)");throw t.source=e,t}t.node.anchor=t.anchor}},sourceObjects:s}}(this,r||"a"),f=sa(e,l,{keepUndefined:null!=o&&o,onAnchor:c,onTagObj:a,replacer:s,schema:this.schema,sourceObjects:h});return i&&zo(f)&&(f.flow=!0),u(),f}createPair(e,t,n={}){const s=this.createNode(e,null,n),r=this.createNode(t,null,n);return new Ta(s,r)}delete(e){return!!Il(this.contents)&&this.contents.delete(e)}deleteIn(e){return ia(e)?null!=this.contents&&(this.contents=null,!0):!!Il(this.contents)&&this.contents.deleteIn(e)}get(e,t){return zo(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return ia(e)?!t&&qo(this.contents)?this.contents.value:this.contents:zo(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!zo(this.contents)&&this.contents.has(e)}hasIn(e){return ia(e)?void 0!==this.contents:!!zo(this.contents)&&this.contents.hasIn(e)}set(e,t){null==this.contents?this.contents=ra(this.schema,[e],t):Il(this.contents)&&this.contents.set(e,t)}setIn(e,t){ia(e)?this.contents=t:null==this.contents?this.contents=ra(this.schema,Array.from(e),t):Il(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t){let n;switch(String(e)){case"1.1":this.directives.yaml.version="1.1",n=Object.assign({merge:!0,resolveKnownTags:!1,schema:"yaml-1.1"},t);break;case"1.2":this.directives.yaml.version="1.2",n=Object.assign({merge:!1,resolveKnownTags:!0,schema:"core"},t);break;default:{const t=JSON.stringify(e);throw new Error(`Expected '1.1' or '1.2' as version, but found: ${t}`)}}this.schema=new Nl(n)}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:s,onAnchor:r,reviver:i}={}){const o={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===n,mapKeyWarned:!1,maxAliasCount:"number"==typeof s?s:100,stringify:wa},a=ea(this.contents,t||"",o);if("function"==typeof r)for(const{count:e,res:t}of o.anchors.values())r(t,e);return"function"==typeof i?Ol(i,{"":a},"",a):a}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return function(e,t){const n=[];let s=!0===t.directives;if(!1!==t.directives){const t=e.directives.toString(e);t?(n.push(t),s=!0):e.directives.marker&&(s=!0)}s&&n.push("---"),e.commentBefore&&(1!==n.length&&n.unshift(""),n.unshift(e.commentBefore.replace(/^/gm,"#")));const r=va(e,t);let i=!1,o=null;if(e.contents){Uo(e.contents)&&(e.contents.spaceBefore&&s&&n.push(""),e.contents.commentBefore&&n.push(e.contents.commentBefore.replace(/^/gm,"#")),r.forceBlockIndent=!!e.comment,o=e.contents.comment);const t=o?void 0:()=>i=!0;let a=wa(e.contents,r,(()=>o=null),t);o&&(a=aa(a,"",o)),"|"!==a[0]&&">"!==a[0]||"---"!==n[n.length-1]?n.push(a):n[n.length-1]=`--- ${a}`}else n.push(wa(e.contents,r));return e.comment&&(i&&!o||""===n[n.length-1]||n.push(""),n.push(e.comment.replace(/^/gm,"#"))),n.join("\n")+"\n"}(this,e)}}function Il(e){if(zo(e))return!0;throw new Error("Expected a YAML collection as document contents")}class Cl extends Error{constructor(e,t,n,s){super(),this.name=e,this.code=n,this.message=s,this.pos=t}}class Ml extends Cl{constructor(e,t,n){super("YAMLParseError",e,t,n)}}class Rl extends Cl{constructor(e,t,n){super("YAMLWarning",e,t,n)}}const Pl=(e,t)=>n=>{if(-1===n.pos[0])return;n.linePos=n.pos.map((e=>t.linePos(e)));const{line:s,col:r}=n.linePos[0];n.message+=` at line ${s}, column ${r}`;let i=r-1,o=e.substring(t.lineStarts[s-1],t.lineStarts[s]).replace(/[\n\r]+$/,"");if(i>=60&&o.length>80){const e=Math.min(i-39,o.length-79);o="…"+o.substring(e),i-=e-1}if(o.length>80&&(o=o.substring(0,79)+"…"),s>1&&/^ *$/.test(o.substring(0,i))){let n=e.substring(t.lineStarts[s-2],t.lineStarts[s-1]);n.length>80&&(n=n.substring(0,79)+"…\n"),o=n+o}if(/[^ ]/.test(o)){let e=1;const t=n.linePos[1];t&&t.line===s&&t.col>r&&(e=Math.min(t.col-r,80-i));const a=" ".repeat(i)+"^".repeat(e);n.message+=`:\n\n${o}\n${a}\n`}};function ql(e,{ctx:t,flow:n,indicator:s,offset:r,onError:i,startOnNewline:o}){let a=!1,l=o,c=o,u="",h="",f=!1,p=null,d=null,m=null,g=null,y=null;for(const r of e)switch(r.type){case"space":!n&&l&&"doc-start"!==s&&"\t"===r.source[0]&&i(r,"TAB_AS_INDENT","Tabs are not allowed as indentation"),c=!0;break;case"comment":{t.options.strict&&!c&&i(r,"COMMENT_SPACE","Comments must be separated from other tokens by white space characters");const e=r.source.substring(1);u?u+=h+e:u=e,h="";break}case"newline":l&&!u&&(a=!0),l=!0,f=!0,c=!0,h+=r.source;break;case"anchor":p&&i(r,"MULTIPLE_ANCHORS","A node can have at most one anchor"),p=r,null===y&&(y=r.offset),l=!1,c=!1;break;case"tag":d&&i(r,"MULTIPLE_TAGS","A node can have at most one tag"),d=r,null===y&&(y=r.offset),l=!1,c=!1;break;case s:(p||d)&&i(r,"BAD_PROP_ORDER",`Anchors and tags must be after the ${r.source} indicator`),g=r,l=!1,c=!1;break;case"comma":if(n){m&&i(r,"UNEXPECTED_TOKEN",`Unexpected , in ${n}`),m=r,l=!1,c=!1;break}default:i(r,"UNEXPECTED_TOKEN",`Unexpected ${r.type} token`),l=!1,c=!1}const b=e[e.length-1],v=b?b.offset+b.source.length:r;return{comma:m,found:g,spaceBefore:a,comment:u,hasNewline:f,anchor:p,tag:d,end:v,start:null!=y?y:v}}function Dl(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes("\n"))return!0;if(e.end)for(const t of e.end)if("newline"===t.type)return!0;return!1;case"flow-collection":for(const t of e.items){for(const e of t.start)if("newline"===e.type)return!0;if(t.sep)for(const e of t.sep)if("newline"===e.type)return!0;if(Dl(t.key)||Dl(t.value))return!0}return!1;default:return!0}}const zl="All mapping items must start at the same column";function Ul(e,t,n,s){let r="";if(e){let i=!1,o="";for(const a of e){const{source:e,type:l}=a;switch(l){case"space":i=!0;break;case"comment":{n&&!i&&s(a,"COMMENT_SPACE","Comments must be separated from other tokens by white space characters");const t=e.substring(1);r?r+=o+t:r=t,o="";break}case"newline":r&&(o+=e),i=!0;break;default:s(a,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}t+=e.length}}return{comment:r,offset:t}}const jl="Block collections are not allowed within flow collections",Fl=e=>e&&("block-map"===e.type||"block-seq"===e.type);function Bl(e,t,n,s,r){let i;switch(n.type){case"block-map":i=function({composeNode:e,composeEmptyNode:t},n,s,r){var i;const o=new Oa(n.schema);let a=s.offset;for(const{start:l,key:c,sep:u,value:h}of s.items){const f=ql(l,{ctx:n,indicator:"explicit-key-ind",offset:a,onError:r,startOnNewline:!0}),p=!f.found;if(p){if(c&&("block-seq"===c.type?r(a,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in c&&c.indent!==s.indent&&r(a,"BAD_INDENT",zl)),!f.anchor&&!f.tag&&!u){f.comment&&(o.comment?o.comment+="\n"+f.comment:o.comment=f.comment);continue}}else(null===(i=f.found)||void 0===i?void 0:i.indent)!==s.indent&&r(a,"BAD_INDENT",zl);p&&Dl(c)&&r(c,"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line");const d=f.end,m=c?e(n,c,f,r):t(n,d,l,null,f,r),g=ql(u||[],{ctx:n,indicator:"map-value-ind",offset:m.range[2],onError:r,startOnNewline:!c||"block-scalar"===c.type});if(a=g.end,g.found){p&&("block-map"!==(null==h?void 0:h.type)||g.hasNewline||r(a,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&f.start0){const e=Ul(h,f,n.options.strict,r);e.comment&&(a.comment?a.comment+="\n"+e.comment:a.comment=e.comment),a.range=[s.offset,f,e.offset]}else a.range=[s.offset,f,f];return a}(e,t,n,r)}if(!s)return i;const o=t.directives.tagName(s.source,(e=>r(s,"TAG_RESOLVE_FAILED",e)));if(!o)return i;const a=i.constructor;if("!"===o||o===a.tagName)return i.tag=a.tagName,i;const l=Ro(i)?"map":"seq";let c=t.schema.tags.find((e=>e.collection===l&&e.tag===o));if(!c){const e=t.schema.knownTags[o];if(!e||e.collection!==l)return r(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),i.tag=o,i;t.schema.tags.push(Object.assign({},e,{default:!1})),c=e}const u=c.resolve(i,(e=>r(s,"TAG_RESOLVE_FAILED",e)),t.options),h=Uo(u)?u:new na(u);return h.range=i.range,h.tag=o,(null==c?void 0:c.format)&&(h.format=c.format),h}function Gl(e,t,n){const s=e.offset,r=function({offset:e,props:t},n,s){if("block-scalar-header"!==t[0].type)return s(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:r}=t[0],i=r[0];let o=0,a="",l=-1;for(let t=1;t=0;--e){const t=o[e][1];if(""!==t&&"\r"!==t)break;a=e}if(!e.source||0===a){const t="+"===r.chomp?o.map((e=>e[0])).join("\n"):"";let n=s+r.length;return e.source&&(n+=e.source.length),{value:t,type:i,comment:r.comment,range:[s,n,n]}}let l=e.indent+r.indent,c=e.offset+r.length,u=0;for(let e=0;el&&(l=t.length),c+=t.length+s.length+1}let h="",f="",p=!1;for(let e=0;el||"\t"===s[0]?(" "===f?f="\n":p||"\n"!==f||(f="\n\n"),h+=f+t.slice(l)+s,f="\n",p=!0):""===s?"\n"===f?h+="\n":f="\n":(h+=f+s,f=" ",p=!1)}switch(r.chomp){case"-":break;case"+":for(let e=a;en(s+e,t,r);switch(r){case"scalar":a=na.PLAIN,l=function(e,t){let n="";switch(e[0]){case"\t":n="Plain value cannot start with a tab character";break;case"|":case">":n=`Plain value cannot start with block scalar indicator ${e[0]}`;break;case"@":case"`":n=`Plain value cannot start with reserved character ${e[0]}`}n&&t(0,"BAD_SCALAR_START",n);return Vl(e)}(i,c);break;case"single-quoted-scalar":a=na.QUOTE_SINGLE,l=function(e,t){"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote");return Vl(e.slice(1,-1)).replace(/''/g,"'")}(i,c);break;case"double-quoted-scalar":a=na.QUOTE_DOUBLE,l=function(e,t){let n="";for(let s=1;st?e.slice(t,s+1):r)}else n+=r}'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote');return n}(i,c);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${r}`),{value:"",type:null,comment:"",range:[s,s+i.length,s+i.length]}}const u=s+i.length,h=Ul(o,u,t,n);return{value:l,type:a,comment:h.comment,range:[s,u,h.offset]}}function Vl(e){let t,n;try{t=new RegExp("(.*?)(?s(n,"TAG_RESOLVE_FAILED",e))):null,c=n&&l?function(e,t,n,s,r){var i;if("!"===n)return e[Oo];const o=[];for(const t of e.tags)if(!t.collection&&t.tag===n){if(!t.default||!t.test)return t;o.push(t)}for(const e of o)if(null===(i=e.test)||void 0===i?void 0:i.test(t))return e;const a=e.knownTags[n];if(a&&!a.collection)return e.tags.push(Object.assign({},a,{default:!1,test:void 0})),a;return r(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,"tag:yaml.org,2002:str"!==n),e[Oo]}(e.schema,r,l,n,s):function(e,t,n){var s;if(n)for(const n of e.tags)if(n.default&&(null===(s=n.test)||void 0===s?void 0:s.test(t)))return n;return e[Oo]}(e.schema,r,"scalar"===t.type);let u;try{const i=c.resolve(r,(e=>s(n||t,"TAG_RESOLVE_FAILED",e)),e.options);u=qo(i)?i:new na(i)}catch(e){s(n||t,"TAG_RESOLVE_FAILED",e.message),u=new na(r)}return u.range=a,u.source=r,i&&(u.type=i),l&&(u.tag=l),c.format&&(u.format=c.format),o&&(u.comment=o),u}function Jl(e,t,n){if(t){null===n&&(n=t.length);for(let s=n-1;s>=0;--s){let n=t[s];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}for(n=t[++s];"space"===(null==n?void 0:n.type);)e+=n.source.length,n=t[++s];break}}return e}const Zl={composeNode:Ql,composeEmptyNode:ec};function Ql(e,t,n,s){const{spaceBefore:r,comment:i,anchor:o,tag:a}=n;let l;switch(t.type){case"alias":l=function({options:e},{offset:t,source:n,end:s},r){const i=new Zo(n.substring(1)),o=t+n.length,a=Ul(s,o,e.strict,r);i.range=[t,o,a.offset],a.comment&&(i.comment=a.comment);return i}(e,t,s),(o||a)&&s(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":l=Wl(e,t,a,s),o&&(l.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":l=Bl(Zl,e,t,a,s),o&&(l.anchor=o.source.substring(1));break;default:throw console.log(t),new Error(`Unsupporten token type: ${t.type}`)}return r&&(l.spaceBefore=!0),i&&("scalar"===t.type&&""===t.source?l.comment=i:l.commentBefore=i),l}function ec(e,t,n,s,{spaceBefore:r,comment:i,anchor:o,tag:a},l){const c=Wl(e,{type:"scalar",offset:Jl(t,n,s),indent:-1,source:""},a,l);return o&&(c.anchor=o.source.substring(1)),r&&(c.spaceBefore=!0),i&&(c.comment=i),c}function tc(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+("string"==typeof n?n.length:1)]}function nc(e){let t="",n=!1,s=!1;for(let r=0;r{const r=tc(e);s?this.warnings.push(new Rl(r,t,n)):this.errors.push(new Ml(r,t,n))},this.directives=new Yo({version:e.version||Aa.version}),this.options=e}decorate(e,t){const{comment:n,afterEmptyLine:s}=nc(this.prelude);if(n){const r=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(s||e.directives.marker||!r)e.commentBefore=n;else if(zo(r)&&!r.flow&&r.items.length>0){let e=r.items[0];Po(e)&&(e=e.key);const t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{const e=r.commentBefore;r.commentBefore=e?`${n}\n${e}`:n}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:nc(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(const t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,((t,n,s)=>{const r=tc(e);r[0]+=t,this.onError(r,"BAD_DIRECTIVE",n,s)})),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=function(e,t,{offset:n,start:s,value:r,end:i},o){const a=Object.assign({directives:t},e),l=new Ll(void 0,a),c={directives:l.directives,options:l.options,schema:l.schema},u=ql(s,{ctx:c,indicator:"doc-start",offset:n,onError:o,startOnNewline:!0});u.found&&(l.directives.marker=!0,!r||"block-map"!==r.type&&"block-seq"!==r.type||u.hasNewline||o(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=r?Ql(c,r,u,o):ec(c,u.end,s,null,u,o);const h=l.contents.range[2],f=Ul(i,h,!1,o);return f.comment&&(l.comment=f.comment),l.range=[n,h,f.offset],l}(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.marker&&this.onError(e,"MISSING_CHAR","Missing directives-end indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new Ml(tc(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){const t="Unexpected doc-end without preceding document";this.errors.push(new Ml(tc(e),"UNEXPECTED_TOKEN",t));break}const t=Ul(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new Ml(tc(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const e=Object.assign({directives:this.directives},this.options),n=new Ll(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,t,t],this.decorate(n,!1),yield n}}}function rc(e){switch(e){case void 0:case" ":case"\n":case"\r":case"\t":return!0;default:return!1}}const ic=[",","[","]","{","}"],oc=[" ",",","[","]","{","}","\n","\r","\t"],ac=e=>!e||oc.includes(e);class lc{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.next=null,this.pos=0}*lex(e,t=!1){e&&(this.buffer=this.buffer?this.buffer+e:e),this.atEnd=!t;let n=this.next||"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||"\t"===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+1]}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;" "===t;)t=this.buffer[++n+e];if("\r"===t){const t=this.buffer[n+e+1];if("\n"===t||!t&&!this.atEnd)return e+n+1}return"\n"===t||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if("-"===t||"."===t){const t=this.buffer.substr(e,3);if(("---"===t||"..."===t)&&rc(this.buffer[e+3]))return-1}return e}getLine(){let e=this.buffer.indexOf("\n",this.pos);return-1===e?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(null===e)return this.setNext("stream");if("\ufeff"===e[0]&&(yield*this.pushCount(1),e=e.substring(1)),"%"===e[0]){let t=e.length;const n=e.indexOf("#");if(-1!==n){const s=e[n-1];" "!==s&&"\t"!==s||(t=n-1)}for(;;){const n=e[t-1];if(" "!==n&&"\t"!==n)break;t-=1}const s=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-s),this.pushNewline(),"stream"}if(this.atLineEnd()){const t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield"",yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if("-"===e||"."===e){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const e=this.peek(3);if("---"===e&&rc(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"doc";if("..."===e&&rc(this.charAt(3)))return yield*this.pushCount(3),"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!rc(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&rc(t)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(null===e)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(ac),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=(yield*this.parseBlockScalarHeader()),t+=(yield*this.pushSpaces(!0)),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do{e=yield*this.pushNewline(),t=yield*this.pushSpaces(!0),e>0&&(this.indentValue=n=t)}while(e+t>0);const s=this.getLine();if(null===s)return this.setNext("flow");if(-1!==n&&n"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil((e=>rc(e)||"#"===e))}*parseBlockScalar(){let e,t=this.pos-1,n=0;e:for(let s=this.pos;e=this.buffer[s];++s)switch(e){case" ":n+=1;break;case"\n":t=s,n=0;break;case"\r":{const e=this.buffer[s+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if("\n"===e)break}default:break e}if(!e&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=n:this.indentNext+=this.blockScalarIndent;do{const e=this.continueScalar(t+1);if(-1===e)break;t=this.buffer.indexOf("\n",e)}while(-1!==t);if(-1===t){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}if(!this.blockScalarKeep)for(;;){let e=t-1,n=this.buffer[e];for("\r"===n&&(n=this.buffer[--e]);" "===n||"\t"===n;)n=this.buffer[--e];if(!("\n"===n&&e>=this.pos))break;t=e}return yield"",yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t,n=this.pos-1,s=this.pos-1;for(;t=this.buffer[++s];)if(":"===t){const t=this.buffer[s+1];if(rc(t)||e&&","===t)break;n=s}else if(rc(t)){const r=this.buffer[s+1];if("#"===r||e&&ic.includes(r))break;if("\r"===t&&("\n"===r?(s+=1,t="\n"):n=s),"\n"===t){const e=this.continueScalar(s+1);if(-1===e)break;s=Math.max(s,e-2)}}else{if(e&&ic.includes(t))break;n=s}return t||this.atEnd?(yield"",yield*this.pushToIndex(n+1,!0),e?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":if("<"===this.charAt(1))return(yield*this.pushVerbatimTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(ac))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case":":case"?":case"-":if(rc(this.charAt(1)))return 0===this.flowLevel&&(this.indentNext=this.indentValue+1),(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}return 0}*pushVerbatimTag(){let e=this.pos+2,t=this.buffer[e];for(;!rc(t)&&">"!==t;)t=this.buffer[++e];return yield*this.pushToIndex(">"===t?e+1:e,!1)}*pushNewline(){const e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,n=this.pos-1;do{t=this.buffer[++n]}while(" "===t||e&&"\t"===t);const s=n-this.pos;return s>0&&(yield this.buffer.substr(this.pos,s),this.pos=n),s}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}class cc{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t>1;this.lineStarts[s]=0;--t)switch(e[t].type){case"space":break;case"newline":return!0;default:return!1}return!1}function pc(e){switch(null==e?void 0:e.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function dc(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep||t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function mc(e){var t;if(0===e.length)return[];let n=e.length;e:for(;--n>=0;)switch(e[n].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;"space"===(null===(t=e[++n])||void 0===t?void 0:t.type););return e.splice(n,e.length)}function gc(e){if("flow-seq-start"===e.start.type)for(const t of e.items)!t.sep||t.value||uc(t.start,"explicit-key-ind")||uc(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,pc(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}class yc{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new lc,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&0===this.offset&&this.onNewLine(0);for(const n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar)return this.atScalar=!1,yield*this.step(),void(this.offset+=e.length);const t=function(e){switch(e){case"\ufeff":return"byte-order-mark";case"":return"doc-mode";case"":return"flow-error-end";case"":return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}(e);if(t)if("scalar"===t)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&" "===e[0]&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":return;default:this.atNewLine=!1}this.offset+=e.length}else{const t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if("doc-end"!==this.type||e&&"doc-end"===e.type){if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}else{for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source})}}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e||this.stack.pop();if(t)if(0===this.stack.length)yield t;else{const e=this.peek(1);switch("block-scalar"!==t.type&&"flow-collection"!==t.type||(t.indent="indent"in e?e.indent:-1),"flow-collection"===t.type&&gc(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const n=e.items[e.items.length-1];if(n.value)return e.items.push({start:[],key:t,sep:[]}),void(this.onKeyLine=!0);if(!n.sep)return Object.assign(n,{key:t,sep:[]}),void(this.onKeyLine=!uc(n.start,"explicit-key-ind"));n.value=t;break}case"block-seq":{const n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{const n=e.items[e.items.length-1];return void(!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]}))}default:yield*this.pop(),yield*this.pop(t)}if(!("document"!==e.type&&"block-map"!==e.type&&"block-seq"!==e.type||"block-map"!==t.type&&"block-seq"!==t.type)){const n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&!hc(n.start)&&(0===t.indent||n.start.every((e=>"comment"!==e.type||e.indent=e.indent){const t=!this.onKeyLine&&this.indent===e.indent&&(n.sep||hc(n.start));switch(this.type){case"anchor":case"tag":return void(t||n.value?(e.items.push({start:[this.sourceToken]}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken));case"explicit-key-ind":return n.sep||uc(n.start,"explicit-key-ind")?t||n.value?e.items.push({start:[this.sourceToken]}):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]}):n.start.push(this.sourceToken),void(this.onKeyLine=!0);case"map-value-ind":if(n.sep)if(n.value||t&&!uc(n.start,"explicit-key-ind"))e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(uc(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else if(uc(n.start,"explicit-key-ind")&&pc(n.key)&&!uc(n.sep,"newline")){const e=mc(n.start),t=n.key,s=n.sep;s.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:t,sep:s}]})}else n.sep.push(this.sourceToken);else Object.assign(n,{key:null,sep:[this.sourceToken]});return void(this.onKeyLine=!0);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);return void(t||n.value?(e.items.push({start:[],key:s,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(s):(Object.assign(n,{key:s,sep:[]}),this.onKeyLine=!0))}default:{const s=this.startBlockValue(e);if(s)return t&&"block-seq"!==s.type&&uc(n.start,"explicit-key-ind")&&e.items.push({start:[]}),void this.stack.push(s)}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var t;const n=e.items[e.items.length-1];switch(this.type){case"newline":if(!n.value&&fc(n.start)){const s=e.items[e.items.length-2],r=null===(t=null==s?void 0:s.value)||void 0===t?void 0:t.end;if(Array.isArray(r))return Array.prototype.push.apply(r,n.start),void(n.start=[this.sourceToken])}case"space":case"comment":return void(n.value?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken));case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;return void n.start.push(this.sourceToken);case"seq-item-ind":if(this.indent!==e.indent)break;return void(n.value||uc(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken))}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do{yield*this.pop(),e=this.peek(1)}while(e&&"flow-collection"===e.type)}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":return void(!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken));case"map-value-ind":return void(!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]}));case"space":case"comment":case"newline":case"anchor":case"tag":return void(!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);return void(!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]}))}case"flow-map-end":case"flow-seq-end":return void e.end.push(this.sourceToken)}const n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{const t=this.peek(2);if("block-map"!==t.type||"map-value-ind"!==this.type&&("newline"!==this.type||t.items[t.items.length-1].sep))if("map-value-ind"===this.type&&"flow-collection"!==t.type){const n=mc(dc(t));gc(e);const s=e.end.splice(1,e.end.length);s.push(this.sourceToken);const r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e);else yield*this.pop(),yield*this.step()}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=mc(dc(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t}]}}case"map-value-ind":{this.onKeyLine=!0;const t=mc(dc(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}}function bc(e,t={}){const{lineCounter:n,prettyErrors:s}=function(e){const t=!e||!1!==e.prettyErrors;return{lineCounter:e&&e.lineCounter||t&&new cc||null,prettyErrors:t}}(t),r=new yc(null==n?void 0:n.addNewLine),i=new sc(t);let o=null;for(const t of i.compose(r.parse(e),!0,e.length))if(o){if("silent"!==o.options.logLevel){o.errors.push(new Ml(t.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else o=t;return s&&n&&(o.errors.forEach(Pl(e,n)),o.warnings.forEach(Pl(e,n))),o}function vc(e,t,n){let s;"function"==typeof t?s=t:void 0===n&&t&&"object"==typeof t&&(n=t);const r=bc(e,n);if(!r)return null;if(r.warnings.forEach((e=>ka(r.options.logLevel,e))),r.errors.length>0){if("silent"!==r.options.logLevel)throw r.errors[0];r.errors=[]}return r.toJS(Object.assign({reviver:s},n))}const wc={hr(e){const t=RegExp(/^ {0,3}(-{3,}(?=[^-\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~-]* *(?:\n+|$)|$)/).exec(e);if(t)return{type:"options",raw:t[0],data:vc(t[3],{})}}},kc={paragraph:e=>e,blockquote:e=>e,heading:e=>e};function Ec(e){return Qr.sanitize(So.parser(e))}function xc(e,t){let n=So.lexer((e=>{const t=ei(e);if(0===t)return e;const n=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(n,"")})(e).replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&"));let s,r=[],i="",o="",a="",l=!0,c=new fi(t);return n.forEach((function(e,t){if("heading"==e.type&&(o="",a="",i=Ec([e]),s=new fi(c),l=!1),"options"==e.type&&(l?c=pi(c,e.data):s=pi(c,e.data)),"paragraph"!=e.type&&"code"!=e.type||(o+=Ec([e])),"blockquote"==e.type&&(a+=Ec([e])),"list"==e.type){let t=[];e.items.forEach((function(e,n){let s=function(e){let t="",n="";return e.tokens.forEach((function(e,s){"blockquote"==e.type?n+=Ec([e]):t+=Ec([e])})),{text:t,comment:n}}(e);t.push(new ai(n,s.text,e.checked,s.comment))})),e.ordered?e.items[0].task?r.push(new oi(i,o,a,t,s)):r.push(new si(i,o,a,t,s)):r.push(new ii(i,o,a,t,s))}})),new ci(r,c)}function _c(e,t,n){let s;t.innerHTML="",t.shadowRoot?(s=t.shadowRoot,s.innerHTML=""):s=t.attachShadow({mode:"open"});try{let t=xc(e,n);new rr({target:s,intro:!1,props:{quiz:t}})}catch(e){s.innerHTML=`${e}. App could not render. Please check your quizdown syntax.`}}return So.use({renderer:kc,tokenizer:wc}),{init:function(e={}){let t=new fi(e);t.startOnLoad&&"undefined"!=typeof document&&window.addEventListener("load",(function(){let e=document.querySelectorAll(".quizdown");for(let n of e)_c(n.innerHTML,n,t)}),!1)},register:function(e){return e.setup(this),this},createApp:_c,getMarkedParser:function(){return So}}})); + ***************************************************************************** */function Cn(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);sn.slice(0,t+1).join("-"))).reverse()}function Un(e,t=Rn().fallbackLocale){const n=qn(e);return t?[...new Set([...n,...qn(t)])]:n}function Kn(){return Dn}jn.subscribe((e=>{Dn=e,"undefined"!=typeof window&&null!==e&&document.documentElement.setAttribute("lang",e)}));const Bn=jn.set;jn.set=e=>{if(function(e){if(null==e)return;const t=Un(e);for(let e=0;ePn.set(!0)),t):Pn.set(!0),In(e).then((()=>{Bn(e)})).finally((()=>{clearTimeout(n),Pn.set(!1)}))}return Bn(e)},jn.update=e=>Bn(e(Dn));const Fn=e=>{const t=Object.create(null);return n=>{const i=JSON.stringify(n);return i in t?t[i]:t[i]=e(n)}},Xn=(e,t)=>{const{formats:n}=Rn();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},Gn=Fn((e=>{var{locale:t,format:n}=e,i=Cn(e,["locale","format"]);if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(i=Xn("number",n)),new Intl.NumberFormat(t,i)})),Vn=Fn((e=>{var{locale:t,format:n}=e,i=Cn(e,["locale","format"]);if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?i=Xn("date",n):0===Object.keys(i).length&&(i=Xn("date","short")),new Intl.DateTimeFormat(t,i)})),Hn=Fn((e=>{var{locale:t,format:n}=e,i=Cn(e,["locale","format"]);if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?i=Xn("time",n):0===Object.keys(i).length&&(i=Xn("time","short")),new Intl.DateTimeFormat(t,i)})),Wn=Fn(((e,t=Kn())=>new vn(e,t,Rn().formats,{ignoreTag:Rn().ignoreTag}))),Yn=(e,t={})=>{"object"==typeof e&&(e=(t=e).id);const{values:n,locale:i=Kn(),default:s}=t;if(null==i)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let r=zn(e,i);if(r){if("string"!=typeof r)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof r}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),r}else Rn().warnOnMissingMessages&&console.warn(`[svelte-i18n] The message "${e}" was not found in "${Un(i).join('", "')}".${On(Kn())?"\n\nNote: there are at least one loader still registered to this locale that wasn't executed.":""}`),r=s||e;if(!n)return r;let o=r;try{o=Wn(r,i).format(n)}catch(t){console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,t.message)}return o},Jn=(e,t)=>((e={})=>{var{locale:t=Kn()}=e,n=Cn(e,["locale"]);return Hn(Object.assign({locale:t},n))})(t).format(e),Zn=(e,t)=>((e={})=>{var{locale:t=Kn()}=e,n=Cn(e,["locale"]);return Vn(Object.assign({locale:t},n))})(t).format(e),Qn=(e,t)=>((e={})=>{var{locale:t=Kn()}=e,n=Cn(e,["locale"]);return Gn(Object.assign({locale:t},n))})(t).format(e),ei=(e,t=Kn())=>zn(e,t),ti=Oe([jn,_n],(()=>Yn));Oe([jn],(()=>Jn)),Oe([jn],(()=>Zn)),Oe([jn],(()=>Qn)),Oe([jn,_n],(()=>ei));var ni={next:"Next",previous:"Previous",evaluate:"Evaluate",reset:"One more time!",hint:"Show hint",resultsTitle:"Your quiz results",resultsText:"You have answered {points} out of {total} questions correctly!"},ii={next:"Weiter",previous:"Zurück",evaluate:"Zum Ergebnis",reset:"Noch einmal!",hint:"Tipp anzeigen",resultsTitle:"Ihr Ergebnis",resultsText:"Sie haben {points} von {total} Fragen richtig beantwortet!"},si={next:"Suivant",previous:"Précédent",evaluate:"Réponse",reset:"Recommencer!",hint:"Indice",resultsTitle:"Vos résultats",resultsText:"Vous avez répondu correctement à {points} questions sur {total}!"},ri={next:"Siguiente",previous:"Anterior",evaluate:"Respuesta",reset:"Otra vez!",hint:"Pista",resultsTitle:"Resultados",resultsText:"Ha acertado a {points} preguntas de {total}!"};function oi(e){Sn("de",ii),Sn("en",ni),Sn("fr",si),Sn("es",ri),function(e){const{formats:t}=e,n=Cn(e,["formats"]),i=e.initialLocale||e.fallbackLocale;Object.assign(Mn,n,{initialLocale:i}),t&&("number"in t&&Object.assign(Mn.formats.number,t.number),"date"in t&&Object.assign(Mn.formats.date,t.date),"time"in t&&Object.assign(Mn.formats.time,t.time)),jn.set(i)}({fallbackLocale:"en",initialLocale:null===e?"undefined"==typeof window?null:window.navigator.language||window.navigator.languages[0]:e})}function ai(e){E(e,"svelte-najif3",".card.svelte-najif3{box-shadow:0 4px 8px 0 rgba(0, 0, 0, 0.2);border-radius:0 0 4px 4px}")}function li(e){let t,n;const i=e[1].default,s=f(i,e,e[0],null);return{c(){t=L("div"),s&&s.c(),D(t,"class","card svelte-najif3")},m(e,i){A(e,t,i),s&&s.m(t,null),n=!0},p(e,[t]){s&&s.p&&(!n||1&t)&&p(s,i,e,e[0],n?t:-1,null,null)},i(e){n||(ge(s,e),n=!0)},o(e){ye(s,e),n=!1},d(e){e&&N(t),s&&s.d(e)}}}function ci(e,t,n){let{$$slots:i={},$$scope:s}=t;return e.$$set=e=>{"$$scope"in e&&n(0,s=e.$$scope)},[s,i]}class ui extends Se{constructor(e){super(),$e(this,e,ci,li,a,{},ai)}}function fi(e){E(e,"svelte-15b7mrd",".credits.svelte-15b7mrd a.svelte-15b7mrd{color:gray;text-decoration:none}.credits.svelte-15b7mrd a.svelte-15b7mrd:hover{text-decoration:underline}.credits.svelte-15b7mrd.svelte-15b7mrd{margin-top:1rem;font-size:small;text-align:end;color:lightgray}")}function hi(t){let n,i;return{c(){n=L("div"),i=L("a"),i.textContent="quizdown v0.4.0",D(i,"href","https://github.com/bonartm/quizdown-js"),D(i,"class","svelte-15b7mrd"),D(n,"class","credits svelte-15b7mrd")},m(e,t){A(e,n,t),S(n,i)},p:e,i:e,o:e,d(e){e&&N(n)}}}class pi extends Se{constructor(e){super(),$e(this,e,null,hi,a,{},fi)}}function di(e){let t,n,i,s;const r=e[6].default,o=f(r,e,e[5],null);return{c(){t=L("div"),n=L("div"),o&&o.c(),re((()=>e[7].call(n))),q(t,"height",e[1]+"px")},m(r,a){A(r,t,a),S(t,n),o&&o.m(n,null),i=function(e,t){"static"===getComputedStyle(e).position&&(e.style.position="relative");const n=L("iframe");n.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),n.setAttribute("aria-hidden","true"),n.tabIndex=-1;const i=U();let s;return i?(n.src="data:text/html,