@codename/deck 0.2.0 → 0.4.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.
- package/README.md +4 -4
- package/dist/deck.bundle.mjs +95 -89
- package/dist/deck.bundle.mjs.map +4 -4
- package/dist/deck.css +118 -0
- package/dist/deck.js +215 -91
- package/dist/deck.js.map +4 -4
- package/dist/deck.mjs +43 -37
- package/dist/deck.mjs.map +4 -4
- package/dist/template.mjs +3 -1
- package/dist/template.mjs.map +4 -4
- package/dist/types/blocks.d.ts +6 -4
- package/dist/types/figures.d.ts +68 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/kit.d.ts +27 -4
- package/dist/types/look.d.ts +6 -2
- package/dist/types/mindmap.d.ts +69 -0
- package/dist/types/pptx.d.ts +3 -1
- package/dist/types/render.d.ts +21 -3
- package/dist/types/template.d.ts +35 -0
- package/dist/types/version.d.ts +1 -1
- package/docs/format.md +85 -4
- package/docs/host.md +4 -4
- package/docs/kits.md +21 -4
- package/package.json +1 -1
- package/src/blocks.js +26 -9
- package/src/deck.css +118 -0
- package/src/deck.js +13 -3
- package/src/figures.js +255 -0
- package/src/index.js +1 -1
- package/src/kit.js +59 -15
- package/src/look.js +22 -16
- package/src/mindmap.js +208 -0
- package/src/pptx.js +157 -26
- package/src/render.js +126 -20
- package/src/template.js +451 -26
- package/src/version.js +1 -1
package/dist/deck.js
CHANGED
|
@@ -1,107 +1,113 @@
|
|
|
1
|
-
"use strict";(()=>{function
|
|
1
|
+
"use strict";(()=>{function Ae(e){let t=e.replace(/\r\n?/g,`
|
|
2
2
|
`).split(`
|
|
3
|
-
`).map(
|
|
4
|
-
`);return
|
|
3
|
+
`).map(s=>({indent:s.length-s.trimStart().length,text:Ln(s).trimEnd(),raw:s})),i=_e(t,{i:0},0);return i&&typeof i=="object"&&!Array.isArray(i)?i:{}}function Ln(e){let t="";for(let n=0;n<e.length;n++){let i=e[n];if(t)i===t&&(t="");else if(i==='"'||i==="'")t=i;else if(i==="#"&&(n===0||/\s/.test(e[n-1])))return e.slice(0,n)}return e}function _e(e,t,n){for(;t.i<e.length&&!e[t.i].text.trim();)t.i++;if(t.i>=e.length||e[t.i].indent<n)return null;let i=e[t.i].indent;if(/^-(\s|$)/.test(e[t.i].text.trim())){let r=[];for(;t.i<e.length;){let o=e[t.i];if(!o.text.trim()){t.i++;continue}if(o.indent!==i||!/^-(\s|$)/.test(o.text.trim()))break;let a=o.text.trim().slice(1).trim();if(t.i++,!a)r.push(_e(e,t,i+1));else if(/^[^'"[{][^:]*:(\s|$)/.test(a)){let c=o.raw.indexOf(a);e.splice(t.i,0,{indent:c,text:" ".repeat(c)+a,raw:" ".repeat(c)+a}),r.push(_e(e,t,c))}else r.push(Ie(a))}return r}let s={};for(;t.i<e.length;){let r=e[t.i];if(!r.text.trim()){t.i++;continue}if(r.indent!==i)break;let o=/^("(?:[^"\\]|\\.)*"|'(?:[^']|'')*'|[^:]+?)\s*:(?:\s+(.*))?$/.exec(r.text.trim());if(t.i++,!o)continue;let a=String(Ie(o[1])),c=(o[2]??"").trim();c==="|"||c===">"||/^[|>][+-]$/.test(c)?s[a]=On(e,t,i,c[0]===">"):c?s[a]=Ie(c):s[a]=_e(e,t,i+1)}return s}function On(e,t,n,i){let s=[];for(;t.i<e.length&&(!e[t.i].raw.trim()||e[t.i].indent>n);)s.push(e[t.i++].raw);for(;s.length&&!s.at(-1)?.trim();)s.pop();let r=Math.min(...s.filter(a=>a.trim()).map(a=>a.length-a.trimStart().length)),o=s.map(a=>a.slice(r)).join(`
|
|
4
|
+
`);return i?o.replace(/([^\n])\n(?=[^\n])/g,"$1 "):o}function Ie(e){let t=e.trim();if(t.startsWith("[")||t.startsWith("{")){let n=Et(t,{i:0});if(n!==void 0)return n}if(/^"(?:[^"\\]|\\.)*"$/.test(t))try{return JSON.parse(t)}catch{return t.slice(1,-1)}return/^'(?:[^']|'')*'$/.test(t)?t.slice(1,-1).replace(/''/g,"'"):/^(true|yes|on)$/i.test(t)?!0:/^(false|no|off)$/i.test(t)?!1:/^(null|~)$/i.test(t)||t===""?null:/^[-+]?(\d+\.?\d*|\.\d+)(e[-+]?\d+)?$/i.test(t)?Number(t):t}function Et(e,t){let n=()=>{for(;/\s/.test(e[t.i]??"");)t.i++},i=()=>{if(n(),e[t.i]==="["||e[t.i]==="{")return Et(e,t);let o=t.i;if(e[t.i]==='"'||e[t.i]==="'"){let a=e[t.i++];for(;t.i<e.length&&!(e[t.i]===a&&e[t.i-1]!=="\\");)t.i++;t.i++}else for(;t.i<e.length&&!/[,\]}]/.test(e[t.i])&&!(e[t.i]===":"&&/^[\s,\]}]?$/.test(e[t.i+1]??""));)t.i++;return Ie(e.slice(o,t.i))},s=e[t.i++];if(n(),s==="["){let o=[];for(;t.i<e.length&&e[t.i]!=="]";){if(o.push(i()),n(),e[t.i]===",")t.i++;else if(e[t.i]!=="]")return;n()}return t.i++,o}let r={};for(;t.i<e.length&&e[t.i]!=="}";){let o=i();if(n(),e[t.i]!==":")return;if(t.i++,r[String(o)]=i(),n(),e[t.i]===",")t.i++;else if(e[t.i]!=="}")return;n()}return t.i++,r}var qn=/^::([\w-]+)::\s*$/;function Je(e){let n=e.replace(/\r\n?/g,`
|
|
5
5
|
`).split(`
|
|
6
|
-
`),
|
|
7
|
-
`)):{},
|
|
8
|
-
`)),n=
|
|
9
|
-
`),d="",
|
|
10
|
-
`).trim(),
|
|
11
|
-
`:"")+
|
|
12
|
-
`:"")+
|
|
13
|
-
`),
|
|
14
|
-
`),start:
|
|
15
|
-
`));for(let[
|
|
16
|
-
`).entries()){let Z=/^\s*(`{3,}|~{3,})/.exec(C)?.[1],K=bn.exec(C)??(q.has(R)?[C,q.get(R)]:null);if(m)Z&&C.trimStart().startsWith(m)&&(m="");else if(Z)m=Z;else if(K){w(),h=K[1],x=[],k=n+R+1;continue}x.push(C)}w();let H=f.filter((R,C)=>C>0||R.text.trim()||f.length===1),D=/^#{1,6}\s+(.+)$/m.exec(l.replace(/^```[\s\S]*?^```/gm,""));return{index:i,start:e[r?r[0]-1:n],end:e[s]-1,settings:a,slots:H,notes:d,title:String(a.title??D?.[1]??"").trim()}}var $t=/^[a-z][a-z0-9-]{0,31}$/,wn=/^(auto|min-content|max-content|\d{1,2}(\.\d)?fr|\d{1,3}%)$/,Sn=["Title Slide","Title and Content","Section Header","Two Content","Comparison","Title Only","Blank","Content with Caption","Picture with Caption"],vt={align:["start","center","end"],justify:["start","center","end"],paper:["paper","fill","ink","soft"],title:["normal","large","huge"],logo:["small","big","none"]},be=["top-end","top-start","bottom-end","bottom-start"],vn=t=>typeof t=="string"&&t.length<=7e5&&/^data:image\/(png|jpeg|gif|webp|svg\+xml);base64,[a-z0-9+/]+=*$/i.test(t)?t:null,Be={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"},Fe={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,At(e).layout]))};function At(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]=$n(k)),h==="title"?"default":h)):["default"],r=[...new Set(s)];if(!r.every(h=>$t.test(h)))return{layout:null,problems:["a slot name is not a-z, 0-9 and -"]};r.includes("default")||r.unshift("default");let a=(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]),o=a[0]?.length??0;if(!a.length||a.some(h=>h.length!==o)||a.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=a.flatMap((w,q)=>w.map((H,D)=>[H,D,q])).filter(([w])=>w===h);if(!k.length){h!=="default"&&e.push(`slot ${h} has no area`);continue}let m=k.map(w=>w[1]),x=k.map(w=>w[2]);if(k.length!==(Math.max(...m)-Math.min(...m)+1)*(Math.max(...x)-Math.min(...x)+1))return{layout:null,problems:[`slot ${h} is not a rectangle`]}}let l=(h,k)=>{let m=h===void 0?Array(k).fill("1fr"):(Array.isArray(h)?h:String(h).split(/\s+/)).map(String);return m.length===k&&m.every(x=>wn.test(x))?m:null},d=l(t.columns,o),c=l(t.rows,a.length);if(!d||!c)return{layout:null,problems:["columns or rows are not tracks deck knows (auto, 1fr, 40%…), one per column or row"]};let p=(h,k)=>{let m=String(t[h]??k);return vt[h].includes(m)?m:(e.push(`${h} ${m} is not one of ${vt[h].join(", ")}`),k)},u=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:u,intent:f(t.intent),use_when:f(t.use_when),avoid_when:f(t.avoid_when),slots:r,budgets:n,areas:a,columns:d,rows:c,align:p("align","start"),justify:p("justify","start"),paper:p("paper","paper"),title:p("title","normal"),logo:p("logo","small"),pptx:Sn.includes(t.pptx)?t.pptx:r.length>1?"Comparison":"Title and Content",numbered:t.numbered!==!1},problems:e}}function $n(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 An(t){if(!t||typeof t!="object")return{};if(!JSON.stringify(t).includes('"$value"'))return t;let e=u=>u&&typeof u=="object"&&"$value"in u?u.$value:u,n=u=>{let f=e(u);return typeof f=="string"?f:typeof f?.hex=="string"?f.hex:void 0},s=u=>{let f=e(u);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=u=>Object.fromEntries(Object.entries(u??{}).filter(([f])=>f in r).map(([f,h])=>[r[f],n(h)]).filter(([,f])=>f)),a=t.color??t.colour??{},o={...i(a),...i(a.light)},l=i(a.dark);Object.keys(l).length&&(o.dark=l);let d=t.font??t.fontFamily??{},c=s(d.heading??d.display??d.sans),p=s(d.body??d.text??d.sans);return(c||p)&&(o.fonts={heading:c??p,body:p??c}),o}function Ze(...t){let e={name:"standard",tokens:{},layouts:{...Fe.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=An(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(!$t.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:a,problems:o}=At(i);n.push(...o.map(l=>`layout ${r}: ${l}`)),a&&(e.layouts[r]=a)}}for(let[s,r]of[["logo",e.tokens],["dark logo",e.tokens.dark]])r?.logo!==void 0&&!vn(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&&!be.includes(e.tokens.logoAt)&&(n.push(`logoAt ${e.tokens.logoAt} is not one of ${be.join(", ")}`),delete e.tokens.logoAt),{kit:e,problems:n}}function zt(t,e,n){return typeof t.label=="string"?t.label:t.label?.[n]??t.label?.[n.split("-")[0]]??t.label?.en??e}function Ct(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(`
|
|
6
|
+
`),i=[0];for(let l of n)i.push(i.at(-1)+l.length+1);let s=[],r=0,o=null,a=!1;for(let l=0;l<n.length;l++){let p=n[l].trimEnd();if(a){a=Pt(p,!0);continue}if(p.startsWith("---")&&!/^---\s*-/.test(p)){if((l>r||o)&&s.push({start:r,end:l,matter:o}),o=null,r=l+1,p[3]!=="-"&&n[l+1]?.trim()&&/^\s*([\w-]+\s*:|#\s)/.test(n[l+1])&&!/^#{1,6}\s/.test(n[l+1])){let m=l+1;for(;m<n.length&&n[m].trimEnd()!=="---";)m++;o=[l+1,m],l=m,r=m+1}}else if(/^\s*(`{3,}|~{3,})/.test(p)){let m=/^\s*(`{3,}|~{3,})/.exec(p)[1],f=l+1;for(;f<n.length&&!n[f].trimStart().startsWith(m);)f++;f<n.length&&(l=f)}else a=Pt(p,!1)}(r<n.length||o)&&s.push({start:r,end:n.length,matter:o});let c=s.at(-1);if(s.length===1&&c){let l="",p=[];for(let m=c.start;m<c.end;m++){let f=/^\s*(`{3,}|~{3,})/.exec(n[m])?.[1];l?f&&n[m].trimStart().startsWith(l)&&(l=""):f?l=f:/^#{1,2}\s+\S/.test(n[m])&&p.push(m)}if(p.length>=2){s.pop();let m=p[0]>c.start&&!n.slice(c.start,p[0]).some(f=>f.trim())?p:[c.start,...p.slice(p[0]===c.start?1:0)];m.forEach((f,u)=>s.push({start:u===0?c.start:f,end:m[u+1]??c.end,matter:u===0?c.matter:null}))}}let d=s.map(({start:l,end:p,matter:m},f)=>Nn(n,i,l,p,m,f)).filter((l,p)=>p===0||l.slots.some(m=>m.text.trim())||Object.keys(l.settings).length);return d.forEach((l,p)=>{l.index=p}),{settings:d[0]?.settings??{},slides:d}}function jn(e){let t=new Map,n=e.findIndex(a=>/^:{3,}[ \t]*\{?[ \t]*\.?columns\b/.test(a));if(n<0)return t;let i=/^:+/.exec(e[n])[0],s=e.findIndex((a,c)=>c>n&&a.trim()===i),r=e.map((a,c)=>[a,c]).filter(([a,c])=>Number(c)>n&&(s<0||Number(c)<s)&&/^:{3,}[ \t]*\{?[ \t]*\.?col(umn)?\b/.test(String(a))).map(([,a])=>Number(a));if(r.length<2)return t;let o=r.length===2?["left","right"]:["left","middle","right",...r.slice(3).map((a,c)=>`col-${c+4}`)];return r.forEach((a,c)=>t.set(a,o[c])),s>0&&e.slice(s+1).some(a=>a.trim())&&t.set(s,"bottom"),t}function Pt(e,t){let n=0;for(;;)if(t){let i=e.indexOf("-->",n);if(i<0)return!0;t=!1,n=i+3}else{let i=e.indexOf("<!--",n);if(i<0)return!1;let s=e.indexOf("-->",i+4);if(s<0)return!0;n=s+3}}function Nn(e,t,n,i,s,r){let o=s?Ae(e.slice(s[0],s[1]).join(`
|
|
7
|
+
`)):{},a=n;for(;a<i&&!e[a].trim();)a++;if(!s&&/^```ya?ml\s*$/.test(e[a]??"")){let v=a+1;for(;v<i&&!e[v].startsWith("```");)v++;o=Ae(e.slice(a+1,v).join(`
|
|
8
|
+
`)),n=v+1}let c=e.slice(n,i).join(`
|
|
9
|
+
`),d="",l=/^(\?\?\?|Notes?:)[ \t]*(.*)$/m.exec(c);l&&l.index!==void 0&&!/^```/m.test(c.slice(l.index))&&(d=[l[2],c.slice(l.index+l[0].length)].join(`
|
|
10
|
+
`).trim(),c=c.slice(0,l.index)),c=c.replace(/<aside\b[^>]*class=["']?notes["']?[^>]*>([\s\S]*?)<\/aside>/gi,(v,z)=>(d+=(d?`
|
|
11
|
+
`:"")+z.replace(/<[^>]*>/g," ").replace(/[ \t]+/g," ").trim(),v.replace(/[^\n]/g," "))),c=c.replace(/^(:{3,})[ \t]*\{?[ \t]*\.?notes[ \t]*\}?[ \t]*\n([\s\S]*?)\n\1[ \t]*$/gm,(v,z,q)=>(d+=(d?`
|
|
12
|
+
`:"")+q.trim(),v.replace(/[^\n]/g," ")));let m=[...c.matchAll(/<!--([\s\S]*?)-->/g)].at(-1);m&&m.index!==void 0&&!c.slice(m.index+m[0].length).trim()&&(d=[m[1].trim(),d].filter(Boolean).join(`
|
|
13
|
+
`),c=c.slice(0,m.index));let f=[],u="default",h=n,g="",k=[],y=()=>f.push({name:u,text:k.join(`
|
|
14
|
+
`),start:t[h]}),b=jn(c.split(`
|
|
15
|
+
`));for(let[v,z]of c.split(`
|
|
16
|
+
`).entries()){let q=/^\s*(`{3,}|~{3,})/.exec(z)?.[1],R=qn.exec(z)??(b.has(v)?[z,b.get(v)]:null);if(g)q&&z.trimStart().startsWith(g)&&(g="");else if(q)g=q;else if(R){y(),u=R[1],k=[],h=n+v+1;continue}k.push(z)}y();let A=f.filter((v,z)=>z>0||v.text.trim()||f.length===1),$=/^#{1,6}\s+(.+)$/m.exec(c.replace(/^```[\s\S]*?^```/gm,""));return{index:r,start:t[s?s[0]-1:n],end:t[i]-1,settings:o,slots:A,notes:d,title:String(o.title??$?.[1]??"").trim()}}var Fe=/^[a-z][a-z0-9-]{0,31}$/,_n=/^(auto|min-content|max-content|\d{1,2}(\.\d)?fr|\d{1,3}%)$/,In=["Title Slide","Title and Content","Section Header","Two Content","Comparison","Title Only","Blank","Content with Caption","Picture with Caption"],Mt={align:["start","center","end"],justify:["start","center","end"],paper:["paper","fill","ink","soft"],title:["normal","large","huge"],logo:["small","big","none"],lists:["bullets","mindmap","steps","metrics","timeline","process","agenda","pyramid","bento"],parts:["none","versus","matrix"]},ze=["top-end","top-start","bottom-end","bottom-start"],Fn=e=>typeof e=="string"&&e.length<=7e5&&/^data:image\/(png|jpeg|gif|webp|svg\+xml);base64,[a-z0-9+/]+=*$/i.test(e)?e:null,Dn=e=>typeof e=="string"&&e.length<=3145728&&/^data:image\/(?:(?:png|jpeg|gif|webp|svg\+xml);base64,[a-z0-9+/]+=*|svg\+xml,[\w.!~*'()%/+=-]*)$/i.test(e)?e:null,Lt={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","mind-map":"mindmap",map:"mindmap",toc:"summary",contents:"summary","table-of-contents":"summary",outline:"summary","sub-section":"subsection","subsection-header":"subsection",cards:"steps",kpi:"metrics",kpis:"metrics",stats:"metrics",numbers:"metrics",roadmap:"timeline",milestones:"timeline",chevrons:"process",schedule:"agenda",programme:"agenda",program:"agenda",hierarchy:"pyramid",mosaic:"bento",vs:"versus","face-off":"versus",quadrant:"matrix",quadrants:"matrix","2x2":"matrix"},Ye={name:"standard",tokens:{},pictures:{},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},subsection:{label:{en:"Subsection",fr:"Sous-section"},justify:"center",paper:"soft",title:"large",pptx:"Section Header",numbered:!1},summary:{label:{en:"Contents",fr:"Sommaire"},contents:!0,pptx:"Title and Content"},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},mindmap:{label:{en:"Mind map",fr:"Carte mentale"},lists:"mindmap",pptx:"Title Only"},steps:{label:{en:"Steps",fr:"Étapes"},lists:"steps",pptx:"Title Only"},metrics:{label:{en:"Key figures",fr:"Chiffres clés"},lists:"metrics",pptx:"Title Only"},timeline:{label:{en:"Timeline",fr:"Frise"},lists:"timeline",pptx:"Title Only"},process:{label:{en:"Process",fr:"Processus"},lists:"process",pptx:"Title Only"},agenda:{label:{en:"Agenda",fr:"Programme"},lists:"agenda",pptx:"Title Only"},pyramid:{label:{en:"Pyramid",fr:"Pyramide"},lists:"pyramid",pptx:"Title Only"},bento:{label:{en:"Bento",fr:"Mosaïque"},lists:"bento",pptx:"Title Only"},versus:{label:{en:"Versus",fr:"Face à face"},parts:"versus",pptx:"Title Only"},matrix:{label:{en:"Matrix",fr:"Matrice"},parts:"matrix",pptx:"Title Only"}}).map(([e,t])=>[e,Ot(t).layout]))};function Ot(e){let t=[];if(!e||typeof e!="object")return{layout:null,problems:["not a layout"]};let n={},i=Array.isArray(e.slots)||typeof e.slots=="string"?[e.slots].flat().map(String):e.slots&&typeof e.slots=="object"?Object.entries(e.slots).map(([h,g])=>(g&&typeof g=="object"&&(n[h]=Bn(g)),h==="title"?"default":h)):["default"],s=[...new Set(i)];if(!s.every(h=>Fe.test(h)))return{layout:null,problems:["a slot name is not a-z, 0-9 and -"]};s.includes("default")||s.unshift("default");let o=(Array.isArray(e.areas)?e.areas.map(h=>[h].flat().join(" ")):String(e.areas??s.join(" ")).split(/\||\n/)).map(h=>h.trim().replace(/^"|"$/g,"").split(/\s+/)).filter(h=>h.length&&h[0]),a=o[0]?.length??0;if(!o.length||o.some(h=>h.length!==a)||o.flat().some(h=>h!=="."&&!s.includes(h)))return{layout:null,problems:["areas are not a rectangle of its slots"]};for(let h of s){let g=o.flatMap((b,A)=>b.map(($,v)=>[$,v,A])).filter(([b])=>b===h);if(!g.length){h!=="default"&&t.push(`slot ${h} has no area`);continue}let k=g.map(b=>b[1]),y=g.map(b=>b[2]);if(g.length!==(Math.max(...k)-Math.min(...k)+1)*(Math.max(...y)-Math.min(...y)+1))return{layout:null,problems:[`slot ${h} is not a rectangle`]}}let c=(h,g)=>{let k=h===void 0?Array(g).fill("1fr"):(Array.isArray(h)?h:String(h).split(/\s+/)).map(String);return k.length===g&&k.every(y=>_n.test(y))?k:null},d=c(e.columns,a),l=c(e.rows,o.length);if(!d||!l)return{layout:null,problems:["columns or rows are not tracks deck knows (auto, 1fr, 40%…), one per column or row"]};let p=(h,g)=>{let k=String(e[h]??g);return Mt[h].includes(k)?k:(t.push(`${h} ${k} is not one of ${Mt[h].join(", ")}`),g)},m=typeof e.label=="string"||e.label&&typeof e.label=="object"?e.label:void 0,f=Array.isArray(e.art)&&e.art.length<=8&&e.art.every(h=>typeof h=="string"&&Fe.test(h))?e.art:void 0;e.art!==void 0&&!f&&t.push("art is not 8 names at most");let u=h=>typeof h=="string"?h.slice(0,300):void 0;return{layout:{label:m,intent:u(e.intent),use_when:u(e.use_when),avoid_when:u(e.avoid_when),slots:s,budgets:n,areas:o,columns:d,rows:l,align:p("align","start"),justify:p("justify","start"),paper:p("paper","paper"),title:p("title","normal"),logo:p("logo","small"),lists:p("lists","bullets"),parts:p("parts","none"),contents:e.contents===!0,pptx:In.includes(e.pptx)?e.pptx:s.length>1?"Comparison":"Title and Content",numbered:e.numbered!==!1,art:f},problems:t}}function Bn(e){let t={};for(let n of["max_words","max_chars","item_max_words","heading_max_words"])Number.isInteger(e[n])&&e[n]>0&&(t[n]=e[n]);return Array.isArray(e.items)&&e.items.length===2&&e.items.every(Number.isInteger)&&(t.items=e.items),typeof e.required=="boolean"&&(t.required=e.required),typeof e.kind=="string"&&/^[a-z-]{1,20}$/.test(e.kind)&&(t.kind=e.kind),t}function Hn(e){if(!e||typeof e!="object")return{};if(!JSON.stringify(e).includes('"$value"'))return e;let t=m=>m&&typeof m=="object"&&"$value"in m?m.$value:m,n=m=>{let f=t(m);return typeof f=="string"?f:typeof f?.hex=="string"?`${f.hex}${typeof f.alpha=="number"&&f.alpha<1?Math.round(Math.max(0,f.alpha)*255).toString(16).padStart(2,"0"):""}`:void 0},i=m=>{let f=t(m);return Array.isArray(f)?f.map(String):typeof f=="string"?[f]:void 0},s={bg:"paper",background:"paper",paper:"paper",fg:"ink",text:"ink",ink:"ink",accent:"primary",primary:"primary",muted:"muted",surface:"soft",soft:"soft"},r=m=>Object.fromEntries(Object.entries(m??{}).filter(([f])=>f in s).map(([f,u])=>[s[f],n(u)]).filter(([,f])=>f)),o=e.color??e.colour??{},a={...r(o),...r(o.light)},c=r(o.dark);Object.keys(c).length&&(a.dark=c);let d=e.font??e.fontFamily??{},l=i(d.heading??d.display??d.sans),p=i(d.body??d.text??d.sans);return(l||p)&&(a.fonts={heading:l??p,body:p??l}),a}function et(...e){let t={name:"standard",tokens:{},layouts:{...Ye.layouts},pictures:{}},n=[];for(let i of e)if(!(!i||typeof i!="object")){if(typeof i.name=="string"&&(t.name=i.name),i.tokens&&typeof i.tokens=="object"){let s=Hn(i.tokens),r=s.dark&&typeof s.dark=="object"?{...t.tokens.dark,...s.dark}:t.tokens.dark;t.tokens={...t.tokens,...s,...r&&{dark:r}}}for(let[s,r]of Object.entries(i.pictures??{}))Fe.test(s)&&Dn(r)?t.pictures[s]=r:n.push(`picture ${s}: not a picture inside the kit`);for(let[s,r]of Object.entries(i.layouts??i.types??{})){if(!Fe.test(s)){n.push(`layout ${s}: not a-z, 0-9 and -`);continue}if(r===!1){s!=="default"&&delete t.layouts[s];continue}let{layout:o,problems:a}=Ot(r);n.push(...a.map(c=>`layout ${s}: ${c}`)),o&&(t.layouts[s]=o)}}for(let[i,s]of[["logo",t.tokens],["dark logo",t.tokens.dark]])s?.logo!==void 0&&!Fn(s.logo)&&(n.push(`${i}: not a picture inside the kit (PNG, JPEG, GIF, WebP or SVG as data:, 512 KB at most)`),delete s.logo);return t.tokens.logoAt!==void 0&&!ze.includes(t.tokens.logoAt)&&(n.push(`logoAt ${t.tokens.logoAt} is not one of ${ze.join(", ")}`),delete t.tokens.logoAt),{kit:t,problems:n}}function qt(e,t,n){return typeof e.label=="string"?e.label:e.label?.[n]??e.label?.[n.split("-")[0]]??e.label?.en??t}function De(e,t){let n=String(e.settings.layout??"").trim().toLowerCase();return t.layouts[n]?n:t.layouts[Lt[n]]?Lt[n]:Wn(e)}function Wn(e){let t=e.slots.map(s=>s.name);if(t.includes("middle"))return"three-cols";if(t.includes("left"))return"two-cols-header";if(t.includes("right"))return"two-cols";if(e.index===0)return"cover";let i=e.slots.map(s=>s.text).join(`
|
|
17
17
|
`).trim().split(`
|
|
18
|
-
`).filter(
|
|
19
|
-
`))?"fact":
|
|
20
|
-
`)
|
|
18
|
+
`).filter(s=>s.trim());return i.length===1&&/^#{1,2}\s+\S/.test(i[0])?"section":/^#\s+[^\s]*\d[\d\s.,%€$£¥]*\S*\s*$/u.test(i[0]??"")&&i.length<=3&&!/^\s*[-*\d]+[.)]?\s/m.test(i.slice(1).join(`
|
|
19
|
+
`))?"fact":i.length&&i.every((s,r)=>s.startsWith(">")||r===i.length-1&&!s.startsWith("#"))&&i[0].startsWith(">")?"quote":"default"}var Zn=/^([ \t]*)(?:[-*+]|\d{1,9}[.)])(?:[ \t]+(?:\[[ xX]\][ \t]+)?|$)/;function jt(e,t){let n=[],i=[],s=t,r=null;for(let o of e.split(`
|
|
20
|
+
`)){let a=s;if(s+=o.length+1,r){if(o.trimStart().startsWith(r.fence)&&!o.trim().slice(r.fence.length).trim()){let l=i.at(-1).item;(l.blocks??=[]).push({lang:r.lang,text:r.lines.join(`
|
|
21
|
+
`)}),r=null}else r.lines.push(o.slice(Math.min(r.indent,/^[ \t]*/.exec(o)?.[0].length??0)));continue}let c=/^([ \t]*)(`{3,}|~{3,})(.*)$/.exec(o);if(c&&i.length){r={fence:c[2],indent:c[1].length,lang:c[3].trim(),lines:[]};continue}let d=Zn.exec(o);if(d){let l=d[1].replace(/\t/g," ").length,p={text:o.slice(d[0].length).trim(),start:a+d[0].length,end:a+o.trimEnd().length,children:[]};for(;i.length&&i.at(-1).indent>=l;)i.pop();(i.at(-1)?.item.children??n).push(p),i.push({indent:l,item:p})}else if(o.trim()&&i.length){let l=i.at(-1).item;l.text=`${l.text} ${o.trim()}`.trim(),l.end=a+o.trimEnd().length}}return n}var Be=e=>e.normalize("NFC").replace(/[*_`~]/g,"").replace(/\s+/g," ").trim().toLowerCase();function tt(e){let t=[],n=new Map;for(let i of e){let s=Be(i.text),r=s?n.get(s):void 0;if(r){r.children.push(...i.children),r.step=r.step||i.step;continue}let o={...i,children:[...i.children]};s&&n.set(s,o),t.push(o)}for(let i of t)i.children=tt(i.children);return t}function Un(e,{rtl:t=!1,aspect:n=0}={}){let i=Ce(e,t,1);if(n>0&&i.width/i.height>n&&Ce(e,t,4).height<i.width/n)i=Ce(e,t,4);else if(n>0&&i.width/i.height>n){let s=1,r=4;for(let o=0;o<12;o++){let a=(s+r)/2;Ce(e,t,a).height<i.width/n?s=a:r=a}i=Ce(e,t,s)}return i}function Ce(e,t,n){let i=b=>b<=1?2.4:1.5,s=b=>b<=1?.8*n:.3*Math.sqrt(n),r=(b,A)=>(b.inner=b.children.reduce(($,v)=>$+r(v,A+1),0)+s(A+1)*Math.max(0,b.children.length-1),b.span=Math.max(b.h,b.inner),b.span),o=[],a=(b,A,$,v,z,q)=>{let R=$+b.span/2;b.x=v>0?A:A-b.w,b.side=t?-v:v,b.y=R-b.h/2;let I=R-b.inner/2,_=A+v*b.w;for(let Q of b.children){let K=_+v*i(z+1);a(Q,K,I,v,z+1,q),o.push({branch:q,depth:z+1,x1:_,y1:R,x2:K,y2:I+Q.span/2}),I+=Q.span+s(z+1)}};for(let b of e.children)r(b,1);e.span=e.h,e.side=0,e.x=-e.w/2,e.y=-e.h/2;let c=b=>b.reduce((A,$)=>A+$.span,0)+s(1)*Math.max(0,b.length-1),d=e.children.length,l=d;for(let b=Math.ceil(d/2);b<=d;b++)Math.max(c(e.children.slice(0,b)),c(e.children.slice(b)))<Math.max(c(e.children.slice(0,l)),c(e.children.slice(l)))&&(l=b);for(let[b,A]of[[1,e.children.slice(0,l)],[-1,e.children.slice(l).reverse()]]){let $=-c(A)/2;for(let v of A){let z=b*(e.w/2+i(1));a(v,z,$,b,1,e.children.indexOf(v)),o.push({branch:e.children.indexOf(v),depth:1,x1:b*e.w/2,y1:0,x2:z,y2:$+v.span/2}),$+=v.span+s(1)}}let p=[],m=b=>{p.push(b),b.children.forEach(m)};m(e);let f=Math.min(...p.map(b=>b.x)),u=Math.max(...p.map(b=>b.x+b.w)),h=Math.min(...p.map(b=>b.y)),g=Math.max(...p.map(b=>b.y+b.h)),k=u-f,y=b=>t?k-(b-f):b-f;for(let b of p)b.x=t?k-(b.x-f)-b.w:b.x-f,b.y=b.y-h;for(let b of o)Object.assign(b,{x1:y(b.x1),x2:y(b.x2),y1:b.y1-h,y2:b.y2-h});return{width:k,height:g-h,lines:o}}var Gn=({x1:e,y1:t,x2:n,y2:i})=>`M${e.toFixed(3)} ${t.toFixed(3)}C${((e+n)/2).toFixed(3)} ${t.toFixed(3)} ${((e+n)/2).toFixed(3)} ${i.toFixed(3)} ${n.toFixed(3)} ${i.toFixed(3)}`;function Nt(e){let t=e.querySelector(".deck-map-plane"),n=t.querySelector(".deck-map-lines"),i=t.querySelector(".deck-map-tree > li"),s=()=>{if(!e.clientWidth||!e.clientHeight)return;let o=parseFloat(getComputedStyle(t).fontSize)||16,a=[],c=f=>{let u=f.firstElementChild,h=f.lastElementChild?.tagName==="UL"?[...f.lastElementChild.children]:[],g={w:u.offsetWidth/o,h:u.offsetHeight/o,children:h.map(c)};return a.push([u,g]),g},{width:d,height:l,lines:p}=Un(c(i),{rtl:getComputedStyle(e).direction==="rtl",aspect:e.clientWidth/e.clientHeight});for(let[f,u]of a)f.style.setProperty("left",`${u.x/d*100}%`),f.style.setProperty("top",`${u.y/l*100}%`),f.setAttribute("data-side",u.side===1?"right":u.side===-1?"left":"middle");t.style.setProperty("width",`${d}em`),t.style.setProperty("height",`${l}em`),n.setAttribute("viewBox",`0 0 ${d.toFixed(3)} ${l.toFixed(3)}`);let m=[...n.children];for(let f of m)f.replaceChildren();for(let f of p){let u=document.createElementNS("http://www.w3.org/2000/svg","path");u.setAttribute("d",Gn(f)),u.setAttribute("data-depth",String(f.depth)),m[f.branch]?.append(u)}t.style.setProperty("scale",String(Math.min(1,e.clientWidth/(d*o),e.clientHeight/(l*o))))},r=new ResizeObserver(s);r.observe(e);for(let o of t.querySelectorAll(".deck-map-node"))r.observe(o)}var _t=/^\s*(?:[::—–|·-]\s*)?/,Vn=/^\d{1,2}(?:[:h.]\d{2}|h)?(?:\s?[ap]\.?m\.?)?(?:\s?[–-]\s?\d{1,2}(?:[:h.]\d{2}|h)?(?:\s?[ap]\.?m\.?)?)?(?=\s|$)/i,Qn=/^[+−-]?[^\p{L}\p{N}\s]?\d[\d., ]*\S*(?=\s|$)/u,Xn={agenda:Vn,metrics:Qn},It=e=>e.type==="paragraph"&&e.raw.trim().split(`
|
|
22
|
+
`).every(t=>/^\s*(\*\*|__)\S/.test(t));function Ft(e,t,n){if(e.type==="paragraph"){let s=t;return e.raw.split(`
|
|
23
|
+
`).flatMap(r=>{let o=s;s+=r.length+1;let a=r.trim();if(!a)return[];let[c]=n(a);return[{tokens:c?.tokens??[],start:o+r.length-r.trimStart().length,end:o+r.trimEnd().length,blocks:[],step:0}]})}let i=0;return e.items.map(s=>{let r=e.raw.indexOf(s.raw,i);i=r+s.raw.length;let o=t+Math.max(0,r),a=/^\s*(?:[-*+]|\d+[.)])\s+(?:\[[ xX]\]\s+)?/.exec(s.raw),[c,...d]=s.tokens,l=c&&(c.type==="text"||c.type==="paragraph")?c:null,p=o+(a?.[0].length??0);return{tokens:l?l.tokens??[{type:"text",raw:l.text,text:l.text}]:[],start:p,end:l&&a&&!l.raw.trim().includes(`
|
|
24
|
+
`)?p+l.raw.trim().length:-1,blocks:(l?d:s.tokens).map(m=>({token:m,start:o+Math.max(0,s.raw.indexOf(m.raw))})),step:0}})}function Kn(e,t){let[n,...i]=e.tokens,s=e.end>=0,r=(a,c)=>{let d=a[0],l=d?.type==="text"?_t.exec(d.raw)[0].length:0,p=(l?[{...d,raw:d.raw.slice(l),text:d.text.slice(_t.exec(d.text)[0].length)},...a.slice(1)]:a).filter(m=>m.raw.trim()||m.type!=="text");return{rest:p,restAt:s&&p.length&&c+l<e.end?[c+l,e.end]:null}};if(n?.type==="strong")return{lead:n.tokens,leadAt:s?[e.start+2,e.start+n.raw.length-2]:null,...r(i,e.start+n.raw.length)};let o=n?.type==="text"&&Xn[t]?.exec(n.raw);if(o){let a=n.raw.slice(o[0].length);return{lead:[{type:"text",raw:o[0],text:o[0]}],leadAt:s?[e.start,e.start+o[0].length]:null,...r([...a?[{type:"text",raw:a,text:a}]:[],...i],e.start+o[0].length)}}return{lead:null,leadAt:null,rest:e.tokens,restAt:s?[e.start,e.end]:null}}function Dt(e,t){let n=e.flatMap((r,o)=>r.type==="heading"?[{depth:r.depth,i:o}]:[]);if(!n.length)return new Set;let i=n.at(-1).depth,s=n.filter(r=>r.depth===i).map(r=>r.i);return new Set(s.length>t&&s[0]===e.findIndex(r=>r.type!=="space")?s.slice(1):s)}function Jn(e,t,n,i=2){let s=e.map(a=>{let c=De(a,t),d=a.settings.level,l=a.settings.hideInToc,p=/^(#{1,6})\s/m.exec(a.slots.map(h=>h.text).join(`
|
|
25
|
+
`).replace(/^(`{3,}|~{3,})[\s\S]*?^\1/gm,""))?.[1].length??1,m=Number.isInteger(d)||c==="section"||c==="subsection",f=Number.isInteger(d)?d:c==="section"?1:c==="subsection"?2:p,u=!!a.title&&(l===!1||l!==!0&&a.index!==n&&!t.layouts[c]?.contents&&!["cover","intro","end"].includes(c));return{index:a.index,title:a.title,level:f,part:m,kept:u,shown:l===!1}}).filter(a=>a.kept),r=s.some(a=>a.part)?s.filter(a=>a.part||a.shown):s,o=Math.min(...r.map(a=>a.level));return r.map(({index:a,title:c,level:d})=>({index:a,title:c,level:d-o+1})).filter(a=>a.level<=Math.max(1,i))}var He=(e,t,n)=>e.style.setProperty("grid-template-columns",`repeat(${t<=n?t:Math.ceil(t/2)}, minmax(0, 1fr))`);function Bt(e,t,n){let i=t.map(u=>({entry:u,...Kn(u,e)})),s=i.length,r=w("div",{class:`deck-figure deck-${e}`,"data-count":s});r.style.setProperty("--deck-count",String(s));let o=u=>u?ue(...u):void 0,a=u=>u.lead?w("span",{class:"deck-words deck-lead",dir:"auto","data-edit":o(u.leadAt)},Z(u.lead,n)):null,c=u=>u.rest.length?w("span",{class:"deck-words deck-text",dir:"auto","data-edit":o(u.restAt)},Z(u.rest,n)):null,d=u=>u.entry.blocks.map(({token:h,start:g})=>{let k=pe(h,g,n,null);return k&&!k.matches(".deck-block, .deck-table, pre")&&k.classList.add("deck-words"),k}),l=(u,h)=>{if(u.entry.step)for(let g of h)g&&de(g,u.entry.step)},p=(u,h,g)=>(u.style.setProperty("grid-column",String(h)),u.style.setProperty("grid-row",String(g)),u),m=u=>a(u)??c(u)??w("span",{class:"deck-words deck-lead"}),f=(u,h)=>w("div",{class:h},[u.lead?c(u):null,...d(u)]);switch(e){case"steps":He(r,s,5);for(let[u,h]of i.entries()){let g=w("div",{class:"deck-card deck-shape"},[w("span",{class:"deck-words deck-badge deck-shape"},[n.number(u+1)]),a(h),c(h),...d(h)]);l(h,[g]),r.append(g)}break;case"metrics":He(r,s,4);for(let u of i){let h=w("div",{class:"deck-metric deck-shape"},[a(u),c(u),...d(u)]);l(u,[h]),r.append(h)}break;case"timeline":He(r,s,99),r.append(w("span",{class:"deck-timeline-line deck-shape"}));for(let[u,h]of i.entries()){let g=[p(a(h)??w("span",{class:"deck-lead"}),u+1,1),p(w("span",{class:"deck-dot deck-shape"}),u+1,2),p(w("div",{class:"deck-milestone"},[c(h),...d(h)]),u+1,3)];l(h,g),r.append(...g)}break;case"process":He(r,s,99);for(let[u,h]of i.entries()){let g=[p(w("div",{class:"deck-chevron deck-shape","data-first":u===0||void 0,"data-last":u===s-1||void 0},[m(h)]),u+1,1),p(f(h,"deck-under"),u+1,2)];l(h,g),r.append(...g)}break;case"agenda":{let u=s>=7?[i.slice(0,Math.ceil(s/2)),i.slice(Math.ceil(s/2))]:[i];r.style.setProperty("grid-template-columns",`repeat(${u.length}, minmax(0, 1fr))`);for(let h of u)r.append(w("div",{class:"deck-agenda-col"},h.map(g=>{let k=w("div",{class:"deck-row deck-shape"},[a(g)??w("span",{class:"deck-lead"}),c(g),...d(g)]);return l(g,[k]),k})));break}case"pyramid":{let u=i.some(g=>g.lead&&(g.rest.length||g.entry.blocks.length));r.style.setProperty("grid-template-columns",u?"minmax(0, 1.15fr) minmax(0, 1fr)":"minmax(0, 30em)");let h=g=>Math.round(5e3*(.16+.84*g/s))/100;for(let[g,k]of i.entries()){let y=p(w("div",{class:"deck-level deck-shape"},[m(k)]),1,g+1);y.style.setProperty("clip-path",`polygon(${50-h(g)}% 0%, ${50+h(g)}% 0%, ${50+h(g+1)}% 100%, ${50-h(g+1)}% 100%)`),y.style.setProperty("padding-inline",`max(0.4em, ${Math.round((50-h(g))*100)/100}%)`);let b=[y,u?p(f(k,"deck-beside"),2,g+1):null];l(k,b),r.append(...b.filter(A=>A!==null))}break}case"bento":for(let[u,h]of i.entries()){let g=w("div",{class:`deck-tile deck-shape${u===0?" is-big":""}`},[a(h),c(h),...d(h)]);l(h,[g]),r.append(g)}break}return r}function Ht(e,t){let n=w("div",{class:`deck-figure deck-${e}`,"data-count":t.length});e==="versus"&&n.style.setProperty("grid-template-columns",t.map(()=>"minmax(0, 1fr)").join(" auto "));for(let[i,s]of t.entries()){for(let o of s)o instanceof HTMLElement&&!o.matches(".deck-block, .deck-table, pre, .deck-picture")&&o.classList.add("deck-words");e==="versus"&&i>0&&n.append(w("span",{class:"deck-vs deck-shape deck-words","aria-hidden":"true"},["VS"]));let r=t.length>1&&(e==="versus"?i===t.length-1:i===1);n.append(w("div",{class:`deck-part deck-shape${r?" is-highlight":""}`},s))}return n}function Wt(e,t,n){let i=e.deck?Jn(e.deck.slides,e.kit,t,n):[];if(!i.length)return null;let s=0,r=i.map(({index:c,title:d,level:l})=>{let[p]=e.lex(`# ${d}`);return w("div",{class:`deck-row deck-shape${l>1?" is-sub":""}`,"data-go":c,role:"link",tabindex:0},[w("span",{class:"deck-words deck-lead"},l>1?[]:[e.number(++s)]),w("span",{class:"deck-words deck-text",dir:"auto"},Z(p?.tokens??[{type:"text",text:d}],e))])}),o=r.length>=7?[r.slice(0,Math.ceil(r.length/2)),r.slice(Math.ceil(r.length/2))]:[r],a=w("div",{class:"deck-figure deck-agenda deck-contents","data-count":r.length},o.map(c=>w("div",{class:"deck-agenda-col"},c)));return a.style.setProperty("grid-template-columns",`repeat(${o.length}, minmax(0, 1fr))`),a}function w(e,t={},n=[]){let i=document.createElement(e);for(let[s,r]of Object.entries(t))r!==void 0&&r!==!1&&i.setAttribute(s,r===!0?"":String(r));for(let s of n)(s||s==="")&&i.append(s);return i}function Yn(e){let t=String(e??"").trim();return/^(https?:|mailto:|blob:|#)/i.test(t)||/^data:image\/(png|jpe?g|gif|webp|avif|svg\+xml);/i.test(t)?t:/^[a-z][\w+.-]*:/i.test(t)?null:t}function nt(e,t){let n=De(e,t.kit),i=t.kit.layouts[n]??Ye.layouts.default,s=String(e.settings.class??"").split(/\s+/).filter(k=>["invert","text-center","text-left"].includes(k)),r={step:0},o=new Map(e.slots.map(k=>[k.name,k])),a=i.slots,c=(i.art??[]).map(k=>t.kit.pictures?.[k]).filter(Boolean),d=w("section",{class:["deck-slide",`deck-layout-${n}`,...s.map(k=>`deck-class-${k}`),...c.length?["has-art"]:[]].join(" "),"data-index":e.index,"data-layout":n,"data-paper":i.paper,"data-align":i.align,"data-justify":i.justify,"data-title":i.title,"aria-roledescription":t.slide,role:"group"});for(let k of c)d.append(w("img",{class:"deck-art",src:k,alt:"","aria-hidden":"true"}));let l=w("div",{class:"deck-canvas"});l.style.setProperty("grid-template-areas",i.areas.map(k=>`"${k.map(y=>y==="."?".":`s-${y}`).join(" ")}"`).join(" ")),l.style.setProperty("grid-template-columns",i.columns.join(" ")),l.style.setProperty("grid-template-rows",i.rows.join(" ")),d.append(l);let p=e.settings.image??e.settings.background;if(typeof p=="string"&&["image-left","image-right","image","cover","quote"].includes(n)){let k=t.resolve(p);if(k){let y=w("div",{class:"deck-image",role:"img","aria-label":String(e.settings.alt??"")||void 0});y.style.setProperty("--deck-image",`url("${k.replace(/["\\\n]/g,encodeURIComponent)}")`),l.append(y),d.classList.add("has-image")}}for(let k of a){let y=o.get(k),b=w("div",{class:"deck-slot","data-slot":k},y?Zt(y,t,r,i.lists,i.parts):[]);b.style.setProperty("grid-area",`s-${k}`),l.append(b)}let m=i.contents&&Wt(t,e.index,Number(e.settings.maxDepth)||void 0);m&&l.querySelector(`.deck-slot[data-slot="${a[0]}"]`)?.append(m);for(let k of e.slots)a.includes(k.name)||l.append(w("div",{class:"deck-slot","data-slot":k.name},Zt(k,t,r)));i.numbered&&e.settings.paginate!==!1&&d.append(w("span",{class:"deck-number","aria-hidden":"true"},[t.number(e.index+1)]));let{logo:f,logoAt:u,dark:h}=t.kit.tokens,g=ze.includes(u)?u:ze[0];if(f&&i.logo!=="none")for(let[k,y]of[[f,h?.logo?"has-dark":""],[h?.logo,"is-dark"]])k&&d.append(w("img",{class:`deck-logo ${y}`.trim(),src:k,alt:"","aria-hidden":"true","data-size":i.logo,"data-at":g}));return{element:d,steps:r.step}}function Zt(e,t,n,i="bullets",s="none"){let r=t.lex(e.text),o=[],a=s==="none"?new Set:Dt(r,s==="versus"?2:4),c=[],d=o,l=-1,p=i==="mindmap"&&!a.size,m=i!=="bullets"&&i!=="mindmap"&&!a.size,f=[],u=-1,h=[],g=-1,k=null,y=e.start,b="";for(let[A,$]of r.entries()){let v=y;if(y+=$.raw.length,a.has(A)&&(l<0&&(l=o.length),c.push(d=[])),m&&($.type==="list"||It($))){u<0&&(u=o.length);let R=Ft($,v,t.lex),I=b==="click"?++n.step:0;for(let _ of R)_.step=I||(b==="clicks"?++n.step:0);f.push(...R);continue}if(p&&($.type==="list"||$.type==="heading"&&o.length&&r.slice(A+1).find(R=>R.type!=="space")?.type==="list")){if(g<0&&(g=o.length),$.type==="heading"){k=pe($,v,t,null);continue}let R=jt($.raw,v);for(let I of R)b==="clicks"&&(I.step=!0);h.push({items:k?[{text:k.textContent??"",start:v,end:v,children:R,element:k,step:b==="clicks"}]:R,step:b==="clicks"}),k=null;continue}let z=$.type==="paragraph"?$.raw.trim().split(`
|
|
26
|
+
`).map(R=>R.trim()):[];if(z.length&&z.every(R=>/^:{3,}/.test(R))){for(let R of z)/^:{3,}[ \t]*\{?[ \t]*\.?incremental\b/.test(R)?b="clicks":/^:{3,}\s*$/.test(R)&&b==="clicks"&&(b="");continue}if($.type==="html"){let R=/^\s*<(\/?)(v-clicks?|br)\b[^>]*>\s*$/i.exec($.raw);if(R&&R[2]==="br")d.push(w("br"));else if(R)b=R[1]?"":R[2].toLowerCase()==="v-clicks"?"clicks":"click";else if(/<li\b/i.test($.raw)){let I=w(/<ol\b/i.test($.raw)?"ol":"ul",{dir:"auto"});for(let[,_,Q]of $.raw.matchAll(/<li\b([^>]*)>([\s\S]*?)(?=<\/li>|<li\b|<\/[ou]l>|$)/gi)){let K=Q.replace(/<!--[\s\S]*?-->/g,"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();if(!K)continue;let ne=w("li",{dir:"auto"},[K]);(/\bv-click\b/.test(_)||b==="clicks")&&de(ne,++n.step),I.append(ne)}I.childElementCount&&d.push(I)}else{let I=$.raw.replace(/<!--[\s\S]*?-->/g,"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();I&&d.push(w("p",{},[I]))}continue}let q=pe($,v,t,b==="clicks"?n:null);q&&((b==="click"||b==="clicks"&&$.type!=="list")&&de(q,++n.step),d.push(q))}return h.length&&es(o,h.flatMap(A=>A.items),t,n,g),f.length&&o.splice(u,0,Bt(i,f,t)),c.length&&o.splice(l,0,Ht(s,c)),o}function es(e,t,n,i,s){let r=tt(t),o=s>0&&e[0]instanceof HTMLElement&&e[0].matches("h1, h2, h3, h4, h5, h6, .deck-h")?e[0]:null,a;r.length===1&&(!o||Be(o.textContent??"")===Be(r[0].text))?a={...r[0],element:o??r[0].element}:r.length===1?a=r[0]:a={text:o?.textContent??"",start:0,end:0,children:r,element:o??void 0},o&&a.element===o&&(e.shift(),s--);let c=(u,h)=>{if(u.element)return u.element.classList.add("deck-map-node"),u.element.setAttribute("data-depth",String(h)),u.element;let[g]=u.text?n.lex(u.text):[],k=Z(g?.tokens??[{type:"text",text:u.text}],n);return u.blocks?.length?w("div",{class:"deck-map-node has-block","data-depth":h},[u.text?w("span",{class:"deck-map-words",dir:"auto","data-edit":ue(u.start,u.end)},k):null,...u.blocks.map(y=>pe({type:"code",lang:y.lang,text:y.text,raw:y.text},u.start,n,null))]):w("span",{class:"deck-map-node","data-depth":h,dir:"auto","data-edit":ue(u.start,u.end)},k)},d=(u,h)=>w("li",{},[c(u,h),u.children.length?w("ul",{},u.children.map(g=>d(g,h+1))):null]),l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.setAttribute("class","deck-map-lines"),l.setAttribute("aria-hidden","true"),l.setAttribute("preserveAspectRatio","none");let p=a.children.map((u,h)=>{let g=d(u,1),k=document.createElementNS("http://www.w3.org/2000/svg","g");for(let y of[g,k])y.setAttribute("data-branch",String(h%6+1));if(u.step){let y=++i.step;de(g,y),de(k,y)}return l.append(k),g}),m=w("li",{},[c(a,0),p.length?w("ul",{},p):null]),f=w("div",{class:"deck-mindmap"},[w("div",{class:"deck-map-plane"},[l,w("ul",{class:"deck-map-tree"},[m])])]);Nt(f),e.splice(s,0,f)}var de=(e,t)=>{e.classList.add("deck-step"),e.setAttribute("data-step",String(t))};function pe(e,t,n,i){switch(e.type){case"heading":{let s=/^\s*#{1,6}[ \t]+/.exec(e.raw),r=s?ue(t+s[0].length,t+e.raw.replace(/\s*#*\s*$/,"").length):void 0;return n.headings==="real"?w(`h${e.depth}`,{dir:"auto","data-edit":r},Z(e.tokens,n)):w("p",{class:`deck-h deck-h${e.depth}`,role:"heading","aria-level":Math.min(6,e.depth+2),dir:"auto","data-edit":r},Z(e.tokens,n))}case"paragraph":{let s=e.tokens.length===1&&e.tokens[0].type==="image";return w("p",{dir:"auto",class:s?"deck-picture":void 0,"data-edit":s?void 0:ue(t,t+e.raw.trimEnd().length)},Z(e.tokens,n))}case"text":return w("p",{dir:"auto"},Z(e.tokens??[{type:"text",text:e.text}],n));case"blockquote":return w("blockquote",{},ts(e.tokens,t,e.raw,n));case"list":{let s=0,r=w(e.ordered?"ol":"ul",{start:e.ordered&&e.start!==1?e.start:void 0,class:e.items.some(o=>o.task)?"deck-tasks":void 0});for(let o of e.items){let a=e.raw.indexOf(o.raw,s);s=a+o.raw.length;let c=t+Math.max(0,a),d=/^\s*(?:[-*+]|\d+[.)])\s+(?:\[[ xX]\]\s+)?/.exec(o.raw),l=o.tokens.length===1&&o.tokens[0].type==="text"&&!/\n\s*\S/.test(o.raw.trim().split(`
|
|
21
27
|
`).slice(1).join(`
|
|
22
|
-
`)),p=
|
|
23
|
-
`).entries())
|
|
24
|
-
`]));return y("pre",{dir:"ltr",class:o.size?"has-marks":void 0,tabindex:0},[l])}case"table":{let r=i=>i??void 0;return y("div",{class:"deck-table"},[y("table",{},[y("thead",{},[y("tr",{},t.header.map((i,a)=>y("th",{"data-align":r(t.align[a]),dir:"auto"},U(i.tokens,n))))]),y("tbody",{},t.rows.map(i=>y("tr",{},i.map((a,o)=>y("td",{"data-align":r(t.align[o]),dir:"auto"},U(a.tokens,n))))))])])}default:return null}}function Cn(t,e,n,s){let r=0;return t.map(i=>{let a=n.indexOf(i.raw,r);return r=Math.max(r,a+i.raw.length),Ge(i,e+Math.max(0,a),s,null)})}function Tn(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 He=(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=zn(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 Rt={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}},Xe={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 Pt(t,e={}){let n=Rt[String(t.theme??"")]??Rt.default,s=typeof t.themeConfig=="object"&&t.themeConfig?t.themeConfig:{},r={...n,...Et(e),...Et(s)};return Xe[r.voice]||(r.voice="calm"),r}function Et(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 Lt(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"?he(s,[0,0,0],.35):n)),a=xe(G(r.ink??"")??(e==="dark"?he(n,[255,255,255],.2):s)),o=G(r.primary??t.primary)??[247,197,49],l=Qe(o,i,4.5),d=fe(a,o)>=fe(i,o)?a:i,c=(t.series??[]).map(G).filter(u=>u!==null),p=[0,1,2,3,4,5].map(u=>Qe(c[u%(c.length||1)]??Rn(o,u*57),i,3));return{paper:ie(i),ink:ie(a),muted:ie(Qe(xe(G(r.muted??(e==="light"?t.muted??"":""))??he(a,i,.38)),i,4.5)),line:ie(he(a,i,.82)),primary:ie(l),onPrimary:ie(d),soft:ie(G(r.soft??(e==="light"?t.soft??"":""))??he(o,i,.78)),series:p.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)))),he=(t,e,n)=>t.map((s,r)=>s+(e[r]-s)*n);function Ve(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 fe(t,e){let[n,s]=[Ve(t),Ve(e)].sort((r,i)=>i-r);return(n+.05)/(s+.05)}function Qe(t,e,n){let s=Ve(e)>.18?[0,0,0]:[255,255,255],r=0,i=xe(t);for(;fe(i,e)<n&&r<1;)i=xe(he(t,s,r=Math.min(1,r+.02)));return i}function Rn(t,e){let[n,s,r]=t.map(x=>x/255),i=Math.max(n,s,r),a=Math.min(n,s,r),o=(i+a)/2,l=i-a,d=l===0?0:l/(1-Math.abs(2*o-1)),c=l===0?0:i===n?(s-r)/l%6:i===s?(r-n)/l+2:(n-s)/l+4;c=(c*60+e+360)%360;let p=(1-Math.abs(2*o-1))*Math.max(d,.55),u=p*(1-Math.abs(c/60%2-1)),f=o-p/2,[h,k,m]=c<60?[p,u,0]:c<120?[u,p,0]:c<180?[0,p,u]:c<240?[0,u,p]:c<300?[u,0,p]:[p,0,u];return[h+f,k+f,m+f].map(x=>x*255)}var jt={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:"保存しました"}},Mt=t=>jt[t.split("-")[0].toLowerCase()]??jt.en;function tt(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var de=tt();function Wt(t){de=t}var le={exec:()=>null};function ge(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 v(t,e=""){let n=typeof t=="string"?t:t.source,s={replace:(r,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(O.caret,"$1"),n=n.replace(r,a),s},getRegex:()=>new RegExp(n,e)};return s}var En=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),O={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:ge(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:ge(t=>new RegExp(`^ {0,${t}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:ge(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:ge(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:ge(t=>new RegExp(`^ {0,${t}}(?:</?(?:${ve})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`,"i")),blockquoteBeginRegex:ge(t=>new RegExp(`^ {0,${t}}>`))},Pn=/^(?:[ \t]*(?:\n|$))+/,Ln=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,jn=/^ {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+|$)/,Mn=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,nt=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Ut=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Gt=v(Ut).replace(/bull/g,nt).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(),_n=v(Ut).replace(/bull/g,nt).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(),rt=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,On=/^[^\n]+/,st=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,qn=v(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",st).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Nn=v(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,nt).getRegex(),ve="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",it=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,In=v("^ {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",it).replace("tag",ve).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Qt=t=>v(rt).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",ve).getRegex(),Dn=Qt(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Bn=Qt(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Fn=v(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Bn).getRegex(),at={blockquote:Fn,code:Ln,def:qn,fences:jn,heading:Mn,hr:Se,html:In,lheading:Gt,list:Nn,newline:Pn,paragraph:Dn,table:le,text:On},_t=v("^ *([^\\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",ve).getRegex(),Zn={...at,lheading:_n,table:_t,paragraph:v(rt).replace("hr",Se).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",_t).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",ve).getRegex()},Hn={...at,html:v(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",it).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:le,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:v(rt).replace("hr",Se).replace("heading",` *#{1,6} *[^
|
|
25
|
-
]`).replace("lheading",
|
|
26
|
-
`),n=
|
|
27
|
-
`)}function
|
|
28
|
-
`).map(
|
|
29
|
-
`)}function
|
|
30
|
-
`),depth:
|
|
31
|
-
`)}}blockquote(
|
|
28
|
+
`)),p=w("li",{dir:"auto","data-edit":l&&d?ue(c+d[0].length,c+o.raw.trimEnd().length):void 0},[o.task?w("input",{type:"checkbox",checked:o.checked,disabled:!0,"aria-label":o.text}):null,...o.tokens.flatMap(m=>m.type==="text"?Z(m.tokens??[{type:"text",text:m.text}],n):[pe(m,c+Math.max(0,o.raw.indexOf(m.raw)),n,null)])]);i&&de(p,++i.step),r.append(p)}return r}case"code":{let s=/^(\S*)\s*(?:\{([^}]*)\})?/.exec(e.lang??"")??[],r=(s[1]??"").toLowerCase(),o=n.blocks[r];if(o){let d=w("div",{class:`deck-block deck-${r}`,"data-source":e.text});return d.append(w("pre",{class:"deck-block-source",dir:"ltr"},[w("code",{},[e.text])])),queueMicrotask(()=>Promise.resolve(o(d,e.text,ns(e.lang??""))).catch(()=>d.classList.add("is-failed"))),d}let a=ss(s[2]??""),c=w("code",{class:r?`language-${r}`:void 0});for(let[d,l]of e.text.split(`
|
|
29
|
+
`).entries())c.append(w("span",{class:a.has(d+1)?"deck-line is-marked":"deck-line"},[l,`
|
|
30
|
+
`]));return w("pre",{dir:"ltr",class:a.size?"has-marks":void 0,tabindex:0},[c])}case"table":{let s=r=>r??void 0;return w("div",{class:"deck-table"},[w("table",{},[w("thead",{},[w("tr",{},e.header.map((r,o)=>w("th",{"data-align":s(e.align[o]),dir:"auto"},Z(r.tokens,n))))]),w("tbody",{},e.rows.map(r=>w("tr",{},r.map((o,a)=>w("td",{"data-align":s(e.align[a]),dir:"auto"},Z(o.tokens,n))))))])])}default:return null}}function ts(e,t,n,i){let s=0;return e.map(r=>{let o=n.indexOf(r.raw,s);return s=Math.max(s,o+r.raw.length),pe(r,t+Math.max(0,o),i,null)})}function ns(e){let t=/\{[\s\S]*\}/.exec(e)?.[0];if(!t)return{};let n=Ae(`options: ${t.replace(/\n/g," ")}`).options;return n&&typeof n=="object"&&!Array.isArray(n)?n:{}}function ss(e){let t=new Set;for(let n of e.split(/[,|]/)){let[i,s]=n.split("-").map(r=>parseInt(r,10));if(Number.isFinite(i))for(let r=i;r<=(Number.isFinite(s)?s:i);r++)t.add(r)}return t}var ue=(e,t)=>t>e?`${e}-${t}`:void 0;function Z(e=[],t){return e.flatMap(n=>{switch(n.type){case"text":case"escape":return n.tokens?Z(n.tokens,t):[n.text.replace(/&(amp|lt|gt|quot|#39);/g,(i,s)=>({amp:"&",lt:"<",gt:">",quot:'"',"#39":"'"})[s])];case"strong":return[w("strong",{},Z(n.tokens,t))];case"em":return[w("em",{},Z(n.tokens,t))];case"del":return[w("del",{},Z(n.tokens,t))];case"codespan":return[w("code",{},[n.text.replace(/&(amp|lt|gt|quot|#39);/g,(i,s)=>({amp:"&",lt:"<",gt:">",quot:'"',"#39":"'"})[s])])];case"br":return[w("br")];case"link":{let i=Yn(n.href);return i?[w("a",{href:i,rel:"noopener noreferrer",target:i.startsWith("#")?void 0:"_blank"},Z(n.tokens,t))]:Z(n.tokens,t)}case"image":{let i=t.resolve(n.href);return i?[w("img",{src:i,alt:n.text,loading:"lazy"})]:[n.text]}case"html":return/^<br\s*\/?>$/i.test(n.raw)?[w("br")]:[];default:return n.text?[n.text]:[]}})}var Ut={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}},rt={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 Vt(e,t={}){let n=Ut[String(e.theme??"")]??Ut.default,i=typeof e.themeConfig=="object"&&e.themeConfig?e.themeConfig:{},s={...n,...Gt(t),...Gt(i)};return rt[s.voice]||(s.voice="calm"),s}function Gt(e){let t={};for(let n of["paper","ink","primary","muted","soft"])typeof e[n]=="string"&&J(e[n])&&(t[n]=e[n]);return e.dark&&typeof e.dark=="object"&&(t.dark=Object.fromEntries(Object.entries(e.dark).filter(([,n])=>typeof n=="string"&&J(n)))),e.fonts&&Array.isArray(e.fonts.heading)&&Array.isArray(e.fonts.body)&&(t.fonts={heading:e.fonts.heading.map(String),body:e.fonts.body.map(String)}),typeof e.voice=="string"&&(t.voice=e.voice),typeof e.radius=="number"&&(t.radius=e.radius),Array.isArray(e.series)&&e.series.length&&e.series.every(n=>typeof n=="string"&&J(n))&&(t.series=e.series.slice(0,6)),t}function Qt(e,t){let n=J(e.paper)??[255,253,248],i=J(e.ink,n)??[29,27,22],s=t==="dark"?e.dark??{}:{},r=we(J(s.paper??"",t==="dark"?[0,0,0]:[255,255,255])??(t==="dark"?he(i,[0,0,0],.35):n)),o=we(J(s.ink??"",r)??(t==="dark"?he(n,[255,255,255],.2):i)),a=J(s.primary??e.primary,r)??[247,197,49],c=st(a,r,4.5),d=ve(o,a)>=ve(r,a)?o:r,l=(e.series??[]).map(m=>J(m,r)).filter(m=>m!==null),p=[0,1,2,3,4,5].map(m=>st(l[m%(l.length||1)]??is(a,m*57),r,3));return{paper:le(r),ink:le(o),muted:le(st(we(J(s.muted??(t==="light"?e.muted??"":""),r)??he(o,r,.38)),r,4.5)),line:le(he(o,r,.82)),primary:le(c),onPrimary:le(d),soft:le(J(s.soft??(t==="light"?e.soft??"":""),r)??he(a,r,.78)),series:p.map(le)}}function J(e,t=[255,255,255]){let n=String(e).trim(),i=/^#?([\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/i.exec(n)?.[1],s=/^rgba?\(([^)]*)\)$/i.exec(n)?.[1].split(/[\s,/]+/).filter(Boolean),r=(l,p)=>l.endsWith("%")?parseFloat(l)/100*p:Number(l),[o,a,c,d=1]=i?(i.length<5?[...i].map(l=>l+l):i.match(/../g)).map((l,p)=>parseInt(l,16)/(p>2?255:1)):s?.length===3||s?.length===4?s.map((l,p)=>r(l,p>2?1:255)):[];return o!==void 0&&[o,a,c].every(l=>l>=0&&l<=255)&&d>=0&&d<=1?we(he(t,[o,a,c],d)):null}var le=e=>`#${e.map(t=>Math.round(Math.max(0,Math.min(255,t))).toString(16).padStart(2,"0")).join("")}`,we=e=>e.map(t=>Math.round(Math.max(0,Math.min(255,t)))),he=(e,t,n)=>e.map((i,s)=>i+(t[s]-i)*n);function it(e){let[t,n,i]=e.map(s=>{let r=s/255;return r<=.03928?r/12.92:((r+.055)/1.055)**2.4});return .2126*t+.7152*n+.0722*i}function ve(e,t){let[n,i]=[it(e),it(t)].sort((s,r)=>r-s);return(n+.05)/(i+.05)}function st(e,t,n){let i=it(t)>.18?[0,0,0]:[255,255,255],s=0,r=we(e);for(;ve(r,t)<n&&s<1;)r=we(he(e,i,s=Math.min(1,s+.02)));return r}function is(e,t){let[n,i,s]=e.map(k=>k/255),r=Math.max(n,i,s),o=Math.min(n,i,s),a=(r+o)/2,c=r-o,d=c===0?0:c/(1-Math.abs(2*a-1)),l=c===0?0:r===n?(i-s)/c%6:r===i?(s-n)/c+2:(n-i)/c+4;l=(l*60+t+360)%360;let p=(1-Math.abs(2*a-1))*Math.max(d,.55),m=p*(1-Math.abs(l/60%2-1)),f=a-p/2,[u,h,g]=l<60?[p,m,0]:l<120?[m,p,0]:l<180?[0,p,m]:l<240?[0,m,p]:l<300?[m,0,p]:[p,0,m];return[u+f,h+f,g+f].map(k=>k*255)}var Xt={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:"保存しました"}},Kt=e=>Xt[e.split("-")[0].toLowerCase()]??Xt.en;function dt(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ke=dt();function cn(e){ke=e}var fe={exec:()=>null};function Se(e){let t=[];return n=>{let i=Math.max(0,Math.min(3,n-1)),s=t[i];return s||(s=e(i),t[i]=s),s}}function C(e,t=""){let n=typeof e=="string"?e:e.source,i={replace:(s,r)=>{let o=typeof r=="string"?r:r.source;return o=o.replace(U.caret,"$1"),n=n.replace(s,o),i},getRegex:()=>new RegExp(n,t)};return i}var rs=((e="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),U={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:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Se(e=>new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Se(e=>new RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Se(e=>new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Se(e=>new RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Se(e=>new RegExp(`^ {0,${e}}(?:</?(?:${Pe})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`,"i")),blockquoteBeginRegex:Se(e=>new RegExp(`^ {0,${e}}>`))},as=/^(?:[ \t]*(?:\n|$))+/,os=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ls=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ee=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,cs=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,pt=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,dn=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,pn=C(dn).replace(/bull/g,pt).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(),ds=C(dn).replace(/bull/g,pt).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(),ut=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,ps=/^[^\n]+/,ht=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,us=C(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ht).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),hs=C(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,pt).getRegex(),Pe="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",mt=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ms=C("^ {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",mt).replace("tag",Pe).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),un=e=>C(ut).replace("hr",Ee).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",e).replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",Pe).getRegex(),fs=un(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),gs=un(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),ks=C(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",gs).getRegex(),ft={blockquote:ks,code:os,def:us,fences:ls,heading:cs,hr:Ee,html:ms,lheading:pn,list:hs,newline:as,paragraph:fs,table:fe,text:ps},Jt=C("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ee).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",Pe).getRegex(),bs={...ft,lheading:ds,table:Jt,paragraph:C(ut).replace("hr",Ee).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Jt).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",Pe).getRegex()},xs={...ft,html:C(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",mt).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:fe,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:C(ut).replace("hr",Ee).replace("heading",` *#{1,6} *[^
|
|
31
|
+
]`).replace("lheading",pn).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ys=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ws=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,hn=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,vs=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ie=/[\p{P}\p{S}]/u,$e=/[\s\p{P}\p{S}]/u,Me=/[^\s\p{P}\p{S}]/u,Ss=C(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,$e).getRegex(),$s=/[\p{Pi}\p{Ps}"']/u,mn=/(?!~)[\p{P}\p{S}]/u,As=/(?!~)[\s\p{P}\p{S}]/u,zs=/(?:[^\s\p{P}\p{S}]|~)/u,Cs=C(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",rs?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),fn=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Ts=C(fn,"u").replace(/punct/g,ie).getRegex(),Rs=C(fn,"u").replace(/punct/g,mn).getRegex(),Es=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Ps=C(Es,"u").replace(/openQuote/g,$s).replace(/punct/g,ie).getRegex(),gn="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ms=C(gn,"gu").replace(/notPunctSpace/g,Me).replace(/punctSpace/g,$e).replace(/punct/g,ie).getRegex(),Ls=C(gn,"gu").replace(/notPunctSpace/g,zs).replace(/punctSpace/g,As).replace(/punct/g,mn).getRegex(),Os="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",qs=C(Os,"gu").replace(/notPunctSpace/g,Me).replace(/punctSpace/g,$e).replace(/punct/g,ie).getRegex(),js=C("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Me).replace(/punctSpace/g,$e).replace(/punct/g,ie).getRegex(),Ns="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",_s=C(Ns,"gu").replace(/notPunctSpace/g,Me).replace(/punctSpace/g,$e).replace(/punct/g,ie).getRegex(),Is=C(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ie).getRegex(),Fs="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Ds=C(Fs,"gu").replace(/notPunctSpace/g,Me).replace(/punctSpace/g,$e).replace(/punct/g,ie).getRegex(),Bs=C(/\\(punct)/,"gu").replace(/punct/g,ie).getRegex(),Hs=C(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/,"gu").replace(/punct/g,ie).getRegex(),Ws=C(/^<(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(),Zs=C(mt).replace("(?:-->|$)","-->").getRegex(),Us=C("^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",Zs).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),kn=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,Ze=C(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",kn).getRegex(),Gs=C(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",Ze).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Vs=C(/^!?\[(label)\]\[(ref)\]/).replace("label",Ze).replace("ref",ht).getRegex(),Qs=C(/^!?\[(ref)\](?:\[\])?/).replace("ref",ht).getRegex(),Yt=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Xs=C(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",kn).getRegex(),Ks=C("reflink|nolink(?!\\()","g").replace("reflink",C(/^!?\[(label)\]\[(ref)\]/).replace("label",Xs).replace("ref",Yt).getRegex()).replace("nolink",C(/^!?\[(ref)\](?:\[\])?/).replace("ref",Yt).getRegex()).getRegex(),en=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Js=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,Ys=C(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,Js).getRegex(),gt={_backpedal:fe,anyPunctuation:Bs,anyPunctuationOutsideCode:Hs,autolink:Ws,blockSkip:Cs,br:hn,code:ws,del:fe,delLDelim:fe,delRDelim:fe,emStrongLDelim:Ts,emStrongRDelimAst:Ms,emStrongRDelimUnd:js,escape:ys,link:Gs,nolink:Qs,punctuation:Ss,reflink:Vs,reflinkSearch:Ks,tag:Us,text:vs,url:fe},ei={...gt,emStrongLDelim:Ps,emStrongRDelimAst:qs,emStrongRDelimUnd:_s,link:C(/^!?\[(label)\]\((.*?)\)/).replace("label",Ze).getRegex(),reflink:C(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ze).getRegex()},ot={...gt,emStrongRDelimAst:Ls,emStrongLDelim:Rs,delLDelim:Is,delRDelim:Ds,url:C(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",Ys).replace("protocol",en).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:C(/^(?:[^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",en).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},ti={...ot,br:C(hn).replace("{2,}","*").getRegex(),text:C(ot.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},We={normal:ft,gfm:bs,pedantic:xs},Te={normal:gt,gfm:ot,breaks:ti,pedantic:ei},ni={"&":"&","<":"<",">":">",'"':""","'":"'"},tn=e=>ni[e];function Y(e,t){if(t){if(U.escapeTest.test(e))return e.replace(U.escapeReplace,tn)}else if(U.escapeTestNoEncode.test(e))return e.replace(U.escapeReplaceNoEncode,tn);return e}function si(e){return U.numericCharacterReference.test(e)?e.replace(U.numericCharacterReferenceOrAmpersand,(t,n,i)=>{if(n===void 0&&i===void 0)return"&";let s=n===void 0?Number.parseInt(i,16):Number.parseInt(n,10);return s===0||s>1114111||s>=55296&&s<=57343?"�":s===38?"&":String.fromCodePoint(s)}):e}function nn(e){try{e=encodeURI(e).replace(U.percentDecode,"%")}catch{return null}return e}function sn(e,t){let n=e.replace(U.findPipe,(r,o,a)=>{let c=!1,d=o;for(;--d>=0&&a[d]==="\\";)c=!c;return c?"|":" |"}),i=n.split(U.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(U.slashPipe,"|");return i}function ce(e,t,n){let i=e.length;if(i===0)return"";let s=0;for(;s<i;){let r=e.charAt(i-s-1);if(r===t&&!n)s++;else if(r!==t&&n)s++;else break}return e.slice(0,i-s)}function rn(e){let t=e.split(`
|
|
32
|
+
`),n=t.length-1;for(;n>=0&&U.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
|
|
33
|
+
`)}function Ue(e){return e.trim().toLowerCase().toUpperCase().toLowerCase()}function an(e,t){if(e.indexOf(t[0])===-1&&e.indexOf(t[1])===-1)return-1;let n=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])n++;else if(e[i]===t[1]&&(n--,n<0))return i;return n>0?-2:-1}function at(e,t=0){let n=t,i="";for(let s of e)if(s===" "){let r=4-n%4;i+=" ".repeat(r),n+=r}else i+=s,n++;return i}function on(e,t,n,i,s){let r=t.href,o=t.title||null,a=e[1].replace(s.other.outputLinkReplace,"$1"),c=e[0].charAt(0)==="!",d=i.state.inLink,l=i.state.linkEmitted,p=i.state.inRawBlock;i.state.inLink=!0,i.state.linkEmitted=!1;let m=i.inlineTokens(a),f=i.state.linkEmitted;if(i.state.linkEmitted=l,i.state.inLink=d,!c){if(f){i.state.inRawBlock=p;return}i.state.linkEmitted=!0}return{type:c?"image":"link",raw:n,href:r,title:o,text:a,tokens:m}}function ii(e,t,n){let i=e.match(n.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
|
|
34
|
+
`).map(r=>{let o=r.match(n.other.beginningSpace);if(o===null)return r;let[a]=o;return r.slice(Math.min(a.length,s.length))}).join(`
|
|
35
|
+
`)}function ln(e,t,n,i){if(!t.includes("<"))return!1;for(let s=0;s<t.length;s++){if(t[s]==="\\"){s++;continue}if(t[s]==="`"){let a=i.inline.code.exec(t.slice(s));if(a){s+=a[0].length-1;continue}}if(t[s]!=="<")continue;let r=e.slice(n+s),o=i.inline.tag.exec(r)||i.inline.autolink.exec(r);if(o){if(o[0].length>t.length-s)return!0;s+=o[0].length-1}}return!1}var Ge=class{options;rules;lexer;constructor(e){this.options=e||ke}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=this.options.pedantic?t[0]:rn(t[0]),i=n.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n,codeBlockStyle:"indented",text:i}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],i=ii(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let i=ce(n,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceTabChar.test(i))&&(n=i.trim())}return{type:"heading",raw:ce(t[0],`
|
|
36
|
+
`),depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:ce(t[0],`
|
|
37
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=ce(t[0],`
|
|
32
38
|
`).split(`
|
|
33
|
-
`),
|
|
34
|
-
`),
|
|
35
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");
|
|
36
|
-
${d}`:d,
|
|
37
|
-
${
|
|
38
|
-
`),
|
|
39
|
-
`+
|
|
40
|
-
`).length:0,
|
|
41
|
-
${
|
|
42
|
-
`)}`),
|
|
39
|
+
`),i="",s="",r=[];for(;n.length>0;){let o=!1,a=[],c;for(c=0;c<n.length;c++)if(this.rules.other.blockquoteStart.test(n[c]))a.push(n[c]),o=!0;else if(!o)a.push(n[c]);else break;n=n.slice(c);let d=a.join(`
|
|
40
|
+
`),l=d.replace(this.rules.other.blockquoteSetextReplace,`
|
|
41
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
|
|
42
|
+
${d}`:d,s=s?`${s}
|
|
43
|
+
${l}`:l;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,r,!0),this.lexer.state.top=p,n.length===0)break;let m=r.at(-1);if(m?.type==="code"||m?.type==="heading"||m?.type==="hr"||m?.type==="html")break;if(m?.type==="blockquote"){let f=m,u=n.join(`
|
|
44
|
+
`),h=f.raw+`
|
|
45
|
+
`+u.replace(this.rules.other.blockquoteSetextReplace2,""),g=this.blockquote(h);r[r.length-1]=g;let k=h.substring(g.raw.length).replace(/^\n/,""),y=k?k.split(`
|
|
46
|
+
`).length:0,b=y?n.slice(0,-y):n;b.length>0&&(i=`${i}
|
|
47
|
+
${b.join(`
|
|
48
|
+
`)}`),s=s.substring(0,s.length-f.text.length)+g.text;break}else if(m?.type==="list"){let f=m,u=f.raw+`
|
|
43
49
|
`+n.join(`
|
|
44
|
-
`),
|
|
45
|
-
`);continue}}return{type:"blockquote",raw:
|
|
46
|
-
`,1)[0],
|
|
47
|
-
`,1)[0],
|
|
48
|
-
`,1)[0],
|
|
49
|
-
`+
|
|
50
|
-
`+
|
|
51
|
-
`),href:
|
|
52
|
-
`):[],
|
|
53
|
-
`),header:[],align:[],rows:[]};if(n.length===
|
|
54
|
-
`),depth:
|
|
55
|
-
`?
|
|
56
|
-
`),this.blockTokens(
|
|
57
|
-
`:n.push(
|
|
50
|
+
`),h=this.list(u);r[r.length-1]=h,i=i.substring(0,i.length-m.raw.length)+h.raw,s=s.substring(0,s.length-f.raw.length)+h.raw,n=u.substring(r.at(-1).raw.length).split(`
|
|
51
|
+
`);continue}}return{type:"blockquote",raw:i,tokens:r,text:s}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=e,i=()=>n.length-e.length,s=t[1].trim(),r=s.length>1,o={type:"list",raw:"",ordered:r,start:r?+s.slice(0,-1):"",loose:!1,items:[]};s=r?`\\d{1,9}\\${s.slice(-1)}`:`\\${s}`,this.options.pedantic&&(s=r?s:"[*+-]");let a=this.rules.other.listItemRegex(s),c=!1;for(;e;){let l=!1,p="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;let m=i();e=e.substring(t[0].length);let f=t[2].split(`
|
|
52
|
+
`,1)[0],u=t[1].length,h=this.options.pedantic?at(f,u):f.replace(this.rules.other.leadingSpaceTab,A=>at(A,u)),g=e.split(`
|
|
53
|
+
`,1)[0],k=!h.trim(),y=0;if(this.options.pedantic?(y=2,p=h.trimStart()):k?y=u+1:(y=h.search(this.rules.other.nonSpaceChar),y=y>4?1:y,p=h.slice(y),y+=u),k&&this.rules.other.blankLine.test(g)&&(e=e.substring(g.length+1),l=!0),!l){let A=this.rules.other.nextBulletRegex(y),$=this.rules.other.hrRegex(y),v=this.rules.other.fencesBeginRegex(y),z=this.rules.other.headingBeginRegex(y),q=this.rules.other.htmlBeginRegex(y),R=this.rules.other.blockquoteBeginRegex(y);for(;e;){let I=e.split(`
|
|
54
|
+
`,1)[0],_;if(g=I,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),_=g):_=g.replace(this.rules.other.leadingSpaceTab,Q=>at(Q)),v.test(g)||z.test(g)||q.test(g)||R.test(g)||A.test(g)||$.test(g))break;if(_.search(this.rules.other.nonSpaceChar)>=y||!g.trim())p+=`
|
|
55
|
+
`+_.slice(y);else{if(k||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||v.test(h)||z.test(h)||$.test(h))break;p+=`
|
|
56
|
+
`+g}k=!g.trim(),e=e.substring(I.length+1),h=_.slice(y)}}let b=n.slice(m,i());o.loose||(c?o.loose=!0:this.rules.other.doubleBlankLine.test(b)&&(c=!0)),o.items.push({type:"list_item",raw:b,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]})}let d=o.items.at(-1);if(d)d.raw=d.raw.trimEnd(),d.text=d.text.trimEnd();else return;o.raw=n.slice(0,i()).trimEnd();for(let l of o.items)if(this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]),!o.loose){let p=l.tokens.filter(f=>f.type==="space"),m=p.length>0&&p.some(f=>this.rules.other.anyLine.test(f.raw));o.loose=m}for(let l of o.items){let p=l.tokens[0];if(l.task&&(p?.type==="text"||p?.type==="paragraph")){l.text=l.text.replace(this.rules.other.listReplaceTask,""),p.raw=p.raw.replace(this.rules.other.listReplaceTask,""),p.text=p.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 m=this.rules.other.listTaskCheckbox.exec(l.raw);if(m){let f={type:"checkbox",raw:m[0]+" ",checked:m[0]!=="[ ]"};l.checked=f.checked,o.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=f.raw+l.tokens[0].raw,l.tokens[0].text=f.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(f)):l.tokens.unshift({type:"paragraph",raw:f.raw,text:f.raw,tokens:[f]}):l.tokens.unshift(f)}}else l.task&&(l.task=!1)}if(o.loose)for(let l of o.items){l.loose=!0;for(let p of l.tokens)p.type==="text"&&(p.type="paragraph")}return o}}html(e){let t=this.rules.block.html.exec(e);if(t){let n=rn(t[0]);return{type:"html",block:!0,raw:n,pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:n}}}def(e){let t=this.rules.block.def.exec(e);if(t){if(!this.rules.other.startAngleBracket.test(t[2])&&an(t[2],"()")!==-1)return;let n=Ue(t[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:ce(t[0],`
|
|
57
|
+
`),href:i,title:s}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=sn(t[1]),i=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
58
|
+
`):[],r={type:"table",raw:ce(t[0],`
|
|
59
|
+
`),header:[],align:[],rows:[]};if(n.length===i.length){for(let o of i)this.rules.other.tableAlignRight.test(o)?r.align.push("right"):this.rules.other.tableAlignCenter.test(o)?r.align.push("center"):this.rules.other.tableAlignLeft.test(o)?r.align.push("left"):r.align.push(null);for(let o=0;o<n.length;o++)r.header.push({text:n[o],tokens:this.lexer.inline(n[o]),header:!0,align:r.align[o]});for(let o of s)r.rows.push(sn(o,r.header.length).map((a,c)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:r.align[c]})));return r}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let n=t[1].trim();return{type:"heading",raw:ce(t[0],`
|
|
60
|
+
`),depth:t[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
|
|
61
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){if(this.lexer.state.linkParenPossible===!1)return;let t=this.rules.inline.link.exec(e);if(t){let n=t[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&ln(e,t[1],n,this.rules))return;let i=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let o=ce(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=an(t[2],"()");if(o===-2)return;if(o>-1){let a=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let s=t[2],r="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],r=o[3])}else r=t[3]?t[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),on(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let i=n[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&ln(e,n[1],i,this.rules))return;let s=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=t[Ue(s)];if(!r){let o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return on(n,r,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!(!i||!i[1]&&!i[2]&&!i[3]&&!i[4]||i[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[3])||!n||this.rules.inline.punctuation.exec(n))){let s=[...i[0]].length-1,r,o,a=s,c=0,d=i[0][0],l=n===d,p=d==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,t=t.slice(-1*e.length+s);(i=p.exec(t))!==null;){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r)continue;if(o=[...r].length,i[3]||i[4]){a+=o;continue}else if(i[5]||i[6]){if(s%3&&!((s+o)%3)){c+=o;continue}if(l)break}if(a-=o,a>0)continue;o=Math.min(o,o+a+c);let m=[...i[0]][0].length,f=e.slice(0,s+i.index+m+o);if(Math.min(s,o)%2){let h=f.slice(1,-1);return{type:"em",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}let u=f.slice(2,-2);return{type:"strong",raw:f,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(n),s=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return i&&s&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let i=this.rules.inline.delLDelim.exec(e);if(i&&(!i[1]||!n||this.rules.inline.punctuation.exec(n))){let s=[...i[0]].length-1,r,o,a=s,c=this.rules.inline.delRDelim;for(c.lastIndex=0,t=t.slice(-1*e.length+s);(i=c.exec(t))!==null;){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r||(o=[...r].length,o!==s))continue;if(i[3]||i[4]){a+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a);let d=[...i[0]][0].length,l=e.slice(0,s+i.index+d+o),p=l.slice(s,-s);return{type:"del",raw:l,text:p,tokens:this.lexer.inlineTokens(p)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,i;return t[2]==="@"?(n=t[1],i="mailto:"+n):(n=t[1],i=n),{type:"link",raw:t[0],text:n,href:i,autolink:!0,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,i;if(t[2]==="@")n=t[0],i="mailto:"+n;else{let s;do s=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(s!==t[0]);n=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:n,href:i,autolink:!0,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:n?t[0]:si(t[0]),escaped:n}}}},ee=class lt{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ke,this.options.tokenizer=this.options.tokenizer||new Ge,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:U,block:We.normal,inline:Te.normal};this.options.pedantic?(n.block=We.pedantic,n.inline=Te.pedantic):this.options.gfm&&(n.block=We.gfm,this.options.breaks?n.inline=Te.breaks:n.inline=Te.gfm),this.tokenizer.rules=n}static get rules(){return{block:We,inline:Te}}static lex(t,n){return new lt(n).lex(t)}static lexInline(t,n){return new lt(n).inlineTokens(t)}lex(t){t=t.replace(U.carriageReturn,`
|
|
62
|
+
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let i=this.inlineQueue[n];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],i=!1){this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(U.tabCharGlobal," ").replace(U.spaceLine,""));let s=1/0;for(;t;){if(t.length<s)s=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}let r;if(this.options.extensions?.block?.some(a=>(r=a.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))continue;if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length);let a=n.at(-1);r.raw.length===1&&a!==void 0?a.raw+=`
|
|
63
|
+
`:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length);let a=n.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
58
64
|
`)?"":`
|
|
59
|
-
`)+
|
|
60
|
-
`+
|
|
65
|
+
`)+r.raw,a.text+=`
|
|
66
|
+
`+r.text,this.inlineQueue.at(-1).src=a.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length);let a=n.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
61
67
|
`)?"":`
|
|
62
|
-
`)+
|
|
63
|
-
`+
|
|
68
|
+
`)+r.raw,a.text+=`
|
|
69
|
+
`+r.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},n.push(r));continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}let o=t;if(this.options.extensions?.startBlock){let a=1/0,c=t.slice(1),d;this.options.extensions.startBlock.forEach(l=>{d=l.call({lexer:this},c),typeof d=="number"&&d>=0&&(a=Math.min(a,d))}),a<1/0&&a>=0&&(o=t.substring(0,a+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o))){let a=n.at(-1);i&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
|
|
64
70
|
`)?"":`
|
|
65
|
-
`)+
|
|
66
|
-
`+
|
|
71
|
+
`)+r.raw,a.text+=`
|
|
72
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(r),i=o.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length);let a=n.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
67
73
|
`)?"":`
|
|
68
|
-
`)+
|
|
69
|
-
`+
|
|
70
|
-
`:"";return
|
|
71
|
-
`:"<pre><code>"+(n?
|
|
72
|
-
`}blockquote({tokens:
|
|
73
|
-
${this.parser.parse(
|
|
74
|
-
`}html({text:
|
|
75
|
-
`}hr(
|
|
76
|
-
`}list(
|
|
77
|
-
`+
|
|
78
|
-
`}listitem(
|
|
79
|
-
`}checkbox({checked:
|
|
80
|
-
`}table(
|
|
74
|
+
`)+r.raw,a.text+=`
|
|
75
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(r);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}linkInText(t){if(!t.includes("["))return!1;let n=this.tokenizer.rules.inline.link;for(let i of t.matchAll(this.tokenizer.rules.inline.blockSkip))if(n.test(i[0])&&t.charAt(i.index-1)!=="!")return!0;for(let i of t.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let s=i[0],r=s.lastIndexOf("[");if(!(s.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,Ue(s.slice(r+1,-1))))&&!(r>1&&this.linkInText(s.slice(1,r-1))))return!0}return!1}inlineTokens(t,n=[]){this.tokenizer.lexer=this;let i=this.state.linkParenPossible;this.state.linkParenPossible=i&&t.includes(")");try{return this.#e(t,n)}finally{this.state.linkParenPossible=i}}#e(t,n){let i=t;if(this.tokens.links&&t.includes("[")){let a=this.tokenizer.rules.inline.reflinkSearch,c=d=>{let l=d.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,Ue(d.slice(l+1,-1))))return d;if(l>1&&d.charAt(0)!=="!"){let p=d.slice(1,l-1);if(this.linkInText(p))return"["+p.replace(a,c)+"]["+"a".repeat(d.length-l-2)+"]"}return"["+"a".repeat(d.length-2)+"]"};i=i.replace(a,c)}i=i.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(a,c,d)=>d?"+".repeat(a.length):c?c+a.slice(c.length,-c.length).replace(/`/g,"+")+c:a),i=i.replace(this.tokenizer.rules.inline.blockSkip,(a,c,d)=>{let l=d?d.length:0;return a.slice(0,l)+"["+"a".repeat(a.length-l-2)+"]"}),i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let s=!1,r="",o=1/0;for(;t;){if(t.length<o)o=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}s||(r=""),s=!1;let a;if(this.options.extensions?.inline?.some(d=>(a=d.call({lexer:this},t,n))?(t=t.substring(a.raw.length),n.push(a),!0):!1))continue;if(a=this.tokenizer.escape(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.tag(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.link(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(a.raw.length);let d=n.at(-1);a.type==="text"&&d?.type==="text"?(d.raw+=a.raw,d.text+=a.text):n.push(a);continue}if(a=this.tokenizer.emStrong(t,i,r)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.codespan(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.br(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.del(t,i,r)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.autolink(t)){t=t.substring(a.raw.length),n.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(t))){t=t.substring(a.raw.length),n.push(a);continue}let c=t;if(this.options.extensions?.startInline){let d=1/0,l=t.slice(1),p;this.options.extensions.startInline.forEach(m=>{p=m.call({lexer:this},l),typeof p=="number"&&p>=0&&(d=Math.min(d,p))}),d<1/0&&d>=0&&(c=t.substring(0,d+1))}if(a=this.tokenizer.inlineText(c)){t=t.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(r=a.raw.slice(-1)),s=!0;let d=n.at(-1);d?.type==="text"?(d.raw+=a.raw,d.text+=a.text):n.push(a);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return n}infiniteLoopError(t){let n="Infinite loop on byte: "+t;if(this.options.silent)console.error(n);else throw new Error(n)}},Ve=class{options;parser;constructor(e){this.options=e||ke}space(e){return""}code({text:e,lang:t,escaped:n}){let i=(t||"").match(U.notSpaceStart)?.[0],s=e?e.replace(U.endingNewline,"")+`
|
|
76
|
+
`:"";return i?'<pre><code class="language-'+Y(i)+'">'+(n?s:Y(s,!0))+`</code></pre>
|
|
77
|
+
`:"<pre><code>"+(n?s:Y(s,!0))+`</code></pre>
|
|
78
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
79
|
+
${this.parser.parse(e)}</blockquote>
|
|
80
|
+
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
81
|
+
`}hr(e){return`<hr>
|
|
82
|
+
`}list(e){let t=e.ordered,n=e.start,i="";for(let o=0;o<e.items.length;o++){let a=e.items[o];i+=this.listitem(a)}let s=t?"ol":"ul",r=t&&n!==1?' start="'+n+'"':"";return"<"+s+r+`>
|
|
83
|
+
`+i+"</"+s+`>
|
|
84
|
+
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
85
|
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
86
|
+
`}table(e){let t="",n="";for(let s=0;s<e.header.length;s++)n+=this.tablecell(e.header[s]);t+=this.tablerow({text:n});let i="";for(let s=0;s<e.rows.length;s++){let r=e.rows[s];n="";for(let o=0;o<r.length;o++)n+=this.tablecell(r[o]);i+=this.tablerow({text:n})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
|
81
87
|
<thead>
|
|
82
|
-
`+
|
|
83
|
-
`+
|
|
84
|
-
`}tablerow({text:
|
|
85
|
-
${
|
|
86
|
-
`}tablecell(
|
|
87
|
-
`}strong({tokens:
|
|
88
|
-
Please report this to https://github.com/markedjs/marked.`,
|
|
89
|
-
`),
|
|
90
|
-
`),
|
|
91
|
-
`,A:`[${
|
|
92
|
-
<html lang="${
|
|
88
|
+
`+t+`</thead>
|
|
89
|
+
`+i+`</table>
|
|
90
|
+
`}tablerow({text:e}){return`<tr>
|
|
91
|
+
${e}</tr>
|
|
92
|
+
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
93
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Y(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:n,tokens:i,autolink:s}){let r=s?Y(n,!0):this.parser.parseInline(i),o=nn(e);if(o===null)return r;e=Y(o,s);let a='<a href="'+e+'"';return t&&(a+=' title="'+Y(t)+'"'),a+=">"+r+"</a>",a}image({href:e,title:t,text:n,tokens:i}){i&&(n=this.parser.parseInline(i,this.parser.textRenderer));let s=nn(e);if(s===null)return Y(n);e=s;let r=`<img src="${Y(e)}" alt="${Y(n)}"`;return t&&(r+=` title="${Y(t)}"`),r+=">",r}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Y(e.text)}},kt=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},se=class ct{options;renderer;textRenderer;constructor(t){this.options=t||ke,this.options.renderer=this.options.renderer||new Ve,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new kt}static parse(t,n){return new ct(n).parse(t)}static parseInline(t,n){return new ct(n).parseInline(t)}parse(t){this.renderer.parser=this;let n="";for(let i=0;i<t.length;i++){let s=t[i];if(this.options.extensions?.renderers?.[s.type]){let o=s,a=this.options.extensions.renderers[o.type].call({parser:this},o);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(o.type)){n+=a||"";continue}}let r=s;switch(r.type){case"space":{n+=this.renderer.space(r);break}case"hr":{n+=this.renderer.hr(r);break}case"heading":{n+=this.renderer.heading(r);break}case"code":{n+=this.renderer.code(r);break}case"table":{n+=this.renderer.table(r);break}case"blockquote":{n+=this.renderer.blockquote(r);break}case"list":{n+=this.renderer.list(r);break}case"checkbox":{n+=this.renderer.checkbox(r);break}case"html":{n+=this.renderer.html(r);break}case"def":{n+=this.renderer.def(r);break}case"paragraph":{n+=this.renderer.paragraph(r);break}case"text":{n+=this.renderer.text(r);break}default:{let o='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return n}parseInline(t,n=this.renderer){this.renderer.parser=this;let i="";for(let s=0;s<t.length;s++){let r=t[s];if(this.options.extensions?.renderers?.[r.type]){let a=this.options.extensions.renderers[r.type].call({parser:this},r);if(a!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(r.type)){i+=a||"";continue}}let o=r;switch(o.type){case"escape":{i+=n.text(o);break}case"html":{i+=n.html(o);break}case"link":{i+=n.link(o);break}case"image":{i+=n.image(o);break}case"checkbox":{i+=n.checkbox(o);break}case"strong":{i+=n.strong(o);break}case"em":{i+=n.em(o);break}case"codespan":{i+=n.codespan(o);break}case"br":{i+=n.br(o);break}case"del":{i+=n.del(o);break}case"text":{i+=n.text(o);break}default:{let a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return i}},Re=class{options;block;constructor(e){this.options=e||ke}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?ee.lex:ee.lexInline}provideParser(e=this.block){return e?se.parse:se.parseInline}};function me(e,t){if(Array.isArray(t))for(let n=0;n<t.length;n++)e.push(t[n]);else e.push(t)}var ri=class{defaults=dt();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=se;Renderer=Ve;TextRenderer=kt;Lexer=ee;Tokenizer=Ge;Hooks=Re;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let i of e)switch(me(n,t.call(this,i)),i.type){case"table":{let s=i;for(let r of s.header)me(n,this.walkTokens(r.tokens,t));for(let r of s.rows)for(let o of r)me(n,this.walkTokens(o.tokens,t));break}case"list":{let s=i;me(n,this.walkTokens(s.items,t));break}default:{let s=i;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(r=>{let o=s[r].flat(1/0);me(n,this.walkTokens(o,t))}):s.tokens&&me(n,this.walkTokens(s.tokens,t))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let r=t.renderers[s.name];r?t.renderers[s.name]=function(...o){let a=s.renderer.apply(this,o);return a===!1&&(a=r.apply(this,o)),a}:t.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let r=t[s.level];r?r.unshift(s.tokenizer):t[s.level]=[s.tokenizer],s.start&&(s.level==="block"?t.startBlock?t.startBlock.push(s.start):t.startBlock=[s.start]:s.level==="inline"&&(t.startInline?t.startInline.push(s.start):t.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(t.childTokens[s.name]=s.childTokens)}),i.extensions=t),n.renderer){let s=this.defaults.renderer||new Ve(this.defaults);for(let r in n.renderer){if(!(r in s))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let o=r,a=n.renderer[o],c=s[o];s[o]=(...d)=>{let l=a.apply(s,d);return l===!1&&(l=c.apply(s,d)),l||""}}i.renderer=s}if(n.tokenizer){let s=this.defaults.tokenizer||new Ge(this.defaults);for(let r in n.tokenizer){if(!(r in s))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let o=r,a=n.tokenizer[o],c=s[o];s[o]=(...d)=>{let l=a.apply(s,d);return l===!1&&(l=c.apply(s,d)),l}}i.tokenizer=s}if(n.hooks){let s=this.defaults.hooks||new Re;for(let r in n.hooks){if(!(r in s))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let o=r,a=n.hooks[o],c=s[o];Re.passThroughHooks.has(r)?s[o]=d=>{if(this.defaults.async&&Re.passThroughHooksRespectAsync.has(r))return(async()=>{let p=await a.call(s,d);return c.call(s,p)})();let l=a.call(s,d);return c.call(s,l)}:s[o]=(...d)=>{if(this.defaults.async)return(async()=>{let p=await a.apply(s,d);return p===!1&&(p=await c.apply(s,d)),p})();let l=a.apply(s,d);return l===!1&&(l=c.apply(s,d)),l}}i.hooks=s}if(n.walkTokens){let s=this.defaults.walkTokens,r=n.walkTokens;i.walkTokens=function(o){let a=[];return a.push(r.call(this,o)),s&&me(a,s.call(this,o)),a}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ee.lex(e,t??this.defaults)}parser(e,t){return se.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let i={...n},s={...this.defaults,...i},r=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&i.async===!1)return r(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 t>"u"||t===null)return r(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return r(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=e),s.async)return(async()=>{let o=s.hooks?await s.hooks.preprocess(t):t,a=await(s.hooks?await s.hooks.provideLexer(e):e?ee.lex:ee.lexInline)(o,s),c=s.hooks?await s.hooks.processAllTokens(a):a;s.walkTokens&&await Promise.all(this.walkTokens(c,s.walkTokens));let d=await(s.hooks?await s.hooks.provideParser(e):e?se.parse:se.parseInline)(c,s);return s.hooks?await s.hooks.postprocess(d):d})().catch(r);try{s.hooks&&(t=s.hooks.preprocess(t));let o=(s.hooks?s.hooks.provideLexer(e):e?ee.lex:ee.lexInline)(t,s);s.hooks&&(o=s.hooks.processAllTokens(o)),s.walkTokens&&this.walkTokens(o,s.walkTokens);let a=(s.hooks?s.hooks.provideParser(e):e?se.parse:se.parseInline)(o,s);return s.hooks&&(a=s.hooks.postprocess(a)),a}catch(o){return r(o)}}}onError(e,t){return n=>{if(n.message+=`
|
|
94
|
+
Please report this to https://github.com/markedjs/marked.`,e){let i="<p>An error occurred:</p><pre>"+Y(n.message+"",!0)+"</pre>";return t?Promise.resolve(i):i}if(t)return Promise.reject(n);throw n}}},ge=new ri;function j(e,t){return ge.parse(e,t)}j.options=j.setOptions=function(e){return ge.setOptions(e),j.defaults=ge.defaults,cn(j.defaults),j};j.getDefaults=dt;j.defaults=ke;function ai(...e){return ge.use(...e),j.defaults=ge.defaults,cn(j.defaults),j}j.use=ai;j.walkTokens=function(e,t){return ge.walkTokens(e,t)};j.parseInline=ge.parseInline;j.Parser=se;j.parser=se.parse;j.Renderer=Ve;j.TextRenderer=kt;j.Lexer=ee;j.lexer=ee.lex;j.Tokenizer=Ge;j.Hooks=Re;j.parse=j;var Ni=j.options,_i=j.setOptions,Ii=j.walkTokens,Fi=j.parseInline;var Di=se.parse,Bi=ee.lex;var oi=/^(ar|he|fa|ur|ps|sd|ug|yi|dv|ckb)\b/i,li={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 ci(e){let t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("aria-hidden","true"),(e==="back"||e==="next")&&t.setAttribute("class","deck-flip");let n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d",li[e]),t.append(n),t}function bn(e,t){let n=t.source.replace(/\r\n?/g,`
|
|
95
|
+
`),i=Je(n),s=0,r=0,o=[],a=String(t.lang??i.settings.lang??document.documentElement.lang??"en")||"en",c=String(t.dir??i.settings.dir??(oi.test(a)?"rtl":"ltr")),d={...Kt(a),...t.strings},l=new Intl.NumberFormat(a).format,p=matchMedia("(prefers-color-scheme: dark)"),m="light",f=Date.now();e.classList.add("deck"),e.lang=a,e.dir=c;let u=w("div",{class:"deck-stage",tabindex:0,role:"region","aria-roledescription":d.carousel,"aria-label":d.deck}),h=w("span",{class:"deck-where","aria-live":"polite"}),g=(x,S,E)=>{let D=w("button",{type:"button","aria-label":S,"data-act":x},[ci(x)]);return D.addEventListener("click",E),D},k=g("back",d.previous,()=>M(-1)),y=g("next",d.next,()=>M(1)),b=g("edit",d.edit,()=>N("is-editing")),A=g("presenter",d.presenter,()=>N("is-presenting")),$=g("grid",d.overview,()=>N("is-overview")),v=w("div",{class:"deck-bar"},[k,h,y,w("span",{class:"deck-gap"}),$,A,t.editable===!1?null:b,g("scheme",d.scheme,()=>{m=m==="dark"?"light":"dark",ne()}),t.onExport?g("export",d.export,()=>t.onExport?.(Tt)):null,document.fullscreenEnabled?g("present",d.present,()=>te()):null]),z=w("textarea",{class:"deck-source",spellcheck:"false","aria-label":d.source,dir:"auto"}),q=w("div",{class:"deck-next"}),R=w("div",{class:"deck-notes",dir:"auto","aria-label":d.notes}),I=w("span",{class:"deck-clock"}),_=w("div",{class:"deck-presenter"},[q,R]);e.replaceChildren(z,u,_,v),v.insertBefore(I,v.querySelector(".deck-gap"));let Q=[],K=()=>{let x=et(t.kit,i.settings.kit);return Q=x.problems,x.kit};function ne(){V.kit=K();let x=Vt(i.settings,V.kit.tokens),S=Qt(x,m),E=O=>O.map(W=>/^[\w-]+$/.test(W)?W:`"${W.replace(/["\\]/g,"")}"`).join(", "),D=x.fonts?{heading:E(x.fonts.heading),body:E(x.fonts.body)}:rt[x.voice];for(let[O,W]of Object.entries({paper:S.paper,ink:S.ink,muted:S.muted,line:S.line,primary:S.primary,fill:x.primary,"on-fill":S.onPrimary,soft:S.soft,heading:D.heading,body:D.body,radius:`${x.radius}px`,...Object.fromEntries(S.series.map((B,F)=>[`series-${F+1}`,B]))}))e.style.setProperty(`--deck-${O}`,W);e.dataset.scheme=m,e.dataset.fill=(O=>ve(O,[255,255,255])>ve(O,[0,0,0])?"dark":"light")(J(x.primary)??[247,197,49]),e.dispatchEvent(new CustomEvent("deck-scheme",{detail:{scheme:m,colours:S,tokens:x}}))}let G=()=>{let x=t.scheme??i.settings.colorSchema??"auto";m=x==="dark"||x==="auto"&&p.matches?"dark":"light"},V={blocks:t.blocks??{},resolve:t.resolve??(x=>x),headings:t.headings??"real",number:x=>l(x),total:0,kit:et().kit,lex:t.lex??(x=>new ee({gfm:!0}).lex(x)),slide:d.slide};function xe(){V.total=i.slides.length,V.deck=i,o=i.slides.map(x=>nt(x,V));for(let[x,{element:S}]of o.entries())S.setAttribute("aria-label",d.where.replace("{n}",l(x+1)).replace("{count}",l(o.length))),S.addEventListener("click",()=>{e.classList.contains("is-overview")&&(N("is-overview"),T(x,0))});u.replaceChildren(...o.map(({element:x})=>x)),s=Math.min(s,o.length-1),L(),requestAnimationFrame(()=>ye())}function ye(){for(let{element:x}of o)P(x)}function P(x){let S=!1;for(let E of x.querySelectorAll(".deck-slot")){let D=1;for(E.style.setProperty("--deck-fit","1");E.scrollHeight>E.clientHeight+1&&D>.6;)E.style.setProperty("--deck-fit",String(D=Math.round((D-.05)*100)/100));E.scrollHeight>E.clientHeight+1&&(S=!0)}S?x.dataset.overflow="true":delete x.dataset.overflow}function L(){for(let[S,{element:E,steps:D}]of o.entries()){E.classList.toggle("is-shown",S===s),E.inert=S!==s&&!e.classList.contains("is-overview");for(let O of E.querySelectorAll(".deck-step"))O.classList.toggle("is-on",S<s||S===s&&Number(O.getAttribute("data-step"))<=r||D===0)}h.textContent=`${l(s+1)} / ${l(o.length)}`,k.toggleAttribute("disabled",s===0&&r===0),y.toggleAttribute("disabled",s>=o.length-1&&r>=(o[s]?.steps??0)),R.textContent=i.slides[s]?.notes||d.noNotes;let x=i.slides[s+1];q.replaceChildren(w("span",{},[x?d.upNext:d.last]),...x?[nt(x,V).element]:[]),e.dispatchEvent(new CustomEvent("deck-move",{detail:{at:s,step:r}}))}function M(x){let S=o[s]?.steps??0;if(x>0&&r<S){r++,L();return}if(x<0&&r>0){r--,L();return}let E=s+x;E<0||E>=o.length||T(E,x>0?0:o[E].steps)}function T(x,S=0){if(x===s){r=S,L();return}let E=x>s,D=i.slides[E?x:s]?.settings??{},O=String(D.transition??i.settings.transition??"none"),[W,B]=O.split("|").map(je=>je.trim()),F=E?W:B??W;c==="rtl"&&(F=F.replace(/-(left|right)$/,(je,Ne)=>Ne==="left"?"-right":"-left")),F==="view-transition"&&(F="morph");let oe=()=>{s=x,r=S,F==="morph"&&X(o[x].element),L()},Mn=matchMedia("(prefers-reduced-motion: reduce)").matches;if(!document.startViewTransition||F==="none"||Mn||e.classList.contains("is-overview"))return oe();F==="morph"&&X(o[s].element,o[x].element),document.documentElement.dataset.deckTransition=F;let Rt=document.startViewTransition(oe);Rt.ready.catch(()=>{}),Rt.finished.finally(()=>{delete document.documentElement.dataset.deckTransition;for(let{element:je}of o)for(let Ne of je.querySelectorAll("[data-morph]"))Ne.style.removeProperty("view-transition-name"),Ne.removeAttribute("data-morph")})}function X(x,S){let E=O=>`${O.tagName}:${O.tagName==="IMG"?O.getAttribute("src"):(O.textContent??"").trim().slice(0,80)}`,D=O=>[...O.querySelectorAll("h1, h2, h3, h4, .deck-h, li, p, img, .deck-block, blockquote, .deck-image, .deck-map-node")].filter(W=>!W.matches(".deck-mindmap li"));if(S){let O=new Map(D(S).map(B=>[E(B),B])),W=0;for(let B of D(x)){let F=O.get(E(B));if(!F||F.dataset.morph||B.closest("[data-morph]"))continue;let oe=`deck-m${W++}`;B.dataset.morph=F.dataset.morph=oe,B.style.setProperty("view-transition-name",oe)}return}for(let O of x.querySelectorAll("[data-morph]")){let W=O.dataset.morph;for(let B of u.querySelectorAll(`[data-morph="${W}"]`))B!==O&&B.style.removeProperty("view-transition-name");O.style.setProperty("view-transition-name",W)}}function N(x){for(let S of["is-editing","is-presenting","is-overview"])S!==x&&e.classList.remove(S);e.classList.toggle(x),b.setAttribute("aria-pressed",String(e.classList.contains("is-editing"))),A.setAttribute("aria-pressed",String(e.classList.contains("is-presenting"))),$.setAttribute("aria-pressed",String(e.classList.contains("is-overview"))),e.classList.contains("is-editing")&&(z.value=n,z.focus()),L(),requestAnimationFrame(()=>ye())}function te(){u.requestFullscreen?.().then(()=>u.focus(),()=>{})}function re(x){n=x.replace(/\r\n?/g,`
|
|
96
|
+
`),i=Je(n),ne(),xe(),t.onChange?.(n)}let ae=0;z.addEventListener("input",x=>{x.isComposing||(clearTimeout(ae),ae=setTimeout(()=>re(z.value),120))});let At=()=>{let x=z.selectionStart,S=i.slides.findIndex(E=>x>=E.start&&x<=E.end+1);S>=0&&S!==s&&(s=S,r=o[S]?.steps??0,L())};z.addEventListener("keyup",At),z.addEventListener("click",At),u.addEventListener("dblclick",x=>{if(t.editable===!1||document.fullscreenElement)return;let S=x.target.closest("[data-edit]");if(!S)return;let[E,D]=S.dataset.edit.split("-").map(Number);S.contentEditable="true",S.focus();let O=F=>{S.removeEventListener("keydown",W),S.removeEventListener("blur",B),S.contentEditable="false";let oe=xn(S);F&&oe!==n.slice(E,D)?re(n.slice(0,E)+oe+n.slice(D)):xe()},W=F=>{F.isComposing||(F.key==="Enter"&&!F.shiftKey&&(F.preventDefault(),O(!0)),F.key==="Escape"&&(F.preventDefault(),O(!1)))},B=()=>O(!0);S.addEventListener("keydown",W),S.addEventListener("blur",B)});let zt=x=>x.target.closest(".deck-slide.is-shown [data-go]");e.addEventListener("keydown",x=>{let S=x.target;if(S.isContentEditable||S===z||S.tagName==="BUTTON"&&(x.key===" "||x.key==="Enter")){(x.metaKey||x.ctrlKey)&&x.key==="s"&&(x.preventDefault(),t.onSave?.(n));return}let E=zt(x);if(E&&x.key==="Enter"){x.preventDefault(),T(Number(E.dataset.go));return}let D=c==="rtl"?"ArrowLeft":"ArrowRight",O=c==="rtl"?"ArrowRight":"ArrowLeft";if(x.altKey||x.ctrlKey||x.metaKey){(x.metaKey||x.ctrlKey)&&x.key==="s"&&(x.preventDefault(),t.onSave?.(n));return}let B={[D]:()=>M(1),[O]:()=>M(-1),ArrowDown:()=>M(1),ArrowUp:()=>M(-1),PageDown:()=>M(1),PageUp:()=>M(-1)," ":()=>M(1),Home:()=>T(0),End:()=>T(o.length-1,o.at(-1)?.steps??0),f:te,p:()=>N("is-presenting"),o:()=>N("is-overview"),e:()=>N("is-editing")}[x.key];B&&(x.preventDefault(),B())}),u.addEventListener("click",x=>{let S=zt(x);S&&!e.classList.contains("is-editing")&&!e.classList.contains("is-overview")&&(x.stopPropagation(),T(Number(S.dataset.go)))},!0),u.addEventListener("click",x=>{document.fullscreenElement&&!x.target.closest("a, button, input")&&M(1)});let Ct=0;u.addEventListener("touchstart",x=>{Ct=x.touches[0].clientX},{passive:!0}),u.addEventListener("touchend",x=>{let S=x.changedTouches[0].clientX-Ct;Math.abs(S)>50&&M(S<0==(c!=="rtl")?1:-1)}),p.addEventListener("change",()=>{G(),ne()});let Pn=setInterval(()=>{let x=Math.floor((Date.now()-f)/1e3);I.textContent=e.classList.contains("is-presenting")?`${String(Math.floor(x/60)).padStart(2,"0")}:${String(x%60).padStart(2,"0")}`:""},1e3);G(),ne(),xe(),document.fonts?.ready.then(()=>ye());let Tt={root:e,stage:u,get source(){return n},get deck(){return i},get at(){return s},get scheme(){return m},get kit(){return V.kit},get kitProblems(){return Q},lang:a,dir:c,slides:()=>o.map(({element:x})=>x),setSource:re,go:T,toggle:N,present:te,fitAll:ye,setScheme:x=>{m=x,ne()},destroy:()=>clearInterval(Pn)};return Tt}function xn(e){let t="";for(let n of e.childNodes)if(n.nodeType===Node.TEXT_NODE)t+=(n.textContent??"").replace(/([*_`[\]\\])/g,"\\$1");else if(n instanceof HTMLElement){let i=xn(n);t+={STRONG:`**${i}**`,B:`**${i}**`,EM:`*${i}*`,I:`*${i}*`,CODE:`\`${n.textContent}\``,DEL:`~~${i}~~`,BR:`
|
|
97
|
+
`,A:`[${i}](${n.getAttribute("href")??""})`}[n.tagName]??i}return t.replace(/ /g," ").replace(/\n+$/,"")}var bt=new Map;function yn(e,t){return bt.has(e)||bt.set(e,new Promise((n,i)=>{let s=document.createElement("script");s.src=e,s.onload=()=>n(globalThis[t]),s.onerror=i,document.head.append(s)})),bt.get(e)}var Qe=(e,t,n,i)=>/node_modules\/$/.test(e)?`${e}${t}/${i}`:`${e}${t}@${n}/${i}`;function wn({base:e,root:t,versions:n={}}){let{echarts:i="6.1.0",pele:s="1.10.0"}=n,r=new Set,o=new Set,a=null;t.addEventListener("deck-scheme",l=>{a=l.detail.colours;for(let p of r)p.chart.setOption(d(p.option,p.box),!0);for(let p of o)p.picture.src=c(p.svg)});let c=l=>{let p=getComputedStyle(t).getPropertyValue("--deck-body")||"system-ui, sans-serif",m=Array.from({length:8},(u,h)=>`--pele-series-${h+1}:${a?.series?.[h%(a?.series?.length||1)]}`).join(";"),f=`--pele-bg:transparent;--pele-fg:${a?.ink};--pele-muted:${a?.muted};--pele-line:${a?.muted};--pele-surface:${a?.soft};--pele-surface-alt:${a?.line};--pele-border:${a?.primary};--pele-accent:${a?.primary};${m};--pele-font:${p.replace(/[<>"]/g,"")}`;return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(l.replace(/^(<svg\b[^>]*>)/,`$1<style>svg{${f}}</style>`))}`},d=(l,p)=>{let m=parseFloat(getComputedStyle(p).fontSize)||16,f=getComputedStyle(p).direction==="rtl",u=Math.round(m*.6),h=(g,k)=>g===void 0?void 0:[g].flat().map(y=>({axisLabel:{color:a?.muted,fontSize:u},axisLine:{lineStyle:{color:a?.line}},splitLine:{lineStyle:{color:a?.line}},nameTextStyle:{color:a?.muted,fontSize:u},...f&&k&&y.type==="category"?{inverse:!0}:{},...f&&!k?{position:"right"}:{},...y}));return{color:a?.series,backgroundColor:"transparent",animation:!matchMedia("(prefers-reduced-motion: reduce)").matches,textStyle:{fontFamily:getComputedStyle(t).getPropertyValue("--deck-body")||"system-ui",color:a?.ink,fontSize:u},...l,title:l.title?{...l.title,textStyle:{color:a?.ink,fontSize:Math.round(m*.8),...l.title?.textStyle}}:void 0,legend:l.legend?{itemWidth:u*1.6,itemHeight:u,...l.legend,textStyle:{color:a?.ink,fontSize:u,...l.legend?.textStyle}}:void 0,grid:{containLabel:!0,left:u,right:u,top:l.title?m*1.8:u,bottom:l.legend?m*1.6:u,...l.grid},xAxis:h(l.xAxis,!0),yAxis:h(l.yAxis,!1),toolbox:void 0,series:[l.series??[]].flat().map(g=>g.type==="pie"?{label:{color:a?.ink,fontSize:u},...g}:g)}};return{async echarts(l,p){let m=JSON.parse(p),f=await yn(Qe(e,"echarts",i,"dist/echarts.min.js"),"echarts"),u=document.createElement("div");u.className="deck-chart",u.setAttribute("role","img"),u.setAttribute("aria-label",String(m.title?.text??"")),l.append(u);let h=f.init(u,null,{renderer:"svg",locale:document.documentElement.lang?.startsWith("ja")?"JA":"EN"}),g={chart:h,option:m,box:l};r.add(g),h.setOption(d(m,l)),new ResizeObserver(()=>{h.resize(),h.setOption(d(m,l),!0)}).observe(u),Object.assign(l,{chart:h})},async mermaid(l,p,m={}){let f=await yn(Qe(e,"pele",s,"dist/pele.global.js"),"pele"),u=getComputedStyle(t).getPropertyValue("--deck-body")||"system-ui, sans-serif",{scale:h,theme:g,...k}=m,{svg:y}=f.render(p,{fontFamily:u,links:!1,images:!1,autoDirection:!0,maxWidth:Math.max(320,l.clientWidth*1.4),...Object.keys(k).length&&{config:k}}),b=document.createElement("img");b.alt=p,b.src=c(y);let A=Number(h);if(A>0&&A<1)for(let v of["max-inline-size","max-block-size"])b.style.setProperty(v,`${A*100}%`);o.add({picture:b,svg:y});let $=document.createElement("div");$.className="deck-diagram",$.append(b),l.append($)}}}var xt="0.4.0";var yt='<script type="text/markdown" id="deck">',di="<\/script>",pi=e=>e.replace(/<(\\*)(\/?script)/gi,"<\\$1$2"),wt=e=>e.replace(/<\\(\\*)(\/?script)/gi,"<$1$2"),Le=e=>e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<"),ui=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");function hi(e){if(/\\<(!--|\/?script)/i.test(e))throw new Error("This code cannot be held in a page as it is.");return e.replace(/<(!--|\/?script)/gi,"\\x3C$1")}function vn(e){let t=e.indexOf(yt);if(t<0)return null;let n=t+yt.length,i=e.slice(n).search(/<\/script/i);return i<0?null:wt(e.slice(n,n+i).replace(/^\n/,"").replace(/\n$/,""))}var mi=(e=xt)=>`https://cdn.jsdelivr.net/npm/@codename/deck@${e}/dist/deck.js`;function vt(e,{title:t="",lang:n="en",dir:i="auto",renderer:s={src:mi()},base:r,generator:o=`deck ${xt}`}={}){let a=r?` data-base="${Le(r)}"`:"",c="src"in s?`<script src="${Le(s.src)}"${a}><\/script>`:`<script${a}>${hi(s.code)}<\/script>`;return`<!doctype html>
|
|
98
|
+
<html lang="${Le(n)}" dir="${Le(i)}">
|
|
93
99
|
<meta charset="utf-8">
|
|
94
100
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
95
|
-
<meta name="generator" content="${
|
|
96
|
-
<title>${
|
|
101
|
+
<meta name="generator" content="${Le(o)}">
|
|
102
|
+
<title>${ui(t)}</title>
|
|
97
103
|
<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
104
|
<body>
|
|
99
|
-
${
|
|
100
|
-
${
|
|
101
|
-
${
|
|
102
|
-
${
|
|
105
|
+
${yt}
|
|
106
|
+
${pi(e)}
|
|
107
|
+
${di}
|
|
108
|
+
${c}
|
|
103
109
|
</html>
|
|
104
|
-
`}var an=13.333,Dr=7.5,on="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 gt(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 a={slides:0,charts:0,pictures:0,tables:0,placeholders:0},o=t.dir==="rtl",l=t.slides(),d=new Map,c=[];for(let[h,k]of l.entries()){let m=k.getBoundingClientRect(),x=an/m.width,w=A=>{let E=A.getBoundingClientRect();return{x:(E.left-m.left)*x,y:(E.top-m.top)*x,w:E.width*x,h:E.height*x}},q=A=>{let E=A.closest(".deck-slot")??A,{x:W,w:S}=w(E),{y:j,h:M}=w(A),N=getComputedStyle(E),pe=parseFloat(N.paddingInlineStart)*x,ue=parseFloat(N.paddingInlineEnd)*x;return{x:W+(o?ue:pe),y:j,w:S-pe-ue,h:M*1.08}},H=A=>getComputedStyle(A).justifyContent==="center"?"middle":"top",D=A=>Math.round(A*x*72*10)/10,R=getComputedStyle(k),C=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[C],ee=`${J?zt(J,C,t.lang):C}${k.classList.contains("deck-class-invert")?" (dark)":""}`;if(!d.has(ee)){let A=[];B&&A.push({placeholder:{options:{name:"title",type:"title",...q(B),valign:"bottom",margin:0,fontFace:s.theme.headFontFace,color:X(getComputedStyle(B).color),align:o?"right":"left"},text:""}});for(let S of Z){let j=w(S),M=B&&S===Z[0]?w(B).y+w(B).h:j.y,N=S.firstElementChild&&S.firstElementChild!==B?q(S.firstElementChild):{x:j.x,w:j.w};A.push({placeholder:{options:{name:`body-${S.dataset.slot}`,type:"body",x:N.x,y:M+.08,w:N.w,h:Math.max(.3,j.y+j.h-M-.08),margin:0,valign:H(S),color:X(getComputedStyle(S).color)},text:""}})}let E=[...k.querySelectorAll(".deck-logo")].find(S=>getComputedStyle(S).display!=="none"),W=E&&await qe(E.src,E.clientWidth*3,E.clientHeight*3);E&&W&&(A.push({image:{data:W,...w(E)}}),a.pictures++),s.defineSlideMaster({title:ee,background:{color:X(R.backgroundColor)},objects:A,slideNumber:J?.numbered!==!1?{x:o?.3:an-.9,y:Dr-.55,w:.6,h:.3,fontSize:10,color:X(r.getPropertyValue("--deck-muted").trim()||"#666666")}:void 0}),d.set(ee,new Set(A.flatMap(S=>S.placeholder?[S.placeholder.options.name]:[])))}let ze=d.get(ee),F=s.addSlide({masterName:ee});a.slides++;let re=k.querySelector(".deck-image");if(re){let A=/url\("?(.*?)"?\)/.exec(getComputedStyle(re).backgroundImage)?.[1],E=A&&await qe(A,re.clientWidth*2,re.clientHeight*2,!0);E&&(F.addImage({data:E,...w(re)}),a.pictures++)}B&&ze.has("title")&&(F.addText(ft(B,{pt:D,rtl:o,lang:t.lang}),{placeholder:"title"}),a.placeholders++);for(let A of Z){let E=[...A.children].filter(S=>S!==B);if(E.length>0&&E.every(S=>S.matches(on))&&ze.has(`body-${A.dataset.slot}`)){F.addText(E.flatMap(S=>ft(S,{pt:D,rtl:o,lang:t.lang})),{placeholder:`body-${A.dataset.slot}`,valign:H(A),...ln(A)}),a.placeholders++;continue}for(let S of E){let j=w(S);if(S.matches(on))F.addText(ft(S,{pt:D,rtl:o,lang:t.lang}),{...q(S),valign:"top",margin:0,...ln(A)});else if(S.matches("pre"))F.addText(S.textContent?.replace(/\n$/,"")??"",{...j,fontFace:"Consolas",fontSize:D(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"))Fr(F,S,j,{pt:D,rtl:o,lang:t.lang}),a.tables++;else if(S.matches(".deck-echarts")&&S.chart){let M=S.chart;Zr(s,F,M,j,{pt:D,rtl:o,lang:t.lang,ink:X(R.color)})?a.charts++:(F.addImage({data:await qe(`data:image/svg+xml;charset=utf-8,${encodeURIComponent(M.renderToSVGString())}`,j.w/x*2,j.h/x*2),...j}),a.pictures++)}else{let M=S.querySelector("img");if(M){M.complete||(M.loading="eager",await M.decode().catch(()=>{}));let N=await qe(M.src,M.clientWidth*2,M.clientHeight*2);N&&(F.addImage({data:N,...w(M),altText:M.alt}),a.pictures++)}}}}let ne=t.deck.slides[h]?.notes;ne&&F.addNotes(ne);let ke=t.deck.slides[h]?.settings??{};c.push(String(ke.transition??t.deck.settings.transition??"none").split("|")[0].trim())}let p=await n.loadAsync(await s.write({outputType:"arraybuffer",compression:!0}));for(let[h,k]of c.entries()){let m=`ppt/slides/slide${h+1}.xml`,x=await p.file(m)?.async("string");!x||k==="none"||p.file(m,x.replace(/<\/p:clrMapOvr>|(?=<p:timing|<\/p:sld>)/,w=>`${w}${Hr(k,o)}`))}let u=await p.file("ppt/theme/theme1.xml")?.async("string");if(u){let h=x=>X(r.getPropertyValue(`--deck-${x}`).trim()),k=[h("fill"),...[2,3,4,5,6].map(x=>h(`series-${x}`))],m=`<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>`;p.file("ppt/theme/theme1.xml",u.replace(/<a:clrScheme[\s\S]*?<\/a:clrScheme>/,m))}return{blob:await p.generateAsync({type:"blob",compression:"DEFLATE",mimeType:"application/vnd.openxmlformats-officedocument.presentationml.presentation"}),report:a}}function ln(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,a)=>{let o=getComputedStyle(i),l={fontSize:e.pt(parseFloat(o.fontSize)),color:X(o.color),bold:Number(o.fontWeight)>=600,lang:e.lang,rtlMode:e.rtl,align:o.textAlign==="center"?"center":e.rtl?"right":"left",...a},d=Br(i,l);d.length&&(d[d.length-1].options.breakLine=!0,n.push(...d))},r=(i,a)=>{let o=0;for(let l of i.children){o++;let d=[...l.children].filter(p=>p.matches("ul, ol")),c=l.cloneNode(!0);for(let p of[...c.children])p.matches("ul, ol, input")&&p.remove();l.after(c),s(c,{bullet:i.tagName==="OL"?{type:"number",startAt:o===1?Number(i.getAttribute("start")??1):void 0}:!0,indentLevel:a}),c.remove();for(let p of d)r(p,a+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 Br(t,e){let n=[],s=(r,i)=>{if(r.nodeType===Node.TEXT_NODE){let o=(r.textContent??"").replace(/\s+/g," ");o&&n.push({text:o,options:{...i}});return}if(!(r instanceof HTMLElement))return;if(r.tagName==="BR"){n.length&&(n[n.length-1].options.breakLine=!0);return}let a={...i};r.matches("strong, b")&&(a.bold=!0,a.color=X(getComputedStyle(r).color)),r.matches("em, i")&&(a.italic=!0),r.matches("del, s")&&(a.strike="sngStrike"),r.matches("code")&&(a.fontFace="Consolas"),r.matches("a[href]")&&(a.hyperlink={url:r.getAttribute("href")});for(let o of r.childNodes)s(o,a)};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 Fr(t,e,n,s){let r=[...e.querySelectorAll("tr")].map(o=>[...o.children].map(l=>{let d=getComputedStyle(l),c=l.getAttribute("data-align");return{text:l.textContent?.trim()??"",options:{bold:l.tagName==="TH",fontSize:s.pt(parseFloat(d.fontSize)),color:X(d.color),lang:s.lang,rtlMode:s.rtl,align:c==="center"?"center":c==="right"!==s.rtl?"right":"left",border:[{type:"none"},{type:"none"},{type:"solid",pt:l.tagName==="TH"?1.5:.75,color:X(d.borderBlockEndColor)},{type:"none"}]}}})),i=[...e.querySelector("tr")?.children??[]].map(o=>o.getBoundingClientRect().width),a=i.reduce((o,l)=>o+l,0)||1;t.addTable(s.rtl?r.map(o=>o.reverse()):r,{...n,colW:(s.rtl?i.reverse():i).map(o=>o/a*n.w),margin:.06})}function Zr(t,e,n,s,r){let i=n.getOption(),a=i.series??[];if(!a.length)return!1;let o=new Set(a.map(p=>p.type)),l=(i.color??[]).map(X),d=p=>Array.isArray(p)?Number(p.at(-1)):Number(typeof p=="object"&&p!==null?p.value:p),c={...s,showLegend:a.length>1||o.has("pie"),legendPos:"b",legendFontSize:12,legendColor:r.ink,chartColors:l,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(o.size===1&&o.has("pie")){let p=a[0],u=Array.isArray(p.radius)&&parseFloat(p.radius[0])>0;return e.addChart(u?t.charts.DOUGHNUT:t.charts.PIE,[{name:p.name??"",labels:p.data.map(f=>f.name),values:p.data.map(d)}],{...c,showPercent:!0,showLegend:!0,holeSize:u?55:void 0}),!0}if([...o].every(p=>p==="bar"||p==="line")){let p=i.yAxis?.[0]?.type==="category",u=(p?i.yAxis:i.xAxis)?.[0]?.data??[],f=m=>[{name:m.name??"",labels:u.map(String),values:m.data.map(d)}],h=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&&!p?"maxMin":"minMax",valAxisLabelFormatCode:"#,##0"};if(o.size===1){let m=a.flatMap(f);e.addChart(h(a[0]),m,{...c,...k,barDir:p?"bar":"col",barGrouping:a.some(x=>x.stack)?"stacked":"clustered",lineDataSymbol:"circle",lineSize:2})}else e.addChart(a.map(m=>({type:h(m),data:f(m),options:{barDir:p?"bar":"col",chartColors:[l[a.indexOf(m)%l.length]]}})),{...c,...k});return!0}if(o.size===1&&o.has("scatter")){let p=a[0].data.map(u=>Array.isArray(u)?u:[u.value?.[0],u.value?.[1]]);return e.addChart(t.charts.SCATTER,[{name:"X",values:p.map(u=>u[0])},{name:a[0].name??"Y",values:p.map(u=>u[1])}],{...c,lineSize:0,lineDataSymbolSize:8}),!0}if(o.size===1&&o.has("radar")){let p=i.radar?.[0]?.indicator??[];return e.addChart(t.charts.RADAR,a[0].data.map(u=>({name:u.name??"",labels:p.map(f=>f.name),values:u.value})),{...c,showLegend:!0,radarStyle:"standard"}),!0}return!1}function Hr(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 qe(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 a=i.getContext("2d"),o=r.naturalWidth||e,l=r.naturalHeight||n,d=s?Math.max(i.width/o,i.height/l):Math.min(i.width/o,i.height/l);return a.drawImage(r,(i.width-o*d)/2,(i.height-l*d)/2,o*d,l*d),i.toDataURL("image/png")}catch{return null}}var cn=`/* deck: a slide is a 16:9 box, a size container, whose canvas sizes its type and space with the
|
|
110
|
+
`}var Xe=13.333,St=7.5,Sn="h1, h2, h3, h4, h5, h6, .deck-h, p:not(.deck-picture), ul, ol, blockquote";function H(e){let t=/rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)/.exec(e);if(t)return[t[1],t[2],t[3]].map(i=>Math.round(Number(i)).toString(16).padStart(2,"0")).join("").toUpperCase();let n=/color\(srgb\s+([\d.]+)\s+([\d.]+)\s+([\d.]+)/.exec(e);return n?[n[1],n[2],n[3]].map(i=>Math.round(Number(i)*255).toString(16).padStart(2,"0")).join("").toUpperCase():e.replace("#","").toUpperCase().slice(0,6)||"000000"}var be=e=>{let t=/rgba\((?:[^,]*,){3}\s*([\d.]+)\s*\)|\/\s*([\d.]+)\s*\)/.exec(e);return e==="transparent"?0:Number(t?.[1]??t?.[2]??1)};async function $t(e,{PptxGenJS:t,JSZip:n}){let i=new t;i.layout="LAYOUT_WIDE",i.title=e.deck.slides[0]?.title??"",i.rtlMode=e.dir==="rtl";let s=getComputedStyle(e.root),r=u=>u.split(",").map(h=>h.trim().replace(/^["']|["']$/g,"")).find(h=>!/^(ui-|system-ui|-apple|sans-serif|serif|monospace)/.test(h))??"Arial";i.theme={headFontFace:r(s.getPropertyValue("--deck-heading")),bodyFontFace:r(s.getPropertyValue("--deck-body"))};let o={slides:0,charts:0,pictures:0,tables:0,placeholders:0,maps:0,figures:0},a=e.dir==="rtl",c=e.slides(),d=new Map,l=[];for(let[u,h]of c.entries()){let g=h.getBoundingClientRect(),k=Xe/g.width,y=P=>{let L=P.getBoundingClientRect();return{x:(L.left-g.left)*k,y:(L.top-g.top)*k,w:L.width*k,h:L.height*k}},b=P=>{let L=P.closest(".deck-slot")??P,{x:M,w:T}=y(L),{y:X,h:N}=y(P),te=getComputedStyle(L),re=parseFloat(te.paddingInlineStart)*k,ae=parseFloat(te.paddingInlineEnd)*k;return{x:M+(a?ae:re),y:X,w:T-re-ae,h:N*1.08}},A=async(P,L)=>{if(P.matches(".deck-echarts")&&P.chart){let X=P.chart;bi(i,G,X,L,{pt:v,rtl:a,lang:e.lang,ink:H(z.color)})?o.charts++:(G.addImage({data:await Oe(`data:image/svg+xml;charset=utf-8,${encodeURIComponent(X.renderToSVGString())}`,L.w/k*2,L.h/k*2),...L}),o.pictures++);return}let M=P.querySelector("img");if(!M)return;M.complete||(M.loading="eager",await M.decode().catch(()=>{}));let T=await Oe(M.src,M.clientWidth*2,M.clientHeight*2);T&&(G.addImage({data:T,...y(M),altText:M.alt}),o.pictures++)},$=P=>getComputedStyle(P).justifyContent==="center"?"middle":"top",v=P=>Math.round(P*k*72*10)/10,z=getComputedStyle(h),q=h.dataset.layout??"default",R=[...h.querySelectorAll(".deck-slot")],I=R[0]?.firstElementChild,_=I&&I.matches("h1, h2, h3, .deck-h")?I:null,Q=e.kit.layouts[q],K=`${Q?qt(Q,q,e.lang):q}${h.classList.contains("deck-class-invert")?" (dark)":""}`;if(!d.has(K)){let P=[],L=[...h.querySelectorAll("img.deck-art")].map(N=>N.src),M=L.length&&await Oe(L,Xe*150,St*150,!1,z.backgroundColor);M&&(P.push({image:{data:M,x:0,y:0,w:Xe,h:St}}),o.pictures++),_&&P.push({placeholder:{options:{name:"title",type:"title",...b(_),valign:"bottom",margin:0,fontFace:i.theme.headFontFace,color:H(getComputedStyle(_).color),align:a?"right":"left"},text:""}});for(let N of R){let te=y(N),re=_&&N===R[0]?y(_).y+y(_).h:te.y,ae=N.firstElementChild&&N.firstElementChild!==_?b(N.firstElementChild):{x:te.x,w:te.w};P.push({placeholder:{options:{name:`body-${N.dataset.slot}`,type:"body",x:ae.x,y:re+.08,w:ae.w,h:Math.max(.3,te.y+te.h-re-.08),margin:0,valign:$(N),color:H(getComputedStyle(N).color)},text:""}})}let T=[...h.querySelectorAll(".deck-logo")].find(N=>getComputedStyle(N).display!=="none"),X=T&&await Oe(T.src,T.clientWidth*3,T.clientHeight*3);T&&X&&(P.push({image:{data:X,...y(T)}}),o.pictures++),i.defineSlideMaster({title:K,background:{color:H(z.backgroundColor)},objects:P,slideNumber:Q?.numbered!==!1?{x:a?.3:Xe-.9,y:St-.55,w:.6,h:.3,fontSize:10,color:H(s.getPropertyValue("--deck-muted").trim()||"#666666")}:void 0}),d.set(K,new Set(P.flatMap(N=>N.placeholder?[N.placeholder.options.name]:[])))}let ne=d.get(K),G=i.addSlide({masterName:K});o.slides++;let V=h.querySelector(".deck-image");if(V){let P=/url\("?(.*?)"?\)/.exec(getComputedStyle(V).backgroundImage)?.[1],L=P&&await Oe(P,V.clientWidth*2,V.clientHeight*2,!0);L&&(G.addImage({data:L,...y(V)}),o.pictures++);let M=getComputedStyle(V,"::after");M.content!=="none"&&be(M.backgroundColor)>0&&G.addShape(i.shapes.RECTANGLE,{...y(V),fill:{color:H(M.backgroundColor),transparency:Math.round((1-be(M.backgroundColor))*100)},line:{type:"none"}})}_&&ne.has("title")&&(G.addText(qe(_,{pt:v,rtl:a,lang:e.lang}),{placeholder:"title"}),o.placeholders++);for(let P of R){let L=[...P.children].filter(T=>T!==_);if(L.length>0&&L.every(T=>T.matches(Sn))&&ne.has(`body-${P.dataset.slot}`)){G.addText(L.flatMap(T=>qe(T,{pt:v,rtl:a,lang:e.lang})),{placeholder:`body-${P.dataset.slot}`,valign:$(P),...$n(P)}),o.placeholders++;continue}for(let T of L){let X=y(T);T.matches(Sn)?G.addText(qe(T,{pt:v,rtl:a,lang:e.lang}),{...b(T),valign:"top",margin:0,...$n(P)}):T.matches("pre")?G.addText(T.textContent?.replace(/\n$/,"")??"",{...X,fontFace:"Consolas",fontSize:v(parseFloat(getComputedStyle(T).fontSize)),color:H(getComputedStyle(T).color),fill:{color:H(getComputedStyle(T).backgroundColor)},valign:"top",margin:6,rtlMode:!1,align:"left"}):T.matches(".deck-table")?(An(G,T,X,{pt:v,rtl:a,lang:e.lang}),o.tables++):T.matches(".deck-mindmap")?(await fi(i,G,T,y,{pt:v,rtl:a,lang:e.lang},A),o.maps++):T.matches(".deck-figure")?(await gi(i,G,T,y,{pt:v,rtl:a,lang:e.lang},A),o.figures++):await A(T,X)}}let xe=e.deck.slides[u]?.notes;xe&&G.addNotes(xe);let ye=e.deck.slides[u]?.settings??{};l.push(String(ye.transition??e.deck.settings.transition??"none").split("|")[0].trim())}let p=await n.loadAsync(await i.write({outputType:"arraybuffer",compression:!0}));for(let[u,h]of l.entries()){let g=`ppt/slides/slide${u+1}.xml`,k=await p.file(g)?.async("string");!k||h==="none"||p.file(g,k.replace(/<\/p:clrMapOvr>|(?=<p:timing|<\/p:sld>)/,y=>`${y}${xi(h,a)}`))}let m=await p.file("ppt/theme/theme1.xml")?.async("string");if(m){let u=k=>H(s.getPropertyValue(`--deck-${k}`).trim()),h=[u("fill"),...[2,3,4,5,6].map(k=>u(`series-${k}`))],g=`<a:clrScheme name="Deck"><a:dk1><a:srgbClr val="${u("ink")}"/></a:dk1><a:lt1><a:srgbClr val="${u("paper")}"/></a:lt1><a:dk2><a:srgbClr val="${u("ink")}"/></a:dk2><a:lt2><a:srgbClr val="${u("soft")}"/></a:lt2>${h.map((k,y)=>`<a:accent${y+1}><a:srgbClr val="${k}"/></a:accent${y+1}>`).join("")}<a:hlink><a:srgbClr val="${u("primary")}"/></a:hlink><a:folHlink><a:srgbClr val="${u("primary")}"/></a:folHlink></a:clrScheme>`;p.file("ppt/theme/theme1.xml",m.replace(/<a:clrScheme[\s\S]*?<\/a:clrScheme>/,g))}return{blob:await p.generateAsync({type:"blob",compression:"DEFLATE",mimeType:"application/vnd.openxmlformats-officedocument.presentationml.presentation"}),report:o}}async function fi(e,t,n,i,s,r){let o=n.querySelector(".deck-map-plane"),a=n.querySelector(".deck-map-lines"),c=o.getBoundingClientRect().width/(o.offsetWidth||1),d=i(a),l=Number(a.getAttribute("viewBox")?.split(" ")[2])||1,p=d.w/l;for(let f of a.querySelectorAll("path")){let[u,h,,,,,g,k]=(f.getAttribute("d")?.match(/-?[\d.]+/g)??[]).map((v,z)=>(z%2?d.y:d.x)+Number(v)*p),y=Math.min(u,g),b=Math.min(h,k),A=(u+g)/2-y,$=getComputedStyle(f);t.addShape(e.shapes.CUSTOM_GEOMETRY,{x:y,y:b,w:Math.max(.01,Math.abs(g-u)),h:Math.max(.01,Math.abs(k-h)),line:{color:H($.stroke),width:Math.round(parseFloat($.strokeWidth)*p*72*10)/10},points:[{x:u-y,y:h-b},{x:g-y,y:k-b,curve:{type:"cubic",x1:A,y1:h-b,x2:A,y2:k-b}}]})}let m={...s,pt:f=>s.pt(f*c)};for(let f of n.querySelectorAll(".deck-map-node")){let u=getComputedStyle(f),h=i(f),g=u.textAlign==="left"||u.textAlign==="right"?u.textAlign:u.textAlign==="center"?"center":s.rtl?"right":"left",k=f.matches(".has-block")?f.querySelector(".deck-map-words"):f,y=k?qe(k,m).map(q=>({...q,options:{...q.options,align:g}})):[],b=parseFloat(u.borderTopWidth)||0,A=m.pt(parseFloat(u.paddingInlineStart)||0)/72,$=be(u.backgroundColor)>0?{color:H(u.backgroundColor),transparency:Math.round((1-be(u.backgroundColor))*100)}:void 0,v=$||b?h.w*.04:h.w*.08,z=g==="left"?h.x:g==="right"?h.x-v:h.x-v/2;if(t.addText(k===f&&y.length?y:"",{x:z,y:h.y,w:h.w+v,h:h.h,margin:[A*72,A*72,0,0],valign:"middle",align:g,wrap:!0,...$||b?{shape:e.shapes.ROUNDED_RECTANGLE,rectRadius:Math.min(h.h/2,m.pt(parseFloat(u.borderTopLeftRadius)||0)/72),fill:$}:{},...b?{line:{color:H(u.borderTopColor),width:Math.round(m.pt(b)*10)/10}}:{}}),k!==f){k&&t.addText(y,{...i(k),margin:0,valign:"middle",align:"center",wrap:!0});for(let q of f.querySelectorAll(".deck-block"))await r(q,i(q))}}}async function gi(e,t,n,i,s,r){let o=c=>s.pt(c)/72,a=c=>parseInt(getComputedStyle(c).zIndex,10)||0;for(let c of[...n.querySelectorAll(".deck-shape")].sort((d,l)=>a(d)-a(l))){let d=getComputedStyle(c),l=i(c),p=c.getBoundingClientRect(),m=be(d.backgroundColor)>0?{color:H(d.backgroundColor),transparency:Math.round((1-be(d.backgroundColor))*100)}:void 0,f=["Top","Right","Bottom","Left"].map(k=>({side:k,width:parseFloat(d[`border${k}Width`])||0,colour:d[`border${k}Color`]})).map(k=>({...k,width:be(k.colour)>0?k.width:0})),u=f.every(k=>Math.abs(k.width-f[0].width)<.1),h=u&&f[0].width>0?{color:H(f[0].colour),width:Math.round(s.pt(f[0].width)*10)/10}:{type:"none"},g=/^polygon\((.*)\)$/.exec(d.clipPath)?.[1];if(g&&(m||u&&f[0].width)){let k=(b,A)=>[...b.replace(/^calc\(|\)$/g,"").matchAll(/([+-]?)\s*([\d.]+)(%|px)?/g)].reduce(($,[,v,z,q])=>$+(v==="-"?-1:1)*(q==="%"?Number(z)/100*A:o(Number(z))),0),y=g.split(/,(?![^(]*\))/).map(b=>b.trim().match(/calc\([^)]*\)|[-\d.]+(?:%|px)?/g)??[]).map(([b="0",A="0"])=>({x:k(b,l.w),y:k(A,l.h)}));t.addShape(e.shapes.CUSTOM_GEOMETRY,{...l,fill:m,line:h,points:[...y,{close:!0}]})}else if(m||h.width){let k=d.borderTopLeftRadius.endsWith("%")?Math.min(p.width,p.height)*parseFloat(d.borderTopLeftRadius)/100:parseFloat(d.borderTopLeftRadius)||0,b=k>=Math.min(p.width,p.height)/2-.5&&Math.abs(p.width-p.height)<1?e.shapes.OVAL:k>0?e.shapes.ROUNDED_RECTANGLE:e.shapes.RECTANGLE;t.addShape(b,{...l,fill:m,line:h,...b===e.shapes.ROUNDED_RECTANGLE?{rectRadius:Math.min(l.h/2,l.w/2,o(k))}:{}})}if(!u)for(let{side:k,width:y,colour:b}of f){if(!y)continue;let A=o(y),$={Top:{x:l.x,y:l.y+A/2,w:l.w,h:0},Bottom:{x:l.x,y:l.y+l.h-A/2,w:l.w,h:0},Left:{x:l.x+A/2,y:l.y,w:0,h:l.h},Right:{x:l.x+l.w-A/2,y:l.y,w:0,h:l.h}}[k];t.addShape(e.shapes.LINE,{...$,line:{color:H(b),width:Math.round(s.pt(y)*10)/10}})}}for(let c of n.querySelectorAll(".deck-words")){if(c.parentElement?.closest(".deck-words")||!c.textContent?.trim())continue;let d=getComputedStyle(c),l=i(c),p=d.textAlign==="center"?"center":d.textAlign==="left"||d.textAlign==="right"?d.textAlign:d.textAlign==="end"!==s.rtl?"right":"left",m=l.w*.08,f=p==="left"?l.x:p==="right"?l.x-m:l.x-m/2;t.addText(qe(c,s).map(u=>({...u,options:{...u.options,align:p}})),{x:f,y:l.y,w:l.w+m,h:l.h,margin:0,valign:c.matches(".deck-shape")?"middle":"top",align:p,wrap:!0})}for(let c of n.querySelectorAll(".deck-table"))An(t,c,i(c),s);for(let c of n.querySelectorAll(".deck-block"))await r(c,i(c))}function $n(e){let t=e.firstElementChild,n=t?parseFloat(getComputedStyle(t).marginBlockEnd):0;return{paraSpaceAfter:Math.round(n*.5)}}function qe(e,t){let n=[],i=(r,o)=>{let a=getComputedStyle(r),c={fontSize:t.pt(parseFloat(a.fontSize)),color:H(a.color),bold:Number(a.fontWeight)>=600,lang:t.lang,rtlMode:t.rtl,align:a.textAlign==="center"?"center":t.rtl?"right":"left",...o},d=ki(r,c);d.length&&(d[d.length-1].options.breakLine=!0,n.push(...d))},s=(r,o)=>{let a=0;for(let c of r.children){a++;let d=[...c.children].filter(p=>p.matches("ul, ol")),l=c.cloneNode(!0);for(let p of[...l.children])p.matches("ul, ol, input")&&p.remove();c.after(l),i(l,{bullet:r.tagName==="OL"?{type:"number",startAt:a===1?Number(r.getAttribute("start")??1):void 0}:!0,indentLevel:o}),l.remove();for(let p of d)s(p,o+1)}};if(e.matches("ul, ol"))s(e,0);else if(e.matches("blockquote"))for(let r of e.children)i(r,{italic:getComputedStyle(r).fontStyle==="italic"});else i(e,{});return n}function ki(e,t){let n=[],i=(s,r)=>{if(s.nodeType===Node.TEXT_NODE){let a=(s.textContent??"").replace(/\s+/g," ");a&&n.push({text:a,options:{...r}});return}if(!(s instanceof HTMLElement))return;if(s.tagName==="BR"){n.length&&(n[n.length-1].options.breakLine=!0);return}let o={...r};s.matches("strong, b")&&(o.bold=!0,o.color=H(getComputedStyle(s).color)),s.matches("em, i")&&(o.italic=!0),s.matches("del, s")&&(o.strike="sngStrike"),s.matches("code")&&(o.fontFace="Consolas"),s.matches("a[href]")&&(o.hyperlink={url:s.getAttribute("href")});for(let a of s.childNodes)i(a,o)};for(let s of e.childNodes)i(s,t);return n.length&&(n[0].text=n[0].text.trimStart(),n[n.length-1].text=n[n.length-1].text.trimEnd()),n.filter(s=>s.text)}function An(e,t,n,i){let s=[...t.querySelectorAll("tr")].map(a=>[...a.children].map(c=>{let d=getComputedStyle(c),l=c.getAttribute("data-align");return{text:c.textContent?.trim()??"",options:{bold:c.tagName==="TH",fontSize:i.pt(parseFloat(d.fontSize)),color:H(d.color),lang:i.lang,rtlMode:i.rtl,align:l==="center"?"center":l==="right"!==i.rtl?"right":"left",border:[{type:"none"},{type:"none"},{type:"solid",pt:c.tagName==="TH"?1.5:.75,color:H(d.borderBlockEndColor)},{type:"none"}]}}})),r=[...t.querySelector("tr")?.children??[]].map(a=>a.getBoundingClientRect().width),o=r.reduce((a,c)=>a+c,0)||1;e.addTable(i.rtl?s.map(a=>a.reverse()):s,{...n,colW:(i.rtl?r.reverse():r).map(a=>a/o*n.w),margin:.06})}function bi(e,t,n,i,s){let r=n.getOption(),o=r.series??[];if(!o.length)return!1;let a=new Set(o.map(p=>p.type)),c=(r.color??[]).map(H),d=p=>Array.isArray(p)?Number(p.at(-1)):Number(typeof p=="object"&&p!==null?p.value:p),l={...i,showLegend:o.length>1||a.has("pie"),legendPos:"b",legendFontSize:12,legendColor:s.ink,chartColors:c,showTitle:!!r.title?.[0]?.text,title:r.title?.[0]?.text,titleFontSize:16,titleColor:s.ink,catAxisLabelColor:s.ink,valAxisLabelColor:s.ink,dataLabelColor:s.ink,lang:s.lang};if(a.size===1&&a.has("pie")){let p=o[0],m=Array.isArray(p.radius)&&parseFloat(p.radius[0])>0;return t.addChart(m?e.charts.DOUGHNUT:e.charts.PIE,[{name:p.name??"",labels:p.data.map(f=>f.name),values:p.data.map(d)}],{...l,showPercent:!0,showLegend:!0,holeSize:m?55:void 0}),!0}if([...a].every(p=>p==="bar"||p==="line")){let p=r.yAxis?.[0]?.type==="category",m=(p?r.yAxis:r.xAxis)?.[0]?.data??[],f=g=>[{name:g.name??"",labels:m.map(String),values:g.data.map(d)}],u=g=>g.type==="bar"?e.charts.BAR:g.areaStyle?e.charts.AREA:e.charts.LINE,h={catAxisLabelFontSize:11,valAxisLabelFontSize:11,valGridLine:{color:"D9D9D9",size:.5},catAxisOrientation:s.rtl&&!p?"maxMin":"minMax",valAxisLabelFormatCode:"#,##0"};if(a.size===1){let g=o.flatMap(f);t.addChart(u(o[0]),g,{...l,...h,barDir:p?"bar":"col",barGrouping:o.some(k=>k.stack)?"stacked":"clustered",lineDataSymbol:"circle",lineSize:2})}else t.addChart(o.map(g=>({type:u(g),data:f(g),options:{barDir:p?"bar":"col",chartColors:[c[o.indexOf(g)%c.length]]}})),{...l,...h});return!0}if(a.size===1&&a.has("scatter")){let p=o[0].data.map(m=>Array.isArray(m)?m:[m.value?.[0],m.value?.[1]]);return t.addChart(e.charts.SCATTER,[{name:"X",values:p.map(m=>m[0])},{name:o[0].name??"Y",values:p.map(m=>m[1])}],{...l,lineSize:0,lineDataSymbolSize:8}),!0}if(a.size===1&&a.has("radar")){let p=r.radar?.[0]?.indicator??[];return t.addChart(e.charts.RADAR,o[0].data.map(m=>({name:m.name??"",labels:p.map(f=>f.name),values:m.value})),{...l,showLegend:!0,radarStyle:"standard"}),!0}return!1}function xi(e,t){let n=i=>`<p:transition spd="med"><p:push dir="${i}"/></p:transition>`;return e==="view-transition"||e==="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>':e==="slide-left"?n(t?"r":"l"):e==="slide-right"?n(t?"l":"r"):e==="slide-up"?n("u"):e==="slide-down"?n("d"):'<p:transition spd="med"><p:fade/></p:transition>'}async function Oe(e,t,n,i=!1,s=""){try{let r=await Promise.all([e].flat().map(async m=>{let f=new Image;return f.crossOrigin="anonymous",f.src=m,await f.decode(),f})),o=r[0],a=document.createElement("canvas");a.width=Math.max(1,Math.round(t)),a.height=Math.max(1,Math.round(n));let c=a.getContext("2d"),d=o.naturalWidth||t,l=o.naturalHeight||n,p=i?Math.max(a.width/d,a.height/l):Math.min(a.width/d,a.height/l);if(!s)c.drawImage(o,(a.width-d*p)/2,(a.height-l*p)/2,d*p,l*p);else{c.fillStyle=s,c.fillRect(0,0,a.width,a.height);for(let m of r)c.drawImage(m,0,0,a.width,a.height)}return a.toDataURL(s?"image/jpeg":"image/png",.9)}catch{return null}}var zn=`/* deck: a slide is a 16:9 box, a size container, whose canvas sizes its type and space with the
|
|
105
111
|
slide's width (cqi), so it wraps the same at any size; its colours and faces are the look's tokens as custom properties; logical properties
|
|
106
112
|
only, so a deck in Arabic mirrors. The others are laid out behind the one shown, unseen. */
|
|
107
113
|
.deck { --deck-paper: #fffdf8; --deck-ink: #1d1b16; --deck-muted: #6b675e; --deck-line: #e4e0d6; --deck-primary: #8a6100; --deck-fill: #f7c531; --deck-on-fill: #1d1b16; --deck-soft: #fdf1c9;
|
|
@@ -146,6 +152,8 @@ ${l}
|
|
|
146
152
|
.deck-slide [data-align="center"] { text-align: center; }
|
|
147
153
|
.deck-block { position: relative; flex: 1 1 auto; min-block-size: 12cqi; overflow: hidden; }
|
|
148
154
|
.deck-block .deck-chart, .deck-block .deck-diagram { position: absolute; inset: 0; display: grid; place-items: center; }
|
|
155
|
+
/* A diagram's picture held to its box, its track sized so its share of it can be. */
|
|
156
|
+
.deck-block .deck-diagram { grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
|
|
149
157
|
.deck-block .deck-diagram img { max-inline-size: 100%; max-block-size: 100%; }
|
|
150
158
|
.deck-block .deck-block-source { display: none; }
|
|
151
159
|
.deck-block.is-failed .deck-block-source { display: block; }
|
|
@@ -161,6 +169,13 @@ ${l}
|
|
|
161
169
|
:is(.deck[data-scheme="light"] :is(.deck-slide[data-paper="ink"], .deck-class-invert), .deck[data-scheme="dark"] .deck-slide:is([data-paper="paper"], [data-paper="soft"]):not(.deck-class-invert), .deck[data-fill="dark"] .deck-slide[data-paper="fill"]) .deck-logo.is-dark { display: block; }
|
|
162
170
|
:is(.deck[data-scheme="light"] :is(.deck-slide[data-paper="ink"], .deck-class-invert), .deck[data-scheme="dark"] .deck-slide:is([data-paper="paper"], [data-paper="soft"]):not(.deck-class-invert), .deck[data-fill="dark"] .deck-slide[data-paper="fill"]) .deck-logo:not(.has-dark, .is-dark) { background: #fff; padding: 0.5cqi; border-radius: 0.5cqi; }
|
|
163
171
|
|
|
172
|
+
/* A layout's art (docs/kits.md), as its template draws it, behind words that sit where the template has them: its grid edge to edge, the slide laid out left to right, its number too. */
|
|
173
|
+
.deck-art { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; pointer-events: none; }
|
|
174
|
+
.deck-slide.has-art { direction: ltr; }
|
|
175
|
+
.has-art .deck-canvas { padding: 0; gap: 0; }
|
|
176
|
+
.has-art .deck-slot { padding: 0.5cqi 1cqi; }
|
|
177
|
+
.deck[dir="rtl"] .has-art .deck-slot { direction: rtl; }
|
|
178
|
+
|
|
164
179
|
/* Layouts from their kit's definition: the paper they are on, where their words sit, how big their heading is. */
|
|
165
180
|
.deck-slide[data-paper="fill"] { background: var(--deck-fill); color: var(--deck-on-fill); }
|
|
166
181
|
.deck-slide[data-paper="ink"] { background: var(--deck-ink); color: var(--deck-paper); }
|
|
@@ -175,9 +190,113 @@ ${l}
|
|
|
175
190
|
.deck-slide[data-title="huge"] :is(h2, .deck-h2) { font-size: 2.4em; }
|
|
176
191
|
/* What the usual layouts add to their definition: Slidev's looks for them. */
|
|
177
192
|
.deck-layout-section .deck-slot::before { content: ""; display: block; inline-size: 3em; block-size: 0.3em; background: var(--deck-fill); margin-block-end: 0.8em; border-radius: 0.15em; }
|
|
193
|
+
.deck-layout-subsection .deck-slot::before { content: ""; display: block; inline-size: 2em; block-size: 0.2em; background: var(--deck-primary); margin-block-end: 0.7em; border-radius: 0.1em; }
|
|
178
194
|
.deck-layout-statement :is(h1, h2, p, .deck-h1, .deck-h2) { font-size: 2.4em; font-family: var(--deck-heading); font-weight: 700; line-height: 1.2; }
|
|
179
195
|
.deck-slide.deck-layout-fact :is(h1, .deck-h1) { font-size: 5em; color: var(--deck-primary); margin-block-end: 0.15em; }
|
|
180
196
|
.deck-layout-quote blockquote { font-size: 1.7em; border: 0; padding: 0; font-family: var(--deck-heading); }
|
|
197
|
+
/* A mind map (mindmap.js): its words where its layout puts them, in em of its own type, the whole shrunk to its box; its
|
|
198
|
+
root on the fill, each branch in a colour of the charts', its lines and its first words' rim. */
|
|
199
|
+
.deck-mindmap { position: relative; flex: 1 1 auto; align-self: stretch; min-block-size: 12cqi; overflow: hidden; }
|
|
200
|
+
.deck-map-plane { position: absolute; top: 50%; left: 50%; translate: -50% -50%; }
|
|
201
|
+
.deck-map-lines { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; overflow: visible; }
|
|
202
|
+
.deck-map-lines path { fill: none; stroke: var(--deck-map-colour); stroke-width: 0.07; stroke-linecap: round; }
|
|
203
|
+
.deck-map-lines path[data-depth="1"] { stroke-width: 0.15; }
|
|
204
|
+
.deck-slide .deck-map-tree, .deck-slide .deck-map-tree :is(ul, li) { margin: 0; padding: 0; list-style: none; }
|
|
205
|
+
.deck-slide .deck-mindmap .deck-map-node { position: absolute; inline-size: max-content; max-inline-size: 11em; margin: 0; padding: 0.15em 0.35em; font-family: var(--deck-body); font-size: 0.85em; font-weight: 400; line-height: 1.2; letter-spacing: 0; text-align: center; text-wrap: balance; color: inherit; }
|
|
206
|
+
/* A chart or a diagram in a node, under its words, at a size of its own. */
|
|
207
|
+
.deck-slide .deck-mindmap .deck-map-node.has-block[data-depth] { display: flex; flex-direction: column; align-items: center; gap: 0.2em; max-inline-size: none; }
|
|
208
|
+
.deck-slide .deck-mindmap .deck-map-node .deck-block { flex: none; inline-size: 13em; block-size: 7.5em; min-block-size: 0; margin: 0; font-size: 0.85em; }
|
|
209
|
+
/* Words wrapped beyond the first branches keep to the side their line comes from. */
|
|
210
|
+
.deck-slide .deck-mindmap .deck-map-node[data-side="right"]:not([data-depth="1"]) { text-align: left; }
|
|
211
|
+
.deck-slide .deck-mindmap .deck-map-node[data-side="left"]:not([data-depth="1"]) { text-align: right; }
|
|
212
|
+
.deck-slide .deck-mindmap .deck-map-node[data-depth="0"] { max-inline-size: 9em; padding: 0.55em 1em; font-family: var(--deck-heading); font-size: 1.35em; font-weight: 700; background: var(--deck-fill); color: var(--deck-on-fill); border-radius: 1.2em; }
|
|
213
|
+
.deck-slide .deck-mindmap .deck-map-node[data-depth="0"]:empty { inline-size: 0.8em; block-size: 0.8em; padding: 0; border-radius: 50%; }
|
|
214
|
+
.deck-slide .deck-mindmap .deck-map-node[data-depth="1"] { max-inline-size: 9em; padding: 0.3em 0.8em; font-size: 1em; font-weight: 600; background: color-mix(in srgb, var(--deck-map-colour) 14%, transparent); border: 0.12em solid var(--deck-map-colour); border-radius: 1em; }
|
|
215
|
+
.deck-mindmap [data-branch="1"] { --deck-map-colour: var(--deck-series-1); }
|
|
216
|
+
.deck-mindmap [data-branch="2"] { --deck-map-colour: var(--deck-series-2); }
|
|
217
|
+
.deck-mindmap [data-branch="3"] { --deck-map-colour: var(--deck-series-3); }
|
|
218
|
+
.deck-mindmap [data-branch="4"] { --deck-map-colour: var(--deck-series-4); }
|
|
219
|
+
.deck-mindmap [data-branch="5"] { --deck-map-colour: var(--deck-series-5); }
|
|
220
|
+
.deck-mindmap [data-branch="6"] { --deck-map-colour: var(--deck-series-6); }
|
|
221
|
+
/* A branch shown a click fades in where it is: moved, its words would be placed from it. */
|
|
222
|
+
.deck-mindmap .deck-step:not(.is-on) { translate: none; }
|
|
223
|
+
/* Figures (figures.js): a slot's lists as cards, key figures, a timeline, chevrons, a programme, a pyramid or a bento;
|
|
224
|
+
its parts face to face or in a matrix; the deck's contents. In em of the slot's type, so they shrink with it. */
|
|
225
|
+
.deck-figure { flex: 1 1 auto; min-block-size: 0; display: grid; gap: 1em; align-content: center; line-break: strict; }
|
|
226
|
+
.deck-slide .deck-figure :is(p, ul, ol) { margin-block: 0 0.4em; }
|
|
227
|
+
.deck-slide .deck-figure :is(p, ul, ol):last-child { margin-block-end: 0; }
|
|
228
|
+
.deck-words { display: block; }
|
|
229
|
+
.deck-figure .deck-lead { font-family: var(--deck-heading); font-weight: 700; line-height: 1.2; }
|
|
230
|
+
.deck-figure .deck-text { line-height: 1.35; }
|
|
231
|
+
.deck-figure :is(ul, ol).deck-words { font-size: 0.85em; }
|
|
232
|
+
/* On the fill, words are on the fill's ink, their bold and links too. */
|
|
233
|
+
:is(.deck-tile.is-big, .deck-part.is-highlight, .deck-chevron, .deck-level) :is(strong, a, h3, .deck-h3) { color: inherit; }
|
|
234
|
+
:is(.deck-tile.is-big, .deck-part.is-highlight) li::marker { color: inherit; }
|
|
235
|
+
/* A chart or a diagram on the fill would lose its first colour, the fill's: what holds one is on the soft fill, ringed with it. */
|
|
236
|
+
:is(.deck-tile.is-big, .deck-part.is-highlight):has(.deck-block) { background: var(--deck-soft); color: var(--deck-ink); border: 0.15em solid var(--deck-fill); }
|
|
237
|
+
/* Steps: a row of cards, each with its number. */
|
|
238
|
+
.deck-steps { align-items: stretch; }
|
|
239
|
+
.deck-card { display: flex; flex-direction: column; gap: 0.45em; padding: 1.1em 1em; background: var(--deck-soft); border-radius: var(--deck-radius); }
|
|
240
|
+
.deck-badge { display: grid; place-items: center; text-align: center; inline-size: 1.9em; block-size: 1.9em; border-radius: 50%; background: var(--deck-fill); color: var(--deck-on-fill); font-family: var(--deck-heading); font-weight: 700; font-variant-numeric: tabular-nums; }
|
|
241
|
+
.deck-card .deck-lead { font-size: 1.05em; }
|
|
242
|
+
.deck-card .deck-text { font-size: 0.9em; }
|
|
243
|
+
/* Key figures: a row of numbers, each with what it counts, a rule between them. */
|
|
244
|
+
.deck-metrics { gap: 1em 0; text-align: center; }
|
|
245
|
+
.deck-metric { display: flex; flex-direction: column; align-items: center; gap: 0.35em; padding: 0.3em 1em; }
|
|
246
|
+
.deck-metric + .deck-metric { border-inline-start: 1px solid var(--deck-line); }
|
|
247
|
+
.deck-metric .deck-lead { font-size: 3.4em; font-weight: 800; line-height: 1; letter-spacing: -0.02em; color: var(--deck-primary); font-variant-numeric: tabular-nums; }
|
|
248
|
+
/* A timeline: its milestones along a line, each its lead over its dot and its words under it. */
|
|
249
|
+
.deck-timeline { grid-template-rows: auto auto auto; gap: 0.6em 0; justify-items: center; text-align: center; }
|
|
250
|
+
.deck-timeline-line { grid-row: 2; grid-column: 1 / -1; justify-self: stretch; align-self: center; block-size: 0.2em; margin-inline: calc(50% / var(--deck-count)); background: var(--deck-line); border-radius: 0.1em; }
|
|
251
|
+
.deck-timeline .deck-lead { align-self: end; padding-inline: 0.4em; font-size: 1.2em; color: var(--deck-primary); }
|
|
252
|
+
.deck-dot { inline-size: 1.15em; block-size: 1.15em; border-radius: 50%; background: var(--deck-fill); border: 0.22em solid var(--deck-paper); }
|
|
253
|
+
.deck-milestone { align-self: start; padding-inline: 0.4em; font-size: 0.9em; }
|
|
254
|
+
/* A process: chevrons, each holding a step's name, its words under it; they point the way the language reads. */
|
|
255
|
+
.deck-process { gap: 0.7em 0; }
|
|
256
|
+
.deck-chevron { --deck-tip: 0.9em; display: flex; align-items: center; justify-content: center; min-block-size: 3.2em; padding: 0.5em calc(var(--deck-tip) + 0.3em) 0.5em calc(var(--deck-tip) * 2); margin-inline-end: calc(0.3em - var(--deck-tip)); background: var(--deck-fill); color: var(--deck-on-fill); text-align: center;
|
|
257
|
+
clip-path: polygon(0% 0%, calc(100% - var(--deck-tip)) 0%, 100% 50%, calc(100% - var(--deck-tip)) 100%, 0% 100%, var(--deck-tip) 50%); }
|
|
258
|
+
.deck-chevron[data-first] { padding-inline-start: 0.9em; clip-path: polygon(0% 0%, calc(100% - var(--deck-tip)) 0%, 100% 50%, calc(100% - var(--deck-tip)) 100%, 0% 100%); }
|
|
259
|
+
.deck-chevron[data-last] { margin-inline-end: 0; }
|
|
260
|
+
.deck[dir="rtl"] .deck-chevron { clip-path: polygon(100% 0%, var(--deck-tip) 0%, 0% 50%, var(--deck-tip) 100%, 100% 100%, calc(100% - var(--deck-tip)) 50%); }
|
|
261
|
+
.deck[dir="rtl"] .deck-chevron[data-first] { clip-path: polygon(100% 0%, var(--deck-tip) 0%, 0% 50%, var(--deck-tip) 100%, 100% 100%); }
|
|
262
|
+
.deck-under { align-self: start; padding-inline: 0.6em; font-size: 0.9em; text-align: center; }
|
|
263
|
+
/* A programme, and the deck's contents: rows of a time (or a number) and its words, in two columns from seven. */
|
|
264
|
+
.deck-agenda { gap: 0 3em; }
|
|
265
|
+
.deck-agenda-col { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 1.2em; align-content: start; }
|
|
266
|
+
.deck-row { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: baseline; padding-block: 0.55em; border-block-end: 1px solid var(--deck-line); }
|
|
267
|
+
.deck-row > :not(.deck-lead) { grid-column: 2; }
|
|
268
|
+
.deck-row .deck-lead { color: var(--deck-primary); white-space: nowrap; font-variant-numeric: tabular-nums; }
|
|
269
|
+
.deck-contents { font-size: 1.1em; }
|
|
270
|
+
.deck-contents .deck-row { cursor: pointer; }
|
|
271
|
+
.deck-contents .deck-row:focus-visible { outline: 0.12em solid var(--deck-primary); outline-offset: 0.1em; }
|
|
272
|
+
.deck-contents .deck-row .deck-text { font-family: var(--deck-heading); font-weight: 600; }
|
|
273
|
+
.deck-contents .deck-row.is-sub { padding-block: 0.3em; border-block-end-style: dotted; font-size: 0.85em; }
|
|
274
|
+
.deck-contents .deck-row.is-sub .deck-text { font-family: var(--deck-body); font-weight: 400; }
|
|
275
|
+
/* A pyramid: its levels stacked, the first the narrowest, on top; what each says beside it. */
|
|
276
|
+
.deck-pyramid { gap: 0.3em 2em; justify-content: center; }
|
|
277
|
+
.deck-level { display: flex; align-items: center; justify-content: center; min-block-size: 2.6em; padding-block: 0.45em; background: var(--deck-fill); color: var(--deck-on-fill); text-align: center; }
|
|
278
|
+
.deck-level .deck-words { font-family: var(--deck-heading); font-weight: 700; }
|
|
279
|
+
.deck-beside { align-self: center; font-size: 0.9em; }
|
|
280
|
+
/* A bento: the first tile big, the others around it. */
|
|
281
|
+
.deck-bento { align-content: stretch; gap: 0.9em; grid-template-columns: 1.4fr repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; }
|
|
282
|
+
.deck-tile { display: flex; flex-direction: column; justify-content: safe flex-end; gap: 0.35em; padding: 1em 1.1em; background: var(--deck-soft); border-radius: var(--deck-radius); }
|
|
283
|
+
.deck-tile.is-big { grid-row: span 2; background: var(--deck-fill); color: var(--deck-on-fill); }
|
|
284
|
+
.deck-tile .deck-lead { font-size: 1.15em; }
|
|
285
|
+
.deck-tile.is-big .deck-lead { font-size: 1.9em; }
|
|
286
|
+
.deck-tile .deck-block { min-block-size: 6cqi; }
|
|
287
|
+
.deck-bento[data-count="1"] { grid-template-columns: 1fr; }
|
|
288
|
+
.deck-bento[data-count="2"] { grid-template-columns: 1.3fr 1fr; }
|
|
289
|
+
.deck-bento[data-count="2"] .deck-tile.is-big { grid-row: auto; }
|
|
290
|
+
.deck-bento[data-count="3"] { grid-template-columns: 1.3fr 1fr; }
|
|
291
|
+
.deck-bento[data-count="4"] .deck-tile:nth-child(2) { grid-column: span 2; }
|
|
292
|
+
/* Parts face to face, a medallion between them, the last on the fill; or four in a matrix, the second, top at the end, on the fill. */
|
|
293
|
+
.deck-versus, .deck-matrix { align-content: stretch; }
|
|
294
|
+
.deck-versus { column-gap: 0; grid-auto-rows: 1fr; }
|
|
295
|
+
.deck-matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 0.8em; }
|
|
296
|
+
.deck-part { display: flex; flex-direction: column; padding: 1.1em 1.4em; background: var(--deck-soft); border-radius: var(--deck-radius); }
|
|
297
|
+
.deck-part.is-highlight { background: var(--deck-fill); color: var(--deck-on-fill); }
|
|
298
|
+
.deck-slide .deck-part :is(h1, h2, h3, h4, .deck-h) { font-size: 1.35em; color: inherit; margin-block-end: 0.45em; }
|
|
299
|
+
.deck-vs { position: relative; z-index: 1; align-self: center; display: grid; place-items: center; text-align: center; inline-size: 3.2em; block-size: 3.2em; margin-inline: -1em; border-radius: 50%; background: var(--deck-ink); color: var(--deck-paper); border: 0.25em solid var(--deck-paper); font-family: var(--deck-heading); font-weight: 800; font-size: 0.9em; letter-spacing: 0.02em; }
|
|
181
300
|
/* Scripts without italics keep their upright letters. */
|
|
182
301
|
.deck :is(blockquote, em):is(:lang(ar), :lang(fa), :lang(ur), :lang(he), :lang(ja), :lang(zh), :lang(ko), :lang(hi), :lang(th)) { font-style: normal; }
|
|
183
302
|
.deck-layout-quote blockquote::before { content: "\\201C"; display: block; font-size: 2.4em; line-height: 0.6; color: var(--deck-primary); }
|
|
@@ -189,6 +308,11 @@ ${l}
|
|
|
189
308
|
:is(.deck-layout-image-left, .deck-layout-image-right).has-image .deck-slot { padding: 6cqi 5cqi; justify-content: center; }
|
|
190
309
|
:is(.deck-layout-image, .deck-layout-cover).has-image .deck-image { position: absolute; inset: 0; }
|
|
191
310
|
:is(.deck-layout-image, .deck-layout-cover).has-image .deck-slot { position: relative; color: #fff; text-shadow: 0 0.05em 0.4em rgb(0 0 0 / 0.6); }
|
|
311
|
+
/* A quote over its picture, the whole slide, behind a veil. */
|
|
312
|
+
.deck-layout-quote.has-image .deck-image { position: absolute; inset: 0; }
|
|
313
|
+
.deck-layout-quote.has-image .deck-image::after { content: ""; position: absolute; inset: 0; background-color: rgb(0 0 0 / 0.55); }
|
|
314
|
+
.deck-layout-quote.has-image .deck-slot { position: relative; color: #fff; text-shadow: 0 0.05em 0.4em rgb(0 0 0 / 0.5); }
|
|
315
|
+
.deck-layout-quote.has-image blockquote::before { color: inherit; }
|
|
192
316
|
.deck-layout-cover.has-image .deck-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 0 0 / 0.65), rgb(0 0 0 / 0.1)); }
|
|
193
317
|
.deck-class-invert { background: var(--deck-ink); color: var(--deck-paper); }
|
|
194
318
|
.deck-class-text-center .deck-slot { text-align: center; align-items: center; }
|
|
@@ -275,11 +399,11 @@ html[data-deck-transition~="morph"]::view-transition-group(*) { animation-durati
|
|
|
275
399
|
.deck-slide, .deck-slide:not(.is-shown) { position: relative; visibility: visible; break-after: page; border-radius: 0; box-shadow: none; inline-size: 100vw; }
|
|
276
400
|
.deck-step:not(.is-on) { opacity: 1; visibility: visible; translate: none; }
|
|
277
401
|
}
|
|
278
|
-
`;var
|
|
402
|
+
`;var Ke=document.currentScript,En=Ke?.dataset.base??"https://cdn.jsdelivr.net/npm/",wi=`html, body { margin: 0; } body { min-block-size: 100vh; }
|
|
279
403
|
body > .deck { min-block-size: 100vh; padding: clamp(0.5rem, 3vw, 2rem); align-content: center; justify-items: center; background: color-mix(in srgb, var(--deck-ink) 7%, var(--deck-paper)); }
|
|
280
404
|
body > .deck > .deck-stage, body > .deck > .deck-bar { inline-size: min(100%, (100vh - 7rem) * 16 / 9); }
|
|
281
405
|
body > .deck.is-editing { justify-items: stretch; align-content: start; }
|
|
282
406
|
body > .deck.is-editing > .deck-stage, body > .deck.is-editing > .deck-bar, body > .deck.is-presenting > .deck-stage, body > .deck.is-presenting > .deck-bar, body > .deck.is-overview > .deck-stage { inline-size: auto; }
|
|
283
|
-
body > .deck:is(.is-presenting, .is-overview) { justify-items: stretch; align-content: start; }`;function
|
|
284
|
-
${
|
|
407
|
+
body > .deck:is(.is-presenting, .is-overview) { justify-items: stretch; align-content: start; }`;function Cn(){let e=document.getElementById("deck");if(!e)return;let t=wt(e.textContent??"").replace(/^\n/,"").replace(/\n$/,""),n=new CSSStyleSheet;n.replaceSync(`${zn}
|
|
408
|
+
${wi}`),document.adoptedStyleSheets=[...document.adoptedStyleSheets,n],e.style.display="none";let i=document.createElement("main");document.body.append(i);let s=wn({base:En,root:i}),r=null,o=bn(i,{source:t,blocks:s,lang:document.documentElement.lang||void 0,async onSave(d){let l=o.deck.settings,p=vt(d,{title:String(l.title??o.deck.slides[0]?.title??document.title),lang:o.lang,dir:o.dir,renderer:Ke?.src?{src:Ke.src}:{code:Ke?.textContent??""},generator:document.querySelector("meta[name=generator]")?.getAttribute("content")??"deck"}),m=decodeURIComponent(location.pathname.split("/").pop()||"slides.deck.html"),f=window.showSaveFilePicker;if(f)try{r??=await f({suggestedName:m,types:[{description:"Deck",accept:{"text/html":[".deck.html",".html"]}}]});let u=await r.createWritable();await u.write(p),await u.close();return}catch(u){if(u.name==="AbortError")return}Rn(new Blob([p],{type:"text/html"}),m)},async onExport(d){let{PptxGenJS:l,JSZip:p}=await Tn(),{blob:m}=await $t(d,{PptxGenJS:l,JSZip:p});Rn(m,`${String(d.deck.settings.title??d.deck.slides[0]?.title??"slides").replace(/[\\/:*?"<>|]+/g," ").trim()||"slides"}.pptx`)}}),a=o.deck.settings.title??o.deck.slides[0]?.title;a&&(document.title=String(a)),i.querySelector(".deck-stage")?.focus({preventScroll:!0}),Object.assign(window,{deckView:o,deckTools:{toPptx:$t,libraries:Tn,readDeckFile:vn,writeDeckFile:vt}})}async function Tn(){return window.PptxGenJS||await new Promise((e,t)=>{let n=document.createElement("script");n.src=Qe(En,"pptxgenjs","4.0.1","dist/pptxgen.bundle.js"),n.onload=e,n.onerror=t,document.head.append(n)}),{PptxGenJS:window.PptxGenJS,JSZip:window.JSZip}}function Rn(e,t){let n=Object.assign(document.createElement("a"),{href:URL.createObjectURL(e),download:t});document.body.append(n),n.click(),n.remove(),setTimeout(()=>URL.revokeObjectURL(n.href),1e4)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Cn):Cn();})();
|
|
285
409
|
//# sourceMappingURL=deck.js.map
|