@codename/deck 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,32 +1,32 @@
1
- function Be(t){let e=t.replace(/\r\n?/g,`
1
+ function Ze(t){let e=t.replace(/\r\n?/g,`
2
2
  `).split(`
3
- `).map(r=>({indent:r.length-r.trimStart().length,text:cn(r).trimEnd(),raw:r})),s=Te(e,{i:0},0);return s&&typeof s=="object"&&!Array.isArray(s)?s:{}}function cn(t){let e="";for(let n=0;n<t.length;n++){let s=t[n];if(e)s===e&&(e="");else if(s==='"'||s==="'")e=s;else if(s==="#"&&(n===0||/\s/.test(t[n-1])))return t.slice(0,n)}return t}function Te(t,e,n){for(;e.i<t.length&&!t[e.i].text.trim();)e.i++;if(e.i>=t.length||t[e.i].indent<n)return null;let s=t[e.i].indent;if(/^-(\s|$)/.test(t[e.i].text.trim())){let i=[];for(;e.i<t.length;){let l=t[e.i];if(!l.text.trim()){e.i++;continue}if(l.indent!==s||!/^-(\s|$)/.test(l.text.trim()))break;let a=l.text.trim().slice(1).trim();if(e.i++,!a)i.push(Te(t,e,s+1));else if(/^[^'"[{][^:]*:(\s|$)/.test(a)){let o=l.raw.indexOf(a);t.splice(e.i,0,{indent:o,text:" ".repeat(o)+a,raw:" ".repeat(o)+a}),i.push(Te(t,e,o))}else i.push(Re(a))}return i}let r={};for(;e.i<t.length;){let i=t[e.i];if(!i.text.trim()){e.i++;continue}if(i.indent!==s)break;let l=/^("(?:[^"\\]|\\.)*"|'(?:[^']|'')*'|[^:]+?)\s*:(?:\s+(.*))?$/.exec(i.text.trim());if(e.i++,!l)continue;let a=String(Re(l[1])),o=(l[2]??"").trim();o==="|"||o===">"||/^[|>][+-]$/.test(o)?r[a]=pn(t,e,s,o[0]===">"):o?r[a]=Re(o):r[a]=Te(t,e,s+1)}return r}function pn(t,e,n,s){let r=[];for(;e.i<t.length&&(!t[e.i].raw.trim()||t[e.i].indent>n);)r.push(t[e.i++].raw);for(;r.length&&!r.at(-1)?.trim();)r.pop();let i=Math.min(...r.filter(a=>a.trim()).map(a=>a.length-a.trimStart().length)),l=r.map(a=>a.slice(i)).join(`
4
- `);return s?l.replace(/([^\n])\n(?=[^\n])/g,"$1 "):l}function Re(t){let e=t.trim();if(e.startsWith("[")||e.startsWith("{")){let n=$t(e,{i:0});if(n!==void 0)return n}if(/^"(?:[^"\\]|\\.)*"$/.test(e))try{return JSON.parse(e)}catch{return e.slice(1,-1)}return/^'(?:[^']|'')*'$/.test(e)?e.slice(1,-1).replace(/''/g,"'"):/^(true|yes|on)$/i.test(e)?!0:/^(false|no|off)$/i.test(e)?!1:/^(null|~)$/i.test(e)||e===""?null:/^[-+]?(\d+\.?\d*|\.\d+)(e[-+]?\d+)?$/i.test(e)?Number(e):e}function $t(t,e){let n=()=>{for(;/\s/.test(t[e.i]??"");)e.i++},s=()=>{if(n(),t[e.i]==="["||t[e.i]==="{")return $t(t,e);let l=e.i;if(t[e.i]==='"'||t[e.i]==="'"){let a=t[e.i++];for(;e.i<t.length&&!(t[e.i]===a&&t[e.i-1]!=="\\");)e.i++;e.i++}else for(;e.i<t.length&&!/[,\]}]/.test(t[e.i])&&!(t[e.i]===":"&&/^[\s,\]}]?$/.test(t[e.i+1]??""));)e.i++;return Re(t.slice(l,e.i))},r=t[e.i++];if(n(),r==="["){let l=[];for(;e.i<t.length&&t[e.i]!=="]";){if(l.push(s()),n(),t[e.i]===",")e.i++;else if(t[e.i]!=="]")return;n()}return e.i++,l}let i={};for(;e.i<t.length&&t[e.i]!=="}";){let l=s();if(n(),t[e.i]!==":")return;if(e.i++,i[String(l)]=s(),n(),t[e.i]===",")e.i++;else if(t[e.i]!=="}")return;n()}return e.i++,i}var un=/^::([\w-]+)::\s*$/;function Ee(t){let n=t.replace(/\r\n?/g,`
3
+ `).map(r=>({indent:r.length-r.trimStart().length,text:un(r).trimEnd(),raw:r})),s=Ee(e,{i:0},0);return s&&typeof s=="object"&&!Array.isArray(s)?s:{}}function un(t){let e="";for(let n=0;n<t.length;n++){let s=t[n];if(e)s===e&&(e="");else if(s==='"'||s==="'")e=s;else if(s==="#"&&(n===0||/\s/.test(t[n-1])))return t.slice(0,n)}return t}function Ee(t,e,n){for(;e.i<t.length&&!t[e.i].text.trim();)e.i++;if(e.i>=t.length||t[e.i].indent<n)return null;let s=t[e.i].indent;if(/^-(\s|$)/.test(t[e.i].text.trim())){let i=[];for(;e.i<t.length;){let l=t[e.i];if(!l.text.trim()){e.i++;continue}if(l.indent!==s||!/^-(\s|$)/.test(l.text.trim()))break;let a=l.text.trim().slice(1).trim();if(e.i++,!a)i.push(Ee(t,e,s+1));else if(/^[^'"[{][^:]*:(\s|$)/.test(a)){let o=l.raw.indexOf(a);t.splice(e.i,0,{indent:o,text:" ".repeat(o)+a,raw:" ".repeat(o)+a}),i.push(Ee(t,e,o))}else i.push(Pe(a))}return i}let r={};for(;e.i<t.length;){let i=t[e.i];if(!i.text.trim()){e.i++;continue}if(i.indent!==s)break;let l=/^("(?:[^"\\]|\\.)*"|'(?:[^']|'')*'|[^:]+?)\s*:(?:\s+(.*))?$/.exec(i.text.trim());if(e.i++,!l)continue;let a=String(Pe(l[1])),o=(l[2]??"").trim();o==="|"||o===">"||/^[|>][+-]$/.test(o)?r[a]=dn(t,e,s,o[0]===">"):o?r[a]=Pe(o):r[a]=Ee(t,e,s+1)}return r}function dn(t,e,n,s){let r=[];for(;e.i<t.length&&(!t[e.i].raw.trim()||t[e.i].indent>n);)r.push(t[e.i++].raw);for(;r.length&&!r.at(-1)?.trim();)r.pop();let i=Math.min(...r.filter(a=>a.trim()).map(a=>a.length-a.trimStart().length)),l=r.map(a=>a.slice(i)).join(`
4
+ `);return s?l.replace(/([^\n])\n(?=[^\n])/g,"$1 "):l}function Pe(t){let e=t.trim();if(e.startsWith("[")||e.startsWith("{")){let n=At(e,{i:0});if(n!==void 0)return n}if(/^"(?:[^"\\]|\\.)*"$/.test(e))try{return JSON.parse(e)}catch{return e.slice(1,-1)}return/^'(?:[^']|'')*'$/.test(e)?e.slice(1,-1).replace(/''/g,"'"):/^(true|yes|on)$/i.test(e)?!0:/^(false|no|off)$/i.test(e)?!1:/^(null|~)$/i.test(e)||e===""?null:/^[-+]?(\d+\.?\d*|\.\d+)(e[-+]?\d+)?$/i.test(e)?Number(e):e}function At(t,e){let n=()=>{for(;/\s/.test(t[e.i]??"");)e.i++},s=()=>{if(n(),t[e.i]==="["||t[e.i]==="{")return At(t,e);let l=e.i;if(t[e.i]==='"'||t[e.i]==="'"){let a=t[e.i++];for(;e.i<t.length&&!(t[e.i]===a&&t[e.i-1]!=="\\");)e.i++;e.i++}else for(;e.i<t.length&&!/[,\]}]/.test(t[e.i])&&!(t[e.i]===":"&&/^[\s,\]}]?$/.test(t[e.i+1]??""));)e.i++;return Pe(t.slice(l,e.i))},r=t[e.i++];if(n(),r==="["){let l=[];for(;e.i<t.length&&t[e.i]!=="]";){if(l.push(s()),n(),t[e.i]===",")e.i++;else if(t[e.i]!=="]")return;n()}return e.i++,l}let i={};for(;e.i<t.length&&t[e.i]!=="}";){let l=s();if(n(),t[e.i]!==":")return;if(e.i++,i[String(l)]=s(),n(),t[e.i]===",")e.i++;else if(t[e.i]!=="}")return;n()}return e.i++,i}var hn=/^::([\w-]+)::\s*$/;function ze(t){let n=t.replace(/\r\n?/g,`
5
5
  `).split(`
6
- `),s=[0];for(let u of n)s.push(s.at(-1)+u.length+1);let r=[],i=0,l=null,a=!1;for(let u=0;u<n.length;u++){let c=n[u].trimEnd();if(a){a=At(c,!0);continue}if(c.startsWith("---")&&!/^---\s*-/.test(c)){if((u>i||l)&&r.push({start:i,end:u,matter:l}),l=null,i=u+1,c[3]!=="-"&&n[u+1]?.trim()&&/^\s*([\w-]+\s*:|#\s)/.test(n[u+1])&&!/^#{1,6}\s/.test(n[u+1])){let h=u+1;for(;h<n.length&&n[h].trimEnd()!=="---";)h++;l=[u+1,h],u=h,i=h+1}}else if(/^\s*(`{3,}|~{3,})/.test(c)){let h=/^\s*(`{3,}|~{3,})/.exec(c)[1],d=u+1;for(;d<n.length&&!n[d].trimStart().startsWith(h);)d++;d<n.length&&(u=d)}else a=At(c,!1)}(i<n.length||l)&&r.push({start:i,end:n.length,matter:l});let o=r.at(-1);if(r.length===1&&o){let u="",c=[];for(let h=o.start;h<o.end;h++){let d=/^\s*(`{3,}|~{3,})/.exec(n[h])?.[1];u?d&&n[h].trimStart().startsWith(u)&&(u=""):d?u=d:/^#{1,2}\s+\S/.test(n[h])&&c.push(h)}if(c.length>=2){r.pop();let h=c[0]>o.start&&!n.slice(o.start,c[0]).some(d=>d.trim())?c:[o.start,...c.slice(c[0]===o.start?1:0)];h.forEach((d,f)=>r.push({start:f===0?o.start:d,end:h[f+1]??o.end,matter:f===0?o.matter:null}))}}let p=r.map(({start:u,end:c,matter:h},d)=>dn(n,s,u,c,h,d)).filter((u,c)=>c===0||u.slots.some(h=>h.text.trim())||Object.keys(u.settings).length);return p.forEach((u,c)=>{u.index=c}),{settings:p[0]?.settings??{},slides:p}}function hn(t){let e=new Map,n=t.findIndex(a=>/^:{3,}[ \t]*\{?[ \t]*\.?columns\b/.test(a));if(n<0)return e;let s=/^:+/.exec(t[n])[0],r=t.findIndex((a,o)=>o>n&&a.trim()===s),i=t.map((a,o)=>[a,o]).filter(([a,o])=>Number(o)>n&&(r<0||Number(o)<r)&&/^:{3,}[ \t]*\{?[ \t]*\.?col(umn)?\b/.test(String(a))).map(([,a])=>Number(a));if(i.length<2)return e;let l=i.length===2?["left","right"]:["left","middle","right",...i.slice(3).map((a,o)=>`col-${o+4}`)];return i.forEach((a,o)=>e.set(a,l[o])),r>0&&t.slice(r+1).some(a=>a.trim())&&e.set(r,"bottom"),e}function At(t,e){let n=0;for(;;)if(e){let s=t.indexOf("-->",n);if(s<0)return!0;e=!1,n=s+3}else{let s=t.indexOf("<!--",n);if(s<0)return!1;let r=t.indexOf("-->",s+4);if(r<0)return!0;n=r+3}}function dn(t,e,n,s,r,i){let l=r?Be(t.slice(r[0],r[1]).join(`
7
- `)):{},a=n;for(;a<s&&!t[a].trim();)a++;if(!r&&/^```ya?ml\s*$/.test(t[a]??"")){let P=a+1;for(;P<s&&!t[P].startsWith("```");)P++;l=Be(t.slice(a+1,P).join(`
8
- `)),n=P+1}let o=t.slice(n,s).join(`
6
+ `),s=[0];for(let u of n)s.push(s.at(-1)+u.length+1);let r=[],i=0,l=null,a=!1;for(let u=0;u<n.length;u++){let c=n[u].trimEnd();if(a){a=Ct(c,!0);continue}if(c.startsWith("---")&&!/^---\s*-/.test(c)){if((u>i||l)&&r.push({start:i,end:u,matter:l}),l=null,i=u+1,c[3]!=="-"&&n[u+1]?.trim()&&/^\s*([\w-]+\s*:|#\s)/.test(n[u+1])&&!/^#{1,6}\s/.test(n[u+1])){let d=u+1;for(;d<n.length&&n[d].trimEnd()!=="---";)d++;l=[u+1,d],u=d,i=d+1}}else if(/^\s*(`{3,}|~{3,})/.test(c)){let d=/^\s*(`{3,}|~{3,})/.exec(c)[1],f=u+1;for(;f<n.length&&!n[f].trimStart().startsWith(d);)f++;f<n.length&&(u=f)}else a=Ct(c,!1)}(i<n.length||l)&&r.push({start:i,end:n.length,matter:l});let o=r.at(-1);if(r.length===1&&o){let u="",c=[];for(let d=o.start;d<o.end;d++){let f=/^\s*(`{3,}|~{3,})/.exec(n[d])?.[1];u?f&&n[d].trimStart().startsWith(u)&&(u=""):f?u=f:/^#{1,2}\s+\S/.test(n[d])&&c.push(d)}if(c.length>=2){r.pop();let d=c[0]>o.start&&!n.slice(o.start,c[0]).some(f=>f.trim())?c:[o.start,...c.slice(c[0]===o.start?1:0)];d.forEach((f,h)=>r.push({start:h===0?o.start:f,end:d[h+1]??o.end,matter:h===0?o.matter:null}))}}let p=r.map(({start:u,end:c,matter:d},f)=>gn(n,s,u,c,d,f)).filter((u,c)=>c===0||u.slots.some(d=>d.text.trim())||Object.keys(u.settings).length);return p.forEach((u,c)=>{u.index=c}),{settings:p[0]?.settings??{},slides:p}}function fn(t){let e=new Map,n=t.findIndex(a=>/^:{3,}[ \t]*\{?[ \t]*\.?columns\b/.test(a));if(n<0)return e;let s=/^:+/.exec(t[n])[0],r=t.findIndex((a,o)=>o>n&&a.trim()===s),i=t.map((a,o)=>[a,o]).filter(([a,o])=>Number(o)>n&&(r<0||Number(o)<r)&&/^:{3,}[ \t]*\{?[ \t]*\.?col(umn)?\b/.test(String(a))).map(([,a])=>Number(a));if(i.length<2)return e;let l=i.length===2?["left","right"]:["left","middle","right",...i.slice(3).map((a,o)=>`col-${o+4}`)];return i.forEach((a,o)=>e.set(a,l[o])),r>0&&t.slice(r+1).some(a=>a.trim())&&e.set(r,"bottom"),e}function Ct(t,e){let n=0;for(;;)if(e){let s=t.indexOf("-->",n);if(s<0)return!0;e=!1,n=s+3}else{let s=t.indexOf("<!--",n);if(s<0)return!1;let r=t.indexOf("-->",s+4);if(r<0)return!0;n=r+3}}function gn(t,e,n,s,r,i){let l=r?Ze(t.slice(r[0],r[1]).join(`
7
+ `)):{},a=n;for(;a<s&&!t[a].trim();)a++;if(!r&&/^```ya?ml\s*$/.test(t[a]??"")){let E=a+1;for(;E<s&&!t[E].startsWith("```");)E++;l=Ze(t.slice(a+1,E).join(`
8
+ `)),n=E+1}let o=t.slice(n,s).join(`
9
9
  `),p="",u=/^(\?\?\?|Notes?:)[ \t]*(.*)$/m.exec(o);u&&u.index!==void 0&&!/^```/m.test(o.slice(u.index))&&(p=[u[2],o.slice(u.index+u[0].length)].join(`
10
- `).trim(),o=o.slice(0,u.index)),o=o.replace(/<aside\b[^>]*class=["']?notes["']?[^>]*>([\s\S]*?)<\/aside>/gi,(P,T)=>(p+=(p?`
11
- `:"")+T.replace(/<[^>]*>/g," ").replace(/[ \t]+/g," ").trim(),P.replace(/[^\n]/g," "))),o=o.replace(/^(:{3,})[ \t]*\{?[ \t]*\.?notes[ \t]*\}?[ \t]*\n([\s\S]*?)\n\1[ \t]*$/gm,(P,T,F)=>(p+=(p?`
12
- `:"")+F.trim(),P.replace(/[^\n]/g," ")));let h=[...o.matchAll(/<!--([\s\S]*?)-->/g)].at(-1);h&&h.index!==void 0&&!o.slice(h.index+h[0].length).trim()&&(p=[h[1].trim(),p].filter(Boolean).join(`
13
- `),o=o.slice(0,h.index));let d=[],f="default",k=n,m="",w=[],y=()=>d.push({name:f,text:w.join(`
14
- `),start:e[k]}),O=hn(o.split(`
15
- `));for(let[P,T]of o.split(`
16
- `).entries()){let F=/^\s*(`{3,}|~{3,})/.exec(T)?.[1],X=un.exec(T)??(O.has(P)?[T,O.get(P)]:null);if(m)F&&T.trimStart().startsWith(m)&&(m="");else if(F)m=F;else if(X){y(),f=X[1],w=[],k=n+P+1;continue}w.push(T)}y();let U=d.filter((P,T)=>T>0||P.text.trim()||d.length===1),N=/^#{1,6}\s+(.+)$/m.exec(o.replace(/^```[\s\S]*?^```/gm,""));return{index:i,start:e[r?r[0]-1:n],end:e[s]-1,settings:l,slots:U,notes:p,title:String(l.title??N?.[1]??"").trim()}}var vt=/^[a-z][a-z0-9-]{0,31}$/,fn=/^(auto|min-content|max-content|\d{1,2}(\.\d)?fr|\d{1,3}%)$/,gn=["Title Slide","Title and Content","Section Header","Two Content","Comparison","Title Only","Blank","Content with Caption","Picture with Caption"],Ct={align:["start","center","end"],justify:["start","center","end"],paper:["paper","fill","ink","soft"],title:["normal","large","huge"]},Fe={title:"cover","title-slide":"cover","two-columns":"two-cols","two-column":"two-cols",columns:"two-cols",comparison:"two-cols-header","three-columns":"three-cols","section-header":"section",divider:"section",big:"fact",number:"fact","image-text":"image-right",closing:"end",thanks:"end"},Pe={name:"standard",tokens:{},layouts:Object.fromEntries(Object.entries({default:{label:{en:"Title and content",fr:"Titre et contenu"},pptx:"Title and Content"},cover:{label:{en:"Cover",fr:"Couverture"},justify:"center",paper:"fill",title:"huge",pptx:"Title Slide",numbered:!1},intro:{label:{en:"Introduction",fr:"Introduction"},justify:"center",paper:"fill",title:"large",pptx:"Title Slide",numbered:!1},section:{label:{en:"Section",fr:"Section"},justify:"center",paper:"ink",title:"huge",pptx:"Section Header",numbered:!1},center:{label:{en:"Centred",fr:"Centré"},justify:"center",align:"center",pptx:"Title Only"},statement:{label:{en:"Statement",fr:"Affirmation"},justify:"center",align:"center",title:"large",pptx:"Title Only"},fact:{label:{en:"Big number",fr:"Grand chiffre"},justify:"center",align:"center",title:"huge",pptx:"Title Only"},quote:{label:{en:"Quote",fr:"Citation"},justify:"center",pptx:"Title Only"},end:{label:{en:"Closing",fr:"Clôture"},justify:"center",align:"center",paper:"fill",title:"large",pptx:"Title Slide",numbered:!1},full:{label:{en:"Full",fr:"Plein cadre"},pptx:"Blank",numbered:!1},none:{label:{en:"Blank",fr:"Vide"},pptx:"Blank",numbered:!1},"two-cols":{label:{en:"Two columns",fr:"Deux colonnes"},slots:["default","right"],areas:"default right",columns:"1fr 1fr",pptx:"Two Content"},"two-cols-header":{label:{en:"Comparison",fr:"Comparaison"},slots:["default","left","right","bottom"],areas:"default default | left right | bottom bottom",columns:"1fr 1fr",rows:"auto 1fr auto",pptx:"Comparison"},"three-cols":{label:{en:"Three columns",fr:"Trois colonnes"},slots:["default","left","middle","right"],areas:"default default default | left middle right",columns:"1fr 1fr 1fr",rows:"auto 1fr",pptx:"Comparison"},"image-left":{label:{en:"Picture left",fr:"Image à gauche"},pptx:"Picture with Caption",justify:"center"},"image-right":{label:{en:"Picture right",fr:"Image à droite"},pptx:"Picture with Caption",justify:"center"},image:{label:{en:"Picture",fr:"Image"},pptx:"Blank",numbered:!1}}).map(([t,e])=>[t,Ze(e).layout]))};function Ze(t){let e=[];if(!t||typeof t!="object")return{layout:null,problems:["not a layout"]};let n={},s=Array.isArray(t.slots)||typeof t.slots=="string"?[t.slots].flat().map(String):t.slots&&typeof t.slots=="object"?Object.entries(t.slots).map(([f,k])=>(k&&typeof k=="object"&&(n[f]=mn(k)),f==="title"?"default":f)):["default"],r=[...new Set(s)];if(!r.every(f=>vt.test(f)))return{layout:null,problems:["a slot name is not a-z, 0-9 and -"]};r.includes("default")||r.unshift("default");let l=(Array.isArray(t.areas)?t.areas.map(f=>[f].flat().join(" ")):String(t.areas??r.join(" ")).split(/\||\n/)).map(f=>f.trim().replace(/^"|"$/g,"").split(/\s+/)).filter(f=>f.length&&f[0]),a=l[0]?.length??0;if(!l.length||l.some(f=>f.length!==a)||l.flat().some(f=>f!=="."&&!r.includes(f)))return{layout:null,problems:["areas are not a rectangle of its slots"]};for(let f of r){let k=l.flatMap((y,O)=>y.map((U,N)=>[U,N,O])).filter(([y])=>y===f);if(!k.length){f!=="default"&&e.push(`slot ${f} has no area`);continue}let m=k.map(y=>y[1]),w=k.map(y=>y[2]);if(k.length!==(Math.max(...m)-Math.min(...m)+1)*(Math.max(...w)-Math.min(...w)+1))return{layout:null,problems:[`slot ${f} is not a rectangle`]}}let o=(f,k)=>{let m=f===void 0?Array(k).fill("1fr"):(Array.isArray(f)?f:String(f).split(/\s+/)).map(String);return m.length===k&&m.every(w=>fn.test(w))?m:null},p=o(t.columns,a),u=o(t.rows,l.length);if(!p||!u)return{layout:null,problems:["columns or rows are not tracks deck knows (auto, 1fr, 40%…), one per column or row"]};let c=(f,k)=>{let m=String(t[f]??k);return Ct[f].includes(m)?m:(e.push(`${f} ${m} is not one of ${Ct[f].join(", ")}`),k)},h=typeof t.label=="string"||t.label&&typeof t.label=="object"?t.label:void 0,d=f=>typeof f=="string"?f.slice(0,300):void 0;return{layout:{label:h,intent:d(t.intent),use_when:d(t.use_when),avoid_when:d(t.avoid_when),slots:r,budgets:n,areas:l,columns:p,rows:u,align:c("align","start"),justify:c("justify","start"),paper:c("paper","paper"),title:c("title","normal"),pptx:gn.includes(t.pptx)?t.pptx:r.length>1?"Comparison":"Title and Content",numbered:t.numbered!==!1},problems:e}}function mn(t){let e={};for(let n of["max_words","max_chars","item_max_words","heading_max_words"])Number.isInteger(t[n])&&t[n]>0&&(e[n]=t[n]);return Array.isArray(t.items)&&t.items.length===2&&t.items.every(Number.isInteger)&&(e.items=t.items),typeof t.required=="boolean"&&(e.required=t.required),typeof t.kind=="string"&&/^[a-z-]{1,20}$/.test(t.kind)&&(e.kind=t.kind),e}function Tt(t){if(!t||typeof t!="object")return{};if(!JSON.stringify(t).includes('"$value"'))return t;let e=h=>h&&typeof h=="object"&&"$value"in h?h.$value:h,n=h=>{let d=e(h);return typeof d=="string"?d:typeof d?.hex=="string"?d.hex:void 0},s=h=>{let d=e(h);return Array.isArray(d)?d.map(String):typeof d=="string"?[d]:void 0},r={bg:"paper",background:"paper",paper:"paper",fg:"ink",text:"ink",ink:"ink",accent:"primary",primary:"primary",muted:"muted",surface:"soft",soft:"soft"},i=h=>Object.fromEntries(Object.entries(h??{}).filter(([d])=>d in r).map(([d,f])=>[r[d],n(f)]).filter(([,d])=>d)),l=t.color??t.colour??{},a={...i(l),...i(l.light)},o=i(l.dark);Object.keys(o).length&&(a.dark=o);let p=t.font??t.fontFamily??{},u=s(p.heading??p.display??p.sans),c=s(p.body??p.text??p.sans);return(u||c)&&(a.fonts={heading:u??c,body:c??u}),a}function ze(...t){let e={name:"standard",tokens:{},layouts:{...Pe.layouts}},n=[];for(let s of t)if(!(!s||typeof s!="object")){typeof s.name=="string"&&(e.name=s.name),s.tokens&&typeof s.tokens=="object"&&(e.tokens={...e.tokens,...Tt(s.tokens)});for(let[r,i]of Object.entries(s.layouts??s.types??{})){if(!vt.test(r)){n.push(`layout ${r}: not a-z, 0-9 and -`);continue}let{layout:l,problems:a}=Ze(i);n.push(...a.map(o=>`layout ${r}: ${o}`)),l&&(e.layouts[r]=l)}}return{kit:e,problems:n}}function He(t,e,n){return typeof t.label=="string"?t.label:t.label?.[n]??t.label?.[n.split("-")[0]]??t.label?.en??e}function Ue(t){let e=t.slots.map(r=>r.name);if(e.includes("middle"))return"three-cols";if(e.includes("left"))return"two-cols-header";if(e.includes("right"))return"two-cols";if(t.index===0)return"cover";let s=t.slots.map(r=>r.text).join(`
10
+ `).trim(),o=o.slice(0,u.index)),o=o.replace(/<aside\b[^>]*class=["']?notes["']?[^>]*>([\s\S]*?)<\/aside>/gi,(E,T)=>(p+=(p?`
11
+ `:"")+T.replace(/<[^>]*>/g," ").replace(/[ \t]+/g," ").trim(),E.replace(/[^\n]/g," "))),o=o.replace(/^(:{3,})[ \t]*\{?[ \t]*\.?notes[ \t]*\}?[ \t]*\n([\s\S]*?)\n\1[ \t]*$/gm,(E,T,Z)=>(p+=(p?`
12
+ `:"")+Z.trim(),E.replace(/[^\n]/g," ")));let d=[...o.matchAll(/<!--([\s\S]*?)-->/g)].at(-1);d&&d.index!==void 0&&!o.slice(d.index+d[0].length).trim()&&(p=[d[1].trim(),p].filter(Boolean).join(`
13
+ `),o=o.slice(0,d.index));let f=[],h="default",k=n,g="",x=[],w=()=>f.push({name:h,text:x.join(`
14
+ `),start:e[k]}),j=fn(o.split(`
15
+ `));for(let[E,T]of o.split(`
16
+ `).entries()){let Z=/^\s*(`{3,}|~{3,})/.exec(T)?.[1],K=hn.exec(T)??(j.has(E)?[T,j.get(E)]:null);if(g)Z&&T.trimStart().startsWith(g)&&(g="");else if(Z)g=Z;else if(K){w(),h=K[1],x=[],k=n+E+1;continue}x.push(T)}w();let H=f.filter((E,T)=>T>0||E.text.trim()||f.length===1),q=/^#{1,6}\s+(.+)$/m.exec(o.replace(/^```[\s\S]*?^```/gm,""));return{index:i,start:e[r?r[0]-1:n],end:e[s]-1,settings:l,slots:H,notes:p,title:String(l.title??q?.[1]??"").trim()}}var Tt=/^[a-z][a-z0-9-]{0,31}$/,mn=/^(auto|min-content|max-content|\d{1,2}(\.\d)?fr|\d{1,3}%)$/,kn=["Title Slide","Title and Content","Section Header","Two Content","Comparison","Title Only","Blank","Content with Caption","Picture with Caption"],Rt={align:["start","center","end"],justify:["start","center","end"],paper:["paper","fill","ink","soft"],title:["normal","large","huge"],logo:["small","big","none"]},fe=["top-end","top-start","bottom-end","bottom-start"],vt=t=>typeof t=="string"&&t.length<=7e5&&/^data:image\/(png|jpeg|gif|webp|svg\+xml);base64,[a-z0-9+/]+=*$/i.test(t)?t:null,He={title:"cover","title-slide":"cover","two-columns":"two-cols","two-column":"two-cols",columns:"two-cols",comparison:"two-cols-header","three-columns":"three-cols","section-header":"section",divider:"section",big:"fact",number:"fact","image-text":"image-right",closing:"end",thanks:"end"},Le={name:"standard",tokens:{},layouts:Object.fromEntries(Object.entries({default:{label:{en:"Title and content",fr:"Titre et contenu"},pptx:"Title and Content"},cover:{label:{en:"Cover",fr:"Couverture"},justify:"center",paper:"fill",title:"huge",logo:"big",pptx:"Title Slide",numbered:!1},intro:{label:{en:"Introduction",fr:"Introduction"},justify:"center",paper:"fill",title:"large",logo:"big",pptx:"Title Slide",numbered:!1},section:{label:{en:"Section",fr:"Section"},justify:"center",paper:"ink",title:"huge",pptx:"Section Header",numbered:!1},center:{label:{en:"Centred",fr:"Centré"},justify:"center",align:"center",pptx:"Title Only"},statement:{label:{en:"Statement",fr:"Affirmation"},justify:"center",align:"center",title:"large",pptx:"Title Only"},fact:{label:{en:"Big number",fr:"Grand chiffre"},justify:"center",align:"center",title:"huge",pptx:"Title Only"},quote:{label:{en:"Quote",fr:"Citation"},justify:"center",pptx:"Title Only"},end:{label:{en:"Closing",fr:"Clôture"},justify:"center",align:"center",paper:"fill",title:"large",logo:"big",pptx:"Title Slide",numbered:!1},full:{label:{en:"Full",fr:"Plein cadre"},logo:"none",pptx:"Blank",numbered:!1},none:{label:{en:"Blank",fr:"Vide"},logo:"none",pptx:"Blank",numbered:!1},"two-cols":{label:{en:"Two columns",fr:"Deux colonnes"},slots:["default","right"],areas:"default right",columns:"1fr 1fr",pptx:"Two Content"},"two-cols-header":{label:{en:"Comparison",fr:"Comparaison"},slots:["default","left","right","bottom"],areas:"default default | left right | bottom bottom",columns:"1fr 1fr",rows:"auto 1fr auto",pptx:"Comparison"},"three-cols":{label:{en:"Three columns",fr:"Trois colonnes"},slots:["default","left","middle","right"],areas:"default default default | left middle right",columns:"1fr 1fr 1fr",rows:"auto 1fr",pptx:"Comparison"},"image-left":{label:{en:"Picture left",fr:"Image à gauche"},pptx:"Picture with Caption",justify:"center"},"image-right":{label:{en:"Picture right",fr:"Image à droite"},pptx:"Picture with Caption",justify:"center"},image:{label:{en:"Picture",fr:"Image"},logo:"none",pptx:"Blank",numbered:!1}}).map(([t,e])=>[t,We(e).layout]))};function We(t){let e=[];if(!t||typeof t!="object")return{layout:null,problems:["not a layout"]};let n={},s=Array.isArray(t.slots)||typeof t.slots=="string"?[t.slots].flat().map(String):t.slots&&typeof t.slots=="object"?Object.entries(t.slots).map(([h,k])=>(k&&typeof k=="object"&&(n[h]=bn(k)),h==="title"?"default":h)):["default"],r=[...new Set(s)];if(!r.every(h=>Tt.test(h)))return{layout:null,problems:["a slot name is not a-z, 0-9 and -"]};r.includes("default")||r.unshift("default");let l=(Array.isArray(t.areas)?t.areas.map(h=>[h].flat().join(" ")):String(t.areas??r.join(" ")).split(/\||\n/)).map(h=>h.trim().replace(/^"|"$/g,"").split(/\s+/)).filter(h=>h.length&&h[0]),a=l[0]?.length??0;if(!l.length||l.some(h=>h.length!==a)||l.flat().some(h=>h!=="."&&!r.includes(h)))return{layout:null,problems:["areas are not a rectangle of its slots"]};for(let h of r){let k=l.flatMap((w,j)=>w.map((H,q)=>[H,q,j])).filter(([w])=>w===h);if(!k.length){h!=="default"&&e.push(`slot ${h} has no area`);continue}let g=k.map(w=>w[1]),x=k.map(w=>w[2]);if(k.length!==(Math.max(...g)-Math.min(...g)+1)*(Math.max(...x)-Math.min(...x)+1))return{layout:null,problems:[`slot ${h} is not a rectangle`]}}let o=(h,k)=>{let g=h===void 0?Array(k).fill("1fr"):(Array.isArray(h)?h:String(h).split(/\s+/)).map(String);return g.length===k&&g.every(x=>mn.test(x))?g:null},p=o(t.columns,a),u=o(t.rows,l.length);if(!p||!u)return{layout:null,problems:["columns or rows are not tracks deck knows (auto, 1fr, 40%…), one per column or row"]};let c=(h,k)=>{let g=String(t[h]??k);return Rt[h].includes(g)?g:(e.push(`${h} ${g} is not one of ${Rt[h].join(", ")}`),k)},d=typeof t.label=="string"||t.label&&typeof t.label=="object"?t.label:void 0,f=h=>typeof h=="string"?h.slice(0,300):void 0;return{layout:{label:d,intent:f(t.intent),use_when:f(t.use_when),avoid_when:f(t.avoid_when),slots:r,budgets:n,areas:l,columns:p,rows:u,align:c("align","start"),justify:c("justify","start"),paper:c("paper","paper"),title:c("title","normal"),logo:c("logo","small"),pptx:kn.includes(t.pptx)?t.pptx:r.length>1?"Comparison":"Title and Content",numbered:t.numbered!==!1},problems:e}}function bn(t){let e={};for(let n of["max_words","max_chars","item_max_words","heading_max_words"])Number.isInteger(t[n])&&t[n]>0&&(e[n]=t[n]);return Array.isArray(t.items)&&t.items.length===2&&t.items.every(Number.isInteger)&&(e.items=t.items),typeof t.required=="boolean"&&(e.required=t.required),typeof t.kind=="string"&&/^[a-z-]{1,20}$/.test(t.kind)&&(e.kind=t.kind),e}function Et(t){if(!t||typeof t!="object")return{};if(!JSON.stringify(t).includes('"$value"'))return t;let e=d=>d&&typeof d=="object"&&"$value"in d?d.$value:d,n=d=>{let f=e(d);return typeof f=="string"?f:typeof f?.hex=="string"?f.hex:void 0},s=d=>{let f=e(d);return Array.isArray(f)?f.map(String):typeof f=="string"?[f]:void 0},r={bg:"paper",background:"paper",paper:"paper",fg:"ink",text:"ink",ink:"ink",accent:"primary",primary:"primary",muted:"muted",surface:"soft",soft:"soft"},i=d=>Object.fromEntries(Object.entries(d??{}).filter(([f])=>f in r).map(([f,h])=>[r[f],n(h)]).filter(([,f])=>f)),l=t.color??t.colour??{},a={...i(l),...i(l.light)},o=i(l.dark);Object.keys(o).length&&(a.dark=o);let p=t.font??t.fontFamily??{},u=s(p.heading??p.display??p.sans),c=s(p.body??p.text??p.sans);return(u||c)&&(a.fonts={heading:u??c,body:c??u}),a}function Oe(...t){let e={name:"standard",tokens:{},layouts:{...Le.layouts}},n=[];for(let s of t)if(!(!s||typeof s!="object")){if(typeof s.name=="string"&&(e.name=s.name),s.tokens&&typeof s.tokens=="object"){let r=Et(s.tokens),i=r.dark&&typeof r.dark=="object"?{...e.tokens.dark,...r.dark}:e.tokens.dark;e.tokens={...e.tokens,...r,...i&&{dark:i}}}for(let[r,i]of Object.entries(s.layouts??s.types??{})){if(!Tt.test(r)){n.push(`layout ${r}: not a-z, 0-9 and -`);continue}if(i===!1){r!=="default"&&delete e.layouts[r];continue}let{layout:l,problems:a}=We(i);n.push(...a.map(o=>`layout ${r}: ${o}`)),l&&(e.layouts[r]=l)}}for(let[s,r]of[["logo",e.tokens],["dark logo",e.tokens.dark]])r?.logo!==void 0&&!vt(r.logo)&&(n.push(`${s}: not a picture inside the kit (PNG, JPEG, GIF, WebP or SVG as data:, 512 KB at most)`),delete r.logo);return e.tokens.logoAt!==void 0&&!fe.includes(e.tokens.logoAt)&&(n.push(`logoAt ${e.tokens.logoAt} is not one of ${fe.join(", ")}`),delete e.tokens.logoAt),{kit:e,problems:n}}function Ue(t,e,n){return typeof t.label=="string"?t.label:t.label?.[n]??t.label?.[n.split("-")[0]]??t.label?.en??e}function Ge(t){let e=t.slots.map(r=>r.name);if(e.includes("middle"))return"three-cols";if(e.includes("left"))return"two-cols-header";if(e.includes("right"))return"two-cols";if(t.index===0)return"cover";let s=t.slots.map(r=>r.text).join(`
17
17
  `).trim().split(`
