diff --git a/package-lock.json b/package-lock.json index 461f87a..1d7b2b5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@bonartm/quizdown", - "version": "0.1.4", + "version": "0.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@bonartm/quizdown", - "version": "0.1.4", + "version": "0.2.0", "license": "MIT", "dependencies": { "auto-bind": "^4.0.0", diff --git a/package.json b/package.json index e06a609..a86f3dc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@bonartm/quizdown", - "version": "0.1.4", + "version": "0.2.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 a00ae98..f1921a9 100644 --- a/public/build/quizdown.js +++ b/public/build/quizdown.js @@ -1,3 +1,3 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).quizdown={})}(this,(function(e){"use strict";function t(){}const n=e=>e;function r(e,t){for(const n in t)e[n]=t[n];return e}function i(e){return e()}function a(){return Object.create(null)}function o(e){e.forEach(i)}function s(e){return"function"==typeof e}function u(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function l(e,...n){if(null==e)return t;const r=e.subscribe(...n);return r.unsubscribe?()=>r.unsubscribe():r}function c(e){let t;return l(e,(e=>t=e))(),t}function f(e,t,n,i){return e[1]&&i?r(n.ctx.slice(),e[1](i(t))):n.ctx}function h(e,t,n,r,i,a,o){const s=function(e,t,n,r){if(e[2]&&r){const i=e[2](r(n));if(void 0===t.dirty)return i;if("object"==typeof i){const e=[],n=Math.max(t.dirty.length,i.length);for(let r=0;rwindow.performance.now():()=>Date.now(),m=p?e=>requestAnimationFrame(e):t;const v=new Set;function y(e){v.forEach((t=>{t.c(e)||(v.delete(t),t.f())})),0!==v.size&&m(y)}function b(e){let t;return 0===v.size&&m(y),{promise:new Promise((n=>{v.add(t={c:e,f:n})})),abort(){v.delete(t)}}}function D(e){return document.createElement(e)}function w(e,t){e.appendChild(t)}function k(e,t,n,r=`svelte-${t}-style`){const i=A(e);if(!function(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}([i,"optionalAccess",e=>e.querySelector,"call",e=>e("#"+r)])){const e=D("style");e.id=r,e.textContent=n,w(i,e)}}function x(e){return e?e.getRootNode?e.getRootNode():e.ownerDocument:document}function A(e){const t=x(e);return t.host?t:t.head}function E(e,t,n){e.insertBefore(t,n||null)}function C(e){e.parentNode.removeChild(e)}function S(e,t){for(let n=0;ne.removeEventListener(t,n,r)}function N(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function R(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function T(e,t,n,r){e.style.setProperty(t,n,r?"important":"")}class z{constructor(e=null){this.a=e,this.e=this.n=null}m(e,t,n=null){this.e||(this.e=D(t.nodeName),this.t=t,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}(c)}_${s}`,h=x(e);M.add(h);const d=h.__svelte_stylesheet||(h.__svelte_stylesheet=function(e){return A(e).appendChild(D("style"))}(e).sheet),p=h.__svelte_rules||(h.__svelte_rules={});p[f]||(p[f]=!0,d.insertRule(`@keyframes ${f} ${c}`,d.cssRules.length));const g=e.style.animation||"";return e.style.animation=`${g?`${g}, `:""}${f} ${r}ms linear ${i}ms 1 both`,L+=1,f}function P(e,t){const n=(e.style.animation||"").split(", "),r=n.filter(t?e=>e.indexOf(t)<0:e=>-1===e.indexOf("__svelte")),i=n.length-r.length;i&&(e.style.animation=r.join(", "),L-=i,L||m((()=>{L||(M.forEach((e=>{const t=e.__svelte_stylesheet;let n=t.cssRules.length;for(;n--;)t.deleteRule(n);e.__svelte_rules={}})),M.clear())})))}function q(e){const t=getComputedStyle(e);if("absolute"!==t.position&&"fixed"!==t.position){const{width:n,height:r}=t,i=e.getBoundingClientRect();e.style.position="absolute",e.style.width=n,e.style.height=r,function(e,t){const n=e.getBoundingClientRect();if(t.left!==n.left||t.top!==n.top){const r=getComputedStyle(e),i="none"===r.transform?"":r.transform;e.style.transform=`${i} translate(${t.left-n.left}px, ${t.top-n.top}px)`}}(e,i)}}function H(e){I=e}function U(e){(function(){if(!I)throw new Error("Function called outside component initialization");return I})().$$.on_mount.push(e)}const W=[],Y=[],J=[],K=[],V=Promise.resolve();let G=!1;function Z(e){J.push(e)}let Q=!1;const X=new Set;function ee(){if(!Q){Q=!0;do{for(let e=0;e{ne.delete(e),r&&(n&&e.d(1),r())})),e.o(t)}}const ue="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function le(e,t){e.f(),function(e,t){e.d(1),t.delete(e.key)}(e,t)}function ce(e){e&&e.c()}function fe(e,t,n,r){const{fragment:a,on_mount:u,on_destroy:l,after_update:c}=e.$$;a&&a.m(t,n),r||Z((()=>{const t=u.map(i).filter(s);l?l.push(...t):o(t),e.$$.on_mount=[]})),c.forEach(Z)}function he(e,t){const n=e.$$;null!==n.fragment&&(o(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function de(e,t){-1===e.$$.dirty[0]&&(W.push(e),G||(G=!0,V.then(ee)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const i=r.length?r[0]:n;return h.ctx&&s(h.ctx[t],h.ctx[t]=i)&&(!h.skip_bound&&h.bound[t]&&h.bound[t](i),d&&de(e,t)),n})):[],h.update(),d=!0,o(h.before_update),h.fragment=!!i&&i(h.ctx),n.target){if(n.hydrate){const e=function(e){return Array.from(e.childNodes)}(n.target);h.fragment&&h.fragment.l(e),e.forEach(C)}else h.fragment&&h.fragment.c();n.intro&&oe(e.$$.fragment),fe(e,n.target,n.anchor,n.customElement),ee()}H(f)}class ge{$destroy(){he(this,1),this.$destroy=t}$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 me(e){const t=e-1;return t*t*t+1}function ve(e,t,n={}){const r=getComputedStyle(e),i="none"===r.transform?"":r.transform,a=t.from.width/e.clientWidth,o=t.from.height/e.clientHeight,u=(t.from.left-t.to.left)/a,l=(t.from.top-t.to.top)/o,c=Math.sqrt(u*u+l*l),{delay:f=0,duration:h=(e=>120*Math.sqrt(e)),easing:d=me}=n;return{delay:f,duration:s(h)?h(c):h,easing:d,css:(e,t)=>`transform: ${i} translate(${t*u}px, ${t*l}px);`}}const{Map:ye}=ue;function be(e){k(e,"1g3zabj","main.svelte-1g3zabj.svelte-1g3zabj{position:relative}.list.svelte-1g3zabj.svelte-1g3zabj{cursor:grab;z-index:5;display:flex;flex-direction:column}.item.svelte-1g3zabj.svelte-1g3zabj{box-sizing:border-box;display:inline-flex;width:100%;min-height:3em;margin-bottom:0.5em;background-color:white;border:1px solid rgb(190, 190, 190);border-radius:2px;user-select:none}.item.svelte-1g3zabj.svelte-1g3zabj:last-child{margin-bottom:0}.item.svelte-1g3zabj.svelte-1g3zabj:not(#grabbed):not(#ghost){z-index:10}.item.svelte-1g3zabj>.svelte-1g3zabj{margin:auto}.buttons.svelte-1g3zabj.svelte-1g3zabj{width:32px;min-width:32px;margin:auto 0;display:flex;flex-direction:column}.buttons.svelte-1g3zabj button.svelte-1g3zabj{cursor:pointer;width:18px;height:18px;margin:0 auto;padding:0;border:1px solid rgba(0, 0, 0, 0);background-color:inherit}.buttons.svelte-1g3zabj button.svelte-1g3zabj:focus{border:1px solid black}.delete.svelte-1g3zabj.svelte-1g3zabj{width:32px}#grabbed.svelte-1g3zabj.svelte-1g3zabj{opacity:0.0}#ghost.svelte-1g3zabj.svelte-1g3zabj{pointer-events:none;z-index:-5;position:absolute;top:0;left:0;opacity:0.0}#ghost.svelte-1g3zabj .svelte-1g3zabj{pointer-events:none}#ghost.haunting.svelte-1g3zabj.svelte-1g3zabj{z-index:20;opacity:1.0}")}function De(e,t,n){const r=e.slice();return r[27]=t[n],r[29]=n,r}function we(e){let t,n,r=e[27]+"";return{c(){t=D("p"),n=_(r)},m(e,r){E(e,t,r),w(t,n)},p(e,t){1&t&&r!==(r=e[27]+"")&&R(n,r)},d(e){e&&C(t)}}}function ke(e){let t,n,r=e[27].text+"";return{c(){t=D("p"),n=_(r)},m(e,r){E(e,t,r),w(t,n)},p(e,t){1&t&&r!==(r=e[27].text+"")&&R(n,r)},d(e){e&&C(t)}}}function xe(e){let t,n,r=e[27].html+"";return{c(){n=O(),t=new z(n)},m(e,i){t.m(r,e,i),E(e,n,i)},p(e,n){1&n&&r!==(r=e[27].html+"")&&t.p(r)},d(e){e&&C(n),e&&t.d()}}}function Ae(e){let t,n,r;function i(...t){return e[17](e[29],...t)}return{c(){t=D("button"),t.innerHTML='',N(t,"class","svelte-1g3zabj")},m(e,a){E(e,t,a),n||(r=B(t,"click",i),n=!0)},p(t,n){e=t},d(e){e&&C(t),n=!1,r()}}}function Ee(e,r){let i,a,s,u,l,c,f,h,d,p,m,v,y,k,x,A,S,_,O,R,T,z,M,I,L=t;function H(...e){return r[15](r[29],...e)}function U(...e){return r[16](r[29],...e)}function W(e,t){return e[27].html?xe:e[27].text?ke:we}let Y=W(r),J=Y(r),K=r[1]&&Ae(r);return{key:e,first:null,c(){i=D("div"),a=D("div"),s=D("button"),u=F("svg"),l=F("path"),c=F("path"),h=$(),d=D("button"),p=F("svg"),m=F("path"),v=F("path"),k=$(),x=D("div"),J.c(),A=$(),S=D("div"),K&&K.c(),_=$(),N(l,"d","M0 0h24v24H0V0z"),N(l,"fill","none"),N(c,"d","M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6 1.41 1.41z"),N(u,"xmlns","http://www.w3.org/2000/svg"),N(u,"viewBox","0 0 24 24"),N(u,"width","16px"),N(u,"height","16px"),N(s,"class","up svelte-1g3zabj"),N(s,"style",f="visibility: "+(r[29]>0?"":"hidden")+";"),N(m,"d","M0 0h24v24H0V0z"),N(m,"fill","none"),N(v,"d","M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"),N(p,"xmlns","http://www.w3.org/2000/svg"),N(p,"viewBox","0 0 24 24"),N(p,"width","16px"),N(p,"height","16px"),N(d,"class","down svelte-1g3zabj"),N(d,"style",y="visibility: "+(r[29]0?"":"hidden")+";")&&N(s,"style",f),1&t&&y!==(y="visibility: "+(r[29]{if(!v&&e>=c&&(v=!0),v&&e>=f&&(h(1,0),y()),!m)return!1;if(v){const t=0+1*l((e-c)/u);h(t,1-t)}return!0})),d&&(p=j(e,0,1,u,s,l,d)),s||(v=!0),h(0,1),y}(i,z,ve,{duration:200})},d(e){e&&C(i),J.d(),K&&K.d(),M=!1,o(I)}}}function Ce(e){let n,r,i,a,s,u,l,c,f,h=[],p=new ye,g=e[0];const m=e=>e[27].id?e[27].id:JSON.stringify(e[27]);for(let t=0;ty.get(i)?(D.add(r),w(t)):(b.add(i),h--):(u(n,o),h--)}for(;h--;){const t=e[h];v.has(t.key)||u(t,o)}for(;d;)w(m[d-1]);return m}(h,t,m,1,e,g,p,l,le,Ee,null,De);for(let e=0;e{"data"in e&&n(0,o=e.data),"removesItems"in e&&n(1,s=e.removesItems)},[o,s,r,i,u,l,c,f,h,d,p,g,m,v,function(e){Y[e?"unshift":"push"]((()=>{r=e,n(2,r)}))},function(e,t){g(e,e-1)},function(e,t){g(e,e+1)},function(e,t){v(e)},function(e){f(e.clientY,this)},function(e){f(e.touches[0].clientY,this)},function(e){e.stopPropagation(),p(0,e.target)},function(e){e.stopPropagation(),e.preventDefault(),d(e.touches[0])},function(e){e.stopPropagation(),h(e.clientY)},function(e){e.stopPropagation(),h(e.touches[0].clientY)},function(e){e.stopPropagation(),m()},function(e){e.stopPropagation(),m(e.touches[0])}]}class Fe extends ge{constructor(e){super(),pe(this,e,Se,Ce,u,{data:0,removesItems:1},be)}}function _e(e){k(e,"14epiz9",".dragdroplist > .list > div.item{min-height:2rem;height:2.5rem;margin:5px;padding:0;width:unset;background-color:var(--quizdown-color-secondary);border:3px solid transparent}.dragdroplist div.content{padding:0;margin:auto auto auto 0 !important}.dragdroplist #ghost{border:3px solid var(--quizdown-color-primary);background-color:var(--quizdown-color-secondary)}")}function $e(e){let t,n,r;function i(t){e[4](t)}let a={};return void 0!==e[0].answers&&(a.data=e[0].answers),t=new Fe({props:a}),Y.push((()=>function(e,t,n){const r=e.$$.props[t];void 0!==r&&(e.$$.bound[r]=n,n(e.$$.ctx[r]))}(t,"data",i))),{c(){ce(t.$$.fragment)},m(e,n){fe(t,e,n),r=!0},p(e,[r]){const i={};var a;!n&&1&r&&(n=!0,i.data=e[0].answers,a=()=>n=!1,K.push(a)),t.$set(i)},i(e){r||(oe(t.$$.fragment,e),r=!0)},o(e){se(t.$$.fragment,e),r=!1},d(e){he(t,e)}}}function Oe(e,n,r){let i,a,o,s=t;e.$$.on_destroy.push((()=>s()));let{quiz:u}=n;return e.$$set=e=>{"quiz"in e&&r(2,u=e.quiz)},e.$$.update=()=>{4&e.$$.dirty&&(r(1,i=u.counter),s(),s=l(i,(e=>r(3,o=e)))),12&e.$$.dirty&&r(0,a=u.questions[o]),1&e.$$.dirty&&r(0,a.selected=a.answers.map((e=>e.id)),a)},[a,i,u,o,function(t){e.$$.not_equal(a.answers,t)&&(a.answers=t,r(0,a),r(2,u),r(3,o))}]}class Be extends ge{constructor(e){super(),pe(this,e,Oe,$e,u,{quiz:2},_e)}}function Ne(e){k(e,"1g1feug","[type='checkbox'].svelte-1g1feug.svelte-1g1feug,[type='radio'].svelte-1g1feug.svelte-1g1feug{display:none}[type='radio'].svelte-1g1feug+span.svelte-1g1feug{border-radius:0.4em}[type='checkbox'].svelte-1g1feug+span.svelte-1g1feug,[type='radio'].svelte-1g1feug+span.svelte-1g1feug{transition-duration:0.3s;background-color:var(--quizdown-color-secondary);display:block;padding:0.5rem;margin:5px;border:3px solid transparent}[type='checkbox'].svelte-1g1feug:hover+span.svelte-1g1feug,[type='radio'].svelte-1g1feug:hover+span.svelte-1g1feug{filter:brightness(0.9)}[type='checkbox'].svelte-1g1feug:checked+span.svelte-1g1feug,[type='radio'].svelte-1g1feug:checked+span.svelte-1g1feug{border:3px solid var(--quizdown-color-primary)}")}function Re(e,t,n){const r=e.slice();return r[7]=t[n],r[9]=n,r}function Te(e,t,n){const r=e.slice();return r[7]=t[n],r[9]=n,r}function ze(e){let t,n=e[1].answers,r=[];for(let t=0;ts()));let{quiz:u}=n;const c=[[]];return e.$$set=e=>{"quiz"in e&&r(2,u=e.quiz)},e.$$.update=()=>{4&e.$$.dirty&&(r(0,i=u.counter),s(),s=l(i,(e=>r(3,o=e)))),12&e.$$.dirty&&r(1,a=u.questions[o])},[i,a,u,o,function(){a.selected=function(e,t,n){const r=new Set;for(let t=0;t{"quiz"in e&&n(0,r=e.quiz)},[r,["❌","✅"],e=>r.jump(e)]}class Ke extends ge{constructor(e){super(),pe(this,e,Je,Ye,u,{quiz:0},He)}}function Ve(e){let t,n,r,i,a,o,s,u,l,c,f=e[1]+1+"",h=e[3].text+"",d=null!==e[3].explanation&&""!==e[3].explanation&&Ze(e);var p=e[4][e[3].type];function g(e){return{props:{quiz:e[0]}}}return p&&(u=new p(g(e))),{c(){t=D("h3"),n=_("Q"),r=_(f),i=_(": "),o=$(),d&&d.c(),s=$(),u&&ce(u.$$.fragment),l=O(),a=new z(null)},m(e,f){E(e,t,f),w(t,n),w(t,r),w(t,i),a.m(h,t),E(e,o,f),d&&d.m(e,f),E(e,s,f),u&&fe(u,e,f),E(e,l,f),c=!0},p(e,t){(!c||2&t)&&f!==(f=e[1]+1+"")&&R(r,f),(!c||8&t)&&h!==(h=e[3].text+"")&&a.p(h),null!==e[3].explanation&&""!==e[3].explanation?d?d.p(e,t):(d=Ze(e),d.c(),d.m(s.parentNode,s)):d&&(d.d(1),d=null);const n={};if(1&t&&(n.quiz=e[0]),p!==(p=e[4][e[3].type])){if(u){ie();const e=u;se(e.$$.fragment,1,0,(()=>{he(e,1)})),ae()}p?(u=new p(g(e)),ce(u.$$.fragment),oe(u.$$.fragment,1),fe(u,l.parentNode,l)):u=null}else p&&u.$set(n)},i(e){c||(u&&oe(u.$$.fragment,e),c=!0)},o(e){u&&se(u.$$.fragment,e),c=!1},d(e){e&&C(t),e&&C(o),d&&d.d(e),e&&C(s),e&&C(l),u&&he(u,e)}}}function Ge(e){let t,n,r,i;return r=new Ke({props:{quiz:e[0]}}),{c(){t=D("h3"),t.textContent="Your quiz results",n=$(),ce(r.$$.fragment)},m(e,a){E(e,t,a),E(e,n,a),fe(r,e,a),i=!0},p(e,t){const n={};1&t&&(n.quiz=e[0]),r.$set(n)},i(e){i||(oe(r.$$.fragment,e),i=!0)},o(e){se(r.$$.fragment,e),i=!1},d(e){e&&C(t),e&&C(n),he(r,e)}}}function Ze(e){let t,n=e[3].explanation+"";return{c(){t=D("p")},m(e,r){E(e,t,r),t.innerHTML=n},p(e,r){8&r&&n!==(n=e[3].explanation+"")&&(t.innerHTML=n)},d(e){e&&C(t)}}}function Qe(e){let t,n,r,i;const a=[Ge,Ve],o=[];function s(e,t){return e[1]===e[2].max?0:1}return t=s(e),n=o[t]=a[t](e),{c(){n.c(),r=O()},m(e,n){o[t].m(e,n),E(e,r,n),i=!0},p(e,[i]){let u=t;t=s(e),t===u?o[t].p(e,i):(ie(),se(o[u],1,1,(()=>{o[u]=null})),ae(),n=o[t],n?n.p(e,i):(n=o[t]=a[t](e),n.c()),oe(n,1),n.m(r.parentNode,r))},i(e){i||(oe(n),i=!0)},o(e){se(n),i=!1},d(e){o[t].d(e),e&&C(r)}}}function Xe(e,n,r){let i,a,o,s=t;e.$$.on_destroy.push((()=>s()));let{quiz:u}=n;const c={MultipleChoice:qe,SingleChoice:qe,Sequence:Be};return e.$$set=e=>{"quiz"in e&&r(0,u=e.quiz)},e.$$.update=()=>{1&e.$$.dirty&&(r(2,i=u.counter),s(),s=l(i,(e=>r(1,o=e)))),3&e.$$.dirty&&r(3,a=u.questions[o])},[u,o,i,a,c]}class et extends ge{constructor(e){super(),pe(this,e,Xe,Qe,u,{quiz:0},null)}}function tt(e){k(e,"1huwu0e","button.svelte-1huwu0e:disabled{background-color:rgb(231, 231, 231);filter:grayscale(100%)}button.svelte-1huwu0e{background-color:var(--quizdown-color-secondary);color:var(--quizdown-color-text);padding:0.5rem 1rem;border-radius:4px;border:1px solid transparent;font-size:var(--font-size);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}button.svelte-1huwu0e:hover:not(:checked):not(:active):not(:disabled){filter:brightness(0.9)}")}function nt(e){let t,n,r,i;const a=e[3].default,o=function(e,t,n,r){if(e){const i=f(e,t,n,r);return e[0](i)}}(a,e,e[2],null),u=o||function(e){let t;return{c(){t=_("Hello World")},m(e,n){E(e,t,n)},d(e){e&&C(t)}}}();return{c(){t=D("button"),u&&u.c(),t.disabled=e[1],N(t,"class","svelte-1huwu0e")},m(a,o){E(a,t,o),u&&u.m(t,null),n=!0,r||(i=B(t,"click",(function(){s(e[0])&&e[0].apply(this,arguments)})),r=!0)},p(r,[i]){e=r,o&&o.p&&(!n||4&i)&&h(o,a,e,e[2],i,null,null),(!n||2&i)&&(t.disabled=e[1])},i(e){n||(oe(u,e),n=!0)},o(e){se(u,e),n=!1},d(e){e&&C(t),u&&u.d(e),r=!1,i()}}}function rt(e,t,n){let{$$slots:r={},$$scope:i}=t,{buttonAction:a=(()=>alert("Life has never Svelte better"))}=t,{disabled:o=!1}=t;return e.$$set=e=>{"buttonAction"in e&&n(0,a=e.buttonAction),"disabled"in e&&n(1,o=e.disabled),"$$scope"in e&&n(2,i=e.$$scope)},[a,o,i,r]}class it extends ge{constructor(e){super(),pe(this,e,rt,nt,u,{buttonAction:0,disabled:1},tt)}}function at(e){k(e,"9l6801",".button-row.svelte-9l6801.svelte-9l6801{margin-top:1em;display:flex;justify-content:left}.quizdown-credits.svelte-9l6801 a.svelte-9l6801{color:gray;text-decoration:none}.quizdown-credits.svelte-9l6801 a.svelte-9l6801:hover{text-decoration:underline}.quizdown-credits.svelte-9l6801.svelte-9l6801{margin-top:1rem;font-size:small;text-align:end;color:lightgray}.quizdown-hint.svelte-9l6801.svelte-9l6801{font-size:smaller}")}function ot(e){let t,n,r,i,a,o;t=new it({props:{disabled:null===e[5].hint||""===e[5].hint,buttonAction:e[7],$$slots:{default:[ut]},$$scope:{ctx:e}}});const s=[ft,ct,lt],u=[];function l(e,t){return e[6]?0:e[1]===e[3].max-1?1:2}return r=l(e),i=u[r]=s[r](e),{c(){ce(t.$$.fragment),n=$(),i.c(),a=O()},m(e,i){fe(t,e,i),E(e,n,i),u[r].m(e,i),E(e,a,i),o=!0},p(e,n){const o={};32&n&&(o.disabled=null===e[5].hint||""===e[5].hint),4&n&&(o.buttonAction=e[7]),256&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o);let c=r;r=l(e),r===c?u[r].p(e,n):(ie(),se(u[c],1,1,(()=>{u[c]=null})),ae(),i=u[r],i?i.p(e,n):(i=u[r]=s[r](e),i.c()),oe(i,1),i.m(a.parentNode,a))},i(e){o||(oe(t.$$.fragment,e),oe(i),o=!0)},o(e){se(t.$$.fragment,e),se(i),o=!1},d(e){he(t,e),e&&C(n),u[r].d(e),e&&C(a)}}}function st(e){let t,n;return t=new it({props:{buttonAction:e[0].reset,$$slots:{default:[gt]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,r){fe(t,e,r),n=!0},p(e,n){const r={};1&n&&(r.buttonAction=e[0].reset),256&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function ut(e){let t;return{c(){t=_("💡 Show hint")},m(e,n){E(e,t,n)},d(e){e&&C(t)}}}function lt(e){let t,n;return t=new it({props:{buttonAction:e[0].next,$$slots:{default:[ht]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,r){fe(t,e,r),n=!0},p(e,n){const r={};1&n&&(r.buttonAction=e[0].next),256&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function ct(e){let t,n;return t=new it({props:{buttonAction:e[0].evaluate,$$slots:{default:[dt]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,r){fe(t,e,r),n=!0},p(e,n){const r={};1&n&&(r.buttonAction=e[0].evaluate),256&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function ft(e){let t,n;return t=new it({props:{buttonAction:e[0].evaluate,$$slots:{default:[pt]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,r){fe(t,e,r),n=!0},p(e,n){const r={};1&n&&(r.buttonAction=e[0].evaluate),256&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function ht(e){let t;return{c(){t=_("Next")},m(e,n){E(e,t,n)},d(e){e&&C(t)}}}function dt(e){let t;return{c(){t=_("Evaluate")},m(e,n){E(e,t,n)},d(e){e&&C(t)}}}function pt(e){let t;return{c(){t=_("Evaluate")},m(e,n){E(e,t,n)},d(e){e&&C(t)}}}function gt(e){let t;return{c(){t=_("One more time!")},m(e,n){E(e,t,n)},d(e){e&&C(t)}}}function mt(e){let t,n=e[5].hint+"";return{c(){t=D("p"),N(t,"class","quizdown-hint svelte-9l6801")},m(e,r){E(e,t,r),t.innerHTML=n},p(e,r){32&r&&n!==(n=e[5].hint+"")&&(t.innerHTML=n)},d(e){e&&C(t)}}}function vt(e){let t,n,r,i,a,o,s,u;const l=[st,ot],c=[];function f(e,t){return e[1]===e[3].max?0:1}n=f(e),r=c[n]=l[n](e);let h=e[2]&&mt(e);return{c(){t=D("div"),r.c(),i=$(),h&&h.c(),a=$(),o=D("div"),s=D("a"),s.textContent="quizdown-js v0.1.4",N(t,"class","button-row svelte-9l6801"),N(s,"href","https://github.com/bonartm/quizdown-js"),N(s,"class","svelte-9l6801"),N(o,"class","quizdown-credits svelte-9l6801")},m(e,r){E(e,t,r),c[n].m(t,null),E(e,i,r),h&&h.m(e,r),E(e,a,r),E(e,o,r),w(o,s),u=!0},p(e,[i]){let o=n;n=f(e),n===o?c[n].p(e,i):(ie(),se(c[o],1,1,(()=>{c[o]=null})),ae(),r=c[n],r?r.p(e,i):(r=c[n]=l[n](e),r.c()),oe(r,1),r.m(t,null)),e[2]?h?h.p(e,i):(h=mt(e),h.c(),h.m(a.parentNode,a)):h&&(h.d(1),h=null)},i(e){u||(oe(r),u=!0)},o(e){se(r),u=!1},d(e){e&&C(t),c[n].d(),e&&C(i),h&&h.d(e),e&&C(a),e&&C(o)}}}function yt(e,n,r){let i,a,o,s,u,c=t,f=t;e.$$.on_destroy.push((()=>c())),e.$$.on_destroy.push((()=>f()));let{quiz:h}=n,d=!1;return e.$$set=e=>{"quiz"in e&&r(0,h=e.quiz)},e.$$.update=()=>{1&e.$$.dirty&&(r(3,i=h.counter),c(),c=l(i,(e=>r(1,s=e)))),1&e.$$.dirty&&(r(4,a=h.finished),f(),f=l(a,(e=>r(6,u=e)))),3&e.$$.dirty&&r(5,o=h.questions[s]),2&e.$$.dirty&&r(2,d=!1)},[h,s,d,i,a,o,u,()=>r(2,d=!d)]}class bt extends ge{constructor(e){super(),pe(this,e,yt,vt,u,{quiz:0},at)}}const Dt=[];function wt(e,n=t){let r;const i=[];function a(t){if(u(e,t)&&(e=t,r)){const t=!Dt.length;for(let t=0;t{const e=i.indexOf(u);-1!==e&&i.splice(e,1),0===i.length&&(r(),r=null)}}}}function kt(e){return"[object Date]"===Object.prototype.toString.call(e)}function xt(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)=>xt(e[n],t)));return e=>n.map((t=>t(e)))}if("object"===n){if(!e||!t)throw new Error("Object cannot be null");if(kt(e)&&kt(t)){e=e.getTime();const n=(t=t.getTime())-e;return t=>new Date(e+t*n)}const n=Object.keys(t),r={};return n.forEach((n=>{r[n]=xt(e[n],t[n])})),e=>{const t={};return n.forEach((n=>{t[n]=r[n](e)})),t}}if("number"===n){const n=t-e;return t=>e+t*n}throw new Error(`Cannot interpolate ${n} values`)}function At(e){k(e,"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 Et(e){let n,r;return{c(){n=D("div"),r=D("div"),N(r,"class","progress-slider svelte-1ma47z2"),T(r,"width",e[2]),N(n,"class","quizdown-progress svelte-1ma47z2"),N(n,"data-label","")},m(e,t){E(e,n,t),w(n,r)},p(e,[t]){4&t&&T(r,"width",e[2])},i:t,o:t,d(e){e&&C(n)}}}function Ct(e,i,a){let o,s,u,c,f,h,d=t,p=t;e.$$.on_destroy.push((()=>d())),e.$$.on_destroy.push((()=>p()));let{quiz:m}=i;const v=function(e,t={}){const i=wt(e);let a,o=e;function s(s,u){if(null==e)return i.set(e=s),Promise.resolve();o=s;let l=a,c=!1,{delay:f=0,duration:h=400,easing:d=n,interpolate:p=xt}=r(r({},t),u);if(0===h)return l&&(l.abort(),l=null),i.set(e=o),Promise.resolve();const m=g()+f;let v;return a=b((t=>{if(th?(i.set(e=s),!1):(i.set(e=v(d(n/h))),!0)})),a.promise}return{set:s,update:(t,n)=>s(t(o,e),n),subscribe:i.subscribe}}(0,{duration:400,easing:me});var y,D;return y=v,D=e=>a(7,h=e),e.$$.on_destroy.push(l(y,D)),e.$$set=e=>{"quiz"in e&&a(4,m=e.quiz)},e.$$.update=()=>{16&e.$$.dirty&&(a(0,o=m.counter),p(),p=l(o,(e=>a(6,f=e)))),16&e.$$.dirty&&(a(1,s=m.finished),d(),d=l(s,(e=>a(5,c=e)))),112&e.$$.dirty&&(c?v.set(m.counter.max-.5):v.set(f+.1)),144&e.$$.dirty&&a(2,u=String(h/(m.counter.max-.5)*100)+"%")},[o,s,u,v,m,c,f,h]}class St extends ge{constructor(e){super(),pe(this,e,Ct,Et,u,{quiz:4},At)}}function Ft(e){k(e,"3wow2r","@import 'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.6.0/build/styles/github.min.css';code, kbd{padding:0 0.4rem;font-size:90%;white-space:pre-wrap;border-radius:4px;padding:0.2em 0.4em;background-color:rgb(248, 255, 206);font-family:monaco, 'Consolas', 'Lucida Console', monospace}pre{background-color:rgb(248, 255, 206);font-size:1em;padding:0.4rem;overflow-x:auto;font-family:monaco, 'Consolas', 'Lucida Console', monospace}pre code{background:none;padding:0}a{color:var(--quizdown-color-primary)}.quizdown-content.svelte-3wow2r{line-height:1.2;font-size:1.1em;font-family:'Segoe UI', 'Helvetica Neue', sans-serif;padding:1rem;max-width:700px;margin:auto}.quizdown-card.svelte-3wow2r{box-shadow:0 4px 8px 0 rgba(0, 0, 0, 0.2);border-radius:0 0 4px 4px}.quizdown-container.svelte-3wow2r{padding:2px 16px}")}function _t(e){let t,n,r,i,a,o,s,u,l;return r=new St({props:{quiz:e[0]}}),o=new et({props:{quiz:e[0]}}),u=new bt({props:{quiz:e[0]}}),{c(){t=D("div"),n=D("div"),ce(r.$$.fragment),i=$(),a=D("div"),ce(o.$$.fragment),s=$(),ce(u.$$.fragment),N(a,"class","quizdown-container svelte-3wow2r"),N(n,"class","quizdown-card svelte-3wow2r"),N(t,"class","quizdown-content svelte-3wow2r")},m(c,f){E(c,t,f),w(t,n),fe(r,n,null),w(n,i),w(n,a),fe(o,a,null),w(a,s),fe(u,a,null),e[2](t),l=!0},p(e,[t]){const n={};1&t&&(n.quiz=e[0]),r.$set(n);const i={};1&t&&(i.quiz=e[0]),o.$set(i);const a={};1&t&&(a.quiz=e[0]),u.$set(a)},i(e){l||(oe(r.$$.fragment,e),oe(o.$$.fragment,e),oe(u.$$.fragment,e),l=!0)},o(e){se(r.$$.fragment,e),se(o.$$.fragment,e),se(u.$$.fragment,e),l=!1},d(n){n&&C(t),he(r),he(o),he(u),e[2](null)}}}function $t(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))};let i,{quiz:a}=t;return U((()=>r(void 0,void 0,void 0,(function*(){let e=a.config.primary_color,t=a.config.secondary_color,n=a.config.text_color;i.style.setProperty("--quizdown-color-primary",e),i.style.setProperty("--quizdown-color-secondary",t),i.style.setProperty("--quizdown-color-text",n)})))),e.$$set=e=>{"quiz"in e&&n(0,a=e.quiz)},[a,i,function(e){Y[e?"unshift":"push"]((()=>{i=e,n(1,i)}))}]}class Ot extends ge{constructor(e){super(),pe(this,e,$t,_t,u,{quiz:0},Ft)}}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function Bt(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),t}function Nt(e){var t={exports:{}};return e(t,t.exports),t.exports}var Rt=Nt((function(e,t){e.exports=function(){function e(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}function a(e){var t={exports:{}};return e(t,t.exports),t.exports}var o=a((function(e){function t(){return{baseUrl:null,breaks:!1,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}}function n(t){e.exports.defaults=t}e.exports={defaults:t(),getDefaults:t,changeDefaults:n}})),s=/[&<>"']/,u=/[&<>"']/g,l=/[<>"']|&(?!#?\w+;)/,c=/[<>"']|&(?!#?\w+;)/g,f={"&":"&","<":"<",">":">",'"':""","'":"'"},h=function(e){return f[e]};function d(e,t){if(t){if(s.test(e))return e.replace(u,h)}else if(l.test(e))return e.replace(c,h);return e}var p=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function g(e){return e.replace(p,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var m=/(^|[^\[])\^/g;function v(e,t){e=e.source||e,t=t||"";var n={replace:function(t,r){return r=(r=r.source||r).replace(m,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n}var y=/[^\w:]/g,b=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function D(e,t,n){if(e){var r;try{r=decodeURIComponent(g(n)).replace(y,"").toLowerCase()}catch(e){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!b.test(n)&&(n=E(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n}var w={},k=/^[^:]+:\/*[^/]*$/,x=/^([^:]+:)[\s\S]*$/,A=/^([^:]+:\/*[^/]*)[\s\S]*$/;function E(e,t){w[" "+e]||(k.test(e)?w[" "+e]=e+"/":w[" "+e]=F(e,"/",!0));var n=-1===(e=w[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(x,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(A,"$1")+t:e+t}function C(e){for(var t,n,r=1;r=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n.length>t)n.splice(t);else for(;n.length1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}var B={escape:d,unescape:g,edit:v,cleanUrl:D,resolveUrl:E,noopTest:{exec:function(){}},merge:C,splitCells:S,rtrim:F,findClosingBracket:_,checkSanitizeDeprecation:$,repeatString:O},N=o.defaults,R=B.rtrim,T=B.splitCells,z=B.escape,M=B.findClosingBracket;function I(e,t,n){var r=t.href,i=t.title?z(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:n,href:r,title:i,text:a}:{type:"image",raw:n,href:r,title:i,text:z(a)}}function L(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=r.length?e.slice(r.length):e})).join("\n")}var j=function(){function e(e){this.options=e||N}var t=e.prototype;return t.space=function(e){var t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:R(n,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=L(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:r}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(/#$/.test(n)){var r=R(n,"#");this.options.pedantic?n=r.trim():r&&!/ $/.test(r)||(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n}}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var n={type:"table",header:T(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(n.header.length===n.align.length){var r,i=n.align.length;for(r=0;r ?/gm,"");return{type:"blockquote",raw:t[0],text:n}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){var n,r,i,a,o,s,u,l,c,f=t[0],h=t[2],d=h.length>1,p={type:"list",raw:f,ordered:d,start:d?+h.slice(0,-1):"",loose:!1,items:[]},g=t[0].match(this.rules.block.item),m=!1,v=g.length;i=this.rules.block.listItemStart.exec(g[0]);for(var y=0;yi[1].length:a[1].length>=i[0].length||a[1].length>3){g.splice(y,2,g[y]+(!this.options.pedantic&&a[1].length/i.test(r[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):z(r[0]):r[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;var r=R(n.slice(0,-1),"\\");if((n.length-r.length)%2==0)return}else{var i=M(t[2],"()");if(i>-1){var a=(0===t[0].indexOf("!")?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,a).trim(),t[3]=""}}var o=t[2],s="";if(this.options.pedantic){var u=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);u&&(o=u[1],s=u[3])}else s=t[3]?t[3].slice(1,-1):"";return o=o.trim(),/^$/.test(n)?o.slice(1):o.slice(1,-1)),I(t,{href:o?o.replace(this.rules.inline._escapes,"$1"):o,title:s?s.replace(this.rules.inline._escapes,"$1"):s},t[0])}},t.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return I(n,r,n[0])}},t.emStrong=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.emStrong.lDelim.exec(e);if(r&&(!r[3]||!n.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var i=r[1]||r[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){var a,o,s=r[0].length-1,u=s,l=0,c="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+s);null!=(r=c.exec(t));)if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6])if(o=a.length,r[3]||r[4])u+=o;else if(!((r[5]||r[6])&&s%3)||(s+o)%3){if(!((u-=o)>0)){if(u+l-o<=0&&!t.slice(c.lastIndex).match(c)&&(o=Math.min(o,o+u+l)),Math.min(s,o)%2)return{type:"em",raw:e.slice(0,s+r.index+o+1),text:e.slice(1,s+r.index+o)};if(Math.min(s,o)%2==0)return{type:"strong",raw:e.slice(0,s+r.index+o+1),text:e.slice(2,s+r.index+o-1)}}}else l+=o}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return r&&i&&(n=n.substring(1,n.length-1)),n=z(n,!0),{type:"codespan",raw:t[0],text:n}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2]}},t.autolink=function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=z(this.options.mangle?t(i[1]):i[1])):n=z(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}},t.url=function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=z(this.options.mangle?t(n[0]):n[0]));else{var a;do{a=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(a!==n[0]);r=z(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},t.inlineText=function(e,t,n){var r,i=this.rules.inline.text.exec(e);if(i)return r=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):z(i[0]):i[0]:z(this.options.smartypants?n(i[0]):i[0]),{type:"text",raw:i[0],text:r}},e}(),P=B.noopTest,q=B.edit,H=B.merge,U={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)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:P,table:P,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?'|\([^()]*\))/};U.def=q(U.def).replace("label",U._label).replace("title",U._title).getRegex(),U.bullet=/(?:[*+-]|\d{1,9}[.)])/,U.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,U.item=q(U.item,"gm").replace(/bull/g,U.bullet).getRegex(),U.listItemStart=q(/^( *)(bull) */).replace("bull",U.bullet).getRegex(),U.list=q(U.list).replace(/bull/g,U.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+U.def.source+")").getRegex(),U._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",U._comment=/|$)/,U.html=q(U.html,"i").replace("comment",U._comment).replace("tag",U._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),U.paragraph=q(U._paragraph).replace("hr",U.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|!--)").replace("tag",U._tag).getRegex(),U.blockquote=q(U.blockquote).replace("paragraph",U.paragraph).getRegex(),U.normal=H({},U),U.gfm=H({},U.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*|$)"}),U.gfm.nptable=q(U.gfm.nptable).replace("hr",U.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|!--)").replace("tag",U._tag).getRegex(),U.gfm.table=q(U.gfm.table).replace("hr",U.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|!--)").replace("tag",U._tag).getRegex(),U.pedantic=H({},U.normal,{html:q("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",U._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:P,paragraph:q(U.normal._paragraph).replace("hr",U.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",U.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var W={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:P,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:P,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};W.punctuation=q(W.punctuation).replace(/punctuation/g,W._punctuation).getRegex(),W.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,W.escapedEmSt=/\\\*|\\_/g,W._comment=q(U._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),W.emStrong.lDelim=q(W.emStrong.lDelim).replace(/punct/g,W._punctuation).getRegex(),W.emStrong.rDelimAst=q(W.emStrong.rDelimAst,"g").replace(/punct/g,W._punctuation).getRegex(),W.emStrong.rDelimUnd=q(W.emStrong.rDelimUnd,"g").replace(/punct/g,W._punctuation).getRegex(),W._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,W._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,W._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])?)+(?![-_])/,W.autolink=q(W.autolink).replace("scheme",W._scheme).replace("email",W._email).getRegex(),W._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,W.tag=q(W.tag).replace("comment",W._comment).replace("attribute",W._attribute).getRegex(),W._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,W._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,W._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,W.link=q(W.link).replace("label",W._label).replace("href",W._href).replace("title",W._title).getRegex(),W.reflink=q(W.reflink).replace("label",W._label).getRegex(),W.reflinkSearch=q(W.reflinkSearch,"g").replace("reflink",W.reflink).replace("nolink",W.nolink).getRegex(),W.normal=H({},W),W.pedantic=H({},W.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:q(/^!?\[(label)\]\((.*?)\)/).replace("label",W._label).getRegex(),reflink:q(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",W._label).getRegex()}),W.gfm=H({},W.normal,{escape:q(W.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)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}var X=function(){function e(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||J,this.options.tokenizer=this.options.tokenizer||new j,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:K.normal,inline:V.normal};this.options.pedantic?(t.block=K.pedantic,t.inline=V.pedantic):this.options.gfm&&(t.block=K.gfm,this.options.breaks?t.inline=V.breaks:t.inline=V.gfm),this.tokenizer.rules=t}e.lex=function(t,n){return new e(n).lex(t)},e.lexInline=function(t,n){return new e(n).inlineTokens(t)};var n=e.prototype;return n.lex=function(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},n.blockTokens=function(e,t,n){var r,i,a,o;for(void 0===t&&(t=[]),void 0===n&&(n=!0),this.options.pedantic&&(e=e.replace(/^ +$/gm,""));e;)if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),r.type&&t.push(r);else if(r=this.tokenizer.code(e))e=e.substring(r.raw.length),(o=t[t.length-1])&&"paragraph"===o.type?(o.raw+="\n"+r.raw,o.text+="\n"+r.text):t.push(r);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.nptable(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],n),t.push(r);else if(r=this.tokenizer.list(e)){for(e=e.substring(r.raw.length),a=r.items.length,i=0;i0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(l));)c.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,o.index)+"["+G("a",o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,o.index)+"["+G("a",o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.escapedEmSt.exec(l));)l=l.slice(0,o.index)+"++"+l.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(s||(u=""),s=!1,i=this.tokenizer.escape(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.tag(e,n,r)){e=e.substring(i.raw.length),n=i.inLink,r=i.inRawBlock;var f=t[t.length-1];f&&"text"===i.type&&"text"===f.type?(f.raw+=i.raw,f.text+=i.text):t.push(i)}else if(i=this.tokenizer.link(e))e=e.substring(i.raw.length),"link"===i.type&&(i.tokens=this.inlineTokens(i.text,[],!0,r)),t.push(i);else if(i=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(i.raw.length);var h=t[t.length-1];"link"===i.type?(i.tokens=this.inlineTokens(i.text,[],!0,r),t.push(i)):h&&"text"===i.type&&"text"===h.type?(h.raw+=i.raw,h.text+=i.text):t.push(i)}else if(i=this.tokenizer.emStrong(e,l,u))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,r),t.push(i);else if(i=this.tokenizer.codespan(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.br(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.del(e))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,r),t.push(i);else if(i=this.tokenizer.autolink(e,Q))e=e.substring(i.raw.length),t.push(i);else if(n||!(i=this.tokenizer.url(e,Q))){if(i=this.tokenizer.inlineText(e,r,Z))e=e.substring(i.raw.length),"_"!==i.raw.slice(-1)&&(u=i.raw.slice(-1)),s=!0,(a=t[t.length-1])&&"text"===a.type?(a.raw+=i.raw,a.text+=i.text):t.push(i);else if(e){var d="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(d);break}throw new Error(d)}}else e=e.substring(i.raw.length),t.push(i);return t},t(e,null,[{key:"rules",get:function(){return{block:K,inline:V}}}]),e}(),ee=o.defaults,te=B.cleanUrl,ne=B.escape,re=function(){function e(e){this.options=e||ee}var t=e.prototype;return t.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return e=e.replace(/\n$/,"")+"\n",r?'
'+(n?e:ne(e,!0))+"
\n":"
"+(n?e:ne(e,!0))+"
\n"},t.blockquote=function(e){return"
\n"+e+"
\n"},t.html=function(e){return e},t.heading=function(e,t,n,r){return this.options.headerIds?"'+e+"\n":""+e+"\n"},t.hr=function(){return this.options.xhtml?"
\n":"
\n"},t.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},t.listitem=function(e){return"
  • "+e+"
  • \n"},t.checkbox=function(e){return" "},t.paragraph=function(e){return"

    "+e+"

    \n"},t.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},t.tablerow=function(e){return"\n"+e+"\n"},t.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},t.strong=function(e){return""+e+""},t.em=function(e){return""+e+""},t.codespan=function(e){return""+e+""},t.br=function(){return this.options.xhtml?"
    ":"
    "},t.del=function(e){return""+e+""},t.link=function(e,t,n){if(null===(e=te(this.options.sanitize,this.options.baseUrl,e)))return n;var r='"},t.image=function(e,t,n){if(null===(e=te(this.options.sanitize,this.options.baseUrl,e)))return n;var r=''+n+'":">"},t.text=function(e){return e},e}(),ie=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),ae=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{n=e+"-"+ ++r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n},t.slug=function(e,t){void 0===t&&(t={});var n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)},e}(),oe=o.defaults,se=B.unescape,ue=function(){function e(e){this.options=e||oe,this.options.renderer=this.options.renderer||new re,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ie,this.slugger=new ae}e.parse=function(t,n){return new e(n).parse(t)},e.parseInline=function(t,n){return new e(n).parseInline(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var n,r,i,a,o,s,u,l,c,f,h,d,p,g,m,v,y,b,D="",w=e.length;for(n=0;n0&&"text"===m.tokens[0].type?(m.tokens[0].text=b+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&"text"===m.tokens[0].tokens[0].type&&(m.tokens[0].tokens[0].text=b+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:b}):g+=b),g+=this.parse(m.tokens,p),c+=this.renderer.listitem(g,y,v);D+=this.renderer.list(c,h,d);continue;case"html":D+=this.renderer.html(f.text);continue;case"paragraph":D+=this.renderer.paragraph(this.parseInline(f.tokens));continue;case"text":for(c=f.tokens?this.parseInline(f.tokens):f.text;n+1An error occurred:

    "+fe(e.message+"",!0)+"
    ";throw e}}return ge.options=ge.setOptions=function(e){return le(ge.defaults,e),de(ge.defaults),ge},ge.getDefaults=he,ge.defaults=pe,ge.use=function(e){var t=le({},e);if(e.renderer&&function(){var n=ge.defaults.renderer||new re,r=function(t){var r=n[t];n[t]=function(){for(var i=arguments.length,a=new Array(i),o=0;oAn error occurred:

    "+fe(e.message+"",!0)+"
    ";throw e}},ge.Parser=ue,ge.parser=ue.parse,ge.Renderer=re,ge.TextRenderer=ie,ge.Lexer=X,ge.lexer=X.lex,ge.Tokenizer=j,ge.Slugger=ae,ge.parse=ge,ge}()})),Tt=Nt((function(e,t){e.exports=function(){function e(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1?n-1:0),i=1;i/gm),j=s(/^data-[\-\w.\u00B7-\uFFFF]/),P=s(/^aria-[\-\w]+$/),q=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=s(/^(?:\w+script|data):/i),U=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),W="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 Y(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:J(),t=function(e){return V(e)};if(t.version="2.2.8",t.removed=[],!e||!e.document||9!==e.document.nodeType)return t.isSupported=!1,t;var n=e.document,r=e.document,i=e.DocumentFragment,a=e.HTMLTemplateElement,s=e.Node,u=e.Element,l=e.NodeFilter,c=e.NamedNodeMap,f=void 0===c?e.NamedNodeMap||e.MozNamedAttrMap:c,k=e.Text,x=e.Comment,G=e.DOMParser,Z=e.trustedTypes,Q=u.prototype,X=C(Q,"cloneNode"),ee=C(Q,"nextSibling"),te=C(Q,"childNodes"),ne=C(Q,"parentNode");if("function"==typeof a){var re=r.createElement("template");re.content&&re.content.ownerDocument&&(r=re.content.ownerDocument)}var ie=K(Z,n),ae=ie&&ze?ie.createHTML(""):"",oe=r,se=oe.implementation,ue=oe.createNodeIterator,le=oe.createDocumentFragment,ce=n.importNode,fe={};try{fe=E(r).documentMode?r.documentMode:{}}catch(e){}var he={};t.isSupported="function"==typeof ne&&se&&void 0!==se.createHTMLDocument&&9!==fe;var de=I,pe=L,ge=j,me=P,ve=H,ye=U,be=q,De=null,we=A({},[].concat(Y(S),Y(F),Y(_),Y(O),Y(N))),ke=null,xe=A({},[].concat(Y(R),Y(T),Y(z),Y(M))),Ae=null,Ee=null,Ce=!0,Se=!0,Fe=!1,_e=!1,$e=!1,Oe=!1,Be=!1,Ne=!1,Re=!1,Te=!0,ze=!1,Me=!0,Ie=!0,Le=!1,je={},Pe=A({},["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"]),qe=null,He=A({},["audio","video","img","source","image","track"]),Ue=null,We=A({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Ye="http://www.w3.org/1998/Math/MathML",Je="http://www.w3.org/2000/svg",Ke="http://www.w3.org/1999/xhtml",Ve=Ke,Ge=null,Ze=r.createElement("form"),Qe=function(e){Ge&&Ge===e||(e&&"object"===(void 0===e?"undefined":W(e))||(e={}),e=E(e),De="ALLOWED_TAGS"in e?A({},e.ALLOWED_TAGS):we,ke="ALLOWED_ATTR"in e?A({},e.ALLOWED_ATTR):xe,Ue="ADD_URI_SAFE_ATTR"in e?A(E(We),e.ADD_URI_SAFE_ATTR):We,qe="ADD_DATA_URI_TAGS"in e?A(E(He),e.ADD_DATA_URI_TAGS):He,Ae="FORBID_TAGS"in e?A({},e.FORBID_TAGS):{},Ee="FORBID_ATTR"in e?A({},e.FORBID_ATTR):{},je="USE_PROFILES"in e&&e.USE_PROFILES,Ce=!1!==e.ALLOW_ARIA_ATTR,Se=!1!==e.ALLOW_DATA_ATTR,Fe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,_e=e.SAFE_FOR_TEMPLATES||!1,$e=e.WHOLE_DOCUMENT||!1,Ne=e.RETURN_DOM||!1,Re=e.RETURN_DOM_FRAGMENT||!1,Te=!1!==e.RETURN_DOM_IMPORT,ze=e.RETURN_TRUSTED_TYPE||!1,Be=e.FORCE_BODY||!1,Me=!1!==e.SANITIZE_DOM,Ie=!1!==e.KEEP_CONTENT,Le=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||be,Ve=e.NAMESPACE||Ve,_e&&(Se=!1),Re&&(Ne=!0),je&&(De=A({},[].concat(Y(N))),ke=[],!0===je.html&&(A(De,S),A(ke,R)),!0===je.svg&&(A(De,F),A(ke,T),A(ke,M)),!0===je.svgFilters&&(A(De,_),A(ke,T),A(ke,M)),!0===je.mathMl&&(A(De,O),A(ke,z),A(ke,M))),e.ADD_TAGS&&(De===we&&(De=E(De)),A(De,e.ADD_TAGS)),e.ADD_ATTR&&(ke===xe&&(ke=E(ke)),A(ke,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&A(Ue,e.ADD_URI_SAFE_ATTR),Ie&&(De["#text"]=!0),$e&&A(De,["html","head","body"]),De.table&&(A(De,["tbody"]),delete Ae.tbody),o&&o(e),Ge=e)},Xe=A({},["mi","mo","mn","ms","mtext"]),et=A({},["foreignobject","desc","title","annotation-xml"]),tt=A({},F);A(tt,_),A(tt,$);var nt=A({},O);A(nt,B);var rt=function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:Ke,tagName:"template"});var n=g(e.tagName),r=g(t.tagName);if(e.namespaceURI===Je)return t.namespaceURI===Ke?"svg"===n:t.namespaceURI===Ye?"svg"===n&&("annotation-xml"===r||Xe[r]):Boolean(tt[n]);if(e.namespaceURI===Ye)return t.namespaceURI===Ke?"math"===n:t.namespaceURI===Je?"math"===n&&et[r]:Boolean(nt[n]);if(e.namespaceURI===Ke){if(t.namespaceURI===Je&&!et[r])return!1;if(t.namespaceURI===Ye&&!Xe[r])return!1;var i=A({},["title","style","font","a","script"]);return!nt[n]&&(i[n]||!tt[n])}return!1},it=function(e){p(t.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=ae}catch(t){e.remove()}}},at=function(e,n){try{p(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch(e){p(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),"is"===e&&!ke[e])if(Ne||Re)try{it(n)}catch(e){}else try{n.setAttribute(e,"")}catch(e){}},ot=function(e){var t=void 0,n=void 0;if(Be)e=""+e;else{var i=m(e,/^[\r\n\t ]+/);n=i&&i[0]}var a=ie?ie.createHTML(e):e;if(Ve===Ke)try{t=(new G).parseFromString(a,"text/html")}catch(e){}t&&t.documentElement||((t=se.createDocument(Ve,"template",null)).documentElement.innerHTML=a);var o=t.body||t.documentElement;return e&&n&&o.insertBefore(r.createTextNode(n),o.childNodes[0]||null),$e?t.documentElement:o},st=function(e){return ue.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,(function(){return l.FILTER_ACCEPT}),!1)},ut=function(e){return!(e instanceof k||e instanceof x||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof f&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore)},lt=function(e){return"object"===(void 0===s?"undefined":W(s))?e instanceof s:e&&"object"===(void 0===e?"undefined":W(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},ct=function(e,n,r){he[e]&&h(he[e],(function(e){e.call(t,n,r,Ge)}))},ft=function(e){var n=void 0;if(ct("beforeSanitizeElements",e,null),ut(e))return it(e),!0;if(m(e.nodeName,/[\u0080-\uFFFF]/))return it(e),!0;var r=g(e.nodeName);if(ct("uponSanitizeElement",e,{tagName:r,allowedTags:De}),!lt(e.firstElementChild)&&(!lt(e.content)||!lt(e.content.firstElementChild))&&D(/<[/\w]/g,e.innerHTML)&&D(/<[/\w]/g,e.textContent))return it(e),!0;if(!De[r]||Ae[r]){if(Ie&&!Pe[r]){var i=ne(e)||e.parentNode,a=te(e)||e.childNodes;if(a&&i)for(var o=a.length-1;o>=0;--o)i.insertBefore(X(a[o],!0),ee(e))}return it(e),!0}return e instanceof u&&!rt(e)?(it(e),!0):"noscript"!==r&&"noembed"!==r||!D(/<\/no(script|embed)/i,e.innerHTML)?(_e&&3===e.nodeType&&(n=e.textContent,n=v(n,de," "),n=v(n,pe," "),e.textContent!==n&&(p(t.removed,{element:e.cloneNode()}),e.textContent=n)),ct("afterSanitizeElements",e,null),!1):(it(e),!0)},ht=function(e,t,n){if(Me&&("id"===t||"name"===t)&&(n in r||n in Ze))return!1;if(Se&&D(ge,t));else if(Ce&&D(me,t));else{if(!ke[t]||Ee[t])return!1;if(Ue[t]);else if(D(be,v(n,ye,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(n,"data:")||!qe[e])if(Fe&&!D(ve,v(n,ye,"")));else if(n)return!1}return!0},dt=function(e){var n=void 0,r=void 0,i=void 0,a=void 0;ct("beforeSanitizeAttributes",e,null);var o=e.attributes;if(o){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ke};for(a=o.length;a--;){var u=n=o[a],l=u.name,c=u.namespaceURI;if(r=b(n.value),i=g(l),s.attrName=i,s.attrValue=r,s.keepAttr=!0,s.forceKeepAttr=void 0,ct("uponSanitizeAttribute",e,s),r=s.attrValue,!s.forceKeepAttr&&(at(l,e),s.keepAttr))if(D(/\/>/i,r))at(l,e);else{_e&&(r=v(r,de," "),r=v(r,pe," "));var f=e.nodeName.toLowerCase();if(ht(f,i,r))try{c?e.setAttributeNS(c,l,r):e.setAttribute(l,r),d(t.removed)}catch(e){}}}ct("afterSanitizeAttributes",e,null)}},pt=function e(t){var n=void 0,r=st(t);for(ct("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)ct("uponSanitizeShadowNode",n,null),ft(n)||(n.content instanceof i&&e(n.content),dt(n));ct("afterSanitizeShadowDOM",t,null)};return t.sanitize=function(r,a){var o=void 0,u=void 0,l=void 0,c=void 0,f=void 0;if(r||(r="\x3c!--\x3e"),"string"!=typeof r&&!lt(r)){if("function"!=typeof r.toString)throw w("toString is not a function");if("string"!=typeof(r=r.toString()))throw w("dirty is not a string, aborting")}if(!t.isSupported){if("object"===W(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof r)return e.toStaticHTML(r);if(lt(r))return e.toStaticHTML(r.outerHTML)}return r}if(Oe||Qe(a),t.removed=[],"string"==typeof r&&(Le=!1),Le);else if(r instanceof s)1===(u=(o=ot("\x3c!----\x3e")).ownerDocument.importNode(r,!0)).nodeType&&"BODY"===u.nodeName||"HTML"===u.nodeName?o=u:o.appendChild(u);else{if(!Ne&&!_e&&!$e&&-1===r.indexOf("<"))return ie&&ze?ie.createHTML(r):r;if(!(o=ot(r)))return Ne?null:ae}o&&Be&&it(o.firstChild);for(var h=st(Le?r:o);l=h.nextNode();)3===l.nodeType&&l===c||ft(l)||(l.content instanceof i&&pt(l.content),dt(l),c=l);if(c=null,Le)return r;if(Ne){if(Re)for(f=le.call(o.ownerDocument);o.firstChild;)f.appendChild(o.firstChild);else f=o;return Te&&(f=ce.call(n,f,!0)),f}var d=$e?o.outerHTML:o.innerHTML;return _e&&(d=v(d,de," "),d=v(d,pe," ")),ie&&ze?ie.createHTML(d):d},t.setConfig=function(e){Qe(e),Oe=!0},t.clearConfig=function(){Ge=null,Oe=!1},t.isValidAttribute=function(e,t,n){Ge||Qe({});var r=g(e),i=g(t);return ht(r,i,n)},t.addHook=function(e,t){"function"==typeof t&&(he[e]=he[e]||[],p(he[e],t))},t.removeHook=function(e){he[e]&&d(he[e])},t.removeHooks=function(e){he[e]&&(he[e]=[])},t.removeAllHooks=function(){he={}},t}return V()}()})),zt=e=>{const t=(e=>{const t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce(((e,t)=>Math.min(e,t.length)),1/0):0})(e);if(0===t)return e;const n=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(n,"")}; +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).quizdown={})}(this,(function(e){"use strict";function t(){}const n=e=>e;function r(e,t){for(const n in t)e[n]=t[n];return e}function i(e){return e()}function a(){return Object.create(null)}function o(e){e.forEach(i)}function s(e){return"function"==typeof e}function u(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function l(e,...n){if(null==e)return t;const r=e.subscribe(...n);return r.unsubscribe?()=>r.unsubscribe():r}function c(e){let t;return l(e,(e=>t=e))(),t}function f(e,t,n,i){return e[1]&&i?r(n.ctx.slice(),e[1](i(t))):n.ctx}function h(e,t,n,r,i,a,o){const s=function(e,t,n,r){if(e[2]&&r){const i=e[2](r(n));if(void 0===t.dirty)return i;if("object"==typeof i){const e=[],n=Math.max(t.dirty.length,i.length);for(let r=0;rwindow.performance.now():()=>Date.now(),m=p?e=>requestAnimationFrame(e):t;const v=new Set;function y(e){v.forEach((t=>{t.c(e)||(v.delete(t),t.f())})),0!==v.size&&m(y)}function b(e){let t;return 0===v.size&&m(y),{promise:new Promise((n=>{v.add(t={c:e,f:n})})),abort(){v.delete(t)}}}function D(e){return document.createElement(e)}function w(e,t){e.appendChild(t)}function k(e,t,n,r=`svelte-${t}-style`){const i=A(e);if(!function(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}([i,"optionalAccess",e=>e.querySelector,"call",e=>e("#"+r)])){const e=D("style");e.id=r,e.textContent=n,w(i,e)}}function x(e){return e?e.getRootNode?e.getRootNode():e.ownerDocument:document}function A(e){const t=x(e);return t.host?t:t.head}function E(e,t,n){e.insertBefore(t,n||null)}function C(e){e.parentNode.removeChild(e)}function S(e,t){for(let n=0;ne.removeEventListener(t,n,r)}function N(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function R(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function T(e,t,n,r){e.style.setProperty(t,n,r?"important":"")}class z{constructor(e=null){this.a=e,this.e=this.n=null}m(e,t,n=null){this.e||(this.e=D(t.nodeName),this.t=t,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}(c)}_${s}`,h=x(e);M.add(h);const d=h.__svelte_stylesheet||(h.__svelte_stylesheet=function(e){return A(e).appendChild(D("style"))}(e).sheet),p=h.__svelte_rules||(h.__svelte_rules={});p[f]||(p[f]=!0,d.insertRule(`@keyframes ${f} ${c}`,d.cssRules.length));const g=e.style.animation||"";return e.style.animation=`${g?`${g}, `:""}${f} ${r}ms linear ${i}ms 1 both`,L+=1,f}function P(e,t){const n=(e.style.animation||"").split(", "),r=n.filter(t?e=>e.indexOf(t)<0:e=>-1===e.indexOf("__svelte")),i=n.length-r.length;i&&(e.style.animation=r.join(", "),L-=i,L||m((()=>{L||(M.forEach((e=>{const t=e.__svelte_stylesheet;let n=t.cssRules.length;for(;n--;)t.deleteRule(n);e.__svelte_rules={}})),M.clear())})))}function q(e){const t=getComputedStyle(e);if("absolute"!==t.position&&"fixed"!==t.position){const{width:n,height:r}=t,i=e.getBoundingClientRect();e.style.position="absolute",e.style.width=n,e.style.height=r,function(e,t){const n=e.getBoundingClientRect();if(t.left!==n.left||t.top!==n.top){const r=getComputedStyle(e),i="none"===r.transform?"":r.transform;e.style.transform=`${i} translate(${t.left-n.left}px, ${t.top-n.top}px)`}}(e,i)}}function H(e){I=e}function U(e){(function(){if(!I)throw new Error("Function called outside component initialization");return I})().$$.on_mount.push(e)}const W=[],Y=[],J=[],K=[],V=Promise.resolve();let G=!1;function Z(e){J.push(e)}let Q=!1;const X=new Set;function ee(){if(!Q){Q=!0;do{for(let e=0;e{ne.delete(e),r&&(n&&e.d(1),r())})),e.o(t)}}const ue="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function le(e,t){e.f(),function(e,t){e.d(1),t.delete(e.key)}(e,t)}function ce(e){e&&e.c()}function fe(e,t,n,r){const{fragment:a,on_mount:u,on_destroy:l,after_update:c}=e.$$;a&&a.m(t,n),r||Z((()=>{const t=u.map(i).filter(s);l?l.push(...t):o(t),e.$$.on_mount=[]})),c.forEach(Z)}function he(e,t){const n=e.$$;null!==n.fragment&&(o(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function de(e,t){-1===e.$$.dirty[0]&&(W.push(e),G||(G=!0,V.then(ee)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const i=r.length?r[0]:n;return h.ctx&&s(h.ctx[t],h.ctx[t]=i)&&(!h.skip_bound&&h.bound[t]&&h.bound[t](i),d&&de(e,t)),n})):[],h.update(),d=!0,o(h.before_update),h.fragment=!!i&&i(h.ctx),n.target){if(n.hydrate){const e=function(e){return Array.from(e.childNodes)}(n.target);h.fragment&&h.fragment.l(e),e.forEach(C)}else h.fragment&&h.fragment.c();n.intro&&oe(e.$$.fragment),fe(e,n.target,n.anchor,n.customElement),ee()}H(f)}class ge{$destroy(){he(this,1),this.$destroy=t}$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 me(e){const t=e-1;return t*t*t+1}function ve(e,t,n={}){const r=getComputedStyle(e),i="none"===r.transform?"":r.transform,a=t.from.width/e.clientWidth,o=t.from.height/e.clientHeight,u=(t.from.left-t.to.left)/a,l=(t.from.top-t.to.top)/o,c=Math.sqrt(u*u+l*l),{delay:f=0,duration:h=(e=>120*Math.sqrt(e)),easing:d=me}=n;return{delay:f,duration:s(h)?h(c):h,easing:d,css:(e,t)=>`transform: ${i} translate(${t*u}px, ${t*l}px);`}}const{Map:ye}=ue;function be(e){k(e,"1g3zabj","main.svelte-1g3zabj.svelte-1g3zabj{position:relative}.list.svelte-1g3zabj.svelte-1g3zabj{cursor:grab;z-index:5;display:flex;flex-direction:column}.item.svelte-1g3zabj.svelte-1g3zabj{box-sizing:border-box;display:inline-flex;width:100%;min-height:3em;margin-bottom:0.5em;background-color:white;border:1px solid rgb(190, 190, 190);border-radius:2px;user-select:none}.item.svelte-1g3zabj.svelte-1g3zabj:last-child{margin-bottom:0}.item.svelte-1g3zabj.svelte-1g3zabj:not(#grabbed):not(#ghost){z-index:10}.item.svelte-1g3zabj>.svelte-1g3zabj{margin:auto}.buttons.svelte-1g3zabj.svelte-1g3zabj{width:32px;min-width:32px;margin:auto 0;display:flex;flex-direction:column}.buttons.svelte-1g3zabj button.svelte-1g3zabj{cursor:pointer;width:18px;height:18px;margin:0 auto;padding:0;border:1px solid rgba(0, 0, 0, 0);background-color:inherit}.buttons.svelte-1g3zabj button.svelte-1g3zabj:focus{border:1px solid black}.delete.svelte-1g3zabj.svelte-1g3zabj{width:32px}#grabbed.svelte-1g3zabj.svelte-1g3zabj{opacity:0.0}#ghost.svelte-1g3zabj.svelte-1g3zabj{pointer-events:none;z-index:-5;position:absolute;top:0;left:0;opacity:0.0}#ghost.svelte-1g3zabj .svelte-1g3zabj{pointer-events:none}#ghost.haunting.svelte-1g3zabj.svelte-1g3zabj{z-index:20;opacity:1.0}")}function De(e,t,n){const r=e.slice();return r[27]=t[n],r[29]=n,r}function we(e){let t,n,r=e[27]+"";return{c(){t=D("p"),n=_(r)},m(e,r){E(e,t,r),w(t,n)},p(e,t){1&t&&r!==(r=e[27]+"")&&R(n,r)},d(e){e&&C(t)}}}function ke(e){let t,n,r=e[27].text+"";return{c(){t=D("p"),n=_(r)},m(e,r){E(e,t,r),w(t,n)},p(e,t){1&t&&r!==(r=e[27].text+"")&&R(n,r)},d(e){e&&C(t)}}}function xe(e){let t,n,r=e[27].html+"";return{c(){n=O(),t=new z(n)},m(e,i){t.m(r,e,i),E(e,n,i)},p(e,n){1&n&&r!==(r=e[27].html+"")&&t.p(r)},d(e){e&&C(n),e&&t.d()}}}function Ae(e){let t,n,r;function i(...t){return e[17](e[29],...t)}return{c(){t=D("button"),t.innerHTML='',N(t,"class","svelte-1g3zabj")},m(e,a){E(e,t,a),n||(r=B(t,"click",i),n=!0)},p(t,n){e=t},d(e){e&&C(t),n=!1,r()}}}function Ee(e,r){let i,a,s,u,l,c,f,h,d,p,m,v,y,k,x,A,S,_,O,R,T,z,M,I,L=t;function H(...e){return r[15](r[29],...e)}function U(...e){return r[16](r[29],...e)}function W(e,t){return e[27].html?xe:e[27].text?ke:we}let Y=W(r),J=Y(r),K=r[1]&&Ae(r);return{key:e,first:null,c(){i=D("div"),a=D("div"),s=D("button"),u=F("svg"),l=F("path"),c=F("path"),h=$(),d=D("button"),p=F("svg"),m=F("path"),v=F("path"),k=$(),x=D("div"),J.c(),A=$(),S=D("div"),K&&K.c(),_=$(),N(l,"d","M0 0h24v24H0V0z"),N(l,"fill","none"),N(c,"d","M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6 1.41 1.41z"),N(u,"xmlns","http://www.w3.org/2000/svg"),N(u,"viewBox","0 0 24 24"),N(u,"width","16px"),N(u,"height","16px"),N(s,"class","up svelte-1g3zabj"),N(s,"style",f="visibility: "+(r[29]>0?"":"hidden")+";"),N(m,"d","M0 0h24v24H0V0z"),N(m,"fill","none"),N(v,"d","M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"),N(p,"xmlns","http://www.w3.org/2000/svg"),N(p,"viewBox","0 0 24 24"),N(p,"width","16px"),N(p,"height","16px"),N(d,"class","down svelte-1g3zabj"),N(d,"style",y="visibility: "+(r[29]0?"":"hidden")+";")&&N(s,"style",f),1&t&&y!==(y="visibility: "+(r[29]{if(!v&&e>=c&&(v=!0),v&&e>=f&&(h(1,0),y()),!m)return!1;if(v){const t=0+1*l((e-c)/u);h(t,1-t)}return!0})),d&&(p=j(e,0,1,u,s,l,d)),s||(v=!0),h(0,1),y}(i,z,ve,{duration:200})},d(e){e&&C(i),J.d(),K&&K.d(),M=!1,o(I)}}}function Ce(e){let n,r,i,a,s,u,l,c,f,h=[],p=new ye,g=e[0];const m=e=>e[27].id?e[27].id:JSON.stringify(e[27]);for(let t=0;ty.get(i)?(D.add(r),w(t)):(b.add(i),h--):(u(n,o),h--)}for(;h--;){const t=e[h];v.has(t.key)||u(t,o)}for(;d;)w(m[d-1]);return m}(h,t,m,1,e,g,p,l,le,Ee,null,De);for(let e=0;e{"data"in e&&n(0,o=e.data),"removesItems"in e&&n(1,s=e.removesItems)},[o,s,r,i,u,l,c,f,h,d,p,g,m,v,function(e){Y[e?"unshift":"push"]((()=>{r=e,n(2,r)}))},function(e,t){g(e,e-1)},function(e,t){g(e,e+1)},function(e,t){v(e)},function(e){f(e.clientY,this)},function(e){f(e.touches[0].clientY,this)},function(e){e.stopPropagation(),p(0,e.target)},function(e){e.stopPropagation(),e.preventDefault(),d(e.touches[0])},function(e){e.stopPropagation(),h(e.clientY)},function(e){e.stopPropagation(),h(e.touches[0].clientY)},function(e){e.stopPropagation(),m()},function(e){e.stopPropagation(),m(e.touches[0])}]}class Fe extends ge{constructor(e){super(),pe(this,e,Se,Ce,u,{data:0,removesItems:1},be)}}function _e(e){k(e,"14epiz9",".dragdroplist > .list > div.item{min-height:2rem;height:2.5rem;margin:5px;padding:0;width:unset;background-color:var(--quizdown-color-secondary);border:3px solid transparent}.dragdroplist div.content{padding:0;margin:auto auto auto 0 !important}.dragdroplist #ghost{border:3px solid var(--quizdown-color-primary);background-color:var(--quizdown-color-secondary)}")}function $e(e){let t,n,r;function i(t){e[4](t)}let a={};return void 0!==e[0].answers&&(a.data=e[0].answers),t=new Fe({props:a}),Y.push((()=>function(e,t,n){const r=e.$$.props[t];void 0!==r&&(e.$$.bound[r]=n,n(e.$$.ctx[r]))}(t,"data",i))),{c(){ce(t.$$.fragment)},m(e,n){fe(t,e,n),r=!0},p(e,[r]){const i={};var a;!n&&1&r&&(n=!0,i.data=e[0].answers,a=()=>n=!1,K.push(a)),t.$set(i)},i(e){r||(oe(t.$$.fragment,e),r=!0)},o(e){se(t.$$.fragment,e),r=!1},d(e){he(t,e)}}}function Oe(e,n,r){let i,a,o,s=t;e.$$.on_destroy.push((()=>s()));let{quiz:u}=n;return e.$$set=e=>{"quiz"in e&&r(2,u=e.quiz)},e.$$.update=()=>{4&e.$$.dirty&&(r(1,i=u.counter),s(),s=l(i,(e=>r(3,o=e)))),12&e.$$.dirty&&r(0,a=u.questions[o]),1&e.$$.dirty&&r(0,a.selected=a.answers.map((e=>e.id)),a)},[a,i,u,o,function(t){e.$$.not_equal(a.answers,t)&&(a.answers=t,r(0,a),r(2,u),r(3,o))}]}class Be extends ge{constructor(e){super(),pe(this,e,Oe,$e,u,{quiz:2},_e)}}function Ne(e){k(e,"1g1feug","[type='checkbox'].svelte-1g1feug.svelte-1g1feug,[type='radio'].svelte-1g1feug.svelte-1g1feug{display:none}[type='radio'].svelte-1g1feug+span.svelte-1g1feug{border-radius:0.4em}[type='checkbox'].svelte-1g1feug+span.svelte-1g1feug,[type='radio'].svelte-1g1feug+span.svelte-1g1feug{transition-duration:0.3s;background-color:var(--quizdown-color-secondary);display:block;padding:0.5rem;margin:5px;border:3px solid transparent}[type='checkbox'].svelte-1g1feug:hover+span.svelte-1g1feug,[type='radio'].svelte-1g1feug:hover+span.svelte-1g1feug{filter:brightness(0.9)}[type='checkbox'].svelte-1g1feug:checked+span.svelte-1g1feug,[type='radio'].svelte-1g1feug:checked+span.svelte-1g1feug{border:3px solid var(--quizdown-color-primary)}")}function Re(e,t,n){const r=e.slice();return r[7]=t[n],r[9]=n,r}function Te(e,t,n){const r=e.slice();return r[7]=t[n],r[9]=n,r}function ze(e){let t,n=e[1].answers,r=[];for(let t=0;ts()));let{quiz:u}=n;const c=[[]];return e.$$set=e=>{"quiz"in e&&r(2,u=e.quiz)},e.$$.update=()=>{4&e.$$.dirty&&(r(0,i=u.counter),s(),s=l(i,(e=>r(3,o=e)))),12&e.$$.dirty&&r(1,a=u.questions[o])},[i,a,u,o,function(){a.selected=function(e,t,n){const r=new Set;for(let t=0;t{"quiz"in e&&n(0,r=e.quiz)},[r,["❌","✅"],e=>r.jump(e)]}class Ke extends ge{constructor(e){super(),pe(this,e,Je,Ye,u,{quiz:0},He)}}function Ve(e){let t,n,r,i,a,o,s,u,l,c,f=e[1]+1+"",h=e[3].text+"",d=null!==e[3].explanation&&""!==e[3].explanation&&Ze(e);var p=e[4][e[3].type];function g(e){return{props:{quiz:e[0]}}}return p&&(u=new p(g(e))),{c(){t=D("h3"),n=_("Q"),r=_(f),i=_(": "),o=$(),d&&d.c(),s=$(),u&&ce(u.$$.fragment),l=O(),a=new z(null)},m(e,f){E(e,t,f),w(t,n),w(t,r),w(t,i),a.m(h,t),E(e,o,f),d&&d.m(e,f),E(e,s,f),u&&fe(u,e,f),E(e,l,f),c=!0},p(e,t){(!c||2&t)&&f!==(f=e[1]+1+"")&&R(r,f),(!c||8&t)&&h!==(h=e[3].text+"")&&a.p(h),null!==e[3].explanation&&""!==e[3].explanation?d?d.p(e,t):(d=Ze(e),d.c(),d.m(s.parentNode,s)):d&&(d.d(1),d=null);const n={};if(1&t&&(n.quiz=e[0]),p!==(p=e[4][e[3].type])){if(u){ie();const e=u;se(e.$$.fragment,1,0,(()=>{he(e,1)})),ae()}p?(u=new p(g(e)),ce(u.$$.fragment),oe(u.$$.fragment,1),fe(u,l.parentNode,l)):u=null}else p&&u.$set(n)},i(e){c||(u&&oe(u.$$.fragment,e),c=!0)},o(e){u&&se(u.$$.fragment,e),c=!1},d(e){e&&C(t),e&&C(o),d&&d.d(e),e&&C(s),e&&C(l),u&&he(u,e)}}}function Ge(e){let t,n,r,i;return r=new Ke({props:{quiz:e[0]}}),{c(){t=D("h3"),t.textContent="Your quiz results",n=$(),ce(r.$$.fragment)},m(e,a){E(e,t,a),E(e,n,a),fe(r,e,a),i=!0},p(e,t){const n={};1&t&&(n.quiz=e[0]),r.$set(n)},i(e){i||(oe(r.$$.fragment,e),i=!0)},o(e){se(r.$$.fragment,e),i=!1},d(e){e&&C(t),e&&C(n),he(r,e)}}}function Ze(e){let t,n=e[3].explanation+"";return{c(){t=D("p")},m(e,r){E(e,t,r),t.innerHTML=n},p(e,r){8&r&&n!==(n=e[3].explanation+"")&&(t.innerHTML=n)},d(e){e&&C(t)}}}function Qe(e){let t,n,r,i;const a=[Ge,Ve],o=[];function s(e,t){return e[1]===e[2].max?0:1}return t=s(e),n=o[t]=a[t](e),{c(){n.c(),r=O()},m(e,n){o[t].m(e,n),E(e,r,n),i=!0},p(e,[i]){let u=t;t=s(e),t===u?o[t].p(e,i):(ie(),se(o[u],1,1,(()=>{o[u]=null})),ae(),n=o[t],n?n.p(e,i):(n=o[t]=a[t](e),n.c()),oe(n,1),n.m(r.parentNode,r))},i(e){i||(oe(n),i=!0)},o(e){se(n),i=!1},d(e){o[t].d(e),e&&C(r)}}}function Xe(e,n,r){let i,a,o,s=t;e.$$.on_destroy.push((()=>s()));let{quiz:u}=n;const c={MultipleChoice:qe,SingleChoice:qe,Sequence:Be};return e.$$set=e=>{"quiz"in e&&r(0,u=e.quiz)},e.$$.update=()=>{1&e.$$.dirty&&(r(2,i=u.counter),s(),s=l(i,(e=>r(1,o=e)))),3&e.$$.dirty&&r(3,a=u.questions[o])},[u,o,i,a,c]}class et extends ge{constructor(e){super(),pe(this,e,Xe,Qe,u,{quiz:0},null)}}function tt(e){k(e,"1huwu0e","button.svelte-1huwu0e:disabled{background-color:rgb(231, 231, 231);filter:grayscale(100%)}button.svelte-1huwu0e{background-color:var(--quizdown-color-secondary);color:var(--quizdown-color-text);padding:0.5rem 1rem;border-radius:4px;border:1px solid transparent;font-size:var(--font-size);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}button.svelte-1huwu0e:hover:not(:checked):not(:active):not(:disabled){filter:brightness(0.9)}")}function nt(e){let t,n,r,i;const a=e[3].default,o=function(e,t,n,r){if(e){const i=f(e,t,n,r);return e[0](i)}}(a,e,e[2],null),u=o||function(e){let t;return{c(){t=_("Hello World")},m(e,n){E(e,t,n)},d(e){e&&C(t)}}}();return{c(){t=D("button"),u&&u.c(),t.disabled=e[1],N(t,"class","svelte-1huwu0e")},m(a,o){E(a,t,o),u&&u.m(t,null),n=!0,r||(i=B(t,"click",(function(){s(e[0])&&e[0].apply(this,arguments)})),r=!0)},p(r,[i]){e=r,o&&o.p&&(!n||4&i)&&h(o,a,e,e[2],i,null,null),(!n||2&i)&&(t.disabled=e[1])},i(e){n||(oe(u,e),n=!0)},o(e){se(u,e),n=!1},d(e){e&&C(t),u&&u.d(e),r=!1,i()}}}function rt(e,t,n){let{$$slots:r={},$$scope:i}=t,{buttonAction:a=(()=>alert("Life has never Svelte better"))}=t,{disabled:o=!1}=t;return e.$$set=e=>{"buttonAction"in e&&n(0,a=e.buttonAction),"disabled"in e&&n(1,o=e.disabled),"$$scope"in e&&n(2,i=e.$$scope)},[a,o,i,r]}class it extends ge{constructor(e){super(),pe(this,e,rt,nt,u,{buttonAction:0,disabled:1},tt)}}function at(e){k(e,"9l6801",".button-row.svelte-9l6801.svelte-9l6801{margin-top:1em;display:flex;justify-content:left}.quizdown-credits.svelte-9l6801 a.svelte-9l6801{color:gray;text-decoration:none}.quizdown-credits.svelte-9l6801 a.svelte-9l6801:hover{text-decoration:underline}.quizdown-credits.svelte-9l6801.svelte-9l6801{margin-top:1rem;font-size:small;text-align:end;color:lightgray}.quizdown-hint.svelte-9l6801.svelte-9l6801{font-size:smaller}")}function ot(e){let t,n,r,i,a,o;t=new it({props:{disabled:null===e[5].hint||""===e[5].hint,buttonAction:e[7],$$slots:{default:[ut]},$$scope:{ctx:e}}});const s=[ft,ct,lt],u=[];function l(e,t){return e[6]?0:e[1]===e[3].max-1?1:2}return r=l(e),i=u[r]=s[r](e),{c(){ce(t.$$.fragment),n=$(),i.c(),a=O()},m(e,i){fe(t,e,i),E(e,n,i),u[r].m(e,i),E(e,a,i),o=!0},p(e,n){const o={};32&n&&(o.disabled=null===e[5].hint||""===e[5].hint),4&n&&(o.buttonAction=e[7]),256&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o);let c=r;r=l(e),r===c?u[r].p(e,n):(ie(),se(u[c],1,1,(()=>{u[c]=null})),ae(),i=u[r],i?i.p(e,n):(i=u[r]=s[r](e),i.c()),oe(i,1),i.m(a.parentNode,a))},i(e){o||(oe(t.$$.fragment,e),oe(i),o=!0)},o(e){se(t.$$.fragment,e),se(i),o=!1},d(e){he(t,e),e&&C(n),u[r].d(e),e&&C(a)}}}function st(e){let t,n;return t=new it({props:{buttonAction:e[0].reset,$$slots:{default:[gt]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,r){fe(t,e,r),n=!0},p(e,n){const r={};1&n&&(r.buttonAction=e[0].reset),256&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function ut(e){let t;return{c(){t=_("💡 Show hint")},m(e,n){E(e,t,n)},d(e){e&&C(t)}}}function lt(e){let t,n;return t=new it({props:{buttonAction:e[0].next,$$slots:{default:[ht]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,r){fe(t,e,r),n=!0},p(e,n){const r={};1&n&&(r.buttonAction=e[0].next),256&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function ct(e){let t,n;return t=new it({props:{buttonAction:e[0].evaluate,$$slots:{default:[dt]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,r){fe(t,e,r),n=!0},p(e,n){const r={};1&n&&(r.buttonAction=e[0].evaluate),256&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function ft(e){let t,n;return t=new it({props:{buttonAction:e[0].evaluate,$$slots:{default:[pt]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,r){fe(t,e,r),n=!0},p(e,n){const r={};1&n&&(r.buttonAction=e[0].evaluate),256&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function ht(e){let t;return{c(){t=_("Next")},m(e,n){E(e,t,n)},d(e){e&&C(t)}}}function dt(e){let t;return{c(){t=_("Evaluate")},m(e,n){E(e,t,n)},d(e){e&&C(t)}}}function pt(e){let t;return{c(){t=_("Evaluate")},m(e,n){E(e,t,n)},d(e){e&&C(t)}}}function gt(e){let t;return{c(){t=_("One more time!")},m(e,n){E(e,t,n)},d(e){e&&C(t)}}}function mt(e){let t,n=e[5].hint+"";return{c(){t=D("p"),N(t,"class","quizdown-hint svelte-9l6801")},m(e,r){E(e,t,r),t.innerHTML=n},p(e,r){32&r&&n!==(n=e[5].hint+"")&&(t.innerHTML=n)},d(e){e&&C(t)}}}function vt(e){let t,n,r,i,a,o,s,u;const l=[st,ot],c=[];function f(e,t){return e[1]===e[3].max?0:1}n=f(e),r=c[n]=l[n](e);let h=e[2]&&mt(e);return{c(){t=D("div"),r.c(),i=$(),h&&h.c(),a=$(),o=D("div"),s=D("a"),s.textContent="quizdown-js v0.2.0",N(t,"class","button-row svelte-9l6801"),N(s,"href","https://github.com/bonartm/quizdown-js"),N(s,"class","svelte-9l6801"),N(o,"class","quizdown-credits svelte-9l6801")},m(e,r){E(e,t,r),c[n].m(t,null),E(e,i,r),h&&h.m(e,r),E(e,a,r),E(e,o,r),w(o,s),u=!0},p(e,[i]){let o=n;n=f(e),n===o?c[n].p(e,i):(ie(),se(c[o],1,1,(()=>{c[o]=null})),ae(),r=c[n],r?r.p(e,i):(r=c[n]=l[n](e),r.c()),oe(r,1),r.m(t,null)),e[2]?h?h.p(e,i):(h=mt(e),h.c(),h.m(a.parentNode,a)):h&&(h.d(1),h=null)},i(e){u||(oe(r),u=!0)},o(e){se(r),u=!1},d(e){e&&C(t),c[n].d(),e&&C(i),h&&h.d(e),e&&C(a),e&&C(o)}}}function yt(e,n,r){let i,a,o,s,u,c=t,f=t;e.$$.on_destroy.push((()=>c())),e.$$.on_destroy.push((()=>f()));let{quiz:h}=n,d=!1;return e.$$set=e=>{"quiz"in e&&r(0,h=e.quiz)},e.$$.update=()=>{1&e.$$.dirty&&(r(3,i=h.counter),c(),c=l(i,(e=>r(1,s=e)))),1&e.$$.dirty&&(r(4,a=h.finished),f(),f=l(a,(e=>r(6,u=e)))),3&e.$$.dirty&&r(5,o=h.questions[s]),2&e.$$.dirty&&r(2,d=!1)},[h,s,d,i,a,o,u,()=>r(2,d=!d)]}class bt extends ge{constructor(e){super(),pe(this,e,yt,vt,u,{quiz:0},at)}}const Dt=[];function wt(e,n=t){let r;const i=[];function a(t){if(u(e,t)&&(e=t,r)){const t=!Dt.length;for(let t=0;t{const e=i.indexOf(u);-1!==e&&i.splice(e,1),0===i.length&&(r(),r=null)}}}}function kt(e){return"[object Date]"===Object.prototype.toString.call(e)}function xt(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)=>xt(e[n],t)));return e=>n.map((t=>t(e)))}if("object"===n){if(!e||!t)throw new Error("Object cannot be null");if(kt(e)&&kt(t)){e=e.getTime();const n=(t=t.getTime())-e;return t=>new Date(e+t*n)}const n=Object.keys(t),r={};return n.forEach((n=>{r[n]=xt(e[n],t[n])})),e=>{const t={};return n.forEach((n=>{t[n]=r[n](e)})),t}}if("number"===n){const n=t-e;return t=>e+t*n}throw new Error(`Cannot interpolate ${n} values`)}function At(e){k(e,"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 Et(e){let n,r;return{c(){n=D("div"),r=D("div"),N(r,"class","progress-slider svelte-1ma47z2"),T(r,"width",e[2]),N(n,"class","quizdown-progress svelte-1ma47z2"),N(n,"data-label","")},m(e,t){E(e,n,t),w(n,r)},p(e,[t]){4&t&&T(r,"width",e[2])},i:t,o:t,d(e){e&&C(n)}}}function Ct(e,i,a){let o,s,u,c,f,h,d=t,p=t;e.$$.on_destroy.push((()=>d())),e.$$.on_destroy.push((()=>p()));let{quiz:m}=i;const v=function(e,t={}){const i=wt(e);let a,o=e;function s(s,u){if(null==e)return i.set(e=s),Promise.resolve();o=s;let l=a,c=!1,{delay:f=0,duration:h=400,easing:d=n,interpolate:p=xt}=r(r({},t),u);if(0===h)return l&&(l.abort(),l=null),i.set(e=o),Promise.resolve();const m=g()+f;let v;return a=b((t=>{if(th?(i.set(e=s),!1):(i.set(e=v(d(n/h))),!0)})),a.promise}return{set:s,update:(t,n)=>s(t(o,e),n),subscribe:i.subscribe}}(0,{duration:400,easing:me});var y,D;return y=v,D=e=>a(7,h=e),e.$$.on_destroy.push(l(y,D)),e.$$set=e=>{"quiz"in e&&a(4,m=e.quiz)},e.$$.update=()=>{16&e.$$.dirty&&(a(0,o=m.counter),p(),p=l(o,(e=>a(6,f=e)))),16&e.$$.dirty&&(a(1,s=m.finished),d(),d=l(s,(e=>a(5,c=e)))),112&e.$$.dirty&&(c?v.set(m.counter.max-.5):v.set(f+.1)),144&e.$$.dirty&&a(2,u=String(h/(m.counter.max-.5)*100)+"%")},[o,s,u,v,m,c,f,h]}class St extends ge{constructor(e){super(),pe(this,e,Ct,Et,u,{quiz:4},At)}}function Ft(e){k(e,"3wow2r","@import 'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.6.0/build/styles/github.min.css';code, kbd{padding:0 0.4rem;font-size:90%;white-space:pre-wrap;border-radius:4px;padding:0.2em 0.4em;background-color:rgb(248, 255, 206);font-family:monaco, 'Consolas', 'Lucida Console', monospace}pre{background-color:rgb(248, 255, 206);font-size:1em;padding:0.4rem;overflow-x:auto;font-family:monaco, 'Consolas', 'Lucida Console', monospace}pre code{background:none;padding:0}a{color:var(--quizdown-color-primary)}.quizdown-content.svelte-3wow2r{line-height:1.2;font-size:1.1em;font-family:'Segoe UI', 'Helvetica Neue', sans-serif;padding:1rem;max-width:700px;margin:auto}.quizdown-card.svelte-3wow2r{box-shadow:0 4px 8px 0 rgba(0, 0, 0, 0.2);border-radius:0 0 4px 4px}.quizdown-container.svelte-3wow2r{padding:2px 16px}")}function _t(e){let t,n,r,i,a,o,s,u,l;return r=new St({props:{quiz:e[0]}}),o=new et({props:{quiz:e[0]}}),u=new bt({props:{quiz:e[0]}}),{c(){t=D("div"),n=D("div"),ce(r.$$.fragment),i=$(),a=D("div"),ce(o.$$.fragment),s=$(),ce(u.$$.fragment),N(a,"class","quizdown-container svelte-3wow2r"),N(n,"class","quizdown-card svelte-3wow2r"),N(t,"class","quizdown-content svelte-3wow2r")},m(c,f){E(c,t,f),w(t,n),fe(r,n,null),w(n,i),w(n,a),fe(o,a,null),w(a,s),fe(u,a,null),e[2](t),l=!0},p(e,[t]){const n={};1&t&&(n.quiz=e[0]),r.$set(n);const i={};1&t&&(i.quiz=e[0]),o.$set(i);const a={};1&t&&(a.quiz=e[0]),u.$set(a)},i(e){l||(oe(r.$$.fragment,e),oe(o.$$.fragment,e),oe(u.$$.fragment,e),l=!0)},o(e){se(r.$$.fragment,e),se(o.$$.fragment,e),se(u.$$.fragment,e),l=!1},d(n){n&&C(t),he(r),he(o),he(u),e[2](null)}}}function $t(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))};let i,{quiz:a}=t;return U((()=>r(void 0,void 0,void 0,(function*(){let e=a.config.primary_color,t=a.config.secondary_color,n=a.config.text_color;i.style.setProperty("--quizdown-color-primary",e),i.style.setProperty("--quizdown-color-secondary",t),i.style.setProperty("--quizdown-color-text",n)})))),e.$$set=e=>{"quiz"in e&&n(0,a=e.quiz)},[a,i,function(e){Y[e?"unshift":"push"]((()=>{i=e,n(1,i)}))}]}class Ot extends ge{constructor(e){super(),pe(this,e,$t,_t,u,{quiz:0},Ft)}}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function Bt(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),t}function Nt(e){var t={exports:{}};return e(t,t.exports),t.exports}var Rt=Nt((function(e,t){e.exports=function(){function e(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}function a(e){var t={exports:{}};return e(t,t.exports),t.exports}var o=a((function(e){function t(){return{baseUrl:null,breaks:!1,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}}function n(t){e.exports.defaults=t}e.exports={defaults:t(),getDefaults:t,changeDefaults:n}})),s=/[&<>"']/,u=/[&<>"']/g,l=/[<>"']|&(?!#?\w+;)/,c=/[<>"']|&(?!#?\w+;)/g,f={"&":"&","<":"<",">":">",'"':""","'":"'"},h=function(e){return f[e]};function d(e,t){if(t){if(s.test(e))return e.replace(u,h)}else if(l.test(e))return e.replace(c,h);return e}var p=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function g(e){return e.replace(p,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var m=/(^|[^\[])\^/g;function v(e,t){e=e.source||e,t=t||"";var n={replace:function(t,r){return r=(r=r.source||r).replace(m,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n}var y=/[^\w:]/g,b=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function D(e,t,n){if(e){var r;try{r=decodeURIComponent(g(n)).replace(y,"").toLowerCase()}catch(e){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!b.test(n)&&(n=E(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n}var w={},k=/^[^:]+:\/*[^/]*$/,x=/^([^:]+:)[\s\S]*$/,A=/^([^:]+:\/*[^/]*)[\s\S]*$/;function E(e,t){w[" "+e]||(k.test(e)?w[" "+e]=e+"/":w[" "+e]=F(e,"/",!0));var n=-1===(e=w[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(x,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(A,"$1")+t:e+t}function C(e){for(var t,n,r=1;r=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n.length>t)n.splice(t);else for(;n.length1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}var B={escape:d,unescape:g,edit:v,cleanUrl:D,resolveUrl:E,noopTest:{exec:function(){}},merge:C,splitCells:S,rtrim:F,findClosingBracket:_,checkSanitizeDeprecation:$,repeatString:O},N=o.defaults,R=B.rtrim,T=B.splitCells,z=B.escape,M=B.findClosingBracket;function I(e,t,n){var r=t.href,i=t.title?z(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:n,href:r,title:i,text:a}:{type:"image",raw:n,href:r,title:i,text:z(a)}}function L(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=r.length?e.slice(r.length):e})).join("\n")}var j=function(){function e(e){this.options=e||N}var t=e.prototype;return t.space=function(e){var t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:R(n,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=L(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:r}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(/#$/.test(n)){var r=R(n,"#");this.options.pedantic?n=r.trim():r&&!/ $/.test(r)||(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n}}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var n={type:"table",header:T(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(n.header.length===n.align.length){var r,i=n.align.length;for(r=0;r ?/gm,"");return{type:"blockquote",raw:t[0],text:n}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){var n,r,i,a,o,s,u,l,c,f=t[0],h=t[2],d=h.length>1,p={type:"list",raw:f,ordered:d,start:d?+h.slice(0,-1):"",loose:!1,items:[]},g=t[0].match(this.rules.block.item),m=!1,v=g.length;i=this.rules.block.listItemStart.exec(g[0]);for(var y=0;yi[1].length:a[1].length>=i[0].length||a[1].length>3){g.splice(y,2,g[y]+(!this.options.pedantic&&a[1].length/i.test(r[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):z(r[0]):r[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;var r=R(n.slice(0,-1),"\\");if((n.length-r.length)%2==0)return}else{var i=M(t[2],"()");if(i>-1){var a=(0===t[0].indexOf("!")?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,a).trim(),t[3]=""}}var o=t[2],s="";if(this.options.pedantic){var u=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);u&&(o=u[1],s=u[3])}else s=t[3]?t[3].slice(1,-1):"";return o=o.trim(),/^$/.test(n)?o.slice(1):o.slice(1,-1)),I(t,{href:o?o.replace(this.rules.inline._escapes,"$1"):o,title:s?s.replace(this.rules.inline._escapes,"$1"):s},t[0])}},t.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return I(n,r,n[0])}},t.emStrong=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.emStrong.lDelim.exec(e);if(r&&(!r[3]||!n.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var i=r[1]||r[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){var a,o,s=r[0].length-1,u=s,l=0,c="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+s);null!=(r=c.exec(t));)if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6])if(o=a.length,r[3]||r[4])u+=o;else if(!((r[5]||r[6])&&s%3)||(s+o)%3){if(!((u-=o)>0)){if(u+l-o<=0&&!t.slice(c.lastIndex).match(c)&&(o=Math.min(o,o+u+l)),Math.min(s,o)%2)return{type:"em",raw:e.slice(0,s+r.index+o+1),text:e.slice(1,s+r.index+o)};if(Math.min(s,o)%2==0)return{type:"strong",raw:e.slice(0,s+r.index+o+1),text:e.slice(2,s+r.index+o-1)}}}else l+=o}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return r&&i&&(n=n.substring(1,n.length-1)),n=z(n,!0),{type:"codespan",raw:t[0],text:n}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2]}},t.autolink=function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=z(this.options.mangle?t(i[1]):i[1])):n=z(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}},t.url=function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=z(this.options.mangle?t(n[0]):n[0]));else{var a;do{a=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(a!==n[0]);r=z(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},t.inlineText=function(e,t,n){var r,i=this.rules.inline.text.exec(e);if(i)return r=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):z(i[0]):i[0]:z(this.options.smartypants?n(i[0]):i[0]),{type:"text",raw:i[0],text:r}},e}(),P=B.noopTest,q=B.edit,H=B.merge,U={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)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:P,table:P,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?'|\([^()]*\))/};U.def=q(U.def).replace("label",U._label).replace("title",U._title).getRegex(),U.bullet=/(?:[*+-]|\d{1,9}[.)])/,U.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,U.item=q(U.item,"gm").replace(/bull/g,U.bullet).getRegex(),U.listItemStart=q(/^( *)(bull) */).replace("bull",U.bullet).getRegex(),U.list=q(U.list).replace(/bull/g,U.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+U.def.source+")").getRegex(),U._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",U._comment=/|$)/,U.html=q(U.html,"i").replace("comment",U._comment).replace("tag",U._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),U.paragraph=q(U._paragraph).replace("hr",U.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|!--)").replace("tag",U._tag).getRegex(),U.blockquote=q(U.blockquote).replace("paragraph",U.paragraph).getRegex(),U.normal=H({},U),U.gfm=H({},U.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*|$)"}),U.gfm.nptable=q(U.gfm.nptable).replace("hr",U.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|!--)").replace("tag",U._tag).getRegex(),U.gfm.table=q(U.gfm.table).replace("hr",U.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|!--)").replace("tag",U._tag).getRegex(),U.pedantic=H({},U.normal,{html:q("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",U._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:P,paragraph:q(U.normal._paragraph).replace("hr",U.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",U.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var W={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:P,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:P,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};W.punctuation=q(W.punctuation).replace(/punctuation/g,W._punctuation).getRegex(),W.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,W.escapedEmSt=/\\\*|\\_/g,W._comment=q(U._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),W.emStrong.lDelim=q(W.emStrong.lDelim).replace(/punct/g,W._punctuation).getRegex(),W.emStrong.rDelimAst=q(W.emStrong.rDelimAst,"g").replace(/punct/g,W._punctuation).getRegex(),W.emStrong.rDelimUnd=q(W.emStrong.rDelimUnd,"g").replace(/punct/g,W._punctuation).getRegex(),W._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,W._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,W._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])?)+(?![-_])/,W.autolink=q(W.autolink).replace("scheme",W._scheme).replace("email",W._email).getRegex(),W._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,W.tag=q(W.tag).replace("comment",W._comment).replace("attribute",W._attribute).getRegex(),W._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,W._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,W._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,W.link=q(W.link).replace("label",W._label).replace("href",W._href).replace("title",W._title).getRegex(),W.reflink=q(W.reflink).replace("label",W._label).getRegex(),W.reflinkSearch=q(W.reflinkSearch,"g").replace("reflink",W.reflink).replace("nolink",W.nolink).getRegex(),W.normal=H({},W),W.pedantic=H({},W.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:q(/^!?\[(label)\]\((.*?)\)/).replace("label",W._label).getRegex(),reflink:q(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",W._label).getRegex()}),W.gfm=H({},W.normal,{escape:q(W.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)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}var X=function(){function e(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||J,this.options.tokenizer=this.options.tokenizer||new j,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:K.normal,inline:V.normal};this.options.pedantic?(t.block=K.pedantic,t.inline=V.pedantic):this.options.gfm&&(t.block=K.gfm,this.options.breaks?t.inline=V.breaks:t.inline=V.gfm),this.tokenizer.rules=t}e.lex=function(t,n){return new e(n).lex(t)},e.lexInline=function(t,n){return new e(n).inlineTokens(t)};var n=e.prototype;return n.lex=function(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},n.blockTokens=function(e,t,n){var r,i,a,o;for(void 0===t&&(t=[]),void 0===n&&(n=!0),this.options.pedantic&&(e=e.replace(/^ +$/gm,""));e;)if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),r.type&&t.push(r);else if(r=this.tokenizer.code(e))e=e.substring(r.raw.length),(o=t[t.length-1])&&"paragraph"===o.type?(o.raw+="\n"+r.raw,o.text+="\n"+r.text):t.push(r);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.nptable(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],n),t.push(r);else if(r=this.tokenizer.list(e)){for(e=e.substring(r.raw.length),a=r.items.length,i=0;i0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(l));)c.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,o.index)+"["+G("a",o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,o.index)+"["+G("a",o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.escapedEmSt.exec(l));)l=l.slice(0,o.index)+"++"+l.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(s||(u=""),s=!1,i=this.tokenizer.escape(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.tag(e,n,r)){e=e.substring(i.raw.length),n=i.inLink,r=i.inRawBlock;var f=t[t.length-1];f&&"text"===i.type&&"text"===f.type?(f.raw+=i.raw,f.text+=i.text):t.push(i)}else if(i=this.tokenizer.link(e))e=e.substring(i.raw.length),"link"===i.type&&(i.tokens=this.inlineTokens(i.text,[],!0,r)),t.push(i);else if(i=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(i.raw.length);var h=t[t.length-1];"link"===i.type?(i.tokens=this.inlineTokens(i.text,[],!0,r),t.push(i)):h&&"text"===i.type&&"text"===h.type?(h.raw+=i.raw,h.text+=i.text):t.push(i)}else if(i=this.tokenizer.emStrong(e,l,u))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,r),t.push(i);else if(i=this.tokenizer.codespan(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.br(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.del(e))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,r),t.push(i);else if(i=this.tokenizer.autolink(e,Q))e=e.substring(i.raw.length),t.push(i);else if(n||!(i=this.tokenizer.url(e,Q))){if(i=this.tokenizer.inlineText(e,r,Z))e=e.substring(i.raw.length),"_"!==i.raw.slice(-1)&&(u=i.raw.slice(-1)),s=!0,(a=t[t.length-1])&&"text"===a.type?(a.raw+=i.raw,a.text+=i.text):t.push(i);else if(e){var d="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(d);break}throw new Error(d)}}else e=e.substring(i.raw.length),t.push(i);return t},t(e,null,[{key:"rules",get:function(){return{block:K,inline:V}}}]),e}(),ee=o.defaults,te=B.cleanUrl,ne=B.escape,re=function(){function e(e){this.options=e||ee}var t=e.prototype;return t.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return e=e.replace(/\n$/,"")+"\n",r?'
    '+(n?e:ne(e,!0))+"
    \n":"
    "+(n?e:ne(e,!0))+"
    \n"},t.blockquote=function(e){return"
    \n"+e+"
    \n"},t.html=function(e){return e},t.heading=function(e,t,n,r){return this.options.headerIds?"'+e+"\n":""+e+"\n"},t.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},t.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},t.listitem=function(e){return"
  • "+e+"
  • \n"},t.checkbox=function(e){return" "},t.paragraph=function(e){return"

    "+e+"

    \n"},t.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},t.tablerow=function(e){return"\n"+e+"\n"},t.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},t.strong=function(e){return""+e+""},t.em=function(e){return""+e+""},t.codespan=function(e){return""+e+""},t.br=function(){return this.options.xhtml?"
    ":"
    "},t.del=function(e){return""+e+""},t.link=function(e,t,n){if(null===(e=te(this.options.sanitize,this.options.baseUrl,e)))return n;var r='
    "},t.image=function(e,t,n){if(null===(e=te(this.options.sanitize,this.options.baseUrl,e)))return n;var r=''+n+'":">"},t.text=function(e){return e},e}(),ie=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),ae=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{n=e+"-"+ ++r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n},t.slug=function(e,t){void 0===t&&(t={});var n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)},e}(),oe=o.defaults,se=B.unescape,ue=function(){function e(e){this.options=e||oe,this.options.renderer=this.options.renderer||new re,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ie,this.slugger=new ae}e.parse=function(t,n){return new e(n).parse(t)},e.parseInline=function(t,n){return new e(n).parseInline(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var n,r,i,a,o,s,u,l,c,f,h,d,p,g,m,v,y,b,D="",w=e.length;for(n=0;n0&&"text"===m.tokens[0].type?(m.tokens[0].text=b+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&"text"===m.tokens[0].tokens[0].type&&(m.tokens[0].tokens[0].text=b+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:b}):g+=b),g+=this.parse(m.tokens,p),c+=this.renderer.listitem(g,y,v);D+=this.renderer.list(c,h,d);continue;case"html":D+=this.renderer.html(f.text);continue;case"paragraph":D+=this.renderer.paragraph(this.parseInline(f.tokens));continue;case"text":for(c=f.tokens?this.parseInline(f.tokens):f.text;n+1An error occurred:

    "+fe(e.message+"",!0)+"
    ";throw e}}return ge.options=ge.setOptions=function(e){return le(ge.defaults,e),de(ge.defaults),ge},ge.getDefaults=he,ge.defaults=pe,ge.use=function(e){var t=le({},e);if(e.renderer&&function(){var n=ge.defaults.renderer||new re,r=function(t){var r=n[t];n[t]=function(){for(var i=arguments.length,a=new Array(i),o=0;oAn error occurred:

    "+fe(e.message+"",!0)+"
    ";throw e}},ge.Parser=ue,ge.parser=ue.parse,ge.Renderer=re,ge.TextRenderer=ie,ge.Lexer=X,ge.lexer=X.lex,ge.Tokenizer=j,ge.Slugger=ae,ge.parse=ge,ge}()})),Tt=Nt((function(e,t){e.exports=function(){function e(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1?n-1:0),i=1;i/gm),j=s(/^data-[\-\w.\u00B7-\uFFFF]/),P=s(/^aria-[\-\w]+$/),q=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=s(/^(?:\w+script|data):/i),U=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),W="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 Y(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:J(),t=function(e){return V(e)};if(t.version="2.2.8",t.removed=[],!e||!e.document||9!==e.document.nodeType)return t.isSupported=!1,t;var n=e.document,r=e.document,i=e.DocumentFragment,a=e.HTMLTemplateElement,s=e.Node,u=e.Element,l=e.NodeFilter,c=e.NamedNodeMap,f=void 0===c?e.NamedNodeMap||e.MozNamedAttrMap:c,k=e.Text,x=e.Comment,G=e.DOMParser,Z=e.trustedTypes,Q=u.prototype,X=C(Q,"cloneNode"),ee=C(Q,"nextSibling"),te=C(Q,"childNodes"),ne=C(Q,"parentNode");if("function"==typeof a){var re=r.createElement("template");re.content&&re.content.ownerDocument&&(r=re.content.ownerDocument)}var ie=K(Z,n),ae=ie&&ze?ie.createHTML(""):"",oe=r,se=oe.implementation,ue=oe.createNodeIterator,le=oe.createDocumentFragment,ce=n.importNode,fe={};try{fe=E(r).documentMode?r.documentMode:{}}catch(e){}var he={};t.isSupported="function"==typeof ne&&se&&void 0!==se.createHTMLDocument&&9!==fe;var de=I,pe=L,ge=j,me=P,ve=H,ye=U,be=q,De=null,we=A({},[].concat(Y(S),Y(F),Y(_),Y(O),Y(N))),ke=null,xe=A({},[].concat(Y(R),Y(T),Y(z),Y(M))),Ae=null,Ee=null,Ce=!0,Se=!0,Fe=!1,_e=!1,$e=!1,Oe=!1,Be=!1,Ne=!1,Re=!1,Te=!0,ze=!1,Me=!0,Ie=!0,Le=!1,je={},Pe=A({},["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"]),qe=null,He=A({},["audio","video","img","source","image","track"]),Ue=null,We=A({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Ye="http://www.w3.org/1998/Math/MathML",Je="http://www.w3.org/2000/svg",Ke="http://www.w3.org/1999/xhtml",Ve=Ke,Ge=null,Ze=r.createElement("form"),Qe=function(e){Ge&&Ge===e||(e&&"object"===(void 0===e?"undefined":W(e))||(e={}),e=E(e),De="ALLOWED_TAGS"in e?A({},e.ALLOWED_TAGS):we,ke="ALLOWED_ATTR"in e?A({},e.ALLOWED_ATTR):xe,Ue="ADD_URI_SAFE_ATTR"in e?A(E(We),e.ADD_URI_SAFE_ATTR):We,qe="ADD_DATA_URI_TAGS"in e?A(E(He),e.ADD_DATA_URI_TAGS):He,Ae="FORBID_TAGS"in e?A({},e.FORBID_TAGS):{},Ee="FORBID_ATTR"in e?A({},e.FORBID_ATTR):{},je="USE_PROFILES"in e&&e.USE_PROFILES,Ce=!1!==e.ALLOW_ARIA_ATTR,Se=!1!==e.ALLOW_DATA_ATTR,Fe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,_e=e.SAFE_FOR_TEMPLATES||!1,$e=e.WHOLE_DOCUMENT||!1,Ne=e.RETURN_DOM||!1,Re=e.RETURN_DOM_FRAGMENT||!1,Te=!1!==e.RETURN_DOM_IMPORT,ze=e.RETURN_TRUSTED_TYPE||!1,Be=e.FORCE_BODY||!1,Me=!1!==e.SANITIZE_DOM,Ie=!1!==e.KEEP_CONTENT,Le=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||be,Ve=e.NAMESPACE||Ve,_e&&(Se=!1),Re&&(Ne=!0),je&&(De=A({},[].concat(Y(N))),ke=[],!0===je.html&&(A(De,S),A(ke,R)),!0===je.svg&&(A(De,F),A(ke,T),A(ke,M)),!0===je.svgFilters&&(A(De,_),A(ke,T),A(ke,M)),!0===je.mathMl&&(A(De,O),A(ke,z),A(ke,M))),e.ADD_TAGS&&(De===we&&(De=E(De)),A(De,e.ADD_TAGS)),e.ADD_ATTR&&(ke===xe&&(ke=E(ke)),A(ke,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&A(Ue,e.ADD_URI_SAFE_ATTR),Ie&&(De["#text"]=!0),$e&&A(De,["html","head","body"]),De.table&&(A(De,["tbody"]),delete Ae.tbody),o&&o(e),Ge=e)},Xe=A({},["mi","mo","mn","ms","mtext"]),et=A({},["foreignobject","desc","title","annotation-xml"]),tt=A({},F);A(tt,_),A(tt,$);var nt=A({},O);A(nt,B);var rt=function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:Ke,tagName:"template"});var n=g(e.tagName),r=g(t.tagName);if(e.namespaceURI===Je)return t.namespaceURI===Ke?"svg"===n:t.namespaceURI===Ye?"svg"===n&&("annotation-xml"===r||Xe[r]):Boolean(tt[n]);if(e.namespaceURI===Ye)return t.namespaceURI===Ke?"math"===n:t.namespaceURI===Je?"math"===n&&et[r]:Boolean(nt[n]);if(e.namespaceURI===Ke){if(t.namespaceURI===Je&&!et[r])return!1;if(t.namespaceURI===Ye&&!Xe[r])return!1;var i=A({},["title","style","font","a","script"]);return!nt[n]&&(i[n]||!tt[n])}return!1},it=function(e){p(t.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=ae}catch(t){e.remove()}}},at=function(e,n){try{p(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch(e){p(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),"is"===e&&!ke[e])if(Ne||Re)try{it(n)}catch(e){}else try{n.setAttribute(e,"")}catch(e){}},ot=function(e){var t=void 0,n=void 0;if(Be)e=""+e;else{var i=m(e,/^[\r\n\t ]+/);n=i&&i[0]}var a=ie?ie.createHTML(e):e;if(Ve===Ke)try{t=(new G).parseFromString(a,"text/html")}catch(e){}t&&t.documentElement||((t=se.createDocument(Ve,"template",null)).documentElement.innerHTML=a);var o=t.body||t.documentElement;return e&&n&&o.insertBefore(r.createTextNode(n),o.childNodes[0]||null),$e?t.documentElement:o},st=function(e){return ue.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,(function(){return l.FILTER_ACCEPT}),!1)},ut=function(e){return!(e instanceof k||e instanceof x||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof f&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore)},lt=function(e){return"object"===(void 0===s?"undefined":W(s))?e instanceof s:e&&"object"===(void 0===e?"undefined":W(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},ct=function(e,n,r){he[e]&&h(he[e],(function(e){e.call(t,n,r,Ge)}))},ft=function(e){var n=void 0;if(ct("beforeSanitizeElements",e,null),ut(e))return it(e),!0;if(m(e.nodeName,/[\u0080-\uFFFF]/))return it(e),!0;var r=g(e.nodeName);if(ct("uponSanitizeElement",e,{tagName:r,allowedTags:De}),!lt(e.firstElementChild)&&(!lt(e.content)||!lt(e.content.firstElementChild))&&D(/<[/\w]/g,e.innerHTML)&&D(/<[/\w]/g,e.textContent))return it(e),!0;if(!De[r]||Ae[r]){if(Ie&&!Pe[r]){var i=ne(e)||e.parentNode,a=te(e)||e.childNodes;if(a&&i)for(var o=a.length-1;o>=0;--o)i.insertBefore(X(a[o],!0),ee(e))}return it(e),!0}return e instanceof u&&!rt(e)?(it(e),!0):"noscript"!==r&&"noembed"!==r||!D(/<\/no(script|embed)/i,e.innerHTML)?(_e&&3===e.nodeType&&(n=e.textContent,n=v(n,de," "),n=v(n,pe," "),e.textContent!==n&&(p(t.removed,{element:e.cloneNode()}),e.textContent=n)),ct("afterSanitizeElements",e,null),!1):(it(e),!0)},ht=function(e,t,n){if(Me&&("id"===t||"name"===t)&&(n in r||n in Ze))return!1;if(Se&&D(ge,t));else if(Ce&&D(me,t));else{if(!ke[t]||Ee[t])return!1;if(Ue[t]);else if(D(be,v(n,ye,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(n,"data:")||!qe[e])if(Fe&&!D(ve,v(n,ye,"")));else if(n)return!1}return!0},dt=function(e){var n=void 0,r=void 0,i=void 0,a=void 0;ct("beforeSanitizeAttributes",e,null);var o=e.attributes;if(o){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ke};for(a=o.length;a--;){var u=n=o[a],l=u.name,c=u.namespaceURI;if(r=b(n.value),i=g(l),s.attrName=i,s.attrValue=r,s.keepAttr=!0,s.forceKeepAttr=void 0,ct("uponSanitizeAttribute",e,s),r=s.attrValue,!s.forceKeepAttr&&(at(l,e),s.keepAttr))if(D(/\/>/i,r))at(l,e);else{_e&&(r=v(r,de," "),r=v(r,pe," "));var f=e.nodeName.toLowerCase();if(ht(f,i,r))try{c?e.setAttributeNS(c,l,r):e.setAttribute(l,r),d(t.removed)}catch(e){}}}ct("afterSanitizeAttributes",e,null)}},pt=function e(t){var n=void 0,r=st(t);for(ct("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)ct("uponSanitizeShadowNode",n,null),ft(n)||(n.content instanceof i&&e(n.content),dt(n));ct("afterSanitizeShadowDOM",t,null)};return t.sanitize=function(r,a){var o=void 0,u=void 0,l=void 0,c=void 0,f=void 0;if(r||(r="\x3c!--\x3e"),"string"!=typeof r&&!lt(r)){if("function"!=typeof r.toString)throw w("toString is not a function");if("string"!=typeof(r=r.toString()))throw w("dirty is not a string, aborting")}if(!t.isSupported){if("object"===W(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof r)return e.toStaticHTML(r);if(lt(r))return e.toStaticHTML(r.outerHTML)}return r}if(Oe||Qe(a),t.removed=[],"string"==typeof r&&(Le=!1),Le);else if(r instanceof s)1===(u=(o=ot("\x3c!----\x3e")).ownerDocument.importNode(r,!0)).nodeType&&"BODY"===u.nodeName||"HTML"===u.nodeName?o=u:o.appendChild(u);else{if(!Ne&&!_e&&!$e&&-1===r.indexOf("<"))return ie&&ze?ie.createHTML(r):r;if(!(o=ot(r)))return Ne?null:ae}o&&Be&&it(o.firstChild);for(var h=st(Le?r:o);l=h.nextNode();)3===l.nodeType&&l===c||ft(l)||(l.content instanceof i&&pt(l.content),dt(l),c=l);if(c=null,Le)return r;if(Ne){if(Re)for(f=le.call(o.ownerDocument);o.firstChild;)f.appendChild(o.firstChild);else f=o;return Te&&(f=ce.call(n,f,!0)),f}var d=$e?o.outerHTML:o.innerHTML;return _e&&(d=v(d,de," "),d=v(d,pe," ")),ie&&ze?ie.createHTML(d):d},t.setConfig=function(e){Qe(e),Oe=!0},t.clearConfig=function(){Ge=null,Oe=!1},t.isValidAttribute=function(e,t,n){Ge||Qe({});var r=g(e),i=g(t);return ht(r,i,n)},t.addHook=function(e,t){"function"==typeof t&&(he[e]=he[e]||[],p(he[e],t))},t.removeHook=function(e){he[e]&&d(he[e])},t.removeHooks=function(e){he[e]&&(he[e]=[])},t.removeAllHooks=function(){he={}},t}return V()}()})),zt=e=>{const t=(e=>{const t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce(((e,t)=>Math.min(e,t.length)),1/0):0})(e);if(0===t)return e;const n=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(n,"")}; /*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.2.2/LICENSE */function Mt(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){var n=e[t];"object"!=typeof n||Object.isFrozen(n)||Mt(n)})),e}var It=Mt,Lt=Mt;It.default=Lt;class jt{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Pt(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function qt(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const Ht=e=>!!e.kind;class Ut{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=Pt(e)}openNode(e){if(!Ht(e))return;let t=e.kind;e.sublanguage||(t=`${this.classPrefix}${t}`),this.span(t)}closeNode(e){Ht(e)&&(this.buffer+="")}value(){return this.buffer}span(e){this.buffer+=``}}class Wt{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t={kind:e,children:[]};this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{Wt._collapse(e)})))}}class Yt extends Wt{constructor(e){super(),this.options=e}addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root;n.kind=t,n.sublanguage=!0,this.add(n)}toHTML(){return new Ut(this,this.options).value()}finalize(){return!0}}function Jt(e){return e?"string"==typeof e?e:e.source:null}const Kt=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;const Vt="[a-zA-Z]\\w*",Gt="[a-zA-Z_]\\w*",Zt="\\b\\d+(\\.\\d+)?",Qt="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Xt="\\b(0b[01]+)",en={begin:"\\\\[\\s\\S]",relevance:0},tn={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[en]},nn={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[en]},rn={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},an=function(e,t,n={}){const r=qt({className:"comment",begin:e,end:t,contains:[]},n);return r.contains.push(rn),r.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),r},on=an("//","$"),sn=an("/\\*","\\*/"),un=an("#","$"),ln={className:"number",begin:Zt,relevance:0},cn={className:"number",begin:Qt,relevance:0},fn={className:"number",begin:Xt,relevance:0},hn={className:"number",begin:Zt+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},dn={begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[en,{begin:/\[/,end:/\]/,relevance:0,contains:[en]}]}]},pn={className:"title",begin:Vt,relevance:0},gn={className:"title",begin:Gt,relevance:0},mn={begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0};var vn=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:Vt,UNDERSCORE_IDENT_RE:Gt,NUMBER_RE:Zt,C_NUMBER_RE:Qt,BINARY_NUMBER_RE:Xt,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=function(...e){return e.map((e=>Jt(e))).join("")}(t,/.*\b/,e.binary,/\b.*/)),qt({className:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:en,APOS_STRING_MODE:tn,QUOTE_STRING_MODE:nn,PHRASAL_WORDS_MODE:rn,COMMENT:an,C_LINE_COMMENT_MODE:on,C_BLOCK_COMMENT_MODE:sn,HASH_COMMENT_MODE:un,NUMBER_MODE:ln,C_NUMBER_MODE:cn,BINARY_NUMBER_MODE:fn,CSS_NUMBER_MODE:hn,REGEXP_MODE:dn,TITLE_MODE:pn,UNDERSCORE_TITLE_MODE:gn,METHOD_GUARD:mn,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function yn(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function bn(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=yn,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function Dn(e,t){Array.isArray(e.illegal)&&(e.illegal=function(...e){return"("+e.map((e=>Jt(e))).join("|")+")"}(...e.illegal))}function wn(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function kn(e,t){void 0===e.relevance&&(e.relevance=1)}const xn=["of","and","for","in","not","or","if","then","parent","list","value"];function An(e,t,n="keyword"){const r={};return"string"==typeof e?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach((function(n){Object.assign(r,An(e[n],t,n))})),r;function i(e,n){t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((function(t){const n=t.split("|");r[n[0]]=[e,En(n[0],n[1])]}))}}function En(e,t){return t?Number(t):function(e){return xn.includes(e.toLowerCase())}(e)?0:1}function Cn(e,{plugins:t}){function n(t,n){return new RegExp(Jt(t),"m"+(e.case_insensitive?"i":"")+(n?"g":""))}class r{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=function(e){return new RegExp(e.toString()+"|").exec("").length-1}(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=n(function(e,t="|"){let n=0;return e.map((e=>{n+=1;const t=n;let r=Jt(e),i="";for(;r.length>0;){const e=Kt.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?i+="\\"+String(Number(e[1])+t):(i+=e[0],"("===e[0]&&n++)}return i})).map((e=>`(${e})`)).join(t)}(e),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new r;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=qt(e.classNameAliases||{}),function t(r,a){const o=r;if(r.isCompiled)return o;[wn].forEach((e=>e(r,a))),e.compilerExtensions.forEach((e=>e(r,a))),r.__beforeBegin=null,[bn,Dn,kn].forEach((e=>e(r,a))),r.isCompiled=!0;let s=null;if("object"==typeof r.keywords&&(s=r.keywords.$pattern,delete r.keywords.$pattern),r.keywords&&(r.keywords=An(r.keywords,e.case_insensitive)),r.lexemes&&s)throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return s=s||r.lexemes||/\w+/,o.keywordPatternRe=n(s,!0),a&&(r.begin||(r.begin=/\B|\b/),o.beginRe=n(r.begin),r.endSameAsBegin&&(r.end=r.begin),r.end||r.endsWithParent||(r.end=/\B|\b/),r.end&&(o.endRe=n(r.end)),o.terminatorEnd=Jt(r.end)||"",r.endsWithParent&&a.terminatorEnd&&(o.terminatorEnd+=(r.end?"|":"")+a.terminatorEnd)),r.illegal&&(o.illegalRe=n(r.illegal)),r.contains||(r.contains=[]),r.contains=[].concat(...r.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return qt(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(Sn(e))return qt(e,{starts:e.starts?qt(e.starts):null});if(Object.isFrozen(e))return qt(e);return e}("self"===e?r:e)}))),r.contains.forEach((function(e){t(e,o)})),r.starts&&t(r.starts,a),o.matcher=function(e){const t=new i;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(o),o}(e)}function Sn(e){return!!e&&(e.endsWithParent||Sn(e.starts))}function Fn(e){const t={props:["language","code","autodetect"],data:function(){return{detectedLanguage:"",unknownLanguage:!1}},computed:{className(){return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){if(!this.autoDetect&&!e.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`),this.unknownLanguage=!0,Pt(this.code);let t={};return this.autoDetect?(t=e.highlightAuto(this.code),this.detectedLanguage=t.language):(t=e.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),t.value},autoDetect(){return!this.language||(e=this.autodetect,Boolean(e||""===e));var e},ignoreIllegals:()=>!0},render(e){return e("pre",{},[e("code",{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:t,VuePlugin:{install(e){e.component("highlightjs",t)}}}}const _n={"after:highlightElement":({el:e,result:t,text:n})=>{const r=On(e);if(!r.length)return;const i=document.createElement("div");i.innerHTML=t.value,t.value=function(e,t,n){let r=0,i="";const a=[];function o(){return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset"}function u(e){i+=""}function l(e){("start"===e.event?s:u)(e.node)}for(;e.length||t.length;){let t=o();if(i+=Pt(n.substring(r,t[0].offset)),r=t[0].offset,t===e){a.reverse().forEach(u);do{l(t.splice(0,1)[0]),t=o()}while(t===e&&t.length&&t[0].offset===r);a.reverse().forEach(s)}else"start"===t[0].event?a.push(t[0].node):a.pop(),l(t.splice(0,1)[0])}return i+Pt(n.substr(r))}(r,On(i),n)}};function $n(e){return e.nodeName.toLowerCase()}function On(e){const t=[];return function e(n,r){for(let i=n.firstChild;i;i=i.nextSibling)3===i.nodeType?r+=i.nodeValue.length:1===i.nodeType&&(t.push({event:"start",offset:r,node:i}),r=e(i,r),$n(i).match(/br|hr|img|input/)||t.push({event:"stop",offset:r,node:i}));return r}(e,0),t}const Bn={},Nn=e=>{console.error(e)},Rn=(e,...t)=>{console.log(`WARN: ${e}`,...t)},Tn=(e,t)=>{Bn[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Bn[`${e}/${t}`]=!0)},zn=Pt,Mn=qt,In=Symbol("nomatch");var Ln=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const a=/(^(<[^>]+>|\t|)+|\n)/gm,o="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]};let u={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:null,__emitter:Yt};function l(e){return u.noHighlightRe.test(e)}function c(e,t,n,r){let i="",a="";"object"==typeof t?(i=e,n=t.ignoreIllegals,a=t.language,r=void 0):(Tn("10.7.0","highlight(lang, code, ...args) has been deprecated."),Tn("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),a=e,i=t);const o={code:i,language:a};x("before:highlight",o);const s=o.result?o.result:f(o.language,o.code,n,r);return s.code=o.code,x("after:highlight",s),s}function f(e,n,a,s){function l(e,t){const n=w.case_insensitive?t[0].toLowerCase():t[0];return Object.prototype.hasOwnProperty.call(e.keywords,n)&&e.keywords[n]}function c(){null!=A.subLanguage?function(){if(""===S)return;let e=null;if("string"==typeof A.subLanguage){if(!t[A.subLanguage])return void C.addText(S);e=f(A.subLanguage,S,!0,E[A.subLanguage]),E[A.subLanguage]=e.top}else e=h(S,A.subLanguage.length?A.subLanguage:null);A.relevance>0&&(F+=e.relevance),C.addSublanguage(e.emitter,e.language)}():function(){if(!A.keywords)return void C.addText(S);let e=0;A.keywordPatternRe.lastIndex=0;let t=A.keywordPatternRe.exec(S),n="";for(;t;){n+=S.substring(e,t.index);const r=l(A,t);if(r){const[e,i]=r;if(C.addText(n),n="",F+=i,e.startsWith("_"))n+=t[0];else{const n=w.classNameAliases[e]||e;C.addKeyword(t[0],n)}}else n+=t[0];e=A.keywordPatternRe.lastIndex,t=A.keywordPatternRe.exec(S)}n+=S.substr(e),C.addText(n)}(),S=""}function d(e){return e.className&&C.openNode(w.classNameAliases[e.className]||e.className),A=Object.create(e,{parent:{value:A}}),A}function p(e,t,n){let r=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(r){if(e["on:end"]){const n=new jt(e);e["on:end"](t,n),n.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return p(e.parent,t,n)}function g(e){return 0===A.matcher.regexIndex?(S+=e[0],1):(O=!0,0)}function m(e){const t=e[0],n=e.rule,r=new jt(n),i=[n.__beforeBegin,n["on:begin"]];for(const n of i)if(n&&(n(e,r),r.isMatchIgnored))return g(t);return n&&n.endSameAsBegin&&(n.endRe=new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")),n.skip?S+=t:(n.excludeBegin&&(S+=t),c(),n.returnBegin||n.excludeBegin||(S=t)),d(n),n.returnBegin?0:t.length}function v(e){const t=e[0],r=n.substr(e.index),i=p(A,e,r);if(!i)return In;const a=A;a.skip?S+=t:(a.returnEnd||a.excludeEnd||(S+=t),c(),a.excludeEnd&&(S=t));do{A.className&&C.closeNode(),A.skip||A.subLanguage||(F+=A.relevance),A=A.parent}while(A!==i.parent);return i.starts&&(i.endSameAsBegin&&(i.starts.endRe=i.endRe),d(i.starts)),a.returnEnd?0:t.length}let y={};function b(t,r){const o=r&&r[0];if(S+=t,null==o)return c(),0;if("begin"===y.type&&"end"===r.type&&y.index===r.index&&""===o){if(S+=n.slice(r.index,r.index+1),!i){const t=new Error("0 width match regex");throw t.languageName=e,t.badRule=y.rule,t}return 1}if(y=r,"begin"===r.type)return m(r);if("illegal"===r.type&&!a){const e=new Error('Illegal lexeme "'+o+'" for mode "'+(A.className||"")+'"');throw e.mode=A,e}if("end"===r.type){const e=v(r);if(e!==In)return e}if("illegal"===r.type&&""===o)return 1;if($>1e5&&$>3*r.index){throw new Error("potential infinite loop, way more iterations than matches")}return S+=o,o.length}const w=D(e);if(!w)throw Nn(o.replace("{}",e)),new Error('Unknown language: "'+e+'"');const k=Cn(w,{plugins:r});let x="",A=s||k;const E={},C=new u.__emitter(u);!function(){const e=[];for(let t=A;t!==w;t=t.parent)t.className&&e.unshift(t.className);e.forEach((e=>C.openNode(e)))}();let S="",F=0,_=0,$=0,O=!1;try{for(A.matcher.considerAll();;){$++,O?O=!1:A.matcher.considerAll(),A.matcher.lastIndex=_;const e=A.matcher.exec(n);if(!e)break;const t=b(n.substring(_,e.index),e);_=e.index+t}return b(n.substr(_)),C.closeAllNodes(),C.finalize(),x=C.toHTML(),{relevance:Math.floor(F),value:x,language:e,illegal:!1,emitter:C,top:A}}catch(t){if(t.message&&t.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:t.message,context:n.slice(_-100,_+100),mode:t.mode},sofar:x,relevance:0,value:zn(n),emitter:C};if(i)return{illegal:!1,relevance:0,value:zn(n),emitter:C,language:e,top:A,errorRaised:t};throw t}}function h(e,n){n=n||u.languages||Object.keys(t);const r=function(e){const t={relevance:0,emitter:new u.__emitter(u),value:zn(e),illegal:!1,top:s};return t.emitter.addText(e),t}(e),i=n.filter(D).filter(k).map((t=>f(t,e,!1)));i.unshift(r);const a=i.sort(((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(D(e.language).supersetOf===t.language)return 1;if(D(t.language).supersetOf===e.language)return-1}return 0})),[o,l]=a,c=o;return c.second_best=l,c}const d={"before:highlightElement":({el:e})=>{u.useBR&&(e.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n"))},"after:highlightElement":({result:e})=>{u.useBR&&(e.value=e.value.replace(/\n/g,"
    "))}},p=/^(<[^>]+>|\t)+/gm,g={"after:highlightElement":({result:e})=>{u.tabReplace&&(e.value=e.value.replace(p,(e=>e.replace(/\t/g,u.tabReplace))))}};function m(e){let t=null;const r=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=u.languageDetectRe.exec(t);if(n){const t=D(n[1]);return t||(Rn(o.replace("{}",n[1])),Rn("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>l(e)||D(e)))}(e);if(l(r))return;x("before:highlightElement",{el:e,language:r}),t=e;const i=t.textContent,a=r?c(i,{language:r,ignoreIllegals:!0}):h(i);x("after:highlightElement",{el:e,result:a,text:i}),e.innerHTML=a.value,function(e,t,r){const i=t?n[t]:r;e.classList.add("hljs"),i&&e.classList.add(i)}(e,r,a.language),e.result={language:a.language,re:a.relevance,relavance:a.relevance},a.second_best&&(e.second_best={language:a.second_best.language,re:a.second_best.relevance,relavance:a.second_best.relevance})}const v=()=>{if(v.called)return;v.called=!0,Tn("10.6.0","initHighlighting() is deprecated. Use highlightAll() instead.");document.querySelectorAll("pre code").forEach(m)};let y=!1;function b(){if("loading"===document.readyState)return void(y=!0);document.querySelectorAll("pre code").forEach(m)}function D(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}function w(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{n[e.toLowerCase()]=t}))}function k(e){const t=D(e);return t&&!t.disableAutodetect}function x(e,t){const n=e;r.forEach((function(e){e[n]&&e[n](t)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){y&&b()}),!1),Object.assign(e,{highlight:c,highlightAuto:h,highlightAll:b,fixMarkup:function(e){return Tn("10.2.0","fixMarkup will be removed entirely in v11.0"),Tn("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"),t=e,u.tabReplace||u.useBR?t.replace(a,(e=>"\n"===e?u.useBR?"
    ":e:u.tabReplace?e.replace(/\t/g,u.tabReplace):e)):t;var t},highlightElement:m,highlightBlock:function(e){return Tn("10.7.0","highlightBlock will be removed entirely in v12.0"),Tn("10.7.0","Please use highlightElement now."),m(e)},configure:function(e){e.useBR&&(Tn("10.3.0","'useBR' will be removed entirely in v11.0"),Tn("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")),u=Mn(u,e)},initHighlighting:v,initHighlightingOnLoad:function(){Tn("10.6.0","initHighlightingOnLoad() is deprecated. Use highlightAll() instead."),y=!0},registerLanguage:function(n,r){let a=null;try{a=r(e)}catch(e){if(Nn("Language definition for '{}' could not be registered.".replace("{}",n)),!i)throw e;Nn(e),a=s}a.name||(a.name=n),t[n]=a,a.rawDefinition=r.bind(null,e),a.aliases&&w(a.aliases,{languageName:n})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(n))n[t]===e&&delete n[t]},listLanguages:function(){return Object.keys(t)},getLanguage:D,registerAliases:w,requireLanguage:function(e){Tn("10.4.0","requireLanguage will be removed entirely in v11."),Tn("10.4.0","Please see https://github.com/highlightjs/highlight.js/pull/2844");const t=D(e);if(t)return t;throw new Error("The '{}' language is required, but not loaded.".replace("{}",e))},autoDetection:k,inherit:Mn,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),r.push(e)},vuePlugin:Fn(e).VuePlugin}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString="10.7.2";for(const e in vn)"object"==typeof vn[e]&&It(vn[e]);return Object.assign(e,vn),e.addPlugin(d),e.addPlugin(_n),e.addPlugin(g),e}({});function jn(e){return function(...e){return e.map((e=>function(e){return e?"string"==typeof e?e:e.source:null}(e))).join("")}("(?=",e,")")}var Pn=function(e){const t={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:["and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},n={className:"meta",begin:/^(>>>|\.\.\.) /},r={className:"subst",begin:/\{/,end:/\}/,keywords:t,illegal:/#/},i={begin:/\{\{/,relevance:0},a={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,n],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,n],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,n,i,r]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,n,i,r]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,i,r]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,i,r]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},o="[0-9](_?[0-9])*",s=`(\\b(${o}))?\\.(${o})|\\b(${o})\\.`,u={className:"number",relevance:0,variants:[{begin:`(\\b(${o})|(${s}))[eE][+-]?(${o})[jJ]?\\b`},{begin:`(${s})[jJ]?`},{begin:"\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?\\b"},{begin:"\\b0[bB](_?[01])+[lL]?\\b"},{begin:"\\b0[oO](_?[0-7])+[lL]?\\b"},{begin:"\\b0[xX](_?[0-9a-fA-F])+[lL]?\\b"},{begin:`\\b(${o})[jJ]\\b`}]},l={className:"comment",begin:jn(/# type:/),end:/$/,keywords:t,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},c={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,contains:["self",n,u,a,e.HASH_COMMENT_MODE]}]};return r.contains=[a,u,n],{name:"Python",aliases:["py","gyp","ipython"],keywords:t,illegal:/(<\/|->|\?)|=>/,contains:[n,u,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},a,l,e.HASH_COMMENT_MODE,{variants:[{className:"function",beginKeywords:"def"},{className:"class",beginKeywords:"class"}],end:/:/,illegal:/[${=;\n,]/,contains:[e.UNDERSCORE_TITLE_MODE,c,{begin:/->/,endsWithParent:!0,keywords:t}]},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[u,c,a]}]}};var qn=function(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}};function Hn(e){return(Hn="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})(e)}function Un(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wn(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}var fr="&",hr="#",dr="!",pr="-",gr=".",mr="ALIAS",vr="BLANK_LINE",yr="BLOCK_FOLDED",br="BLOCK_LITERAL",Dr="COMMENT",wr="DIRECTIVE",kr="DOCUMENT",xr="FLOW_MAP",Ar="FLOW_SEQ",Er="MAP",Cr="MAP_KEY",Sr="MAP_VALUE",Fr="PLAIN",_r="QUOTE_DOUBLE",$r="QUOTE_SINGLE",Or="SEQ",Br="SEQ_ITEM",Nr="tag:yaml.org,2002:",Rr={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function Tr(e){for(var t=[0],n=e.indexOf("\n");-1!==n;)n+=1,t.push(n),n=e.indexOf("\n",n);return t}function zr(e){var t,n;return"string"==typeof e?(t=Tr(e),n=e):(Array.isArray(e)&&(e=e[0]),e&&e.context&&(e.lineStarts||(e.lineStarts=Tr(e.context.src)),t=e.lineStarts,n=e.context.src)),{lineStarts:t,src:n}}function Mr(e,t){if("number"!=typeof e||e<0)return null;var n=zr(t),r=n.lineStarts,i=n.src;if(!r||!i||e>i.length)return null;for(var a=0;a=1)||e>r.length)return null;for(var a=r[e-1],o=r[e];o&&o>a&&"\n"===i[o-1];)--o;return i.slice(a,o)}var Lr=function(){function e(t,n){Un(this,e),this.start=t,this.end=n||t}return Yn(e,[{key:"isEmpty",value:function(){return"number"!=typeof this.start||!this.end||this.end<=this.start}},{key:"setOrigRange",value:function(e,t){var n=this.start,r=this.end;if(0===e.length||r<=e[0])return this.origStart=n,this.origEnd=r,t;for(var i=t;in);)++i;this.origStart=n+i;for(var a=i;i=r);)++i;return this.origEnd=r+i,a}}],[{key:"copy",value:function(t){return new e(t.start,t.end)}}]),e}(),jr=function(){function e(t,n,r){Un(this,e),Object.defineProperty(this,"context",{value:r||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=n||[],this.type=t,this.value=null}return Yn(e,[{key:"getPropValue",value:function(e,t,n){if(!this.context)return null;var r=this.context.src,i=this.props[e];return i&&r[i.start]===t?r.slice(i.start+(n?1:0),i.end):null}},{key:"anchor",get:function(){for(var e=0;e0?e.join("\n"):null}},{key:"commentHasRequiredWhitespace",value:function(t){var n=this.context.src;if(this.header&&t===this.header.end)return!1;if(!this.valueRange)return!1;var r=this.valueRange.end;return t!==r||e.atBlank(n,r-1)}},{key:"hasComment",get:function(){if(this.context)for(var e=this.context.src,t=0;t=t.length||"\n"===t[i]?r+"\n":r}},{key:"atDocumentBoundary",value:function(e,t,n){var r=e[t];if(!r)return!0;var i=e[t-1];if(i&&"\n"!==i)return!1;if(n){if(r!==n)return!1}else if(r!==pr&&r!==gr)return!1;var a=e[t+1],o=e[t+2];if(a!==r||o!==r)return!1;var s=e[t+3];return!s||"\n"===s||"\t"===s||" "===s}},{key:"endOfIdentifier",value:function(e,t){for(var n=e[t],r="<"===n,i=r?["\n","\t"," ",">"]:["\n","\t"," ","[","]","{","}",","];n&&-1===i.indexOf(n);)n=e[t+=1];return r&&">"===n&&(t+=1),t}},{key:"endOfIndent",value:function(e,t){for(var n=e[t];" "===n;)n=e[t+=1];return t}},{key:"endOfLine",value:function(e,t){for(var n=e[t];n&&"\n"!==n;)n=e[t+=1];return t}},{key:"endOfWhiteSpace",value:function(e,t){for(var n=e[t];"\t"===n||" "===n;)n=e[t+=1];return t}},{key:"startOfLine",value:function(e,t){var n=e[t-1];if("\n"===n)return t;for(;n&&"\n"!==n;)n=e[t-=1];return t+1}},{key:"endOfBlockIndent",value:function(t,n,r){var i=e.endOfIndent(t,r);if(i>r+n)return i;var a=e.endOfWhiteSpace(t,i),o=t[a];return o&&"\n"!==o?null:a}},{key:"atBlank",value:function(e,t,n){var r=e[t];return"\n"===r||"\t"===r||" "===r||n&&!r}},{key:"nextNodeIsIndented",value:function(e,t,n){return!(!e||t<0)&&(t>0||n&&"-"===e)}},{key:"normalizeOffset",value:function(t,n){var r=t[n];return r?"\n"!==r&&"\n"===t[n-1]?n-1:e.endOfWhiteSpace(t,n):n}},{key:"foldNewline",value:function(t,n,r){for(var i=0,a=!1,o="",s=t[n+1];" "===s||"\t"===s||"\n"===s;){switch(s){case"\n":i=0,n+=1,o+="\n";break;case"\t":i<=r&&(a=!0),n=e.endOfWhiteSpace(t,n+2)-1;break;case" ":i+=1,n+=1}s=t[n+1]}return o||(o=" "),s&&i<=r&&(a=!0),{fold:o,offset:n,error:a}}}]),e}(),Pr=function(e){Kn(n,e);var t=nr(n);function n(e,r,i){var a;if(Un(this,n),!(i&&r instanceof jr))throw new Error("Invalid arguments for new ".concat(e));return(a=t.call(this)).name=e,a.message=i,a.source=r,a}return Yn(n,[{key:"makePretty",value:function(){if(this.source){this.nodeType=this.source.type;var e=this.source.context&&this.source.context.root;if("number"==typeof this.offset){this.range=new Lr(this.offset,this.offset+1);var t=e&&Mr(this.offset,e);if(t){var n={line:t.line,col:t.col+1};this.linePos={start:t,end:n}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){var r=this.linePos.start,i=r.line,a=r.col;this.message+=" at line ".concat(i,", column ").concat(a);var o=e&&function(e,t){var n=e.start,r=e.end,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:80,a=Ir(n.line,t);if(!a)return null;var o=n.col;if(a.length>i)if(o<=i-10)a=a.substr(0,i-1)+"…";else{var s=Math.round(i/2);a.length>o+s&&(a=a.substr(0,o+s-1)+"…"),o-=a.length-i,a="…"+a.substr(1-i)}var u=1,l="";r&&(r.line===n.line&&o+(r.col-n.col)<=i+1?u=r.col-n.col:(u=Math.min(a.length+1,i)-o,l="…"));var c=o>1?" ".repeat(o-1):"",f="^".repeat(u);return"".concat(a,"\n").concat(c).concat(f).concat(l)}(this.linePos,e);o&&(this.message+=":\n\n".concat(o,"\n"))}delete this.source}}}]),n}(Xn(Error)),qr=function(e){Kn(n,e);var t=nr(n);function n(e,r){return Un(this,n),t.call(this,"YAMLReferenceError",e,r)}return n}(Pr),Hr=function(e){Kn(n,e);var t=nr(n);function n(e,r){return Un(this,n),t.call(this,"YAMLSemanticError",e,r)}return n}(Pr),Ur=function(e){Kn(n,e);var t=nr(n);function n(e,r){return Un(this,n),t.call(this,"YAMLSyntaxError",e,r)}return n}(Pr),Wr=function(e){Kn(n,e);var t=nr(n);function n(e,r){return Un(this,n),t.call(this,"YAMLWarning",e,r)}return n}(Pr),Yr=function(e){Kn(n,e);var t=nr(n);function n(){return Un(this,n),t.apply(this,arguments)}return Yn(n,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;for(var e=this.valueRange,t=e.start,n=e.end,r=this.context.src,i=r[n-1];tl?r.slice(l,o+1):s)}else a+=s}var f=r[t];switch(f){case"\t":return{errors:[new Hr(this,"Plain value cannot start with a tab character")],str:a};case"@":case"`":var h="Plain value cannot start with reserved character ".concat(f);return{errors:[new Hr(this,h)],str:a};default:return a}}},{key:"parseBlockValue",value:function(e){for(var t=this.context,r=t.indent,i=t.inFlow,a=t.src,o=e,s=e,u=a[o];"\n"===u&&!jr.atDocumentBoundary(a,o+1);u=a[o]){var l=jr.endOfBlockIndent(a,r,o+1);if(null===l||"#"===a[l])break;o="\n"===a[l]?l:s=n.endOfLine(a,l,i)}return this.valueRange.isEmpty()&&(this.valueRange.start=e),this.valueRange.end=s,s}},{key:"parse",value:function(e,t){this.context=e;var r=e.inFlow,i=e.src,a=t,o=i[a];return o&&"#"!==o&&"\n"!==o&&(a=n.endOfLine(i,t,r)),this.valueRange=new Lr(t,a),a=jr.endOfWhiteSpace(i,a),a=this.parseComment(a),this.hasComment&&!this.valueRange.isEmpty()||(a=this.parseBlockValue(a)),a}}],[{key:"endOfLine",value:function(e,t,n){for(var r=e[t],i=t;r&&"\n"!==r&&(!n||"["!==r&&"]"!==r&&"{"!==r&&"}"!==r&&","!==r);){var a=e[i+1];if(":"===r&&(!a||"\n"===a||"\t"===a||" "===a||n&&","===a))break;if((" "===r||"\t"===r)&&"#"===a)break;i+=1,r=a}return i}}]),n}(jr),Jr=function(e){Kn(n,e);var t=nr(n);function n(){return Un(this,n),t.call(this,vr)}return Yn(n,[{key:"includesTrailingLines",get:function(){return!0}},{key:"parse",value:function(e,t){return this.context=e,this.range=new Lr(t,t+1),t+1}}]),n}(jr),Kr=function(e){Kn(n,e);var t=nr(n);function n(e,r){var i;return Un(this,n),(i=t.call(this,e,r)).node=null,i}return Yn(n,[{key:"includesTrailingLines",get:function(){return!!this.node&&this.node.includesTrailingLines}},{key:"parse",value:function(e,t){this.context=e;var n=e.parseNode,r=e.src,i=e.atLineStart,a=e.lineStart;i||this.type!==Br||(this.error=new Hr(this,"Sequence items must not have preceding content on the same line"));for(var o=i?t-a:e.indent,s=jr.endOfWhiteSpace(r,t+1),u=r[s],l="#"===u,c=[],f=null;"\n"===u||"#"===u;){if("#"===u){var h=jr.endOfLine(r,s+1);c.push(new Lr(s,h)),s=h}else{i=!0,a=s+1,"\n"===r[jr.endOfWhiteSpace(r,a)]&&0===c.length&&(a=(f=new Jr).parse({src:r},a)),s=jr.endOfIndent(r,a)}u=r[s]}if(jr.nextNodeIsIndented(u,s-(a+o),this.type!==Br)?this.node=n({atLineStart:i,inCollection:!1,indent:o,lineStart:a,parent:this},s):u&&a>t+1&&(s=a-1),this.node){if(f){var d=e.parent.items||e.parent.contents;d&&d.push(f)}c.length&&Array.prototype.push.apply(this.props,c),s=this.node.range.end}else if(l){var p=c[0];this.props.push(p),s=p.end}else s=jr.endOfLine(r,t+1);var g=this.node?this.node.valueRange.end:s;return this.valueRange=new Lr(t,g),s}},{key:"setOrigRanges",value:function(e,t){return t=rr(Vn(n.prototype),"setOrigRanges",this).call(this,e,t),this.node?this.node.setOrigRanges(e,t):t}},{key:"toString",value:function(){var e=this.context.src,t=this.node,n=this.range,r=this.value;if(null!=r)return r;var i=t?e.slice(n.start,t.range.start)+String(t):e.slice(n.start,n.end);return jr.addStringTerminator(e,n.end,i)}}]),n}(jr),Vr=function(e){Kn(n,e);var t=nr(n);function n(){return Un(this,n),t.call(this,Dr)}return Yn(n,[{key:"parse",value:function(e,t){this.context=e;var n=this.parseComment(t);return this.range=new Lr(t,n),n}}]),n}(jr);function Gr(e){for(var t=e;t instanceof Kr;)t=t.node;if(!(t instanceof Zr))return null;for(var n=t.items.length,r=-1,i=n-1;i>=0;--i){var a=t.items[i];if(a.type===Dr){var o=a.context,s=o.indent,u=o.lineStart;if(s>0&&a.range.start>=u+s)break;r=i}else{if(a.type!==vr)break;r=i}}if(-1===r)return null;for(var l=t.items.splice(r,n-r),c=l[0].range.start;t.range.end=c,t.valueRange&&t.valueRange.end>c&&(t.valueRange.end=c),t!==e;)t=t.context.parent;return l}var Zr=function(e){Kn(n,e);var t=nr(n);function n(e){var r;Un(this,n),r=t.call(this,e.type===Br?Or:Er);for(var i=e.props.length-1;i>=0;--i)if(e.props[i].start0}},{key:"parse",value:function(e,t){this.context=e;var r=e.parseNode,i=e.src,a=jr.startOfLine(i,t),o=this.items[0];o.context.parent=this,this.valueRange=Lr.copy(o.valueRange);for(var s=o.range.start-o.context.lineStart,u=t,l=i[u=jr.normalizeOffset(i,u)],c=jr.endOfWhiteSpace(i,a)===u,f=!1;l;){for(;"\n"===l||"#"===l;){if(c&&"\n"===l&&!f){var h=new Jr;if(u=h.parse({src:i},u),this.valueRange.end=u,u>=i.length){l=null;break}this.items.push(h),u-=1}else if("#"===l){if(u=i.length){l=null;break}}if(a=u+1,u=jr.endOfIndent(i,a),jr.atBlank(i,u)){var p=jr.endOfWhiteSpace(i,u),g=i[p];g&&"\n"!==g&&"#"!==g||(u=p)}l=i[u],c=!0}if(!l)break;if(u!==a+s&&(c||":"!==l)){if(ut&&(u=a);break}if(!this.error){this.error=new Ur(this,"All collection items must start at the same column")}}if(o.type===Br){if("-"!==l){a>t&&(u=a);break}}else if("-"===l&&!this.error){var m=i[u+1];if(!m||"\n"===m||"\t"===m||" "===m){this.error=new Ur(this,"A collection cannot be both a mapping and a sequence")}}var v=r({atLineStart:c,inCollection:!0,indent:s,lineStart:a,parent:this},u);if(!v)return u;if(this.items.push(v),this.valueRange.end=v.valueRange.end,l=i[u=jr.normalizeOffset(i,v.range.end)],c=!1,f=v.includesTrailingLines,l){for(var y=u-1,b=i[y];" "===b||"\t"===b;)b=i[--y];"\n"===b&&(a=y+1,c=!0)}var D=Gr(v);D&&Array.prototype.push.apply(this.items,D)}return u}},{key:"setOrigRanges",value:function(e,t){return t=rr(Vn(n.prototype),"setOrigRanges",this).call(this,e,t),this.items.forEach((function(n){t=n.setOrigRanges(e,t)})),t}},{key:"toString",value:function(){var e=this.context.src,t=this.items,n=this.range,r=this.value;if(null!=r)return r;for(var i=e.slice(n.start,t[0].range.start)+String(t[0]),a=1;a=i+r||("#"===a||"\n"===a)&&n.nextContentHasIndent(e,t,r))}}]),n}(jr),Qr=function(e){Kn(n,e);var t=nr(n);function n(){var e;return Un(this,n),(e=t.call(this,wr)).name=null,e}return Yn(n,[{key:"parameters",get:function(){var e=this.rawValue;return e?e.trim().split(/[ \t]+/):[]}},{key:"parseName",value:function(e){for(var t=this.context.src,n=e,r=t[n];r&&"\n"!==r&&"\t"!==r&&" "!==r;)r=t[n+=1];return this.name=t.slice(e,n),n}},{key:"parseParameters",value:function(e){for(var t=this.context.src,n=e,r=t[n];r&&"\n"!==r&&"#"!==r;)r=t[n+=1];return this.valueRange=new Lr(e,n),n}},{key:"parse",value:function(e,t){this.context=e;var n=this.parseName(t+1);return n=this.parseParameters(n),n=this.parseComment(n),this.range=new Lr(t,n),n}}]),n}(jr),Xr=function(e){Kn(n,e);var t=nr(n);function n(){var e;return Un(this,n),(e=t.call(this,kr)).directives=null,e.contents=null,e.directivesEndMarker=null,e.documentEndMarker=null,e}return Yn(n,[{key:"parseDirectives",value:function(e){var t=this.context.src;this.directives=[];for(var r=!0,i=!1,a=e;!jr.atDocumentBoundary(t,a,pr);)switch(t[a=n.startCommentOrEndBlankLine(t,a)]){case"\n":if(r){var o=new Jr;(a=o.parse({src:t},a))0&&(this.contents=this.directives,this.directives=[]),a}return t[a]?(this.directivesEndMarker=new Lr(a,a+3),a+3):(i?this.error=new Hr(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),a)}},{key:"parseContents",value:function(e){var t=this.context,r=t.parseNode,i=t.src;this.contents||(this.contents=[]);for(var a=e;"-"===i[a-1];)a-=1;var o=jr.endOfWhiteSpace(i,e),s=a===e;for(this.valueRange=new Lr(o);!jr.atDocumentBoundary(i,o,gr);){switch(i[o]){case"\n":if(s){var u=new Jr;(o=u.parse({src:i},o))0&&((t.length>0||e[0].type===Dr)&&(r+="---\n"),r+=e.join("")),"\n"!==r[r.length-1]&&(r+="\n"),r}}],[{key:"startCommentOrEndBlankLine",value:function(e,t){var n=jr.endOfWhiteSpace(e,t),r=e[n];return"#"===r||"\n"===r?n:t}}]),n}(jr),ei=function(e){Kn(n,e);var t=nr(n);function n(){return Un(this,n),t.apply(this,arguments)}return Yn(n,[{key:"parse",value:function(e,t){this.context=e;var n=e.src,r=jr.endOfIdentifier(n,t+1);return this.valueRange=new Lr(t+1,r),r=jr.endOfWhiteSpace(n,r),r=this.parseComment(r)}}]),n}(jr),ti="CLIP",ni="KEEP",ri="STRIP",ii=function(e){Kn(n,e);var t=nr(n);function n(e,r){var i;return Un(this,n),(i=t.call(this,e,r)).blockIndent=null,i.chomping=ti,i.header=null,i}return Yn(n,[{key:"includesTrailingLines",get:function(){return this.chomping===ni}},{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=this.valueRange,t=e.start,n=e.end,r=this.context,i=r.indent,a=r.src;if(this.valueRange.isEmpty())return"";for(var o=null,s=a[n-1];"\n"===s||"\t"===s||" "===s;){if((n-=1)<=t){if(this.chomping===ni)break;return""}"\n"===s&&(o=n),s=a[n-1]}var u=n+1;o&&(this.chomping===ni?(u=o,n=this.valueRange.end):n=o);for(var l=i+this.blockIndent,c=this.type===yr,f=!0,h="",d="",p=!1,g=t;gs&&(s=f);a="\n"===r[l]?l:o=jr.endOfLine(r,l)}return this.chomping!==ni&&(a=r[o]?o+1:o),this.valueRange=new Lr(e+1,a),a}},{key:"parse",value:function(e,t){this.context=e;var n=e.src,r=this.parseBlockHeader(t);return r=jr.endOfWhiteSpace(n,r),r=this.parseComment(r),r=this.parseBlockValue(r)}},{key:"setOrigRanges",value:function(e,t){return t=rr(Vn(n.prototype),"setOrigRanges",this).call(this,e,t),this.header?this.header.setOrigRange(e,t):t}}]),n}(jr),ai=function(e){Kn(n,e);var t=nr(n);function n(e,r){var i;return Un(this,n),(i=t.call(this,e,r)).items=null,i}return Yn(n,[{key:"prevNodeIsJsonLike",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.items.length,t=this.items[e-1];return!!t&&(t.jsonLike||t.type===Dr&&this.prevNodeIsJsonLike(e-1))}},{key:"parse",value:function(e,t){this.context=e;var n=e.parseNode,r=e.src,i=e.indent,a=e.lineStart,o=r[t];this.items=[{char:o,offset:t}];var s=jr.endOfWhiteSpace(r,t+1);for(o=r[s];o&&"]"!==o&&"}"!==o;){switch(o){case"\n":if(a=s+1,"\n"===r[jr.endOfWhiteSpace(r,a)]){var u=new Jr;a=u.parse({src:r},a),this.items.push(u)}if((s=jr.endOfIndent(r,a))<=a+i&&(o=r[s],sn.offset);)++r;n.origOffset=n.offset+r,t=r}})),t}},{key:"toString",value:function(){var e=this.context.src,t=this.items,n=this.range,r=this.value;if(null!=r)return r;var i=t.filter((function(e){return e instanceof jr})),a="",o=n.start;return i.forEach((function(t){var n=e.slice(o,t.range.start);o=t.range.end,"\n"===(a+=n+String(t))[a.length-1]&&"\n"!==e[o-1]&&"\n"===e[o]&&(o+=1)})),a+=e.slice(o,n.end),jr.addStringTerminator(e,n.end,a)}}]),n}(jr),oi=function(e){Kn(n,e);var t=nr(n);function n(){return Un(this,n),t.apply(this,arguments)}return Yn(n,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=[],t=this.valueRange,n=t.start,r=t.end,i=this.context,a=i.indent,o=i.src;'"'!==o[r-1]&&e.push(new Ur(this,'Missing closing "quote'));for(var s="",u=n+1;uf?o.slice(f,u+1):l)}else s+=l}return e.length>0?{errors:e,str:s}:s}},{key:"parseCharCode",value:function(e,t,n){var r=this.context.src,i=r.substr(e,t),a=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;return isNaN(a)?(n.push(new Ur(this,"Invalid escape sequence ".concat(r.substr(e-2,t+2)))),r.substr(e-2,t+2)):String.fromCodePoint(a)}},{key:"parse",value:function(e,t){this.context=e;var r=e.src,i=n.endOfQuote(r,t+1);return this.valueRange=new Lr(t,i),i=jr.endOfWhiteSpace(r,i),i=this.parseComment(i)}}],[{key:"endOfQuote",value:function(e,t){for(var n=e[t];n&&'"'!==n;)n=e[t+="\\"===n?2:1];return t+1}}]),n}(jr),si=function(e){Kn(n,e);var t=nr(n);function n(){return Un(this,n),t.apply(this,arguments)}return Yn(n,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=[],t=this.valueRange,n=t.start,r=t.end,i=this.context,a=i.indent,o=i.src;"'"!==o[r-1]&&e.push(new Ur(this,"Missing closing 'quote"));for(var s="",u=n+1;uf?o.slice(f,u+1):l)}else s+=l}return e.length>0?{errors:e,str:s}:s}},{key:"parse",value:function(e,t){this.context=e;var r=e.src,i=n.endOfQuote(r,t+1);return this.valueRange=new Lr(t,i),i=jr.endOfWhiteSpace(r,i),i=this.parseComment(i)}}],[{key:"endOfQuote",value:function(e,t){for(var n=e[t];n;)if("'"===n){if("'"!==e[t+1])break;n=e[t+=2]}else n=e[t+=1];return t+1}}]),n}(jr);function ui(e,t){switch(e){case mr:return new ei(e,t);case yr:case br:return new ii(e,t);case xr:case Ar:return new ai(e,t);case Cr:case Sr:case Br:return new Kr(e,t);case Dr:case Fr:return new Yr(e,t);case _r:return new oi(e,t);case $r:return new si(e,t);default:return null}}var li=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.atLineStart,a=r.inCollection,o=r.inFlow,s=r.indent,u=r.lineStart,l=r.parent;Un(this,e),Jn(this,"parseNode",(function(n,r){if(jr.atDocumentBoundary(t.src,r))return null;var i=new e(t,n),a=i.parseProps(r),o=a.props,s=a.type,u=a.valueStart,l=ui(s,o),c=l.parse(i,u);if(l.range=new Lr(r,c),c<=r&&(l.error=new Error("Node#parse consumed no characters"),l.error.parseEnd=c,l.error.source=l,l.range.end=r+1),i.nodeStartsCollection(l)){l.error||i.atLineStart||i.parent.type!==kr||(l.error=new Ur(l,"Block collection must not have preceding content here (e.g. directives-end indicator)"));var f=new Zr(l);return c=f.parse(new e(i),c),f.range=new Lr(r,c),f}return l})),this.atLineStart=null!=i?i:n.atLineStart||!1,this.inCollection=null!=a?a:n.inCollection||!1,this.inFlow=null!=o?o:n.inFlow||!1,this.indent=null!=s?s:n.indent,this.lineStart=null!=u?u:n.lineStart,this.parent=null!=l?l:n.parent||{},this.root=n.root,this.src=n.src}return Yn(e,[{key:"nodeStartsCollection",value:function(e){var t=this.inCollection,n=this.inFlow,r=this.src;if(t||n)return!1;if(e instanceof Kr)return!0;var i=e.range.end;return"\n"!==r[i]&&"\n"!==r[i-1]&&":"===r[i=jr.endOfWhiteSpace(r,i)]}},{key:"parseProps",value:function(t){for(var n=this.inFlow,r=this.parent,i=this.src,a=[],o=!1,s=i[t=this.atLineStart?jr.endOfIndent(i,t):jr.endOfWhiteSpace(i,t)];s===fr||s===hr||s===dr||"\n"===s;){if("\n"===s){var u=t,l=void 0;do{l=u+1,u=jr.endOfIndent(i,l)}while("\n"===i[u]);var c=u-(l+this.indent),f=r.type===Br&&r.context.atLineStart;if("#"!==i[u]&&!jr.nextNodeIsIndented(i[u],c,!f))break;this.atLineStart=!0,this.lineStart=l,o=!1,t=u}else if(s===hr){var h=jr.endOfLine(i,t+1);a.push(new Lr(t,h)),t=h}else{var d=jr.endOfIdentifier(i,t+1);s===dr&&","===i[d]&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(i.slice(t+1,d+13))&&(d=jr.endOfIdentifier(i,d+5)),a.push(new Lr(t,d)),o=!0,t=jr.endOfWhiteSpace(i,d)}s=i[t]}return o&&":"===s&&jr.atBlank(i,t+1,!0)&&(t-=1),{props:a,type:e.parseType(i,t,n),valueStart:t}}}],[{key:"parseType",value:function(e,t,n){switch(e[t]){case"*":return mr;case">":return yr;case"|":return br;case"{":return xr;case"[":return Ar;case"?":return!n&&jr.atBlank(e,t+1,!0)?Cr:Fr;case":":return!n&&jr.atBlank(e,t+1,!0)?Sr:Fr;case"-":return!n&&jr.atBlank(e,t+1,!0)?Br:Fr;case'"':return _r;case"'":return $r;default:return Fr}}}]),e}();function ci(e){var t=[];-1!==e.indexOf("\r")&&(e=e.replace(/\r\n?/g,(function(e,n){return e.length>1&&t.push(n),"\n"})));var n=[],r=0;do{var i=new Xr,a=new li({src:e});r=i.parse(a,r),n.push(i)}while(r=0;--i){var a=t[i];if(Number.isInteger(a)&&a>=0){var o=[];o[a]=r,r=o}else{var s={};Object.defineProperty(s,a,{value:r,writable:!0,enumerable:!0,configurable:!0}),r=s}}return e.createNode(r,!1)}var mi=function(e){return null==e||"object"===Hn(e)&&e[Symbol.iterator]().next().done},vi=function(e){Kn(n,e);var t=nr(n);function n(e){var r;return Un(this,n),Jn(er(r=t.call(this)),"items",[]),r.schema=e,r}return Yn(n,[{key:"addIn",value:function(e,t){if(mi(e))this.add(t);else{var r=ar(e),i=r[0],a=r.slice(1),o=this.get(i,!0);if(o instanceof n)o.addIn(a,t);else{if(void 0!==o||!this.schema)throw new Error("Expected YAML collection at ".concat(i,". Remaining path: ").concat(a));this.set(i,gi(this.schema,a,t))}}}},{key:"deleteIn",value:function(e){var t=ar(e),r=t[0],i=t.slice(1);if(0===i.length)return this.delete(r);var a=this.get(r,!0);if(a instanceof n)return a.deleteIn(i);throw new Error("Expected YAML collection at ".concat(r,". Remaining path: ").concat(i))}},{key:"getIn",value:function(e,t){var r=ar(e),i=r[0],a=r.slice(1),o=this.get(i,!0);return 0===a.length?!t&&o instanceof pi?o.value:o:o instanceof n?o.getIn(a,t):void 0}},{key:"hasAllNullValues",value:function(){return this.items.every((function(e){if(!e||"PAIR"!==e.type)return!1;var t=e.value;return null==t||t instanceof pi&&null==t.value&&!t.commentBefore&&!t.comment&&!t.tag}))}},{key:"hasIn",value:function(e){var t=ar(e),r=t[0],i=t.slice(1);if(0===i.length)return this.has(r);var a=this.get(r,!0);return a instanceof n&&a.hasIn(i)}},{key:"setIn",value:function(e,t){var r=ar(e),i=r[0],a=r.slice(1);if(0===a.length)this.set(i,t);else{var o=this.get(i,!0);if(o instanceof n)o.setIn(a,t);else{if(void 0!==o||!this.schema)throw new Error("Expected YAML collection at ".concat(i,". Remaining path: ").concat(a));this.set(i,gi(this.schema,a,t))}}}},{key:"toJSON",value:function(){return null}},{key:"toString",value:function(e,t,r,i){var a=this,o=t.blockItem,s=t.flowChars,u=t.isMap,l=t.itemIndent,c=e,f=c.indent,h=c.indentStep,d=c.stringify,p=this.type===xr||this.type===Ar||e.inFlow;p&&(l+=h);var g=u&&this.hasAllNullValues();e=Object.assign({},e,{allNullValues:g,indent:l,inFlow:p,type:null});var m,v=!1,y=!1,b=this.items.reduce((function(t,n,r){var i;n&&(!v&&n.spaceBefore&&t.push({type:"comment",str:""}),n.commentBefore&&n.commentBefore.match(/^.*$/gm).forEach((function(e){t.push({type:"comment",str:"#".concat(e)})})),n.comment&&(i=n.comment),p&&(!v&&n.spaceBefore||n.commentBefore||n.comment||n.key&&(n.key.commentBefore||n.key.comment)||n.value&&(n.value.commentBefore||n.value.comment))&&(y=!0)),v=!1;var o=d(n,e,(function(){return i=null}),(function(){return v=!0}));return p&&!y&&o.includes("\n")&&(y=!0),p&&rn.maxFlowStringSingleLineLength){m=D;var x,A=cr(k);try{for(A.s();!(x=A.n()).done;){var E=x.value;m+=E?"\n".concat(h).concat(f).concat(E):"\n"}}catch(e){A.e(e)}finally{A.f()}m+="\n".concat(f).concat(w)}else m="".concat(D," ").concat(k.join(" ")," ").concat(w)}else{var C=b.map(o);m=C.shift();var S,F=cr(C);try{for(F.s();!(S=F.n()).done;){var _=S.value;m+=_?"\n".concat(f).concat(_):"\n"}}catch(e){F.e(e)}finally{F.f()}}return this.comment?(m+="\n"+this.comment.replace(/^/gm,"".concat(f,"#")),r&&r()):v&&i&&i(),m}}]),n}(hi);function yi(e){var t=e instanceof pi?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),Number.isInteger(t)&&t>=0?t:null}Jn(vi,"maxFlowStringSingleLineLength",60);var bi=function(e){Kn(n,e);var t=nr(n);function n(){return Un(this,n),t.apply(this,arguments)}return Yn(n,[{key:"add",value:function(e){this.items.push(e)}},{key:"delete",value:function(e){var t=yi(e);return"number"==typeof t&&this.items.splice(t,1).length>0}},{key:"get",value:function(e,t){var n=yi(e);if("number"==typeof n){var r=this.items[n];return!t&&r instanceof pi?r.value:r}}},{key:"has",value:function(e){var t=yi(e);return"number"==typeof t&&t1&&void 0!==arguments[1]?arguments[1]:null;return Un(this,n),(r=t.call(this)).key=e,r.value=i,r.type=n.Type.PAIR,r}return Yn(n,[{key:"commentBefore",get:function(){return this.key instanceof hi?this.key.commentBefore:void 0},set:function(e){if(null==this.key&&(this.key=new pi(null)),!(this.key instanceof hi)){throw new Error("Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.")}this.key.commentBefore=e}},{key:"addToJSMap",value:function(e,t){var n=di(this.key,"",e);if(t instanceof Map){var r=di(this.value,n,e);t.set(n,r)}else if(t instanceof Set)t.add(n);else{var i=function(e,t,n){return null===t?"":"object"!==Hn(t)?String(t):e instanceof hi&&n&&n.doc?e.toString({anchors:Object.create(null),doc:n.doc,indent:"",indentStep:n.indentStep,inFlow:!0,inStringifyKey:!0,stringify:n.stringify}):JSON.stringify(t)}(this.key,n,e),a=di(this.value,i,e);i in t?Object.defineProperty(t,i,{value:a,writable:!0,enumerable:!0,configurable:!0}):t[i]=a}return t}},{key:"toJSON",value:function(e,t){var n=t&&t.mapAsMap?new Map:{};return this.addToJSMap(t,n)}},{key:"toString",value:function(e,t,n){if(!e||!e.doc)return JSON.stringify(this);var r=e.doc.options,i=r.indent,a=r.indentSeq,o=r.simpleKeys,s=this.key,u=this.value,l=s instanceof hi&&s.comment;if(o){if(l)throw new Error("With simple keys, key nodes cannot have comments");if(s instanceof vi){throw new Error("With simple keys, collection cannot be used as a key value")}}var c=!o&&(!s||l||(s instanceof hi?s instanceof vi||s.type===yr||s.type===br:"object"===Hn(s))),f=e,h=f.doc,d=f.indent,p=f.indentStep,g=f.stringify;e=Object.assign({},e,{implicitKey:!c,indent:d+p});var m=!1,v=g(s,e,(function(){return l=null}),(function(){return m=!0}));if(v=fi(v,e.indent,l),!c&&v.length>1024){if(o)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");c=!0}if(e.allNullValues&&!o)return this.comment?(v=fi(v,e.indent,this.comment),t&&t()):m&&!l&&n&&n(),e.inFlow&&!c?v:"? ".concat(v);v=c?"? ".concat(v,"\n").concat(d,":"):"".concat(v,":"),this.comment&&(v=fi(v,e.indent,this.comment),t&&t());var y="",b=null;if(u instanceof hi){if(u.spaceBefore&&(y="\n"),u.commentBefore){var D=u.commentBefore.replace(/^/gm,"".concat(e.indent,"#"));y+="\n".concat(D)}b=u.comment}else u&&"object"===Hn(u)&&(u=h.schema.createNode(u,!0));e.implicitKey=!1,!c&&!this.comment&&u instanceof pi&&(e.indentAtStart=v.length+1),m=!1,!a&&i>=2&&!e.inFlow&&!c&&u instanceof bi&&u.type!==Ar&&!u.tag&&!h.anchors.getName(u)&&(e.indent=e.indent.substr(2));var w=g(u,e,(function(){return b=null}),(function(){return m=!0})),k=" ";if(y||this.comment)k="".concat(y,"\n").concat(e.indent);else if(!c&&u instanceof vi){("["===w[0]||"{"===w[0])&&!w.includes("\n")||(k="\n".concat(e.indent))}else"\n"===w[0]&&(k="");return m&&!b&&n&&n(),fi(v+k+w,e.indent,b)}}]),n}(hi);Jn(Di,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var wi=function e(t,n){if(t instanceof ki){var r=n.get(t.source);return r.count*r.aliasCount}if(t instanceof vi){var i,a=0,o=cr(t.items);try{for(o.s();!(i=o.n()).done;){var s=e(i.value,n);s>a&&(a=s)}}catch(e){o.e(e)}finally{o.f()}return a}if(t instanceof Di){var u=e(t.key,n),l=e(t.value,n);return Math.max(u,l)}return 1},ki=function(e){Kn(n,e);var t=nr(n);function n(e){var r;return Un(this,n),(r=t.call(this)).source=e,r.type=mr,r}return Yn(n,[{key:"tag",set:function(e){throw new Error("Alias nodes cannot have tags")}},{key:"toJSON",value:function(e,t){if(!t)return di(this.source,e,t);var n=t.anchors,r=t.maxAliasCount,i=n.get(this.source);if(!i||void 0===i.res){var a="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new qr(this.cstNode,a):new ReferenceError(a)}if(r>=0&&(i.count+=1,0===i.aliasCount&&(i.aliasCount=wi(this.source,n)),i.count*i.aliasCount>r)){var o="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new qr(this.cstNode,o):new ReferenceError(o)}return i.res}},{key:"toString",value:function(e){return n.stringify(this,e)}}],[{key:"stringify",value:function(e,t){var n=e.range,r=e.source,i=t.anchors,a=t.doc,o=t.implicitKey,s=t.inStringifyKey,u=Object.keys(i).find((function(e){return i[e]===r}));if(!u&&s&&(u=a.anchors.getName(r)||a.anchors.newName()),u)return"*".concat(u).concat(o?" ":"");var l=a.anchors.getName(r)?"Alias node must be after source node":"Source node not found for alias node";throw new Error("".concat(l," [").concat(n,"]"))}}]),n}(hi);function xi(e,t){var n,r=t instanceof pi?t.value:t,i=cr(e);try{for(i.s();!(n=i.n()).done;){var a=n.value;if(a instanceof Di){if(a.key===t||a.key===r)return a;if(a.key&&a.key.value===r)return a}}}catch(e){i.e(e)}finally{i.f()}}Jn(ki,"default",!0);var Ai=function(e){Kn(n,e);var t=nr(n);function n(){return Un(this,n),t.apply(this,arguments)}return Yn(n,[{key:"add",value:function(e,t){e?e instanceof Di||(e=new Di(e.key||e,e.value)):e=new Di(e);var n=xi(this.items,e.key),r=this.schema&&this.schema.sortMapEntries;if(n){if(!t)throw new Error("Key ".concat(e.key," already set"));n.value=e.value}else if(r){var i=this.items.findIndex((function(t){return r(e,t)<0}));-1===i?this.items.push(e):this.items.splice(i,0,e)}else this.items.push(e)}},{key:"delete",value:function(e){var t=xi(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}},{key:"get",value:function(e,t){var n=xi(this.items,e),r=n&&n.value;return!t&&r instanceof pi?r.value:r}},{key:"has",value:function(e){return!!xi(this.items,e)}},{key:"set",value:function(e,t){this.add(new Di(e,t),!0)}},{key:"toJSON",value:function(e,t,n){var r=n?new n:t&&t.mapAsMap?new Map:{};t&&t.onCreate&&t.onCreate(r);var i,a=cr(this.items);try{for(a.s();!(i=a.n()).done;){i.value.addToJSMap(t,r)}}catch(e){a.e(e)}finally{a.f()}return r}},{key:"toString",value:function(e,t,r){if(!e)return JSON.stringify(this);var i,a=cr(this.items);try{for(a.s();!(i=a.n()).done;){var o=i.value;if(!(o instanceof Di))throw new Error("Map items must all be pairs; found ".concat(JSON.stringify(o)," instead"))}}catch(e){a.e(e)}finally{a.f()}return rr(Vn(n.prototype),"toString",this).call(this,e,{blockItem:function(e){return e.str},flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:e.indent||""},t,r)}}]),n}(vi),Ei=function(e){Kn(n,e);var t=nr(n);function n(e){var r;if(Un(this,n),e instanceof Di){var i=e.value;i instanceof bi||((i=new bi).items.push(e.value),i.range=e.value.range),(r=t.call(this,e.key,i)).range=e.range}else r=t.call(this,new pi("<<"),new bi);return r.type=Di.Type.MERGE_PAIR,tr(r)}return Yn(n,[{key:"addToJSMap",value:function(e,t){var n,r=cr(this.value.items);try{for(r.s();!(n=r.n()).done;){var i=n.value.source;if(!(i instanceof Ai))throw new Error("Merge sources must be maps");var a,o=cr(i.toJSON(null,e,Map));try{for(o.s();!(a=o.n()).done;){var s=ir(a.value,2),u=s[0],l=s[1];t instanceof Map?t.has(u)||t.set(u,l):t instanceof Set?t.add(u):Object.prototype.hasOwnProperty.call(t,u)||Object.defineProperty(t,u,{value:l,writable:!0,enumerable:!0,configurable:!0})}}catch(e){o.e(e)}finally{o.f()}}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"toString",value:function(e,t){var r=this.value;if(r.items.length>1)return rr(Vn(n.prototype),"toString",this).call(this,e,t);this.value=r.items[0];var i=rr(Vn(n.prototype),"toString",this).call(this,e,t);return this.value=r,i}}]),n}(Di),Ci={defaultType:br,lineWidth:76},Si={trueStr:"true",falseStr:"false"},Fi={asBigInt:!1},_i={nullStr:"null"},$i={defaultType:Fr,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function Oi(e,t,n){var r,i=cr(t);try{for(i.s();!(r=i.n()).done;){var a=r.value,o=a.format,s=a.test,u=a.resolve;if(s){var l=e.match(s);if(l){var c=u.apply(null,l);return c instanceof pi||(c=new pi(c)),o&&(c.format=o),c}}}}catch(e){i.e(e)}finally{i.f()}return n&&(e=n(e)),new pi(e)}var Bi="flow",Ni="block",Ri="quoted",Ti=function(e,t){for(var n=e[t+1];" "===n||"\t"===n;){do{n=e[t+=1]}while(n&&"\n"!==n);n=e[t+1]}return t};function zi(e,t,n,r){var i=r.indentAtStart,a=r.lineWidth,o=void 0===a?80:a,s=r.minContentWidth,u=void 0===s?20:s,l=r.onFold,c=r.onOverflow;if(!o||o<0)return e;var f=Math.max(1+u,1+o-t.length);if(e.length<=f)return e;var h=[],d={},p=o-t.length;"number"==typeof i&&(i>o-Math.max(2,u)?h.push(0):p=o-i);var g,m=void 0,v=void 0,y=!1,b=-1,D=-1,w=-1;for(n===Ni&&-1!==(b=Ti(e,b))&&(p=b+f);g=e[b+=1];){if(n===Ri&&"\\"===g){switch(D=b,e[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}w=b}if("\n"===g)n===Ni&&(b=Ti(e,b)),p=b+f,m=void 0;else{if(" "===g&&v&&" "!==v&&"\n"!==v&&"\t"!==v){var k=e[b+1];k&&" "!==k&&"\n"!==k&&"\t"!==k&&(m=b)}if(b>=p)if(m)h.push(m),p=m+f,m=void 0;else if(n===Ri){for(;" "===v||"\t"===v;)v=g,g=e[b+=1],y=!0;var x=b>w+1?b-2:D-1;if(d[x])return e;h.push(x),d[x]=!0,p=x+f,m=void 0}else y=!0}v=g}if(y&&c&&c(),0===h.length)return e;l&&l();for(var A=e.slice(0,h[0]),E=0;Er)return!0;if(i-(o=a+1)<=r)return!1}return!0}(o,$i.fold.lineWidth,s.length)),c=l?"|":">";if(!o)return c+"\n";var f="",h="";if(o=o.replace(/[\n\t ]*$/,(function(e){var t=e.indexOf("\n");return-1===t?c+="-":o!==e&&t===e.length-1||(c+="+",r&&r()),h=e.replace(/\n$/,""),""})).replace(/^[\n ]*/,(function(e){-1!==e.indexOf(" ")&&(c+=u);var t=e.match(/ +$/);return t?(f=e.slice(0,-t[0].length),t[0]):(f=e,"")})),h&&(h=h.replace(/\n+(?!\n|$)/g,"$&".concat(s))),f&&(f=f.replace(/\n+/g,"$&".concat(s))),i&&(c+=" #"+i.replace(/ ?[\r\n]+/g," "),n&&n()),!o)return"".concat(c).concat(u,"\n").concat(s).concat(h);if(l)return o=o.replace(/\n+/g,"$&".concat(s)),"".concat(c,"\n").concat(s).concat(f).concat(o).concat(h);o=o.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,"$&".concat(s));var d=zi("".concat(f).concat(o).concat(h),s,Ni,$i.fold);return"".concat(c,"\n").concat(s).concat(d)}function qi(e,t,n,r){var i=$i.defaultType,a=t.implicitKey,o=t.inFlow,s=e,u=s.type,l=s.value;"string"!=typeof l&&(l=String(l),e=Object.assign({},e,{value:l}));var c=function(i){switch(i){case yr:case br:return Pi(e,t,n,r);case _r:return Li(l,t);case $r:return ji(l,t);case Fr:return function(e,t,n,r){var i=e.comment,a=e.type,o=e.value,s=t.actualString,u=t.implicitKey,l=t.indent,c=t.inFlow;if(u&&/[\n[\]{},]/.test(o)||c&&/[[\]{},]/.test(o))return Li(o,t);if(!o||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return u||c||-1===o.indexOf("\n")?-1!==o.indexOf('"')&&-1===o.indexOf("'")?ji(o,t):Li(o,t):Pi(e,t,n,r);if(!u&&!c&&a!==Fr&&-1!==o.indexOf("\n"))return Pi(e,t,n,r);if(""===l&&Ii(o))return t.forceBlockIndent=!0,Pi(e,t,n,r);var f=o.replace(/\n+/g,"$&\n".concat(l));if(s){var h=t.doc.schema.tags;if("string"!=typeof Oi(f,h,h.scalarFallback).value)return Li(o,t)}var d=u?f:zi(f,l,Bi,Mi(t));return!i||c||-1===d.indexOf("\n")&&-1===i.indexOf("\n")?d:(n&&n(),function(e,t,n){if(!n)return e;var r=n.replace(/[\s\S]^/gm,"$&".concat(t,"#"));return"#".concat(r,"\n").concat(t).concat(e)}(d,l,i))}(e,t,n,r);default:return null}};u!==_r&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(l)?u=_r:!a&&!o||u!==yr&&u!==br||(u=_r);var f=c(u);if(null===f&&null===(f=c(i)))throw new Error("Unsupported default string type ".concat(i));return f}function Hi(e){var t=e.format,n=e.minFractionDigits,r=e.tag,i=e.value;if("bigint"==typeof i)return String(i);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";var a=JSON.stringify(i);if(!t&&n&&(!r||"tag:yaml.org,2002:float"===r)&&/^\d/.test(a)){var o=a.indexOf(".");o<0&&(o=a.length,a+=".");for(var s=n-(a.length-o-1);s-- >0;)a+="0"}return a}function Ui(e,t){var n,r,i;switch(t.type){case xr:n="}",r="flow map";break;case Ar:n="]",r="flow sequence";break;default:return void e.push(new Hr(t,"Not a flow collection!?"))}for(var a=t.items.length-1;a>=0;--a){var o=t.items[a];if(!o||o.type!==Dr){i=o;break}}if(i&&i.char!==n){var s,u="Expected ".concat(r," to end with ").concat(n);"number"==typeof i.offset?(s=new Hr(t,u)).offset=i.offset+1:(s=new Hr(i,u),i.range&&i.range.end&&(s.offset=i.range.end-i.range.start)),e.push(s)}}function Wi(e,t){var n=t.context.src[t.range.start-1];if("\n"!==n&&"\t"!==n&&" "!==n){e.push(new Hr(t,"Comments must be separated from other tokens by white space characters"))}}function Yi(e,t){var n=String(t),r=n.substr(0,8)+"..."+n.substr(-8);return new Hr(e,'The "'.concat(r,'" key is too long'))}function Ji(e,t){var n,r=cr(t);try{for(r.s();!(n=r.n()).done;){var i=n.value,a=i.afterKey,o=i.before,s=i.comment,u=e.items[o];u?(a&&u.value&&(u=u.value),void 0===s?!a&&u.commentBefore||(u.spaceBefore=!0):u.commentBefore?u.commentBefore+="\n"+s:u.commentBefore=s):void 0!==s&&(e.comment?e.comment+="\n"+s:e.comment=s)}}catch(e){r.e(e)}finally{r.f()}}function Ki(e,t){var n=t.strValue;return n?"string"==typeof n?n:(n.errors.forEach((function(n){n.source||(n.source=t),e.errors.push(n)})),n.str):""}function Vi(e,t){var n=t.tag,r=t.type,i=!1;if(n){var a=n.handle,o=n.suffix,s=n.verbatim;if(s){if("!"!==s&&"!!"!==s)return s;var u="Verbatim tags aren't resolved, so ".concat(s," is invalid.");e.errors.push(new Hr(t,u))}else if("!"!==a||o)try{return function(e,t){var n=t.tag,r=n.handle,i=n.suffix,a=e.tagPrefixes.find((function(e){return e.handle===r}));if(!a){var o=e.getDefaults().tagPrefixes;if(o&&(a=o.find((function(e){return e.handle===r}))),!a)throw new Hr(t,"The ".concat(r," tag handle is non-default and was not declared."))}if(!i)throw new Hr(t,"The ".concat(r," tag has no suffix."));if("!"===r&&"1.0"===(e.version||e.options.version)){if("^"===i[0])return e.warnings.push(new Wr(t,"YAML 1.0 ^ tag expansion is not supported")),i;if(/[:/]/.test(i)){var s=i.match(/^([a-z0-9-]+)\/(.*)/i);return s?"tag:".concat(s[1],".yaml.org,2002:").concat(s[2]):"tag:".concat(i)}}return a.prefix+decodeURIComponent(i)}(e,t)}catch(t){e.errors.push(t)}else i=!0}switch(r){case yr:case br:case _r:case $r:return Rr.STR;case xr:case Er:return Rr.MAP;case Ar:case Or:return Rr.SEQ;case Fr:return i?Rr.STR:null;default:return null}}function Gi(e,t,n){var r,i=e.schema.tags,a=[],o=cr(i);try{for(o.s();!(r=o.n()).done;){var s=r.value;if(s.tag===n){if(!s.test){var u=s.resolve(e,t);return u instanceof vi?u:new pi(u)}a.push(s)}}}catch(e){o.e(e)}finally{o.f()}var l=Ki(e,t);return"string"==typeof l&&a.length>0?Oi(l,a,i.scalarFallback):null}function Zi(e,t,n){try{var r=Gi(e,t,n);if(r)return n&&t.tag&&(r.tag=n),r}catch(n){return n.source||(n.source=t),e.errors.push(n),null}try{var i=function(e){switch(e.type){case xr:case Er:return Rr.MAP;case Ar:case Or:return Rr.SEQ;default:return Rr.STR}}(t);if(!i)throw new Error("The tag ".concat(n," is unavailable"));var a="The tag ".concat(n," is unavailable, falling back to ").concat(i);e.warnings.push(new Wr(t,a));var o=Gi(e,t,i);return o.tag=n,o}catch(n){var s=new qr(t,n.message);return s.stack=n.stack,e.errors.push(s),null}}function Qi(e,t){var n,r={before:[],after:[]},i=!1,a=!1,o=cr(function(e){if(!e)return!1;var t=e.type;return t===Cr||t===Sr||t===Br}(t.context.parent)?t.context.parent.props.concat(t.props):t.props);try{for(o.s();!(n=o.n()).done;){var s=n.value,u=s.start,l=s.end;switch(t.context.src[u]){case hr:if(!t.commentHasRequiredWhitespace(u)){e.push(new Hr(t,"Comments must be separated from other tokens by white space characters"))}var c=t.header,f=t.valueRange;(f&&(u>f.start||c&&u>c.start)?r.after:r.before).push(t.context.src.slice(u+1,l));break;case fr:if(i){e.push(new Hr(t,"A node can have at most one anchor"))}i=!0;break;case dr:if(a){e.push(new Hr(t,"A node can have at most one tag"))}a=!0}}}catch(e){o.e(e)}finally{o.f()}return{comments:r,hasAnchor:i,hasTag:a}}function Xi(e,t){if(!t)return null;t.error&&e.errors.push(t.error);var n=Qi(e.errors,t),r=n.comments,i=n.hasAnchor,a=n.hasTag;if(i){var o=e.anchors,s=t.anchor,u=o.getNode(s);u&&(o.map[o.newName(s)]=u),o.map[s]=t}if(t.type===mr&&(i||a)){e.errors.push(new Hr(t,"An alias node must not specify any properties"))}var l=function(e,t){var n=e.anchors,r=e.errors,i=e.schema;if(t.type===mr){var a=t.rawValue,o=n.getNode(a);if(!o){var s="Aliased anchor not found: ".concat(a);return r.push(new qr(t,s)),null}var u=new ki(o);return n._cstAliases.push(u),u}var l=Vi(e,t);if(l)return Zi(e,t,l);if(t.type!==Fr){var c="Failed to resolve ".concat(t.type," node here");return r.push(new Ur(t,c)),null}try{return Oi(Ki(e,t),i.tags,i.tags.scalarFallback)}catch(e){return e.source||(e.source=t),r.push(e),null}}(e,t);if(l){l.range=[t.range.start,t.range.end],e.options.keepCstNodes&&(l.cstNode=t),e.options.keepNodeTypes&&(l.type=t.type);var c=r.before.join("\n");c&&(l.commentBefore=l.commentBefore?"".concat(l.commentBefore,"\n").concat(c):c);var f=r.after.join("\n");f&&(l.comment=l.comment?"".concat(l.comment,"\n").concat(f):f)}return t.resolved=l}function ea(e,t){if(t.type!==Er&&t.type!==xr){var n="A ".concat(t.type," node cannot be resolved as a mapping");return e.errors.push(new Ur(t,n)),null}var r=t.type===xr?function(e,t){for(var n=[],r=[],i=void 0,a=!1,o="{",s=0;s0){(l=new Yr(Fr,[])).context={parent:s,src:s.context.src};var c=s.range.start+1;if(l.range={start:c,end:c},l.valueRange={start:c,end:c},"number"==typeof s.range.origStart){var f=s.range.origStart+1;l.range.origStart=l.range.origEnd=f,l.valueRange.origStart=l.valueRange.origEnd=f}}var h=new Di(i,Xi(e,l));ta(s,h),r.push(h),i&&"number"==typeof a&&s.range.start>a+1024&&e.errors.push(Yi(t,i)),i=void 0,a=null;break;default:void 0!==i&&r.push(new Di(i)),i=Xi(e,s),a=s.range.start,s.error&&e.errors.push(s.error);e:for(var d=o+1;;++d){var p=t.items[d];switch(p&&p.type){case vr:case Dr:continue e;case Sr:break e;default:var g="Implicit map keys need to be followed by map values";e.errors.push(new Hr(s,g));break e}}if(s.valueRangeContainsNewline){var m="Implicit map keys need to be on a single line";e.errors.push(new Hr(s,m))}}}void 0!==i&&r.push(new Di(i));return{comments:n,items:r}}(e,t),i=r.comments,a=r.items,o=new Ai;o.items=a,Ji(o,i);for(var s=!1,u=0;ur.valueRange.start)return!1;if(i[o]!==hr)return!1;for(var s=n;so+1024&&e.errors.push(Yi(t,a));for(var g=u.context.src,m=o;m1){throw new Hr(t,"Each pair must have its own sequence indicator")}var a=i.items[0]||new Di;i.commentBefore&&(a.commentBefore=a.commentBefore?"".concat(i.commentBefore,"\n").concat(a.commentBefore):i.commentBefore),i.comment&&(a.comment=a.comment?"".concat(i.comment,"\n").concat(a.comment):i.comment),i=a}n.items[r]=i instanceof Di?i:new Di(i)}}return n}function aa(e,t,n){var r=new bi(e);r.tag="tag:yaml.org,2002:pairs";var i,a=cr(t);try{for(a.s();!(i=a.n()).done;){var o=i.value,s=void 0,u=void 0;if(Array.isArray(o)){if(2!==o.length)throw new TypeError("Expected [key, value] tuple: ".concat(o));s=o[0],u=o[1]}else if(o&&o instanceof Object){var l=Object.keys(o);if(1!==l.length)throw new TypeError("Expected { key: value } tuple: ".concat(o));u=o[s=l[0]]}else s=o;var c=e.createPair(s,u,n);r.items.push(c)}}catch(e){a.e(e)}finally{a.f()}return r}var oa={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:ia,createNode:aa},sa=function(e){Kn(n,e);var t=nr(n);function n(){var e;return Un(this,n),Jn(er(e=t.call(this)),"add",Ai.prototype.add.bind(er(e))),Jn(er(e),"delete",Ai.prototype.delete.bind(er(e))),Jn(er(e),"get",Ai.prototype.get.bind(er(e))),Jn(er(e),"has",Ai.prototype.has.bind(er(e))),Jn(er(e),"set",Ai.prototype.set.bind(er(e))),e.tag=n.tag,e}return Yn(n,[{key:"toJSON",value:function(e,t){var n=new Map;t&&t.onCreate&&t.onCreate(n);var r,i=cr(this.items);try{for(i.s();!(r=i.n()).done;){var a=r.value,o=void 0,s=void 0;if(a instanceof Di?(o=di(a.key,"",t),s=di(a.value,o,t)):o=di(a,"",t),n.has(o))throw new Error("Ordered maps must not include duplicate keys");n.set(o,s)}}catch(e){i.e(e)}finally{i.f()}return n}}]),n}(bi);Jn(sa,"tag","tag:yaml.org,2002:omap");var ua={identify:function(e){return e instanceof Map},nodeClass:sa,default:!1,tag:"tag:yaml.org,2002:omap",resolve:function(e,t){var n,r=ia(e,t),i=[],a=cr(r.items);try{for(a.s();!(n=a.n()).done;){var o=n.value.key;if(o instanceof pi){if(i.includes(o.value)){throw new Hr(t,"Ordered maps must not include duplicate keys")}i.push(o.value)}}}catch(e){a.e(e)}finally{a.f()}return Object.assign(new sa,r)},createNode:function(e,t,n){var r=aa(e,t,n),i=new sa;return i.items=r.items,i}},la=function(e){Kn(n,e);var t=nr(n);function n(){var e;return Un(this,n),(e=t.call(this)).tag=n.tag,e}return Yn(n,[{key:"add",value:function(e){var t=e instanceof Di?e:new Di(e);xi(this.items,t.key)||this.items.push(t)}},{key:"get",value:function(e,t){var n=xi(this.items,e);return!t&&n instanceof Di?n.key instanceof pi?n.key.value:n.key:n}},{key:"set",value:function(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not ".concat(Hn(t)));var n=xi(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new Di(e))}},{key:"toJSON",value:function(e,t){return rr(Vn(n.prototype),"toJSON",this).call(this,e,t,Set)}},{key:"toString",value:function(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return rr(Vn(n.prototype),"toString",this).call(this,e,t,r);throw new Error("Set items must all have null values")}}]),n}(Ai);Jn(la,"tag","tag:yaml.org,2002:set");var ca={identify:function(e){return e instanceof Set},nodeClass:la,default:!1,tag:"tag:yaml.org,2002:set",resolve:function(e,t){var n=ea(e,t);if(!n.hasAllNullValues())throw new Hr(t,"Set items must all have null values");return Object.assign(new la,n)},createNode:function(e,t,n){var r,i=new la,a=cr(t);try{for(a.s();!(r=a.n()).done;){var o=r.value;i.items.push(e.createPair(o,null,n))}}catch(e){a.e(e)}finally{a.f()}return i}},fa=function(e,t){var n=t.split(":").reduce((function(e,t){return 60*e+Number(t)}),0);return"-"===e?-n:n},ha=function(e){var t=e.value;if(isNaN(t)||!isFinite(t))return Hi(t);var n="";t<0&&(n="-",t=Math.abs(t));var r=[t%60];return t<60?r.unshift(0):(t=Math.round((t-r[0])/60),r.unshift(t%60),t>=60&&(t=Math.round((t-r[0])/60),r.unshift(t))),n+r.map((function(e){return e<10?"0"+String(e):String(e)})).join(":").replace(/000000\d*$/,"")},da={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:function(e,t,n){return fa(t,n.replace(/_/g,""))},stringify:ha},pa={identify:function(e){return"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:function(e,t,n){return fa(t,n.replace(/_/g,""))},stringify:ha},ga={identify:function(e){return 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:function(e,t,n,r,i,a,o,s,u){s&&(s=(s+"00").substr(1,3));var l=Date.UTC(t,n-1,r,i||0,a||0,o||0,s||0);if(u&&"Z"!==u){var c=fa(u[0],u.slice(1));Math.abs(c)<30&&(c*=60),l-=6e4*c}return new Date(l)},stringify:function(e){return e.value.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")}};function ma(e){var t="undefined"!=typeof process&&process.env||{};return e?"undefined"!=typeof YAML_SILENCE_DEPRECATION_WARNINGS?!YAML_SILENCE_DEPRECATION_WARNINGS:!t.YAML_SILENCE_DEPRECATION_WARNINGS:"undefined"!=typeof YAML_SILENCE_WARNINGS?!YAML_SILENCE_WARNINGS:!t.YAML_SILENCE_WARNINGS}function va(e,t){if(ma(!1)){var n="undefined"!=typeof process&&process.emitWarning;n?n(e,t):console.warn(t?"".concat(t,": ").concat(e):e)}}var ya={};var ba={createNode:function(e,t,n){var r=new Ai(e);if(t instanceof Map){var i,a=cr(t);try{for(a.s();!(i=a.n()).done;){var o=ir(i.value,2),s=o[0],u=o[1];r.items.push(e.createPair(s,u,n))}}catch(e){a.e(e)}finally{a.f()}}else if(t&&"object"===Hn(t))for(var l=0,c=Object.keys(t);l=0?n+r.toString(t):Hi(e)}var Ea={identify:function(e){return null==e},createNode:function(e,t,n){return n.wrapScalars?new pi(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:_i,stringify:function(){return _i.nullStr}},Ca={identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:function(e){return"t"===e[0]||"T"===e[0]},options:Si,stringify:function(e){return e.value?Si.trueStr:Si.falseStr}},Sa={identify:function(e){return ka(e)&&e>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:function(e,t){return xa(e,t,8)},options:Fi,stringify:function(e){return Aa(e,8,"0o")}},Fa={identify:ka,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:function(e){return xa(e,e,10)},options:Fi,stringify:Hi},_a={identify:function(e){return ka(e)&&e>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:function(e,t){return xa(e,t,16)},options:Fi,stringify:function(e){return Aa(e,16,"0x")}},$a={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(e,t){return t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:Hi},Oa={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:function(e){return parseFloat(e)},stringify:function(e){var t=e.value;return Number(t).toExponential()}},Ba={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve:function(e,t,n){var r=t||n,i=new pi(parseFloat(e));return r&&"0"===r[r.length-1]&&(i.minFractionDigits=r.length),i},stringify:Hi},Na=wa.concat([Ea,Ca,Sa,Fa,_a,$a,Oa,Ba]),Ra=function(e){return"bigint"==typeof e||Number.isInteger(e)},Ta=function(e){var t=e.value;return JSON.stringify(t)},za=[ba,Da,{identify:function(e){return"string"==typeof e},default:!0,tag:"tag:yaml.org,2002:str",resolve:Ki,stringify:Ta},{identify:function(e){return null==e},createNode:function(e,t,n){return n.wrapScalars?new pi(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:function(){return null},stringify:Ta},{identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:function(e){return"true"===e},stringify:Ta},{identify:Ra,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:function(e){return Fi.asBigInt?BigInt(e):parseInt(e,10)},stringify:function(e){var t=e.value;return Ra(t)?t.toString():JSON.stringify(t)}},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:function(e){return parseFloat(e)},stringify:Ta}];za.scalarFallback=function(e){throw new SyntaxError("Unresolved plain scalar ".concat(JSON.stringify(e)))};var Ma=function(e){return e.value?Si.trueStr:Si.falseStr},Ia=function(e){return"bigint"==typeof e||Number.isInteger(e)};function La(e,t,n){var r=t.replace(/_/g,"");if(Fi.asBigInt){switch(n){case 2:r="0b".concat(r);break;case 8:r="0o".concat(r);break;case 16:r="0x".concat(r)}var i=BigInt(r);return"-"===e?BigInt(-1)*i:i}var a=parseInt(r,n);return"-"===e?-1*a:a}function ja(e,t,n){var r=e.value;if(Ia(r)){var i=r.toString(t);return r<0?"-"+n+i.substr(1):n+i}return Hi(e)}var Pa=wa.concat([{identify:function(e){return null==e},createNode:function(e,t,n){return n.wrapScalars?new pi(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:_i,stringify:function(){return _i.nullStr}},{identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:function(){return!0},options:Si,stringify:Ma},{identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:function(){return!1},options:Si,stringify:Ma},{identify:Ia,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:function(e,t,n){return La(t,n,2)},stringify:function(e){return ja(e,2,"0b")}},{identify:Ia,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:function(e,t,n){return La(t,n,8)},stringify:function(e){return ja(e,8,"0")}},{identify:Ia,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:function(e,t,n){return La(t,n,10)},stringify:Hi},{identify:Ia,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:function(e,t,n){return La(t,n,16)},stringify:function(e){return ja(e,16,"0x")}},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(e,t){return t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:Hi},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:function(e){return parseFloat(e.replace(/_/g,""))},stringify:function(e){var t=e.value;return Number(t).toExponential()}},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve:function(e,t){var n=new pi(parseFloat(e.replace(/_/g,"")));if(t){var r=t.replace(/_/g,"");"0"===r[r.length-1]&&(n.minFractionDigits=r.length)}return n},stringify:Hi}],ra,ua,oa,ca,da,pa,ga),qa={core:Na,failsafe:wa,json:za,yaml11:Pa},Ha={binary:ra,bool:Ca,float:Ba,floatExp:Oa,floatNaN:$a,floatTime:pa,int:Fa,intHex:_a,intOct:Sa,intTime:da,map:ba,null:Ea,omap:ua,pairs:oa,seq:Da,set:ca,timestamp:ga};function Ua(e,t,n){if(e instanceof hi)return e;var r=n.defaultPrefix,i=n.onTagObj,a=n.prevObjects,o=n.schema,s=n.wrapScalars;t&&t.startsWith("!!")&&(t=r+t.slice(2));var u=function(e,t,n){if(t){var r=n.filter((function(e){return e.tag===t})),i=r.find((function(e){return!e.format}))||r[0];if(!i)throw new Error("Tag ".concat(t," not found"));return i}return n.find((function(t){return(t.identify&&t.identify(e)||t.class&&e instanceof t.class)&&!t.format}))}(e,t,o.tags);if(!u){if("function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!==Hn(e))return s?new pi(e):e;u=e instanceof Map?ba:e[Symbol.iterator]?Da:ba}i&&(i(u),delete n.onTagObj);var l={value:void 0,node:void 0};if(e&&"object"===Hn(e)&&a){var c=a.get(e);if(c){var f=new ki(c);return n.aliasNodes.push(f),f}l.value=e,a.set(e,l)}return l.node=u.createNode?u.createNode(n.schema,e,n):s?new pi(e):e,t&&l.node instanceof hi&&(l.node.tag=t),l.node}var Wa=function(e,t){return e.keyt.key?1:0},Ya=function(){function e(t){var n=t.customTags,r=t.merge,i=t.schema,a=t.sortMapEntries,o=t.tags;Un(this,e),this.merge=!!r,this.name=i,this.sortMapEntries=!0===a?Wa:a||null,!n&&o&&function(e,t){if(!ya[e]&&ma(!0)){ya[e]=!0;var n="The option '".concat(e,"' will be removed in a future release");va(n+=t?", use '".concat(t,"' instead."):".","DeprecationWarning")}}("tags","customTags"),this.tags=function(e,t,n,r){var i=e[r.replace(/\W/g,"")];if(!i){var a=Object.keys(e).map((function(e){return JSON.stringify(e)})).join(", ");throw new Error('Unknown schema "'.concat(r,'"; use one of ').concat(a))}if(Array.isArray(n)){var o,s=cr(n);try{for(s.s();!(o=s.n()).done;){var u=o.value;i=i.concat(u)}}catch(e){s.e(e)}finally{s.f()}}else"function"==typeof n&&(i=n(i.slice()));for(var l=0;l");var o=t.substr(i.prefix.length).replace(/[!,[\]{}]/g,(function(e){return{"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"}[e]}));return i.handle+o}function Za(e,t,n,r){var i,a=t.doc,o=a.anchors,s=a.schema;if(!(e instanceof hi)){var u={aliasNodes:[],onTagObj:function(e){return i=e},prevObjects:new Map};e=s.createNode(e,!0,null,u);var l,c=cr(u.aliasNodes);try{for(c.s();!(l=c.n()).done;){var f=l.value;f.source=f.source.node;var h=o.getName(f.source);h||(h=o.newName(),o.map[h]=f.source)}}catch(e){c.e(e)}finally{c.f()}}if(e instanceof Di)return e.toString(t,n,r);i||(i=function(e,t){if(t instanceof ki)return ki;if(t.tag){var n=e.filter((function(e){return e.tag===t.tag}));if(n.length>0)return n.find((function(e){return e.format===t.format}))||n[0]}var r,i;if(t instanceof pi){i=t.value;var a=e.filter((function(e){return e.identify&&e.identify(i)||e.class&&i instanceof e.class}));r=a.find((function(e){return e.format===t.format}))||a.find((function(e){return!e.format}))}else i=t,r=e.find((function(e){return e.nodeClass&&i instanceof e.nodeClass}));if(!r){var o=i&&i.constructor?i.constructor.name:Hn(i);throw new Error("Tag not resolved for ".concat(o," value"))}return r}(s.tags,e));var d=function(e,t,n){var r=n.anchors,i=n.doc,a=[],o=i.anchors.getName(e);return o&&(r[o]=e,a.push("&".concat(o))),e.tag?a.push(Ga(i,e.tag)):t.default||a.push(Ga(i,t.tag)),a.join(" ")}(e,i,t);d.length>0&&(t.indentAtStart=(t.indentAtStart||0)+d.length+1);var p="function"==typeof i.stringify?i.stringify(e,t,n,r):e instanceof pi?qi(e,t,n,r):e.toString(t,n,r);return d?e instanceof pi||"{"===p[0]||"["===p[0]?"".concat(d," ").concat(p):"".concat(d,"\n").concat(t.indent).concat(p):p}var Qa=function(){function e(t){Un(this,e),Jn(this,"map",Object.create(null)),this.prefix=t}return Yn(e,[{key:"createAlias",value:function(e,t){return this.setAnchor(e,t),new ki(e)}},{key:"createMergePair",value:function(){for(var e=this,t=new Ei,n=arguments.length,r=new Array(n),i=0;i0&&!e.commentBefore&&(e.commentBefore=r.before.join("\n"),r.before=[]))}}catch(e){o.e(e)}finally{o.f()}if(e.contents=i||null,i){var l=r.before.join("\n");if(l){var c=i instanceof vi&&i.items[0]?i.items[0]:i;c.commentBefore=c.commentBefore?"".concat(l,"\n").concat(c.commentBefore):l}e.comment=r.after.join("\n")||null}else e.comment=r.before.concat(r.after).join("\n")||null}(this,a),this.anchors.resolveNodes(),this.options.prettyErrors){var l,c=cr(this.errors);try{for(c.s();!(l=c.n()).done;){var f=l.value;f instanceof Pr&&f.makePretty()}}catch(e){c.e(e)}finally{c.f()}var h,d=cr(this.warnings);try{for(d.s();!(h=d.n()).done;){var p=h.value;p instanceof Pr&&p.makePretty()}}catch(e){d.e(e)}finally{d.f()}}return this}},{key:"listNonDefaultTags",value:function(){return eo(this.contents).filter((function(e){return 0!==e.indexOf(Ya.defaultPrefix)}))}},{key:"setTagPrefix",value:function(e,t){if("!"!==e[0]||"!"!==e[e.length-1])throw new Error("Handle must start and end with !");if(t){var n=this.tagPrefixes.find((function(t){return t.handle===e}));n?n.prefix=t:this.tagPrefixes.push({handle:e,prefix:t})}else this.tagPrefixes=this.tagPrefixes.filter((function(t){return t.handle!==e}))}},{key:"toJSON",value:function(e,t){var n=this,r=this.options,i=r.keepBlobsInJSON,a=r.mapAsMap,o=r.maxAliasCount,s=i&&("string"!=typeof e||!(this.contents instanceof pi)),u={doc:this,indentStep:" ",keep:s,mapAsMap:s&&!!a,maxAliasCount:o,stringify:Za},l=Object.keys(this.anchors.map);l.length>0&&(u.anchors=new Map(l.map((function(e){return[n.anchors.map[e],{alias:[],aliasCount:0,count:1}]}))));var c=di(this.contents,e,u);if("function"==typeof t&&u.anchors){var f,h=cr(u.anchors.values());try{for(h.s();!(f=h.n()).done;){var d=f.value,p=d.count;t(d.res,p)}}catch(e){h.e(e)}finally{h.f()}}return c}},{key:"toString",value:function(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");var e=this.options.indent;if(!Number.isInteger(e)||e<=0){var t=JSON.stringify(e);throw new Error('"indent" option must be a positive integer, not '.concat(t))}this.setSchema();var n=[],r=!1;if(this.version){var i="%YAML 1.2";"yaml-1.1"===this.schema.name&&("1.0"===this.version?i="%YAML:1.0":"1.1"===this.version&&(i="%YAML 1.1")),n.push(i),r=!0}var a=this.listNonDefaultTags();this.tagPrefixes.forEach((function(e){var t=e.handle,i=e.prefix;a.some((function(e){return 0===e.indexOf(i)}))&&(n.push("%TAG ".concat(t," ").concat(i)),r=!0)})),(r||this.directivesEndMarker)&&n.push("---"),this.commentBefore&&(!r&&this.directivesEndMarker||n.unshift(""),n.unshift(this.commentBefore.replace(/^/gm,"#")));var o={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(e),stringify:Za},s=!1,u=null;if(this.contents){this.contents instanceof hi&&(this.contents.spaceBefore&&(r||this.directivesEndMarker)&&n.push(""),this.contents.commentBefore&&n.push(this.contents.commentBefore.replace(/^/gm,"#")),o.forceBlockIndent=!!this.comment,u=this.contents.comment);var l=u?null:function(){return s=!0},c=Za(this.contents,o,(function(){return u=null}),l);n.push(fi(c,"",u))}else void 0!==this.contents&&n.push(Za(this.contents,o));return this.comment&&(s&&!u||""===n[n.length-1]||n.push(""),n.push(this.comment.replace(/^/gm,"#"))),n.join("\n")+"\n"}}]),e}();Jn(io,"defaults",Va);var ao=function(e){Kn(n,e);var t=nr(n);function n(e){return Un(this,n),t.call(this,Object.assign({},Ja,e))}return n}(io);function oo(e,t){var n=ci(e),r=new ao(t).parse(n[0]);if(n.length>1){r.errors.unshift(new Hr(n[1],"Source contains multiple documents; please use YAML.parseAllDocuments()"))}return r}var so={createNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;void 0===n&&"string"==typeof t&&(n=t,t=!0);var r=Object.assign({},io.defaults[Ja.version],Ja),i=new Ya(r);return i.createNode(e,t,n)},defaultOptions:Ja,Document:ao,parse:function(e,t){var n=oo(e,t);if(n.warnings.forEach((function(e){return va(e)})),n.errors.length>0)throw n.errors[0];return n.toJSON()},parseAllDocuments:function(e,t){var n,r,i=[],a=cr(ci(e));try{for(a.s();!(r=a.n()).done;){var o=r.value,s=new ao(t);s.parse(o,n),i.push(s),n=s}}catch(e){a.e(e)}finally{a.f()}return i},parseCST:ci,parseDocument:oo,scalarOptions:Ka,stringify:function(e,t){var n=new ao(t);return n.contents=e,String(n)}},uo=Bt(Object.freeze({__proto__:null,YAML:so})).YAML;var lo=(e,{include:t,exclude:n}={})=>{const r=e=>{const r=t=>"string"==typeof t?e===t:t.test(e);return t?t.some(r):!n||!n.some(r)};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||!r(n))continue;const i=Reflect.getOwnPropertyDescriptor(t,n);i&&"function"==typeof i.value&&(e[n]=e[n].bind(e))}return e};class co{constructor(e,t,n,r,i,a){if(0===r.length)throw"no answers for question provided";this.text=e,this.explanation=t,this.hint=n,this.solved=!1,this.options=a,this.answers=r,a.shuffle_answers&&(this.answers=co.shuffle(r)),this.type=i,lo(this)}static is_equal(e,t){return JSON.stringify(e)===JSON.stringify(t)}static shuffle(e){let t,n,r=e.length;for(;0!==r;)n=Math.floor(Math.random()*r),r-=1,t=e[r],e[r]=e[n],e[n]=t;return e}reset(){this.selected=[],this.solved=!1,co.shuffle(this.answers)}}class fo extends co{constructor(e,t,n,r,i){i.shuffle_answers=!0,super(e,t,n,r,"Sequence",i)}check(){let e=this.answers.map((e=>e.id));this.solved=co.is_equal(e.sort(),this.selected)}}class ho extends co{constructor(e,t,n,r,i){super(e,t,n,r,"MultipleChoice",i),this.selected=[]}check(){let e=this.answers.map(((e,t)=>t)).filter((e=>this.answers[e].correct));this.solved=co.is_equal(e.sort(),this.selected.sort())}}class po extends co{constructor(e,t,n,r,i){super(e,t,n,r,"SingleChoice",i);let a=this;r.forEach((function(e,t){if(e.correct){if(void 0!==a.correct)throw"Single choice question can only have one answer";a.correct=t}}))}check(){this.solved=this.selected===this.correct}}class go{constructor(e,t,n){this.html=t,this.correct=n,this.id=e,lo(this)}}class mo{constructor(e){this.val=wt(0),this.max=e,this.subscribe=this.val.subscribe,lo(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 vo{constructor(e,t){if(0==e.length)throw"No questions for quiz provided";this.questions=e,this.counter=new mo(this.questions.length),this.finished=wt(!1),this.points=0,this.config=t,t.shuffle_questions&&(this.questions=co.shuffle(e)),lo(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 yo(e,t){return void 0!==e?e:t}class bo{constructor(e){this.start_on_load=yo(e.start_on_load,!0),this.shuffle_answers=yo(e.shuffle_answers,!0),this.shuffle_questions=yo(e.shuffle_questions,!1),this.primary_color=yo(e.primary_color,"steelblue"),this.secondary_color=yo(e.secondary_color,"#f2f2f2"),this.text_color=yo(e.text_color,"black")}}function Do(e,t){let n=new bo(e);for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}Ln.registerLanguage("python",Pn),Ln.registerLanguage("plaintext",qn),Rt.setOptions({highlight:function(e,t){const n=Ln.getLanguage(t)?t:"plaintext";return Ln.highlight(e,{language:n}).value}});const wo={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:uo.parse(t[3],{})}}},ko={paragraph:e=>e,blockquote:e=>e,heading:e=>e};function xo(e){return Tt.sanitize(Rt.parser(e))}function Ao(e,t){let n=Rt.lexer((r=zt(e),(new DOMParser).parseFromString(r,"text/html").documentElement.textContent));var r;let i,a=[],o="",s="",u="",l=!0,c=new bo(t);return n.forEach((function(e,t){if("heading"==e.type&&(s="",u="",o=xo([e]),i=new bo(c),l=!1),"options"==e.type&&(l?c=Do(c,e.data):i=Do(c,e.data)),"paragraph"!=e.type&&"code"!=e.type||(s+=xo([e])),"blockquote"==e.type&&(u+=xo([e])),"list"==e.type){let t=[];e.items.forEach((function(e,n){let r=xo(e.tokens);t.push(new go(n,r,e.checked))})),e.ordered?e.items[0].task?a.push(new po(o,s,u,t,i)):a.push(new fo(o,s,u,t,i)):a.push(new ho(o,s,u,t,i))}})),new vo(a,c)}function Eo(e,t,n){t.innerHTML="";try{let r=Ao(e,n),i=t.attachShadow({mode:"open"});new Ot({target:i,intro:!1,props:{quiz:r}})}catch(e){t.innerHTML=`${e}. App could not render. Please check your quizdown syntax.`}}Rt.use({renderer:ko,tokenizer:wo}),e.create_app=Eo,e.init=function(e={}){let t=new bo(e);t.start_on_load&&"undefined"!=typeof document&&window.addEventListener("load",(function(){let e=document.querySelectorAll(".quizdown");for(let n of e)Eo(n.innerHTML,n,t)}),!1)},Object.defineProperty(e,"__esModule",{value:!0})})); //# sourceMappingURL=quizdown.js.map