18
18
  `).filter(r=>r.trim());return s.length===1&&/^#{1,2}\s+\S/.test(s[0])?"section":/^#\s+[^\s]*\d[\d\s.,%€$£¥]*\S*\s*$/u.test(s[0]??"")&&s.length<=3&&!/^\s*[-*\d]+[.)]?\s/m.test(s.slice(1).join(`
19
- `))?"fact":s.length&&s.every((r,i)=>r.startsWith(">")||i===s.length-1&&!r.startsWith("#"))&&s[0].startsWith(">")?"quote":"default"}function x(t,e={},n=[]){let s=document.createElement(t);for(let[r,i]of Object.entries(e))i!==void 0&&i!==!1&&s.setAttribute(r,i===!0?"":String(i));for(let r of n)(r||r==="")&&s.append(r);return s}function kn(t){let e=String(t??"").trim();return/^(https?:|mailto:|blob:|#)/i.test(e)||/^data:image\/(png|jpe?g|gif|webp|avif|svg\+xml);/i.test(e)?e:/^[a-z][\w+.-]*:/i.test(e)?null:e}function Le(t,e){let n=String(t.settings.layout??"").trim().toLowerCase(),s=e.kit.layouts[n]?n:e.kit.layouts[Fe[n]]?Fe[n]:Ue(t),r=e.kit.layouts[s]??Pe.layouts.default,i=String(t.settings.class??"").split(/\s+/).filter(h=>["invert","text-center","text-left"].includes(h)),l={step:0},a=new Map(t.slots.map(h=>[h.name,h])),o=r.slots,p=x("section",{class:["deck-slide",`deck-layout-${s}`,...i.map(h=>`deck-class-${h}`)].join(" "),"data-index":t.index,"data-layout":s,"data-paper":r.paper,"data-align":r.align,"data-justify":r.justify,"data-title":r.title,"aria-roledescription":e.slide,role:"group"}),u=x("div",{class:"deck-canvas"});u.style.setProperty("grid-template-areas",r.areas.map(h=>`"${h.map(d=>d==="."?".":`s-${d}`).join(" ")}"`).join(" ")),u.style.setProperty("grid-template-columns",r.columns.join(" ")),u.style.setProperty("grid-template-rows",r.rows.join(" ")),p.append(u);let c=t.settings.image??t.settings.background;if(typeof c=="string"&&["image-left","image-right","image","cover"].includes(s)){let h=e.resolve(c);if(h){let d=x("div",{class:"deck-image",role:"img","aria-label":String(t.settings.alt??"")||void 0});d.style.setProperty("--deck-image",`url("${h.replace(/["\\\n]/g,encodeURIComponent)}")`),u.append(d),p.classList.add("has-image")}}for(let h of o){let d=a.get(h),f=x("div",{class:"deck-slot","data-slot":h},d?Rt(d,e,l):[]);f.style.setProperty("grid-area",`s-${h}`),u.append(f)}for(let h of t.slots)o.includes(h.name)||u.append(x("div",{class:"deck-slot","data-slot":h.name},Rt(h,e,l)));return r.numbered&&t.settings.paginate!==!1&&p.append(x("span",{class:"deck-number","aria-hidden":"true"},[e.number(t.index+1)])),{element:p,steps:l.step}}function Rt(t,e,n){let s=e.lex(t.text),r=[],i=t.start,l="";for(let a of s){let o=i;i+=a.raw.length;let p=a.type==="paragraph"?a.raw.trim().split(`
20
- `).map(c=>c.trim()):[];if(p.length&&p.every(c=>/^:{3,}/.test(c))){for(let c of p)/^:{3,}[ \t]*\{?[ \t]*\.?incremental\b/.test(c)?l="clicks":/^:{3,}\s*$/.test(c)&&l==="clicks"&&(l="");continue}if(a.type==="html"){let c=/^\s*<(\/?)(v-clicks?|br)\b[^>]*>\s*$/i.exec(a.raw);if(c&&c[2]==="br")r.push(x("br"));else if(c)l=c[1]?"":c[2].toLowerCase()==="v-clicks"?"clicks":"click";else if(/<li\b/i.test(a.raw)){let h=x(/<ol\b/i.test(a.raw)?"ol":"ul",{dir:"auto"});for(let[,d,f]of a.raw.matchAll(/<li\b([^>]*)>([\s\S]*?)(?=<\/li>|<li\b|<\/[ou]l>|$)/gi)){let k=f.replace(/<!--[\s\S]*?-->/g,"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();if(!k)continue;let m=x("li",{dir:"auto"},[k]);(/\bv-click\b/.test(d)||l==="clicks")&&Ge(m,++n.step),h.append(m)}h.childElementCount&&r.push(h)}else{let h=a.raw.replace(/<!--[\s\S]*?-->/g,"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();h&&r.push(x("p",{},[h]))}continue}let u=Qe(a,o,e,l==="clicks"?n:null);u&&((l==="click"||l==="clicks"&&a.type!=="list")&&Ge(u,++n.step),r.push(u))}return r}var Ge=(t,e)=>{t.classList.add("deck-step"),t.setAttribute("data-step",String(e))};function Qe(t,e,n,s){switch(t.type){case"heading":{let r=/^\s*#{1,6}[ \t]+/.exec(t.raw),i=r?We(e+r[0].length,e+t.raw.replace(/\s*#*\s*$/,"").length):void 0;return n.headings==="real"?x(`h${t.depth}`,{dir:"auto","data-edit":i},W(t.tokens,n)):x("p",{class:`deck-h deck-h${t.depth}`,role:"heading","aria-level":Math.min(6,t.depth+2),dir:"auto","data-edit":i},W(t.tokens,n))}case"paragraph":{let r=t.tokens.length===1&&t.tokens[0].type==="image";return x("p",{dir:"auto",class:r?"deck-picture":void 0,"data-edit":r?void 0:We(e,e+t.raw.trimEnd().length)},W(t.tokens,n))}case"text":return x("p",{dir:"auto"},W(t.tokens??[{type:"text",text:t.text}],n));case"blockquote":return x("blockquote",{},bn(t.tokens,e,t.raw,n));case"list":{let r=0,i=x(t.ordered?"ol":"ul",{start:t.ordered&&t.start!==1?t.start:void 0,class:t.items.some(l=>l.task)?"deck-tasks":void 0});for(let l of t.items){let a=t.raw.indexOf(l.raw,r);r=a+l.raw.length;let o=e+Math.max(0,a),p=/^\s*(?:[-*+]|\d+[.)])\s+(?:\[[ xX]\]\s+)?/.exec(l.raw),u=l.tokens.length===1&&l.tokens[0].type==="text"&&!/\n\s*\S/.test(l.raw.trim().split(`
19
+ `))?"fact":s.length&&s.every((r,i)=>r.startsWith(">")||i===s.length-1&&!r.startsWith("#"))&&s[0].startsWith(">")?"quote":"default"}function y(t,e={},n=[]){let s=document.createElement(t);for(let[r,i]of Object.entries(e))i!==void 0&&i!==!1&&s.setAttribute(r,i===!0?"":String(i));for(let r of n)(r||r==="")&&s.append(r);return s}function xn(t){let e=String(t??"").trim();return/^(https?:|mailto:|blob:|#)/i.test(e)||/^data:image\/(png|jpe?g|gif|webp|avif|svg\+xml);/i.test(e)?e:/^[a-z][\w+.-]*:/i.test(e)?null:e}function Me(t,e){let n=String(t.settings.layout??"").trim().toLowerCase(),s=e.kit.layouts[n]?n:e.kit.layouts[He[n]]?He[n]:Ge(t),r=e.kit.layouts[s]??Le.layouts.default,i=String(t.settings.class??"").split(/\s+/).filter(g=>["invert","text-center","text-left"].includes(g)),l={step:0},a=new Map(t.slots.map(g=>[g.name,g])),o=r.slots,p=y("section",{class:["deck-slide",`deck-layout-${s}`,...i.map(g=>`deck-class-${g}`)].join(" "),"data-index":t.index,"data-layout":s,"data-paper":r.paper,"data-align":r.align,"data-justify":r.justify,"data-title":r.title,"aria-roledescription":e.slide,role:"group"}),u=y("div",{class:"deck-canvas"});u.style.setProperty("grid-template-areas",r.areas.map(g=>`"${g.map(x=>x==="."?".":`s-${x}`).join(" ")}"`).join(" ")),u.style.setProperty("grid-template-columns",r.columns.join(" ")),u.style.setProperty("grid-template-rows",r.rows.join(" ")),p.append(u);let c=t.settings.image??t.settings.background;if(typeof c=="string"&&["image-left","image-right","image","cover"].includes(s)){let g=e.resolve(c);if(g){let x=y("div",{class:"deck-image",role:"img","aria-label":String(t.settings.alt??"")||void 0});x.style.setProperty("--deck-image",`url("${g.replace(/["\\\n]/g,encodeURIComponent)}")`),u.append(x),p.classList.add("has-image")}}for(let g of o){let x=a.get(g),w=y("div",{class:"deck-slot","data-slot":g},x?Pt(x,e,l):[]);w.style.setProperty("grid-area",`s-${g}`),u.append(w)}for(let g of t.slots)o.includes(g.name)||u.append(y("div",{class:"deck-slot","data-slot":g.name},Pt(g,e,l)));r.numbered&&t.settings.paginate!==!1&&p.append(y("span",{class:"deck-number","aria-hidden":"true"},[e.number(t.index+1)]));let{logo:d,logoAt:f,dark:h}=e.kit.tokens,k=fe.includes(f)?f:fe[0];if(d&&r.logo!=="none")for(let[g,x]of[[d,h?.logo?"has-dark":""],[h?.logo,"is-dark"]])g&&p.append(y("img",{class:`deck-logo ${x}`.trim(),src:g,alt:"","aria-hidden":"true","data-size":r.logo,"data-at":k}));return{element:p,steps:l.step}}function Pt(t,e,n){let s=e.lex(t.text),r=[],i=t.start,l="";for(let a of s){let o=i;i+=a.raw.length;let p=a.type==="paragraph"?a.raw.trim().split(`
20
+ `).map(c=>c.trim()):[];if(p.length&&p.every(c=>/^:{3,}/.test(c))){for(let c of p)/^:{3,}[ \t]*\{?[ \t]*\.?incremental\b/.test(c)?l="clicks":/^:{3,}\s*$/.test(c)&&l==="clicks"&&(l="");continue}if(a.type==="html"){let c=/^\s*<(\/?)(v-clicks?|br)\b[^>]*>\s*$/i.exec(a.raw);if(c&&c[2]==="br")r.push(y("br"));else if(c)l=c[1]?"":c[2].toLowerCase()==="v-clicks"?"clicks":"click";else if(/<li\b/i.test(a.raw)){let d=y(/<ol\b/i.test(a.raw)?"ol":"ul",{dir:"auto"});for(let[,f,h]of a.raw.matchAll(/<li\b([^>]*)>([\s\S]*?)(?=<\/li>|<li\b|<\/[ou]l>|$)/gi)){let k=h.replace(/<!--[\s\S]*?-->/g,"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();if(!k)continue;let g=y("li",{dir:"auto"},[k]);(/\bv-click\b/.test(f)||l==="clicks")&&Ve(g,++n.step),d.append(g)}d.childElementCount&&r.push(d)}else{let d=a.raw.replace(/<!--[\s\S]*?-->/g,"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();d&&r.push(y("p",{},[d]))}continue}let u=Xe(a,o,e,l==="clicks"?n:null);u&&((l==="click"||l==="clicks"&&a.type!=="list")&&Ve(u,++n.step),r.push(u))}return r}var Ve=(t,e)=>{t.classList.add("deck-step"),t.setAttribute("data-step",String(e))};function Xe(t,e,n,s){switch(t.type){case"heading":{let r=/^\s*#{1,6}[ \t]+/.exec(t.raw),i=r?Qe(e+r[0].length,e+t.raw.replace(/\s*#*\s*$/,"").length):void 0;return n.headings==="real"?y(`h${t.depth}`,{dir:"auto","data-edit":i},U(t.tokens,n)):y("p",{class:`deck-h deck-h${t.depth}`,role:"heading","aria-level":Math.min(6,t.depth+2),dir:"auto","data-edit":i},U(t.tokens,n))}case"paragraph":{let r=t.tokens.length===1&&t.tokens[0].type==="image";return y("p",{dir:"auto",class:r?"deck-picture":void 0,"data-edit":r?void 0:Qe(e,e+t.raw.trimEnd().length)},U(t.tokens,n))}case"text":return y("p",{dir:"auto"},U(t.tokens??[{type:"text",text:t.text}],n));case"blockquote":return y("blockquote",{},yn(t.tokens,e,t.raw,n));case"list":{let r=0,i=y(t.ordered?"ol":"ul",{start:t.ordered&&t.start!==1?t.start:void 0,class:t.items.some(l=>l.task)?"deck-tasks":void 0});for(let l of t.items){let a=t.raw.indexOf(l.raw,r);r=a+l.raw.length;let o=e+Math.max(0,a),p=/^\s*(?:[-*+]|\d+[.)])\s+(?:\[[ xX]\]\s+)?/.exec(l.raw),u=l.tokens.length===1&&l.tokens[0].type==="text"&&!/\n\s*\S/.test(l.raw.trim().split(`
21
21
  `).slice(1).join(`
22
- `)),c=x("li",{dir:"auto","data-edit":u&&p?We(o+p[0].length,o+l.raw.trimEnd().length):void 0},[l.task?x("input",{type:"checkbox",checked:l.checked,disabled:!0,"aria-label":l.text}):null,...l.tokens.flatMap(h=>h.type==="text"?W(h.tokens??[{type:"text",text:h.text}],n):[Qe(h,o+Math.max(0,l.raw.indexOf(h.raw)),n,null)])]);s&&Ge(c,++s.step),i.append(c)}return i}case"code":{let r=/^(\S*)\s*(?:\{([^}]*)\})?/.exec(t.lang??"")??[],i=(r[1]??"").toLowerCase(),l=n.blocks[i];if(l){let p=x("div",{class:`deck-block deck-${i}`,"data-source":t.text});return p.append(x("pre",{class:"deck-block-source",dir:"ltr"},[x("code",{},[t.text])])),queueMicrotask(()=>Promise.resolve(l(p,t.text)).catch(()=>p.classList.add("is-failed"))),p}let a=xn(r[2]??""),o=x("code",{class:i?`language-${i}`:void 0});for(let[p,u]of t.text.split(`
23
- `).entries())o.append(x("span",{class:a.has(p+1)?"deck-line is-marked":"deck-line"},[u,`
24
- `]));return x("pre",{dir:"ltr",class:a.size?"has-marks":void 0,tabindex:0},[o])}case"table":{let r=i=>i??void 0;return x("div",{class:"deck-table"},[x("table",{},[x("thead",{},[x("tr",{},t.header.map((i,l)=>x("th",{"data-align":r(t.align[l]),dir:"auto"},W(i.tokens,n))))]),x("tbody",{},t.rows.map(i=>x("tr",{},i.map((l,a)=>x("td",{"data-align":r(t.align[a]),dir:"auto"},W(l.tokens,n))))))])])}default:return null}}function bn(t,e,n,s){let r=0;return t.map(i=>{let l=n.indexOf(i.raw,r);return r=Math.max(r,l+i.raw.length),Qe(i,e+Math.max(0,l),s,null)})}function xn(t){let e=new Set;for(let n of t.split(/[,|]/)){let[s,r]=n.split("-").map(i=>parseInt(i,10));if(Number.isFinite(s))for(let i=s;i<=(Number.isFinite(r)?r:s);i++)e.add(i)}return e}var We=(t,e)=>e>t?`${t}-${e}`:void 0;function W(t=[],e){return t.flatMap(n=>{switch(n.type){case"text":case"escape":return n.tokens?W(n.tokens,e):[n.text.replace(/&(amp|lt|gt|quot|#39);/g,(s,r)=>({amp:"&",lt:"<",gt:">",quot:'"',"#39":"'"})[r])];case"strong":return[x("strong",{},W(n.tokens,e))];case"em":return[x("em",{},W(n.tokens,e))];case"del":return[x("del",{},W(n.tokens,e))];case"codespan":return[x("code",{},[n.text.replace(/&(amp|lt|gt|quot|#39);/g,(s,r)=>({amp:"&",lt:"<",gt:">",quot:'"',"#39":"'"})[r])])];case"br":return[x("br")];case"link":{let s=kn(n.href);return s?[x("a",{href:s,rel:"noopener noreferrer",target:s.startsWith("#")?void 0:"_blank"},W(n.tokens,e))]:W(n.tokens,e)}case"image":{let s=e.resolve(n.href);return s?[x("img",{src:s,alt:n.text,loading:"lazy"})]:[n.text]}case"html":return/^<br\s*\/?>$/i.test(n.raw)?[x("br")]:[];default:return n.text?[n.text]:[]}})}var Ve={default:{paper:"#fffdf8",ink:"#1d1b16",primary:"#f7c531",voice:"calm",radius:10},ocean:{paper:"#f6fafb",ink:"#0d2530",primary:"#0f766e",voice:"calm",radius:6},ember:{paper:"#fff8f3",ink:"#2a160c",primary:"#d9480f",voice:"bold",radius:2},ink:{paper:"#ffffff",ink:"#111111",primary:"#3b5bdb",voice:"elegant",radius:0}},Ke={calm:{heading:'ui-sans-serif, system-ui, "Segoe UI", Roboto, "Noto Sans", sans-serif',body:'ui-sans-serif, system-ui, "Segoe UI", Roboto, "Noto Sans", sans-serif'},elegant:{heading:'ui-serif, "Iowan Old Style", Georgia, "Noto Serif", serif',body:'ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif'},bold:{heading:'"Avenir Next Condensed", "Arial Narrow", ui-sans-serif, system-ui, sans-serif',body:'ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif'},friendly:{heading:'ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif',body:'ui-rounded, "SF Pro Rounded", system-ui, sans-serif'}};function Ye(t,e={}){let n=Ve[String(t.theme??"")]??Ve.default,s=typeof t.themeConfig=="object"&&t.themeConfig?t.themeConfig:{},r={...n,...Et(e),...Et(s)};return Ke[r.voice]||(r.voice="calm"),r}function Et(t){let e={};for(let n of["paper","ink","primary","muted","soft"])typeof t[n]=="string"&&ne(t[n])&&(e[n]=t[n]);return t.dark&&typeof t.dark=="object"&&(e.dark=Object.fromEntries(Object.entries(t.dark).filter(([,n])=>typeof n=="string"&&ne(n)))),t.fonts&&Array.isArray(t.fonts.heading)&&Array.isArray(t.fonts.body)&&(e.fonts={heading:t.fonts.heading.map(String),body:t.fonts.body.map(String)}),typeof t.voice=="string"&&(e.voice=t.voice),typeof t.radius=="number"&&(e.radius=t.radius),e}function Je(t,e){let n=ne(t.paper)??[255,253,248],s=ne(t.ink)??[29,27,22],r=e==="dark"?t.dark??{}:{},i=ke(ne(r.paper??"")??(e==="dark"?de(s,[0,0,0],.35):n)),l=ke(ne(r.ink??"")??(e==="dark"?de(n,[255,255,255],.2):s)),a=ne(r.primary??t.primary)??[247,197,49],o=Me(a,i,4.5),p=_e(l,a)>=_e(i,a)?l:i,u=[0,1,2,3,4,5].map(c=>Me(yn(a,c*57),i,3));return{paper:ie(i),ink:ie(l),muted:ie(Me(ke(ne(r.muted??(e==="light"?t.muted??"":""))??de(l,i,.38)),i,4.5)),line:ie(de(l,i,.82)),primary:ie(o),onPrimary:ie(p),soft:ie(ne(r.soft??(e==="light"?t.soft??"":""))??de(a,i,.78)),series:u.map(ie)}}function ne(t){let e=/^#?([\da-f]{3}|[\da-f]{6})$/i.exec(String(t).trim());if(!e)return null;let n=e[1].length===3?[...e[1]].map(s=>s+s).join(""):e[1];return[0,2,4].map(s=>parseInt(n.slice(s,s+2),16))}var ie=t=>`#${t.map(e=>Math.round(Math.max(0,Math.min(255,e))).toString(16).padStart(2,"0")).join("")}`,ke=t=>t.map(e=>Math.round(Math.max(0,Math.min(255,e)))),de=(t,e,n)=>t.map((s,r)=>s+(e[r]-s)*n);function Xe(t){let[e,n,s]=t.map(r=>{let i=r/255;return i<=.03928?i/12.92:((i+.055)/1.055)**2.4});return .2126*e+.7152*n+.0722*s}function _e(t,e){let[n,s]=[Xe(t),Xe(e)].sort((r,i)=>i-r);return(n+.05)/(s+.05)}function Me(t,e,n){let s=Xe(e)>.18?[0,0,0]:[255,255,255],r=0,i=ke(t);for(;_e(i,e)<n&&r<1;)i=ke(de(t,s,r=Math.min(1,r+.02)));return i}function yn(t,e){let[n,s,r]=t.map(w=>w/255),i=Math.max(n,s,r),l=Math.min(n,s,r),a=(i+l)/2,o=i-l,p=o===0?0:o/(1-Math.abs(2*a-1)),u=o===0?0:i===n?(s-r)/o%6:i===s?(r-n)/o+2:(n-s)/o+4;u=(u*60+e+360)%360;let c=(1-Math.abs(2*a-1))*Math.max(p,.55),h=c*(1-Math.abs(u/60%2-1)),d=a-c/2,[f,k,m]=u<60?[c,h,0]:u<120?[h,c,0]:u<180?[0,c,h]:u<240?[0,h,c]:u<300?[h,0,c]:[c,0,h];return[f+d,k+d,m+d].map(w=>w*255)}var Pt={en:{deck:"Slides",slide:"slide",carousel:"carousel",previous:"Previous",next:"Next",present:"Present full screen",presenter:"Presenter view",overview:"All slides",edit:"Change",scheme:"Light or dark",export:"Save as PowerPoint",source:"The deck as text",notes:"Notes",noNotes:"No notes for this slide.",upNext:"Next",last:"Last slide",where:"Slide {n} of {count}",saved:"Saved"},fr:{deck:"Diapositives",slide:"diapositive",carousel:"carrousel",previous:"Précédente",next:"Suivante",present:"Présenter en plein écran",presenter:"Vue présentateur",overview:"Toutes les diapositives",edit:"Modifier",scheme:"Clair ou sombre",export:"Enregistrer en PowerPoint",source:"La présentation en texte",notes:"Notes",noNotes:"Pas de notes pour cette diapositive.",upNext:"Ensuite",last:"Dernière diapositive",where:"Diapositive {n} sur {count}",saved:"Enregistré"},ar:{deck:"الشرائح",slide:"شريحة",carousel:"عرض شرائح",previous:"السابقة",next:"التالية",present:"العرض بملء الشاشة",presenter:"عرض المقدّم",overview:"كل الشرائح",edit:"تعديل",scheme:"فاتح أو داكن",export:"الحفظ بصيغة PowerPoint",source:"العرض كنص",notes:"الملاحظات",noNotes:"لا ملاحظات لهذه الشريحة.",upNext:"التالية",last:"الشريحة الأخيرة",where:"الشريحة {n} من {count}",saved:"تم الحفظ"},ja:{deck:"スライド",slide:"スライド",carousel:"カルーセル",previous:"前へ",next:"次へ",present:"全画面で発表",presenter:"発表者ビュー",overview:"すべてのスライド",edit:"編集",scheme:"ライトまたはダーク",export:"PowerPoint で保存",source:"テキストとしてのスライド",notes:"メモ",noNotes:"このスライドにメモはありません。",upNext:"次",last:"最後のスライド",where:"スライド {n} / {count}",saved:"保存しました"}},zt=t=>Pt[t.split("-")[0].toLowerCase()]??Pt.en;function st(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var pe=st();function Ft(t){pe=t}var oe={exec:()=>null};function fe(t){let e=[];return n=>{let s=Math.max(0,Math.min(3,n-1)),r=e[s];return r||(r=t(s),e[s]=r),r}}function S(t,e=""){let n=typeof t=="string"?t:t.source,s={replace:(r,i)=>{let l=typeof i=="string"?i:i.source;return l=l.replace(_.caret,"$1"),n=n.replace(r,l),s},getRegex:()=>new RegExp(n,e)};return s}var wn=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),_={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:fe(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:fe(t=>new RegExp(`^ {0,${t}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:fe(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:fe(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:fe(t=>new RegExp(`^ {0,${t}}(?:</?(?:${we})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`,"i")),blockquoteBeginRegex:fe(t=>new RegExp(`^ {0,${t}}>`))},Sn=/^(?:[ \t]*(?:\n|$))+/,$n=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,An=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ye=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Cn=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,it=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Zt=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ht=S(Zt).replace(/bull/g,it).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),vn=S(Zt).replace(/bull/g,it).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),lt=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Tn=/^[^\n]+/,at=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Rn=S(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",at).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),En=S(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,it).getRegex(),we="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|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ot=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Pn=S("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ot).replace("tag",we).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ut=t=>S(lt).replace("hr",ye).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",t).replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",we).getRegex(),zn=Ut(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Ln=Ut(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Mn=S(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ln).getRegex(),ct={blockquote:Mn,code:$n,def:Rn,fences:An,heading:Cn,hr:ye,html:Pn,lheading:Ht,list:En,newline:Sn,paragraph:zn,table:oe,text:Tn},Lt=S("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ye).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",we).getRegex(),_n={...ct,lheading:vn,table:Lt,paragraph:S(lt).replace("hr",ye).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Lt).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",we).getRegex()},On={...ct,html:S(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ot).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:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:oe,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:S(lt).replace("hr",ye).replace("heading",` *#{1,6} *[^
25
- ]`).replace("lheading",Ht).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},In=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,jn=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Wt=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,Nn=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ee=/[\p{P}\p{S}]/u,ge=/[\s\p{P}\p{S}]/u,Se=/[^\s\p{P}\p{S}]/u,Dn=S(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ge).getRegex(),qn=/[\p{Pi}\p{Ps}"']/u,Gt=/(?!~)[\p{P}\p{S}]/u,Bn=/(?!~)[\s\p{P}\p{S}]/u,Fn=/(?:[^\s\p{P}\p{S}]|~)/u,Zn=S(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",wn?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Qt=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Hn=S(Qt,"u").replace(/punct/g,ee).getRegex(),Un=S(Qt,"u").replace(/punct/g,Gt).getRegex(),Wn=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Gn=S(Wn,"u").replace(/openQuote/g,qn).replace(/punct/g,ee).getRegex(),Vt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Qn=S(Vt,"gu").replace(/notPunctSpace/g,Se).replace(/punctSpace/g,ge).replace(/punct/g,ee).getRegex(),Vn=S(Vt,"gu").replace(/notPunctSpace/g,Fn).replace(/punctSpace/g,Bn).replace(/punct/g,Gt).getRegex(),Xn="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",Kn=S(Xn,"gu").replace(/notPunctSpace/g,Se).replace(/punctSpace/g,ge).replace(/punct/g,ee).getRegex(),Yn=S("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Se).replace(/punctSpace/g,ge).replace(/punct/g,ee).getRegex(),Jn="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",er=S(Jn,"gu").replace(/notPunctSpace/g,Se).replace(/punctSpace/g,ge).replace(/punct/g,ee).getRegex(),tr=S(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ee).getRegex(),nr="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",rr=S(nr,"gu").replace(/notPunctSpace/g,Se).replace(/punctSpace/g,ge).replace(/punct/g,ee).getRegex(),sr=S(/\\(punct)/,"gu").replace(/punct/g,ee).getRegex(),ir=S(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/,"gu").replace(/punct/g,ee).getRegex(),lr=S(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("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])?)+(?![-_])/).getRegex(),ar=S(ot).replace("(?:-->|$)","-->").getRegex(),or=S("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",ar).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Xt=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,Ie=S(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",Xt).getRegex(),cr=S(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",Ie).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),pr=S(/^!?\[(label)\]\[(ref)\]/).replace("label",Ie).replace("ref",at).getRegex(),ur=S(/^!?\[(ref)\](?:\[\])?/).replace("ref",at).getRegex(),Mt=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,hr=S(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",Xt).getRegex(),dr=S("reflink|nolink(?!\\()","g").replace("reflink",S(/^!?\[(label)\]\[(ref)\]/).replace("label",hr).replace("ref",Mt).getRegex()).replace("nolink",S(/^!?\[(ref)\](?:\[\])?/).replace("ref",Mt).getRegex()).getRegex(),_t=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,fr=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,gr=S(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,fr).getRegex(),pt={_backpedal:oe,anyPunctuation:sr,anyPunctuationOutsideCode:ir,autolink:lr,blockSkip:Zn,br:Wt,code:jn,del:oe,delLDelim:oe,delRDelim:oe,emStrongLDelim:Hn,emStrongRDelimAst:Qn,emStrongRDelimUnd:Yn,escape:In,link:cr,nolink:ur,punctuation:Dn,reflink:pr,reflinkSearch:dr,tag:or,text:Nn,url:oe},mr={...pt,emStrongLDelim:Gn,emStrongRDelimAst:Kn,emStrongRDelimUnd:er,link:S(/^!?\[(label)\]\((.*?)\)/).replace("label",Ie).getRegex(),reflink:S(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ie).getRegex()},tt={...pt,emStrongRDelimAst:Vn,emStrongLDelim:Un,delLDelim:tr,delRDelim:rr,url:S(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",gr).replace("protocol",_t).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:S(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",_t).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},kr={...tt,br:S(Wt).replace("{2,}","*").getRegex(),text:S(tt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Oe={normal:ct,gfm:_n,pedantic:On},be={normal:pt,gfm:tt,breaks:kr,pedantic:mr},br={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ot=t=>br[t];function G(t,e){if(e){if(_.escapeTest.test(t))return t.replace(_.escapeReplace,Ot)}else if(_.escapeTestNoEncode.test(t))return t.replace(_.escapeReplaceNoEncode,Ot);return t}function xr(t){return _.numericCharacterReference.test(t)?t.replace(_.numericCharacterReferenceOrAmpersand,(e,n,s)=>{if(n===void 0&&s===void 0)return"&amp;";let r=n===void 0?Number.parseInt(s,16):Number.parseInt(n,10);return r===0||r>1114111||r>=55296&&r<=57343?"�":r===38?"&amp;":String.fromCodePoint(r)}):t}function It(t){try{t=encodeURI(t).replace(_.percentDecode,"%")}catch{return null}return t}function jt(t,e){let n=t.replace(_.findPipe,(i,l,a)=>{let o=!1,p=l;for(;--p>=0&&a[p]==="\\";)o=!o;return o?"|":" |"}),s=n.split(_.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(_.slashPipe,"|");return s}function le(t,e,n){let s=t.length;if(s===0)return"";let r=0;for(;r<s;){let i=t.charAt(s-r-1);if(i===e&&!n)r++;else if(i!==e&&n)r++;else break}return t.slice(0,s-r)}function Nt(t){let e=t.split(`
26
- `),n=e.length-1;for(;n>=0&&_.blankLine.test(e[n]);)n--;return e.length-n<=2?t:e.slice(0,n+1).join(`
27
- `)}function je(t){return t.trim().toLowerCase().toUpperCase().toLowerCase()}function Dt(t,e){if(t.indexOf(e[0])===-1&&t.indexOf(e[1])===-1)return-1;let n=0;for(let s=0;s<t.length;s++)if(t[s]==="\\")s++;else if(t[s]===e[0])n++;else if(t[s]===e[1]&&(n--,n<0))return s;return n>0?-2:-1}function et(t,e=0){let n=e,s="";for(let r of t)if(r===" "){let i=4-n%4;s+=" ".repeat(i),n+=i}else s+=r,n++;return s}function qt(t,e,n,s,r){let i=e.href,l=e.title||null,a=t[1].replace(r.other.outputLinkReplace,"$1"),o=t[0].charAt(0)==="!",p=s.state.inLink,u=s.state.linkEmitted,c=s.state.inRawBlock;s.state.inLink=!0,s.state.linkEmitted=!1;let h=s.inlineTokens(a),d=s.state.linkEmitted;if(s.state.linkEmitted=u,s.state.inLink=p,!o){if(d){s.state.inRawBlock=c;return}s.state.linkEmitted=!0}return{type:o?"image":"link",raw:n,href:i,title:l,text:a,tokens:h}}function yr(t,e,n){let s=t.match(n.other.indentCodeCompensation);if(s===null)return e;let r=s[1];return e.split(`
22
+ `)),c=y("li",{dir:"auto","data-edit":u&&p?Qe(o+p[0].length,o+l.raw.trimEnd().length):void 0},[l.task?y("input",{type:"checkbox",checked:l.checked,disabled:!0,"aria-label":l.text}):null,...l.tokens.flatMap(d=>d.type==="text"?U(d.tokens??[{type:"text",text:d.text}],n):[Xe(d,o+Math.max(0,l.raw.indexOf(d.raw)),n,null)])]);s&&Ve(c,++s.step),i.append(c)}return i}case"code":{let r=/^(\S*)\s*(?:\{([^}]*)\})?/.exec(t.lang??"")??[],i=(r[1]??"").toLowerCase(),l=n.blocks[i];if(l){let p=y("div",{class:`deck-block deck-${i}`,"data-source":t.text});return p.append(y("pre",{class:"deck-block-source",dir:"ltr"},[y("code",{},[t.text])])),queueMicrotask(()=>Promise.resolve(l(p,t.text)).catch(()=>p.classList.add("is-failed"))),p}let a=wn(r[2]??""),o=y("code",{class:i?`language-${i}`:void 0});for(let[p,u]of t.text.split(`
23
+ `).entries())o.append(y("span",{class:a.has(p+1)?"deck-line is-marked":"deck-line"},[u,`
24
+ `]));return y("pre",{dir:"ltr",class:a.size?"has-marks":void 0,tabindex:0},[o])}case"table":{let r=i=>i??void 0;return y("div",{class:"deck-table"},[y("table",{},[y("thead",{},[y("tr",{},t.header.map((i,l)=>y("th",{"data-align":r(t.align[l]),dir:"auto"},U(i.tokens,n))))]),y("tbody",{},t.rows.map(i=>y("tr",{},i.map((l,a)=>y("td",{"data-align":r(t.align[a]),dir:"auto"},U(l.tokens,n))))))])])}default:return null}}function yn(t,e,n,s){let r=0;return t.map(i=>{let l=n.indexOf(i.raw,r);return r=Math.max(r,l+i.raw.length),Xe(i,e+Math.max(0,l),s,null)})}function wn(t){let e=new Set;for(let n of t.split(/[,|]/)){let[s,r]=n.split("-").map(i=>parseInt(i,10));if(Number.isFinite(s))for(let i=s;i<=(Number.isFinite(r)?r:s);i++)e.add(i)}return e}var Qe=(t,e)=>e>t?`${t}-${e}`:void 0;function U(t=[],e){return t.flatMap(n=>{switch(n.type){case"text":case"escape":return n.tokens?U(n.tokens,e):[n.text.replace(/&(amp|lt|gt|quot|#39);/g,(s,r)=>({amp:"&",lt:"<",gt:">",quot:'"',"#39":"'"})[r])];case"strong":return[y("strong",{},U(n.tokens,e))];case"em":return[y("em",{},U(n.tokens,e))];case"del":return[y("del",{},U(n.tokens,e))];case"codespan":return[y("code",{},[n.text.replace(/&(amp|lt|gt|quot|#39);/g,(s,r)=>({amp:"&",lt:"<",gt:">",quot:'"',"#39":"'"})[r])])];case"br":return[y("br")];case"link":{let s=xn(n.href);return s?[y("a",{href:s,rel:"noopener noreferrer",target:s.startsWith("#")?void 0:"_blank"},U(n.tokens,e))]:U(n.tokens,e)}case"image":{let s=e.resolve(n.href);return s?[y("img",{src:s,alt:n.text,loading:"lazy"})]:[n.text]}case"html":return/^<br\s*\/?>$/i.test(n.raw)?[y("br")]:[];default:return n.text?[n.text]:[]}})}var Ke={default:{paper:"#fffdf8",ink:"#1d1b16",primary:"#f7c531",voice:"calm",radius:10},ocean:{paper:"#f6fafb",ink:"#0d2530",primary:"#0f766e",voice:"calm",radius:6},ember:{paper:"#fff8f3",ink:"#2a160c",primary:"#d9480f",voice:"bold",radius:2},ink:{paper:"#ffffff",ink:"#111111",primary:"#3b5bdb",voice:"elegant",radius:0}},Ye={calm:{heading:'ui-sans-serif, system-ui, "Segoe UI", Roboto, "Noto Sans", sans-serif',body:'ui-sans-serif, system-ui, "Segoe UI", Roboto, "Noto Sans", sans-serif'},elegant:{heading:'ui-serif, "Iowan Old Style", Georgia, "Noto Serif", serif',body:'ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif'},bold:{heading:'"Avenir Next Condensed", "Arial Narrow", ui-sans-serif, system-ui, sans-serif',body:'ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif'},friendly:{heading:'ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif',body:'ui-rounded, "SF Pro Rounded", system-ui, sans-serif'}};function et(t,e={}){let n=Ke[String(t.theme??"")]??Ke.default,s=typeof t.themeConfig=="object"&&t.themeConfig?t.themeConfig:{},r={...n,...zt(e),...zt(s)};return Ye[r.voice]||(r.voice="calm"),r}function zt(t){let e={};for(let n of["paper","ink","primary","muted","soft"])typeof t[n]=="string"&&G(t[n])&&(e[n]=t[n]);return t.dark&&typeof t.dark=="object"&&(e.dark=Object.fromEntries(Object.entries(t.dark).filter(([,n])=>typeof n=="string"&&G(n)))),t.fonts&&Array.isArray(t.fonts.heading)&&Array.isArray(t.fonts.body)&&(e.fonts={heading:t.fonts.heading.map(String),body:t.fonts.body.map(String)}),typeof t.voice=="string"&&(e.voice=t.voice),typeof t.radius=="number"&&(e.radius=t.radius),Array.isArray(t.series)&&t.series.length&&t.series.every(n=>typeof n=="string"&&G(n))&&(e.series=t.series.slice(0,6)),e}function tt(t,e){let n=G(t.paper)??[255,253,248],s=G(t.ink)??[29,27,22],r=e==="dark"?t.dark??{}:{},i=xe(G(r.paper??"")??(e==="dark"?ge(s,[0,0,0],.35):n)),l=xe(G(r.ink??"")??(e==="dark"?ge(n,[255,255,255],.2):s)),a=G(r.primary??t.primary)??[247,197,49],o=_e(a,i,4.5),p=ae(l,a)>=ae(i,a)?l:i,u=(t.series??[]).map(G).filter(d=>d!==null),c=[0,1,2,3,4,5].map(d=>_e(u[d%(u.length||1)]??Sn(a,d*57),i,3));return{paper:ie(i),ink:ie(l),muted:ie(_e(xe(G(r.muted??(e==="light"?t.muted??"":""))??ge(l,i,.38)),i,4.5)),line:ie(ge(l,i,.82)),primary:ie(o),onPrimary:ie(p),soft:ie(G(r.soft??(e==="light"?t.soft??"":""))??ge(a,i,.78)),series:c.map(ie)}}function G(t){let e=/^#?([\da-f]{3}|[\da-f]{6})$/i.exec(String(t).trim());if(!e)return null;let n=e[1].length===3?[...e[1]].map(s=>s+s).join(""):e[1];return[0,2,4].map(s=>parseInt(n.slice(s,s+2),16))}var ie=t=>`#${t.map(e=>Math.round(Math.max(0,Math.min(255,e))).toString(16).padStart(2,"0")).join("")}`,xe=t=>t.map(e=>Math.round(Math.max(0,Math.min(255,e)))),ge=(t,e,n)=>t.map((s,r)=>s+(e[r]-s)*n);function Je(t){let[e,n,s]=t.map(r=>{let i=r/255;return i<=.03928?i/12.92:((i+.055)/1.055)**2.4});return .2126*e+.7152*n+.0722*s}function ae(t,e){let[n,s]=[Je(t),Je(e)].sort((r,i)=>i-r);return(n+.05)/(s+.05)}function _e(t,e,n){let s=Je(e)>.18?[0,0,0]:[255,255,255],r=0,i=xe(t);for(;ae(i,e)<n&&r<1;)i=xe(ge(t,s,r=Math.min(1,r+.02)));return i}function Sn(t,e){let[n,s,r]=t.map(x=>x/255),i=Math.max(n,s,r),l=Math.min(n,s,r),a=(i+l)/2,o=i-l,p=o===0?0:o/(1-Math.abs(2*a-1)),u=o===0?0:i===n?(s-r)/o%6:i===s?(r-n)/o+2:(n-s)/o+4;u=(u*60+e+360)%360;let c=(1-Math.abs(2*a-1))*Math.max(p,.55),d=c*(1-Math.abs(u/60%2-1)),f=a-c/2,[h,k,g]=u<60?[c,d,0]:u<120?[d,c,0]:u<180?[0,c,d]:u<240?[0,d,c]:u<300?[d,0,c]:[c,0,d];return[h+f,k+f,g+f].map(x=>x*255)}var Lt={en:{deck:"Slides",slide:"slide",carousel:"carousel",previous:"Previous",next:"Next",present:"Present full screen",presenter:"Presenter view",overview:"All slides",edit:"Change",scheme:"Light or dark",export:"Save as PowerPoint",source:"The deck as text",notes:"Notes",noNotes:"No notes for this slide.",upNext:"Next",last:"Last slide",where:"Slide {n} of {count}",saved:"Saved"},fr:{deck:"Diapositives",slide:"diapositive",carousel:"carrousel",previous:"Précédente",next:"Suivante",present:"Présenter en plein écran",presenter:"Vue présentateur",overview:"Toutes les diapositives",edit:"Modifier",scheme:"Clair ou sombre",export:"Enregistrer en PowerPoint",source:"La présentation en texte",notes:"Notes",noNotes:"Pas de notes pour cette diapositive.",upNext:"Ensuite",last:"Dernière diapositive",where:"Diapositive {n} sur {count}",saved:"Enregistré"},ar:{deck:"الشرائح",slide:"شريحة",carousel:"عرض شرائح",previous:"السابقة",next:"التالية",present:"العرض بملء الشاشة",presenter:"عرض المقدّم",overview:"كل الشرائح",edit:"تعديل",scheme:"فاتح أو داكن",export:"الحفظ بصيغة PowerPoint",source:"العرض كنص",notes:"الملاحظات",noNotes:"لا ملاحظات لهذه الشريحة.",upNext:"التالية",last:"الشريحة الأخيرة",where:"الشريحة {n} من {count}",saved:"تم الحفظ"},ja:{deck:"スライド",slide:"スライド",carousel:"カルーセル",previous:"前へ",next:"次へ",present:"全画面で発表",presenter:"発表者ビュー",overview:"すべてのスライド",edit:"編集",scheme:"ライトまたはダーク",export:"PowerPoint で保存",source:"テキストとしてのスライド",notes:"メモ",noNotes:"このスライドにメモはありません。",upNext:"次",last:"最後のスライド",where:"スライド {n} / {count}",saved:"保存しました"}},Ot=t=>Lt[t.split("-")[0].toLowerCase()]??Lt.en;function lt(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ue=lt();function Ht(t){ue=t}var ce={exec:()=>null};function me(t){let e=[];return n=>{let s=Math.max(0,Math.min(3,n-1)),r=e[s];return r||(r=t(s),e[s]=r),r}}function $(t,e=""){let n=typeof t=="string"?t:t.source,s={replace:(r,i)=>{let l=typeof i=="string"?i:i.source;return l=l.replace(N.caret,"$1"),n=n.replace(r,l),s},getRegex:()=>new RegExp(n,e)};return s}var $n=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),N={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:me(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:me(t=>new RegExp(`^ {0,${t}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:me(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:me(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:me(t=>new RegExp(`^ {0,${t}}(?:</?(?:${$e})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`,"i")),blockquoteBeginRegex:me(t=>new RegExp(`^ {0,${t}}>`))},An=/^(?:[ \t]*(?:\n|$))+/,Cn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Rn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Se=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Tn=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,at=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Wt=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ut=$(Wt).replace(/bull/g,at).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),vn=$(Wt).replace(/bull/g,at).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ot=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,En=/^[^\n]+/,ct=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Pn=$(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ct).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),zn=$(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,at).getRegex(),$e="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|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",pt=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ln=$("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",pt).replace("tag",$e).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Gt=t=>$(ot).replace("hr",Se).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",t).replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",$e).getRegex(),On=Gt(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Mn=Gt(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),_n=$(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Mn).getRegex(),ut={blockquote:_n,code:Cn,def:Pn,fences:Rn,heading:Tn,hr:Se,html:Ln,lheading:Ut,list:zn,newline:An,paragraph:On,table:ce,text:En},Mt=$("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Se).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",$e).getRegex(),Nn={...ut,lheading:vn,table:Mt,paragraph:$(ot).replace("hr",Se).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Mt).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",$e).getRegex()},jn={...ut,html:$(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",pt).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:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ce,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:$(ot).replace("hr",Se).replace("heading",` *#{1,6} *[^
25
+ ]`).replace("lheading",Ut).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},In=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Dn=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Qt=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,qn=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,te=/[\p{P}\p{S}]/u,ke=/[\s\p{P}\p{S}]/u,Ae=/[^\s\p{P}\p{S}]/u,Bn=$(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ke).getRegex(),Fn=/[\p{Pi}\p{Ps}"']/u,Vt=/(?!~)[\p{P}\p{S}]/u,Zn=/(?!~)[\s\p{P}\p{S}]/u,Hn=/(?:[^\s\p{P}\p{S}]|~)/u,Wn=$(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",$n?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Xt=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Un=$(Xt,"u").replace(/punct/g,te).getRegex(),Gn=$(Xt,"u").replace(/punct/g,Vt).getRegex(),Qn=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Vn=$(Qn,"u").replace(/openQuote/g,Fn).replace(/punct/g,te).getRegex(),Kt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Xn=$(Kt,"gu").replace(/notPunctSpace/g,Ae).replace(/punctSpace/g,ke).replace(/punct/g,te).getRegex(),Kn=$(Kt,"gu").replace(/notPunctSpace/g,Hn).replace(/punctSpace/g,Zn).replace(/punct/g,Vt).getRegex(),Jn="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",Yn=$(Jn,"gu").replace(/notPunctSpace/g,Ae).replace(/punctSpace/g,ke).replace(/punct/g,te).getRegex(),er=$("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ae).replace(/punctSpace/g,ke).replace(/punct/g,te).getRegex(),tr="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",nr=$(tr,"gu").replace(/notPunctSpace/g,Ae).replace(/punctSpace/g,ke).replace(/punct/g,te).getRegex(),rr=$(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,te).getRegex(),sr="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",ir=$(sr,"gu").replace(/notPunctSpace/g,Ae).replace(/punctSpace/g,ke).replace(/punct/g,te).getRegex(),lr=$(/\\(punct)/,"gu").replace(/punct/g,te).getRegex(),ar=$(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/,"gu").replace(/punct/g,te).getRegex(),or=$(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("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])?)+(?![-_])/).getRegex(),cr=$(pt).replace("(?:-->|$)","-->").getRegex(),pr=$("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",cr).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Jt=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,je=$(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",Jt).getRegex(),ur=$(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",je).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),dr=$(/^!?\[(label)\]\[(ref)\]/).replace("label",je).replace("ref",ct).getRegex(),hr=$(/^!?\[(ref)\](?:\[\])?/).replace("ref",ct).getRegex(),_t=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,fr=$(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",Jt).getRegex(),gr=$("reflink|nolink(?!\\()","g").replace("reflink",$(/^!?\[(label)\]\[(ref)\]/).replace("label",fr).replace("ref",_t).getRegex()).replace("nolink",$(/^!?\[(ref)\](?:\[\])?/).replace("ref",_t).getRegex()).getRegex(),Nt=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,mr=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,kr=$(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,mr).getRegex(),dt={_backpedal:ce,anyPunctuation:lr,anyPunctuationOutsideCode:ar,autolink:or,blockSkip:Wn,br:Qt,code:Dn,del:ce,delLDelim:ce,delRDelim:ce,emStrongLDelim:Un,emStrongRDelimAst:Xn,emStrongRDelimUnd:er,escape:In,link:ur,nolink:hr,punctuation:Bn,reflink:dr,reflinkSearch:gr,tag:pr,text:qn,url:ce},br={...dt,emStrongLDelim:Vn,emStrongRDelimAst:Yn,emStrongRDelimUnd:nr,link:$(/^!?\[(label)\]\((.*?)\)/).replace("label",je).getRegex(),reflink:$(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",je).getRegex()},rt={...dt,emStrongRDelimAst:Kn,emStrongLDelim:Gn,delLDelim:rr,delRDelim:ir,url:$(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",kr).replace("protocol",Nt).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:$(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",Nt).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},xr={...rt,br:$(Qt).replace("{2,}","*").getRegex(),text:$(rt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ne={normal:ut,gfm:Nn,pedantic:jn},ye={normal:dt,gfm:rt,breaks:xr,pedantic:br},yr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},jt=t=>yr[t];function Q(t,e){if(e){if(N.escapeTest.test(t))return t.replace(N.escapeReplace,jt)}else if(N.escapeTestNoEncode.test(t))return t.replace(N.escapeReplaceNoEncode,jt);return t}function wr(t){return N.numericCharacterReference.test(t)?t.replace(N.numericCharacterReferenceOrAmpersand,(e,n,s)=>{if(n===void 0&&s===void 0)return"&amp;";let r=n===void 0?Number.parseInt(s,16):Number.parseInt(n,10);return r===0||r>1114111||r>=55296&&r<=57343?"�":r===38?"&amp;":String.fromCodePoint(r)}):t}function It(t){try{t=encodeURI(t).replace(N.percentDecode,"%")}catch{return null}return t}function Dt(t,e){let n=t.replace(N.findPipe,(i,l,a)=>{let o=!1,p=l;for(;--p>=0&&a[p]==="\\";)o=!o;return o?"|":" |"}),s=n.split(N.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(N.slashPipe,"|");return s}function le(t,e,n){let s=t.length;if(s===0)return"";let r=0;for(;r<s;){let i=t.charAt(s-r-1);if(i===e&&!n)r++;else if(i!==e&&n)r++;else break}return t.slice(0,s-r)}function qt(t){let e=t.split(`
26
+ `),n=e.length-1;for(;n>=0&&N.blankLine.test(e[n]);)n--;return e.length-n<=2?t:e.slice(0,n+1).join(`
27
+ `)}function Ie(t){return t.trim().toLowerCase().toUpperCase().toLowerCase()}function Bt(t,e){if(t.indexOf(e[0])===-1&&t.indexOf(e[1])===-1)return-1;let n=0;for(let s=0;s<t.length;s++)if(t[s]==="\\")s++;else if(t[s]===e[0])n++;else if(t[s]===e[1]&&(n--,n<0))return s;return n>0?-2:-1}function nt(t,e=0){let n=e,s="";for(let r of t)if(r===" "){let i=4-n%4;s+=" ".repeat(i),n+=i}else s+=r,n++;return s}function Ft(t,e,n,s,r){let i=e.href,l=e.title||null,a=t[1].replace(r.other.outputLinkReplace,"$1"),o=t[0].charAt(0)==="!",p=s.state.inLink,u=s.state.linkEmitted,c=s.state.inRawBlock;s.state.inLink=!0,s.state.linkEmitted=!1;let d=s.inlineTokens(a),f=s.state.linkEmitted;if(s.state.linkEmitted=u,s.state.inLink=p,!o){if(f){s.state.inRawBlock=c;return}s.state.linkEmitted=!0}return{type:o?"image":"link",raw:n,href:i,title:l,text:a,tokens:d}}function Sr(t,e,n){let s=t.match(n.other.indentCodeCompensation);if(s===null)return e;let r=s[1];return e.split(`
28
28
  `).map(i=>{let l=i.match(n.other.beginningSpace);if(l===null)return i;let[a]=l;return i.slice(Math.min(a.length,r.length))}).join(`
29
- `)}function Bt(t,e,n,s){if(!e.includes("<"))return!1;for(let r=0;r<e.length;r++){if(e[r]==="\\"){r++;continue}if(e[r]==="`"){let a=s.inline.code.exec(e.slice(r));if(a){r+=a[0].length-1;continue}}if(e[r]!=="<")continue;let i=t.slice(n+r),l=s.inline.tag.exec(i)||s.inline.autolink.exec(i);if(l){if(l[0].length>e.length-r)return!0;r+=l[0].length-1}}return!1}var Ne=class{options;rules;lexer;constructor(t){this.options=t||pe}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=this.options.pedantic?e[0]:Nt(e[0]),s=n.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n,codeBlockStyle:"indented",text:s}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],s=yr(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let s=le(n,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceTabChar.test(s))&&(n=s.trim())}return{type:"heading",raw:le(e[0],`
29
+ `)}function Zt(t,e,n,s){if(!e.includes("<"))return!1;for(let r=0;r<e.length;r++){if(e[r]==="\\"){r++;continue}if(e[r]==="`"){let a=s.inline.code.exec(e.slice(r));if(a){r+=a[0].length-1;continue}}if(e[r]!=="<")continue;let i=t.slice(n+r),l=s.inline.tag.exec(i)||s.inline.autolink.exec(i);if(l){if(l[0].length>e.length-r)return!0;r+=l[0].length-1}}return!1}var De=class{options;rules;lexer;constructor(t){this.options=t||ue}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=this.options.pedantic?e[0]:qt(e[0]),s=n.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n,codeBlockStyle:"indented",text:s}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],s=Sr(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let s=le(n,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceTabChar.test(s))&&(n=s.trim())}return{type:"heading",raw:le(e[0],`
30
30
  `),depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:le(e[0],`
31
31
  `)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=le(e[0],`
32
32
  `).split(`
@@ -34,26 +34,26 @@ function Be(t){let e=t.replace(/\r\n?/g,`
34
34
  `),u=p.replace(this.rules.other.blockquoteSetextReplace,`
35
35
  $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
36
36
  ${p}`:p,r=r?`${r}
37
- ${u}`:u;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,i,!0),this.lexer.state.top=c,n.length===0)break;let h=i.at(-1);if(h?.type==="code"||h?.type==="heading"||h?.type==="hr"||h?.type==="html")break;if(h?.type==="blockquote"){let d=h,f=n.join(`
38
- `),k=d.raw+`
39
- `+f.replace(this.rules.other.blockquoteSetextReplace2,""),m=this.blockquote(k);i[i.length-1]=m;let w=k.substring(m.raw.length).replace(/^\n/,""),y=w?w.split(`
40
- `).length:0,O=y?n.slice(0,-y):n;O.length>0&&(s=`${s}
41
- ${O.join(`
42
- `)}`),r=r.substring(0,r.length-d.text.length)+m.text;break}else if(h?.type==="list"){let d=h,f=d.raw+`
37
+ ${u}`:u;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,i,!0),this.lexer.state.top=c,n.length===0)break;let d=i.at(-1);if(d?.type==="code"||d?.type==="heading"||d?.type==="hr"||d?.type==="html")break;if(d?.type==="blockquote"){let f=d,h=n.join(`
38
+ `),k=f.raw+`
39
+ `+h.replace(this.rules.other.blockquoteSetextReplace2,""),g=this.blockquote(k);i[i.length-1]=g;let x=k.substring(g.raw.length).replace(/^\n/,""),w=x?x.split(`
40
+ `).length:0,j=w?n.slice(0,-w):n;j.length>0&&(s=`${s}
41
+ ${j.join(`
42
+ `)}`),r=r.substring(0,r.length-f.text.length)+g.text;break}else if(d?.type==="list"){let f=d,h=f.raw+`
43
43
  `+n.join(`
44
- `),k=this.list(f);i[i.length-1]=k,s=s.substring(0,s.length-h.raw.length)+k.raw,r=r.substring(0,r.length-d.raw.length)+k.raw,n=f.substring(i.at(-1).raw.length).split(`
45
- `);continue}}return{type:"blockquote",raw:s,tokens:i,text:r}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=t,s=()=>n.length-t.length,r=e[1].trim(),i=r.length>1,l={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let a=this.rules.other.listItemRegex(r),o=!1;for(;t;){let u=!1,c="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;let h=s();t=t.substring(e[0].length);let d=e[2].split(`
46
- `,1)[0],f=e[1].length,k=this.options.pedantic?et(d,f):d.replace(this.rules.other.leadingSpaceTab,U=>et(U,f)),m=t.split(`
47
- `,1)[0],w=!k.trim(),y=0;if(this.options.pedantic?(y=2,c=k.trimStart()):w?y=f+1:(y=k.search(this.rules.other.nonSpaceChar),y=y>4?1:y,c=k.slice(y),y+=f),w&&this.rules.other.blankLine.test(m)&&(t=t.substring(m.length+1),u=!0),!u){let U=this.rules.other.nextBulletRegex(y),N=this.rules.other.hrRegex(y),P=this.rules.other.fencesBeginRegex(y),T=this.rules.other.headingBeginRegex(y),F=this.rules.other.htmlBeginRegex(y),X=this.rules.other.blockquoteBeginRegex(y);for(;t;){let D=t.split(`
48
- `,1)[0],K;if(m=D,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),K=m):K=m.replace(this.rules.other.leadingSpaceTab,J=>et(J)),P.test(m)||T.test(m)||F.test(m)||X.test(m)||U.test(m)||N.test(m))break;if(K.search(this.rules.other.nonSpaceChar)>=y||!m.trim())c+=`
49
- `+K.slice(y);else{if(w||k.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||P.test(k)||T.test(k)||N.test(k))break;c+=`
50
- `+m}w=!m.trim(),t=t.substring(D.length+1),k=K.slice(y)}}let O=n.slice(h,s());l.loose||(o?l.loose=!0:this.rules.other.doubleBlankLine.test(O)&&(o=!0)),l.items.push({type:"list_item",raw:O,task:!!this.options.gfm&&this.rules.other.listIsTask.test(c),loose:!1,text:c,tokens:[]})}let p=l.items.at(-1);if(p)p.raw=p.raw.trimEnd(),p.text=p.text.trimEnd();else return;l.raw=n.slice(0,s()).trimEnd();for(let u of l.items)if(this.lexer.state.top=!1,u.tokens=this.lexer.blockTokens(u.text,[]),!l.loose){let c=u.tokens.filter(d=>d.type==="space"),h=c.length>0&&c.some(d=>this.rules.other.anyLine.test(d.raw));l.loose=h}for(let u of l.items){let c=u.tokens[0];if(u.task&&(c?.type==="text"||c?.type==="paragraph")){u.text=u.text.replace(this.rules.other.listReplaceTask,""),c.raw=c.raw.replace(this.rules.other.listReplaceTask,""),c.text=c.text.replace(this.rules.other.listReplaceTask,"");for(let d=this.lexer.inlineQueue.length-1;d>=0;d--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[d].src)){this.lexer.inlineQueue[d].src=this.lexer.inlineQueue[d].src.replace(this.rules.other.listReplaceTask,"");break}let h=this.rules.other.listTaskCheckbox.exec(u.raw);if(h){let d={type:"checkbox",raw:h[0]+" ",checked:h[0]!=="[ ]"};u.checked=d.checked,l.loose?u.tokens[0]&&["paragraph","text"].includes(u.tokens[0].type)&&"tokens"in u.tokens[0]&&u.tokens[0].tokens?(u.tokens[0].raw=d.raw+u.tokens[0].raw,u.tokens[0].text=d.raw+u.tokens[0].text,u.tokens[0].tokens.unshift(d)):u.tokens.unshift({type:"paragraph",raw:d.raw,text:d.raw,tokens:[d]}):u.tokens.unshift(d)}}else u.task&&(u.task=!1)}if(l.loose)for(let u of l.items){u.loose=!0;for(let c of u.tokens)c.type==="text"&&(c.type="paragraph")}return l}}html(t){let e=this.rules.block.html.exec(t);if(e){let n=Nt(e[0]);return{type:"html",block:!0,raw:n,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:n}}}def(t){let e=this.rules.block.def.exec(t);if(e){if(!this.rules.other.startAngleBracket.test(e[2])&&Dt(e[2],"()")!==-1)return;let n=je(e[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:le(e[0],`
51
- `),href:s,title:r}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=jt(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
44
+ `),k=this.list(h);i[i.length-1]=k,s=s.substring(0,s.length-d.raw.length)+k.raw,r=r.substring(0,r.length-f.raw.length)+k.raw,n=h.substring(i.at(-1).raw.length).split(`
45
+ `);continue}}return{type:"blockquote",raw:s,tokens:i,text:r}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=t,s=()=>n.length-t.length,r=e[1].trim(),i=r.length>1,l={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let a=this.rules.other.listItemRegex(r),o=!1;for(;t;){let u=!1,c="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;let d=s();t=t.substring(e[0].length);let f=e[2].split(`
46
+ `,1)[0],h=e[1].length,k=this.options.pedantic?nt(f,h):f.replace(this.rules.other.leadingSpaceTab,H=>nt(H,h)),g=t.split(`
47
+ `,1)[0],x=!k.trim(),w=0;if(this.options.pedantic?(w=2,c=k.trimStart()):x?w=h+1:(w=k.search(this.rules.other.nonSpaceChar),w=w>4?1:w,c=k.slice(w),w+=h),x&&this.rules.other.blankLine.test(g)&&(t=t.substring(g.length+1),u=!0),!u){let H=this.rules.other.nextBulletRegex(w),q=this.rules.other.hrRegex(w),E=this.rules.other.fencesBeginRegex(w),T=this.rules.other.headingBeginRegex(w),Z=this.rules.other.htmlBeginRegex(w),K=this.rules.other.blockquoteBeginRegex(w);for(;t;){let B=t.split(`
48
+ `,1)[0],J;if(g=B,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),J=g):J=g.replace(this.rules.other.leadingSpaceTab,ee=>nt(ee)),E.test(g)||T.test(g)||Z.test(g)||K.test(g)||H.test(g)||q.test(g))break;if(J.search(this.rules.other.nonSpaceChar)>=w||!g.trim())c+=`
49
+ `+J.slice(w);else{if(x||k.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(k)||T.test(k)||q.test(k))break;c+=`
50
+ `+g}x=!g.trim(),t=t.substring(B.length+1),k=J.slice(w)}}let j=n.slice(d,s());l.loose||(o?l.loose=!0:this.rules.other.doubleBlankLine.test(j)&&(o=!0)),l.items.push({type:"list_item",raw:j,task:!!this.options.gfm&&this.rules.other.listIsTask.test(c),loose:!1,text:c,tokens:[]})}let p=l.items.at(-1);if(p)p.raw=p.raw.trimEnd(),p.text=p.text.trimEnd();else return;l.raw=n.slice(0,s()).trimEnd();for(let u of l.items)if(this.lexer.state.top=!1,u.tokens=this.lexer.blockTokens(u.text,[]),!l.loose){let c=u.tokens.filter(f=>f.type==="space"),d=c.length>0&&c.some(f=>this.rules.other.anyLine.test(f.raw));l.loose=d}for(let u of l.items){let c=u.tokens[0];if(u.task&&(c?.type==="text"||c?.type==="paragraph")){u.text=u.text.replace(this.rules.other.listReplaceTask,""),c.raw=c.raw.replace(this.rules.other.listReplaceTask,""),c.text=c.text.replace(this.rules.other.listReplaceTask,"");for(let f=this.lexer.inlineQueue.length-1;f>=0;f--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[f].src)){this.lexer.inlineQueue[f].src=this.lexer.inlineQueue[f].src.replace(this.rules.other.listReplaceTask,"");break}let d=this.rules.other.listTaskCheckbox.exec(u.raw);if(d){let f={type:"checkbox",raw:d[0]+" ",checked:d[0]!=="[ ]"};u.checked=f.checked,l.loose?u.tokens[0]&&["paragraph","text"].includes(u.tokens[0].type)&&"tokens"in u.tokens[0]&&u.tokens[0].tokens?(u.tokens[0].raw=f.raw+u.tokens[0].raw,u.tokens[0].text=f.raw+u.tokens[0].text,u.tokens[0].tokens.unshift(f)):u.tokens.unshift({type:"paragraph",raw:f.raw,text:f.raw,tokens:[f]}):u.tokens.unshift(f)}}else u.task&&(u.task=!1)}if(l.loose)for(let u of l.items){u.loose=!0;for(let c of u.tokens)c.type==="text"&&(c.type="paragraph")}return l}}html(t){let e=this.rules.block.html.exec(t);if(e){let n=qt(e[0]);return{type:"html",block:!0,raw:n,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:n}}}def(t){let e=this.rules.block.def.exec(t);if(e){if(!this.rules.other.startAngleBracket.test(e[2])&&Bt(e[2],"()")!==-1)return;let n=Ie(e[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:le(e[0],`
51
+ `),href:s,title:r}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=Dt(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
52
52
  `):[],i={type:"table",raw:le(e[0],`
53
- `),header:[],align:[],rows:[]};if(n.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?i.align.push("right"):this.rules.other.tableAlignCenter.test(l)?i.align.push("center"):this.rules.other.tableAlignLeft.test(l)?i.align.push("left"):i.align.push(null);for(let l=0;l<n.length;l++)i.header.push({text:n[l],tokens:this.lexer.inline(n[l]),header:!0,align:i.align[l]});for(let l of r)i.rows.push(jt(l,i.header.length).map((a,o)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:i.align[o]})));return i}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e){let n=e[1].trim();return{type:"heading",raw:le(e[0],`
53
+ `),header:[],align:[],rows:[]};if(n.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?i.align.push("right"):this.rules.other.tableAlignCenter.test(l)?i.align.push("center"):this.rules.other.tableAlignLeft.test(l)?i.align.push("left"):i.align.push(null);for(let l=0;l<n.length;l++)i.header.push({text:n[l],tokens:this.lexer.inline(n[l]),header:!0,align:i.align[l]});for(let l of r)i.rows.push(Dt(l,i.header.length).map((a,o)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:i.align[o]})));return i}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e){let n=e[1].trim();return{type:"heading",raw:le(e[0],`
54
54
  `),depth:e[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let n=e[1].charAt(e[1].length-1)===`
55
- `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){if(this.lexer.state.linkParenPossible===!1)return;let e=this.rules.inline.link.exec(t);if(e){let n=e[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Bt(t,e[1],n,this.rules))return;let s=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(s)){if(!this.rules.other.endAngleBracket.test(s))return;let l=le(s.slice(0,-1),"\\");if((s.length-l.length)%2===0)return}else{let l=Dt(e[2],"()");if(l===-2)return;if(l>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+l;e[2]=e[2].substring(0,l),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(r);l&&(r=l[1],i=l[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(s)?r=r.slice(1):r=r.slice(1,-1)),qt(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let s=n[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Bt(t,n[1],s,this.rules))return;let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[je(r)];if(!i){let l=n[0].charAt(0);return{type:"text",raw:l,text:l}}return qt(n,i,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,i,l,a=r,o=0,p=s[0][0],u=n===p,c=p==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,e=e.slice(-1*t.length+r);(s=c.exec(e))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i)continue;if(l=[...i].length,s[3]||s[4]){a+=l;continue}else if(s[5]||s[6]){if(r%3&&!((r+l)%3)){o+=l;continue}if(u)break}if(a-=l,a>0)continue;l=Math.min(l,l+a+o);let h=[...s[0]][0].length,d=t.slice(0,r+s.index+h+l);if(Math.min(r,l)%2){let k=d.slice(1,-1);return{type:"em",raw:d,text:k,tokens:this.lexer.inlineTokens(k)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return s&&r&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t,e,n=""){let s=this.rules.inline.delLDelim.exec(t);if(s&&(!s[1]||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,i,l,a=r,o=this.rules.inline.delRDelim;for(o.lastIndex=0,e=e.slice(-1*t.length+r);(s=o.exec(e))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i||(l=[...i].length,l!==r))continue;if(s[3]||s[4]){a+=l;continue}if(a-=l,a>0)continue;l=Math.min(l,l+a);let p=[...s[0]][0].length,u=t.slice(0,r+s.index+p+l),c=u.slice(r,-r);return{type:"del",raw:u,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,s;return e[2]==="@"?(n=e[1],s="mailto:"+n):(n=e[1],s=n),{type:"link",raw:e[0],text:n,href:s,autolink:!0,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let n,s;if(e[2]==="@")n=e[0],s="mailto:"+n;else{let r;do r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(r!==e[0]);n=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:n,href:s,autolink:!0,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:n?e[0]:xr(e[0]),escaped:n}}}},Q=class nt{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||pe,this.options.tokenizer=this.options.tokenizer||new Ne,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let n={other:_,block:Oe.normal,inline:be.normal};this.options.pedantic?(n.block=Oe.pedantic,n.inline=be.pedantic):this.options.gfm&&(n.block=Oe.gfm,this.options.breaks?n.inline=be.breaks:n.inline=be.gfm),this.tokenizer.rules=n}static get rules(){return{block:Oe,inline:be}}static lex(e,n){return new nt(n).lex(e)}static lexInline(e,n){return new nt(n).inlineTokens(e)}lex(e){e=e.replace(_.carriageReturn,`
56
- `),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let s=this.inlineQueue[n];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],s=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(_.tabCharGlobal," ").replace(_.spaceLine,""));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(a=>(i=a.call({lexer:this},e,n))?(e=e.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let a=n.at(-1);i.raw.length===1&&a!==void 0?a.raw+=`
55
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){if(this.lexer.state.linkParenPossible===!1)return;let e=this.rules.inline.link.exec(t);if(e){let n=e[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Zt(t,e[1],n,this.rules))return;let s=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(s)){if(!this.rules.other.endAngleBracket.test(s))return;let l=le(s.slice(0,-1),"\\");if((s.length-l.length)%2===0)return}else{let l=Bt(e[2],"()");if(l===-2)return;if(l>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+l;e[2]=e[2].substring(0,l),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(r);l&&(r=l[1],i=l[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(s)?r=r.slice(1):r=r.slice(1,-1)),Ft(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let s=n[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Zt(t,n[1],s,this.rules))return;let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[Ie(r)];if(!i){let l=n[0].charAt(0);return{type:"text",raw:l,text:l}}return Ft(n,i,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,i,l,a=r,o=0,p=s[0][0],u=n===p,c=p==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,e=e.slice(-1*t.length+r);(s=c.exec(e))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i)continue;if(l=[...i].length,s[3]||s[4]){a+=l;continue}else if(s[5]||s[6]){if(r%3&&!((r+l)%3)){o+=l;continue}if(u)break}if(a-=l,a>0)continue;l=Math.min(l,l+a+o);let d=[...s[0]][0].length,f=t.slice(0,r+s.index+d+l);if(Math.min(r,l)%2){let k=f.slice(1,-1);return{type:"em",raw:f,text:k,tokens:this.lexer.inlineTokens(k)}}let h=f.slice(2,-2);return{type:"strong",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return s&&r&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t,e,n=""){let s=this.rules.inline.delLDelim.exec(t);if(s&&(!s[1]||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,i,l,a=r,o=this.rules.inline.delRDelim;for(o.lastIndex=0,e=e.slice(-1*t.length+r);(s=o.exec(e))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i||(l=[...i].length,l!==r))continue;if(s[3]||s[4]){a+=l;continue}if(a-=l,a>0)continue;l=Math.min(l,l+a);let p=[...s[0]][0].length,u=t.slice(0,r+s.index+p+l),c=u.slice(r,-r);return{type:"del",raw:u,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,s;return e[2]==="@"?(n=e[1],s="mailto:"+n):(n=e[1],s=n),{type:"link",raw:e[0],text:n,href:s,autolink:!0,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let n,s;if(e[2]==="@")n=e[0],s="mailto:"+n;else{let r;do r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(r!==e[0]);n=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:n,href:s,autolink:!0,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:n?e[0]:wr(e[0]),escaped:n}}}},V=class st{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||ue,this.options.tokenizer=this.options.tokenizer||new De,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let n={other:N,block:Ne.normal,inline:ye.normal};this.options.pedantic?(n.block=Ne.pedantic,n.inline=ye.pedantic):this.options.gfm&&(n.block=Ne.gfm,this.options.breaks?n.inline=ye.breaks:n.inline=ye.gfm),this.tokenizer.rules=n}static get rules(){return{block:Ne,inline:ye}}static lex(e,n){return new st(n).lex(e)}static lexInline(e,n){return new st(n).inlineTokens(e)}lex(e){e=e.replace(N.carriageReturn,`
56
+ `),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let s=this.inlineQueue[n];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],s=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(N.tabCharGlobal," ").replace(N.spaceLine,""));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(a=>(i=a.call({lexer:this},e,n))?(e=e.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let a=n.at(-1);i.raw.length===1&&a!==void 0?a.raw+=`
57
57
  `:n.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let a=n.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
58
58
  `)?"":`
59
59
  `)+i.raw,a.text+=`
@@ -66,9 +66,9 @@ ${O.join(`
66
66
  `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(i),s=l.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let a=n.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
67
67
  `)?"":`
68
68
  `)+i.raw,a.text+=`
69
- `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}linkInText(e){if(!e.includes("["))return!1;let n=this.tokenizer.rules.inline.link;for(let s of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(n.test(s[0])&&e.charAt(s.index-1)!=="!")return!0;for(let s of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let r=s[0],i=r.lastIndexOf("[");if(!(r.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,je(r.slice(i+1,-1))))&&!(i>1&&this.linkInText(r.slice(1,i-1))))return!0}return!1}inlineTokens(e,n=[]){this.tokenizer.lexer=this;let s=this.state.linkParenPossible;this.state.linkParenPossible=s&&e.includes(")");try{return this.#e(e,n)}finally{this.state.linkParenPossible=s}}#e(e,n){let s=e;if(this.tokens.links&&e.includes("[")){let a=this.tokenizer.rules.inline.reflinkSearch,o=p=>{let u=p.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,je(p.slice(u+1,-1))))return p;if(u>1&&p.charAt(0)!=="!"){let c=p.slice(1,u-1);if(this.linkInText(c))return"["+c.replace(a,o)+"]["+"a".repeat(p.length-u-2)+"]"}return"["+"a".repeat(p.length-2)+"]"};s=s.replace(a,o)}s=s.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(a,o,p)=>p?"+".repeat(a.length):o?o+a.slice(o.length,-o.length).replace(/`/g,"+")+o:a),s=s.replace(this.tokenizer.rules.inline.blockSkip,(a,o,p)=>{let u=p?p.length:0;return a.slice(0,u)+"["+"a".repeat(a.length-u-2)+"]"}),s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let r=!1,i="",l=1/0;for(;e;){if(e.length<l)l=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=""),r=!1;let a;if(this.options.extensions?.inline?.some(p=>(a=p.call({lexer:this},e,n))?(e=e.substring(a.raw.length),n.push(a),!0):!1))continue;if(a=this.tokenizer.escape(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.tag(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.link(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(a.raw.length);let p=n.at(-1);a.type==="text"&&p?.type==="text"?(p.raw+=a.raw,p.text+=a.text):n.push(a);continue}if(a=this.tokenizer.emStrong(e,s,i)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.codespan(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.br(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.del(e,s,i)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.autolink(e)){e=e.substring(a.raw.length),n.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(e))){e=e.substring(a.raw.length),n.push(a);continue}let o=e;if(this.options.extensions?.startInline){let p=1/0,u=e.slice(1),c;this.options.extensions.startInline.forEach(h=>{c=h.call({lexer:this},u),typeof c=="number"&&c>=0&&(p=Math.min(p,c))}),p<1/0&&p>=0&&(o=e.substring(0,p+1))}if(a=this.tokenizer.inlineText(o)){e=e.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(i=a.raw.slice(-1)),r=!0;let p=n.at(-1);p?.type==="text"?(p.raw+=a.raw,p.text+=a.text):n.push(a);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return n}infiniteLoopError(e){let n="Infinite loop on byte: "+e;if(this.options.silent)console.error(n);else throw new Error(n)}},De=class{options;parser;constructor(t){this.options=t||pe}space(t){return""}code({text:t,lang:e,escaped:n}){let s=(e||"").match(_.notSpaceStart)?.[0],r=t?t.replace(_.endingNewline,"")+`
70
- `:"";return s?'<pre><code class="language-'+G(s)+'">'+(n?r:G(r,!0))+`</code></pre>
71
- `:"<pre><code>"+(n?r:G(r,!0))+`</code></pre>
69
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}linkInText(e){if(!e.includes("["))return!1;let n=this.tokenizer.rules.inline.link;for(let s of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(n.test(s[0])&&e.charAt(s.index-1)!=="!")return!0;for(let s of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let r=s[0],i=r.lastIndexOf("[");if(!(r.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,Ie(r.slice(i+1,-1))))&&!(i>1&&this.linkInText(r.slice(1,i-1))))return!0}return!1}inlineTokens(e,n=[]){this.tokenizer.lexer=this;let s=this.state.linkParenPossible;this.state.linkParenPossible=s&&e.includes(")");try{return this.#e(e,n)}finally{this.state.linkParenPossible=s}}#e(e,n){let s=e;if(this.tokens.links&&e.includes("[")){let a=this.tokenizer.rules.inline.reflinkSearch,o=p=>{let u=p.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,Ie(p.slice(u+1,-1))))return p;if(u>1&&p.charAt(0)!=="!"){let c=p.slice(1,u-1);if(this.linkInText(c))return"["+c.replace(a,o)+"]["+"a".repeat(p.length-u-2)+"]"}return"["+"a".repeat(p.length-2)+"]"};s=s.replace(a,o)}s=s.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(a,o,p)=>p?"+".repeat(a.length):o?o+a.slice(o.length,-o.length).replace(/`/g,"+")+o:a),s=s.replace(this.tokenizer.rules.inline.blockSkip,(a,o,p)=>{let u=p?p.length:0;return a.slice(0,u)+"["+"a".repeat(a.length-u-2)+"]"}),s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let r=!1,i="",l=1/0;for(;e;){if(e.length<l)l=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=""),r=!1;let a;if(this.options.extensions?.inline?.some(p=>(a=p.call({lexer:this},e,n))?(e=e.substring(a.raw.length),n.push(a),!0):!1))continue;if(a=this.tokenizer.escape(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.tag(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.link(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(a.raw.length);let p=n.at(-1);a.type==="text"&&p?.type==="text"?(p.raw+=a.raw,p.text+=a.text):n.push(a);continue}if(a=this.tokenizer.emStrong(e,s,i)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.codespan(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.br(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.del(e,s,i)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.autolink(e)){e=e.substring(a.raw.length),n.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(e))){e=e.substring(a.raw.length),n.push(a);continue}let o=e;if(this.options.extensions?.startInline){let p=1/0,u=e.slice(1),c;this.options.extensions.startInline.forEach(d=>{c=d.call({lexer:this},u),typeof c=="number"&&c>=0&&(p=Math.min(p,c))}),p<1/0&&p>=0&&(o=e.substring(0,p+1))}if(a=this.tokenizer.inlineText(o)){e=e.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(i=a.raw.slice(-1)),r=!0;let p=n.at(-1);p?.type==="text"?(p.raw+=a.raw,p.text+=a.text):n.push(a);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return n}infiniteLoopError(e){let n="Infinite loop on byte: "+e;if(this.options.silent)console.error(n);else throw new Error(n)}},qe=class{options;parser;constructor(t){this.options=t||ue}space(t){return""}code({text:t,lang:e,escaped:n}){let s=(e||"").match(N.notSpaceStart)?.[0],r=t?t.replace(N.endingNewline,"")+`
70
+ `:"";return s?'<pre><code class="language-'+Q(s)+'">'+(n?r:Q(r,!0))+`</code></pre>
71
+ `:"<pre><code>"+(n?r:Q(r,!0))+`</code></pre>
72
72
  `}blockquote({tokens:t}){return`<blockquote>
73
73
  ${this.parser.parse(t)}</blockquote>
74
74
  `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
@@ -84,31 +84,31 @@ ${this.parser.parse(t)}</blockquote>
84
84
  `}tablerow({text:t}){return`<tr>
85
85
  ${t}</tr>
86
86
  `}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
87
- `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${G(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,text:n,tokens:s,autolink:r}){let i=r?G(n,!0):this.parser.parseInline(s),l=It(t);if(l===null)return i;t=G(l,r);let a='<a href="'+t+'"';return e&&(a+=' title="'+G(e)+'"'),a+=">"+i+"</a>",a}image({href:t,title:e,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));let r=It(t);if(r===null)return G(n);t=r;let i=`<img src="${G(t)}" alt="${G(n)}"`;return e&&(i+=` title="${G(e)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:G(t.text)}},ut=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},Y=class rt{options;renderer;textRenderer;constructor(e){this.options=e||pe,this.options.renderer=this.options.renderer||new De,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ut}static parse(e,n){return new rt(n).parse(e)}static parseInline(e,n){return new rt(n).parseInline(e)}parse(e){this.renderer.parser=this;let n="";for(let s=0;s<e.length;s++){let r=e[s];if(this.options.extensions?.renderers?.[r.type]){let l=r,a=this.options.extensions.renderers[l.type].call({parser:this},l);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(l.type)){n+=a||"";continue}}let i=r;switch(i.type){case"space":{n+=this.renderer.space(i);break}case"hr":{n+=this.renderer.hr(i);break}case"heading":{n+=this.renderer.heading(i);break}case"code":{n+=this.renderer.code(i);break}case"table":{n+=this.renderer.table(i);break}case"blockquote":{n+=this.renderer.blockquote(i);break}case"list":{n+=this.renderer.list(i);break}case"checkbox":{n+=this.renderer.checkbox(i);break}case"html":{n+=this.renderer.html(i);break}case"def":{n+=this.renderer.def(i);break}case"paragraph":{n+=this.renderer.paragraph(i);break}case"text":{n+=this.renderer.text(i);break}default:{let l='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}parseInline(e,n=this.renderer){this.renderer.parser=this;let s="";for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let a=this.options.extensions.renderers[i.type].call({parser:this},i);if(a!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(i.type)){s+=a||"";continue}}let l=i;switch(l.type){case"escape":{s+=n.text(l);break}case"html":{s+=n.html(l);break}case"link":{s+=n.link(l);break}case"image":{s+=n.image(l);break}case"checkbox":{s+=n.checkbox(l);break}case"strong":{s+=n.strong(l);break}case"em":{s+=n.em(l);break}case"codespan":{s+=n.codespan(l);break}case"br":{s+=n.br(l);break}case"del":{s+=n.del(l);break}case"text":{s+=n.text(l);break}default:{let a='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return s}},xe=class{options;block;constructor(t){this.options=t||pe}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?Q.lex:Q.lexInline}provideParser(t=this.block){return t?Y.parse:Y.parseInline}};function ae(t,e){if(Array.isArray(e))for(let n=0;n<e.length;n++)t.push(e[n]);else t.push(e)}var wr=class{defaults=st();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Y;Renderer=De;TextRenderer=ut;Lexer=Q;Tokenizer=Ne;Hooks=xe;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(let s of t)switch(ae(n,e.call(this,s)),s.type){case"table":{let r=s;for(let i of r.header)ae(n,this.walkTokens(i.tokens,e));for(let i of r.rows)for(let l of i)ae(n,this.walkTokens(l.tokens,e));break}case"list":{let r=s;ae(n,this.walkTokens(r.items,e));break}default:{let r=s;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(i=>{let l=r[i].flat(1/0);ae(n,this.walkTokens(l,e))}):r.tokens&&ae(n,this.walkTokens(r.tokens,e))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let i=e.renderers[r.name];i?e.renderers[r.name]=function(...l){let a=r.renderer.apply(this,l);return a===!1&&(a=i.apply(this,l)),a}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=e[r.level];i?i.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),s.extensions=e),n.renderer){let r=this.defaults.renderer||new De(this.defaults);for(let i in n.renderer){if(!(i in r))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let l=i,a=n.renderer[l],o=r[l];r[l]=(...p)=>{let u=a.apply(r,p);return u===!1&&(u=o.apply(r,p)),u||""}}s.renderer=r}if(n.tokenizer){let r=this.defaults.tokenizer||new Ne(this.defaults);for(let i in n.tokenizer){if(!(i in r))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let l=i,a=n.tokenizer[l],o=r[l];r[l]=(...p)=>{let u=a.apply(r,p);return u===!1&&(u=o.apply(r,p)),u}}s.tokenizer=r}if(n.hooks){let r=this.defaults.hooks||new xe;for(let i in n.hooks){if(!(i in r))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let l=i,a=n.hooks[l],o=r[l];xe.passThroughHooks.has(i)?r[l]=p=>{if(this.defaults.async&&xe.passThroughHooksRespectAsync.has(i))return(async()=>{let c=await a.call(r,p);return o.call(r,c)})();let u=a.call(r,p);return o.call(r,u)}:r[l]=(...p)=>{if(this.defaults.async)return(async()=>{let c=await a.apply(r,p);return c===!1&&(c=await o.apply(r,p)),c})();let u=a.apply(r,p);return u===!1&&(u=o.apply(r,p)),u}}s.hooks=r}if(n.walkTokens){let r=this.defaults.walkTokens,i=n.walkTokens;s.walkTokens=function(l){let a=[];return a.push(i.call(this,l)),r&&ae(a,r.call(this,l)),a}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Q.lex(t,e??this.defaults)}parser(t,e){return Y.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let s={...n},r={...this.defaults,...s},i=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&s.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=t),r.async)return(async()=>{let l=r.hooks?await r.hooks.preprocess(e):e,a=await(r.hooks?await r.hooks.provideLexer(t):t?Q.lex:Q.lexInline)(l,r),o=r.hooks?await r.hooks.processAllTokens(a):a;r.walkTokens&&await Promise.all(this.walkTokens(o,r.walkTokens));let p=await(r.hooks?await r.hooks.provideParser(t):t?Y.parse:Y.parseInline)(o,r);return r.hooks?await r.hooks.postprocess(p):p})().catch(i);try{r.hooks&&(e=r.hooks.preprocess(e));let l=(r.hooks?r.hooks.provideLexer(t):t?Q.lex:Q.lexInline)(e,r);r.hooks&&(l=r.hooks.processAllTokens(l)),r.walkTokens&&this.walkTokens(l,r.walkTokens);let a=(r.hooks?r.hooks.provideParser(t):t?Y.parse:Y.parseInline)(l,r);return r.hooks&&(a=r.hooks.postprocess(a)),a}catch(l){return i(l)}}}onError(t,e){return n=>{if(n.message+=`
88
- Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+G(n.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(n);throw n}}},ce=new wr;function R(t,e){return ce.parse(t,e)}R.options=R.setOptions=function(t){return ce.setOptions(t),R.defaults=ce.defaults,Ft(R.defaults),R};R.getDefaults=st;R.defaults=pe;function Sr(...t){return ce.use(...t),R.defaults=ce.defaults,Ft(R.defaults),R}R.use=Sr;R.walkTokens=function(t,e){return ce.walkTokens(t,e)};R.parseInline=ce.parseInline;R.Parser=Y;R.parser=Y.parse;R.Renderer=De;R.TextRenderer=ut;R.Lexer=Q;R.lexer=Q.lex;R.Tokenizer=Ne;R.Hooks=xe;R.parse=R;var es=R.options,ts=R.setOptions,ns=R.walkTokens,rs=R.parseInline;var ss=Y.parse,is=Q.lex;var $r=/^(ar|he|fa|ur|ps|sd|ug|yi|dv|ckb)\b/i,Ar={back:"M15 5l-7 7 7 7",next:"M9 5l7 7-7 7",present:"M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5",presenter:"M3 5h12v9H3zM18 8h3M18 12h3M6 19h6",grid:"M4 4h6v6H4zM14 4h6v6h-6zM4 14h6v6H4zM14 14h6v6h-6z",edit:"M4 20h4L19 9l-4-4L4 16zM13.5 6.5l4 4",scheme:"M12 3a9 9 0 1 0 9 9 7 7 0 0 1-9-9z",export:"M12 4v11M7 10l5 5 5-5M5 20h14"};function Cr(t){let e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("viewBox","0 0 24 24"),e.setAttribute("aria-hidden","true"),(t==="back"||t==="next")&&e.setAttribute("class","deck-flip");let n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d",Ar[t]),e.append(n),e}function vr(t,e){let n=e.source.replace(/\r\n?/g,`
89
- `),s=Ee(n),r=0,i=0,l=[],a=String(e.lang??s.settings.lang??document.documentElement.lang??"en")||"en",o=String(e.dir??s.settings.dir??($r.test(a)?"rtl":"ltr")),p={...zt(a),...e.strings},u=new Intl.NumberFormat(a).format,c=matchMedia("(prefers-color-scheme: dark)"),h="light",d=Date.now();t.classList.add("deck"),t.lang=a,t.dir=o;let f=x("div",{class:"deck-stage",tabindex:0,role:"region","aria-roledescription":p.carousel,"aria-label":p.deck}),k=x("span",{class:"deck-where","aria-live":"polite"}),m=(g,b,A)=>{let L=x("button",{type:"button","aria-label":b,"data-act":g},[Cr(g)]);return L.addEventListener("click",A),L},w=m("back",p.previous,()=>$(-1)),y=m("next",p.next,()=>$(1)),O=m("edit",p.edit,()=>H("is-editing")),U=m("presenter",p.presenter,()=>H("is-presenting")),N=m("grid",p.overview,()=>H("is-overview")),P=x("div",{class:"deck-bar"},[w,k,y,x("span",{class:"deck-gap"}),N,U,e.editable===!1?null:O,m("scheme",p.scheme,()=>{h=h==="dark"?"light":"dark",q()}),e.onExport?m("export",p.export,()=>e.onExport?.(wt)):null,document.fullscreenEnabled?m("present",p.present,()=>ue()):null]),T=x("textarea",{class:"deck-source",spellcheck:"false","aria-label":p.source,dir:"auto"}),F=x("div",{class:"deck-next"}),X=x("div",{class:"deck-notes",dir:"auto","aria-label":p.notes}),D=x("span",{class:"deck-clock"}),K=x("div",{class:"deck-presenter"},[F,X]);t.replaceChildren(T,f,K,P),P.insertBefore(D,P.querySelector(".deck-gap"));let J=[],Ae=()=>{let g=ze(e.kit,s.settings.kit);return J=g.problems,g.kit};function q(){te.kit=Ae();let g=Ye(s.settings,te.kit.tokens),b=Je(g,h),A=E=>E.map(M=>/^[\w-]+$/.test(M)?M:`"${M.replace(/["\\]/g,"")}"`).join(", "),L=g.fonts?{heading:A(g.fonts.heading),body:A(g.fonts.body)}:Ke[g.voice];for(let[E,M]of Object.entries({paper:b.paper,ink:b.ink,muted:b.muted,line:b.line,primary:b.primary,fill:g.primary,"on-fill":b.onPrimary,soft:b.soft,heading:L.heading,body:L.body,radius:`${g.radius}px`,...Object.fromEntries(b.series.map((j,z)=>[`series-${z+1}`,j]))}))t.style.setProperty(`--deck-${E}`,M);t.dataset.scheme=h,t.dispatchEvent(new CustomEvent("deck-scheme",{detail:{scheme:h,colours:b,tokens:g}}))}let re=()=>{let g=e.scheme??s.settings.colorSchema??"auto";h=g==="dark"||g==="auto"&&c.matches?"dark":"light"},te={blocks:e.blocks??{},resolve:e.resolve??(g=>g),headings:e.headings??"real",number:g=>u(g),total:0,kit:ze().kit,lex:e.lex??(g=>new Q({gfm:!0}).lex(g)),slide:p.slide};function me(){te.total=s.slides.length,l=s.slides.map(g=>Le(g,te));for(let[g,{element:b}]of l.entries())b.setAttribute("aria-label",p.where.replace("{n}",u(g+1)).replace("{count}",u(l.length))),b.addEventListener("click",()=>{t.classList.contains("is-overview")&&(H("is-overview"),I(g,0))});f.replaceChildren(...l.map(({element:g})=>g)),r=Math.min(r,l.length-1),B(),requestAnimationFrame(()=>C())}function C(){for(let{element:g}of l)v(g)}function v(g){let b=!1;for(let A of g.querySelectorAll(".deck-slot")){let L=1;for(A.style.setProperty("--deck-fit","1");A.scrollHeight>A.clientHeight+1&&L>.6;)A.style.setProperty("--deck-fit",String(L=Math.round((L-.05)*100)/100));A.scrollHeight>A.clientHeight+1&&(b=!0)}b?g.dataset.overflow="true":delete g.dataset.overflow}function B(){for(let[b,{element:A,steps:L}]of l.entries()){A.classList.toggle("is-shown",b===r),A.inert=b!==r&&!t.classList.contains("is-overview");for(let E of A.querySelectorAll(".deck-step"))E.classList.toggle("is-on",b<r||b===r&&Number(E.getAttribute("data-step"))<=i||L===0)}k.textContent=`${u(r+1)} / ${u(l.length)}`,w.toggleAttribute("disabled",r===0&&i===0),y.toggleAttribute("disabled",r>=l.length-1&&i>=(l[r]?.steps??0)),X.textContent=s.slides[r]?.notes||p.noNotes;let g=s.slides[r+1];F.replaceChildren(x("span",{},[g?p.upNext:p.last]),...g?[Le(g,te).element]:[]),t.dispatchEvent(new CustomEvent("deck-move",{detail:{at:r,step:i}}))}function $(g){let b=l[r]?.steps??0;if(g>0&&i<b){i++,B();return}if(g<0&&i>0){i--,B();return}let A=r+g;A<0||A>=l.length||I(A,g>0?0:l[A].steps)}function I(g,b=0){if(g===r){i=b,B();return}let A=g>r,L=s.slides[A?g:r]?.settings??{},E=String(L.transition??s.settings.transition??"none"),[M,j]=E.split("|").map(Ce=>Ce.trim()),z=A?M:j??M;o==="rtl"&&(z=z.replace(/-(left|right)$/,(Ce,ve)=>ve==="left"?"-right":"-left")),z==="view-transition"&&(z="morph");let se=()=>{r=g,i=b,z==="morph"&&Z(l[g].element),B()},on=matchMedia("(prefers-reduced-motion: reduce)").matches;if(!document.startViewTransition||z==="none"||on||t.classList.contains("is-overview"))return se();z==="morph"&&Z(l[r].element,l[g].element),document.documentElement.dataset.deckTransition=z;let St=document.startViewTransition(se);St.ready.catch(()=>{}),St.finished.finally(()=>{delete document.documentElement.dataset.deckTransition;for(let{element:Ce}of l)for(let ve of Ce.querySelectorAll("[data-morph]"))ve.style.removeProperty("view-transition-name"),ve.removeAttribute("data-morph")})}function Z(g,b){let A=E=>`${E.tagName}:${E.tagName==="IMG"?E.getAttribute("src"):(E.textContent??"").trim().slice(0,80)}`,L=E=>[...E.querySelectorAll("h1, h2, h3, h4, .deck-h, li, p, img, .deck-block, blockquote, .deck-image")];if(b){let E=new Map(L(b).map(j=>[A(j),j])),M=0;for(let j of L(g)){let z=E.get(A(j));if(!z||z.dataset.morph||j.closest("[data-morph]"))continue;let se=`deck-m${M++}`;j.dataset.morph=z.dataset.morph=se,j.style.setProperty("view-transition-name",se)}return}for(let E of g.querySelectorAll("[data-morph]")){let M=E.dataset.morph;for(let j of f.querySelectorAll(`[data-morph="${M}"]`))j!==E&&j.style.removeProperty("view-transition-name");E.style.setProperty("view-transition-name",M)}}function H(g){for(let b of["is-editing","is-presenting","is-overview"])b!==g&&t.classList.remove(b);t.classList.toggle(g),O.setAttribute("aria-pressed",String(t.classList.contains("is-editing"))),U.setAttribute("aria-pressed",String(t.classList.contains("is-presenting"))),N.setAttribute("aria-pressed",String(t.classList.contains("is-overview"))),t.classList.contains("is-editing")&&(T.value=n,T.focus()),B(),requestAnimationFrame(()=>C())}function ue(){f.requestFullscreen?.().then(()=>f.focus(),()=>{})}function he(g){n=g.replace(/\r\n?/g,`
90
- `),s=Ee(n),q(),me(),e.onChange?.(n)}let bt=0;T.addEventListener("input",g=>{g.isComposing||(clearTimeout(bt),bt=setTimeout(()=>he(T.value),120))});let xt=()=>{let g=T.selectionStart,b=s.slides.findIndex(A=>g>=A.start&&g<=A.end+1);b>=0&&b!==r&&(r=b,i=l[b]?.steps??0,B())};T.addEventListener("keyup",xt),T.addEventListener("click",xt),f.addEventListener("dblclick",g=>{if(e.editable===!1||document.fullscreenElement)return;let b=g.target.closest("[data-edit]");if(!b)return;let[A,L]=b.dataset.edit.split("-").map(Number);b.contentEditable="true",b.focus();let E=z=>{b.removeEventListener("keydown",M),b.removeEventListener("blur",j),b.contentEditable="false";let se=ht(b);z&&se!==n.slice(A,L)?he(n.slice(0,A)+se+n.slice(L)):me()},M=z=>{z.isComposing||(z.key==="Enter"&&!z.shiftKey&&(z.preventDefault(),E(!0)),z.key==="Escape"&&(z.preventDefault(),E(!1)))},j=()=>E(!0);b.addEventListener("keydown",M),b.addEventListener("blur",j)}),t.addEventListener("keydown",g=>{let b=g.target;if(b.isContentEditable||b===T||b.tagName==="BUTTON"&&(g.key===" "||g.key==="Enter")){(g.metaKey||g.ctrlKey)&&g.key==="s"&&(g.preventDefault(),e.onSave?.(n));return}let A=o==="rtl"?"ArrowLeft":"ArrowRight",L=o==="rtl"?"ArrowRight":"ArrowLeft";if(g.altKey||g.ctrlKey||g.metaKey){(g.metaKey||g.ctrlKey)&&g.key==="s"&&(g.preventDefault(),e.onSave?.(n));return}let M={[A]:()=>$(1),[L]:()=>$(-1),ArrowDown:()=>$(1),ArrowUp:()=>$(-1),PageDown:()=>$(1),PageUp:()=>$(-1)," ":()=>$(1),Home:()=>I(0),End:()=>I(l.length-1,l.at(-1)?.steps??0),f:ue,p:()=>H("is-presenting"),o:()=>H("is-overview"),e:()=>H("is-editing")}[g.key];M&&(g.preventDefault(),M())}),f.addEventListener("click",g=>{document.fullscreenElement&&!g.target.closest("a, button, input")&&$(1)});let yt=0;f.addEventListener("touchstart",g=>{yt=g.touches[0].clientX},{passive:!0}),f.addEventListener("touchend",g=>{let b=g.changedTouches[0].clientX-yt;Math.abs(b)>50&&$(b<0==(o!=="rtl")?1:-1)}),c.addEventListener("change",()=>{re(),q()});let an=setInterval(()=>{let g=Math.floor((Date.now()-d)/1e3);D.textContent=t.classList.contains("is-presenting")?`${String(Math.floor(g/60)).padStart(2,"0")}:${String(g%60).padStart(2,"0")}`:""},1e3);re(),q(),me(),document.fonts?.ready.then(()=>C());let wt={root:t,stage:f,get source(){return n},get deck(){return s},get at(){return r},get scheme(){return h},get kit(){return te.kit},get kitProblems(){return J},lang:a,dir:o,slides:()=>l.map(({element:g})=>g),setSource:he,go:I,toggle:H,present:ue,fitAll:C,setScheme:g=>{h=g,q()},destroy:()=>clearInterval(an)};return wt}function ht(t){let e="";for(let n of t.childNodes)if(n.nodeType===Node.TEXT_NODE)e+=(n.textContent??"").replace(/([*_`[\]\\])/g,"\\$1");else if(n instanceof HTMLElement){let s=ht(n);e+={STRONG:`**${s}**`,B:`**${s}**`,EM:`*${s}*`,I:`*${s}*`,CODE:`\`${n.textContent}\``,DEL:`~~${s}~~`,BR:`
91
- `,A:`[${s}](${n.getAttribute("href")??""})`}[n.tagName]??s}return e.replace(/ /g," ").replace(/\n+$/,"")}var qe="0.1.1";var dt='<script type="text/markdown" id="deck">',Tr="<\/script>",Kt=t=>t.replace(/<(\\*)(\/?script)/gi,"<\\$1$2"),Yt=t=>t.replace(/<\\(\\*)(\/?script)/gi,"<$1$2"),$e=t=>t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;"),Rr=t=>t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");function Er(t){if(/\\<(!--|\/?script)/i.test(t))throw new Error("This code cannot be held in a page as it is.");return t.replace(/<(!--|\/?script)/gi,"\\x3C$1")}function Pr(t){let e=t.indexOf(dt);if(e<0)return null;let n=e+dt.length,s=t.slice(n).search(/<\/script/i);return s<0?null:Yt(t.slice(n,n+s).replace(/^\n/,"").replace(/\n$/,""))}var Jt=(t=qe)=>`https://cdn.jsdelivr.net/npm/@codename/deck@${t}/dist/deck.js`;function zr(t,{title:e="",lang:n="en",dir:s="auto",renderer:r={src:Jt()},base:i,generator:l=`deck ${qe}`}={}){let a=i?` data-base="${$e(i)}"`:"",o="src"in r?`<script src="${$e(r.src)}"${a}><\/script>`:`<script${a}>${Er(r.code)}<\/script>`;return`<!doctype html>
92
- <html lang="${$e(n)}" dir="${$e(s)}">
87
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Q(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,text:n,tokens:s,autolink:r}){let i=r?Q(n,!0):this.parser.parseInline(s),l=It(t);if(l===null)return i;t=Q(l,r);let a='<a href="'+t+'"';return e&&(a+=' title="'+Q(e)+'"'),a+=">"+i+"</a>",a}image({href:t,title:e,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));let r=It(t);if(r===null)return Q(n);t=r;let i=`<img src="${Q(t)}" alt="${Q(n)}"`;return e&&(i+=` title="${Q(e)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Q(t.text)}},ht=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},Y=class it{options;renderer;textRenderer;constructor(e){this.options=e||ue,this.options.renderer=this.options.renderer||new qe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ht}static parse(e,n){return new it(n).parse(e)}static parseInline(e,n){return new it(n).parseInline(e)}parse(e){this.renderer.parser=this;let n="";for(let s=0;s<e.length;s++){let r=e[s];if(this.options.extensions?.renderers?.[r.type]){let l=r,a=this.options.extensions.renderers[l.type].call({parser:this},l);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(l.type)){n+=a||"";continue}}let i=r;switch(i.type){case"space":{n+=this.renderer.space(i);break}case"hr":{n+=this.renderer.hr(i);break}case"heading":{n+=this.renderer.heading(i);break}case"code":{n+=this.renderer.code(i);break}case"table":{n+=this.renderer.table(i);break}case"blockquote":{n+=this.renderer.blockquote(i);break}case"list":{n+=this.renderer.list(i);break}case"checkbox":{n+=this.renderer.checkbox(i);break}case"html":{n+=this.renderer.html(i);break}case"def":{n+=this.renderer.def(i);break}case"paragraph":{n+=this.renderer.paragraph(i);break}case"text":{n+=this.renderer.text(i);break}default:{let l='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}parseInline(e,n=this.renderer){this.renderer.parser=this;let s="";for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let a=this.options.extensions.renderers[i.type].call({parser:this},i);if(a!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(i.type)){s+=a||"";continue}}let l=i;switch(l.type){case"escape":{s+=n.text(l);break}case"html":{s+=n.html(l);break}case"link":{s+=n.link(l);break}case"image":{s+=n.image(l);break}case"checkbox":{s+=n.checkbox(l);break}case"strong":{s+=n.strong(l);break}case"em":{s+=n.em(l);break}case"codespan":{s+=n.codespan(l);break}case"br":{s+=n.br(l);break}case"del":{s+=n.del(l);break}case"text":{s+=n.text(l);break}default:{let a='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return s}},we=class{options;block;constructor(t){this.options=t||ue}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?V.lex:V.lexInline}provideParser(t=this.block){return t?Y.parse:Y.parseInline}};function oe(t,e){if(Array.isArray(e))for(let n=0;n<e.length;n++)t.push(e[n]);else t.push(e)}var $r=class{defaults=lt();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Y;Renderer=qe;TextRenderer=ht;Lexer=V;Tokenizer=De;Hooks=we;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(let s of t)switch(oe(n,e.call(this,s)),s.type){case"table":{let r=s;for(let i of r.header)oe(n,this.walkTokens(i.tokens,e));for(let i of r.rows)for(let l of i)oe(n,this.walkTokens(l.tokens,e));break}case"list":{let r=s;oe(n,this.walkTokens(r.items,e));break}default:{let r=s;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(i=>{let l=r[i].flat(1/0);oe(n,this.walkTokens(l,e))}):r.tokens&&oe(n,this.walkTokens(r.tokens,e))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let i=e.renderers[r.name];i?e.renderers[r.name]=function(...l){let a=r.renderer.apply(this,l);return a===!1&&(a=i.apply(this,l)),a}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=e[r.level];i?i.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),s.extensions=e),n.renderer){let r=this.defaults.renderer||new qe(this.defaults);for(let i in n.renderer){if(!(i in r))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let l=i,a=n.renderer[l],o=r[l];r[l]=(...p)=>{let u=a.apply(r,p);return u===!1&&(u=o.apply(r,p)),u||""}}s.renderer=r}if(n.tokenizer){let r=this.defaults.tokenizer||new De(this.defaults);for(let i in n.tokenizer){if(!(i in r))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let l=i,a=n.tokenizer[l],o=r[l];r[l]=(...p)=>{let u=a.apply(r,p);return u===!1&&(u=o.apply(r,p)),u}}s.tokenizer=r}if(n.hooks){let r=this.defaults.hooks||new we;for(let i in n.hooks){if(!(i in r))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let l=i,a=n.hooks[l],o=r[l];we.passThroughHooks.has(i)?r[l]=p=>{if(this.defaults.async&&we.passThroughHooksRespectAsync.has(i))return(async()=>{let c=await a.call(r,p);return o.call(r,c)})();let u=a.call(r,p);return o.call(r,u)}:r[l]=(...p)=>{if(this.defaults.async)return(async()=>{let c=await a.apply(r,p);return c===!1&&(c=await o.apply(r,p)),c})();let u=a.apply(r,p);return u===!1&&(u=o.apply(r,p)),u}}s.hooks=r}if(n.walkTokens){let r=this.defaults.walkTokens,i=n.walkTokens;s.walkTokens=function(l){let a=[];return a.push(i.call(this,l)),r&&oe(a,r.call(this,l)),a}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return V.lex(t,e??this.defaults)}parser(t,e){return Y.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let s={...n},r={...this.defaults,...s},i=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&s.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=t),r.async)return(async()=>{let l=r.hooks?await r.hooks.preprocess(e):e,a=await(r.hooks?await r.hooks.provideLexer(t):t?V.lex:V.lexInline)(l,r),o=r.hooks?await r.hooks.processAllTokens(a):a;r.walkTokens&&await Promise.all(this.walkTokens(o,r.walkTokens));let p=await(r.hooks?await r.hooks.provideParser(t):t?Y.parse:Y.parseInline)(o,r);return r.hooks?await r.hooks.postprocess(p):p})().catch(i);try{r.hooks&&(e=r.hooks.preprocess(e));let l=(r.hooks?r.hooks.provideLexer(t):t?V.lex:V.lexInline)(e,r);r.hooks&&(l=r.hooks.processAllTokens(l)),r.walkTokens&&this.walkTokens(l,r.walkTokens);let a=(r.hooks?r.hooks.provideParser(t):t?Y.parse:Y.parseInline)(l,r);return r.hooks&&(a=r.hooks.postprocess(a)),a}catch(l){return i(l)}}}onError(t,e){return n=>{if(n.message+=`
88
+ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Q(n.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(n);throw n}}},pe=new $r;function v(t,e){return pe.parse(t,e)}v.options=v.setOptions=function(t){return pe.setOptions(t),v.defaults=pe.defaults,Ht(v.defaults),v};v.getDefaults=lt;v.defaults=ue;function Ar(...t){return pe.use(...t),v.defaults=pe.defaults,Ht(v.defaults),v}v.use=Ar;v.walkTokens=function(t,e){return pe.walkTokens(t,e)};v.parseInline=pe.parseInline;v.Parser=Y;v.parser=Y.parse;v.Renderer=qe;v.TextRenderer=ht;v.Lexer=V;v.lexer=V.lex;v.Tokenizer=De;v.Hooks=we;v.parse=v;var ns=v.options,rs=v.setOptions,ss=v.walkTokens,is=v.parseInline;var ls=Y.parse,as=V.lex;var Cr=/^(ar|he|fa|ur|ps|sd|ug|yi|dv|ckb)\b/i,Rr={back:"M15 5l-7 7 7 7",next:"M9 5l7 7-7 7",present:"M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5",presenter:"M3 5h12v9H3zM18 8h3M18 12h3M6 19h6",grid:"M4 4h6v6H4zM14 4h6v6h-6zM4 14h6v6H4zM14 14h6v6h-6z",edit:"M4 20h4L19 9l-4-4L4 16zM13.5 6.5l4 4",scheme:"M12 3a9 9 0 1 0 9 9 7 7 0 0 1-9-9z",export:"M12 4v11M7 10l5 5 5-5M5 20h14"};function Tr(t){let e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("viewBox","0 0 24 24"),e.setAttribute("aria-hidden","true"),(t==="back"||t==="next")&&e.setAttribute("class","deck-flip");let n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d",Rr[t]),e.append(n),e}function vr(t,e){let n=e.source.replace(/\r\n?/g,`
89
+ `),s=ze(n),r=0,i=0,l=[],a=String(e.lang??s.settings.lang??document.documentElement.lang??"en")||"en",o=String(e.dir??s.settings.dir??(Cr.test(a)?"rtl":"ltr")),p={...Ot(a),...e.strings},u=new Intl.NumberFormat(a).format,c=matchMedia("(prefers-color-scheme: dark)"),d="light",f=Date.now();t.classList.add("deck"),t.lang=a,t.dir=o;let h=y("div",{class:"deck-stage",tabindex:0,role:"region","aria-roledescription":p.carousel,"aria-label":p.deck}),k=y("span",{class:"deck-where","aria-live":"polite"}),g=(m,b,A)=>{let L=y("button",{type:"button","aria-label":b,"data-act":m},[Tr(m)]);return L.addEventListener("click",A),L},x=g("back",p.previous,()=>S(-1)),w=g("next",p.next,()=>S(1)),j=g("edit",p.edit,()=>I("is-editing")),H=g("presenter",p.presenter,()=>I("is-presenting")),q=g("grid",p.overview,()=>I("is-overview")),E=y("div",{class:"deck-bar"},[x,k,w,y("span",{class:"deck-gap"}),q,H,e.editable===!1?null:j,g("scheme",p.scheme,()=>{d=d==="dark"?"light":"dark",F()}),e.onExport?g("export",p.export,()=>e.onExport?.(St)):null,document.fullscreenEnabled?g("present",p.present,()=>de()):null]),T=y("textarea",{class:"deck-source",spellcheck:"false","aria-label":p.source,dir:"auto"}),Z=y("div",{class:"deck-next"}),K=y("div",{class:"deck-notes",dir:"auto","aria-label":p.notes}),B=y("span",{class:"deck-clock"}),J=y("div",{class:"deck-presenter"},[Z,K]);t.replaceChildren(T,h,J,E),E.insertBefore(B,E.querySelector(".deck-gap"));let ee=[],Re=()=>{let m=Oe(e.kit,s.settings.kit);return ee=m.problems,m.kit};function F(){ne.kit=Re();let m=et(s.settings,ne.kit.tokens),b=tt(m,d),A=R=>R.map(_=>/^[\w-]+$/.test(_)?_:`"${_.replace(/["\\]/g,"")}"`).join(", "),L=m.fonts?{heading:A(m.fonts.heading),body:A(m.fonts.body)}:Ye[m.voice];for(let[R,_]of Object.entries({paper:b.paper,ink:b.ink,muted:b.muted,line:b.line,primary:b.primary,fill:m.primary,"on-fill":b.onPrimary,soft:b.soft,heading:L.heading,body:L.body,radius:`${m.radius}px`,...Object.fromEntries(b.series.map((D,z)=>[`series-${z+1}`,D]))}))t.style.setProperty(`--deck-${R}`,_);t.dataset.scheme=d,t.dataset.fill=(R=>ae(R,[255,255,255])>ae(R,[0,0,0])?"dark":"light")(G(m.primary)??[247,197,49]),t.dispatchEvent(new CustomEvent("deck-scheme",{detail:{scheme:d,colours:b,tokens:m}}))}let re=()=>{let m=e.scheme??s.settings.colorSchema??"auto";d=m==="dark"||m==="auto"&&c.matches?"dark":"light"},ne={blocks:e.blocks??{},resolve:e.resolve??(m=>m),headings:e.headings??"real",number:m=>u(m),total:0,kit:Oe().kit,lex:e.lex??(m=>new V({gfm:!0}).lex(m)),slide:p.slide};function be(){ne.total=s.slides.length,l=s.slides.map(m=>Me(m,ne));for(let[m,{element:b}]of l.entries())b.setAttribute("aria-label",p.where.replace("{n}",u(m+1)).replace("{count}",u(l.length))),b.addEventListener("click",()=>{t.classList.contains("is-overview")&&(I("is-overview"),O(m,0))});h.replaceChildren(...l.map(({element:m})=>m)),r=Math.min(r,l.length-1),W(),requestAnimationFrame(()=>C())}function C(){for(let{element:m}of l)P(m)}function P(m){let b=!1;for(let A of m.querySelectorAll(".deck-slot")){let L=1;for(A.style.setProperty("--deck-fit","1");A.scrollHeight>A.clientHeight+1&&L>.6;)A.style.setProperty("--deck-fit",String(L=Math.round((L-.05)*100)/100));A.scrollHeight>A.clientHeight+1&&(b=!0)}b?m.dataset.overflow="true":delete m.dataset.overflow}function W(){for(let[b,{element:A,steps:L}]of l.entries()){A.classList.toggle("is-shown",b===r),A.inert=b!==r&&!t.classList.contains("is-overview");for(let R of A.querySelectorAll(".deck-step"))R.classList.toggle("is-on",b<r||b===r&&Number(R.getAttribute("data-step"))<=i||L===0)}k.textContent=`${u(r+1)} / ${u(l.length)}`,x.toggleAttribute("disabled",r===0&&i===0),w.toggleAttribute("disabled",r>=l.length-1&&i>=(l[r]?.steps??0)),K.textContent=s.slides[r]?.notes||p.noNotes;let m=s.slides[r+1];Z.replaceChildren(y("span",{},[m?p.upNext:p.last]),...m?[Me(m,ne).element]:[]),t.dispatchEvent(new CustomEvent("deck-move",{detail:{at:r,step:i}}))}function S(m){let b=l[r]?.steps??0;if(m>0&&i<b){i++,W();return}if(m<0&&i>0){i--,W();return}let A=r+m;A<0||A>=l.length||O(A,m>0?0:l[A].steps)}function O(m,b=0){if(m===r){i=b,W();return}let A=m>r,L=s.slides[A?m:r]?.settings??{},R=String(L.transition??s.settings.transition??"none"),[_,D]=R.split("|").map(Te=>Te.trim()),z=A?_:D??_;o==="rtl"&&(z=z.replace(/-(left|right)$/,(Te,ve)=>ve==="left"?"-right":"-left")),z==="view-transition"&&(z="morph");let se=()=>{r=m,i=b,z==="morph"&&M(l[m].element),W()},pn=matchMedia("(prefers-reduced-motion: reduce)").matches;if(!document.startViewTransition||z==="none"||pn||t.classList.contains("is-overview"))return se();z==="morph"&&M(l[r].element,l[m].element),document.documentElement.dataset.deckTransition=z;let $t=document.startViewTransition(se);$t.ready.catch(()=>{}),$t.finished.finally(()=>{delete document.documentElement.dataset.deckTransition;for(let{element:Te}of l)for(let ve of Te.querySelectorAll("[data-morph]"))ve.style.removeProperty("view-transition-name"),ve.removeAttribute("data-morph")})}function M(m,b){let A=R=>`${R.tagName}:${R.tagName==="IMG"?R.getAttribute("src"):(R.textContent??"").trim().slice(0,80)}`,L=R=>[...R.querySelectorAll("h1, h2, h3, h4, .deck-h, li, p, img, .deck-block, blockquote, .deck-image")];if(b){let R=new Map(L(b).map(D=>[A(D),D])),_=0;for(let D of L(m)){let z=R.get(A(D));if(!z||z.dataset.morph||D.closest("[data-morph]"))continue;let se=`deck-m${_++}`;D.dataset.morph=z.dataset.morph=se,D.style.setProperty("view-transition-name",se)}return}for(let R of m.querySelectorAll("[data-morph]")){let _=R.dataset.morph;for(let D of h.querySelectorAll(`[data-morph="${_}"]`))D!==R&&D.style.removeProperty("view-transition-name");R.style.setProperty("view-transition-name",_)}}function I(m){for(let b of["is-editing","is-presenting","is-overview"])b!==m&&t.classList.remove(b);t.classList.toggle(m),j.setAttribute("aria-pressed",String(t.classList.contains("is-editing"))),H.setAttribute("aria-pressed",String(t.classList.contains("is-presenting"))),q.setAttribute("aria-pressed",String(t.classList.contains("is-overview"))),t.classList.contains("is-editing")&&(T.value=n,T.focus()),W(),requestAnimationFrame(()=>C())}function de(){h.requestFullscreen?.().then(()=>h.focus(),()=>{})}function he(m){n=m.replace(/\r\n?/g,`
90
+ `),s=ze(n),F(),be(),e.onChange?.(n)}let xt=0;T.addEventListener("input",m=>{m.isComposing||(clearTimeout(xt),xt=setTimeout(()=>he(T.value),120))});let yt=()=>{let m=T.selectionStart,b=s.slides.findIndex(A=>m>=A.start&&m<=A.end+1);b>=0&&b!==r&&(r=b,i=l[b]?.steps??0,W())};T.addEventListener("keyup",yt),T.addEventListener("click",yt),h.addEventListener("dblclick",m=>{if(e.editable===!1||document.fullscreenElement)return;let b=m.target.closest("[data-edit]");if(!b)return;let[A,L]=b.dataset.edit.split("-").map(Number);b.contentEditable="true",b.focus();let R=z=>{b.removeEventListener("keydown",_),b.removeEventListener("blur",D),b.contentEditable="false";let se=ft(b);z&&se!==n.slice(A,L)?he(n.slice(0,A)+se+n.slice(L)):be()},_=z=>{z.isComposing||(z.key==="Enter"&&!z.shiftKey&&(z.preventDefault(),R(!0)),z.key==="Escape"&&(z.preventDefault(),R(!1)))},D=()=>R(!0);b.addEventListener("keydown",_),b.addEventListener("blur",D)}),t.addEventListener("keydown",m=>{let b=m.target;if(b.isContentEditable||b===T||b.tagName==="BUTTON"&&(m.key===" "||m.key==="Enter")){(m.metaKey||m.ctrlKey)&&m.key==="s"&&(m.preventDefault(),e.onSave?.(n));return}let A=o==="rtl"?"ArrowLeft":"ArrowRight",L=o==="rtl"?"ArrowRight":"ArrowLeft";if(m.altKey||m.ctrlKey||m.metaKey){(m.metaKey||m.ctrlKey)&&m.key==="s"&&(m.preventDefault(),e.onSave?.(n));return}let _={[A]:()=>S(1),[L]:()=>S(-1),ArrowDown:()=>S(1),ArrowUp:()=>S(-1),PageDown:()=>S(1),PageUp:()=>S(-1)," ":()=>S(1),Home:()=>O(0),End:()=>O(l.length-1,l.at(-1)?.steps??0),f:de,p:()=>I("is-presenting"),o:()=>I("is-overview"),e:()=>I("is-editing")}[m.key];_&&(m.preventDefault(),_())}),h.addEventListener("click",m=>{document.fullscreenElement&&!m.target.closest("a, button, input")&&S(1)});let wt=0;h.addEventListener("touchstart",m=>{wt=m.touches[0].clientX},{passive:!0}),h.addEventListener("touchend",m=>{let b=m.changedTouches[0].clientX-wt;Math.abs(b)>50&&S(b<0==(o!=="rtl")?1:-1)}),c.addEventListener("change",()=>{re(),F()});let cn=setInterval(()=>{let m=Math.floor((Date.now()-f)/1e3);B.textContent=t.classList.contains("is-presenting")?`${String(Math.floor(m/60)).padStart(2,"0")}:${String(m%60).padStart(2,"0")}`:""},1e3);re(),F(),be(),document.fonts?.ready.then(()=>C());let St={root:t,stage:h,get source(){return n},get deck(){return s},get at(){return r},get scheme(){return d},get kit(){return ne.kit},get kitProblems(){return ee},lang:a,dir:o,slides:()=>l.map(({element:m})=>m),setSource:he,go:O,toggle:I,present:de,fitAll:C,setScheme:m=>{d=m,F()},destroy:()=>clearInterval(cn)};return St}function ft(t){let e="";for(let n of t.childNodes)if(n.nodeType===Node.TEXT_NODE)e+=(n.textContent??"").replace(/([*_`[\]\\])/g,"\\$1");else if(n instanceof HTMLElement){let s=ft(n);e+={STRONG:`**${s}**`,B:`**${s}**`,EM:`*${s}*`,I:`*${s}*`,CODE:`\`${n.textContent}\``,DEL:`~~${s}~~`,BR:`
91
+ `,A:`[${s}](${n.getAttribute("href")??""})`}[n.tagName]??s}return e.replace(/ /g," ").replace(/\n+$/,"")}var Be="0.2.0";var gt='<script type="text/markdown" id="deck">',Er="<\/script>",Yt=t=>t.replace(/<(\\*)(\/?script)/gi,"<\\$1$2"),en=t=>t.replace(/<\\(\\*)(\/?script)/gi,"<$1$2"),Ce=t=>t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;"),Pr=t=>t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");function zr(t){if(/\\<(!--|\/?script)/i.test(t))throw new Error("This code cannot be held in a page as it is.");return t.replace(/<(!--|\/?script)/gi,"\\x3C$1")}function Lr(t){let e=t.indexOf(gt);if(e<0)return null;let n=e+gt.length,s=t.slice(n).search(/<\/script/i);return s<0?null:en(t.slice(n,n+s).replace(/^\n/,"").replace(/\n$/,""))}var tn=(t=Be)=>`https://cdn.jsdelivr.net/npm/@codename/deck@${t}/dist/deck.js`;function Or(t,{title:e="",lang:n="en",dir:s="auto",renderer:r={src:tn()},base:i,generator:l=`deck ${Be}`}={}){let a=i?` data-base="${Ce(i)}"`:"",o="src"in r?`<script src="${Ce(r.src)}"${a}><\/script>`:`<script${a}>${zr(r.code)}<\/script>`;return`<!doctype html>
92
+ <html lang="${Ce(n)}" dir="${Ce(s)}">
93
93
  <meta charset="utf-8">
94
94
  <meta name="viewport" content="width=device-width, initial-scale=1">
95
- <meta name="generator" content="${$e(l)}">
96
- <title>${Rr(e)}</title>
95
+ <meta name="generator" content="${Ce(l)}">
96
+ <title>${Pr(e)}</title>
97
97
  <style>#deck{display:block;white-space:pre-wrap;overflow-wrap:anywhere;font:1rem/1.6 ui-monospace,Menlo,Consolas,monospace;max-width:72ch;margin:2rem auto;padding:0 1rem}</style>
98
98
  <body>
99
- ${dt}
100
- ${Kt(t)}
101
- ${Tr}
99
+ ${gt}
100
+ ${Yt(t)}
101
+ ${Er}
102
102
  ${o}
103
103
  </html>
104
- `}var en=13.333,Lr=7.5,tn="h1, h2, h3, h4, h5, h6, .deck-h, p, ul, ol, blockquote";function V(t){let e=/rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)/.exec(t);return e?[e[1],e[2],e[3]].map(n=>Math.round(Number(n)).toString(16).padStart(2,"0")).join("").toUpperCase():t.replace("#","").toUpperCase().slice(0,6)||"000000"}async function Mr(t,{PptxGenJS:e,JSZip:n}){let s=new e;s.layout="LAYOUT_WIDE",s.title=t.deck.slides[0]?.title??"",s.rtlMode=t.dir==="rtl";let r=getComputedStyle(t.root),i=f=>f.split(",").map(k=>k.trim().replace(/^["']|["']$/g,"")).find(k=>!/^(ui-|system-ui|-apple|sans-serif|serif|monospace)/.test(k))??"Arial";s.theme={headFontFace:i(r.getPropertyValue("--deck-heading")),bodyFontFace:i(r.getPropertyValue("--deck-body"))};let l={slides:0,charts:0,pictures:0,tables:0,placeholders:0},a=t.dir==="rtl",o=t.slides(),p=new Map,u=[];for(let[f,k]of o.entries()){let m=k.getBoundingClientRect(),w=en/m.width,y=C=>{let v=C.getBoundingClientRect();return{x:(v.left-m.left)*w,y:(v.top-m.top)*w,w:v.width*w,h:v.height*w}},O=C=>{let v=C.closest(".deck-slot")??C,{x:B,w:$}=y(v),{y:I,h:Z}=y(C),H=getComputedStyle(v),ue=parseFloat(H.paddingInlineStart)*w,he=parseFloat(H.paddingInlineEnd)*w;return{x:B+(a?he:ue),y:I,w:$-ue-he,h:Z*1.08}},U=C=>getComputedStyle(C).justifyContent==="center"?"middle":"top",N=C=>Math.round(C*w*72*10)/10,P=getComputedStyle(k),T=k.dataset.layout??"default",F=[...k.querySelectorAll(".deck-slot")],X=F[0]?.firstElementChild,D=X&&X.matches("h1, h2, h3, .deck-h")?X:null,K=t.kit.layouts[T],J=`${K?He(K,T,t.lang):T}${k.classList.contains("deck-class-invert")?" (dark)":""}`;if(!p.has(J)){let C=[];D&&C.push({placeholder:{options:{name:"title",type:"title",...O(D),valign:"bottom",margin:0,fontFace:s.theme.headFontFace,color:V(getComputedStyle(D).color),align:a?"right":"left"},text:""}});for(let v of F){let B=y(v),$=D&&v===F[0]?y(D).y+y(D).h:B.y,I=v.firstElementChild&&v.firstElementChild!==D?O(v.firstElementChild):{x:B.x,w:B.w};C.push({placeholder:{options:{name:`body-${v.dataset.slot}`,type:"body",x:I.x,y:$+.08,w:I.w,h:Math.max(.3,B.y+B.h-$-.08),margin:0,valign:U(v),color:V(getComputedStyle(v).color)},text:""}})}s.defineSlideMaster({title:J,background:{color:V(P.backgroundColor)},objects:C,slideNumber:K?.numbered!==!1?{x:a?.3:en-.9,y:Lr-.55,w:.6,h:.3,fontSize:10,color:V(r.getPropertyValue("--deck-muted").trim()||"#666666")}:void 0}),p.set(J,new Set(C.map(v=>v.placeholder.options.name)))}let Ae=p.get(J),q=s.addSlide({masterName:J});l.slides++;let re=k.querySelector(".deck-image");if(re){let C=/url\("?(.*?)"?\)/.exec(getComputedStyle(re).backgroundImage)?.[1],v=C&&await gt(C,re.clientWidth*2,re.clientHeight*2,!0);v&&(q.addImage({data:v,...y(re)}),l.pictures++)}D&&Ae.has("title")&&(q.addText(ft(D,{pt:N,rtl:a,lang:t.lang}),{placeholder:"title"}),l.placeholders++);for(let C of F){let v=[...C.children].filter($=>$!==D);if(v.length>0&&v.every($=>$.matches(tn))&&Ae.has(`body-${C.dataset.slot}`)){q.addText(v.flatMap($=>ft($,{pt:N,rtl:a,lang:t.lang})),{placeholder:`body-${C.dataset.slot}`,valign:U(C),...nn(C)}),l.placeholders++;continue}for(let $ of v){let I=y($);if($.matches(tn))q.addText(ft($,{pt:N,rtl:a,lang:t.lang}),{...O($),valign:"top",margin:0,...nn(C)});else if($.matches("pre"))q.addText($.textContent?.replace(/\n$/,"")??"",{...I,fontFace:"Consolas",fontSize:N(parseFloat(getComputedStyle($).fontSize)),color:V(getComputedStyle($).color),fill:{color:V(getComputedStyle($).backgroundColor)},valign:"top",margin:6,rtlMode:!1,align:"left"});else if($.matches(".deck-table"))Or(q,$,I,{pt:N,rtl:a,lang:t.lang}),l.tables++;else if($.matches(".deck-echarts")&&$.chart){let Z=$.chart;Ir(s,q,Z,I,{pt:N,rtl:a,lang:t.lang,ink:V(P.color)})?l.charts++:(q.addImage({data:await gt(`data:image/svg+xml;charset=utf-8,${encodeURIComponent(Z.renderToSVGString())}`,I.w/w*2,I.h/w*2),...I}),l.pictures++)}else{let Z=$.querySelector("img");if(Z){let H=await gt(Z.src,Z.clientWidth*2,Z.clientHeight*2);H&&(q.addImage({data:H,...y(Z),altText:Z.alt}),l.pictures++)}}}}let te=t.deck.slides[f]?.notes;te&&q.addNotes(te);let me=t.deck.slides[f]?.settings??{};u.push(String(me.transition??t.deck.settings.transition??"none").split("|")[0].trim())}let c=await n.loadAsync(await s.write({outputType:"arraybuffer",compression:!0}));for(let[f,k]of u.entries()){let m=`ppt/slides/slide${f+1}.xml`,w=await c.file(m)?.async("string");!w||k==="none"||c.file(m,w.replace(/<\/p:clrMapOvr>|(?=<p:timing|<\/p:sld>)/,y=>`${y}${jr(k,a)}`))}let h=await c.file("ppt/theme/theme1.xml")?.async("string");if(h){let f=w=>V(r.getPropertyValue(`--deck-${w}`).trim()),k=[f("fill"),...[2,3,4,5,6].map(w=>f(`series-${w}`))],m=`<a:clrScheme name="Deck"><a:dk1><a:srgbClr val="${f("ink")}"/></a:dk1><a:lt1><a:srgbClr val="${f("paper")}"/></a:lt1><a:dk2><a:srgbClr val="${f("ink")}"/></a:dk2><a:lt2><a:srgbClr val="${f("soft")}"/></a:lt2>${k.map((w,y)=>`<a:accent${y+1}><a:srgbClr val="${w}"/></a:accent${y+1}>`).join("")}<a:hlink><a:srgbClr val="${f("primary")}"/></a:hlink><a:folHlink><a:srgbClr val="${f("primary")}"/></a:folHlink></a:clrScheme>`;c.file("ppt/theme/theme1.xml",h.replace(/<a:clrScheme[\s\S]*?<\/a:clrScheme>/,m))}return{blob:await c.generateAsync({type:"blob",compression:"DEFLATE",mimeType:"application/vnd.openxmlformats-officedocument.presentationml.presentation"}),report:l}}function nn(t){let e=t.firstElementChild,n=e?parseFloat(getComputedStyle(e).marginBlockEnd):0;return{paraSpaceAfter:Math.round(n*.5)}}function ft(t,e){let n=[],s=(i,l)=>{let a=getComputedStyle(i),o={fontSize:e.pt(parseFloat(a.fontSize)),color:V(a.color),bold:Number(a.fontWeight)>=600,lang:e.lang,rtlMode:e.rtl,align:a.textAlign==="center"?"center":e.rtl?"right":"left",...l},p=_r(i,o);p.length&&(p[p.length-1].options.breakLine=!0,n.push(...p))},r=(i,l)=>{let a=0;for(let o of i.children){a++;let p=[...o.children].filter(c=>c.matches("ul, ol")),u=o.cloneNode(!0);for(let c of[...u.children])c.matches("ul, ol, input")&&c.remove();o.after(u),s(u,{bullet:i.tagName==="OL"?{type:"number",startAt:a===1?Number(i.getAttribute("start")??1):void 0}:!0,indentLevel:l}),u.remove();for(let c of p)r(c,l+1)}};if(t.matches("ul, ol"))r(t,0);else if(t.matches("blockquote"))for(let i of t.children)s(i,{italic:getComputedStyle(i).fontStyle==="italic"});else s(t,{});return n}function _r(t,e){let n=[],s=(r,i)=>{if(r.nodeType===Node.TEXT_NODE){let a=(r.textContent??"").replace(/\s+/g," ");a&&n.push({text:a,options:{...i}});return}if(!(r instanceof HTMLElement))return;if(r.tagName==="BR"){n.length&&(n[n.length-1].options.breakLine=!0);return}let l={...i};r.matches("strong, b")&&(l.bold=!0,l.color=V(getComputedStyle(r).color)),r.matches("em, i")&&(l.italic=!0),r.matches("del, s")&&(l.strike="sngStrike"),r.matches("code")&&(l.fontFace="Consolas"),r.matches("a[href]")&&(l.hyperlink={url:r.getAttribute("href")});for(let a of r.childNodes)s(a,l)};for(let r of t.childNodes)s(r,e);return n.length&&(n[0].text=n[0].text.trimStart(),n[n.length-1].text=n[n.length-1].text.trimEnd()),n.filter(r=>r.text)}function Or(t,e,n,s){let r=[...e.querySelectorAll("tr")].map(a=>[...a.children].map(o=>{let p=getComputedStyle(o),u=o.getAttribute("data-align");return{text:o.textContent?.trim()??"",options:{bold:o.tagName==="TH",fontSize:s.pt(parseFloat(p.fontSize)),color:V(p.color),lang:s.lang,rtlMode:s.rtl,align:u==="center"?"center":u==="right"!==s.rtl?"right":"left",border:[{type:"none"},{type:"none"},{type:"solid",pt:o.tagName==="TH"?1.5:.75,color:V(p.borderBlockEndColor)},{type:"none"}]}}})),i=[...e.querySelector("tr")?.children??[]].map(a=>a.getBoundingClientRect().width),l=i.reduce((a,o)=>a+o,0)||1;t.addTable(s.rtl?r.map(a=>a.reverse()):r,{...n,colW:(s.rtl?i.reverse():i).map(a=>a/l*n.w),margin:.06})}function Ir(t,e,n,s,r){let i=n.getOption(),l=i.series??[];if(!l.length)return!1;let a=new Set(l.map(c=>c.type)),o=(i.color??[]).map(V),p=c=>Array.isArray(c)?Number(c.at(-1)):Number(typeof c=="object"&&c!==null?c.value:c),u={...s,showLegend:l.length>1||a.has("pie"),legendPos:"b",legendFontSize:12,legendColor:r.ink,chartColors:o,showTitle:!!i.title?.[0]?.text,title:i.title?.[0]?.text,titleFontSize:16,titleColor:r.ink,catAxisLabelColor:r.ink,valAxisLabelColor:r.ink,dataLabelColor:r.ink,lang:r.lang};if(a.size===1&&a.has("pie")){let c=l[0],h=Array.isArray(c.radius)&&parseFloat(c.radius[0])>0;return e.addChart(h?t.charts.DOUGHNUT:t.charts.PIE,[{name:c.name??"",labels:c.data.map(d=>d.name),values:c.data.map(p)}],{...u,showPercent:!0,showLegend:!0,holeSize:h?55:void 0}),!0}if([...a].every(c=>c==="bar"||c==="line")){let c=i.yAxis?.[0]?.type==="category",h=(c?i.yAxis:i.xAxis)?.[0]?.data??[],d=m=>[{name:m.name??"",labels:h.map(String),values:m.data.map(p)}],f=m=>m.type==="bar"?t.charts.BAR:m.areaStyle?t.charts.AREA:t.charts.LINE,k={catAxisLabelFontSize:11,valAxisLabelFontSize:11,valGridLine:{color:"D9D9D9",size:.5},catAxisOrientation:r.rtl&&!c?"maxMin":"minMax",valAxisLabelFormatCode:"#,##0"};if(a.size===1){let m=l.flatMap(d);e.addChart(f(l[0]),m,{...u,...k,barDir:c?"bar":"col",barGrouping:l.some(w=>w.stack)?"stacked":"clustered",lineDataSymbol:"circle",lineSize:2})}else e.addChart(l.map(m=>({type:f(m),data:d(m),options:{barDir:c?"bar":"col",chartColors:[o[l.indexOf(m)%o.length]]}})),{...u,...k});return!0}if(a.size===1&&a.has("scatter")){let c=l[0].data.map(h=>Array.isArray(h)?h:[h.value?.[0],h.value?.[1]]);return e.addChart(t.charts.SCATTER,[{name:"X",values:c.map(h=>h[0])},{name:l[0].name??"Y",values:c.map(h=>h[1])}],{...u,lineSize:0,lineDataSymbolSize:8}),!0}if(a.size===1&&a.has("radar")){let c=i.radar?.[0]?.indicator??[];return e.addChart(t.charts.RADAR,l[0].data.map(h=>({name:h.name??"",labels:c.map(d=>d.name),values:h.value})),{...u,showLegend:!0,radarStyle:"standard"}),!0}return!1}function jr(t,e){let n=s=>`<p:transition spd="med"><p:push dir="${s}"/></p:transition>`;return t==="view-transition"||t==="morph"?'<mc:AlternateContent xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"><mc:Choice xmlns:p159="http://schemas.microsoft.com/office/powerpoint/2015/09/main" Requires="p159"><p:transition spd="slow"><p159:morph option="byObject"/></p:transition></mc:Choice><mc:Fallback><p:transition spd="slow"><p:fade/></p:transition></mc:Fallback></mc:AlternateContent>':t==="slide-left"?n(e?"r":"l"):t==="slide-right"?n(e?"l":"r"):t==="slide-up"?n("u"):t==="slide-down"?n("d"):'<p:transition spd="med"><p:fade/></p:transition>'}async function gt(t,e,n,s=!1){try{let r=new Image;r.crossOrigin="anonymous",r.src=t,await r.decode();let i=document.createElement("canvas");i.width=Math.max(1,Math.round(e)),i.height=Math.max(1,Math.round(n));let l=i.getContext("2d"),a=r.naturalWidth||e,o=r.naturalHeight||n,p=s?Math.max(i.width/a,i.height/o):Math.min(i.width/a,i.height/o);return l.drawImage(r,(i.width-a*p)/2,(i.height-o*p)/2,a*p,o*p),i.toDataURL("image/png")}catch{return null}}var mt=new Map;function rn(t,e){return mt.has(t)||mt.set(t,new Promise((n,s)=>{let r=document.createElement("script");r.src=t,r.onload=()=>n(globalThis[e]),r.onerror=s,document.head.append(r)})),mt.get(t)}var kt=(t,e,n,s)=>/node_modules\/$/.test(t)?`${t}${e}/${s}`:`${t}${e}@${n}/${s}`;function Nr({base:t,root:e,versions:n={}}){let{echarts:s="6.1.0",pele:r="1.10.0"}=n,i=new Set,l=null;e.addEventListener("deck-scheme",o=>{l=o.detail.colours;for(let p of i)p.chart.setOption(a(p.option,p.box),!0)});let a=(o,p)=>{let u=parseFloat(getComputedStyle(p).fontSize)||16,c=getComputedStyle(p).direction==="rtl",h=Math.round(u*.6),d=(f,k)=>f===void 0?void 0:[f].flat().map(m=>({axisLabel:{color:l?.muted,fontSize:h},axisLine:{lineStyle:{color:l?.line}},splitLine:{lineStyle:{color:l?.line}},nameTextStyle:{color:l?.muted,fontSize:h},...c&&k&&m.type==="category"?{inverse:!0}:{},...c&&!k?{position:"right"}:{},...m}));return{color:l?.series,backgroundColor:"transparent",animation:!matchMedia("(prefers-reduced-motion: reduce)").matches,textStyle:{fontFamily:getComputedStyle(e).getPropertyValue("--deck-body")||"system-ui",color:l?.ink,fontSize:h},...o,title:o.title?{...o.title,textStyle:{color:l?.ink,fontSize:Math.round(u*.8),...o.title?.textStyle}}:void 0,legend:o.legend?{itemWidth:h*1.6,itemHeight:h,...o.legend,textStyle:{color:l?.ink,fontSize:h,...o.legend?.textStyle}}:void 0,grid:{containLabel:!0,left:h,right:h,top:o.title?u*1.8:h,bottom:o.legend?u*1.6:h,...o.grid},xAxis:d(o.xAxis,!0),yAxis:d(o.yAxis,!1),toolbox:void 0,series:[o.series??[]].flat().map(f=>f.type==="pie"?{label:{color:l?.ink,fontSize:h},...f}:f)}};return{async echarts(o,p){let u=JSON.parse(p),c=await rn(kt(t,"echarts",s,"dist/echarts.min.js"),"echarts"),h=document.createElement("div");h.className="deck-chart",h.setAttribute("role","img"),h.setAttribute("aria-label",String(u.title?.text??"")),o.append(h);let d=c.init(h,null,{renderer:"svg",locale:document.documentElement.lang?.startsWith("ja")?"JA":"EN"}),f={chart:d,option:u,box:o};i.add(f),d.setOption(a(u,o)),new ResizeObserver(()=>{d.resize(),d.setOption(a(u,o),!0)}).observe(h),Object.assign(o,{chart:d})},async mermaid(o,p){let u=await rn(kt(t,"pele",r,"dist/pele.global.js"),"pele"),c=getComputedStyle(e).getPropertyValue("--deck-body")||"system-ui, sans-serif",{svg:h}=u.render(p,{fontFamily:c,links:!1,images:!1,autoDirection:!0,maxWidth:Math.max(320,o.clientWidth*1.4)}),d=`--pele-bg:transparent;--pele-fg:${l?.ink};--pele-muted:${l?.muted};--pele-line:${l?.muted};--pele-surface:${l?.soft};--pele-surface-alt:${l?.line};--pele-border:${l?.primary};--pele-accent:${l?.primary};--pele-font:${c.replace(/[<>"]/g,"")}`,f=document.createElement("img");f.alt=p,f.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(h.replace(/^(<svg\b[^>]*>)/,`$1<style>svg{${d}}</style>`))}`;let k=document.createElement("div");k.className="deck-diagram",k.append(f),o.append(k)}}}var sn=/^(\s*(?:image|background|backgroundImage)\s*:\s*)(['"]?)([^'"\n#]+?)\2(\s*(?:#.*)?)$/gm,ln=/(!\[[^\]\n]*\]\()(<[^>\n]+>|[^\s)\n]+)((?:\s+(?:"[^"\n]*"|'[^'\n]*'))?\))/g,Dr=t=>/^data:/i.test(t),qr=t=>/^(https?:)?\/\//i.test(t);function Br(t){let e="";for(let n=0;n<t.length;n+=32768)e+=String.fromCharCode(...t.subarray(n,n+32768));return btoa(e)}async function Fr(t,e,{web:n=!1,largest:s=8*1024*1024}={}){let r=new Map,i=[...t.matchAll(ln)].map(c=>c[2].replace(/^<|>$/g,"")).concat([...t.matchAll(sn)].map(c=>c[3].trim())),l=[],a=[],o=[];for(let c of new Set(i)){if(Dr(c)||qr(c)&&!n||/^(#|mailto:|javascript:)/i.test(c))continue;let h=await e(c).catch(()=>null);if(!h||!/^image\/(png|jpeg|gif|webp|avif|svg\+xml)$/.test(h.type)){a.push(c),r.set(c,null);continue}if(h.bytes.length>s){o.push(c),r.set(c,null);continue}r.set(c,`data:${h.type};base64,${Br(h.bytes)}`),l.push(c)}let p=c=>r.get(c)??null;return{source:t.replace(ln,(c,h,d,f)=>{let k=p(d.replace(/^<|>$/g,""));return k?`${h}${k}${f}`:c}).replace(sn,(c,h,d,f,k)=>{let m=p(f.trim());return m?`${h}${d}${m}${d}${k}`:c}),inlined:l,missing:a,kept:o}}var Zr=/^(`{3,}|~{3,})[ \t]*(deck|slidev|markdown|md)?[ \t]*$/,Hr="layout|transition|class|image|background|clicks|title|level|hide|zoom|theme|colorSchema|lang|themeConfig|paginate|alt";function Ur(t){let e=t.replace(/\r\n?/g,`
104
+ `}var nn=13.333,Mr=7.5,rn="h1, h2, h3, h4, h5, h6, .deck-h, p:not(.deck-picture), ul, ol, blockquote";function X(t){let e=/rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)/.exec(t);return e?[e[1],e[2],e[3]].map(n=>Math.round(Number(n)).toString(16).padStart(2,"0")).join("").toUpperCase():t.replace("#","").toUpperCase().slice(0,6)||"000000"}async function _r(t,{PptxGenJS:e,JSZip:n}){let s=new e;s.layout="LAYOUT_WIDE",s.title=t.deck.slides[0]?.title??"",s.rtlMode=t.dir==="rtl";let r=getComputedStyle(t.root),i=h=>h.split(",").map(k=>k.trim().replace(/^["']|["']$/g,"")).find(k=>!/^(ui-|system-ui|-apple|sans-serif|serif|monospace)/.test(k))??"Arial";s.theme={headFontFace:i(r.getPropertyValue("--deck-heading")),bodyFontFace:i(r.getPropertyValue("--deck-body"))};let l={slides:0,charts:0,pictures:0,tables:0,placeholders:0},a=t.dir==="rtl",o=t.slides(),p=new Map,u=[];for(let[h,k]of o.entries()){let g=k.getBoundingClientRect(),x=nn/g.width,w=C=>{let P=C.getBoundingClientRect();return{x:(P.left-g.left)*x,y:(P.top-g.top)*x,w:P.width*x,h:P.height*x}},j=C=>{let P=C.closest(".deck-slot")??C,{x:W,w:S}=w(P),{y:O,h:M}=w(C),I=getComputedStyle(P),de=parseFloat(I.paddingInlineStart)*x,he=parseFloat(I.paddingInlineEnd)*x;return{x:W+(a?he:de),y:O,w:S-de-he,h:M*1.08}},H=C=>getComputedStyle(C).justifyContent==="center"?"middle":"top",q=C=>Math.round(C*x*72*10)/10,E=getComputedStyle(k),T=k.dataset.layout??"default",Z=[...k.querySelectorAll(".deck-slot")],K=Z[0]?.firstElementChild,B=K&&K.matches("h1, h2, h3, .deck-h")?K:null,J=t.kit.layouts[T],ee=`${J?Ue(J,T,t.lang):T}${k.classList.contains("deck-class-invert")?" (dark)":""}`;if(!p.has(ee)){let C=[];B&&C.push({placeholder:{options:{name:"title",type:"title",...j(B),valign:"bottom",margin:0,fontFace:s.theme.headFontFace,color:X(getComputedStyle(B).color),align:a?"right":"left"},text:""}});for(let S of Z){let O=w(S),M=B&&S===Z[0]?w(B).y+w(B).h:O.y,I=S.firstElementChild&&S.firstElementChild!==B?j(S.firstElementChild):{x:O.x,w:O.w};C.push({placeholder:{options:{name:`body-${S.dataset.slot}`,type:"body",x:I.x,y:M+.08,w:I.w,h:Math.max(.3,O.y+O.h-M-.08),margin:0,valign:H(S),color:X(getComputedStyle(S).color)},text:""}})}let P=[...k.querySelectorAll(".deck-logo")].find(S=>getComputedStyle(S).display!=="none"),W=P&&await Fe(P.src,P.clientWidth*3,P.clientHeight*3);P&&W&&(C.push({image:{data:W,...w(P)}}),l.pictures++),s.defineSlideMaster({title:ee,background:{color:X(E.backgroundColor)},objects:C,slideNumber:J?.numbered!==!1?{x:a?.3:nn-.9,y:Mr-.55,w:.6,h:.3,fontSize:10,color:X(r.getPropertyValue("--deck-muted").trim()||"#666666")}:void 0}),p.set(ee,new Set(C.flatMap(S=>S.placeholder?[S.placeholder.options.name]:[])))}let Re=p.get(ee),F=s.addSlide({masterName:ee});l.slides++;let re=k.querySelector(".deck-image");if(re){let C=/url\("?(.*?)"?\)/.exec(getComputedStyle(re).backgroundImage)?.[1],P=C&&await Fe(C,re.clientWidth*2,re.clientHeight*2,!0);P&&(F.addImage({data:P,...w(re)}),l.pictures++)}B&&Re.has("title")&&(F.addText(mt(B,{pt:q,rtl:a,lang:t.lang}),{placeholder:"title"}),l.placeholders++);for(let C of Z){let P=[...C.children].filter(S=>S!==B);if(P.length>0&&P.every(S=>S.matches(rn))&&Re.has(`body-${C.dataset.slot}`)){F.addText(P.flatMap(S=>mt(S,{pt:q,rtl:a,lang:t.lang})),{placeholder:`body-${C.dataset.slot}`,valign:H(C),...sn(C)}),l.placeholders++;continue}for(let S of P){let O=w(S);if(S.matches(rn))F.addText(mt(S,{pt:q,rtl:a,lang:t.lang}),{...j(S),valign:"top",margin:0,...sn(C)});else if(S.matches("pre"))F.addText(S.textContent?.replace(/\n$/,"")??"",{...O,fontFace:"Consolas",fontSize:q(parseFloat(getComputedStyle(S).fontSize)),color:X(getComputedStyle(S).color),fill:{color:X(getComputedStyle(S).backgroundColor)},valign:"top",margin:6,rtlMode:!1,align:"left"});else if(S.matches(".deck-table"))jr(F,S,O,{pt:q,rtl:a,lang:t.lang}),l.tables++;else if(S.matches(".deck-echarts")&&S.chart){let M=S.chart;Ir(s,F,M,O,{pt:q,rtl:a,lang:t.lang,ink:X(E.color)})?l.charts++:(F.addImage({data:await Fe(`data:image/svg+xml;charset=utf-8,${encodeURIComponent(M.renderToSVGString())}`,O.w/x*2,O.h/x*2),...O}),l.pictures++)}else{let M=S.querySelector("img");if(M){M.complete||(M.loading="eager",await M.decode().catch(()=>{}));let I=await Fe(M.src,M.clientWidth*2,M.clientHeight*2);I&&(F.addImage({data:I,...w(M),altText:M.alt}),l.pictures++)}}}}let ne=t.deck.slides[h]?.notes;ne&&F.addNotes(ne);let be=t.deck.slides[h]?.settings??{};u.push(String(be.transition??t.deck.settings.transition??"none").split("|")[0].trim())}let c=await n.loadAsync(await s.write({outputType:"arraybuffer",compression:!0}));for(let[h,k]of u.entries()){let g=`ppt/slides/slide${h+1}.xml`,x=await c.file(g)?.async("string");!x||k==="none"||c.file(g,x.replace(/<\/p:clrMapOvr>|(?=<p:timing|<\/p:sld>)/,w=>`${w}${Dr(k,a)}`))}let d=await c.file("ppt/theme/theme1.xml")?.async("string");if(d){let h=x=>X(r.getPropertyValue(`--deck-${x}`).trim()),k=[h("fill"),...[2,3,4,5,6].map(x=>h(`series-${x}`))],g=`<a:clrScheme name="Deck"><a:dk1><a:srgbClr val="${h("ink")}"/></a:dk1><a:lt1><a:srgbClr val="${h("paper")}"/></a:lt1><a:dk2><a:srgbClr val="${h("ink")}"/></a:dk2><a:lt2><a:srgbClr val="${h("soft")}"/></a:lt2>${k.map((x,w)=>`<a:accent${w+1}><a:srgbClr val="${x}"/></a:accent${w+1}>`).join("")}<a:hlink><a:srgbClr val="${h("primary")}"/></a:hlink><a:folHlink><a:srgbClr val="${h("primary")}"/></a:folHlink></a:clrScheme>`;c.file("ppt/theme/theme1.xml",d.replace(/<a:clrScheme[\s\S]*?<\/a:clrScheme>/,g))}return{blob:await c.generateAsync({type:"blob",compression:"DEFLATE",mimeType:"application/vnd.openxmlformats-officedocument.presentationml.presentation"}),report:l}}function sn(t){let e=t.firstElementChild,n=e?parseFloat(getComputedStyle(e).marginBlockEnd):0;return{paraSpaceAfter:Math.round(n*.5)}}function mt(t,e){let n=[],s=(i,l)=>{let a=getComputedStyle(i),o={fontSize:e.pt(parseFloat(a.fontSize)),color:X(a.color),bold:Number(a.fontWeight)>=600,lang:e.lang,rtlMode:e.rtl,align:a.textAlign==="center"?"center":e.rtl?"right":"left",...l},p=Nr(i,o);p.length&&(p[p.length-1].options.breakLine=!0,n.push(...p))},r=(i,l)=>{let a=0;for(let o of i.children){a++;let p=[...o.children].filter(c=>c.matches("ul, ol")),u=o.cloneNode(!0);for(let c of[...u.children])c.matches("ul, ol, input")&&c.remove();o.after(u),s(u,{bullet:i.tagName==="OL"?{type:"number",startAt:a===1?Number(i.getAttribute("start")??1):void 0}:!0,indentLevel:l}),u.remove();for(let c of p)r(c,l+1)}};if(t.matches("ul, ol"))r(t,0);else if(t.matches("blockquote"))for(let i of t.children)s(i,{italic:getComputedStyle(i).fontStyle==="italic"});else s(t,{});return n}function Nr(t,e){let n=[],s=(r,i)=>{if(r.nodeType===Node.TEXT_NODE){let a=(r.textContent??"").replace(/\s+/g," ");a&&n.push({text:a,options:{...i}});return}if(!(r instanceof HTMLElement))return;if(r.tagName==="BR"){n.length&&(n[n.length-1].options.breakLine=!0);return}let l={...i};r.matches("strong, b")&&(l.bold=!0,l.color=X(getComputedStyle(r).color)),r.matches("em, i")&&(l.italic=!0),r.matches("del, s")&&(l.strike="sngStrike"),r.matches("code")&&(l.fontFace="Consolas"),r.matches("a[href]")&&(l.hyperlink={url:r.getAttribute("href")});for(let a of r.childNodes)s(a,l)};for(let r of t.childNodes)s(r,e);return n.length&&(n[0].text=n[0].text.trimStart(),n[n.length-1].text=n[n.length-1].text.trimEnd()),n.filter(r=>r.text)}function jr(t,e,n,s){let r=[...e.querySelectorAll("tr")].map(a=>[...a.children].map(o=>{let p=getComputedStyle(o),u=o.getAttribute("data-align");return{text:o.textContent?.trim()??"",options:{bold:o.tagName==="TH",fontSize:s.pt(parseFloat(p.fontSize)),color:X(p.color),lang:s.lang,rtlMode:s.rtl,align:u==="center"?"center":u==="right"!==s.rtl?"right":"left",border:[{type:"none"},{type:"none"},{type:"solid",pt:o.tagName==="TH"?1.5:.75,color:X(p.borderBlockEndColor)},{type:"none"}]}}})),i=[...e.querySelector("tr")?.children??[]].map(a=>a.getBoundingClientRect().width),l=i.reduce((a,o)=>a+o,0)||1;t.addTable(s.rtl?r.map(a=>a.reverse()):r,{...n,colW:(s.rtl?i.reverse():i).map(a=>a/l*n.w),margin:.06})}function Ir(t,e,n,s,r){let i=n.getOption(),l=i.series??[];if(!l.length)return!1;let a=new Set(l.map(c=>c.type)),o=(i.color??[]).map(X),p=c=>Array.isArray(c)?Number(c.at(-1)):Number(typeof c=="object"&&c!==null?c.value:c),u={...s,showLegend:l.length>1||a.has("pie"),legendPos:"b",legendFontSize:12,legendColor:r.ink,chartColors:o,showTitle:!!i.title?.[0]?.text,title:i.title?.[0]?.text,titleFontSize:16,titleColor:r.ink,catAxisLabelColor:r.ink,valAxisLabelColor:r.ink,dataLabelColor:r.ink,lang:r.lang};if(a.size===1&&a.has("pie")){let c=l[0],d=Array.isArray(c.radius)&&parseFloat(c.radius[0])>0;return e.addChart(d?t.charts.DOUGHNUT:t.charts.PIE,[{name:c.name??"",labels:c.data.map(f=>f.name),values:c.data.map(p)}],{...u,showPercent:!0,showLegend:!0,holeSize:d?55:void 0}),!0}if([...a].every(c=>c==="bar"||c==="line")){let c=i.yAxis?.[0]?.type==="category",d=(c?i.yAxis:i.xAxis)?.[0]?.data??[],f=g=>[{name:g.name??"",labels:d.map(String),values:g.data.map(p)}],h=g=>g.type==="bar"?t.charts.BAR:g.areaStyle?t.charts.AREA:t.charts.LINE,k={catAxisLabelFontSize:11,valAxisLabelFontSize:11,valGridLine:{color:"D9D9D9",size:.5},catAxisOrientation:r.rtl&&!c?"maxMin":"minMax",valAxisLabelFormatCode:"#,##0"};if(a.size===1){let g=l.flatMap(f);e.addChart(h(l[0]),g,{...u,...k,barDir:c?"bar":"col",barGrouping:l.some(x=>x.stack)?"stacked":"clustered",lineDataSymbol:"circle",lineSize:2})}else e.addChart(l.map(g=>({type:h(g),data:f(g),options:{barDir:c?"bar":"col",chartColors:[o[l.indexOf(g)%o.length]]}})),{...u,...k});return!0}if(a.size===1&&a.has("scatter")){let c=l[0].data.map(d=>Array.isArray(d)?d:[d.value?.[0],d.value?.[1]]);return e.addChart(t.charts.SCATTER,[{name:"X",values:c.map(d=>d[0])},{name:l[0].name??"Y",values:c.map(d=>d[1])}],{...u,lineSize:0,lineDataSymbolSize:8}),!0}if(a.size===1&&a.has("radar")){let c=i.radar?.[0]?.indicator??[];return e.addChart(t.charts.RADAR,l[0].data.map(d=>({name:d.name??"",labels:c.map(f=>f.name),values:d.value})),{...u,showLegend:!0,radarStyle:"standard"}),!0}return!1}function Dr(t,e){let n=s=>`<p:transition spd="med"><p:push dir="${s}"/></p:transition>`;return t==="view-transition"||t==="morph"?'<mc:AlternateContent xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"><mc:Choice xmlns:p159="http://schemas.microsoft.com/office/powerpoint/2015/09/main" Requires="p159"><p:transition spd="slow"><p159:morph option="byObject"/></p:transition></mc:Choice><mc:Fallback><p:transition spd="slow"><p:fade/></p:transition></mc:Fallback></mc:AlternateContent>':t==="slide-left"?n(e?"r":"l"):t==="slide-right"?n(e?"l":"r"):t==="slide-up"?n("u"):t==="slide-down"?n("d"):'<p:transition spd="med"><p:fade/></p:transition>'}async function Fe(t,e,n,s=!1){try{let r=new Image;r.crossOrigin="anonymous",r.src=t,await r.decode();let i=document.createElement("canvas");i.width=Math.max(1,Math.round(e)),i.height=Math.max(1,Math.round(n));let l=i.getContext("2d"),a=r.naturalWidth||e,o=r.naturalHeight||n,p=s?Math.max(i.width/a,i.height/o):Math.min(i.width/a,i.height/o);return l.drawImage(r,(i.width-a*p)/2,(i.height-o*p)/2,a*p,o*p),i.toDataURL("image/png")}catch{return null}}var kt=new Map;function ln(t,e){return kt.has(t)||kt.set(t,new Promise((n,s)=>{let r=document.createElement("script");r.src=t,r.onload=()=>n(globalThis[e]),r.onerror=s,document.head.append(r)})),kt.get(t)}var bt=(t,e,n,s)=>/node_modules\/$/.test(t)?`${t}${e}/${s}`:`${t}${e}@${n}/${s}`;function qr({base:t,root:e,versions:n={}}){let{echarts:s="6.1.0",pele:r="1.10.0"}=n,i=new Set,l=null;e.addEventListener("deck-scheme",o=>{l=o.detail.colours;for(let p of i)p.chart.setOption(a(p.option,p.box),!0)});let a=(o,p)=>{let u=parseFloat(getComputedStyle(p).fontSize)||16,c=getComputedStyle(p).direction==="rtl",d=Math.round(u*.6),f=(h,k)=>h===void 0?void 0:[h].flat().map(g=>({axisLabel:{color:l?.muted,fontSize:d},axisLine:{lineStyle:{color:l?.line}},splitLine:{lineStyle:{color:l?.line}},nameTextStyle:{color:l?.muted,fontSize:d},...c&&k&&g.type==="category"?{inverse:!0}:{},...c&&!k?{position:"right"}:{},...g}));return{color:l?.series,backgroundColor:"transparent",animation:!matchMedia("(prefers-reduced-motion: reduce)").matches,textStyle:{fontFamily:getComputedStyle(e).getPropertyValue("--deck-body")||"system-ui",color:l?.ink,fontSize:d},...o,title:o.title?{...o.title,textStyle:{color:l?.ink,fontSize:Math.round(u*.8),...o.title?.textStyle}}:void 0,legend:o.legend?{itemWidth:d*1.6,itemHeight:d,...o.legend,textStyle:{color:l?.ink,fontSize:d,...o.legend?.textStyle}}:void 0,grid:{containLabel:!0,left:d,right:d,top:o.title?u*1.8:d,bottom:o.legend?u*1.6:d,...o.grid},xAxis:f(o.xAxis,!0),yAxis:f(o.yAxis,!1),toolbox:void 0,series:[o.series??[]].flat().map(h=>h.type==="pie"?{label:{color:l?.ink,fontSize:d},...h}:h)}};return{async echarts(o,p){let u=JSON.parse(p),c=await ln(bt(t,"echarts",s,"dist/echarts.min.js"),"echarts"),d=document.createElement("div");d.className="deck-chart",d.setAttribute("role","img"),d.setAttribute("aria-label",String(u.title?.text??"")),o.append(d);let f=c.init(d,null,{renderer:"svg",locale:document.documentElement.lang?.startsWith("ja")?"JA":"EN"}),h={chart:f,option:u,box:o};i.add(h),f.setOption(a(u,o)),new ResizeObserver(()=>{f.resize(),f.setOption(a(u,o),!0)}).observe(d),Object.assign(o,{chart:f})},async mermaid(o,p){let u=await ln(bt(t,"pele",r,"dist/pele.global.js"),"pele"),c=getComputedStyle(e).getPropertyValue("--deck-body")||"system-ui, sans-serif",{svg:d}=u.render(p,{fontFamily:c,links:!1,images:!1,autoDirection:!0,maxWidth:Math.max(320,o.clientWidth*1.4)}),f=`--pele-bg:transparent;--pele-fg:${l?.ink};--pele-muted:${l?.muted};--pele-line:${l?.muted};--pele-surface:${l?.soft};--pele-surface-alt:${l?.line};--pele-border:${l?.primary};--pele-accent:${l?.primary};--pele-font:${c.replace(/[<>"]/g,"")}`,h=document.createElement("img");h.alt=p,h.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(d.replace(/^(<svg\b[^>]*>)/,`$1<style>svg{${f}}</style>`))}`;let k=document.createElement("div");k.className="deck-diagram",k.append(h),o.append(k)}}}var an=/^(\s*(?:image|background|backgroundImage)\s*:\s*)(['"]?)([^'"\n#]+?)\2(\s*(?:#.*)?)$/gm,on=/(!\[[^\]\n]*\]\()(<[^>\n]+>|[^\s)\n]+)((?:\s+(?:"[^"\n]*"|'[^'\n]*'))?\))/g,Br=t=>/^data:/i.test(t),Fr=t=>/^(https?:)?\/\//i.test(t);function Zr(t){let e="";for(let n=0;n<t.length;n+=32768)e+=String.fromCharCode(...t.subarray(n,n+32768));return btoa(e)}async function Hr(t,e,{web:n=!1,largest:s=8*1024*1024}={}){let r=new Map,i=[...t.matchAll(on)].map(c=>c[2].replace(/^<|>$/g,"")).concat([...t.matchAll(an)].map(c=>c[3].trim())),l=[],a=[],o=[];for(let c of new Set(i)){if(Br(c)||Fr(c)&&!n||/^(#|mailto:|javascript:)/i.test(c))continue;let d=await e(c).catch(()=>null);if(!d||!/^image\/(png|jpeg|gif|webp|avif|svg\+xml)$/.test(d.type)){a.push(c),r.set(c,null);continue}if(d.bytes.length>s){o.push(c),r.set(c,null);continue}r.set(c,`data:${d.type};base64,${Zr(d.bytes)}`),l.push(c)}let p=c=>r.get(c)??null;return{source:t.replace(on,(c,d,f,h)=>{let k=p(f.replace(/^<|>$/g,""));return k?`${d}${k}${h}`:c}).replace(an,(c,d,f,h,k)=>{let g=p(h.trim());return g?`${d}${f}${g}${f}${k}`:c}),inlined:l,missing:a,kept:o}}var Wr=/^(`{3,}|~{3,})[ \t]*(deck|slidev|markdown|md)?[ \t]*$/,Ur="layout|transition|class|image|background|clicks|title|level|hide|zoom|theme|colorSchema|lang|themeConfig|paginate|alt";function Gr(t){let e=t.replace(/\r\n?/g,`
105
105
  `).split(`
106
- `),n=[];for(let o=0;o<e.length;o++){let p=Zr.exec(e[o]);if(!p)continue;let u=p[1],c=o+1,h=!1,d=[];for(;c<e.length;c++){let f=e[c].trimEnd();if(!h&&f===u)break;/^(`{3,}|~{3,})\s*\S/.test(f)&&!h?h=!0:h&&/^(`{3,}|~{3,})\s*$/.test(f)&&(h=!1),d.push(e[c])}n.push({tag:p[2]??"",body:d}),o=c}let s=n.find(o=>o.tag==="deck")??n.find(o=>o.body.filter(p=>/^---\s*$/.test(p)).length>=2);if(!s)return null;let r=[];s.tag!=="deck"&&r.push(`fenced as ${s.tag||"nothing"}`);let i=s.body.join(`
107
- `),l=(o,p,u)=>{let c=i.replace(p,u);c!==i&&(r.push(o),i=c)};l("settings after an empty line",new RegExp(`^---[ \\t]*\\n\\s*\\n((?:(?:${Hr})\\s*:.*\\n(?:[ \\t]+\\S.*\\n)*)+)---[ \\t]*$`,"gm"),`---
106
+ `),n=[];for(let o=0;o<e.length;o++){let p=Wr.exec(e[o]);if(!p)continue;let u=p[1],c=o+1,d=!1,f=[];for(;c<e.length;c++){let h=e[c].trimEnd();if(!d&&h===u)break;/^(`{3,}|~{3,})\s*\S/.test(h)&&!d?d=!0:d&&/^(`{3,}|~{3,})\s*$/.test(h)&&(d=!1),f.push(e[c])}n.push({tag:p[2]??"",body:f}),o=c}let s=n.find(o=>o.tag==="deck")??n.find(o=>o.body.filter(p=>/^---\s*$/.test(p)).length>=2);if(!s)return null;let r=[];s.tag!=="deck"&&r.push(`fenced as ${s.tag||"nothing"}`);let i=s.body.join(`
107
+ `),l=(o,p,u)=>{let c=i.replace(p,u);c!==i&&(r.push(o),i=c)};l("settings after an empty line",new RegExp(`^---[ \\t]*\\n\\s*\\n((?:(?:${Ur})\\s*:.*\\n(?:[ \\t]+\\S.*\\n)*)+)---[ \\t]*$`,"gm"),`---
108
108
  $1---`),l("steps without empty lines",/^[ \t]*(<\/?v-clicks?>)[ \t]*$/gm,`
109
109
  $1
110
110
  `);let a=i.replace(/^```json[ \t]*\n([\s\S]*?)^```/gm,(o,p)=>p.includes('"series"')?`\`\`\`echarts
111
111
  ${p}\`\`\``:o);return a!==i&&(r.push("a chart fenced as json"),i=a),l("words after a slot marker",/^::([\w-]+)::[ \t]+(\S.*)$/gm,`::$1::
112
112
 
113
- $2`),{source:i,mended:r}}export{Ve as LOOKS,Pe as STANDARD,qe as VERSION,_e as contrast,vr as createDeck,Ur as deckIn,Nr as defaultBlocks,Kt as escape,Ue as inferLayout,Fr as inlinePictures,He as labelOf,Ze as layoutOf,kt as libraryAt,ht as markdownOf,ze as mergeKits,Ee as parseDeck,Pr as readDeckFile,Me as readable,Le as renderSlide,Jt as rendererUrl,Je as schemeOf,Mr as toPptx,Tt as tokensFrom,Ye as tokensOf,Yt as unescape,zr as writeDeckFile};
113
+ $2`),{source:i,mended:r}}export{fe as CORNERS,Ke as LOOKS,Le as STANDARD,Be as VERSION,ae as contrast,vr as createDeck,Gr as deckIn,qr as defaultBlocks,Yt as escape,Ge as inferLayout,Hr as inlinePictures,Ue as labelOf,We as layoutOf,bt as libraryAt,vt as logoOf,ft as markdownOf,Oe as mergeKits,ze as parseDeck,Lr as readDeckFile,_e as readable,Me as renderSlide,tn as rendererUrl,tt as schemeOf,_r as toPptx,Et as tokensFrom,et as tokensOf,en as unescape,Or as writeDeckFile};
114
114
  //# sourceMappingURL=deck.bundle.mjs.map