rikiki-deck 0.4.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- var Ut=Object.defineProperty;var Wr=Object.getOwnPropertyDescriptor;var Pe=(o,t)=>()=>(o&&(t=o(o=0)),t);var De=(o,t)=>{for(var e in t)Ut(o,e,{get:t[e],enumerable:!0})};var c=(o,t,e,r)=>{for(var i=r>1?void 0:r?Wr(t,e):t,s=o.length-1,n;s>=0;s--)(n=o[s])&&(i=(r?n(t,e,i):n(i))||i);return r&&i&&Ut(t,e,i),i};var Et={};De(Et,{closeHelp:()=>or,toggleHelp:()=>li});function ai(o){let t=o.querySelector("#kb-overlay");if(t)return t;if(!o.querySelector(`style[${nr}]`)){let i=document.createElement("style");i.setAttribute(nr,"1"),i.textContent=ni,o.appendChild(i)}let e=document.createElement("div");return e.innerHTML=oi,t=e.firstElementChild,o.appendChild(t),t.addEventListener("click",()=>or(o.host)),t.querySelector(".kb-card")?.addEventListener("click",i=>i.stopPropagation()),t}function li(o){if(!o.shadowRoot)return;ai(o.shadowRoot).classList.toggle("open")}function or(o){o.shadowRoot?.querySelector("#kb-overlay")?.classList.remove("open")}var nr,ni,oi,ot=Pe(()=>{"use strict";nr="data-deck-help",ni=`
1
+ var Xt=Object.defineProperty;var Jr=Object.getOwnPropertyDescriptor;var Ie=(s,t)=>()=>(s&&(t=s(s=0)),t);var tt=(s,t)=>{for(var e in t)Xt(s,e,{get:t[e],enumerable:!0})};var c=(s,t,e,r)=>{for(var i=r>1?void 0:r?Jr(t,e):t,n=s.length-1,o;n>=0;n--)(o=s[n])&&(i=(r?o(t,e,i):o(i))||i);return r&&i&&Xt(t,e,i),i};var At={};tt(At,{closeHelp:()=>pr,toggleHelp:()=>vi});function gi(s){let t=s.querySelector("#kb-overlay");if(t)return t;if(!s.querySelector(`style[${dr}]`)){let i=document.createElement("style");i.setAttribute(dr,"1"),i.textContent=fi,s.appendChild(i)}let e=document.createElement("div");return e.innerHTML=mi,t=e.firstElementChild,s.appendChild(t),t.addEventListener("click",()=>pr(s.host)),t.querySelector(".kb-card")?.addEventListener("click",i=>i.stopPropagation()),t}function vi(s){if(!s.shadowRoot)return;gi(s.shadowRoot).classList.toggle("open")}function pr(s){s.shadowRoot?.querySelector("#kb-overlay")?.classList.remove("open")}var dr,fi,mi,lt=Ie(()=>{"use strict";dr="data-deck-help",fi=`
2
2
  #kb-overlay {
3
3
  position: fixed; inset: 0;
4
4
  background: rgba(10,10,10,0.7);
@@ -61,7 +61,7 @@ var Ut=Object.defineProperty;var Wr=Object.getOwnPropertyDescriptor;var Pe=(o,t)
61
61
  box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset;
62
62
  }
63
63
  .kb-row .desc { color: var(--rik-text-default--muted); }
64
- `,oi=`
64
+ `,mi=`
65
65
  <div id="kb-overlay">
66
66
  <div class="kb-card">
67
67
  <div class="kb-card-header">
@@ -82,13 +82,13 @@ var Ut=Object.defineProperty;var Wr=Object.getOwnPropertyDescriptor;var Pe=(o,t)
82
82
  <div class="kb-row"><span class="desc">Navigate</span><span class="keys"><kbd>Wheel</kbd><kbd>Back/Fwd buttons</kbd></span></div>
83
83
  </div>
84
84
  </div>
85
- `});var dr={};De(dr,{installPresenter:()=>pi});function cr(o){let t=Array.from(o.children).filter(u=>u.tagName.toLowerCase().startsWith("deck-")),e=t.findIndex(u=>u.hasAttribute("active")),r=t[e]??null,i=t[e+1]??null,n=(r?.querySelector("deck-notes")?.textContent??"").trim(),l=document.querySelector('link[rel="stylesheet"][href*="rikiki"], link[rel="stylesheet"][href*="tokens"], link[rel="stylesheet"][href*="theme"]')?.href??"",h=Array.from(document.querySelectorAll("style")).map(u=>u.textContent??"").join(`
86
- `),p=document.querySelector('script[type="module"][data-rikiki-bundle]')?.textContent??"";return{current:e+1,total:t.length,slideHtml:r?.outerHTML??"",nextHtml:i?.outerHTML??null,notes:n,themeHref:l,inlineStyles:h,bundleHref:ci,bundleInline:p}}function ar(o){at&&at.postMessage({type:"state",state:cr(o)})}function pi(o){if(ye=ye??new WeakSet,ye.has(o)){W?.close(),W=null;return}ye.add(o),at=new BroadcastChannel(lr),o.addEventListener("slide-change",()=>ar(o)),at.addEventListener("message",r=>{let i=r.data;i?.type==="key"&&i.key&&window.dispatchEvent(new KeyboardEvent("keydown",{key:i.key,shiftKey:!!i.shift,bubbles:!0})),i?.type==="hello"&&ar(o)});let t=cr(o);if(W=window.open("","rikiki-presenter","width=1280,height=800,popup=yes"),!W){console.warn("[rikiki/presenter] popup was blocked \xB7 allow popups for this site"),ye.delete(o);return}W.document.open(),W.document.write(di(t)),W.document.close();let e=setInterval(()=>{W&&W.closed&&(clearInterval(e),ye?.delete(o),W=null)},1e3)}var lr,ci,W,at,ye,di,St=Pe(()=>{"use strict";lr="rik-presenter",ci=new URL("./index.js",import.meta.url).href,W=null,at=null,ye=null;di=o=>`<!doctype html>
85
+ `});var br={};tt(br,{installPresenter:()=>Ai});async function bi(){if(We)return We;let s=window.getScreenDetails;if(!s)return null;try{return We=await s.call(window),We}catch{return null}}function gr(s){return{left:Math.round(s.availLeft+(s.availWidth-dt)/2),top:Math.round(s.availTop+(s.availHeight-pt)/2)}}function yi(s){let{left:t,top:e}=gr(s);return`popup=yes,width=${dt},height=${pt},left=${t},top=${e}`}function xi(s,t){let{left:e,top:r}=gr(t);s.resizeTo(dt,pt),s.moveTo(e,r)}function hr(s,t){s.requestFullscreen?.({screen:t}).then(()=>{if(!ye?.has(s)){document.exitFullscreen?.().catch(()=>{});return}ct=!0}).catch(()=>{})}function vr(){document.fullscreenElement||(ct=!1)}function wi(){document.removeEventListener("fullscreenchange",vr),ct&&document.fullscreenElement&&document.exitFullscreen?.().catch(()=>{}),ct=!1}function Lt(s){W?.close(),W=null,xe?.close(),xe=null,ye?.delete(s),s.presenterActive=!1,wi()}function kr(s){let t=Array.from(s.children).filter(h=>h.tagName.toLowerCase().startsWith("deck-")),e=t.findIndex(h=>h.hasAttribute("active")),r=t[e]??null,i=t[e+1]??null,o=(r?.querySelector("deck-notes")?.textContent??"").trim(),l=document.querySelector('link[rel="stylesheet"][href*="rikiki"], link[rel="stylesheet"][href*="tokens"], link[rel="stylesheet"][href*="theme"]')?.href??"",u=Array.from(document.querySelectorAll("style")).map(h=>h.textContent??"").join(`
86
+ `),p=document.querySelector('script[type="module"][data-rikiki-bundle]')?.textContent??"";return{current:e+1,total:t.length,slideHtml:r?.outerHTML??"",nextHtml:i?.outerHTML??null,notes:o,themeHref:l,inlineStyles:u,bundleHref:ki,bundleInline:p}}function ur(s){xe&&xe.postMessage({type:"state",state:kr(s)})}function Ei(s,t){let e=document.elementFromPoint(s,t);for(;e?.shadowRoot;){let r=e.shadowRoot.elementFromPoint(s,t);if(!r||r===e)break;e=r}return e}function $i(s,t,e){for(let r=s;r;r=r.parentElement){let i=getComputedStyle(r);if(e!==0&&r.scrollHeight>r.clientHeight&&/auto|scroll/.test(i.overflowY)||t!==0&&r.scrollWidth>r.clientWidth&&/auto|scroll/.test(i.overflowX))return r}return null}function Si(s,t,e){let r=s.getBoundingClientRect();return{x:r.left+t*r.width,y:r.top+e*r.height}}function fr(s,t){let{x:e,y:r}=Si(s,t.x??.5,t.y??.5);return{x:e,y:r,target:Ei(e,r)??s}}function Ti(s){let t=(s??"all").trim();return t==="none"?"none":t===""||t==="all"?"wheel arrows aux":t.split(/\s+/).filter(e=>e!=="click").join(" ")||"none"}function Ai(s){if(ye=ye??new WeakSet,ye.has(s)){Lt(s);return}ye.add(s);let t=s.mouseNav;xe=new BroadcastChannel(mr),s.addEventListener("slide-change",()=>ur(s)),xe.addEventListener("message",a=>{let l=a.data;if(l?.type==="key"&&l.key)window.dispatchEvent(new KeyboardEvent("keydown",{key:l.key,shiftKey:!!l.shift,bubbles:!0}));else if(l?.type==="click"){let{x:u,y:p,target:h}=fr(s,l),f={bubbles:!0,composed:!0,cancelable:!0,clientX:u,clientY:p,view:window,shiftKey:!!l.shift};h.dispatchEvent(new PointerEvent("pointerdown",{...f,pointerId:1,isPrimary:!0})),h.dispatchEvent(new PointerEvent("pointerup",{...f,pointerId:1,isPrimary:!0})),h.dispatchEvent(new MouseEvent("click",f))}else if(l?.type==="wheel"){let{x:u,y:p,target:h}=fr(s,l),f=l.dx??0,b=l.dy??0,$=$i(h,f,b);$?$.scrollBy({left:f,top:b}):h.dispatchEvent(new WheelEvent("wheel",{bubbles:!0,composed:!0,cancelable:!0,clientX:u,clientY:p,deltaX:f,deltaY:b,view:window}))}else l?.type==="config"&&typeof l.advanceOnClick=="boolean"?s.mouseNav=l.advanceOnClick?t:Ti(t):l?.type==="hello"&&ur(s)});let e=We,r=e?.screens.find(a=>a!==e.currentScreen)??null;r?hr(s,r):bi().then(a=>{if(!a)return;let l=a.screens.find(u=>u!==a.currentScreen);l&&hr(s,l),W&&a.currentScreen&&xi(W,a.currentScreen)});let i=kr(s),n=e?.currentScreen?yi(e.currentScreen):`popup=yes,width=${dt},height=${pt}`;if(W=window.open("","rikiki-presenter",n),!W){console.warn("[rikiki/presenter] popup was blocked \xB7 allow popups for this site"),Lt(s);return}W.document.open(),W.document.write(_i(i)),W.document.close(),s.presenterActive=!0,document.addEventListener("fullscreenchange",vr);let o=setInterval(()=>{W?.closed&&(clearInterval(o),Lt(s))},1e3)}var mr,ki,W,xe,ye,We,ct,dt,pt,_i,zt=Ie(()=>{"use strict";mr="rik-presenter",ki=new URL("./index.js",import.meta.url).href,W=null,xe=null,ye=null,We=null,ct=!1;dt=1280,pt=720;_i=s=>`<!doctype html>
87
87
  <html lang="en">
88
88
  <head>
89
89
  <meta charset="utf-8">
90
90
  <title>Rikiki \xB7 presenter</title>
91
- ${o.themeHref?`<link rel="stylesheet" href="${o.themeHref}">`:""}
91
+ ${s.themeHref?`<link rel="stylesheet" href="${s.themeHref}">`:""}
92
92
  <style>
93
93
  html, body { margin: 0; padding: 0; height: 100%; background: #0f1422; color: #fafafa; font-family: var(--rik-font-sans, system-ui); }
94
94
  .grid {
@@ -120,7 +120,17 @@ ${o.themeHref?`<link rel="stylesheet" href="${o.themeHref}">`:""}
120
120
  background: #161c2e;
121
121
  }
122
122
  .panel .body { flex: 1; min-height: 0; padding: 16px; overflow: hidden; border-radius: 8px; }
123
- .panel iframe { width: 100%; height: 100%; border: 0; background: #0f1422; display: block; }
123
+ /* Preview panes center a 16:9 box so the thumbnail matches the projection
124
+ geometry regardless of the pane/window shape (issue #5) \xB7 the size
125
+ container lets the iframe size against the pane in cq units. */
126
+ #current .body, #next .body { display: grid; place-items: center; container-type: size; }
127
+ .panel iframe { border: 0; background: #0f1422; display: block; }
128
+ #current-frame, #next-frame {
129
+ aspect-ratio: 16 / 9;
130
+ width: min(100cqw, calc(100cqh * 16 / 9));
131
+ height: auto;
132
+ max-width: 100%;
133
+ }
124
134
  #notes { font-size: 17px; line-height: 1.6; white-space: pre-wrap; padding: 20px; overflow: auto; color: #e8e4f0; }
125
135
  #notes:empty::before { content: 'No notes for this slide.'; color: rgba(232,228,240,0.4); font-style: italic; }
126
136
  #footer {
@@ -144,6 +154,8 @@ ${o.themeHref?`<link rel="stylesheet" href="${o.themeHref}">`:""}
144
154
  }
145
155
  button:hover { background: rgba(255,255,255,0.06); }
146
156
  .ghost { color: rgba(232,228,240,0.4); }
157
+ .opt { display: inline-flex; align-items: center; gap: 6px; font: 600 13px/1 var(--rik-font-mono, monospace); color: rgba(232,228,240,0.7); cursor: pointer; user-select: none; }
158
+ .opt input { accent-color: var(--rik-accent, #8fd14f); cursor: pointer; }
147
159
  </style>
148
160
  </head>
149
161
  <body>
@@ -162,12 +174,15 @@ ${o.themeHref?`<link rel="stylesheet" href="${o.themeHref}">`:""}
162
174
  </section>
163
175
  <div id="footer">
164
176
  <div><span id="timer">00:00</span> <button id="timer-toggle">Pause</button> <button id="timer-reset">Reset</button></div>
165
- <div id="counter">${o.current} / ${o.total}</div>
166
- <div><span class="ghost">P to close</span></div>
177
+ <div id="counter">${s.current} / ${s.total}</div>
178
+ <div>
179
+ <label class="opt"><input type="checkbox" id="opt-advance" checked> Advance on click</label>
180
+ <span class="ghost">\xB7 P to close</span>
181
+ </div>
167
182
  </div>
168
183
  </div>
169
184
  <script>
170
- const channel = new BroadcastChannel('${lr}');
185
+ const channel = new BroadcastChannel('${mr}');
171
186
  const current = document.getElementById('current-frame');
172
187
  const next = document.getElementById('next-frame');
173
188
  const notes = document.getElementById('notes');
@@ -197,11 +212,16 @@ ${o.themeHref?`<link rel="stylesheet" href="${o.themeHref}">`:""}
197
212
  };
198
213
  resetBtn.onclick = () => { startedAt = Date.now(); elapsed = 0; running = true; toggleBtn.textContent = 'Pause'; };
199
214
 
200
- function wrapFrame(slideHtml) {
201
- const themeHref = ${JSON.stringify(o.themeHref)};
202
- const inlineStyles = ${JSON.stringify(o.inlineStyles)};
203
- const bundleHref = ${JSON.stringify(o.bundleHref)};
204
- const bundleInline = ${JSON.stringify(o.bundleInline)};
215
+ // Presentation options \xB7 push each change to the live deck over the channel.
216
+ document.getElementById('opt-advance').addEventListener('change', (e) => {
217
+ channel.postMessage({ type: 'config', advanceOnClick: e.target.checked });
218
+ });
219
+
220
+ function wrapFrame(slideHtml, forward) {
221
+ const themeHref = ${JSON.stringify(s.themeHref)};
222
+ const inlineStyles = ${JSON.stringify(s.inlineStyles)};
223
+ const bundleHref = ${JSON.stringify(s.bundleHref)};
224
+ const bundleInline = ${JSON.stringify(s.bundleInline)};
205
225
  const themeLink = themeHref ? '<link rel="stylesheet" href="' + themeHref + '">' : '';
206
226
  const themeStyle = inlineStyles ? '<style>' + inlineStyles + '</style>' : '';
207
227
  // Bootstrap rikiki inside the iframe so its <deck-*> elements upgrade.
@@ -227,14 +247,25 @@ ${o.themeHref?`<link rel="stylesheet" href="${o.themeHref}">`:""}
227
247
  // Mark the cloned slide [active] so its real component CSS applies
228
248
  // (:host([active]){display:flex}) instead of forcing display via !important.
229
249
  const activeSlide = slideHtml.replace(/^(\\s*<deck-[a-z-]+)/i, '$1 active');
230
- // Render the preview in fixed-viewport mode so the slide keeps its 16:9
231
- // proportions (letterboxed) regardless of the pane's shape, and drop the
232
- // hint / nav-arrow chrome \xB7 a clean, correctly-shaped thumbnail.
250
+ // Only the "Current" pane is a control surface \xB7 it captures key/click/wheel
251
+ // and posts them to this popup window, which relays them onto the channel so
252
+ // the live deck acts on them. Coords are normalised 0..1 over the iframe.
253
+ const forwarder = forward
254
+ ? '<scr' + 'ipt>(function(){' +
255
+ 'var post=function(o){o.source="rikiki-presenter-input";parent.postMessage(o,"*");};' +
256
+ 'addEventListener("keydown",function(e){var t=e.target;if(t&&t.matches&&t.matches("input,textarea,button"))return;post({type:"key",key:e.key,shift:!!e.shiftKey});});' +
257
+ 'addEventListener("click",function(e){post({type:"click",x:e.clientX/innerWidth,y:e.clientY/innerHeight,shift:!!e.shiftKey});});' +
258
+ 'addEventListener("wheel",function(e){if(e.ctrlKey||e.metaKey)return;post({type:"wheel",x:e.clientX/innerWidth,y:e.clientY/innerHeight,dx:e.deltaX,dy:e.deltaY});},{passive:true});' +
259
+ '})();<' + '/scr' + 'ipt>'
260
+ : '';
261
+ // The deck always letterboxes into its logical canvas, so the slide keeps
262
+ // its 16:9 proportions regardless of the pane's shape \xB7 just drop the
263
+ // hint / nav-arrow chrome for a clean, correctly-shaped thumbnail.
233
264
  return '<!doctype html><html><head><meta charset="UTF-8">' + themeLink + themeStyle +
234
265
  bundleTag +
235
266
  '<style>html,body{margin:0;padding:0;height:100%;overflow:hidden;background:#0f1422}' +
236
267
  'deck-root{position:absolute;inset:0}</style>' +
237
- '</head><body><deck-root fixed no-hint no-arrows>' + activeSlide + '</deck-root></body></html>';
268
+ '</head><body><deck-root no-hint no-arrows no-counter preview>' + activeSlide + '</deck-root>' + forwarder + '</body></html>';
238
269
  }
239
270
 
240
271
  channel.onmessage = (e) => {
@@ -242,13 +273,13 @@ ${o.themeHref?`<link rel="stylesheet" href="${o.themeHref}">`:""}
242
273
  const s = e.data.state;
243
274
  counter.textContent = s.current + ' / ' + s.total;
244
275
  notes.textContent = s.notes;
245
- if (s.slideHtml) current.srcdoc = wrapFrame(s.slideHtml);
246
- if (s.nextHtml) next.srcdoc = wrapFrame(s.nextHtml);
276
+ if (s.slideHtml) current.srcdoc = wrapFrame(s.slideHtml, true);
277
+ if (s.nextHtml) next.srcdoc = wrapFrame(s.nextHtml, false);
247
278
  else next.srcdoc = '<!doctype html><html><body style="background:#0f1422;color:rgba(232,228,240,0.4);display:flex;align-items:center;justify-content:center;font-family:system-ui">End of deck</body></html>';
248
279
  };
249
280
 
250
281
  // Initial paint from the seed state
251
- const seed = ${JSON.stringify(o)};
282
+ const seed = ${JSON.stringify(s)};
252
283
  channel.postMessage({ type: 'state', state: seed });
253
284
 
254
285
  // Forward keys back to the main window (so the speaker can drive nav from the laptop)
@@ -257,11 +288,20 @@ ${o.themeHref?`<link rel="stylesheet" href="${o.themeHref}">`:""}
257
288
  channel.postMessage({ type: 'key', key: e.key, shift: e.shiftKey });
258
289
  });
259
290
 
291
+ // Relay input captured inside the "Current" preview iframe (key/click/wheel)
292
+ // onto the channel \xB7 the iframe is a separate browsing context so its events
293
+ // never reach this window directly \xB7 it postMessages them here instead.
294
+ window.addEventListener('message', (e) => {
295
+ const d = e.data;
296
+ if (!d || d.source !== 'rikiki-presenter-input') return;
297
+ channel.postMessage({ type: d.type, key: d.key, shift: d.shift, x: d.x, y: d.y, dx: d.dx, dy: d.dy });
298
+ });
299
+
260
300
  // Tell main window we're alive
261
301
  channel.postMessage({ type: 'hello' });
262
302
  <\/script>
263
303
  </body>
264
- </html>`});var fr={};De(fr,{mountOverview:()=>_i});function ui(o){if(o.querySelector(`style[${pr}]`))return;let t=document.createElement("style");t.setAttribute(pr,"1"),t.textContent=hi,o.appendChild(t)}function fi(o,t){if(o.querySelector(`link[${hr}]`))return;let e=document.createElement("link");e.rel="stylesheet",e.setAttribute(hr,"1"),e.href=new URL("../tokens.css",t).href,o.appendChild(e)}function ur(o){let e=o.slides[0]?.querySelector("h1");return e?Array.from(e.childNodes).map(r=>r.nodeName==="BR"?" ":r.textContent??"").join("").replace(/\s+/g," ").trim()||`Slide ${o.startIdx+1}`:`Slide ${o.startIdx+1}`}function mi(o){return(o.textContent||"").replace(/\s+/g," ").trim().slice(0,400).toLowerCase()}function vi(o,t){let e=new Map;if(o.querySelectorAll("[id]").forEach(s=>{e.set(s.id,s.id+t),s.id=s.id+t}),e.size===0)return;let r=s=>s.replace(/url\(['"]?#([^'")]+)['"]?\)/g,(n,a)=>e.has(a)?`url(#${e.get(a)})`:n);o.querySelectorAll("*").forEach(s=>{for(let n of gi){let a=s.getAttribute(n);a&&a.includes("url(")&&s.setAttribute(n,r(a))}for(let n of["href","xlink:href"]){let a=s.getAttribute(n);a&&a.startsWith("#")&&e.has(a.slice(1))&&s.setAttribute(n,"#"+e.get(a.slice(1)))}});let i=o.querySelectorAll("style");if(i.length){let s=n=>n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");i.forEach(n=>{let a=n.textContent??"";e.forEach((l,h)=>{a=a.replace(new RegExp("#"+s(h)+"(?![\\w-])","g"),"#"+l)}),n.textContent=a})}}function ki(o,t){let e=o.querySelectorAll("svg");t.querySelectorAll("svg").forEach((r,i)=>{let s=e[i]?.getBoundingClientRect();if(s&&s.width>0)r.setAttribute("width",String(Math.round(s.width))),r.setAttribute("height",String(Math.round(s.height))),r.style.maxWidth="100%";else if(r.hasAttribute("viewBox")&&!r.hasAttribute("width")){let n=(r.getAttribute("viewBox")??"").split(/[\s,]+/).map(Number);n.length===4&&n[2]>0&&(r.setAttribute("width",String(n[2])),r.setAttribute("height",String(n[3])),r.style.maxWidth="100%",r.style.height="auto")}})}function bi(o,t){let e=o.querySelectorAll("deck-mermaid");t.querySelectorAll("deck-mermaid").forEach((r,i)=>{let s=e[i],n=document.createElement("div");n.className="ov-mermaid-snap",n.innerHTML=s?.renderedSvg??"";let a=s?.getBoundingClientRect();a&&a.width>0&&(n.style.width=a.width+"px",n.style.height=a.height+"px"),r.replaceWith(n)})}function yi(o){o.querySelectorAll("[data-click], [data-click-auto], [data-click-children], [data-click-stagger] > *").forEach(t=>{t.style.opacity="",t.style.transform="",t.style.filter="",t.style.pointerEvents="",t.querySelectorAll("path, line, polyline, polygon, circle, ellipse, rect").forEach(e=>{e.style.strokeDashoffset=""})})}function xi(o,t){let e=o.cloneNode(!0);return e.setAttribute("active",""),yi(e),ki(o,e),bi(o,e),vi(e,`-ov${t}`),e}async function wi(o,t){let e=Array.from(t.querySelectorAll("deck-mermaid")).map(i=>i.whenRendered).filter(i=>!!i);e.length&&await Promise.all(e).catch(()=>{});let r=document.createElement("div");r.className="ov-thumb",r.appendChild(xi(t,Number(o.dataset.idx))),o.insertBefore(r,o.firstChild),o.dataset.loaded="1",delete o.dataset.building}function _i(o,t){let e=o.shadowRoot;if(!e)return()=>{};ui(e),fi(e,import.meta.url);let r=e.querySelector("#overview-grid");r||(r=document.createElement("div"),r.id="overview-grid",e.appendChild(r)),r.innerHTML="";let i=t.slides.length,s=i>60,n=i>300?140:i>150?160:i>60?180:220;r.style.setProperty("--ov-cell-min",n+"px");let a=o.hasAttribute("fixed"),l=a?e.querySelector("#stage"):null,h=l?.clientWidth||window.innerWidth,p=l?.clientHeight||window.innerHeight;a&&(r.dataset.fixed="1"),r.style.setProperty("--ov-thumb-w",`${h}px`),r.style.setProperty("--ov-thumb-h",`${p}px`),requestAnimationFrame(()=>{let _=r.querySelector(".ov-cell")?.clientWidth??n;r.style.setProperty("--overview-scale",String(_/h))});let u=document.createElement("div");u.className="ov-bar";let m=document.createElement("input");m.className="ov-search",m.type="search",m.placeholder=`Search ${i} slides \xB7 type to filter`,m.spellcheck=!1,u.appendChild(m);let b=document.createElement("span");b.className="ov-count",b.textContent=`${i} slides \xB7 ${t.chapters.length} chapters`,u.appendChild(b);let E=document.createElement("span");E.className="ov-hint",E.textContent="O \xB7 Esc \xB7 close",u.appendChild(E),r.appendChild(u);let T=document.createElement("div");T.className="ov-body"+(s?"":" compact"),r.appendChild(T);let P=s?document.createElement("aside"):null;P&&(P.className="ov-aside",T.appendChild(P));let te=document.createElement("div");te.className="ov-main"+(s?"":" ov-path"),T.appendChild(te);let ve=[],Me=[],He=new WeakMap,re=new IntersectionObserver(_=>{for(let M of _){if(!M.isIntersecting)continue;let w=M.target;if(w.dataset.loaded||w.dataset.building)continue;let R=He.get(w);R&&(w.dataset.building="1",re.unobserve(w),wi(w,R).catch($=>{let U=Number(w.dataset.tries??"0")+1;w.dataset.tries=String(U),console.warn("[rikiki/overview] thumbnail build failed",$),delete w.dataset.building,U<3&&re.observe(w)}))}},{root:null,rootMargin:"300px 0px",threshold:0});t.chapters.forEach((_,M)=>{let w=document.createElement("section");if(w.className="ov-chapter",w.id=`ov-chapter-${M}`,s){let $=document.createElement("header");$.className="ov-chapter-head";let U=document.createElement("span");U.className="ov-chapter-num",U.textContent=String(M+1).padStart(2,"0"),$.appendChild(U);let O=document.createElement("span");O.className="ov-chapter-title",O.textContent=ur(_),$.appendChild(O);let A=document.createElement("span");A.className="ov-chapter-count",A.textContent=`${_.slides.length} slide${_.slides.length>1?"s":""}`,$.appendChild(A),w.appendChild($)}let R=document.createElement("div");if(R.className="ov-row",_.slides.forEach(($,U)=>{if(!s&&U>0){let jt=document.createElement("div");jt.className="ov-connector",R.appendChild(jt)}let O=_.startIdx+U,A=document.createElement("div");A.className="ov-cell",A.dataset.idx=String(O),A.dataset.search=mi($),O===t.currentIdx&&(A.dataset.current="1"),He.set(A,$),re.observe(A);let oe=document.createElement("span");oe.className="ov-cell-label",oe.textContent=String(O+1),A.appendChild(oe),A.addEventListener("click",()=>t.onPick(O)),R.appendChild(A)}),w.appendChild(R),te.appendChild(w),ve.push(w),P){let $=document.createElement("button");$.type="button",$.className="ov-aside-item",t.currentIdx>=_.startIdx&&t.currentIdx<_.startIdx+_.slides.length&&($.dataset.active="1");let O=document.createElement("span");O.className="ov-aside-num",O.textContent=String(M+1).padStart(2,"0"),$.appendChild(O);let A=document.createElement("span");A.className="ov-aside-text",A.textContent=ur(_);let oe=document.createElement("div");oe.className="ov-aside-count",oe.textContent=`${_.slides.length} slide${_.slides.length>1?"s":""}`,A.appendChild(oe),$.appendChild(A),$.addEventListener("click",()=>{w.scrollIntoView({behavior:"smooth",block:"start"})}),P.appendChild($),Me.push($)}});let ht=null;P&&(ht=new IntersectionObserver(_=>{let M=_.filter(w=>w.isIntersecting).sort((w,R)=>w.boundingClientRect.top-R.boundingClientRect.top);if(M.length>0){let w=ve.indexOf(M[0].target);w>=0&&Me.forEach((R,$)=>{$===w?R.dataset.active="1":delete R.dataset.active})}},{root:te,rootMargin:"0px 0px -70% 0px",threshold:0}),ve.forEach(_=>ht.observe(_)));let qt=r.querySelectorAll(".ov-cell");return m.addEventListener("input",()=>{let _=m.value.trim().toLowerCase();if(!_){qt.forEach(M=>delete M.dataset.filteredOut);return}qt.forEach(M=>{(M.dataset.search||"").includes(_)?delete M.dataset.filteredOut:M.dataset.filteredOut="1"})}),requestAnimationFrame(()=>{let _=r.querySelector(".ov-cell[data-current]");_&&_.scrollIntoView({block:"center"})}),()=>{ht?.disconnect(),re.disconnect(),r&&(r.innerHTML="")}}var pr,hr,hi,gi,Tt=Pe(()=>{"use strict";pr="data-deck-overview",hr="data-overview-tokens",hi=`
304
+ </html>`});var _r={};tt(_r,{mountOverview:()=>Ui});function zi(s){if(s.querySelector(`style[${yr}]`))return;let t=document.createElement("style");t.setAttribute(yr,"1"),t.textContent=Li,s.appendChild(t)}function Ci(s,t){if(s.querySelector(`link[${xr}]`))return;let e=document.createElement("link");e.rel="stylesheet",e.setAttribute(xr,"1"),e.href=new URL("../tokens.css",t).href,s.appendChild(e)}function wr(s){let e=s.slides[0]?.querySelector("h1");return e?Array.from(e.childNodes).map(r=>r.nodeName==="BR"?" ":r.textContent??"").join("").replace(/\s+/g," ").trim()||`Slide ${s.startIdx+1}`:`Slide ${s.startIdx+1}`}function Pi(s){return(s.textContent||"").replace(/\s+/g," ").trim().slice(0,400).toLowerCase()}function Hi(s,t){let e=new Map;if(s.querySelectorAll("[id]").forEach(n=>{e.set(n.id,n.id+t),n.id=n.id+t}),e.size===0)return;let r=n=>n.replace(/url\(['"]?#([^'")]+)['"]?\)/g,(o,a)=>e.has(a)?`url(#${e.get(a)})`:o);s.querySelectorAll("*").forEach(n=>{for(let o of Mi){let a=n.getAttribute(o);a?.includes("url(")&&n.setAttribute(o,r(a))}for(let o of["href","xlink:href"]){let a=n.getAttribute(o);a?.startsWith("#")&&e.has(a.slice(1))&&n.setAttribute(o,`#${e.get(a.slice(1))}`)}});let i=s.querySelectorAll("style");if(i.length){let n=o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");i.forEach(o=>{let a=o.textContent??"";e.forEach((l,u)=>{a=a.replace(new RegExp(`#${n(u)}(?![\\w-])`,"g"),`#${l}`)}),o.textContent=a})}}function Ii(s,t){let e=s.querySelectorAll("svg");t.querySelectorAll("svg").forEach((r,i)=>{let n=e[i]?.getBoundingClientRect();if(n&&n.width>0)r.setAttribute("width",String(Math.round(n.width))),r.setAttribute("height",String(Math.round(n.height))),r.style.maxWidth="100%";else if(r.hasAttribute("viewBox")&&!r.hasAttribute("width")){let o=(r.getAttribute("viewBox")??"").split(/[\s,]+/).map(Number);o.length===4&&o[2]>0&&(r.setAttribute("width",String(o[2])),r.setAttribute("height",String(o[3])),r.style.maxWidth="100%",r.style.height="auto")}})}function Ni(s,t){let e=s.querySelectorAll("deck-mermaid");t.querySelectorAll("deck-mermaid").forEach((r,i)=>{let n=e[i],o=document.createElement("div");o.className="ov-mermaid-snap",o.innerHTML=n?.renderedSvg??"";let a=n?.getBoundingClientRect();a&&a.width>0&&(o.style.width=`${a.width}px`,o.style.height=`${a.height}px`),r.replaceWith(o)})}function Oi(s){s.querySelectorAll("[data-click], [data-click-auto], [data-click-children], [data-click-stagger] > *").forEach(t=>{t.style.opacity="",t.style.transform="",t.style.filter="",t.style.pointerEvents="",t.querySelectorAll("path, line, polyline, polygon, circle, ellipse, rect").forEach(e=>{e.style.strokeDashoffset=""})})}function Ri(s,t){let e=s.cloneNode(!0);return e.setAttribute("active",""),Oi(e),Ii(s,e),Ni(s,e),Hi(e,`-ov${t}`),e}async function qi(s,t){let e=Array.from(t.querySelectorAll("deck-mermaid")).map(i=>i.whenRendered).filter(i=>!!i);e.length&&await Promise.all(e).catch(()=>{});let r=document.createElement("div");r.className="ov-thumb",r.appendChild(Ri(t,Number(s.dataset.idx))),s.insertBefore(r,s.firstChild),s.dataset.loaded="1",delete s.dataset.building}function Ui(s,t){let e=s.shadowRoot;if(!e)return()=>{};zi(e),Ci(e,import.meta.url);let r=e.querySelector("#overview-grid");r||(r=document.createElement("div"),r.id="overview-grid",e.appendChild(r)),r.innerHTML="";let i=t.slides.length,n=i>60,o=i>300?140:i>150?160:i>60?180:220;r.style.setProperty("--ov-cell-min",`${o}px`);let a=e.querySelector("#stage"),l=a?.clientWidth||window.innerWidth,u=a?.clientHeight||window.innerHeight;r.style.setProperty("--ov-thumb-w",`${l}px`),r.style.setProperty("--ov-thumb-h",`${u}px`),requestAnimationFrame(()=>{let E=r.querySelector(".ov-cell")?.clientWidth??o;r.style.setProperty("--overview-scale",String(E/l))});let p=document.createElement("div");p.className="ov-bar";let h=document.createElement("input");h.className="ov-search",h.type="search",h.placeholder=`Search ${i} slides \xB7 type to filter`,h.spellcheck=!1,p.appendChild(h);let f=document.createElement("span");f.className="ov-count",f.textContent=`${i} slides \xB7 ${t.chapters.length} chapters`,p.appendChild(f);let b=document.createElement("span");b.className="ov-hint",b.textContent="O \xB7 Esc \xB7 close",p.appendChild(b),r.appendChild(p);let $=document.createElement("div");$.className=`ov-body${n?"":" compact"}`,r.appendChild($);let S=n?document.createElement("aside"):null;S&&(S.className="ov-aside",$.appendChild(S));let P=document.createElement("div");P.className=`ov-main${n?"":" ov-path"}`,$.appendChild(P);let ne=[],Me=[],He=new WeakMap,se=new IntersectionObserver(E=>{for(let M of E){if(!M.isIntersecting)continue;let _=M.target;if(_.dataset.loaded||_.dataset.building)continue;let R=He.get(_);R&&(_.dataset.building="1",se.unobserve(_),qi(_,R).catch(T=>{let Y=Number(_.dataset.tries??"0")+1;_.dataset.tries=String(Y),console.warn("[rikiki/overview] thumbnail build failed",T),delete _.dataset.building,Y<3&&se.observe(_)}))}},{root:null,rootMargin:"300px 0px",threshold:0});t.chapters.forEach((E,M)=>{let _=document.createElement("section");if(_.className="ov-chapter",_.id=`ov-chapter-${M}`,n){let T=document.createElement("header");T.className="ov-chapter-head";let Y=document.createElement("span");Y.className="ov-chapter-num",Y.textContent=String(M+1).padStart(2,"0"),T.appendChild(Y);let q=document.createElement("span");q.className="ov-chapter-title",q.textContent=wr(E),T.appendChild(q);let A=document.createElement("span");A.className="ov-chapter-count",A.textContent=`${E.slides.length} slide${E.slides.length>1?"s":""}`,T.appendChild(A),_.appendChild(T)}let R=document.createElement("div");if(R.className="ov-row",E.slides.forEach((T,Y)=>{if(!n&&Y>0){let Wt=document.createElement("div");Wt.className="ov-connector",R.appendChild(Wt)}let q=E.startIdx+Y,A=document.createElement("div");A.className="ov-cell",A.dataset.idx=String(q),A.dataset.search=Pi(T),q===t.currentIdx&&(A.dataset.current="1"),He.set(A,T),se.observe(A);let ae=document.createElement("span");ae.className="ov-cell-label",ae.textContent=String(q+1),A.appendChild(ae),A.addEventListener("click",()=>t.onPick(q)),R.appendChild(A)}),_.appendChild(R),P.appendChild(_),ne.push(_),S){let T=document.createElement("button");T.type="button",T.className="ov-aside-item",t.currentIdx>=E.startIdx&&t.currentIdx<E.startIdx+E.slides.length&&(T.dataset.active="1");let q=document.createElement("span");q.className="ov-aside-num",q.textContent=String(M+1).padStart(2,"0"),T.appendChild(q);let A=document.createElement("span");A.className="ov-aside-text",A.textContent=wr(E);let ae=document.createElement("div");ae.className="ov-aside-count",ae.textContent=`${E.slides.length} slide${E.slides.length>1?"s":""}`,A.appendChild(ae),T.appendChild(A),T.addEventListener("click",()=>{_.scrollIntoView({behavior:"smooth",block:"start"})}),S.appendChild(T),Me.push(T)}});let oe=null;S&&(oe=new IntersectionObserver(E=>{let M=E.filter(_=>_.isIntersecting).sort((_,R)=>_.boundingClientRect.top-R.boundingClientRect.top);if(M.length>0){let _=ne.indexOf(M[0].target);_>=0&&Me.forEach((R,T)=>{T===_?R.dataset.active="1":delete R.dataset.active})}},{root:P,rootMargin:"0px 0px -70% 0px",threshold:0}),ne.forEach(E=>{oe.observe(E)}));let Yt=r.querySelectorAll(".ov-cell");return h.addEventListener("input",()=>{let E=h.value.trim().toLowerCase();if(!E){Yt.forEach(M=>{delete M.dataset.filteredOut});return}Yt.forEach(M=>{(M.dataset.search||"").includes(E)?delete M.dataset.filteredOut:M.dataset.filteredOut="1"})}),requestAnimationFrame(()=>{let E=r.querySelector(".ov-cell[data-current]");E&&E.scrollIntoView({block:"center"})}),()=>{oe?.disconnect(),se.disconnect(),r&&(r.innerHTML="")}}var yr,xr,Li,Mi,Ct=Ie(()=>{"use strict";yr="data-deck-overview",xr="data-overview-tokens",Li=`
265
305
  :host([overview]) ::slotted(*) { display: none !important; }
266
306
  :host([overview]) #overview-grid {
267
307
  position: fixed; inset: 0;
@@ -444,17 +484,17 @@ ${o.themeHref?`<link rel="stylesheet" href="${o.themeHref}">`:""}
444
484
  from { background-position: 100% 0; }
445
485
  to { background-position: -100% 0; }
446
486
  }
487
+ /* The thumb mirrors the letterboxed stage, so make it a size container too \xB7
488
+ the cloned slide's cqw/cqh then resolve exactly as they do live instead of
489
+ falling back to the (larger) window. */
447
490
  :host([overview]) .ov-thumb {
448
491
  position: absolute; top: 0; left: 0;
449
492
  width: var(--ov-thumb-w, 1920px); height: var(--ov-thumb-h, 1080px);
450
493
  transform: scale(var(--overview-scale, 0.2));
451
494
  transform-origin: top left;
452
495
  pointer-events: none;
496
+ container-type: size;
453
497
  }
454
- /* Fixed-viewport decks: the thumb mirrors the letterboxed stage, so make it a
455
- size container too \xB7 the cloned slide's cqw/cqh then resolve exactly as they
456
- do live instead of falling back to the (larger) window. */
457
- :host([overview]) #overview-grid[data-fixed] .ov-thumb { container-type: size; }
458
498
  :host([overview]) .ov-thumb > * { display: flex !important; }
459
499
  :host([overview]) .ov-mermaid-snap {
460
500
  display: flex; align-items: center; justify-content: center;
@@ -478,7 +518,7 @@ ${o.themeHref?`<link rel="stylesheet" href="${o.themeHref}">`:""}
478
518
  pointer-events: none;
479
519
  }
480
520
  :host(:not([overview])) #overview-grid { display: none; }
481
- `;gi=["fill","stroke","clip-path","mask","filter","marker-start","marker-mid","marker-end","style"]});var gr={};De(gr,{installTransitions:()=>Ti});function Ti(o){if(o.__rkTransitions)return o.__rkTransitions;let t=o.shadowRoot;if(!t)return()=>{};let e=document.createElement("style");e.textContent=Ei,e.setAttribute("data-rik-transitions",""),t.appendChild(e);function r(a,l){if(!l)return 0;let h=a.compareDocumentPosition(l);return h&Node.DOCUMENT_POSITION_PRECEDING?1:h&Node.DOCUMENT_POSITION_FOLLOWING?-1:0}let i=a=>{if(o.__rkMorphActive)return;let l=a,h=l.detail.current,p=l.detail.previous;if(!h)return;let u=h.dataset.transition||o.transition||"fade",m=r(h,p);u==="slide"&&m<0?u="slide-right":u==="slide-right"&&m>0?u="slide":u==="slide-up"&&m<0?u="slide-down":u==="slide-down"&&m>0&&(u="slide-up");let b=`rk-enter-${u}`,E=`rk-exit-${u}`,T=H[u]??480;p&&p!==h&&(p.classList.remove(...mr,...Si,"rk-leaving"),p.style.display="flex",p.style.zIndex="1",p.offsetWidth,p.classList.add("rk-leaving",E),window.setTimeout(()=>{p.classList.remove("rk-leaving",E),p.style.display="",p.style.zIndex=""},T+40)),h.classList.remove(...mr),h.style.zIndex="2",h.offsetWidth,h.classList.add(b),window.setTimeout(()=>{h.classList.remove(b),h.style.zIndex=""},T+40)};o.addEventListener("slide-change",i);let s=o.querySelector(":scope > [active]");s&&i(new CustomEvent("slide-change",{detail:{current:s,previous:null}}));let n=()=>{o.removeEventListener("slide-change",i),e.remove(),delete o.__rkTransitions};return o.__rkTransitions=n,n}var H,I,$i,Ei,mr,Si,At=Pe(()=>{"use strict";H={slide:560,"slide-up":520,"slide-down":520,"slide-right":560,fade:480,zoom:520,flip:560},I="var(--rik-motion__ease-out, cubic-bezier(0.16, 1, 0.3, 1))",$i="var(--rik-motion__ease-spring, cubic-bezier(0.5, 1.8, 0.3, 1))",Ei=`
521
+ `;Mi=["fill","stroke","clip-path","mask","filter","marker-start","marker-mid","marker-end","style"]});var $r={};tt($r,{installTransitions:()=>Wi});function Wi(s){let t=s;if(t.__rkTransitions)return t.__rkTransitions;let e=s.shadowRoot;if(!e)return()=>{};let r=document.createElement("style");r.textContent=Bi,r.setAttribute("data-rik-transitions",""),e.appendChild(r);function i(l,u){if(!u)return 0;let p=l.compareDocumentPosition(u);return p&Node.DOCUMENT_POSITION_PRECEDING?1:p&Node.DOCUMENT_POSITION_FOLLOWING?-1:0}let n=l=>{if(s.__rkMorphActive)return;let u=l,p=u.detail.current,h=u.detail.previous;if(!p)return;let f=p.dataset.transition||s.transition||"fade",b=i(p,h);f==="slide"&&b<0?f="slide-right":f==="slide-right"&&b>0?f="slide":f==="slide-up"&&b<0?f="slide-down":f==="slide-down"&&b>0&&(f="slide-up");let $=`rk-enter-${f}`,S=`rk-exit-${f}`,P=H[f]??480;h&&h!==p&&(h.classList.remove(...Er,...Yi,"rk-leaving"),h.style.display="flex",h.style.zIndex="1",h.offsetWidth,h.classList.add("rk-leaving",S),window.setTimeout(()=>{h.classList.remove("rk-leaving",S),h.style.display="",h.style.zIndex=""},P+40)),p.classList.remove(...Er),p.style.zIndex="2",p.offsetWidth,p.classList.add($),window.setTimeout(()=>{p.classList.remove($),p.style.zIndex=""},P+40)};s.addEventListener("slide-change",n);let o=s.querySelector(":scope > [active]");o&&n(new CustomEvent("slide-change",{detail:{current:o,previous:null}}));let a=()=>{s.removeEventListener("slide-change",n),r.remove(),delete t.__rkTransitions};return t.__rkTransitions=a,a}var H,I,ji,Bi,Er,Yi,Pt=Ie(()=>{"use strict";H={slide:560,"slide-up":520,"slide-down":520,"slide-right":560,fade:480,zoom:520,flip:560},I="var(--rik-motion__ease-out, cubic-bezier(0.16, 1, 0.3, 1))",ji="var(--rik-motion__ease-spring, cubic-bezier(0.5, 1.8, 0.3, 1))",Bi=`
482
522
  /* Incoming \xB7 from right (forward) */
483
523
  @keyframes rk-slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
484
524
  /* Outgoing \xB7 pushed off to the left (forward) */
@@ -519,7 +559,7 @@ ${o.themeHref?`<link rel="stylesheet" href="${o.themeHref}">`:""}
519
559
  ::slotted(.rk-leaving.rk-exit-slide-down) { animation: rk-slide-down-out ${H["slide-down"]}ms ${I} both; }
520
560
  ::slotted([active].rk-enter-fade) { animation: rk-fade-in ${H.fade}ms ${I} both; }
521
561
  ::slotted(.rk-leaving.rk-exit-fade) { animation: rk-fade-out ${H.fade}ms ${I} both; }
522
- ::slotted([active].rk-enter-zoom) { animation: rk-zoom-in ${H.zoom}ms ${$i} both; }
562
+ ::slotted([active].rk-enter-zoom) { animation: rk-zoom-in ${H.zoom}ms ${ji} both; }
523
563
  ::slotted(.rk-leaving.rk-exit-zoom) { animation: rk-zoom-out ${H.zoom}ms ${I} both; }
524
564
  ::slotted([active].rk-enter-flip) { animation: rk-flip-in ${H.flip}ms ${I} both; }
525
565
  ::slotted(.rk-leaving.rk-exit-flip) { animation: rk-flip-out ${H.flip}ms ${I} both; }
@@ -528,15 +568,15 @@ ${o.themeHref?`<link rel="stylesheet" href="${o.themeHref}">`:""}
528
568
  ::slotted([active][class*='rk-enter-']),
529
569
  ::slotted(.rk-leaving) { animation: none; }
530
570
  }
531
- `,mr=["rk-enter-slide","rk-enter-slide-up","rk-enter-slide-down","rk-enter-slide-right","rk-enter-fade","rk-enter-zoom","rk-enter-flip"],Si=["rk-exit-slide","rk-exit-slide-up","rk-exit-slide-down","rk-exit-slide-right","rk-exit-fade","rk-exit-zoom","rk-exit-flip"]});var ys={};function jr(o,t="#0a0a0a"){j||(j=document.createElement("div"),j.style.cssText=`position:fixed;bottom:12px;left:12px;z-index:9999;padding:6px 12px;background:${t};color:#F7CB44;font:600 11px/1.4 monospace;border-radius:6px;letter-spacing:.08em;text-transform:uppercase;opacity:0;transition:opacity .2s;pointer-events:none;border:1px solid #F7CB44`,document.body.appendChild(j)),j.textContent=o,j.style.opacity="1",j._t&&clearTimeout(j._t),j._t=setTimeout(()=>{j&&(j.style.opacity="0")},1500)}async function Ur(o){try{let t=await fetch(o+"?_lr="+Date.now(),{method:"HEAD",cache:"no-store"}),e=t.headers.get("last-modified")??t.headers.get("etag")??t.headers.get("content-length");if(!e)return!1;let r=Or.get(o);return Or.set(o,e),r!==void 0&&r!==e}catch{return!1}}async function bs(){for(;;){for(let o of qr)if(await Ur(o)){jr(`reload \xB7 ${o.split("/").pop()}`),await new Promise(t=>setTimeout(t,150)),location.reload();return}await new Promise(o=>setTimeout(o,800))}}var C,vs,ks,qr,Or,j,Br=Pe(()=>{"use strict";C=o=>new URL(o,import.meta.url).href,vs=o=>{try{return new URL(o,location.href).origin===location.origin}catch{return!1}},ks=Array.from(document.querySelectorAll('link[rel="stylesheet"]')).map(o=>o.href).filter(vs),qr=[...ks,C("./index.js"),C("./deck-root.js"),C("./deck-cover.js"),C("./deck-section.js"),C("./deck-feature.js"),C("./deck-split.js"),C("./deck-feature-cards.js"),C("./deck-takeaway.js"),C("./deck-md.js"),C("./deck-code.js"),C("./deck-callout.js"),C("./deck-card.js"),C("./deck-mermaid.js"),C("./shared-styles.js"),C("./deck-stack.js"),C("./deck-grid.js"),C("./deck-punch.js"),location.pathname],Or=new Map;(async()=>(await Promise.all(qr.map(Ur)),jr("livereload on"),bs()))()});var et=globalThis,tt=et.ShadowRoot&&(et.ShadyCSS===void 0||et.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ut=Symbol(),Bt=new WeakMap,Ie=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==ut)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(tt&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=Bt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&Bt.set(e,t))}return t}toString(){return this.cssText}},Wt=o=>new Ie(typeof o=="string"?o:o+"",void 0,ut),v=(o,...t)=>{let e=o.length===1?o[0]:t.reduce((r,i,s)=>r+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+o[s+1],o[0]);return new Ie(e,o,ut)},Yt=(o,t)=>{if(tt)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),i=et.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=e.cssText,o.appendChild(r)}},ft=tt?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return Wt(e)})(o):o;var{is:Yr,defineProperty:Zr,getOwnPropertyDescriptor:Xr,getOwnPropertyNames:Fr,getOwnPropertySymbols:Vr,getPrototypeOf:Gr}=Object,rt=globalThis,Zt=rt.trustedTypes,Kr=Zt?Zt.emptyScript:"",Qr=rt.reactiveElementPolyfillSupport,Ne=(o,t)=>o,Re={toAttribute(o,t){switch(t){case Boolean:o=o?Kr:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},it=(o,t)=>!Yr(o,t),Xt={attribute:!0,type:String,converter:Re,reflect:!1,useDefault:!1,hasChanged:it};Symbol.metadata??=Symbol("metadata"),rt.litPropertyMetadata??=new WeakMap;var F=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Xt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let r=Symbol(),i=this.getPropertyDescriptor(t,r,e);i!==void 0&&Zr(this.prototype,t,i)}}static getPropertyDescriptor(t,e,r){let{get:i,set:s}=Xr(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get:i,set(n){let a=i?.call(this);s?.call(this,n),this.requestUpdate(t,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Xt}static _$Ei(){if(this.hasOwnProperty(Ne("elementProperties")))return;let t=Gr(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Ne("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ne("properties"))){let e=this.properties,r=[...Fr(e),...Vr(e)];for(let i of r)this.createProperty(i,e[i])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[r,i]of e)this.elementProperties.set(r,i)}this._$Eh=new Map;for(let[e,r]of this.elementProperties){let i=this._$Eu(e,r);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let r=new Set(t.flat(1/0).reverse());for(let i of r)e.unshift(ft(i))}else t!==void 0&&e.push(ft(t));return e}static _$Eu(t,e){let r=e.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Yt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$ET(t,e){let r=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,r);if(i!==void 0&&r.reflect===!0){let s=(r.converter?.toAttribute!==void 0?r.converter:Re).toAttribute(e,r.type);this._$Em=t,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(t,e){let r=this.constructor,i=r._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let s=r.getPropertyOptions(i),n=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:Re;this._$Em=i;let a=n.fromAttribute(e,s.type);this[i]=a??this._$Ej?.get(i)??a,this._$Em=null}}requestUpdate(t,e,r,i=!1,s){if(t!==void 0){let n=this.constructor;if(i===!1&&(s=this[t]),r??=n.getPropertyOptions(t),!((r.hasChanged??it)(s,e)||r.useDefault&&r.reflect&&s===this._$Ej?.get(t)&&!this.hasAttribute(n._$Eu(t,r))))return;this.C(t,e,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:r,reflect:i,wrapped:s},n){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),s!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),i===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[i,s]of this._$Ep)this[i]=s;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[i,s]of r){let{wrapped:n}=s,a=this[i];n!==!0||this._$AL.has(i)||a===void 0||this.C(i,void 0,s,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(e)):this._$EM()}catch(r){throw t=!1,this._$EM(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};F.elementStyles=[],F.shadowRootOptions={mode:"open"},F[Ne("elementProperties")]=new Map,F[Ne("finalized")]=new Map,Qr?.({ReactiveElement:F}),(rt.reactiveElementVersions??=[]).push("2.1.2");var xt=globalThis,Ft=o=>o,st=xt.trustedTypes,Vt=st?st.createPolicy("lit-html",{createHTML:o=>o}):void 0,er="$lit$",ie=`lit$${Math.random().toFixed(9).slice(2)}$`,tr="?"+ie,Jr=`<${tr}>`,ce=document,qe=()=>ce.createComment(""),je=o=>o===null||typeof o!="object"&&typeof o!="function",wt=Array.isArray,Dr=o=>wt(o)||typeof o?.[Symbol.iterator]=="function",mt=`[
532
- \f\r]`,Oe=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Gt=/-->/g,Kt=/>/g,ae=RegExp(`>|${mt}(?:([^\\s"'>=/]+)(${mt}*=${mt}*(?:[^
533
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Qt=/'/g,Jt=/"/g,rr=/^(?:script|style|textarea|title)$/i,_t=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),f=_t(1),Ss=_t(2),Ts=_t(3),de=Symbol.for("lit-noChange"),L=Symbol.for("lit-nothing"),Dt=new WeakMap,le=ce.createTreeWalker(ce,129);function ir(o,t){if(!wt(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Vt!==void 0?Vt.createHTML(t):t}var ei=(o,t)=>{let e=o.length-1,r=[],i,s=t===2?"<svg>":t===3?"<math>":"",n=Oe;for(let a=0;a<e;a++){let l=o[a],h,p,u=-1,m=0;for(;m<l.length&&(n.lastIndex=m,p=n.exec(l),p!==null);)m=n.lastIndex,n===Oe?p[1]==="!--"?n=Gt:p[1]!==void 0?n=Kt:p[2]!==void 0?(rr.test(p[2])&&(i=RegExp("</"+p[2],"g")),n=ae):p[3]!==void 0&&(n=ae):n===ae?p[0]===">"?(n=i??Oe,u=-1):p[1]===void 0?u=-2:(u=n.lastIndex-p[2].length,h=p[1],n=p[3]===void 0?ae:p[3]==='"'?Jt:Qt):n===Jt||n===Qt?n=ae:n===Gt||n===Kt?n=Oe:(n=ae,i=void 0);let b=n===ae&&o[a+1].startsWith("/>")?" ":"";s+=n===Oe?l+Jr:u>=0?(r.push(h),l.slice(0,u)+er+l.slice(u)+ie+b):l+ie+(u===-2?a:b)}return[ir(o,s+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},Ue=class o{constructor({strings:t,_$litType$:e},r){let i;this.parts=[];let s=0,n=0,a=t.length-1,l=this.parts,[h,p]=ei(t,e);if(this.el=o.createElement(h,r),le.currentNode=this.el.content,e===2||e===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(i=le.nextNode())!==null&&l.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(let u of i.getAttributeNames())if(u.endsWith(er)){let m=p[n++],b=i.getAttribute(u).split(ie),E=/([.?@])?(.*)/.exec(m);l.push({type:1,index:s,name:E[2],strings:b,ctor:E[1]==="."?vt:E[1]==="?"?kt:E[1]==="@"?bt:be}),i.removeAttribute(u)}else u.startsWith(ie)&&(l.push({type:6,index:s}),i.removeAttribute(u));if(rr.test(i.tagName)){let u=i.textContent.split(ie),m=u.length-1;if(m>0){i.textContent=st?st.emptyScript:"";for(let b=0;b<m;b++)i.append(u[b],qe()),le.nextNode(),l.push({type:2,index:++s});i.append(u[m],qe())}}}else if(i.nodeType===8)if(i.data===tr)l.push({type:2,index:s});else{let u=-1;for(;(u=i.data.indexOf(ie,u+1))!==-1;)l.push({type:7,index:s}),u+=ie.length-1}s++}}static createElement(t,e){let r=ce.createElement("template");return r.innerHTML=t,r}};function ke(o,t,e=o,r){if(t===de)return t;let i=r!==void 0?e._$Co?.[r]:e._$Cl,s=je(t)?void 0:t._$litDirective$;return i?.constructor!==s&&(i?._$AO?.(!1),s===void 0?i=void 0:(i=new s(o),i._$AT(o,e,r)),r!==void 0?(e._$Co??=[])[r]=i:e._$Cl=i),i!==void 0&&(t=ke(o,i._$AS(o,t.values),i,r)),t}var gt=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:r}=this._$AD,i=(t?.creationScope??ce).importNode(e,!0);le.currentNode=i;let s=le.nextNode(),n=0,a=0,l=r[0];for(;l!==void 0;){if(n===l.index){let h;l.type===2?h=new Be(s,s.nextSibling,this,t):l.type===1?h=new l.ctor(s,l.name,l.strings,this,t):l.type===6&&(h=new yt(s,this,t)),this._$AV.push(h),l=r[++a]}n!==l?.index&&(s=le.nextNode(),n++)}return le.currentNode=ce,i}p(t){let e=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}},Be=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,i){this.type=2,this._$AH=L,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=ke(this,t,e),je(t)?t===L||t==null||t===""?(this._$AH!==L&&this._$AR(),this._$AH=L):t!==this._$AH&&t!==de&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Dr(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==L&&je(this._$AH)?this._$AA.nextSibling.data=t:this.T(ce.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:r}=t,i=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=Ue.createElement(ir(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===i)this._$AH.p(e);else{let s=new gt(i,this),n=s.u(this.options);s.p(e),this.T(n),this._$AH=s}}_$AC(t){let e=Dt.get(t.strings);return e===void 0&&Dt.set(t.strings,e=new Ue(t)),e}k(t){wt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,i=0;for(let s of t)i===e.length?e.push(r=new o(this.O(qe()),this.O(qe()),this,this.options)):r=e[i],r._$AI(s),i++;i<e.length&&(this._$AR(r&&r._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let r=Ft(t).nextSibling;Ft(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},be=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,i,s){this.type=1,this._$AH=L,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=L}_$AI(t,e=this,r,i){let s=this.strings,n=!1;if(s===void 0)t=ke(this,t,e,0),n=!je(t)||t!==this._$AH&&t!==de,n&&(this._$AH=t);else{let a=t,l,h;for(t=s[0],l=0;l<s.length-1;l++)h=ke(this,a[r+l],e,l),h===de&&(h=this._$AH[l]),n||=!je(h)||h!==this._$AH[l],h===L?t=L:t!==L&&(t+=(h??"")+s[l+1]),this._$AH[l]=h}n&&!i&&this.j(t)}j(t){t===L?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},vt=class extends be{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===L?void 0:t}},kt=class extends be{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==L)}},bt=class extends be{constructor(t,e,r,i,s){super(t,e,r,i,s),this.type=5}_$AI(t,e=this){if((t=ke(this,t,e,0)??L)===de)return;let r=this._$AH,i=t===L&&r!==L||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,s=t!==L&&(r===L||i);i&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},yt=class{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){ke(this,t)}};var ti=xt.litHtmlPolyfillSupport;ti?.(Ue,Be),(xt.litHtmlVersions??=[]).push("3.3.3");var sr=(o,t,e)=>{let r=e?.renderBefore??t,i=r._$litPart$;if(i===void 0){let s=e?.renderBefore??null;r._$litPart$=i=new Be(t.insertBefore(qe(),s),s,void 0,e??{})}return i._$AI(o),i};var $t=globalThis,g=class extends F{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=sr(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return de}};g._$litElement$=!0,g.finalized=!0,$t.litElementHydrateSupport?.({LitElement:g});var ri=$t.litElementPolyfillSupport;ri?.({LitElement:g});($t.litElementVersions??=[]).push("4.2.2");var k=o=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(o,t)}):customElements.define(o,t)};var ii={attribute:!0,type:String,converter:Re,reflect:!1,hasChanged:it},si=(o=ii,t,e)=>{let{kind:r,metadata:i}=e,s=globalThis.litPropertyMetadata.get(i);if(s===void 0&&globalThis.litPropertyMetadata.set(i,s=new Map),r==="setter"&&((o=Object.create(o)).wrapped=!0),s.set(e.name,o),r==="accessor"){let{name:n}=e;return{set(a){let l=t.get.call(this);t.set.call(this,a),this.requestUpdate(n,l,o,!0,a)},init(a){return a!==void 0&&this.C(n,void 0,o,a),a}}}if(r==="setter"){let{name:n}=e;return function(a){let l=this[n];t.call(this,a),this.requestUpdate(n,l,o,!0,a)}}throw Error("Unsupported decorator location: "+r)};function d(o){return(t,e)=>typeof e=="object"?si(o,t,e):((r,i,s)=>{let n=i.hasOwnProperty(s);return i.constructor.createProperty(s,r),n?Object.getOwnPropertyDescriptor(i,s):void 0})(o,t,e)}function B(o){return d({...o,state:!0,attribute:!1})}var S=class extends g{constructor(){super(...arguments);this.current=0;this.step=0;this.blank=null;this.overview=!1;this.fixed=!1;this.width=1920;this.height=1080;this.noHint=!1;this.noArrows=!1;this.transition=null;this.autoplay=0;this.loop=!1;this.swipe=!1;this.mouseNav=null;this.nav=null;this.slides=[];this.chapters=[];this._overviewTeardown=null;this._transitionLoaded=!1;this._autoplayTimer=null;this._autoplayPaused=!1;this._swipeStartX=0;this._swipeStartY=0;this._swipePointerId=null;this._navDownX=0;this._navDownY=0;this._wheelAccum=0;this._wheelLockUntil=0;this._onHoverEnter=()=>{this._autoplayPaused=!0,this._stopAutoplay()};this._onHoverLeave=()=>{this._autoplayPaused=!1,this.autoplay>0&&this._startAutoplay()};this._onPointerDown=e=>{!this.swipe||e.pointerType==="mouse"&&e.button!==0||e.target?.closest("a, button, input, textarea, [contenteditable]")||(this._swipePointerId=e.pointerId,this._swipeStartX=e.clientX,this._swipeStartY=e.clientY)};this._onPointerUp=e=>{if(this._swipePointerId===null||e.pointerId!==this._swipePointerId)return;let r=e.clientX-this._swipeStartX,i=e.clientY-this._swipeStartY;this._swipePointerId=null,!(Math.abs(r)<60||Math.abs(r)<Math.abs(i)*2)&&(this._stopAutoplay(),r<0?this._advance():this._back(),this._restartAutoplay())};this._onNavPointerDown=e=>{this._navDownX=e.clientX,this._navDownY=e.clientY};this._onClickNav=e=>{if(!this._mouseEnabled("click")||this.overview||this.blank||this.shadowRoot?.querySelector("#kb-overlay.open")||Math.hypot(e.clientX-this._navDownX,e.clientY-this._navDownY)>5)return;let r=window.getSelection();r&&!r.isCollapsed||e.composedPath().some(s=>s instanceof HTMLElement?s.matches?.("a, button, input, textarea, select, [contenteditable], [data-no-advance]")?!0:s.id==="blank"||s.id==="kb-overlay"||s.id==="overview-grid"||s.id==="nav-arrows"||s.id==="kb-hint":!1)||(this._restartAutoplay(),e.shiftKey?this._back():this._advance())};this._onWheel=e=>{if(!this._mouseEnabled("wheel")||this.overview||this.blank||this._wheelTargetScrolls(e))return;e.preventDefault();let r=performance.now();if(r<this._wheelLockUntil||(this._wheelAccum+=e.deltaY,Math.abs(this._wheelAccum)<50))return;let i=this._wheelAccum>0;this._wheelAccum=0,this._wheelLockUntil=r+400,this._restartAutoplay(),i?this._advance():this._back()};this._onAuxUp=e=>{this._mouseEnabled("aux")&&(e.button!==3&&e.button!==4||(e.preventDefault(),this._restartAutoplay(),e.button===3?this._back():this._advance()))};this._onAuxClick=e=>{this._mouseEnabled("aux")&&(e.button===3||e.button===4)&&e.preventDefault()};this._onHash=()=>{this._readHash(!1)};this._onKey=e=>{if(!(e.target&&e.target.matches?.("input,textarea,[contenteditable]"))){if(this._restartAutoplay(),this.overview){(e.key==="Escape"||e.key==="o"||e.key==="O"||e.key==="Enter")&&(e.preventDefault(),this.overview=!1);return}if(this.blank){e.preventDefault(),this.blank=null;return}if(e.key==="."||e.key==="b"||e.key==="B"){e.preventDefault(),this.blank="black";return}if(e.key===","||e.key==="w"||e.key==="W"){e.preventDefault(),this.blank="white";return}if(e.key==="?"||e.key==="h"||e.key==="H"){this._toggleHelp();return}if(e.key==="Escape"){this._closeHelp();return}if(e.key==="o"||e.key==="O"){e.preventDefault(),this.overview=!0;return}if(e.key==="p"||e.key==="P"){e.preventDefault(),this._togglePresenter();return}if(e.key==="Home"){this._goTo(0);return}if(e.key==="End"){this._goTo(this.slides.length-1);return}if(e.key===" "||e.key==="PageDown"){e.preventDefault(),this._advance();return}if(e.key==="PageUp"){e.preventDefault(),this._back();return}if(this._has2DNav()){let{c:r,i}=this._coords(this.current);if(e.key==="ArrowRight"){e.preventDefault(),r+1<this.chapters.length?this._goToCoords(r+1,0):this._advance();return}if(e.key==="ArrowLeft"){e.preventDefault(),r-1>=0?this._goToCoords(r-1,0):this._back();return}if(e.key==="ArrowDown"){e.preventDefault();let s=this.chapters[r];s&&i+1<s.slides.length?this._goToCoords(r,i+1):this._advance();return}if(e.key==="ArrowUp"){e.preventDefault(),i-1>=0?this._goToCoords(r,i-1):this._back();return}}else{if(e.key==="ArrowRight"||e.key==="ArrowDown"){e.preventDefault(),this._advance();return}if(e.key==="ArrowLeft"||e.key==="ArrowUp"){e.preventDefault(),this._back();return}}}}}firstUpdated(){this.fixed&&this._applyCanvasVars(),this._scopeSlideStyles(),this.slides=Array.from(this.querySelectorAll(":scope > *")).filter(e=>e.tagName?.toLowerCase().startsWith("deck-")&&e.tagName?.toLowerCase()!=="deck-root"),this._buildChapters(),this._readHash(!0),this._applyActive(),this._applyStep(),this._updateUI(),this.requestUpdate(),window.addEventListener("keydown",this._onKey),window.addEventListener("hashchange",this._onHash),this.addEventListener("pointerdown",this._onNavPointerDown),this.addEventListener("click",this._onClickNav),this.addEventListener("wheel",this._onWheel,{passive:!1}),window.addEventListener("mouseup",this._onAuxUp),window.addEventListener("auxclick",this._onAuxClick),this.autoplay>0&&this._startAutoplay(),this.swipe?(this.addEventListener("pointerdown",this._onPointerDown),this.addEventListener("pointerup",this._onPointerUp),this.addEventListener("pointercancel",this._onPointerUp),this.addEventListener("mouseenter",this._onHoverEnter),this.addEventListener("mouseleave",this._onHoverLeave)):this.autoplay>0&&(this.addEventListener("mouseenter",this._onHoverEnter),this.addEventListener("mouseleave",this._onHoverLeave))}_scopeSlideStyles(){this.querySelectorAll("style[scoped]").forEach(e=>{e.dataset.rikScoped||(e.dataset.rikScoped="1",e.textContent=`@scope {
571
+ `,Er=["rk-enter-slide","rk-enter-slide-up","rk-enter-slide-down","rk-enter-slide-right","rk-enter-fade","rk-enter-zoom","rk-enter-flip"],Yi=["rk-exit-slide","rk-exit-slide-up","rk-exit-slide-down","rk-exit-slide-right","rk-exit-fade","rk-exit-zoom","rk-exit-flip"]});var qn={};function Kr(s,t="#0a0a0a"){B||(B=document.createElement("div"),B.style.cssText=`position:fixed;bottom:12px;left:12px;z-index:9999;padding:6px 12px;background:${t};color:#F7CB44;font:600 11px/1.4 monospace;border-radius:6px;letter-spacing:.08em;text-transform:uppercase;opacity:0;transition:opacity .2s;pointer-events:none;border:1px solid #F7CB44`,document.body.appendChild(B)),B.textContent=s,B.style.opacity="1",B._t&&clearTimeout(B._t),B._t=setTimeout(()=>{B&&(B.style.opacity="0")},1500)}async function Gr(s){try{let t=await fetch(`${s}?_lr=${Date.now()}`,{method:"HEAD",cache:"no-store"}),e=t.headers.get("last-modified")??t.headers.get("etag")??t.headers.get("content-length");if(!e)return!1;let r=Fr.get(s);return Fr.set(s,e),r!==void 0&&r!==e}catch{return!1}}async function Rn(){for(;;){for(let s of Vr)if(await Gr(s)){Kr(`reload \xB7 ${s.split("/").pop()}`),await new Promise(t=>setTimeout(t,150)),location.reload();return}await new Promise(s=>setTimeout(s,800))}}var C,Nn,On,Vr,Fr,B,Qr=Ie(()=>{"use strict";C=s=>new URL(s,import.meta.url).href,Nn=s=>{try{return new URL(s,location.href).origin===location.origin}catch{return!1}},On=Array.from(document.querySelectorAll('link[rel="stylesheet"]')).map(s=>s.href).filter(Nn),Vr=[...On,C("./index.js"),C("./deck-root.js"),C("./deck-cover.js"),C("./deck-section.js"),C("./deck-feature.js"),C("./deck-split.js"),C("./deck-feature-cards.js"),C("./deck-takeaway.js"),C("./deck-md.js"),C("./deck-code.js"),C("./deck-callout.js"),C("./deck-card.js"),C("./deck-mermaid.js"),C("./shared-styles.js"),C("./deck-stack.js"),C("./deck-grid.js"),C("./deck-punch.js"),location.pathname],Fr=new Map;(async()=>(await Promise.all(Vr.map(Gr)),Kr("livereload on"),Rn()))()});var rt=globalThis,it=rt.ShadowRoot&&(rt.ShadyCSS===void 0||rt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,gt=Symbol(),Zt=new WeakMap,Ne=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==gt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(it&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=Zt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&Zt.set(e,t))}return t}toString(){return this.cssText}},Ft=s=>new Ne(typeof s=="string"?s:s+"",void 0,gt),v=(s,...t)=>{let e=s.length===1?s[0]:t.reduce((r,i,n)=>r+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+s[n+1],s[0]);return new Ne(e,s,gt)},Vt=(s,t)=>{if(it)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),i=rt.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=e.cssText,s.appendChild(r)}},vt=it?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return Ft(e)})(s):s;var{is:Dr,defineProperty:ei,getOwnPropertyDescriptor:ti,getOwnPropertyNames:ri,getOwnPropertySymbols:ii,getPrototypeOf:ni}=Object,nt=globalThis,Kt=nt.trustedTypes,si=Kt?Kt.emptyScript:"",oi=nt.reactiveElementPolyfillSupport,Oe=(s,t)=>s,Re={toAttribute(s,t){switch(t){case Boolean:s=s?si:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},st=(s,t)=>!Dr(s,t),Gt={attribute:!0,type:String,converter:Re,reflect:!1,useDefault:!1,hasChanged:st};Symbol.metadata??=Symbol("metadata"),nt.litPropertyMetadata??=new WeakMap;var F=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Gt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let r=Symbol(),i=this.getPropertyDescriptor(t,r,e);i!==void 0&&ei(this.prototype,t,i)}}static getPropertyDescriptor(t,e,r){let{get:i,set:n}=ti(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get:i,set(o){let a=i?.call(this);n?.call(this,o),this.requestUpdate(t,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Gt}static _$Ei(){if(this.hasOwnProperty(Oe("elementProperties")))return;let t=ni(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Oe("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Oe("properties"))){let e=this.properties,r=[...ri(e),...ii(e)];for(let i of r)this.createProperty(i,e[i])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[r,i]of e)this.elementProperties.set(r,i)}this._$Eh=new Map;for(let[e,r]of this.elementProperties){let i=this._$Eu(e,r);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let r=new Set(t.flat(1/0).reverse());for(let i of r)e.unshift(vt(i))}else t!==void 0&&e.push(vt(t));return e}static _$Eu(t,e){let r=e.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Vt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$ET(t,e){let r=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,r);if(i!==void 0&&r.reflect===!0){let n=(r.converter?.toAttribute!==void 0?r.converter:Re).toAttribute(e,r.type);this._$Em=t,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(t,e){let r=this.constructor,i=r._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let n=r.getPropertyOptions(i),o=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:Re;this._$Em=i;let a=o.fromAttribute(e,n.type);this[i]=a??this._$Ej?.get(i)??a,this._$Em=null}}requestUpdate(t,e,r,i=!1,n){if(t!==void 0){let o=this.constructor;if(i===!1&&(n=this[t]),r??=o.getPropertyOptions(t),!((r.hasChanged??st)(n,e)||r.useDefault&&r.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,r))))return;this.C(t,e,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:r,reflect:i,wrapped:n},o){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),n!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),i===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[i,n]of this._$Ep)this[i]=n;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[i,n]of r){let{wrapped:o}=n,a=this[i];o!==!0||this._$AL.has(i)||a===void 0||this.C(i,void 0,n,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(e)):this._$EM()}catch(r){throw t=!1,this._$EM(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};F.elementStyles=[],F.shadowRootOptions={mode:"open"},F[Oe("elementProperties")]=new Map,F[Oe("finalized")]=new Map,oi?.({ReactiveElement:F}),(nt.reactiveElementVersions??=[]).push("2.1.2");var Et=globalThis,Qt=s=>s,ot=Et.trustedTypes,Jt=ot?ot.createPolicy("lit-html",{createHTML:s=>s}):void 0,nr="$lit$",te=`lit$${Math.random().toFixed(9).slice(2)}$`,sr="?"+te,ai=`<${sr}>`,de=document,Ue=()=>de.createComment(""),je=s=>s===null||typeof s!="object"&&typeof s!="function",$t=Array.isArray,li=s=>$t(s)||typeof s?.[Symbol.iterator]=="function",kt=`[
572
+ \f\r]`,qe=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Dt=/-->/g,er=/>/g,le=RegExp(`>|${kt}(?:([^\\s"'>=/]+)(${kt}*=${kt}*(?:[^
573
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),tr=/'/g,rr=/"/g,or=/^(?:script|style|textarea|title)$/i,St=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),m=St(1),Xn=St(2),Zn=St(3),pe=Symbol.for("lit-noChange"),L=Symbol.for("lit-nothing"),ir=new WeakMap,ce=de.createTreeWalker(de,129);function ar(s,t){if(!$t(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Jt!==void 0?Jt.createHTML(t):t}var ci=(s,t)=>{let e=s.length-1,r=[],i,n=t===2?"<svg>":t===3?"<math>":"",o=qe;for(let a=0;a<e;a++){let l=s[a],u,p,h=-1,f=0;for(;f<l.length&&(o.lastIndex=f,p=o.exec(l),p!==null);)f=o.lastIndex,o===qe?p[1]==="!--"?o=Dt:p[1]!==void 0?o=er:p[2]!==void 0?(or.test(p[2])&&(i=RegExp("</"+p[2],"g")),o=le):p[3]!==void 0&&(o=le):o===le?p[0]===">"?(o=i??qe,h=-1):p[1]===void 0?h=-2:(h=o.lastIndex-p[2].length,u=p[1],o=p[3]===void 0?le:p[3]==='"'?rr:tr):o===rr||o===tr?o=le:o===Dt||o===er?o=qe:(o=le,i=void 0);let b=o===le&&s[a+1].startsWith("/>")?" ":"";n+=o===qe?l+ai:h>=0?(r.push(u),l.slice(0,h)+nr+l.slice(h)+te+b):l+te+(h===-2?a:b)}return[ar(s,n+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},Be=class s{constructor({strings:t,_$litType$:e},r){let i;this.parts=[];let n=0,o=0,a=t.length-1,l=this.parts,[u,p]=ci(t,e);if(this.el=s.createElement(u,r),ce.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=ce.nextNode())!==null&&l.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(let h of i.getAttributeNames())if(h.endsWith(nr)){let f=p[o++],b=i.getAttribute(h).split(te),$=/([.?@])?(.*)/.exec(f);l.push({type:1,index:n,name:$[2],strings:b,ctor:$[1]==="."?yt:$[1]==="?"?xt:$[1]==="@"?wt:be}),i.removeAttribute(h)}else h.startsWith(te)&&(l.push({type:6,index:n}),i.removeAttribute(h));if(or.test(i.tagName)){let h=i.textContent.split(te),f=h.length-1;if(f>0){i.textContent=ot?ot.emptyScript:"";for(let b=0;b<f;b++)i.append(h[b],Ue()),ce.nextNode(),l.push({type:2,index:++n});i.append(h[f],Ue())}}}else if(i.nodeType===8)if(i.data===sr)l.push({type:2,index:n});else{let h=-1;for(;(h=i.data.indexOf(te,h+1))!==-1;)l.push({type:7,index:n}),h+=te.length-1}n++}}static createElement(t,e){let r=de.createElement("template");return r.innerHTML=t,r}};function ke(s,t,e=s,r){if(t===pe)return t;let i=r!==void 0?e._$Co?.[r]:e._$Cl,n=je(t)?void 0:t._$litDirective$;return i?.constructor!==n&&(i?._$AO?.(!1),n===void 0?i=void 0:(i=new n(s),i._$AT(s,e,r)),r!==void 0?(e._$Co??=[])[r]=i:e._$Cl=i),i!==void 0&&(t=ke(s,i._$AS(s,t.values),i,r)),t}var bt=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:r}=this._$AD,i=(t?.creationScope??de).importNode(e,!0);ce.currentNode=i;let n=ce.nextNode(),o=0,a=0,l=r[0];for(;l!==void 0;){if(o===l.index){let u;l.type===2?u=new Ye(n,n.nextSibling,this,t):l.type===1?u=new l.ctor(n,l.name,l.strings,this,t):l.type===6&&(u=new _t(n,this,t)),this._$AV.push(u),l=r[++a]}o!==l?.index&&(n=ce.nextNode(),o++)}return ce.currentNode=de,i}p(t){let e=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}},Ye=class s{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,i){this.type=2,this._$AH=L,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=ke(this,t,e),je(t)?t===L||t==null||t===""?(this._$AH!==L&&this._$AR(),this._$AH=L):t!==this._$AH&&t!==pe&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):li(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==L&&je(this._$AH)?this._$AA.nextSibling.data=t:this.T(de.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:r}=t,i=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=Be.createElement(ar(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===i)this._$AH.p(e);else{let n=new bt(i,this),o=n.u(this.options);n.p(e),this.T(o),this._$AH=n}}_$AC(t){let e=ir.get(t.strings);return e===void 0&&ir.set(t.strings,e=new Be(t)),e}k(t){$t(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,i=0;for(let n of t)i===e.length?e.push(r=new s(this.O(Ue()),this.O(Ue()),this,this.options)):r=e[i],r._$AI(n),i++;i<e.length&&(this._$AR(r&&r._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let r=Qt(t).nextSibling;Qt(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},be=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,i,n){this.type=1,this._$AH=L,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=L}_$AI(t,e=this,r,i){let n=this.strings,o=!1;if(n===void 0)t=ke(this,t,e,0),o=!je(t)||t!==this._$AH&&t!==pe,o&&(this._$AH=t);else{let a=t,l,u;for(t=n[0],l=0;l<n.length-1;l++)u=ke(this,a[r+l],e,l),u===pe&&(u=this._$AH[l]),o||=!je(u)||u!==this._$AH[l],u===L?t=L:t!==L&&(t+=(u??"")+n[l+1]),this._$AH[l]=u}o&&!i&&this.j(t)}j(t){t===L?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},yt=class extends be{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===L?void 0:t}},xt=class extends be{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==L)}},wt=class extends be{constructor(t,e,r,i,n){super(t,e,r,i,n),this.type=5}_$AI(t,e=this){if((t=ke(this,t,e,0)??L)===pe)return;let r=this._$AH,i=t===L&&r!==L||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,n=t!==L&&(r===L||i);i&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},_t=class{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){ke(this,t)}};var di=Et.litHtmlPolyfillSupport;di?.(Be,Ye),(Et.litHtmlVersions??=[]).push("3.3.3");var lr=(s,t,e)=>{let r=e?.renderBefore??t,i=r._$litPart$;if(i===void 0){let n=e?.renderBefore??null;r._$litPart$=i=new Ye(t.insertBefore(Ue(),n),n,void 0,e??{})}return i._$AI(s),i};var Tt=globalThis,g=class extends F{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=lr(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return pe}};g._$litElement$=!0,g.finalized=!0,Tt.litElementHydrateSupport?.({LitElement:g});var pi=Tt.litElementPolyfillSupport;pi?.({LitElement:g});(Tt.litElementVersions??=[]).push("4.2.2");var k=s=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(s,t)}):customElements.define(s,t)};var hi={attribute:!0,type:String,converter:Re,reflect:!1,hasChanged:st},ui=(s=hi,t,e)=>{let{kind:r,metadata:i}=e,n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),r==="setter"&&((s=Object.create(s)).wrapped=!0),n.set(e.name,s),r==="accessor"){let{name:o}=e;return{set(a){let l=t.get.call(this);t.set.call(this,a),this.requestUpdate(o,l,s,!0,a)},init(a){return a!==void 0&&this.C(o,void 0,s,a),a}}}if(r==="setter"){let{name:o}=e;return function(a){let l=this[o];t.call(this,a),this.requestUpdate(o,l,s,!0,a)}}throw Error("Unsupported decorator location: "+r)};function d(s){return(t,e)=>typeof e=="object"?ui(s,t,e):((r,i,n)=>{let o=i.hasOwnProperty(n);return i.constructor.createProperty(n,r),o?Object.getOwnPropertyDescriptor(i,n):void 0})(s,t,e)}function j(s){return d({...s,state:!0,attribute:!1})}function cr(s){if(!s||s==="transparent")return!1;let t=s.match(/^(?:rgb|hsl)a?\(([^)]*)\)$/i);if(t){let r=t[1].split(",");return r.length<4||parseFloat(r[3])>=1}let e=s.match(/\/\s*([\d.]+%?)\s*\)$/);if(e){let r=e[1];return(r.endsWith("%")?parseFloat(r)/100:parseFloat(r))>=1}return!0}var y=class extends g{constructor(){super(...arguments);this.current=0;this.step=0;this.blank=null;this.presenterActive=!1;this.overview=!1;this.fluid=!1;this.width=1920;this.height=1080;this.noHint=!1;this.noArrows=!1;this.noCounter=!1;this.preview=!1;this.noZoom=!1;this.transition=null;this.autoplay=0;this.loop=!1;this.swipe=!1;this.mouseNav=null;this.nav=null;this.slides=[];this.chapters=[];this._overviewTeardown=null;this._transitionLoaded=!1;this._autoplayTimer=null;this._autoplayPaused=!1;this._swipeStartX=0;this._swipeStartY=0;this._swipePointerId=null;this._navDownX=0;this._navDownY=0;this._wheelAccum=0;this._wheelLockUntil=0;this._zoom=1;this._panX=0;this._panY=0;this._plugins=[];this._ctx=null;this._applyScale=()=>{if(this._effectiveFluid()){this.style.removeProperty("--deck-scale");return}let e=Math.min(this.clientWidth/this.width,this.clientHeight/this.height);e>0&&this.style.setProperty("--deck-scale",String(e)),this._zoom>1&&(this._clampPan(),this._applyZoom())};this._resizeObserver=null;this._panning=!1;this._panLastX=0;this._panLastY=0;this._onPanDown=e=>{this._zoom<=1||!this._zoomEnabled()||e.pointerType==="mouse"&&e.button!==0||e.target?.closest("a, button, input, textarea, select, [contenteditable]")||(this._panning=!0,this._panLastX=e.clientX,this._panLastY=e.clientY,this.toggleAttribute("data-panning",!0),this.setPointerCapture?.(e.pointerId))};this._onPanMove=e=>{this._panning&&(this._panBy(e.clientX-this._panLastX,e.clientY-this._panLastY),this._panLastX=e.clientX,this._panLastY=e.clientY)};this._onPanUp=e=>{this._panning&&(this._panning=!1,this.toggleAttribute("data-panning",!1),this.releasePointerCapture?.(e.pointerId))};this._onHoverEnter=()=>{this._autoplayPaused=!0,this._stopAutoplay()};this._onHoverLeave=()=>{this._autoplayPaused=!1,this.autoplay>0&&this._startAutoplay()};this._onPointerDown=e=>{!this.swipe||e.pointerType==="mouse"&&e.button!==0||e.target?.closest("a, button, input, textarea, [contenteditable]")||(this._swipePointerId=e.pointerId,this._swipeStartX=e.clientX,this._swipeStartY=e.clientY)};this._onPointerUp=e=>{if(this._swipePointerId===null||e.pointerId!==this._swipePointerId)return;if(this._zoom>1){this._swipePointerId=null;return}let r=e.clientX-this._swipeStartX,i=e.clientY-this._swipeStartY;this._swipePointerId=null,!(Math.abs(r)<60||Math.abs(r)<Math.abs(i)*2)&&(this._stopAutoplay(),r<0?this._advance():this._back(),this._restartAutoplay())};this._onNavPointerDown=e=>{this._navDownX=e.clientX,this._navDownY=e.clientY};this._onClickNav=e=>{if(!this._mouseEnabled("click")||this.overview||this.blank||this._zoom>1||this.shadowRoot?.querySelector("#kb-overlay.open")||Math.hypot(e.clientX-this._navDownX,e.clientY-this._navDownY)>5)return;let r=window.getSelection();r&&!r.isCollapsed||e.composedPath().some(n=>n instanceof HTMLElement?n.matches?.("a, button, input, textarea, select, [contenteditable], [data-no-advance]")?!0:n.id==="blank"||n.id==="kb-overlay"||n.id==="overview-grid"||n.id==="nav-arrows"||n.id==="kb-hint":!1)||(this._restartAutoplay(),e.shiftKey?this._back():this._advance())};this._onWheel=e=>{if(e.ctrlKey||e.metaKey){if(!this._zoomEnabled())return;e.preventDefault(),this._zoomAt(Math.exp(-e.deltaY*y.ZOOM_WHEEL_SENSITIVITY),e.clientX,e.clientY);return}if(this._zoom>1&&this._zoomEnabled()){e.preventDefault(),this._panBy(-e.deltaX,-e.deltaY);return}if(!this._mouseEnabled("wheel")||this.overview||this.blank||this._wheelTargetScrolls(e))return;e.preventDefault();let r=performance.now();if(r<this._wheelLockUntil||(this._wheelAccum+=e.deltaY,Math.abs(this._wheelAccum)<50))return;let i=this._wheelAccum>0;this._wheelAccum=0,this._wheelLockUntil=r+400,this._restartAutoplay(),i?this._advance():this._back()};this._onAuxUp=e=>{this._mouseEnabled("aux")&&(e.button!==3&&e.button!==4||(e.preventDefault(),this._restartAutoplay(),e.button===3?this._back():this._advance()))};this._onAuxClick=e=>{this._mouseEnabled("aux")&&(e.button===3||e.button===4)&&e.preventDefault()};this._onHash=()=>{this._readHash(!1)};this._onKey=e=>{if(!(e.target&&e.target.matches?.("input,textarea,[contenteditable]"))){if(this._restartAutoplay(),this.overview){(e.key==="Escape"||e.key==="o"||e.key==="O"||e.key==="Enter")&&(e.preventDefault(),this.overview=!1);return}if(this.blank){e.preventDefault(),this.blank=null;return}if(e.key==="."||e.key==="b"||e.key==="B"){e.preventDefault(),this.blank="black";return}if(e.key===","||e.key==="w"||e.key==="W"){e.preventDefault(),this.blank="white";return}if(this._zoomEnabled()&&(e.key==="+"||e.key==="="||e.key==="-")){e.preventDefault();let r=this.getBoundingClientRect(),i=r.left+r.width/2,n=r.top+r.height/2,o=e.key==="-"?1/y.ZOOM_STEP:y.ZOOM_STEP;this._zoomAt(o,i,n);return}if(e.key==="0"&&this._zoom>1){e.preventDefault(),this._resetZoom();return}if(e.key==="?"||e.key==="h"||e.key==="H"){this._toggleHelp();return}if(e.key==="Escape"){this._closeHelp();return}if(e.key==="o"||e.key==="O"){e.preventDefault(),this.overview=!0;return}if(e.key==="p"||e.key==="P"){e.preventDefault(),this._togglePresenter();return}if(e.key==="Home"){this._goTo(0);return}if(e.key==="End"){this._goTo(this.slides.length-1);return}if(e.key===" "||e.key==="PageDown"){e.preventDefault(),this._advance();return}if(e.key==="PageUp"){e.preventDefault(),this._back();return}if(this._has2DNav()){let{c:r,i}=this._coords(this.current);if(e.key==="ArrowRight"){e.preventDefault(),r+1<this.chapters.length?this._goToCoords(r+1,0):this._advance();return}if(e.key==="ArrowLeft"){e.preventDefault(),r-1>=0?this._goToCoords(r-1,0):this._back();return}if(e.key==="ArrowDown"){e.preventDefault();let n=this.chapters[r];n&&i+1<n.slides.length?this._goToCoords(r,i+1):this._advance();return}if(e.key==="ArrowUp"){e.preventDefault(),i-1>=0?this._goToCoords(r,i-1):this._back();return}}else{if(e.key==="ArrowRight"||e.key==="ArrowDown"){e.preventDefault(),this._advance();return}if(e.key==="ArrowLeft"||e.key==="ArrowUp"){e.preventDefault(),this._back();return}}}}}_context(){if(this._ctx)return this._ctx;let e=this;return this._ctx={host:e,get current(){return e.current},get step(){return e.step},get slides(){return e.slides},requestUpdate:()=>e.requestUpdate()},this._ctx}use(e){if(this._plugins.some(i=>i.name===e.name))return()=>{};e.navigate&&this._plugins.some(i=>i.navigate)&&console.warn(`[rikiki] plugin "${e.name}" has a navigate hook but another plugin already owns navigation \xB7 it will be ignored`),this._plugins.push(e);let r=e.setup?.(this._context());return this._applyStep(),this._updateUI(),()=>{let i=this._plugins.indexOf(e);i>=0&&this._plugins.splice(i,1),typeof r=="function"&&r()}}firstUpdated(){this._installRuntime(),this._scopeSlideStyles(),this.slides=Array.from(this.querySelectorAll(":scope > *")).filter(e=>e.tagName?.toLowerCase().startsWith("deck-")&&e.tagName?.toLowerCase()!=="deck-root"),this._buildChapters(),this._readHash(!0),this._applyActive(),this._applyStep(),this._updateUI(),this.requestUpdate()}_installRuntime(){this._applyCanvasVars(),this._applyScale(),this._resizeObserver=new ResizeObserver(this._applyScale),this._resizeObserver.observe(this),!this.preview&&(window.addEventListener("keydown",this._onKey),window.addEventListener("hashchange",this._onHash),this.addEventListener("pointerdown",this._onNavPointerDown),this.addEventListener("click",this._onClickNav),this.addEventListener("wheel",this._onWheel,{passive:!1}),this.addEventListener("pointerdown",this._onPanDown),this.addEventListener("pointermove",this._onPanMove),this.addEventListener("pointerup",this._onPanUp),this.addEventListener("pointercancel",this._onPanUp),window.addEventListener("mouseup",this._onAuxUp),window.addEventListener("auxclick",this._onAuxClick),this.autoplay>0&&this._startAutoplay(),this.swipe?(this.addEventListener("pointerdown",this._onPointerDown),this.addEventListener("pointerup",this._onPointerUp),this.addEventListener("pointercancel",this._onPointerUp),this.addEventListener("mouseenter",this._onHoverEnter),this.addEventListener("mouseleave",this._onHoverLeave)):this.autoplay>0&&(this.addEventListener("mouseenter",this._onHoverEnter),this.addEventListener("mouseleave",this._onHoverLeave)))}_scopeSlideStyles(){this.querySelectorAll("style[scoped]").forEach(e=>{e.dataset.rikScoped||(e.dataset.rikScoped="1",e.textContent=`@scope {
534
574
  ${e.textContent??""}
535
- }`)})}_applyCanvasVars(){let e=document.documentElement;e.style.setProperty("--deck-canvas-w",String(this.width)),e.style.setProperty("--deck-canvas-h",String(this.height))}disconnectedCallback(){super.disconnectedCallback(),this.fixed&&(document.documentElement.style.removeProperty("--deck-canvas-w"),document.documentElement.style.removeProperty("--deck-canvas-h")),window.removeEventListener("keydown",this._onKey),window.removeEventListener("hashchange",this._onHash),this.removeEventListener("pointerdown",this._onNavPointerDown),this.removeEventListener("click",this._onClickNav),this.removeEventListener("wheel",this._onWheel),window.removeEventListener("mouseup",this._onAuxUp),window.removeEventListener("auxclick",this._onAuxClick),this._stopAutoplay(),this.removeEventListener("pointerdown",this._onPointerDown),this.removeEventListener("pointerup",this._onPointerUp),this.removeEventListener("pointercancel",this._onPointerUp),this.removeEventListener("mouseenter",this._onHoverEnter),this.removeEventListener("mouseleave",this._onHoverLeave)}_startAutoplay(){this._stopAutoplay(),!(this.autoplay<=0||this._autoplayPaused)&&(this._autoplayTimer=window.setInterval(()=>this._autoTick(),this.autoplay))}_stopAutoplay(){this._autoplayTimer!==null&&(window.clearInterval(this._autoplayTimer),this._autoplayTimer=null)}_autoTick(){if(this.overview)return;this.current>=this.slides.length-1&&this.step>=this._maxSteps()&&this.loop?this._goTo(0):this._advance()}_restartAutoplay(){this.autoplay>0&&!this._autoplayPaused&&this._startAutoplay()}_wheelTargetScrolls(e){let r=e.deltaY>0,i=e.deltaX>0;for(let s of e.composedPath()){if(s===this)return!1;if(!(s instanceof Element))continue;let n=s.scrollHeight>s.clientHeight,a=s.scrollWidth>s.clientWidth;if(!n&&!a)continue;let l=getComputedStyle(s);if(n&&/auto|scroll/.test(l.overflowY)&&(r?s.scrollTop+s.clientHeight<s.scrollHeight-1:s.scrollTop>0)||a&&/auto|scroll/.test(l.overflowX)&&(i?s.scrollLeft+s.clientWidth<s.scrollWidth-1:s.scrollLeft>0))return!0}return!1}_buildChapters(){this.chapters=[];let e=null;this.slides.forEach((r,i)=>{r.tagName?.toLowerCase()==="deck-section"||!e?(e={startIdx:i,slides:[r]},this.chapters.push(e)):e.slides.push(r)})}_has2DNav(){return this.nav==="2d"&&this.chapters.length>1&&this.chapters.some(e=>e.slides.length>1)}_mouseEnabled(e){let r=(this.mouseNav??"all").trim();return r==="none"?!1:r===""||r==="all"?!0:r.split(/\s+/).includes(e)}_coords(e){for(let r=0;r<this.chapters.length;r++){let i=this.chapters[r],s=e-i.startIdx;if(s>=0&&s<i.slides.length)return{c:r,i:s}}return{c:0,i:0}}_flatFromCoords(e,r){let i=this.chapters[Math.max(0,Math.min(this.chapters.length-1,e))];return i?i.startIdx+Math.max(0,Math.min(i.slides.length-1,r)):0}_readHash(e){let r=location.hash,i=r.match(/^#(\d+)\.(\d+)(?:s(\d+))?$/),s=r.match(/^#(\d+)(?:\.(\d+))?$/),n=this.current,a=this.step;if(this._has2DNav()&&i){let h=parseInt(i[1],10)-1,p=parseInt(i[2],10)-1;n=this._flatFromCoords(Math.max(0,h),Math.max(0,p)),a=i[3]?parseInt(i[3],10):0}else if(s)n=parseInt(s[1],10)-1,a=s[2]?parseInt(s[2],10):0;else return;if(n===this.current&&a===this.step&&!e)return;this.current=Math.max(0,Math.min(this.slides.length-1,n));let l=this._maxSteps();this.step=l>0?Math.max(0,Math.min(l,a)):Math.max(0,a),e||(this._applyActive(),this._applyStep(),this._updateUI())}_writeHash(){let e=`#${this.current+1}`+(this.step>0?`.${this.step}`:"");if(location.hash!==e)try{history.replaceState(null,"",e)}catch{}}async _toggleHelp(){(await Promise.resolve().then(()=>(ot(),Et))).toggleHelp(this)}async _togglePresenter(){(await Promise.resolve().then(()=>(St(),dr))).installPresenter(this)}async _closeHelp(){(await Promise.resolve().then(()=>(ot(),Et))).closeHelp(this)}async _renderOverviewIfActive(){if(!this.overview){this._overviewTeardown?.(),this._overviewTeardown=null;return}let{mountOverview:e}=await Promise.resolve().then(()=>(Tt(),fr));this._overviewTeardown=e(this,{slides:this.slides,chapters:this.chapters,currentIdx:this.current,onPick:r=>{this.overview=!1,this._goTo(r)}})}_maxSteps(){let e=this.slides[this.current];if(!e)return 0;let r=parseInt(e.getAttribute("steps")||e.dataset?.steps||"0",10);if(r>0)return r;let i=e.querySelector("deck-code[step-groups]");if(i)try{return JSON.parse(i.getAttribute("step-groups")).length}catch{}return 0}_advance(){let e=this._maxSteps();this.step<e?(this.step++,this._applyStep(),this._updateUI(),this._writeHash()):this.current<this.slides.length-1?this._goTo(this.current+1):this.loop&&this._goTo(0)}_back(){this.step>0?(this.step--,this._applyStep(),this._updateUI(),this._writeHash()):this.current>0?(this._goTo(this.current-1),this.step=this._maxSteps(),this._applyStep(),this._updateUI(),this._writeHash()):this.loop&&(this._goTo(this.slides.length-1),this.step=this._maxSteps(),this._applyStep(),this._updateUI(),this._writeHash())}_goTo(e){this.current=Math.max(0,Math.min(this.slides.length-1,e)),this.step=0,this._applyActive(),this._applyStep(),this._updateUI(),this._writeHash()}_goToCoords(e,r){let i=Math.max(0,Math.min(this.chapters.length-1,e)),s=this.chapters[i];if(!s)return;let n=Math.max(0,Math.min(s.slides.length-1,r));this._goTo(this._flatFromCoords(i,n))}_applyActive(){let e=this.slides.find(i=>i.hasAttribute("active"))??null,r=this.slides[this.current]??null;this.slides.forEach((i,s)=>{let n=s===this.current;i.toggleAttribute("active",n),n&&i.querySelectorAll("deck-mermaid").forEach(a=>a.render?.())}),this.transition&&!this._transitionLoaded&&(this._transitionLoaded=!0,Promise.resolve().then(()=>(At(),gr)).then(i=>i.installTransitions(this))),e!==r&&this.dispatchEvent(new CustomEvent("slide-change",{detail:{current:r,previous:e},bubbles:!1}))}_applyStep(){let e=this.slides[this.current];e&&(e.applyStep?.(this.step),e.querySelectorAll("*").forEach(r=>r.applyStep?.(this.step)),e.querySelectorAll("[data-step-block]").forEach(r=>{let i=parseInt(r.dataset.stepBlock,10);r.style.transition="opacity 0.25s ease",r.style.opacity=this.step===0||i<=this.step?"1":"0.15"}))}_updateUI(){let e=this.slides.length,r=this.current+1,i=this.renderRoot.querySelector("#progress"),s=this.renderRoot.querySelector("#counter"),n=this.renderRoot.querySelector("#step-dots");i&&(i.style.width=r/e*100+"%"),s&&(s.textContent=`${r} / ${e}`);let a=this._maxSteps();n&&(n.innerHTML=a===0?"":Array.from({length:a},(l,h)=>`<div class="dot${h<this.step?" active":""}"></div>`).join(""))}updated(){this._updateUI(),this._renderOverviewIfActive()}_navArrows(){if(this.noArrows||!this._mouseEnabled("arrows")||this.overview)return"";let e=this.slides.length;if(e===0)return"";let r=this.current===0&&this.step===0,i=this.current>=e-1&&this.step>=this._maxSteps();if(this._has2DNav()){let{c:s,i:n}=this._coords(this.current),a=this.chapters[s];return f`<div id="nav-arrows"> <button class="nav-btn" title="Previous chapter" ?disabled=${!this.loop&&this.current===0} @click=${()=>s>0?this._goToCoords(s-1,0):this._back()}>&lsaquo;</button> <button class="nav-btn" title="Up" ?disabled=${n===0} @click=${()=>this._goToCoords(s,n-1)}>&uarr;</button> <button class="nav-btn" title="Down" ?disabled=${!a||n+1>=a.slides.length} @click=${()=>this._goToCoords(s,n+1)}>&darr;</button> <button class="nav-btn" title="Next chapter" ?disabled=${!this.loop&&i} @click=${()=>s+1<this.chapters.length?this._goToCoords(s+1,0):this._advance()}>&rsaquo;</button> </div>`}return f`<div id="nav-arrows"> <button class="nav-btn" title="Previous" ?disabled=${!this.loop&&r} @click=${()=>this._back()}>&lsaquo;</button> <button class="nav-btn" title="Next" ?disabled=${!this.loop&&i} @click=${()=>this._advance()}>&rsaquo;</button> </div>`}render(){return f`<div id="progress"></div> <div id="counter"></div> <div id="step-dots"></div> ${this.noHint?"":f`
575
+ }`)})}_effectiveFluid(){return this.fluid||(this.slides[this.current]?.hasAttribute("fluid")??!1)}_applySlideFluid(){let e=!this.fluid&&(this.slides[this.current]?.hasAttribute("fluid")??!1);this.toggleAttribute("unfixed",e),this._applyCanvasVars(),this._applyScale()}_applyCanvasVars(){let e=document.documentElement;if(this._effectiveFluid()){e.style.removeProperty("--deck-canvas-w"),e.style.removeProperty("--deck-canvas-h");return}e.style.setProperty("--deck-canvas-w",String(this.width)),e.style.setProperty("--deck-canvas-h",String(this.height))}_zoomEnabled(){return!this.noZoom&&!this._effectiveFluid()&&!this.overview&&!this.blank}_applyZoom(){this.style.setProperty("--deck-zoom",String(this._zoom)),this.style.setProperty("--deck-pan-x",`${this._panX}px`),this.style.setProperty("--deck-pan-y",`${this._panY}px`),this.toggleAttribute("data-zoomed",this._zoom>1)}_clampPan(){let r=(this.clientWidth&&this.clientHeight?Math.min(this.clientWidth/this.width,this.clientHeight/this.height):1)*this._zoom,i=Math.max(0,(this.width*r-this.clientWidth)/2),n=Math.max(0,(this.height*r-this.clientHeight)/2);this._panX=Math.max(-i,Math.min(i,this._panX)),this._panY=Math.max(-n,Math.min(n,this._panY))}_zoomAt(e,r,i){if(!this._zoomEnabled())return;let n=this._zoom,o=Math.max(1,Math.min(y.ZOOM_MAX,n*e));if(o===n)return;let a=this.getBoundingClientRect(),l=a.left+a.width/2,u=a.top+a.height/2,p=o/n;this._panX+=(r-l-this._panX)*(1-p),this._panY+=(i-u-this._panY)*(1-p),this._zoom=o,this._clampPan(),this._applyZoom()}_resetZoom(){this._zoom===1&&this._panX===0&&this._panY===0||(this._zoom=1,this._panX=0,this._panY=0,this._applyZoom())}_panBy(e,r){this._panX+=e,this._panY+=r,this._clampPan(),this._applyZoom()}_applyLetterbox(e){if(this._effectiveFluid()){this.style.removeProperty("--deck-letterbox-bg");return}let r=e?getComputedStyle(e).backgroundColor:"";r&&cr(r)?this.style.setProperty("--deck-letterbox-bg",r):this.style.removeProperty("--deck-letterbox-bg")}static _injectGlobals(){if(typeof document>"u"||document.getElementById("rik-deck-globals"))return;let e=document.createElement("style");e.id="rik-deck-globals",e.textContent="html:has(> body > deck-root){overflow:hidden;height:100%}html:has(> body > deck-root) body{margin:0;overflow:hidden;height:100%}html:has(> body > deck-root:not([fluid])){font-size:calc(var(--deck-canvas-h,1080)*0.0235px)}html:has(> body > deck-root[fluid]){font-size:clamp(14px,2.35vh,42px)}html:has(> body > deck-root[unfixed]){font-size:clamp(14px,2.35vh,42px)}",document.head.appendChild(e)}connectedCallback(){super.connectedCallback(),y._injectGlobals(),this.hasUpdated&&this._installRuntime()}disconnectedCallback(){super.disconnectedCallback(),document.documentElement.style.removeProperty("--deck-canvas-w"),document.documentElement.style.removeProperty("--deck-canvas-h"),document.querySelector("deck-root")||document.getElementById("rik-deck-globals")?.remove(),this._resizeObserver?.disconnect(),this._resizeObserver=null,window.removeEventListener("keydown",this._onKey),window.removeEventListener("hashchange",this._onHash),this.removeEventListener("pointerdown",this._onNavPointerDown),this.removeEventListener("click",this._onClickNav),this.removeEventListener("wheel",this._onWheel),this.removeEventListener("pointerdown",this._onPanDown),this.removeEventListener("pointermove",this._onPanMove),this.removeEventListener("pointerup",this._onPanUp),this.removeEventListener("pointercancel",this._onPanUp),window.removeEventListener("mouseup",this._onAuxUp),window.removeEventListener("auxclick",this._onAuxClick),this._stopAutoplay(),this.removeEventListener("pointerdown",this._onPointerDown),this.removeEventListener("pointerup",this._onPointerUp),this.removeEventListener("pointercancel",this._onPointerUp),this.removeEventListener("mouseenter",this._onHoverEnter),this.removeEventListener("mouseleave",this._onHoverLeave),this._panning=!1,this.toggleAttribute("data-panning",!1)}_startAutoplay(){this._stopAutoplay(),!(this.autoplay<=0||this._autoplayPaused)&&(this._autoplayTimer=window.setInterval(()=>this._autoTick(),this.autoplay))}_stopAutoplay(){this._autoplayTimer!==null&&(window.clearInterval(this._autoplayTimer),this._autoplayTimer=null)}_autoTick(){if(this.overview)return;this.current>=this.slides.length-1&&this.step>=this._maxSteps()&&this.loop?this._goTo(0):this._advance()}_restartAutoplay(){this.autoplay>0&&!this._autoplayPaused&&this._startAutoplay()}_wheelTargetScrolls(e){let r=e.deltaY>0,i=e.deltaX>0;for(let n of e.composedPath()){if(n===this)return!1;if(!(n instanceof Element))continue;let o=n.scrollHeight>n.clientHeight,a=n.scrollWidth>n.clientWidth;if(!o&&!a)continue;let l=getComputedStyle(n);if(o&&/auto|scroll/.test(l.overflowY)&&(r?n.scrollTop+n.clientHeight<n.scrollHeight-1:n.scrollTop>0)||a&&/auto|scroll/.test(l.overflowX)&&(i?n.scrollLeft+n.clientWidth<n.scrollWidth-1:n.scrollLeft>0))return!0}return!1}_buildChapters(){this.chapters=[];let e=null;this.slides.forEach((r,i)=>{r.tagName?.toLowerCase()==="deck-section"||!e?(e={startIdx:i,slides:[r]},this.chapters.push(e)):e.slides.push(r)})}_has2DNav(){return this.nav==="2d"&&this.chapters.length>1&&this.chapters.some(e=>e.slides.length>1)}_mouseEnabled(e){let r=(this.mouseNav??"all").trim();return r==="none"?!1:r===""||r==="all"?!0:r.split(/\s+/).includes(e)}_coords(e){for(let r=0;r<this.chapters.length;r++){let i=this.chapters[r],n=e-i.startIdx;if(n>=0&&n<i.slides.length)return{c:r,i:n}}return{c:0,i:0}}_flatFromCoords(e,r){let i=this.chapters[Math.max(0,Math.min(this.chapters.length-1,e))];return i?i.startIdx+Math.max(0,Math.min(i.slides.length-1,r)):0}_readHash(e){let r=location.hash,i=r.match(/^#(\d+)\.(\d+)(?:s(\d+))?$/),n=r.match(/^#(\d+)(?:\.(\d+))?$/),o=this.current,a=this.step;if(this._has2DNav()&&i){let u=parseInt(i[1],10)-1,p=parseInt(i[2],10)-1;o=this._flatFromCoords(Math.max(0,u),Math.max(0,p)),a=i[3]?parseInt(i[3],10):0}else if(n)o=parseInt(n[1],10)-1,a=n[2]?parseInt(n[2],10):0;else return;if(o===this.current&&a===this.step&&!e)return;this.current=Math.max(0,Math.min(this.slides.length-1,o));let l=this._maxSteps();this.step=l>0?Math.max(0,Math.min(l,a)):Math.max(0,a),e||(this._resetZoom(),this._applyActive(),this._applyStep(),this._updateUI())}_writeHash(){let e=`#${this.current+1}${this.step>0?`.${this.step}`:""}`;if(location.hash!==e)try{history.replaceState(null,"",e)}catch{}}async _toggleHelp(){(await Promise.resolve().then(()=>(lt(),At))).toggleHelp(this)}async _togglePresenter(){(await Promise.resolve().then(()=>(zt(),br))).installPresenter(this)}async _closeHelp(){(await Promise.resolve().then(()=>(lt(),At))).closeHelp(this)}async _renderOverviewIfActive(){if(!this.overview){this._overviewTeardown?.(),this._overviewTeardown=null;return}let{mountOverview:e}=await Promise.resolve().then(()=>(Ct(),_r));this._overviewTeardown=e(this,{slides:this.slides,chapters:this.chapters,currentIdx:this.current,onPick:r=>{this.overview=!1,this._goTo(r)}})}_maxSteps(){let e=this._baseMaxSteps(),r=this.slides[this.current];if(r)for(let i of this._plugins)i.steps&&(e=Math.max(e,i.steps(r,this._context())));return e}_baseMaxSteps(){let e=this.slides[this.current];if(!e)return 0;let r=parseInt(e.getAttribute("steps")||e.dataset?.steps||"0",10);if(r>0)return r;let i=e.querySelector("deck-code[step-groups]");if(i)try{return JSON.parse(i.getAttribute("step-groups")).length}catch{}return 0}_advance(){let e=this._maxSteps();this.step<e?(this.step++,this._applyStep(),this._updateUI(),this._writeHash()):this.current<this.slides.length-1?this._goTo(this.current+1):this.loop&&this._goTo(0)}_back(){this.step>0?(this.step--,this._applyStep(),this._updateUI(),this._writeHash()):this.current>0?(this._goTo(this.current-1),this.step=this._maxSteps(),this._applyStep(),this._updateUI(),this._writeHash()):this.loop&&(this._goTo(this.slides.length-1),this.step=this._maxSteps(),this._applyStep(),this._updateUI(),this._writeHash())}_goTo(e){this._plugins.find(i=>i.navigate)?.navigate?.(e,this._context(),()=>this._goToNow(e))||this._goToNow(e)}_goToNow(e){this._resetZoom(),this.current=Math.max(0,Math.min(this.slides.length-1,e)),this.step=0,this._applyActive(),this._applyStep(),this._updateUI(),this._writeHash()}_goToCoords(e,r){let i=Math.max(0,Math.min(this.chapters.length-1,e)),n=this.chapters[i];if(!n)return;let o=Math.max(0,Math.min(n.slides.length-1,r));this._goTo(this._flatFromCoords(i,o))}_applyActive(){let e=this.slides.find(i=>i.hasAttribute("active"))??null,r=this.slides[this.current]??null;this.slides.forEach((i,n)=>{let o=n===this.current;i.toggleAttribute("active",o),o&&i.querySelectorAll("deck-mermaid").forEach(a=>{a.render?.()})}),this._applySlideFluid(),this._applyLetterbox(r),this.transition&&!this._transitionLoaded&&(this._transitionLoaded=!0,Promise.resolve().then(()=>(Pt(),$r)).then(i=>i.installTransitions(this))),e!==r&&this.dispatchEvent(new CustomEvent("slide-change",{detail:{current:r,previous:e},bubbles:!1}))}_applyStep(){let e=this.slides[this.current];if(e){e.applyStep?.(this.step),e.querySelectorAll("*").forEach(r=>{r.applyStep?.(this.step)}),e.querySelectorAll("[data-step-block]").forEach(r=>{let i=parseInt(r.dataset.stepBlock,10);r.style.transition="opacity 0.25s ease",r.style.opacity=this.step===0||i<=this.step?"1":"0.15"});for(let r of this._plugins)r.applyStep?.(this.step,e,this._context())}}_counterHidden(){let e=this.slides[this.current];return this.overview||this.blank!==null||e?.tagName.toLowerCase()==="deck-cover"}_updateUI(){let e=this.slides.length,r=this.current+1,i=this.renderRoot.querySelector("#progress"),n=this.renderRoot.querySelector("#counter"),o=this.renderRoot.querySelector("#step-dots");i&&(i.style.width=`${e>0?r/e*100:0}%`),n&&(n.textContent=`${r} / ${e}`);let a=this._maxSteps();o&&(o.innerHTML=a===0?"":Array.from({length:a},(l,u)=>`<div class="dot${u<this.step?" active":""}"></div>`).join(""))}updated(e){(e.has("width")||e.has("height")||e.has("fluid"))&&(this._applyCanvasVars(),this._applyScale()),e.has("fluid")&&this._applyLetterbox(this.slides[this.current]??null),(e.has("overview")&&this.overview||e.has("blank")&&this.blank||e.has("noZoom")&&this.noZoom||e.has("fluid")&&this.fluid)&&this._resetZoom(),this._updateUI(),this._renderOverviewIfActive()}_navArrows(){if(this.noArrows||this.presenterActive||!this._mouseEnabled("arrows")||this.overview)return"";let e=this.slides.length;if(e===0)return"";let r=this.current===0&&this.step===0,i=this.current>=e-1&&this.step>=this._maxSteps();if(this._has2DNav()){let{c:n,i:o}=this._coords(this.current),a=this.chapters[n];return m`<div id="nav-arrows"> <button class="nav-btn" title="Previous chapter" ?disabled=${!this.loop&&this.current===0} @click=${()=>n>0?this._goToCoords(n-1,0):this._back()}>&lsaquo;</button> <button class="nav-btn" title="Up" ?disabled=${o===0} @click=${()=>this._goToCoords(n,o-1)}>&uarr;</button> <button class="nav-btn" title="Down" ?disabled=${!a||o+1>=a.slides.length} @click=${()=>this._goToCoords(n,o+1)}>&darr;</button> <button class="nav-btn" title="Next chapter" ?disabled=${!this.loop&&i} @click=${()=>n+1<this.chapters.length?this._goToCoords(n+1,0):this._advance()}>&rsaquo;</button> </div>`}return m`<div id="nav-arrows"> <button class="nav-btn" title="Previous" ?disabled=${!this.loop&&r} @click=${()=>this._back()}>&lsaquo;</button> <button class="nav-btn" title="Next" ?disabled=${!this.loop&&i} @click=${()=>this._advance()}>&rsaquo;</button> </div>`}render(){return m`<div id="progress"></div> <div id="counter" class=${this._counterHidden()?"hidden":""}></div> <div id="step-dots"></div> ${this.noHint||this.presenterActive?"":m`
536
576
  <div id="kb-hint">
537
577
  <kbd title="Previous" @click=${()=>this._back()}>←</kbd
538
578
  ><kbd title="Next" @click=${()=>this._advance()}>→</kbd>
539
- ${this._has2DNav()?f`<kbd title="Previous" @click=${()=>this._back()}>↑</kbd ><kbd title="Next" @click=${()=>this._advance()}>↓</kbd>`:""}
579
+ ${this._has2DNav()?m`<kbd title="Previous" @click=${()=>this._back()}>↑</kbd ><kbd title="Next" @click=${()=>this._advance()}>↓</kbd>`:""}
540
580
  <span>·</span>
541
581
  <kbd title="Overview" @click=${()=>{this.overview=!this.overview}}>O</kbd>
542
582
  <span>·</span>
@@ -546,29 +586,29 @@ ${e.textContent??""}
546
586
  </div>`}
547
587
  ${this._navArrows()}
548
588
  <div id="stage"><slot></slot></div>
549
- ${this.blank?f`<div id="blank" data-tone="${this.blank}" @click=${()=>{this.blank=null}}></div>`:""}
550
- `}};S.styles=v`:host{display:block;width:100vw;height:100vh;position:relative;background:var(--deck-root-bg,var(--rik-surface-page))}#stage{position:absolute;inset:0}:host([fixed]){display:flex;align-items:center;justify-content:center;overflow:hidden;background:var(--deck-letterbox-bg,var(--deck-root-bg,var(--rik-surface-page)))}:host([fixed]) #stage{position:relative;inset:auto;width:min(100vw,calc(100vh * var(--deck-canvas-w,1920) / var(--deck-canvas-h,1080)));height:min(100vh,calc(100vw * var(--deck-canvas-h,1080) / var(--deck-canvas-w,1920)));container-type:size}#progress{position:fixed;bottom:0;left:0;height:var(--deck-root-progress-height,3px);background:var(--deck-root-progress-color,linear-gradient(90deg,var(--rik-accent),var(--rik-accent--soft)));transition:width 0.25s ease;z-index:100}#counter{position:fixed;bottom:1rem;right:1.5rem;font-size:var(--rik-font-size-xs);color:var(--deck-root-counter-color,var(--rik-text-default--faint));font-family:var(--rik-font-mono);z-index:100}#step-dots{position:fixed;bottom:1rem;left:50%;transform:translateX(-50%);display:flex;gap:6px;z-index:100}.dot{width:6px;height:6px;border-radius:50%;background:var(--deck-root-dot-bg,#d4d4d0);transition:background 0.2s}.dot.active{background:var(--deck-root-dot-active-bg,var(--rik-accent))}#kb-hint{position:fixed;bottom:1rem;left:1.5rem;display:inline-flex;align-items:center;gap:6px;font:600 0.62rem/1 var(--rik-font-mono);color:var(--deck-root-kb-hint-color,var(--rik-text-default--faint));z-index:100;opacity:0.5;transition:opacity 0.2s ease;cursor:help}#kb-hint:hover{opacity:1}#kb-hint kbd{background:var(--rik-surface-raised);border:1px solid var(--rik-border-default);border-bottom:2px solid var(--rik-border-default);border-radius:4px;padding:2px 6px;color:var(--rik-text-default);font:inherit;min-width:16px;text-align:center;cursor:pointer}#kb-hint kbd:hover{border-color:var(--rik-accent)}#kb-hint .sep{opacity:0.4}#nav-arrows{position:fixed;bottom:2.4rem;right:1.5rem;display:flex;gap:4px;z-index:100;opacity:var(--deck-root-nav-opacity,0.35);transition:opacity 0.2s ease}#nav-arrows:hover{opacity:1}.nav-btn{appearance:none;cursor:pointer;width:30px;height:30px;display:grid;place-items:center;font:700 1rem/1 var(--rik-font-mono);color:var(--deck-root-nav-color,var(--rik-text-default));background:var(--deck-root-nav-bg,var(--rik-surface-raised));border:1px solid var(--rik-border-default);border-radius:6px;padding:0}.nav-btn:hover:not(:disabled){border-color:var(--rik-accent)}.nav-btn:disabled{opacity:0.3;cursor:default}#blank{position:fixed;inset:0;z-index:9999;cursor:pointer}#blank[data-tone="black"]{background:#000}#blank[data-tone="white"]{background:#fff}`,c([B()],S.prototype,"current",2),c([B()],S.prototype,"step",2),c([B()],S.prototype,"blank",2),c([d({type:Boolean,reflect:!0})],S.prototype,"overview",2),c([d({type:Boolean,reflect:!0})],S.prototype,"fixed",2),c([d({type:Number})],S.prototype,"width",2),c([d({type:Number})],S.prototype,"height",2),c([d({type:Boolean,reflect:!0,attribute:"no-hint"})],S.prototype,"noHint",2),c([d({type:Boolean,reflect:!0,attribute:"no-arrows"})],S.prototype,"noArrows",2),c([d({type:String,reflect:!0})],S.prototype,"transition",2),c([d({type:Number,reflect:!0})],S.prototype,"autoplay",2),c([d({type:Boolean,reflect:!0})],S.prototype,"loop",2),c([d({type:Boolean,reflect:!0})],S.prototype,"swipe",2),c([d({type:String,reflect:!0,attribute:"mouse-nav"})],S.prototype,"mouseNav",2),c([d({type:String,reflect:!0})],S.prototype,"nav",2),S=c([k("deck-root")],S);At();ot();Tt();St();var We=class extends g{get notes(){return(this.textContent??"").trim()}render(){return f`<slot></slot>`}};We.styles=v`:host{display:none}`,We=c([k("deck-notes")],We);var Lt=v`:host{display:none;position:absolute;inset:0;padding:var(--rik-slide-padding-y) var(--rik-slide-padding-x);flex-direction:column;overflow:hidden;background:var(--rik-surface-page);font-family:var(--rik-font-sans);color:var(--rik-text-default)}:host([active]){display:flex}`,Ai=v`h1{font-size:var(--rik-font-size-h1);font-weight:700;color:var(--rik-text-default);letter-spacing:-0.022em;line-height:1.15;margin-bottom:var(--rik-space-4);padding-bottom:var(--rik-space-2);border-bottom:3px solid var(--rik-accent);display:inline-block;align-self:flex-start;flex:0 0 auto}h1 .accent{color:var(--rik-accent)}::slotted(p),p{font-size:var(--rik-font-size-body);line-height:1.65;color:var(--rik-text-default--muted);margin:0}::slotted(strong),strong{color:var(--rik-text-default);font-weight:700}::slotted(code),code{font-family:var(--rik-font-mono);font-size:var(--rik-font-size-mono-sm);background:rgba(0,0,0,0.06);padding:2px 6px;border-radius:var(--rik-radius-sm);color:var(--rik-text-default)}`,Li=v`.lbl{display:inline-block;padding:var(--deck-eyebrow-padding-y,4px) var(--deck-eyebrow-padding-x,12px);background:var(--deck-eyebrow-bg,var(--rik-accent));color:var(--deck-eyebrow-color,var(--rik-accent__on,var(--rik-surface-inverse)));border-radius:var(--deck-eyebrow-radius,var(--rik-radius-pill));font-size:var(--rik-font-size-xs);font-weight:700;letter-spacing:0.1em;text-transform:uppercase;margin-bottom:var(--rik-space-1);align-self:flex-start}.lead{font-size:var(--rik-font-size-lead);color:var(--rik-text-default--faint);line-height:1.5;margin-bottom:var(--rik-space-4);max-width:75ch;flex:0 0 auto}.kicker{font-size:var(--rik-font-size-xs);font-weight:700;letter-spacing:0.14em;text-transform:uppercase;color:var(--rik-text-default--faint);margin-bottom:var(--rik-space-3);display:block}.kicker.on-dark{color:rgba(255,255,255,0.35)}.caption{font-size:var(--rik-font-size-sm);color:var(--rik-text-default--faint);line-height:1.55}.caption.on-dark{color:rgba(255,255,255,0.5)}.col-label{font-size:var(--rik-font-size-xs);font-weight:700;letter-spacing:0.08em;text-transform:uppercase;color:var(--rik-text-default--faint);margin-bottom:var(--rik-space-2)}`,q=[Lt,Ai,Li];var z=class extends g{render(){let t=(this.brand??"").split("\xB7").map(n=>n.trim()).filter(Boolean),e=t[0]??"",r=t.slice(1).join(" \xB7 "),i=[this.speaker&&{l:this.speakerLabel??"Pr\xE9sent\xE9 par",v:this.speaker},this.company&&{l:this.companyLabel??"Entreprise",v:this.company},this.duration&&{l:this.durationLabel??"Dur\xE9e",v:this.duration},this.audience&&{l:this.audienceLabel??"Audience",v:this.audience},this.runtime&&{l:this.runtimeLabel??"Runtime",v:this.runtime}].filter(n=>!!n),s=!!this.brandSrc;return f`<div class="brand" part="brand"> ${s?f`<span class="brand-tile"><img src="${this.brandSrc}" alt="${e}"></span>`:""}
551
- ${e?f`<span class="brand-name">${e}</span>`:""}
552
- ${r?f`<span class="brand-context">${r}</span>`:""}
589
+ ${this.blank?m`<div id="blank" data-tone="${this.blank}" @click=${()=>{this.blank=null}}></div>`:""}
590
+ `}};y.styles=v`:host{display:flex;align-items:center;justify-content:center;width:100%;height:100%;overflow:hidden;background:var(--deck-letterbox-bg,var(--deck-root-bg,var(--rik-surface-page)))}#stage{flex:none;width:calc(var(--deck-canvas-w,1920) * 1px);height:calc(var(--deck-canvas-h,1080) * 1px);transform:translate(var(--deck-pan-x,0px),var(--deck-pan-y,0px)) scale(calc(var(--deck-scale,1) * var(--deck-zoom,1)));transform-origin:center center;container-type:size}:host([fluid]) #stage,:host([unfixed]) #stage{width:100%;height:100%;transform:none}:host([data-zoomed]){cursor:grab}:host([data-zoomed][data-panning]){cursor:grabbing}#progress{position:fixed;bottom:0;left:0;height:var(--deck-root-progress-height,3px);background:var(--deck-root-progress-color,linear-gradient(90deg,var(--rik-accent),var(--rik-accent--soft)));transition:width 0.25s ease;z-index:100}#counter{position:fixed;bottom:1rem;right:1.5rem;font-size:var(--rik-font-size-xs);color:var(--deck-root-counter-color,var(--rik-text-default--faint));font-family:var(--rik-font-mono);z-index:100}:host([no-counter]) #counter{display:none}#counter.hidden{display:none}#step-dots{position:fixed;bottom:1rem;left:50%;transform:translateX(-50%);display:flex;gap:6px;z-index:100}.dot{width:6px;height:6px;border-radius:50%;background:var(--deck-root-dot-bg,#d4d4d0);transition:background 0.2s}.dot.active{background:var(--deck-root-dot-active-bg,var(--rik-accent))}#kb-hint{position:fixed;bottom:1rem;left:1.5rem;display:inline-flex;align-items:center;gap:6px;font:600 0.62rem/1 var(--rik-font-mono);color:var(--deck-root-kb-hint-color,var(--rik-text-default--faint));z-index:100;opacity:0.5;transition:opacity 0.2s ease;cursor:help}#kb-hint:hover{opacity:1}#kb-hint kbd{background:var(--rik-surface-raised);border:1px solid var(--rik-border-default);border-bottom:2px solid var(--rik-border-default);border-radius:4px;padding:2px 6px;color:var(--rik-text-default);font:inherit;min-width:16px;text-align:center;cursor:pointer}#kb-hint kbd:hover{border-color:var(--rik-accent)}#kb-hint .sep{opacity:0.4}#nav-arrows{position:fixed;bottom:2.4rem;right:1.5rem;display:flex;gap:4px;z-index:100;opacity:var(--deck-root-nav-opacity,0.35);transition:opacity 0.2s ease}#nav-arrows:hover{opacity:1}.nav-btn{appearance:none;cursor:pointer;width:30px;height:30px;display:grid;place-items:center;font:700 1rem/1 var(--rik-font-mono);color:var(--deck-root-nav-color,var(--rik-text-default));background:var(--deck-root-nav-bg,var(--rik-surface-raised));border:1px solid var(--rik-border-default);border-radius:6px;padding:0}.nav-btn:hover:not(:disabled){border-color:var(--rik-accent)}.nav-btn:disabled{opacity:0.3;cursor:default}#blank{position:fixed;inset:0;z-index:9999;cursor:pointer}#blank[data-tone="black"]{background:#000}#blank[data-tone="white"]{background:#fff}`,y.ZOOM_MAX=4,y.ZOOM_STEP=1.25,y.ZOOM_WHEEL_SENSITIVITY=.002,c([j()],y.prototype,"current",2),c([j()],y.prototype,"step",2),c([j()],y.prototype,"blank",2),c([j()],y.prototype,"presenterActive",2),c([d({type:Boolean,reflect:!0})],y.prototype,"overview",2),c([d({type:Boolean,reflect:!0})],y.prototype,"fluid",2),c([d({type:Number})],y.prototype,"width",2),c([d({type:Number})],y.prototype,"height",2),c([d({type:Boolean,reflect:!0,attribute:"no-hint"})],y.prototype,"noHint",2),c([d({type:Boolean,reflect:!0,attribute:"no-arrows"})],y.prototype,"noArrows",2),c([d({type:Boolean,reflect:!0,attribute:"no-counter"})],y.prototype,"noCounter",2),c([d({type:Boolean,reflect:!0})],y.prototype,"preview",2),c([d({type:Boolean,reflect:!0,attribute:"no-zoom"})],y.prototype,"noZoom",2),c([d({type:String,reflect:!0})],y.prototype,"transition",2),c([d({type:Number,reflect:!0})],y.prototype,"autoplay",2),c([d({type:Boolean,reflect:!0})],y.prototype,"loop",2),c([d({type:Boolean,reflect:!0})],y.prototype,"swipe",2),c([d({type:String,reflect:!0,attribute:"mouse-nav"})],y.prototype,"mouseNav",2),c([d({type:String,reflect:!0})],y.prototype,"nav",2),y=c([k("deck-root")],y);Pt();lt();Ct();zt();var Xe=class extends g{get notes(){return(this.textContent??"").trim()}render(){return m`<slot></slot>`}};Xe.styles=v`:host{display:none}`,Xe=c([k("deck-notes")],Xe);var Mt=v`:host{display:none;position:absolute;inset:0;padding:var(--rik-slide-padding-y) var(--rik-slide-padding-x);flex-direction:column;overflow:hidden;background:var(--rik-surface-page);font-family:var(--rik-font-sans);color:var(--rik-text-default)}:host([active]){display:flex}`,Xi=v`h1{font-size:var(--rik-font-size-h1);font-weight:700;color:var(--rik-text-default);letter-spacing:-0.022em;line-height:1.15;margin-bottom:var(--rik-space-4);padding-bottom:var(--rik-space-2);border-bottom:3px solid var(--rik-accent);display:inline-block;align-self:flex-start;flex:0 0 auto}h1 .accent{color:var(--rik-accent)}::slotted(p),p{font-size:var(--rik-font-size-body);line-height:1.65;color:var(--rik-text-default--muted);margin:0}::slotted(strong),strong{color:var(--rik-text-default);font-weight:700}::slotted(code),code{font-family:var(--rik-font-mono);font-size:var(--rik-font-size-mono-sm);background:rgba(0,0,0,0.06);padding:2px 6px;border-radius:var(--rik-radius-sm);color:var(--rik-text-default)}`,Zi=v`.lbl{display:inline-block;padding:var(--deck-eyebrow-padding-y,4px) var(--deck-eyebrow-padding-x,12px);background:var(--deck-eyebrow-bg,var(--rik-accent));color:var(--deck-eyebrow-color,var(--rik-accent__on,var(--rik-surface-inverse)));border-radius:var(--deck-eyebrow-radius,var(--rik-radius-pill));font-size:var(--rik-font-size-xs);font-weight:700;letter-spacing:0.1em;text-transform:uppercase;margin-bottom:var(--rik-space-1);align-self:flex-start}.lead{font-size:var(--rik-font-size-lead);color:var(--rik-text-default--faint);line-height:1.5;margin-bottom:var(--rik-space-4);max-width:75ch;flex:0 0 auto}.kicker{font-size:var(--rik-font-size-xs);font-weight:700;letter-spacing:0.14em;text-transform:uppercase;color:var(--rik-text-default--faint);margin-bottom:var(--rik-space-3);display:block}.kicker.on-dark{color:rgba(255,255,255,0.35)}.caption{font-size:var(--rik-font-size-sm);color:var(--rik-text-default--faint);line-height:1.55}.caption.on-dark{color:rgba(255,255,255,0.5)}.col-label{font-size:var(--rik-font-size-xs);font-weight:700;letter-spacing:0.08em;text-transform:uppercase;color:var(--rik-text-default--faint);margin-bottom:var(--rik-space-2)}`,U=[Mt,Xi,Zi];var z=class extends g{render(){let t=(this.brand??"").split("\xB7").map(o=>o.trim()).filter(Boolean),e=t[0]??"",r=t.slice(1).join(" \xB7 "),i=[this.speaker&&{l:this.speakerLabel??"Pr\xE9sent\xE9 par",v:this.speaker},this.company&&{l:this.companyLabel??"Entreprise",v:this.company},this.duration&&{l:this.durationLabel??"Dur\xE9e",v:this.duration},this.audience&&{l:this.audienceLabel??"Audience",v:this.audience},this.runtime&&{l:this.runtimeLabel??"Runtime",v:this.runtime}].filter(o=>!!o),n=!!this.brandSrc;return m`<div class="brand" part="brand"> ${n?m`<span class="brand-tile"><img src="${this.brandSrc}" alt="${e}"></span>`:""}
591
+ ${e?m`<span class="brand-name">${e}</span>`:""}
592
+ ${r?m`<span class="brand-context">${r}</span>`:""}
553
593
  </div>
554
594
  <slot></slot>
555
- ${i.length?f`<div class="meta" part="meta"> ${i.map(n=>f`
556
- <div class="meta-item"><strong>${n.l}</strong><span>${n.v}</span></div>
595
+ ${i.length?m`<div class="meta" part="meta"> ${i.map(o=>m`
596
+ <div class="meta-item"><strong>${o.l}</strong><span>${o.v}</span></div>
557
597
  `)}
558
598
  </div>`:""}
559
- `}};z.styles=[...q,v`:host{background:var(--deck-cover-bg,var(--rik-surface-inverse));justify-content:center;color:var(--deck-cover-text,var(--rik-text-inverse))}.brand{display:inline-flex;align-items:center;gap:var(--rik-space-3);margin-bottom:var(--rik-space-5);align-self:flex-start}.brand-tile{width:2.5rem;height:2.5rem;display:inline-flex;align-items:center;justify-content:center}.brand-tile img{width:100%;height:100%;display:block}.brand-name{font-family:var(--rik-font-display,inherit);font-size:var(--rik-font-size-xs);font-weight:700;letter-spacing:0.2em;text-transform:uppercase;color:var(--deck-cover-soft,var(--rik-text-inverse--muted))}.brand-context{font-size:var(--rik-font-size-xs);font-weight:700;color:var(--deck-cover-muted,var(--rik-text-inverse--faint));letter-spacing:0.2em;text-transform:uppercase;padding-left:var(--rik-space-3);border-left:1px solid var(--deck-cover-border,var(--rik-border-inverse))}::slotted(h1){font-size:clamp(3.6rem,9cqw,8.5rem);font-weight:900;color:var(--deck-cover-text,var(--rik-text-inverse));line-height:1.02;letter-spacing:-0.035em;margin-bottom:var(--rik-space-4);border:none;padding:0}::slotted(.sub){font-size:var(--rik-font-size-h2);color:var(--deck-cover-muted,var(--rik-text-inverse--faint));margin-bottom:var(--rik-space-6);max-width:60ch;line-height:1.45;display:block}.meta{display:flex;gap:var(--rik-space-6);border-top:1px solid var(--deck-cover-border,var(--rik-border-inverse));padding-top:var(--rik-space-4)}.meta-item strong{display:block;font-size:var(--rik-font-size-xs);letter-spacing:0.12em;text-transform:uppercase;color:var(--deck-cover-faint,var(--rik-text-inverse--ghost));margin-bottom:6px;font-weight:700}.meta-item span{color:var(--deck-cover-text,var(--rik-text-inverse));font-size:var(--rik-font-size-body);font-weight:600}`],c([d({type:String})],z.prototype,"brand",2),c([d({type:String,attribute:"brand-src"})],z.prototype,"brandSrc",2),c([d({type:String})],z.prototype,"speaker",2),c([d({type:String})],z.prototype,"company",2),c([d({type:String})],z.prototype,"duration",2),c([d({type:String})],z.prototype,"audience",2),c([d({type:String})],z.prototype,"runtime",2),c([d({type:String,attribute:"speaker-label"})],z.prototype,"speakerLabel",2),c([d({type:String,attribute:"company-label"})],z.prototype,"companyLabel",2),c([d({type:String,attribute:"duration-label"})],z.prototype,"durationLabel",2),c([d({type:String,attribute:"audience-label"})],z.prototype,"audienceLabel",2),c([d({type:String,attribute:"runtime-label"})],z.prototype,"runtimeLabel",2),z=c([k("deck-cover")],z);var xe=class extends g{render(){return f`${this.num?f`<div class="sec-num" part="num">${this.num}</div>`:""}
599
+ `}};z.styles=[...U,v`:host{background:var(--deck-cover-bg,var(--rik-surface-inverse));justify-content:center;color:var(--deck-cover-text,var(--rik-text-inverse))}.brand{display:inline-flex;align-items:center;gap:var(--rik-space-3);margin-bottom:var(--rik-space-5);align-self:flex-start}.brand-tile{width:2.5rem;height:2.5rem;display:inline-flex;align-items:center;justify-content:center}.brand-tile img{width:100%;height:100%;display:block}.brand-name{font-family:var(--rik-font-display,inherit);font-size:var(--rik-font-size-xs);font-weight:700;letter-spacing:0.2em;text-transform:uppercase;color:var(--deck-cover-soft,var(--rik-text-inverse--muted))}.brand-context{font-size:var(--rik-font-size-xs);font-weight:700;color:var(--deck-cover-muted,var(--rik-text-inverse--faint));letter-spacing:0.2em;text-transform:uppercase;padding-left:var(--rik-space-3);border-left:1px solid var(--deck-cover-border,var(--rik-border-inverse))}::slotted(h1){font-size:clamp(3.6rem,9cqw,8.5rem);font-weight:900;color:var(--deck-cover-text,var(--rik-text-inverse));line-height:1.02;letter-spacing:-0.035em;margin-bottom:var(--rik-space-4);border:none;padding:0}::slotted(.sub){font-size:var(--rik-font-size-h2);color:var(--deck-cover-muted,var(--rik-text-inverse--faint));margin-bottom:var(--rik-space-6);max-width:60ch;line-height:1.45;display:block}.meta{display:flex;gap:var(--rik-space-6);border-top:1px solid var(--deck-cover-border,var(--rik-border-inverse));padding-top:var(--rik-space-4)}.meta-item strong{display:block;font-size:var(--rik-font-size-xs);letter-spacing:0.12em;text-transform:uppercase;color:var(--deck-cover-faint,var(--rik-text-inverse--ghost));margin-bottom:6px;font-weight:700}.meta-item span{color:var(--deck-cover-text,var(--rik-text-inverse));font-size:var(--rik-font-size-body);font-weight:600}`],c([d({type:String})],z.prototype,"brand",2),c([d({type:String,attribute:"brand-src"})],z.prototype,"brandSrc",2),c([d({type:String})],z.prototype,"speaker",2),c([d({type:String})],z.prototype,"company",2),c([d({type:String})],z.prototype,"duration",2),c([d({type:String})],z.prototype,"audience",2),c([d({type:String})],z.prototype,"runtime",2),c([d({type:String,attribute:"speaker-label"})],z.prototype,"speakerLabel",2),c([d({type:String,attribute:"company-label"})],z.prototype,"companyLabel",2),c([d({type:String,attribute:"duration-label"})],z.prototype,"durationLabel",2),c([d({type:String,attribute:"audience-label"})],z.prototype,"audienceLabel",2),c([d({type:String,attribute:"runtime-label"})],z.prototype,"runtimeLabel",2),z=c([k("deck-cover")],z);var we=class extends g{render(){return m`${this.num?m`<div class="sec-num" part="num">${this.num}</div>`:""}
560
600
  <slot></slot>
561
- `}};xe.styles=[...q,v`:host{background:var(--deck-section-bg,var(--rik-surface-inverse));color:var(--rik-text-inverse);justify-content:center;align-items:center;text-align:center}.sec-num{font-size:var(--rik-font-size-xs);font-weight:700;letter-spacing:0.16em;text-transform:uppercase;color:var(--deck-section-num-color,var(--rik-text-inverse--ghost));margin-bottom:var(--rik-space-3);display:inline-flex;align-items:center;gap:0.8rem;font-family:var(--rik-font-mono)}.sec-num::before,.sec-num::after{content:'';width:1.25rem;height:1px;background:var(--deck-section-rule-color,var(--rik-border-inverse))}::slotted(h1){font-size:var(--rik-font-size-section);font-weight:900;color:var(--deck-section-title-color,var(--rik-accent));line-height:1.02;letter-spacing:-0.03em;max-width:18ch;border:none;padding:0;margin:0;text-align:center;align-self:center}::slotted(h1 em){color:var(--deck-section-em-color,var(--rik-text-inverse--muted));font-style:normal;font-weight:700}`],c([d({type:String})],xe.prototype,"num",2),xe=c([k("deck-section")],xe);var we=class extends g{render(){return f`${this.eyebrow?f`<span class="lbl">${this.eyebrow}</span>`:""}
601
+ `}};we.styles=[...U,v`:host{background:var(--deck-section-bg,var(--rik-surface-inverse));color:var(--rik-text-inverse);justify-content:center;align-items:center;text-align:center}.sec-num{font-size:var(--rik-font-size-xs);font-weight:700;letter-spacing:0.16em;text-transform:uppercase;color:var(--deck-section-num-color,var(--rik-text-inverse--ghost));margin-bottom:var(--rik-space-3);display:inline-flex;align-items:center;gap:0.8rem;font-family:var(--rik-font-mono)}.sec-num::before,.sec-num::after{content:'';width:1.25rem;height:1px;background:var(--deck-section-rule-color,var(--rik-border-inverse))}::slotted(h1){font-size:var(--rik-font-size-section);font-weight:900;color:var(--deck-section-title-color,var(--rik-accent));line-height:1.02;letter-spacing:-0.03em;max-width:18ch;border:none;padding:0;margin:0;text-align:center;align-self:center}::slotted(h1 em){color:var(--deck-section-em-color,var(--rik-text-inverse--muted));font-style:normal;font-weight:700}`],c([d({type:String})],we.prototype,"num",2),we=c([k("deck-section")],we);var _e=class extends g{render(){return m`${this.eyebrow?m`<span class="lbl">${this.eyebrow}</span>`:""}
562
602
  <slot name="title"></slot>
563
603
  <slot name="lead"></slot>
564
604
  <div class="body" part="body"><slot></slot></div>
565
- `}};we.styles=[...q,v`:host{justify-content:flex-start}.body{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:flex-start;gap:var(--rik-space-3);overflow:hidden}::slotted(deck-code:not([nested])),::slotted(deck-mermaid),::slotted(table),::slotted(pre),::slotted(svg),::slotted(.hero-main){max-height:100%;flex:0 1 auto}`],c([d({type:String})],we.prototype,"eyebrow",2),we=c([k("deck-feature")],we);var V=class extends g{_resolveSp(t){let e=parseInt(t,10);return!Number.isNaN(e)&&e>=1&&e<=6?`var(--rik-space-${e})`:t}updated(){this.gap&&this.style.setProperty("--_gap",this._resolveSp(this.gap)),this.colGap&&this.style.setProperty("--_col-gap",this._resolveSp(this.colGap))}render(){let t=this.querySelector('[slot="a"]'),e=this.cols==="3"||!!t;return f`${this.eyebrow?f`<span class="lbl">${this.eyebrow}</span>`:""}
605
+ `}};_e.styles=[...U,v`:host{justify-content:flex-start}.body{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:flex-start;gap:var(--rik-space-3);overflow:hidden}::slotted(deck-code:not([nested])),::slotted(deck-mermaid),::slotted(table),::slotted(pre),::slotted(svg),::slotted(.hero-main){max-height:100%;flex:0 1 auto}`],c([d({type:String})],_e.prototype,"eyebrow",2),_e=c([k("deck-feature")],_e);var V=class extends g{_resolveSp(t){let e=parseInt(t,10);return!Number.isNaN(e)&&e>=1&&e<=6?`var(--rik-space-${e})`:t}updated(){this.gap&&this.style.setProperty("--_gap",this._resolveSp(this.gap)),this.colGap&&this.style.setProperty("--_col-gap",this._resolveSp(this.colGap))}render(){let t=this.querySelector('[slot="a"]'),e=this.cols==="3"||!!t;return m`${this.eyebrow?m`<span class="lbl">${this.eyebrow}</span>`:""}
566
606
  <slot name="title"></slot>
567
607
  <slot name="lead"></slot>
568
608
  <div class="body" part="body">
569
- ${e?f`<div class="col" part="col"><slot name="a"></slot></div> <div class="col" part="col"><slot name="b"></slot></div> <div class="col" part="col"><slot name="c"></slot></div>`:f`<div class="col" part="col"><slot name="left"></slot></div> <div class="col" part="col"><slot name="right"></slot></div>`}
609
+ ${e?m`<div class="col" part="col"><slot name="a"></slot></div> <div class="col" part="col"><slot name="b"></slot></div> <div class="col" part="col"><slot name="c"></slot></div>`:m`<div class="col" part="col"><slot name="left"></slot></div> <div class="col" part="col"><slot name="right"></slot></div>`}
570
610
  </div>
571
- `}};V.styles=[...q,v`:host{justify-content:flex-start}.body{flex:1;min-height:0;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:minmax(0,1fr);gap:var(--_gap,var(--deck-split-gap,var(--rik-space-5)))}:host([cols="1-2"]) .body{grid-template-columns:1fr 2fr}:host([cols="2-1"]) .body{grid-template-columns:2fr 1fr}:host([cols="3"]) .body{grid-template-columns:1fr 1fr 1fr;gap:var(--_gap,var(--deck-split-gap,var(--rik-space-4)))}.col{display:flex;flex-direction:column;min-height:0;min-width:0;gap:var(--_col-gap,var(--deck-split-col-gap,var(--rik-space-3)));overflow:hidden}.col.center{justify-content:center}`],c([d({type:String})],V.prototype,"eyebrow",2),c([d({type:String})],V.prototype,"cols",2),c([d({type:String})],V.prototype,"gap",2),c([d({type:String,attribute:"col-gap"})],V.prototype,"colGap",2),V=c([k("deck-split")],V);var _e=class extends g{render(){return f`${this.eyebrow?f`<span class="lbl">${this.eyebrow}</span>`:""}
611
+ `}};V.styles=[...U,v`:host{justify-content:flex-start}.body{flex:1;min-height:0;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:minmax(0,1fr);gap:var(--_gap,var(--deck-split-gap,var(--rik-space-5)))}:host([cols="1-2"]) .body{grid-template-columns:1fr 2fr}:host([cols="2-1"]) .body{grid-template-columns:2fr 1fr}:host([cols="3"]) .body{grid-template-columns:1fr 1fr 1fr;gap:var(--_gap,var(--deck-split-gap,var(--rik-space-4)))}.col{display:flex;flex-direction:column;min-height:0;min-width:0;gap:var(--_col-gap,var(--deck-split-col-gap,var(--rik-space-3)));overflow:hidden}.col.center{justify-content:center}`],c([d({type:String})],V.prototype,"eyebrow",2),c([d({type:String})],V.prototype,"cols",2),c([d({type:String})],V.prototype,"gap",2),c([d({type:String,attribute:"col-gap"})],V.prototype,"colGap",2),V=c([k("deck-split")],V);var Ee=class extends g{render(){return m`${this.eyebrow?m`<span class="lbl">${this.eyebrow}</span>`:""}
572
612
  <slot name="title"></slot>
573
613
  <slot name="lead"></slot>
574
614
  <div class="hero" part="hero"><slot></slot></div>
@@ -576,42 +616,42 @@ ${e.textContent??""}
576
616
  <div class="col"><slot name="left"></slot></div>
577
617
  <div class="col"><slot name="right"></slot></div>
578
618
  </div>
579
- `}};_e.styles=[...q,v`:host{justify-content:flex-start}.hero{flex:var(--deck-feature-cards-hero-flex,1 1 50%);min-height:0;display:flex;flex-direction:column;overflow:hidden}::slotted(deck-code),::slotted(deck-mermaid),::slotted(pre),::slotted(table),::slotted(svg){max-height:100%;flex:1 1 auto}.detail{flex:var(--deck-feature-cards-detail-flex,0 1 40%);min-height:0;margin-top:var(--deck-feature-cards-gap,var(--rik-space-3));display:grid;grid-template-columns:1fr 1fr;gap:var(--deck-feature-cards-col-gap,var(--rik-space-4));overflow:hidden}.col{display:flex;flex-direction:column;gap:var(--rik-space-2);min-width:0;min-height:0;overflow:hidden}`],c([d({type:String})],_e.prototype,"eyebrow",2),_e=c([k("deck-feature-cards")],_e);var Y=class extends g{updated(){this.position&&this.style.setProperty("--_pos",this.position),typeof this.darken=="number"&&this.style.setProperty("--_dim",String(this.darken));let t=this.align==="top"?"flex-start":this.align==="bottom"?"flex-end":"center";if(this.style.setProperty("--_align",t),this.textAlign){this.style.setProperty("--_text-align",this.textAlign);let e=this.textAlign==="center"?"center":this.textAlign==="right"?"flex-end":"flex-start";this.style.setProperty("--_text-align-items",e)}}render(){let t=this.src?`background-image: url("${this.src.replace(/"/g,"%22")}")`:"";return f`<div class="bg" part="bg" style=${t}></div> <div class="overlay" part="overlay"></div> <div class="content" part="content"><slot></slot></div>`}};Y.styles=[Lt,v`:host{padding:0;color:var(--deck-photo-text-color,var(--rik-text-inverse));overflow:hidden}.bg{position:absolute;inset:0;background-size:cover;background-position:var(--_pos,center);background-repeat:no-repeat}.overlay{position:absolute;inset:0;background:var(--deck-photo-overlay-color,rgba(0,0,0,var(--_dim,0.35)))}.content{position:relative;z-index:1;display:flex;flex-direction:column;gap:var(--rik-space-3);padding:var(--deck-photo-padding-y,var(--rik-slide-padding-y)) var(--deck-photo-padding-x,var(--rik-slide-padding-x));width:100%;height:100%;max-width:100%;box-sizing:border-box;justify-content:var(--_align,center);text-align:var(--_text-align,left);align-items:var(--_text-align-items,flex-start)}.content > *{max-width:var(--deck-photo-content-max-width,36ch)}::slotted(h1){font-family:var(--rik-font-display,var(--rik-font-sans));font-size:clamp(2.5rem,6cqw,5.5rem);font-weight:900;letter-spacing:-0.035em;line-height:1.02;color:var(--deck-photo-text-color,var(--rik-text-inverse));margin:0;text-shadow:0 2px 16px rgba(0,0,0,0.35)}::slotted(h2){font-family:var(--rik-font-display,var(--rik-font-sans));font-size:clamp(1.6rem,3cqw,2.6rem);font-weight:800;letter-spacing:-0.025em;line-height:1.1;color:var(--deck-photo-text-color,var(--rik-text-inverse));margin:0;text-shadow:0 2px 12px rgba(0,0,0,0.35)}::slotted(p),::slotted(.sub){font-size:var(--rik-font-size-lead);color:var(--deck-photo-text-muted,var(--rik-text-inverse--muted));line-height:1.5;margin:0;text-shadow:0 1px 8px rgba(0,0,0,0.35)}::slotted(.kicker){font:700 var(--rik-font-size-xs)/1 var(--rik-font-mono);letter-spacing:0.18em;text-transform:uppercase;color:var(--deck-photo-text-muted,var(--rik-text-inverse--muted));margin:0}`],c([d({type:String})],Y.prototype,"src",2),c([d({type:String})],Y.prototype,"position",2),c([d({type:Number})],Y.prototype,"darken",2),c([d({type:String})],Y.prototype,"align",2),c([d({type:String,attribute:"text-align"})],Y.prototype,"textAlign",2),Y=c([k("deck-photo")],Y);var $e=class extends g{render(){return f`<div class="body" part="body"> ${this.kicker?f`<span class="kicker on-dark">${this.kicker}</span>`:""}
619
+ `}};Ee.styles=[...U,v`:host{justify-content:flex-start}.hero{flex:var(--deck-feature-cards-hero-flex,1 1 50%);min-height:0;display:flex;flex-direction:column;overflow:hidden}::slotted(deck-code),::slotted(deck-mermaid),::slotted(pre),::slotted(table),::slotted(svg){max-height:100%;flex:1 1 auto}.detail{flex:var(--deck-feature-cards-detail-flex,0 1 40%);min-height:0;margin-top:var(--deck-feature-cards-gap,var(--rik-space-3));display:grid;grid-template-columns:1fr 1fr;gap:var(--deck-feature-cards-col-gap,var(--rik-space-4));overflow:hidden}.col{display:flex;flex-direction:column;gap:var(--rik-space-2);min-width:0;min-height:0;overflow:hidden}`],c([d({type:String})],Ee.prototype,"eyebrow",2),Ee=c([k("deck-feature-cards")],Ee);var X=class extends g{updated(){this.position&&this.style.setProperty("--_pos",this.position),typeof this.darken=="number"&&this.style.setProperty("--_dim",String(this.darken));let t=this.align==="top"?"flex-start":this.align==="bottom"?"flex-end":"center";if(this.style.setProperty("--_align",t),this.textAlign){this.style.setProperty("--_text-align",this.textAlign);let e=this.textAlign==="center"?"center":this.textAlign==="right"?"flex-end":"flex-start";this.style.setProperty("--_text-align-items",e)}}render(){let t=this.src?`background-image: url("${this.src.replace(/"/g,"%22")}")`:"";return m`<div class="bg" part="bg" style=${t}></div> <div class="overlay" part="overlay"></div> <div class="content" part="content"><slot></slot></div>`}};X.styles=[Mt,v`:host{padding:0;color:var(--deck-photo-text-color,var(--rik-text-inverse));overflow:hidden}.bg{position:absolute;inset:0;background-size:cover;background-position:var(--_pos,center);background-repeat:no-repeat}.overlay{position:absolute;inset:0;background:var(--deck-photo-overlay-color,rgba(0,0,0,var(--_dim,0.35)))}.content{position:relative;z-index:1;display:flex;flex-direction:column;gap:var(--rik-space-3);padding:var(--deck-photo-padding-y,var(--rik-slide-padding-y)) var(--deck-photo-padding-x,var(--rik-slide-padding-x));width:100%;height:100%;max-width:100%;box-sizing:border-box;justify-content:var(--_align,center);text-align:var(--_text-align,left);align-items:var(--_text-align-items,flex-start)}.content > *{max-width:var(--deck-photo-content-max-width,36ch)}::slotted(h1){font-family:var(--rik-font-display,var(--rik-font-sans));font-size:clamp(2.5rem,6cqw,5.5rem);font-weight:900;letter-spacing:-0.035em;line-height:1.02;color:var(--deck-photo-text-color,var(--rik-text-inverse));margin:0;text-shadow:0 2px 16px rgba(0,0,0,0.35)}::slotted(h2){font-family:var(--rik-font-display,var(--rik-font-sans));font-size:clamp(1.6rem,3cqw,2.6rem);font-weight:800;letter-spacing:-0.025em;line-height:1.1;color:var(--deck-photo-text-color,var(--rik-text-inverse));margin:0;text-shadow:0 2px 12px rgba(0,0,0,0.35)}::slotted(p),::slotted(.sub){font-size:var(--rik-font-size-lead);color:var(--deck-photo-text-muted,var(--rik-text-inverse--muted));line-height:1.5;margin:0;text-shadow:0 1px 8px rgba(0,0,0,0.35)}::slotted(.kicker){font:700 var(--rik-font-size-xs)/1 var(--rik-font-mono);letter-spacing:0.18em;text-transform:uppercase;color:var(--deck-photo-text-muted,var(--rik-text-inverse--muted));margin:0}`],c([d({type:String})],X.prototype,"src",2),c([d({type:String})],X.prototype,"position",2),c([d({type:Number})],X.prototype,"darken",2),c([d({type:String})],X.prototype,"align",2),c([d({type:String,attribute:"text-align"})],X.prototype,"textAlign",2),X=c([k("deck-photo")],X);var $e=class extends g{render(){return m`<div class="body" part="body"> ${this.kicker?m`<span class="kicker on-dark">${this.kicker}</span>`:""}
580
620
  <slot></slot>
581
621
  </div>
582
- `}};$e.styles=[...q,v`:host{background:var(--deck-takeaway-bg,var(--rik-surface-inverse));color:var(--rik-text-inverse);justify-content:center;align-items:center;text-align:center}.body{display:flex;flex-direction:column;align-items:center;gap:var(--deck-takeaway-gap,var(--rik-space-4));max-width:75cqw}::slotted(.display){font-family:var(--rik-font-display,var(--rik-font-sans));font-size:clamp(3rem,7cqw,5.5rem);font-weight:900;color:var(--deck-takeaway-display-color,var(--rik-accent));letter-spacing:-0.03em;line-height:1.05;margin:0}::slotted(.display.danger){color:var(--rik-status-danger)}::slotted(.caption){font-size:var(--rik-font-size-lead);color:var(--deck-takeaway-caption-color,var(--rik-text-inverse--faint))}`],c([d({type:String})],$e.prototype,"kicker",2),$e=c([k("deck-takeaway")],$e);var vr={info:'<circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/>',warn:'<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><path d="M12 9v4"/><path d="M12 17h.01"/>',danger:'<circle cx="12" cy="12" r="10"/><path d="M12 8v4"/><path d="M12 16h.01"/>',ok:'<path d="M20 6 9 17l-5-5"/>'},Ee=class extends g{render(){let t=this.type??"info",e=vr[t]??vr.info;return f`<div class="icon-box"> <svg viewBox="0 0 24 24" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" .innerHTML="${e}"></svg> </div> <div class="content"><slot></slot></div>`}};Ee.styles=v`:host{display:flex;gap:var(--rik-space-3);padding:var(--deck-callout-padding-y,var(--rik-space-3)) var(--deck-callout-padding-x,var(--rik-space-4));border-radius:var(--deck-callout-radius,var(--rik-radius-md));background:var(--deck-callout-bg,var(--rik-status-info__bg--mid));border:1px solid var(--deck-callout-border,var(--rik-status-info__border));box-shadow:var(--rik-elevation-2);align-items:center;color:var(--rik-text-default--muted);font-family:var(--rik-font-sans);font-size:var(--rik-font-size-body);line-height:1.55}:host([type="info"]){--deck-callout-bg:var(--rik-status-info__bg--mid);--deck-callout-border:var(--rik-status-info__border);--deck-callout-stroke:var(--rik-accent)}:host([type="warn"]){--deck-callout-bg:var(--rik-status-warn__bg);--deck-callout-border:var(--rik-status-warn__border);--deck-callout-stroke:var(--rik-status-warn)}:host([type="danger"]){--deck-callout-bg:var(--rik-status-danger__bg);--deck-callout-border:var(--rik-status-danger__border);--deck-callout-stroke:var(--rik-status-danger)}:host([type="ok"]){--deck-callout-bg:var(--rik-status-success__bg);--deck-callout-border:var(--rik-status-success__border);--deck-callout-stroke:var(--rik-status-success)}.icon-box{flex-shrink:0;width:var(--rik-icon-2xl);height:var(--rik-icon-2xl);display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:var(--rik-surface-tint)}.icon-box svg{width:var(--rik-icon-lg);height:var(--rik-icon-lg);stroke:var(--deck-callout-stroke,var(--rik-accent));stroke-width:2.2}.content{flex:1}::slotted(p){margin:0}::slotted(strong){color:var(--rik-text-default);font-weight:700}::slotted(code){font-family:var(--rik-font-mono);font-size:var(--rik-font-size-mono-sm);background:var(--rik-surface-tint);padding:2px 6px;border-radius:var(--rik-radius-sm);color:var(--rik-text-default)}`,c([d({type:String})],Ee.prototype,"type",2),Ee=c([k("deck-callout")],Ee);var se=class extends g{constructor(){super(...arguments);this.center=!1;this.compact=!1}render(){return f`<slot></slot>`}};se.styles=v`:host{display:flex;flex-direction:column;gap:var(--deck-card-gap,var(--rik-space-2));background:var(--deck-card-bg,var(--rik-surface-raised--strong));border:1px solid var(--deck-card-border,var(--rik-border-default));border-radius:var(--deck-card-radius,var(--rik-radius-lg));padding:var(--deck-card-padding-y,var(--rik-space-3)) var(--deck-card-padding-x,var(--rik-space-4));box-shadow:var(--deck-card-shadow,var(--rik-elevation-2));min-height:0;font-family:var(--rik-font-sans);color:var(--deck-card-text,var(--rik-text-default--muted))}:host([color="yellow"]){background:var(--deck-card-bg,var(--rik-status-info__bg));border:4px solid var(--deck-card-border,var(--rik-status-info__border))}:host([color="orange"]){background:var(--deck-card-bg,var(--rik-status-warn__bg));border:4px solid var(--deck-card-border,var(--rik-status-warn__border))}:host([color="green"]){background:var(--deck-card-bg,var(--rik-status-success__bg));border:4px solid var(--deck-card-border,var(--rik-status-success__border))}:host([color="red"]){background:var(--deck-card-bg,var(--rik-status-danger__bg));border:4px solid var(--deck-card-border,var(--rik-status-danger__border))}::slotted(h3){font-family:var(--rik-font-display,var(--rik-font-sans));font-size:var(--rik-font-size-h2);font-weight:700;color:var(--deck-card-title-color,var(--rik-text-default));letter-spacing:-0.01em;line-height:1.25;margin:0}::slotted(p){font-size:var(--rik-font-size-body);line-height:1.55;margin:0}::slotted(strong){color:var(--rik-text-default);font-weight:700}:host([center]){text-align:center;align-items:center}:host([compact]){padding:var(--rik-space-2) var(--rik-space-3)}`,c([d({type:String})],se.prototype,"color",2),c([d({type:Boolean})],se.prototype,"center",2),c([d({type:Boolean})],se.prototype,"compact",2),se=c([k("deck-card")],se);function Mt(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var he=Mt();function _r(o){he=o}var $r=/[&<>"']/,zi=new RegExp($r.source,"g"),Er=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Ci=new RegExp(Er.source,"g"),Mi={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},kr=o=>Mi[o];function N(o,t){if(t){if($r.test(o))return o.replace(zi,kr)}else if(Er.test(o))return o.replace(Ci,kr);return o}var Hi=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Pi(o){return o.replace(Hi,(t,e)=>(e=e.toLowerCase(),e==="colon"?":":e.charAt(0)==="#"?e.charAt(1)==="x"?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""))}var Ii=/(^|[^\[])\^/g;function x(o,t){let e=typeof o=="string"?o:o.source;t=t||"";let r={replace:(i,s)=>{let n=typeof s=="string"?s:s.source;return n=n.replace(Ii,"$1"),e=e.replace(i,n),r},getRegex:()=>new RegExp(e,t)};return r}function br(o){try{o=encodeURI(o).replace(/%25/g,"%")}catch{return null}return o}var Ze={exec:()=>null};function yr(o,t){let e=o.replace(/\|/g,(s,n,a)=>{let l=!1,h=n;for(;--h>=0&&a[h]==="\\";)l=!l;return l?"|":" |"}),r=e.split(/ \|/),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,"|");return r}function lt(o,t,e){let r=o.length;if(r===0)return"";let i=0;for(;i<r;){let s=o.charAt(r-i-1);if(s===t&&!e)i++;else if(s!==t&&e)i++;else break}return o.slice(0,r-i)}function Ni(o,t){if(o.indexOf(t[1])===-1)return-1;let e=0;for(let r=0;r<o.length;r++)if(o[r]==="\\")r++;else if(o[r]===t[0])e++;else if(o[r]===t[1]&&(e--,e<0))return r;return-1}function xr(o,t,e,r){let i=t.href,s=t.title?N(t.title):null,n=o[1].replace(/\\([\[\]])/g,"$1");if(o[0].charAt(0)!=="!"){r.state.inLink=!0;let a={type:"link",raw:e,href:i,title:s,text:n,tokens:r.inlineTokens(n)};return r.state.inLink=!1,a}return{type:"image",raw:e,href:i,title:s,text:N(n)}}function Ri(o,t){let e=o.match(/^(\s+)(?:```)/);if(e===null)return t;let r=e[1];return t.split(`
583
- `).map(i=>{let s=i.match(/^\s+/);if(s===null)return i;let[n]=s;return n.length>=r.length?i.slice(r.length):i}).join(`
584
- `)}var Te=class{options;rules;lexer;constructor(t){this.options=t||he}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let r=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:lt(r,`
585
- `)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let r=e[0],i=Ri(r,e[3]||"");return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:i}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let r=e[2].trim();if(/#$/.test(r)){let i=lt(r,"#");(this.options.pedantic||!i||/ $/.test(i))&&(r=i.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:e[0]}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let r=e[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
586
- $1`);r=lt(r.replace(/^ *>[ \t]?/gm,""),`
587
- `);let i=this.lexer.state.top;this.lexer.state.top=!0;let s=this.lexer.blockTokens(r);return this.lexer.state.top=i,{type:"blockquote",raw:e[0],tokens:s,text:r}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim(),i=r.length>1,s={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let n=new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),a="",l="",h=!1;for(;t;){let p=!1;if(!(e=n.exec(t))||this.rules.block.hr.test(t))break;a=e[0],t=t.substring(a.length);let u=e[2].split(`
588
- `,1)[0].replace(/^\t+/,te=>" ".repeat(3*te.length)),m=t.split(`
589
- `,1)[0],b=0;this.options.pedantic?(b=2,l=u.trimStart()):(b=e[2].search(/[^ ]/),b=b>4?1:b,l=u.slice(b),b+=e[1].length);let E=!1;if(!u&&/^ *$/.test(m)&&(a+=m+`
590
- `,t=t.substring(m.length+1),p=!0),!p){let te=new RegExp(`^ {0,${Math.min(3,b-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),ve=new RegExp(`^ {0,${Math.min(3,b-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),Me=new RegExp(`^ {0,${Math.min(3,b-1)}}(?:\`\`\`|~~~)`),He=new RegExp(`^ {0,${Math.min(3,b-1)}}#`);for(;t;){let re=t.split(`
591
- `,1)[0];if(m=re,this.options.pedantic&&(m=m.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),Me.test(m)||He.test(m)||te.test(m)||ve.test(t))break;if(m.search(/[^ ]/)>=b||!m.trim())l+=`
592
- `+m.slice(b);else{if(E||u.search(/[^ ]/)>=4||Me.test(u)||He.test(u)||ve.test(u))break;l+=`
593
- `+m}!E&&!m.trim()&&(E=!0),a+=re+`
594
- `,t=t.substring(re.length+1),u=m.slice(b)}}s.loose||(h?s.loose=!0:/\n *\n *$/.test(a)&&(h=!0));let T=null,P;this.options.gfm&&(T=/^\[[ xX]\] /.exec(l),T&&(P=T[0]!=="[ ] ",l=l.replace(/^\[[ xX]\] +/,""))),s.items.push({type:"list_item",raw:a,task:!!T,checked:P,loose:!1,text:l,tokens:[]}),s.raw+=a}s.items[s.items.length-1].raw=a.trimEnd(),s.items[s.items.length-1].text=l.trimEnd(),s.raw=s.raw.trimEnd();for(let p=0;p<s.items.length;p++)if(this.lexer.state.top=!1,s.items[p].tokens=this.lexer.blockTokens(s.items[p].text,[]),!s.loose){let u=s.items[p].tokens.filter(b=>b.type==="space"),m=u.length>0&&u.some(b=>/\n.*\n/.test(b.raw));s.loose=m}if(s.loose)for(let p=0;p<s.items.length;p++)s.items[p].loose=!0;return s}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let r=e[1].toLowerCase().replace(/\s+/g," "),i=e[2]?e[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:r,raw:e[0],href:i,title:s}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!/[:|]/.test(e[2]))return;let r=yr(e[1]),i=e[2].replace(/^\||\| *$/g,"").split("|"),s=e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split(`
595
- `):[],n={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===i.length){for(let a of i)/^ *-+: *$/.test(a)?n.align.push("right"):/^ *:-+: *$/.test(a)?n.align.push("center"):/^ *:-+ *$/.test(a)?n.align.push("left"):n.align.push(null);for(let a of r)n.header.push({text:a,tokens:this.lexer.inline(a)});for(let a of s)n.rows.push(yr(a,n.header.length).map(l=>({text:l,tokens:this.lexer.inline(l)})));return n}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let r=e[1].charAt(e[1].length-1)===`
596
- `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:N(e[1])}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&/^<a /i.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let r=e[2].trim();if(!this.options.pedantic&&/^</.test(r)){if(!/>$/.test(r))return;let n=lt(r.slice(0,-1),"\\");if((r.length-n.length)%2===0)return}else{let n=Ni(e[2],"()");if(n>-1){let l=(e[0].indexOf("!")===0?5:4)+e[1].length+n;e[2]=e[2].substring(0,n),e[0]=e[0].substring(0,l).trim(),e[3]=""}}let i=e[2],s="";if(this.options.pedantic){let n=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);n&&(i=n[1],s=n[3])}else s=e[3]?e[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(this.options.pedantic&&!/>$/.test(r)?i=i.slice(1):i=i.slice(1,-1)),xr(e,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let i=(r[2]||r[1]).replace(/\s+/g," "),s=e[i.toLowerCase()];if(!s){let n=r[0].charAt(0);return{type:"text",raw:n,text:n}}return xr(r,s,r[0],this.lexer)}}emStrong(t,e,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!i||i[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!r||this.rules.inline.punctuation.exec(r)){let n=[...i[0]].length-1,a,l,h=n,p=0,u=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,e=e.slice(-1*t.length+n);(i=u.exec(e))!=null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(l=[...a].length,i[3]||i[4]){h+=l;continue}else if((i[5]||i[6])&&n%3&&!((n+l)%3)){p+=l;continue}if(h-=l,h>0)continue;l=Math.min(l,l+h+p);let m=[...i[0]][0].length,b=t.slice(0,n+i.index+m+l);if(Math.min(n,l)%2){let T=b.slice(1,-1);return{type:"em",raw:b,text:T,tokens:this.lexer.inlineTokens(T)}}let E=b.slice(2,-2);return{type:"strong",raw:b,text:E,tokens:this.lexer.inlineTokens(E)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let r=e[2].replace(/\n/g," "),i=/[^ ]/.test(r),s=/^ /.test(r)&&/ $/.test(r);return i&&s&&(r=r.substring(1,r.length-1)),r=N(r,!0),{type:"codespan",raw:e[0],text:r}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let r,i;return e[2]==="@"?(r=N(e[1]),i="mailto:"+r):(r=N(e[1]),i=r),{type:"link",raw:e[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let r,i;if(e[2]==="@")r=N(e[0]),i="mailto:"+r;else{let s;do s=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(s!==e[0]);r=N(e[0]),e[1]==="www."?i="http://"+e[0]:i=e[0]}return{type:"link",raw:e[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let r;return this.lexer.state.inRawBlock?r=e[0]:r=N(e[0]),{type:"text",raw:e[0],text:r}}}},Oi=/^(?: *(?:\n|$))+/,qi=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,ji=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Fe=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ui=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Sr=/(?:[*+-]|\d{1,9}[.)])/,Tr=x(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,Sr).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),Ht=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Bi=/^[^\n]+/,Pt=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Wi=x(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",Pt).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Yi=x(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Sr).getRegex(),pt="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]*?(?:-->|$))/,Zi=x("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",It).replace("tag",pt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ar=x(Ht).replace("hr",Fe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pt).getRegex(),Xi=x(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ar).getRegex(),Nt={blockquote:Xi,code:qi,def:Wi,fences:ji,heading:Ui,hr:Fe,html:Zi,lheading:Tr,list:Yi,newline:Oi,paragraph:Ar,table:Ze,text:Bi},wr=x("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Fe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pt).getRegex(),Fi={...Nt,table:wr,paragraph:x(Ht).replace("hr",Fe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",wr).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pt).getRegex()},Vi={...Nt,html:x(`^ *(?: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:Ze,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:x(Ht).replace("hr",Fe).replace("heading",` *#{1,6} *[^
597
- ]`).replace("lheading",Tr).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Lr=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Gi=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,zr=/^( {2,}|\\)\n(?!\s*$)/,Ki=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ve="\\p{P}\\p{S}",Qi=x(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Ve).getRegex(),Ji=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,Di=x(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Ve).getRegex(),es=x("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Ve).getRegex(),ts=x("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Ve).getRegex(),rs=x(/\\([punct])/,"gu").replace(/punct/g,Ve).getRegex(),is=x(/^<(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(),ss=x(It).replace("(?:-->|$)","-->").getRegex(),ns=x("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",ss).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),dt=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,os=x(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",dt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Cr=x(/^!?\[(label)\]\[(ref)\]/).replace("label",dt).replace("ref",Pt).getRegex(),Mr=x(/^!?\[(ref)\](?:\[\])?/).replace("ref",Pt).getRegex(),as=x("reflink|nolink(?!\\()","g").replace("reflink",Cr).replace("nolink",Mr).getRegex(),Rt={_backpedal:Ze,anyPunctuation:rs,autolink:is,blockSkip:Ji,br:zr,code:Gi,del:Ze,emStrongLDelim:Di,emStrongRDelimAst:es,emStrongRDelimUnd:ts,escape:Lr,link:os,nolink:Mr,punctuation:Qi,reflink:Cr,reflinkSearch:as,tag:ns,text:Ki,url:Ze},ls={...Rt,link:x(/^!?\[(label)\]\((.*?)\)/).replace("label",dt).getRegex(),reflink:x(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",dt).getRegex()},zt={...Rt,escape:x(Lr).replace("])","~|])").getRegex(),url:x(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},cs={...zt,br:x(zr).replace("{2,}","*").getRegex(),text:x(zt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ct={normal:Nt,gfm:Fi,pedantic:Vi},Ye={normal:Rt,gfm:zt,breaks:cs,pedantic:ls},G=class o{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||he,this.options.tokenizer=this.options.tokenizer||new Te,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={block:ct.normal,inline:Ye.normal};this.options.pedantic?(e.block=ct.pedantic,e.inline=Ye.pedantic):this.options.gfm&&(e.block=ct.gfm,this.options.breaks?e.inline=Ye.breaks:e.inline=Ye.gfm),this.tokenizer.rules=e}static get rules(){return{block:ct,inline:Ye}}static lex(t,e){return new o(e).lex(t)}static lexInline(t,e){return new o(e).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
598
- `),this.blockTokens(t,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let r=this.inlineQueue[e];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[]){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(a,l,h)=>l+" ".repeat(h.length));let r,i,s,n;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(r=a.call({lexer:this},t,e))?(t=t.substring(r.raw.length),e.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&e.length>0?e[e.length-1].raw+=`
622
+ `}};$e.styles=[...U,v`:host{background:var(--deck-takeaway-bg,var(--rik-surface-inverse));color:var(--rik-text-inverse);justify-content:center;align-items:center;text-align:center}.body{display:flex;flex-direction:column;align-items:center;gap:var(--deck-takeaway-gap,var(--rik-space-4));max-width:75cqw}::slotted(.display){font-family:var(--rik-font-display,var(--rik-font-sans));font-size:clamp(3rem,7cqw,5.5rem);font-weight:900;color:var(--deck-takeaway-display-color,var(--rik-accent));letter-spacing:-0.03em;line-height:1.05;margin:0}::slotted(.display.danger){color:var(--rik-status-danger)}::slotted(.caption){font-size:var(--rik-font-size-lead);color:var(--deck-takeaway-caption-color,var(--rik-text-inverse--faint))}`],c([d({type:String})],$e.prototype,"kicker",2),$e=c([k("deck-takeaway")],$e);var Sr={info:'<circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/>',warn:'<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><path d="M12 9v4"/><path d="M12 17h.01"/>',danger:'<circle cx="12" cy="12" r="10"/><path d="M12 8v4"/><path d="M12 16h.01"/>',ok:'<path d="M20 6 9 17l-5-5"/>'},Se=class extends g{render(){let t=this.type??"info",e=Sr[t]??Sr.info;return m`<div class="icon-box"> <svg viewBox="0 0 24 24" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" .innerHTML="${e}"></svg> </div> <div class="content"><slot></slot></div>`}};Se.styles=v`:host{display:flex;gap:var(--rik-space-3);padding:var(--deck-callout-padding-y,var(--rik-space-3)) var(--deck-callout-padding-x,var(--rik-space-4));border-radius:var(--deck-callout-radius,var(--rik-radius-md));background:var(--deck-callout-bg,var(--rik-status-info__bg--mid));border:1px solid var(--deck-callout-border,var(--rik-status-info__border));box-shadow:var(--rik-elevation-2);align-items:center;color:var(--rik-text-default--muted);font-family:var(--rik-font-sans);font-size:var(--rik-font-size-body);line-height:1.55}:host([type="info"]){--deck-callout-bg:var(--rik-status-info__bg--mid);--deck-callout-border:var(--rik-status-info__border);--deck-callout-stroke:var(--rik-accent)}:host([type="warn"]){--deck-callout-bg:var(--rik-status-warn__bg);--deck-callout-border:var(--rik-status-warn__border);--deck-callout-stroke:var(--rik-status-warn)}:host([type="danger"]){--deck-callout-bg:var(--rik-status-danger__bg);--deck-callout-border:var(--rik-status-danger__border);--deck-callout-stroke:var(--rik-status-danger)}:host([type="ok"]){--deck-callout-bg:var(--rik-status-success__bg);--deck-callout-border:var(--rik-status-success__border);--deck-callout-stroke:var(--rik-status-success)}.icon-box{flex-shrink:0;width:var(--rik-icon-2xl);height:var(--rik-icon-2xl);display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:var(--rik-surface-tint)}.icon-box svg{width:var(--rik-icon-lg);height:var(--rik-icon-lg);stroke:var(--deck-callout-stroke,var(--rik-accent));stroke-width:2.2}.content{flex:1}::slotted(p){margin:0}::slotted(strong){color:var(--rik-text-default);font-weight:700}::slotted(code){font-family:var(--rik-font-mono);font-size:var(--rik-font-size-mono-sm);background:var(--rik-surface-tint);padding:2px 6px;border-radius:var(--rik-radius-sm);color:var(--rik-text-default)}`,c([d({type:String})],Se.prototype,"type",2),Se=c([k("deck-callout")],Se);var re=class extends g{constructor(){super(...arguments);this.center=!1;this.compact=!1}render(){return m`<slot></slot>`}};re.styles=v`:host{display:flex;flex-direction:column;gap:var(--deck-card-gap,var(--rik-space-2));background:var(--deck-card-bg,var(--rik-surface-raised--strong));border:1px solid var(--deck-card-border,var(--rik-border-default));border-radius:var(--deck-card-radius,var(--rik-radius-lg));padding:var(--deck-card-padding-y,var(--rik-space-3)) var(--deck-card-padding-x,var(--rik-space-4));box-shadow:var(--deck-card-shadow,var(--rik-elevation-2));min-height:0;font-family:var(--rik-font-sans);color:var(--deck-card-text,var(--rik-text-default--muted))}:host([color="yellow"]){background:var(--deck-card-bg,var(--rik-status-info__bg));border:4px solid var(--deck-card-border,var(--rik-status-info__border))}:host([color="orange"]){background:var(--deck-card-bg,var(--rik-status-warn__bg));border:4px solid var(--deck-card-border,var(--rik-status-warn__border))}:host([color="green"]){background:var(--deck-card-bg,var(--rik-status-success__bg));border:4px solid var(--deck-card-border,var(--rik-status-success__border))}:host([color="red"]){background:var(--deck-card-bg,var(--rik-status-danger__bg));border:4px solid var(--deck-card-border,var(--rik-status-danger__border))}::slotted(h3){font-family:var(--rik-font-display,var(--rik-font-sans));font-size:var(--rik-font-size-h2);font-weight:700;color:var(--deck-card-title-color,var(--rik-text-default));letter-spacing:-0.01em;line-height:1.25;margin:0}::slotted(p){font-size:var(--rik-font-size-body);line-height:1.55;margin:0}::slotted(strong){color:var(--rik-text-default);font-weight:700}:host([center]){text-align:center;align-items:center}:host([compact]){padding:var(--rik-space-2) var(--rik-space-3)}`,c([d({type:String})],re.prototype,"color",2),c([d({type:Boolean})],re.prototype,"center",2),c([d({type:Boolean})],re.prototype,"compact",2),re=c([k("deck-card")],re);function Nt(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ue=Nt();function Pr(s){ue=s}var Mr=/[&<>"']/,Fi=new RegExp(Mr.source,"g"),Hr=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Vi=new RegExp(Hr.source,"g"),Ki={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Tr=s=>Ki[s];function N(s,t){if(t){if(Mr.test(s))return s.replace(Fi,Tr)}else if(Hr.test(s))return s.replace(Vi,Tr);return s}var Gi=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Qi(s){return s.replace(Gi,(t,e)=>(e=e.toLowerCase(),e==="colon"?":":e.charAt(0)==="#"?e.charAt(1)==="x"?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""))}var Ji=/(^|[^\[])\^/g;function w(s,t){let e=typeof s=="string"?s:s.source;t=t||"";let r={replace:(i,n)=>{let o=typeof n=="string"?n:n.source;return o=o.replace(Ji,"$1"),e=e.replace(i,o),r},getRegex:()=>new RegExp(e,t)};return r}function Ar(s){try{s=encodeURI(s).replace(/%25/g,"%")}catch{return null}return s}var Fe={exec:()=>null};function Lr(s,t){let e=s.replace(/\|/g,(n,o,a)=>{let l=!1,u=o;for(;--u>=0&&a[u]==="\\";)l=!l;return l?"|":" |"}),r=e.split(/ \|/),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,"|");return r}function ht(s,t,e){let r=s.length;if(r===0)return"";let i=0;for(;i<r;){let n=s.charAt(r-i-1);if(n===t&&!e)i++;else if(n!==t&&e)i++;else break}return s.slice(0,r-i)}function Di(s,t){if(s.indexOf(t[1])===-1)return-1;let e=0;for(let r=0;r<s.length;r++)if(s[r]==="\\")r++;else if(s[r]===t[0])e++;else if(s[r]===t[1]&&(e--,e<0))return r;return-1}function zr(s,t,e,r){let i=t.href,n=t.title?N(t.title):null,o=s[1].replace(/\\([\[\]])/g,"$1");if(s[0].charAt(0)!=="!"){r.state.inLink=!0;let a={type:"link",raw:e,href:i,title:n,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,a}return{type:"image",raw:e,href:i,title:n,text:N(o)}}function en(s,t){let e=s.match(/^(\s+)(?:```)/);if(e===null)return t;let r=e[1];return t.split(`
623
+ `).map(i=>{let n=i.match(/^\s+/);if(n===null)return i;let[o]=n;return o.length>=r.length?i.slice(r.length):i}).join(`
624
+ `)}var Ae=class{options;rules;lexer;constructor(t){this.options=t||ue}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let r=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:ht(r,`
625
+ `)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let r=e[0],i=en(r,e[3]||"");return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:i}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let r=e[2].trim();if(/#$/.test(r)){let i=ht(r,"#");(this.options.pedantic||!i||/ $/.test(i))&&(r=i.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:e[0]}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let r=e[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
626
+ $1`);r=ht(r.replace(/^ *>[ \t]?/gm,""),`
627
+ `);let i=this.lexer.state.top;this.lexer.state.top=!0;let n=this.lexer.blockTokens(r);return this.lexer.state.top=i,{type:"blockquote",raw:e[0],tokens:n,text:r}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim(),i=r.length>1,n={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let o=new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),a="",l="",u=!1;for(;t;){let p=!1;if(!(e=o.exec(t))||this.rules.block.hr.test(t))break;a=e[0],t=t.substring(a.length);let h=e[2].split(`
628
+ `,1)[0].replace(/^\t+/,ne=>" ".repeat(3*ne.length)),f=t.split(`
629
+ `,1)[0],b=0;this.options.pedantic?(b=2,l=h.trimStart()):(b=e[2].search(/[^ ]/),b=b>4?1:b,l=h.slice(b),b+=e[1].length);let $=!1;if(!h&&/^ *$/.test(f)&&(a+=f+`
630
+ `,t=t.substring(f.length+1),p=!0),!p){let ne=new RegExp(`^ {0,${Math.min(3,b-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),Me=new RegExp(`^ {0,${Math.min(3,b-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),He=new RegExp(`^ {0,${Math.min(3,b-1)}}(?:\`\`\`|~~~)`),se=new RegExp(`^ {0,${Math.min(3,b-1)}}#`);for(;t;){let oe=t.split(`
631
+ `,1)[0];if(f=oe,this.options.pedantic&&(f=f.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),He.test(f)||se.test(f)||ne.test(f)||Me.test(t))break;if(f.search(/[^ ]/)>=b||!f.trim())l+=`
632
+ `+f.slice(b);else{if($||h.search(/[^ ]/)>=4||He.test(h)||se.test(h)||Me.test(h))break;l+=`
633
+ `+f}!$&&!f.trim()&&($=!0),a+=oe+`
634
+ `,t=t.substring(oe.length+1),h=f.slice(b)}}n.loose||(u?n.loose=!0:/\n *\n *$/.test(a)&&(u=!0));let S=null,P;this.options.gfm&&(S=/^\[[ xX]\] /.exec(l),S&&(P=S[0]!=="[ ] ",l=l.replace(/^\[[ xX]\] +/,""))),n.items.push({type:"list_item",raw:a,task:!!S,checked:P,loose:!1,text:l,tokens:[]}),n.raw+=a}n.items[n.items.length-1].raw=a.trimEnd(),n.items[n.items.length-1].text=l.trimEnd(),n.raw=n.raw.trimEnd();for(let p=0;p<n.items.length;p++)if(this.lexer.state.top=!1,n.items[p].tokens=this.lexer.blockTokens(n.items[p].text,[]),!n.loose){let h=n.items[p].tokens.filter(b=>b.type==="space"),f=h.length>0&&h.some(b=>/\n.*\n/.test(b.raw));n.loose=f}if(n.loose)for(let p=0;p<n.items.length;p++)n.items[p].loose=!0;return n}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let r=e[1].toLowerCase().replace(/\s+/g," "),i=e[2]?e[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:r,raw:e[0],href:i,title:n}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!/[:|]/.test(e[2]))return;let r=Lr(e[1]),i=e[2].replace(/^\||\| *$/g,"").split("|"),n=e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split(`
635
+ `):[],o={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===i.length){for(let a of i)/^ *-+: *$/.test(a)?o.align.push("right"):/^ *:-+: *$/.test(a)?o.align.push("center"):/^ *:-+ *$/.test(a)?o.align.push("left"):o.align.push(null);for(let a of r)o.header.push({text:a,tokens:this.lexer.inline(a)});for(let a of n)o.rows.push(Lr(a,o.header.length).map(l=>({text:l,tokens:this.lexer.inline(l)})));return o}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let r=e[1].charAt(e[1].length-1)===`
636
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:N(e[1])}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&/^<a /i.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let r=e[2].trim();if(!this.options.pedantic&&/^</.test(r)){if(!/>$/.test(r))return;let o=ht(r.slice(0,-1),"\\");if((r.length-o.length)%2===0)return}else{let o=Di(e[2],"()");if(o>-1){let l=(e[0].indexOf("!")===0?5:4)+e[1].length+o;e[2]=e[2].substring(0,o),e[0]=e[0].substring(0,l).trim(),e[3]=""}}let i=e[2],n="";if(this.options.pedantic){let o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);o&&(i=o[1],n=o[3])}else n=e[3]?e[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(this.options.pedantic&&!/>$/.test(r)?i=i.slice(1):i=i.slice(1,-1)),zr(e,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let i=(r[2]||r[1]).replace(/\s+/g," "),n=e[i.toLowerCase()];if(!n){let o=r[0].charAt(0);return{type:"text",raw:o,text:o}}return zr(r,n,r[0],this.lexer)}}emStrong(t,e,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!i||i[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!r||this.rules.inline.punctuation.exec(r)){let o=[...i[0]].length-1,a,l,u=o,p=0,h=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,e=e.slice(-1*t.length+o);(i=h.exec(e))!=null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(l=[...a].length,i[3]||i[4]){u+=l;continue}else if((i[5]||i[6])&&o%3&&!((o+l)%3)){p+=l;continue}if(u-=l,u>0)continue;l=Math.min(l,l+u+p);let f=[...i[0]][0].length,b=t.slice(0,o+i.index+f+l);if(Math.min(o,l)%2){let S=b.slice(1,-1);return{type:"em",raw:b,text:S,tokens:this.lexer.inlineTokens(S)}}let $=b.slice(2,-2);return{type:"strong",raw:b,text:$,tokens:this.lexer.inlineTokens($)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let r=e[2].replace(/\n/g," "),i=/[^ ]/.test(r),n=/^ /.test(r)&&/ $/.test(r);return i&&n&&(r=r.substring(1,r.length-1)),r=N(r,!0),{type:"codespan",raw:e[0],text:r}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let r,i;return e[2]==="@"?(r=N(e[1]),i="mailto:"+r):(r=N(e[1]),i=r),{type:"link",raw:e[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let r,i;if(e[2]==="@")r=N(e[0]),i="mailto:"+r;else{let n;do n=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(n!==e[0]);r=N(e[0]),e[1]==="www."?i="http://"+e[0]:i=e[0]}return{type:"link",raw:e[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let r;return this.lexer.state.inRawBlock?r=e[0]:r=N(e[0]),{type:"text",raw:e[0],text:r}}}},tn=/^(?: *(?:\n|$))+/,rn=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,nn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ke=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,sn=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ir=/(?:[*+-]|\d{1,9}[.)])/,Nr=w(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,Ir).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),Ot=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,on=/^[^\n]+/,Rt=/(?!\s*\])(?:\\.|[^\[\]\\])+/,an=w(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",Rt).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ln=w(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ir).getRegex(),mt="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",qt=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,cn=w("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",qt).replace("tag",mt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Or=w(Ot).replace("hr",Ke).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",mt).getRegex(),dn=w(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Or).getRegex(),Ut={blockquote:dn,code:rn,def:an,fences:nn,heading:sn,hr:Ke,html:cn,lheading:Nr,list:ln,newline:tn,paragraph:Or,table:Fe,text:on},Cr=w("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ke).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",mt).getRegex(),pn={...Ut,table:Cr,paragraph:w(Ot).replace("hr",Ke).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Cr).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",mt).getRegex()},hn={...Ut,html:w(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",qt).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:w(Ot).replace("hr",Ke).replace("heading",` *#{1,6} *[^
637
+ ]`).replace("lheading",Nr).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Rr=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,un=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,qr=/^( {2,}|\\)\n(?!\s*$)/,fn=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ge="\\p{P}\\p{S}",mn=w(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Ge).getRegex(),gn=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,vn=w(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Ge).getRegex(),kn=w("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Ge).getRegex(),bn=w("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Ge).getRegex(),yn=w(/\\([punct])/,"gu").replace(/punct/g,Ge).getRegex(),xn=w(/^<(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(),wn=w(qt).replace("(?:-->|$)","-->").getRegex(),_n=w("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",wn).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ft=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,En=w(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",ft).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ur=w(/^!?\[(label)\]\[(ref)\]/).replace("label",ft).replace("ref",Rt).getRegex(),jr=w(/^!?\[(ref)\](?:\[\])?/).replace("ref",Rt).getRegex(),$n=w("reflink|nolink(?!\\()","g").replace("reflink",Ur).replace("nolink",jr).getRegex(),jt={_backpedal:Fe,anyPunctuation:yn,autolink:xn,blockSkip:gn,br:qr,code:un,del:Fe,emStrongLDelim:vn,emStrongRDelimAst:kn,emStrongRDelimUnd:bn,escape:Rr,link:En,nolink:jr,punctuation:mn,reflink:Ur,reflinkSearch:$n,tag:_n,text:fn,url:Fe},Sn={...jt,link:w(/^!?\[(label)\]\((.*?)\)/).replace("label",ft).getRegex(),reflink:w(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ft).getRegex()},Ht={...jt,escape:w(Rr).replace("])","~|])").getRegex(),url:w(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Tn={...Ht,br:w(qr).replace("{2,}","*").getRegex(),text:w(Ht.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ut={normal:Ut,gfm:pn,pedantic:hn},Ze={normal:jt,gfm:Ht,breaks:Tn,pedantic:Sn},K=class s{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ue,this.options.tokenizer=this.options.tokenizer||new Ae,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={block:ut.normal,inline:Ze.normal};this.options.pedantic?(e.block=ut.pedantic,e.inline=Ze.pedantic):this.options.gfm&&(e.block=ut.gfm,this.options.breaks?e.inline=Ze.breaks:e.inline=Ze.gfm),this.tokenizer.rules=e}static get rules(){return{block:ut,inline:Ze}}static lex(t,e){return new s(e).lex(t)}static lexInline(t,e){return new s(e).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
638
+ `),this.blockTokens(t,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let r=this.inlineQueue[e];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[]){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(a,l,u)=>l+" ".repeat(u.length));let r,i,n,o;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(r=a.call({lexer:this},t,e))?(t=t.substring(r.raw.length),e.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&e.length>0?e[e.length-1].raw+=`
599
639
  `:e.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),i=e[e.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
600
640
  `+r.raw,i.text+=`
601
641
  `+r.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),i=e[e.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
602
642
  `+r.raw,i.text+=`
603
- `+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),e.push(r);continue}if(s=t,this.options.extensions&&this.options.extensions.startBlock){let a=1/0,l=t.slice(1),h;this.options.extensions.startBlock.forEach(p=>{h=p.call({lexer:this},l),typeof h=="number"&&h>=0&&(a=Math.min(a,h))}),a<1/0&&a>=0&&(s=t.substring(0,a+1))}if(this.state.top&&(r=this.tokenizer.paragraph(s))){i=e[e.length-1],n&&i.type==="paragraph"?(i.raw+=`
643
+ `+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),e.push(r);continue}if(n=t,this.options.extensions&&this.options.extensions.startBlock){let a=1/0,l=t.slice(1),u;this.options.extensions.startBlock.forEach(p=>{u=p.call({lexer:this},l),typeof u=="number"&&u>=0&&(a=Math.min(a,u))}),a<1/0&&a>=0&&(n=t.substring(0,a+1))}if(this.state.top&&(r=this.tokenizer.paragraph(n))){i=e[e.length-1],o&&i.type==="paragraph"?(i.raw+=`
604
644
  `+r.raw,i.text+=`
605
- `+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(r),n=s.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),i=e[e.length-1],i&&i.type==="text"?(i.raw+=`
645
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(r),o=n.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),i=e[e.length-1],i&&i.type==="text"?(i.raw+=`
606
646
  `+r.raw,i.text+=`
607
- `+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(r);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r,i,s,n=t,a,l,h;if(this.tokens.links){let p=Object.keys(this.tokens.links);if(p.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)p.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,a.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(l||(h=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(p=>(r=p.call({lexer:this},t,e))?(t=t.substring(r.raw.length),e.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),i=e[e.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),i=e[e.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(r=this.tokenizer.emStrong(t,n,h)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),e.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),e.push(r);continue}if(s=t,this.options.extensions&&this.options.extensions.startInline){let p=1/0,u=t.slice(1),m;this.options.extensions.startInline.forEach(b=>{m=b.call({lexer:this},u),typeof m=="number"&&m>=0&&(p=Math.min(p,m))}),p<1/0&&p>=0&&(s=t.substring(0,p+1))}if(r=this.tokenizer.inlineText(s)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(h=r.raw.slice(-1)),l=!0,i=e[e.length-1],i&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(t){let p="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return e}},Ae=class{options;constructor(t){this.options=t||he}code(t,e,r){let i=(e||"").match(/^\S*/)?.[0];return t=t.replace(/\n$/,"")+`
647
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(r);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r,i,n,o=t,a,l,u;if(this.tokens.links){let p=Object.keys(this.tokens.links);if(p.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)p.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)o=o.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(o))!=null;)o=o.slice(0,a.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(l||(u=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(p=>(r=p.call({lexer:this},t,e))?(t=t.substring(r.raw.length),e.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),i=e[e.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),i=e[e.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(r=this.tokenizer.emStrong(t,o,u)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),e.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),e.push(r);continue}if(n=t,this.options.extensions&&this.options.extensions.startInline){let p=1/0,h=t.slice(1),f;this.options.extensions.startInline.forEach(b=>{f=b.call({lexer:this},h),typeof f=="number"&&f>=0&&(p=Math.min(p,f))}),p<1/0&&p>=0&&(n=t.substring(0,p+1))}if(r=this.tokenizer.inlineText(n)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(u=r.raw.slice(-1)),l=!0,i=e[e.length-1],i&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(t){let p="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return e}},Le=class{options;constructor(t){this.options=t||ue}code(t,e,r){let i=(e||"").match(/^\S*/)?.[0];return t=t.replace(/\n$/,"")+`
608
648
  `,i?'<pre><code class="language-'+N(i)+'">'+(r?t:N(t,!0))+`</code></pre>
609
649
  `:"<pre><code>"+(r?t:N(t,!0))+`</code></pre>
610
650
  `}blockquote(t){return`<blockquote>
611
651
  ${t}</blockquote>
612
652
  `}html(t,e){return t}heading(t,e,r){return`<h${e}>${t}</h${e}>
613
653
  `}hr(){return`<hr>
614
- `}list(t,e,r){let i=e?"ol":"ul",s=e&&r!==1?' start="'+r+'"':"";return"<"+i+s+`>
654
+ `}list(t,e,r){let i=e?"ol":"ul",n=e&&r!==1?' start="'+r+'"':"";return"<"+i+n+`>
615
655
  `+t+"</"+i+`>
616
656
  `}listitem(t,e,r){return`<li>${t}</li>
617
657
  `}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(t){return`<p>${t}</p>
@@ -622,21 +662,21 @@ ${t}</blockquote>
622
662
  `}tablerow(t){return`<tr>
623
663
  ${t}</tr>
624
664
  `}tablecell(t,e){let r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
625
- `}strong(t){return`<strong>${t}</strong>`}em(t){return`<em>${t}</em>`}codespan(t){return`<code>${t}</code>`}br(){return"<br>"}del(t){return`<del>${t}</del>`}link(t,e,r){let i=br(t);if(i===null)return r;t=i;let s='<a href="'+t+'"';return e&&(s+=' title="'+e+'"'),s+=">"+r+"</a>",s}image(t,e,r){let i=br(t);if(i===null)return r;t=i;let s=`<img src="${t}" alt="${r}"`;return e&&(s+=` title="${e}"`),s+=">",s}text(t){return t}},Xe=class{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,e,r){return""+r}image(t,e,r){return""+r}br(){return""}},K=class o{options;renderer;textRenderer;constructor(t){this.options=t||he,this.options.renderer=this.options.renderer||new Ae,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Xe}static parse(t,e){return new o(e).parse(t)}static parseInline(t,e){return new o(e).parseInline(t)}parse(t,e=!0){let r="";for(let i=0;i<t.length;i++){let s=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){let n=s,a=this.options.extensions.renderers[n.type].call({parser:this},n);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(n.type)){r+=a||"";continue}}switch(s.type){case"space":continue;case"hr":{r+=this.renderer.hr();continue}case"heading":{let n=s;r+=this.renderer.heading(this.parseInline(n.tokens),n.depth,Pi(this.parseInline(n.tokens,this.textRenderer)));continue}case"code":{let n=s;r+=this.renderer.code(n.text,n.lang,!!n.escaped);continue}case"table":{let n=s,a="",l="";for(let p=0;p<n.header.length;p++)l+=this.renderer.tablecell(this.parseInline(n.header[p].tokens),{header:!0,align:n.align[p]});a+=this.renderer.tablerow(l);let h="";for(let p=0;p<n.rows.length;p++){let u=n.rows[p];l="";for(let m=0;m<u.length;m++)l+=this.renderer.tablecell(this.parseInline(u[m].tokens),{header:!1,align:n.align[m]});h+=this.renderer.tablerow(l)}r+=this.renderer.table(a,h);continue}case"blockquote":{let n=s,a=this.parse(n.tokens);r+=this.renderer.blockquote(a);continue}case"list":{let n=s,a=n.ordered,l=n.start,h=n.loose,p="";for(let u=0;u<n.items.length;u++){let m=n.items[u],b=m.checked,E=m.task,T="";if(m.task){let P=this.renderer.checkbox(!!b);h?m.tokens.length>0&&m.tokens[0].type==="paragraph"?(m.tokens[0].text=P+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&m.tokens[0].tokens[0].type==="text"&&(m.tokens[0].tokens[0].text=P+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:P+" "}):T+=P+" "}T+=this.parse(m.tokens,h),p+=this.renderer.listitem(T,E,!!b)}r+=this.renderer.list(p,a,l);continue}case"html":{let n=s;r+=this.renderer.html(n.text,n.block);continue}case"paragraph":{let n=s;r+=this.renderer.paragraph(this.parseInline(n.tokens));continue}case"text":{let n=s,a=n.tokens?this.parseInline(n.tokens):n.text;for(;i+1<t.length&&t[i+1].type==="text";)n=t[++i],a+=`
626
- `+(n.tokens?this.parseInline(n.tokens):n.text);r+=e?this.renderer.paragraph(a):a;continue}default:{let n='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return r}parseInline(t,e){e=e||this.renderer;let r="";for(let i=0;i<t.length;i++){let s=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){let n=this.options.extensions.renderers[s.type].call({parser:this},s);if(n!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){r+=n||"";continue}}switch(s.type){case"escape":{let n=s;r+=e.text(n.text);break}case"html":{let n=s;r+=e.html(n.text);break}case"link":{let n=s;r+=e.link(n.href,n.title,this.parseInline(n.tokens,e));break}case"image":{let n=s;r+=e.image(n.href,n.title,n.text);break}case"strong":{let n=s;r+=e.strong(this.parseInline(n.tokens,e));break}case"em":{let n=s;r+=e.em(this.parseInline(n.tokens,e));break}case"codespan":{let n=s;r+=e.codespan(n.text);break}case"br":{r+=e.br();break}case"del":{let n=s;r+=e.del(this.parseInline(n.tokens,e));break}case"text":{let n=s;r+=e.text(n.text);break}default:{let n='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return r}},Se=class{options;constructor(t){this.options=t||he}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}},Ct=class{defaults=Mt();options=this.setOptions;parse=this.#e(G.lex,K.parse);parseInline=this.#e(G.lexInline,K.parseInline);Parser=K;Renderer=Ae;TextRenderer=Xe;Lexer=G;Tokenizer=Te;Hooks=Se;constructor(...t){this.use(...t)}walkTokens(t,e){let r=[];for(let i of t)switch(r=r.concat(e.call(this,i)),i.type){case"table":{let s=i;for(let n of s.header)r=r.concat(this.walkTokens(n.tokens,e));for(let n of s.rows)for(let a of n)r=r.concat(this.walkTokens(a.tokens,e));break}case"list":{let s=i;r=r.concat(this.walkTokens(s.items,e));break}default:{let s=i;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(n=>{let a=s[n].flat(1/0);r=r.concat(this.walkTokens(a,e))}):s.tokens&&(r=r.concat(this.walkTokens(s.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let n=e.renderers[s.name];n?e.renderers[s.name]=function(...a){let l=s.renderer.apply(this,a);return l===!1&&(l=n.apply(this,a)),l}:e.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 n=e[s.level];n?n.unshift(s.tokenizer):e[s.level]=[s.tokenizer],s.start&&(s.level==="block"?e.startBlock?e.startBlock.push(s.start):e.startBlock=[s.start]:s.level==="inline"&&(e.startInline?e.startInline.push(s.start):e.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(e.childTokens[s.name]=s.childTokens)}),i.extensions=e),r.renderer){let s=this.defaults.renderer||new Ae(this.defaults);for(let n in r.renderer){if(!(n in s))throw new Error(`renderer '${n}' does not exist`);if(n==="options")continue;let a=n,l=r.renderer[a],h=s[a];s[a]=(...p)=>{let u=l.apply(s,p);return u===!1&&(u=h.apply(s,p)),u||""}}i.renderer=s}if(r.tokenizer){let s=this.defaults.tokenizer||new Te(this.defaults);for(let n in r.tokenizer){if(!(n in s))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let a=n,l=r.tokenizer[a],h=s[a];s[a]=(...p)=>{let u=l.apply(s,p);return u===!1&&(u=h.apply(s,p)),u}}i.tokenizer=s}if(r.hooks){let s=this.defaults.hooks||new Se;for(let n in r.hooks){if(!(n in s))throw new Error(`hook '${n}' does not exist`);if(n==="options")continue;let a=n,l=r.hooks[a],h=s[a];Se.passThroughHooks.has(n)?s[a]=p=>{if(this.defaults.async)return Promise.resolve(l.call(s,p)).then(m=>h.call(s,m));let u=l.call(s,p);return h.call(s,u)}:s[a]=(...p)=>{let u=l.apply(s,p);return u===!1&&(u=h.apply(s,p)),u}}i.hooks=s}if(r.walkTokens){let s=this.defaults.walkTokens,n=r.walkTokens;i.walkTokens=function(a){let l=[];return l.push(n.call(this,a)),s&&(l=l.concat(s.call(this,a))),l}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return G.lex(t,e??this.defaults)}parser(t,e){return K.parse(t,e??this.defaults)}#e(t,e){return(r,i)=>{let s={...i},n={...this.defaults,...s};this.defaults.async===!0&&s.async===!1&&(n.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),n.async=!0);let a=this.#t(!!n.silent,!!n.async);if(typeof r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(n.hooks&&(n.hooks.options=n),n.async)return Promise.resolve(n.hooks?n.hooks.preprocess(r):r).then(l=>t(l,n)).then(l=>n.hooks?n.hooks.processAllTokens(l):l).then(l=>n.walkTokens?Promise.all(this.walkTokens(l,n.walkTokens)).then(()=>l):l).then(l=>e(l,n)).then(l=>n.hooks?n.hooks.postprocess(l):l).catch(a);try{n.hooks&&(r=n.hooks.preprocess(r));let l=t(r,n);n.hooks&&(l=n.hooks.processAllTokens(l)),n.walkTokens&&this.walkTokens(l,n.walkTokens);let h=e(l,n);return n.hooks&&(h=n.hooks.postprocess(h)),h}catch(l){return a(l)}}}#t(t,e){return r=>{if(r.message+=`
627
- Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+N(r.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(r);throw r}}},pe=new Ct;function y(o,t){return pe.parse(o,t)}y.options=y.setOptions=function(o){return pe.setOptions(o),y.defaults=pe.defaults,_r(y.defaults),y};y.getDefaults=Mt;y.defaults=he;y.use=function(...o){return pe.use(...o),y.defaults=pe.defaults,_r(y.defaults),y};y.walkTokens=function(o,t){return pe.walkTokens(o,t)};y.parseInline=pe.parseInline;y.Parser=K;y.parser=K.parse;y.Renderer=Ae;y.TextRenderer=Xe;y.Lexer=G;y.lexer=G.lex;y.Tokenizer=Te;y.Hooks=Se;y.parse=y;var fo=y.options,mo=y.setOptions,go=y.use,vo=y.walkTokens,ko=y.parseInline;var bo=K.parse,yo=G.lex;y.setOptions({gfm:!0,breaks:!1});var Le=class extends g{constructor(){super(...arguments);this._html=""}connectedCallback(){super.connectedCallback(),this._parse()}_parse(){let e=this.textContent??"",r=e.split(`
628
- `),i=r.filter(n=>n.trim().length>0).reduce((n,a)=>Math.min(n,a.match(/^ */)?.[0].length??0),1/0),s=i===1/0?e:r.map(n=>n.slice(i)).join(`
629
- `);this._html=y.parse(s.trim()),this.textContent=""}render(){return f`<div class="content" .innerHTML="${this._html}"></div>`}};Le.styles=v`:host{display:block;color:var(--rik-text-default--muted);font-family:var(--rik-font-sans)}h1,h2,h3,h4{color:var(--rik-text-default);font-weight:700;letter-spacing:-0.01em}h2{font-size:var(--rik-font-size-h2);margin-bottom:var(--rik-space-2)}h3{font-size:var(--rik-font-size-lead);margin-bottom:var(--rik-space-2);margin-top:var(--rik-space-3)}h4{font-size:var(--rik-font-size-body);margin-bottom:var(--rik-space-1);margin-top:var(--rik-space-3)}p{font-size:var(--rik-font-size-body);line-height:1.65;margin:0 0 var(--rik-space-3)}p:last-child{margin-bottom:0}strong{color:var(--rik-text-default);font-weight:700}em{font-style:italic}code{font-family:var(--rik-font-mono);font-size:var(--rik-font-size-mono-sm);background:var(--rik-surface-tint);padding:2px 6px;border-radius:var(--rik-radius-sm);color:var(--rik-text-default)}pre{background:var(--deck-md-pre-bg,var(--rik-code__bg));border:1px solid var(--deck-md-pre-border,var(--rik-code__border));border-radius:var(--rik-radius-md);padding:var(--rik-space-3) var(--rik-space-4);overflow:auto;font-family:var(--rik-font-mono);font-size:var(--rik-font-size-mono);line-height:1.75;color:var(--deck-md-pre-text,var(--rik-code__text));margin:0 0 var(--rik-space-3);box-shadow:var(--rik-elevation-2)}pre code{background:none;padding:0;color:inherit;border-radius:0}ul,ol{padding-left:1.4rem;margin:0 0 var(--rik-space-3)}li{margin-bottom:var(--rik-space-1);font-size:var(--rik-font-size-body);line-height:1.55}li::marker{color:var(--rik-accent)}a{color:var(--rik-accent);text-decoration:underline;text-decoration-thickness:1px}blockquote{border-left:3px solid var(--rik-accent);padding:var(--rik-space-1) var(--rik-space-3);color:var(--rik-text-default--faint);font-style:italic;margin:0 0 var(--rik-space-3)}hr{border:none;border-top:1px solid var(--rik-border-default);margin:var(--rik-space-4) 0}.content{display:contents}`,c([B()],Le.prototype,"_html",2),Le=c([k("deck-md")],Le);var Hr=!1;async function ds(){Hr||(window.mermaid||await new Promise((o,t)=>{let e=document.createElement("script");e.src=new URL("./vendor/mermaid.min.js",import.meta.url).href,e.onload=()=>o(),e.onerror=()=>t(new Error("mermaid failed to load")),document.head.appendChild(e)}),window.mermaid.initialize({startOnLoad:!1,theme:"dark",themeVariables:{background:"#0f0f10",mainBkg:"#2a2a2a",nodeBorder:"#555",lineColor:"#777",textColor:"#e5e5e5",fontSize:"13px",edgeLabelBackground:"#111"},flowchart:{curve:"basis",htmlLabels:!0,padding:12},securityLevel:"loose"}),Hr=!0)}var ps=0,ue=class extends g{constructor(){super(...arguments);this.rendered=!1;this._svg="";this._source="";this._renderPromise=null}get renderedSvg(){return this._svg}get whenRendered(){return this._renderPromise??Promise.resolve()}connectedCallback(){super.connectedCallback(),this._source=(this.textContent??"").trim();let e=this._source.split(`
630
- `),r=e.filter(i=>i.trim()).reduce((i,s)=>Math.min(i,s.match(/^ */)?.[0].length??0),1/0);r<1/0&&(this._source=e.map(i=>i.slice(r)).join(`
631
- `)),this._renderPromise=this._render()}async _render(){if(!this._source)return;await ds();let e=`mmd-${++ps}`;try{let{svg:r}=await window.mermaid.render(e,this._source);this._svg=r,this.rendered=!0}catch(r){console.error("Mermaid render error",r);let i=r instanceof Error?r.message:String(r);this._svg=`<pre style="color:#f87171">${i}</pre>`}}render(){return f`<div class="canvas" .innerHTML="${this._svg}"></div>`}};ue.styles=v`:host{display:flex;align-items:center;justify-content:center;background:var(--deck-mermaid-bg,var(--rik-code__bg));border:1px solid var(--deck-mermaid-border,var(--rik-code__border));border-radius:var(--deck-mermaid-radius,var(--rik-radius-md));padding:var(--deck-mermaid-padding,var(--rik-space-4));box-shadow:var(--rik-elevation-2);overflow:hidden;min-width:0}:host([compact]){padding:var(--rik-space-2)}.canvas{width:100%;max-width:100%;text-align:center;overflow:hidden}.canvas svg{width:100% !important;height:auto !important;max-width:100% !important;max-height:60cqh}:host([compact]) .canvas{max-width:60%}:host([compact]) .canvas svg{max-height:22cqh}`,c([d({type:Boolean,reflect:!0})],ue.prototype,"rendered",2),c([B()],ue.prototype,"_svg",2),ue=c([k("deck-mermaid")],ue);var hs={yellow:"var(--rik-accent)",orange:"var(--rik-status-warn)",green:"var(--rik-status-success)",red:"var(--rik-status-danger)",purple:"var(--rik-decor-orchid)",lime:"var(--rik-decor-lime)",cyan:"var(--rik-decor-canary)"},fe=class extends g{updated(){this.tone?this.style.setProperty("--_c",hs[this.tone]??this.tone):this.style.removeProperty("--_c")}render(){return f`${this.num?f`<div class="num" part="num">${this.num}</div>`:""}
665
+ `}strong(t){return`<strong>${t}</strong>`}em(t){return`<em>${t}</em>`}codespan(t){return`<code>${t}</code>`}br(){return"<br>"}del(t){return`<del>${t}</del>`}link(t,e,r){let i=Ar(t);if(i===null)return r;t=i;let n='<a href="'+t+'"';return e&&(n+=' title="'+e+'"'),n+=">"+r+"</a>",n}image(t,e,r){let i=Ar(t);if(i===null)return r;t=i;let n=`<img src="${t}" alt="${r}"`;return e&&(n+=` title="${e}"`),n+=">",n}text(t){return t}},Ve=class{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,e,r){return""+r}image(t,e,r){return""+r}br(){return""}},G=class s{options;renderer;textRenderer;constructor(t){this.options=t||ue,this.options.renderer=this.options.renderer||new Le,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ve}static parse(t,e){return new s(e).parse(t)}static parseInline(t,e){return new s(e).parseInline(t)}parse(t,e=!0){let r="";for(let i=0;i<t.length;i++){let n=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[n.type]){let o=n,a=this.options.extensions.renderers[o.type].call({parser:this},o);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(o.type)){r+=a||"";continue}}switch(n.type){case"space":continue;case"hr":{r+=this.renderer.hr();continue}case"heading":{let o=n;r+=this.renderer.heading(this.parseInline(o.tokens),o.depth,Qi(this.parseInline(o.tokens,this.textRenderer)));continue}case"code":{let o=n;r+=this.renderer.code(o.text,o.lang,!!o.escaped);continue}case"table":{let o=n,a="",l="";for(let p=0;p<o.header.length;p++)l+=this.renderer.tablecell(this.parseInline(o.header[p].tokens),{header:!0,align:o.align[p]});a+=this.renderer.tablerow(l);let u="";for(let p=0;p<o.rows.length;p++){let h=o.rows[p];l="";for(let f=0;f<h.length;f++)l+=this.renderer.tablecell(this.parseInline(h[f].tokens),{header:!1,align:o.align[f]});u+=this.renderer.tablerow(l)}r+=this.renderer.table(a,u);continue}case"blockquote":{let o=n,a=this.parse(o.tokens);r+=this.renderer.blockquote(a);continue}case"list":{let o=n,a=o.ordered,l=o.start,u=o.loose,p="";for(let h=0;h<o.items.length;h++){let f=o.items[h],b=f.checked,$=f.task,S="";if(f.task){let P=this.renderer.checkbox(!!b);u?f.tokens.length>0&&f.tokens[0].type==="paragraph"?(f.tokens[0].text=P+" "+f.tokens[0].text,f.tokens[0].tokens&&f.tokens[0].tokens.length>0&&f.tokens[0].tokens[0].type==="text"&&(f.tokens[0].tokens[0].text=P+" "+f.tokens[0].tokens[0].text)):f.tokens.unshift({type:"text",text:P+" "}):S+=P+" "}S+=this.parse(f.tokens,u),p+=this.renderer.listitem(S,$,!!b)}r+=this.renderer.list(p,a,l);continue}case"html":{let o=n;r+=this.renderer.html(o.text,o.block);continue}case"paragraph":{let o=n;r+=this.renderer.paragraph(this.parseInline(o.tokens));continue}case"text":{let o=n,a=o.tokens?this.parseInline(o.tokens):o.text;for(;i+1<t.length&&t[i+1].type==="text";)o=t[++i],a+=`
666
+ `+(o.tokens?this.parseInline(o.tokens):o.text);r+=e?this.renderer.paragraph(a):a;continue}default:{let o='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return r}parseInline(t,e){e=e||this.renderer;let r="";for(let i=0;i<t.length;i++){let n=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[n.type]){let o=this.options.extensions.renderers[n.type].call({parser:this},n);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){r+=o||"";continue}}switch(n.type){case"escape":{let o=n;r+=e.text(o.text);break}case"html":{let o=n;r+=e.html(o.text);break}case"link":{let o=n;r+=e.link(o.href,o.title,this.parseInline(o.tokens,e));break}case"image":{let o=n;r+=e.image(o.href,o.title,o.text);break}case"strong":{let o=n;r+=e.strong(this.parseInline(o.tokens,e));break}case"em":{let o=n;r+=e.em(this.parseInline(o.tokens,e));break}case"codespan":{let o=n;r+=e.codespan(o.text);break}case"br":{r+=e.br();break}case"del":{let o=n;r+=e.del(this.parseInline(o.tokens,e));break}case"text":{let o=n;r+=e.text(o.text);break}default:{let o='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return r}},Te=class{options;constructor(t){this.options=t||ue}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}},It=class{defaults=Nt();options=this.setOptions;parse=this.#e(K.lex,G.parse);parseInline=this.#e(K.lexInline,G.parseInline);Parser=G;Renderer=Le;TextRenderer=Ve;Lexer=K;Tokenizer=Ae;Hooks=Te;constructor(...t){this.use(...t)}walkTokens(t,e){let r=[];for(let i of t)switch(r=r.concat(e.call(this,i)),i.type){case"table":{let n=i;for(let o of n.header)r=r.concat(this.walkTokens(o.tokens,e));for(let o of n.rows)for(let a of o)r=r.concat(this.walkTokens(a.tokens,e));break}case"list":{let n=i;r=r.concat(this.walkTokens(n.items,e));break}default:{let n=i;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(o=>{let a=n[o].flat(1/0);r=r.concat(this.walkTokens(a,e))}):n.tokens&&(r=r.concat(this.walkTokens(n.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let o=e.renderers[n.name];o?e.renderers[n.name]=function(...a){let l=n.renderer.apply(this,a);return l===!1&&(l=o.apply(this,a)),l}:e.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=e[n.level];o?o.unshift(n.tokenizer):e[n.level]=[n.tokenizer],n.start&&(n.level==="block"?e.startBlock?e.startBlock.push(n.start):e.startBlock=[n.start]:n.level==="inline"&&(e.startInline?e.startInline.push(n.start):e.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(e.childTokens[n.name]=n.childTokens)}),i.extensions=e),r.renderer){let n=this.defaults.renderer||new Le(this.defaults);for(let o in r.renderer){if(!(o in n))throw new Error(`renderer '${o}' does not exist`);if(o==="options")continue;let a=o,l=r.renderer[a],u=n[a];n[a]=(...p)=>{let h=l.apply(n,p);return h===!1&&(h=u.apply(n,p)),h||""}}i.renderer=n}if(r.tokenizer){let n=this.defaults.tokenizer||new Ae(this.defaults);for(let o in r.tokenizer){if(!(o in n))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let a=o,l=r.tokenizer[a],u=n[a];n[a]=(...p)=>{let h=l.apply(n,p);return h===!1&&(h=u.apply(n,p)),h}}i.tokenizer=n}if(r.hooks){let n=this.defaults.hooks||new Te;for(let o in r.hooks){if(!(o in n))throw new Error(`hook '${o}' does not exist`);if(o==="options")continue;let a=o,l=r.hooks[a],u=n[a];Te.passThroughHooks.has(o)?n[a]=p=>{if(this.defaults.async)return Promise.resolve(l.call(n,p)).then(f=>u.call(n,f));let h=l.call(n,p);return u.call(n,h)}:n[a]=(...p)=>{let h=l.apply(n,p);return h===!1&&(h=u.apply(n,p)),h}}i.hooks=n}if(r.walkTokens){let n=this.defaults.walkTokens,o=r.walkTokens;i.walkTokens=function(a){let l=[];return l.push(o.call(this,a)),n&&(l=l.concat(n.call(this,a))),l}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return K.lex(t,e??this.defaults)}parser(t,e){return G.parse(t,e??this.defaults)}#e(t,e){return(r,i)=>{let n={...i},o={...this.defaults,...n};this.defaults.async===!0&&n.async===!1&&(o.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),o.async=!0);let a=this.#t(!!o.silent,!!o.async);if(typeof r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(o.hooks&&(o.hooks.options=o),o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(r):r).then(l=>t(l,o)).then(l=>o.hooks?o.hooks.processAllTokens(l):l).then(l=>o.walkTokens?Promise.all(this.walkTokens(l,o.walkTokens)).then(()=>l):l).then(l=>e(l,o)).then(l=>o.hooks?o.hooks.postprocess(l):l).catch(a);try{o.hooks&&(r=o.hooks.preprocess(r));let l=t(r,o);o.hooks&&(l=o.hooks.processAllTokens(l)),o.walkTokens&&this.walkTokens(l,o.walkTokens);let u=e(l,o);return o.hooks&&(u=o.hooks.postprocess(u)),u}catch(l){return a(l)}}}#t(t,e){return r=>{if(r.message+=`
667
+ Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+N(r.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(r);throw r}}},he=new It;function x(s,t){return he.parse(s,t)}x.options=x.setOptions=function(s){return he.setOptions(s),x.defaults=he.defaults,Pr(x.defaults),x};x.getDefaults=Nt;x.defaults=ue;x.use=function(...s){return he.use(...s),x.defaults=he.defaults,Pr(x.defaults),x};x.walkTokens=function(s,t){return he.walkTokens(s,t)};x.parseInline=he.parseInline;x.Parser=G;x.parser=G.parse;x.Renderer=Le;x.TextRenderer=Ve;x.Lexer=K;x.lexer=K.lex;x.Tokenizer=Ae;x.Hooks=Te;x.parse=x;var Ho=x.options,Io=x.setOptions,No=x.use,Oo=x.walkTokens,Ro=x.parseInline;var qo=G.parse,Uo=K.lex;x.setOptions({gfm:!0,breaks:!1});var ze=class extends g{constructor(){super(...arguments);this._html=""}connectedCallback(){super.connectedCallback(),this._parse()}_parse(){let e=this.textContent??"",r=e.split(`
668
+ `),i=r.filter(o=>o.trim().length>0).reduce((o,a)=>Math.min(o,a.match(/^ */)?.[0].length??0),1/0),n=i===1/0?e:r.map(o=>o.slice(i)).join(`
669
+ `);this._html=x.parse(n.trim()),this.textContent=""}render(){return m`<div class="content" .innerHTML="${this._html}"></div>`}};ze.styles=v`:host{display:block;color:var(--rik-text-default--muted);font-family:var(--rik-font-sans)}h1,h2,h3,h4{color:var(--rik-text-default);font-weight:700;letter-spacing:-0.01em}h2{font-size:var(--rik-font-size-h2);margin-bottom:var(--rik-space-2)}h3{font-size:var(--rik-font-size-lead);margin-bottom:var(--rik-space-2);margin-top:var(--rik-space-3)}h4{font-size:var(--rik-font-size-body);margin-bottom:var(--rik-space-1);margin-top:var(--rik-space-3)}p{font-size:var(--rik-font-size-body);line-height:1.65;margin:0 0 var(--rik-space-3)}p:last-child{margin-bottom:0}strong{color:var(--rik-text-default);font-weight:700}em{font-style:italic}code{font-family:var(--rik-font-mono);font-size:var(--rik-font-size-mono-sm);background:var(--rik-surface-tint);padding:2px 6px;border-radius:var(--rik-radius-sm);color:var(--rik-text-default)}pre{background:var(--deck-md-pre-bg,var(--rik-code__bg));border:1px solid var(--deck-md-pre-border,var(--rik-code__border));border-radius:var(--rik-radius-md);padding:var(--rik-space-3) var(--rik-space-4);overflow:auto;font-family:var(--rik-font-mono);font-size:var(--rik-font-size-mono);line-height:1.75;color:var(--deck-md-pre-text,var(--rik-code__text));margin:0 0 var(--rik-space-3);box-shadow:var(--rik-elevation-2)}pre code{background:none;padding:0;color:inherit;border-radius:0}ul,ol{padding-left:1.4rem;margin:0 0 var(--rik-space-3)}li{margin-bottom:var(--rik-space-1);font-size:var(--rik-font-size-body);line-height:1.55}li::marker{color:var(--rik-accent)}a{color:var(--rik-accent);text-decoration:underline;text-decoration-thickness:1px}blockquote{border-left:3px solid var(--rik-accent);padding:var(--rik-space-1) var(--rik-space-3);color:var(--rik-text-default--faint);font-style:italic;margin:0 0 var(--rik-space-3)}hr{border:none;border-top:1px solid var(--rik-border-default);margin:var(--rik-space-4) 0}.content{display:contents}`,c([j()],ze.prototype,"_html",2),ze=c([k("deck-md")],ze);var Br=!1;async function An(){Br||(window.mermaid||await new Promise((s,t)=>{let e=document.createElement("script");e.src=new URL("./vendor/mermaid.min.js",import.meta.url).href,e.onload=()=>s(),e.onerror=()=>t(new Error("mermaid failed to load")),document.head.appendChild(e)}),window.mermaid.initialize({startOnLoad:!1,theme:"dark",themeVariables:{background:"#0f0f10",mainBkg:"#2a2a2a",nodeBorder:"#555",lineColor:"#777",textColor:"#e5e5e5",fontSize:"13px",edgeLabelBackground:"#111"},flowchart:{curve:"basis",htmlLabels:!0,padding:12},securityLevel:"loose"}),Br=!0)}var Ln=0,fe=class extends g{constructor(){super(...arguments);this.rendered=!1;this._svg="";this._source="";this._renderPromise=null}get renderedSvg(){return this._svg}get whenRendered(){return this._renderPromise??Promise.resolve()}connectedCallback(){super.connectedCallback(),this._source=(this.textContent??"").trim();let e=this._source.split(`
670
+ `),r=e.filter(i=>i.trim()).reduce((i,n)=>Math.min(i,n.match(/^ */)?.[0].length??0),1/0);r<1/0&&(this._source=e.map(i=>i.slice(r)).join(`
671
+ `)),this._renderPromise=this._render()}async _render(){if(!this._source)return;await An();let e=`mmd-${++Ln}`;try{let{svg:r}=await window.mermaid.render(e,this._source);this._svg=r,this.rendered=!0}catch(r){console.error("Mermaid render error",r);let i=r instanceof Error?r.message:String(r);this._svg=`<pre style="color:#f87171">${i}</pre>`}}render(){return m`<div class="canvas" .innerHTML="${this._svg}"></div>`}};fe.styles=v`:host{display:flex;align-items:center;justify-content:center;background:var(--deck-mermaid-bg,var(--rik-code__bg));border:1px solid var(--deck-mermaid-border,var(--rik-code__border));border-radius:var(--deck-mermaid-radius,var(--rik-radius-md));padding:var(--deck-mermaid-padding,var(--rik-space-4));box-shadow:var(--rik-elevation-2);overflow:hidden;min-width:0}:host([compact]){padding:var(--rik-space-2)}.canvas{width:100%;max-width:100%;text-align:center;overflow:hidden}.canvas svg{width:100% !important;height:auto !important;max-width:100% !important;max-height:60cqh}:host([compact]) .canvas{max-width:60%}:host([compact]) .canvas svg{max-height:22cqh}`,c([d({type:Boolean,reflect:!0})],fe.prototype,"rendered",2),c([j()],fe.prototype,"_svg",2),fe=c([k("deck-mermaid")],fe);var zn={yellow:"var(--rik-accent)",orange:"var(--rik-status-warn)",green:"var(--rik-status-success)",red:"var(--rik-status-danger)",purple:"var(--rik-decor-orchid)",lime:"var(--rik-decor-lime)",cyan:"var(--rik-decor-canary)"},me=class extends g{updated(){this.tone?this.style.setProperty("--_c",zn[this.tone]??this.tone):this.style.removeProperty("--_c")}render(){return m`${this.num?m`<div class="num" part="num">${this.num}</div>`:""}
632
672
  <slot name="claim"></slot>
633
673
  <div class="body" part="body"><slot></slot></div>
634
- `}};fe.styles=v`:host{display:flex;flex-direction:column;gap:var(--deck-stat-gap,var(--rik-space-2));padding:var(--deck-stat-padding-y,var(--rik-space-4)) var(--deck-stat-padding-x,var(--rik-space-3));border-left:var(--deck-stat-border-width,4px) solid var(--_c,var(--deck-stat-color,var(--rik-accent)));min-width:0;font-family:var(--rik-font-sans)}.num{font-family:var(--rik-font-display,var(--rik-font-sans));font-size:var(--deck-stat-num-size,clamp(3.5rem,7cqw,6rem));font-weight:var(--deck-stat-num-weight,900);line-height:0.9;color:var(--_c,var(--deck-stat-color,var(--rik-accent)));letter-spacing:-0.04em}::slotted([slot="claim"]){font-family:var(--rik-font-display,var(--rik-font-sans));font-size:var(--rik-font-size-strong);font-weight:800;color:var(--deck-stat-claim-color,var(--rik-text-default));line-height:1.1;letter-spacing:-0.02em;margin:0}.body{font-size:var(--rik-font-size-body);color:var(--deck-stat-body-color,var(--rik-text-default--faint));line-height:1.45;margin-top:var(--rik-space-2)}::slotted(strong){color:var(--rik-text-default);font-weight:700}::slotted(code){font-family:var(--rik-font-mono);font-size:var(--rik-font-size-mono-sm);background:var(--rik-surface-tint);color:var(--rik-text-default);padding:2px 6px;border-radius:var(--rik-radius-sm)}`,c([d({type:String})],fe.prototype,"num",2),c([d({type:String})],fe.prototype,"tone",2),fe=c([k("deck-stat")],fe);var Ge=class extends g{render(){return f`<slot></slot>`}};Ge.styles=v`:host{display:flex;flex-direction:column;gap:var(--rik-space-2)}`,Ge=c([k("deck-metric-list")],Ge);var ne=class extends g{constructor(){super(...arguments);this.mono=!1}render(){return f`<span class="label ${this.mono?"mono":""}"><slot></slot></span> <span class="value" data-severity="${this.severity??""}">${this.value}</span>`}};ne.styles=v`:host{display:flex;justify-content:space-between;align-items:center;background:var(--deck-metric-bg,var(--rik-surface-raised--strong));border:1px solid var(--deck-metric-border,var(--rik-border-default));border-radius:var(--deck-metric-radius,var(--rik-radius-md));padding:var(--deck-metric-padding-y,var(--rik-space-2)) var(--deck-metric-padding-x,var(--rik-space-4));font-family:var(--rik-font-sans);font-size:var(--rik-font-size-body);color:var(--deck-metric-text,var(--rik-text-default--muted));box-shadow:var(--deck-metric-shadow,var(--rik-elevation-2))}.label{font-family:inherit}.label.mono{font-family:var(--rik-font-mono);font-size:var(--rik-font-size-sm);color:var(--deck-metric-label-color,var(--rik-text-default--faint))}.value{font-weight:700}.value[data-severity="bad"]{color:var(--deck-metric-value-bad,var(--rik-status-danger))}.value[data-severity="warn"]{color:var(--deck-metric-value-warn,var(--rik-status-warn))}.value[data-severity="ok"]{color:var(--deck-metric-value-ok,var(--rik-status-success))}.value[data-severity="info"]{color:var(--deck-metric-value-info,var(--rik-status-info__text))}`,c([d({type:String})],ne.prototype,"value",2),c([d({type:String})],ne.prototype,"severity",2),c([d({type:Boolean})],ne.prototype,"mono",2),ne=c([k("deck-metric")],ne);var Ke=class extends g{render(){return f`<slot></slot>`}};Ke.styles=v`:host{display:flex;flex-direction:column;gap:var(--rik-space-2xs)}`,Ke=c([k("deck-tier-list")],Ke);var Q=class extends g{constructor(){super(...arguments);this.hot=!1}render(){return f`<div class="head"> <span class="name">${this.name}</span> <span class="speed" data-severity="${this.severity??(this.hot?"hot":"")}">${this.speed}</span> </div> <div class="desc"><slot></slot></div>`}};Q.styles=v`:host{display:flex;flex-direction:column;gap:var(--rik-space-hair);background:var(--deck-tier-bg,var(--rik-surface-raised--strong));border:1px solid var(--deck-tier-border,var(--rik-border-default));border-radius:var(--deck-tier-radius,var(--rik-radius-md));padding:var(--deck-tier-padding-y,var(--rik-space-2)) var(--deck-tier-padding-x,var(--rik-space-4));box-shadow:var(--deck-tier-shadow,var(--rik-elevation-2));font-family:var(--rik-font-sans)}:host([hot]){border-color:var(--deck-tier-hot-border,var(--rik-status-info__border));background:var(--deck-tier-hot-bg,var(--rik-status-info__bg))}.head{display:flex;justify-content:space-between;align-items:baseline}.name{font:700 var(--rik-font-size-body)/1 var(--rik-font-mono);color:var(--deck-tier-name-color,var(--rik-text-default))}:host([hot]) .name{color:var(--deck-tier-hot-color,var(--rik-accent))}.speed{font:700 var(--rik-font-size-body)/1 var(--rik-font-mono)}.speed[data-severity="muted"]{color:var(--deck-tier-speed-muted,var(--rik-text-default--faint))}.speed[data-severity="warn"]{color:var(--deck-tier-speed-warn,var(--rik-status-warn))}.speed[data-severity="ok"]{color:var(--deck-tier-speed-ok,var(--rik-status-success))}:host([hot]) .speed{color:var(--deck-tier-hot-color,var(--rik-accent))}.desc{font-size:var(--rik-font-size-sm);color:var(--deck-tier-desc-color,var(--rik-text-default--faint));line-height:1.4}`,c([d({type:String})],Q.prototype,"name",2),c([d({type:String})],Q.prototype,"speed",2),c([d({type:String})],Q.prototype,"severity",2),c([d({type:Boolean,reflect:!0})],Q.prototype,"hot",2),Q=c([k("deck-tier")],Q);var Qe=class extends g{render(){return f`<slot></slot>`}};Qe.styles=v`:host{display:block;text-align:center;color:var(--rik-text-default--faint);opacity:var(--rik-opacity-soft);font-size:var(--rik-font-size-xs);padding:2px 0}`,Qe=c([k("deck-tier-arrow")],Qe);var Je=class extends g{render(){return f`<slot></slot>`}};Je.styles=v`:host{display:flex;flex-direction:column;gap:var(--rik-space-2xs)}`,Je=c([k("deck-step-list")],Je);var me=class extends g{render(){return f`<span class="step-num">${this.n}</span> <span class="label"><slot></slot></span> ${this.note?f`<span class="chip">${this.note}</span>`:""}
635
- `}};me.styles=v`:host{display:flex;align-items:center;gap:var(--rik-space-3);background:var(--deck-step-bg,var(--rik-surface-raised--strong));border:1px solid var(--deck-step-border,var(--rik-border-default));border-radius:var(--deck-step-radius,var(--rik-radius-md));padding:var(--deck-step-padding-y,var(--rik-space-2xs)) var(--deck-step-padding-x,var(--rik-space-3));box-shadow:var(--deck-step-shadow,var(--rik-elevation-2));font-family:var(--rik-font-sans);font-size:var(--rik-font-size-body)}.step-num{flex:0 0 auto;width:var(--deck-step-num-size,var(--rik-icon-sm));height:var(--deck-step-num-size,var(--rik-icon-sm));display:inline-flex;align-items:center;justify-content:center;background:var(--deck-step-num-bg,var(--rik-accent));color:var(--deck-step-num-color,var(--rik-accent__on,var(--rik-surface-inverse)));border-radius:50%;font:700 var(--rik-font-size-xs)/1 var(--rik-font-sans)}.label{flex:1;font-family:var(--rik-font-mono);font-weight:600;color:var(--deck-step-label-color,var(--rik-text-default))}.chip{flex:0 0 auto;display:inline-block;padding:2px var(--rik-space-2);background:var(--deck-step-chip-bg,var(--rik-surface-tint));color:var(--deck-step-chip-color,var(--rik-text-default--faint));border-radius:var(--rik-radius-pill);font:600 var(--rik-font-size-sm)/1.4 var(--rik-font-sans)}`,c([d({type:String})],me.prototype,"n",2),c([d({type:String})],me.prototype,"note",2),me=c([k("deck-step")],me);var ze=class extends g{render(){return f`<slot></slot>`}};ze.styles=v`:host{display:inline-flex;align-items:center;justify-content:center;background:var(--deck-kbd-bg,var(--rik-surface-raised--strong));border:1px solid var(--deck-kbd-border,var(--rik-border-default));border-bottom:3px solid var(--rik-surface-tint--strong,rgba(0,0,0,0.10));border-radius:var(--deck-kbd-radius,5px);padding:var(--deck-kbd-padding-y,3px) var(--deck-kbd-padding-x,8px);font:700 0.92rem/1 var(--rik-font-mono);color:var(--deck-kbd-color,var(--rik-text-default));min-width:22px;text-align:center;box-shadow:0 1px 0 rgba(255,255,255,0.5) inset}:host([tone="accent"]){background:var(--deck-kbd-accent-bg,var(--rik-accent));color:var(--deck-kbd-color,var(--rik-accent__on,var(--rik-surface-inverse)));border-color:rgba(0,0,0,0.15)}:host([tone="ok"]){background:var(--deck-kbd-ok-bg,var(--rik-status-success));color:var(--deck-kbd-color,var(--rik-surface-inverse));border-color:rgba(0,0,0,0.15)}`,c([d({type:String})],ze.prototype,"tone",2),ze=c([k("deck-kbd")],ze);var J=class extends g{render(){let t=(this.keys??"").trim().split(/\s+/).filter(Boolean);return f`<span class="keys" part="keys"> ${t.map(e=>f`<span class="k">${e}</span>`)}
674
+ `}};me.styles=v`:host{display:flex;flex-direction:column;gap:var(--deck-stat-gap,var(--rik-space-2));padding:var(--deck-stat-padding-y,var(--rik-space-4)) var(--deck-stat-padding-x,var(--rik-space-3));border-left:var(--deck-stat-border-width,4px) solid var(--_c,var(--deck-stat-color,var(--rik-accent)));min-width:0;font-family:var(--rik-font-sans)}.num{font-family:var(--rik-font-display,var(--rik-font-sans));font-size:var(--deck-stat-num-size,clamp(3.5rem,7cqw,6rem));font-weight:var(--deck-stat-num-weight,900);line-height:0.9;color:var(--_c,var(--deck-stat-color,var(--rik-accent)));letter-spacing:-0.04em}::slotted([slot="claim"]){font-family:var(--rik-font-display,var(--rik-font-sans));font-size:var(--rik-font-size-strong);font-weight:800;color:var(--deck-stat-claim-color,var(--rik-text-default));line-height:1.1;letter-spacing:-0.02em;margin:0}.body{font-size:var(--rik-font-size-body);color:var(--deck-stat-body-color,var(--rik-text-default--faint));line-height:1.45;margin-top:var(--rik-space-2)}::slotted(strong){color:var(--rik-text-default);font-weight:700}::slotted(code){font-family:var(--rik-font-mono);font-size:var(--rik-font-size-mono-sm);background:var(--rik-surface-tint);color:var(--rik-text-default);padding:2px 6px;border-radius:var(--rik-radius-sm)}`,c([d({type:String})],me.prototype,"num",2),c([d({type:String})],me.prototype,"tone",2),me=c([k("deck-stat")],me);var Qe=class extends g{render(){return m`<slot></slot>`}};Qe.styles=v`:host{display:flex;flex-direction:column;gap:var(--rik-space-2)}`,Qe=c([k("deck-metric-list")],Qe);var ie=class extends g{constructor(){super(...arguments);this.mono=!1}render(){return m`<span class="label ${this.mono?"mono":""}"><slot></slot></span> <span class="value" data-severity="${this.severity??""}">${this.value}</span>`}};ie.styles=v`:host{display:flex;justify-content:space-between;align-items:center;background:var(--deck-metric-bg,var(--rik-surface-raised--strong));border:1px solid var(--deck-metric-border,var(--rik-border-default));border-radius:var(--deck-metric-radius,var(--rik-radius-md));padding:var(--deck-metric-padding-y,var(--rik-space-2)) var(--deck-metric-padding-x,var(--rik-space-4));font-family:var(--rik-font-sans);font-size:var(--rik-font-size-body);color:var(--deck-metric-text,var(--rik-text-default--muted));box-shadow:var(--deck-metric-shadow,var(--rik-elevation-2))}.label{font-family:inherit}.label.mono{font-family:var(--rik-font-mono);font-size:var(--rik-font-size-sm);color:var(--deck-metric-label-color,var(--rik-text-default--faint))}.value{font-weight:700}.value[data-severity="bad"]{color:var(--deck-metric-value-bad,var(--rik-status-danger))}.value[data-severity="warn"]{color:var(--deck-metric-value-warn,var(--rik-status-warn))}.value[data-severity="ok"]{color:var(--deck-metric-value-ok,var(--rik-status-success))}.value[data-severity="info"]{color:var(--deck-metric-value-info,var(--rik-status-info__text))}`,c([d({type:String})],ie.prototype,"value",2),c([d({type:String})],ie.prototype,"severity",2),c([d({type:Boolean})],ie.prototype,"mono",2),ie=c([k("deck-metric")],ie);var Je=class extends g{render(){return m`<slot></slot>`}};Je.styles=v`:host{display:flex;flex-direction:column;gap:var(--rik-space-2xs)}`,Je=c([k("deck-tier-list")],Je);var Q=class extends g{constructor(){super(...arguments);this.hot=!1}render(){return m`<div class="head"> <span class="name">${this.name}</span> <span class="speed" data-severity="${this.severity??(this.hot?"hot":"")}">${this.speed}</span> </div> <div class="desc"><slot></slot></div>`}};Q.styles=v`:host{display:flex;flex-direction:column;gap:var(--rik-space-hair);background:var(--deck-tier-bg,var(--rik-surface-raised--strong));border:1px solid var(--deck-tier-border,var(--rik-border-default));border-radius:var(--deck-tier-radius,var(--rik-radius-md));padding:var(--deck-tier-padding-y,var(--rik-space-2)) var(--deck-tier-padding-x,var(--rik-space-4));box-shadow:var(--deck-tier-shadow,var(--rik-elevation-2));font-family:var(--rik-font-sans)}:host([hot]){border-color:var(--deck-tier-hot-border,var(--rik-status-info__border));background:var(--deck-tier-hot-bg,var(--rik-status-info__bg))}.head{display:flex;justify-content:space-between;align-items:baseline}.name{font:700 var(--rik-font-size-body)/1 var(--rik-font-mono);color:var(--deck-tier-name-color,var(--rik-text-default))}:host([hot]) .name{color:var(--deck-tier-hot-color,var(--rik-accent))}.speed{font:700 var(--rik-font-size-body)/1 var(--rik-font-mono)}.speed[data-severity="muted"]{color:var(--deck-tier-speed-muted,var(--rik-text-default--faint))}.speed[data-severity="warn"]{color:var(--deck-tier-speed-warn,var(--rik-status-warn))}.speed[data-severity="ok"]{color:var(--deck-tier-speed-ok,var(--rik-status-success))}:host([hot]) .speed{color:var(--deck-tier-hot-color,var(--rik-accent))}.desc{font-size:var(--rik-font-size-sm);color:var(--deck-tier-desc-color,var(--rik-text-default--faint));line-height:1.4}`,c([d({type:String})],Q.prototype,"name",2),c([d({type:String})],Q.prototype,"speed",2),c([d({type:String})],Q.prototype,"severity",2),c([d({type:Boolean,reflect:!0})],Q.prototype,"hot",2),Q=c([k("deck-tier")],Q);var De=class extends g{render(){return m`<slot></slot>`}};De.styles=v`:host{display:block;text-align:center;color:var(--rik-text-default--faint);opacity:var(--rik-opacity-soft);font-size:var(--rik-font-size-xs);padding:2px 0}`,De=c([k("deck-tier-arrow")],De);var et=class extends g{render(){return m`<slot></slot>`}};et.styles=v`:host{display:flex;flex-direction:column;gap:var(--rik-space-2xs)}`,et=c([k("deck-step-list")],et);var ge=class extends g{render(){return m`<span class="step-num">${this.n}</span> <span class="label"><slot></slot></span> ${this.note?m`<span class="chip">${this.note}</span>`:""}
675
+ `}};ge.styles=v`:host{display:flex;align-items:center;gap:var(--rik-space-3);background:var(--deck-step-bg,var(--rik-surface-raised--strong));border:1px solid var(--deck-step-border,var(--rik-border-default));border-radius:var(--deck-step-radius,var(--rik-radius-md));padding:var(--deck-step-padding-y,var(--rik-space-2xs)) var(--deck-step-padding-x,var(--rik-space-3));box-shadow:var(--deck-step-shadow,var(--rik-elevation-2));font-family:var(--rik-font-sans);font-size:var(--rik-font-size-body)}.step-num{flex:0 0 auto;width:var(--deck-step-num-size,var(--rik-icon-sm));height:var(--deck-step-num-size,var(--rik-icon-sm));display:inline-flex;align-items:center;justify-content:center;background:var(--deck-step-num-bg,var(--rik-accent));color:var(--deck-step-num-color,var(--rik-accent__on,var(--rik-surface-inverse)));border-radius:50%;font:700 var(--rik-font-size-xs)/1 var(--rik-font-sans)}.label{flex:1;font-family:var(--rik-font-mono);font-weight:600;color:var(--deck-step-label-color,var(--rik-text-default))}.chip{flex:0 0 auto;display:inline-block;padding:2px var(--rik-space-2);background:var(--deck-step-chip-bg,var(--rik-surface-tint));color:var(--deck-step-chip-color,var(--rik-text-default--faint));border-radius:var(--rik-radius-pill);font:600 var(--rik-font-size-sm)/1.4 var(--rik-font-sans)}`,c([d({type:String})],ge.prototype,"n",2),c([d({type:String})],ge.prototype,"note",2),ge=c([k("deck-step")],ge);var Ce=class extends g{render(){return m`<slot></slot>`}};Ce.styles=v`:host{display:inline-flex;align-items:center;justify-content:center;background:var(--deck-kbd-bg,var(--rik-surface-raised--strong));border:1px solid var(--deck-kbd-border,var(--rik-border-default));border-bottom:3px solid var(--rik-surface-tint--strong,rgba(0,0,0,0.10));border-radius:var(--deck-kbd-radius,5px);padding:var(--deck-kbd-padding-y,3px) var(--deck-kbd-padding-x,8px);font:700 0.92rem/1 var(--rik-font-mono);color:var(--deck-kbd-color,var(--rik-text-default));min-width:22px;text-align:center;box-shadow:0 1px 0 rgba(255,255,255,0.5) inset}:host([tone="accent"]){background:var(--deck-kbd-accent-bg,var(--rik-accent));color:var(--deck-kbd-color,var(--rik-accent__on,var(--rik-surface-inverse)));border-color:rgba(0,0,0,0.15)}:host([tone="ok"]){background:var(--deck-kbd-ok-bg,var(--rik-status-success));color:var(--deck-kbd-color,var(--rik-surface-inverse));border-color:rgba(0,0,0,0.15)}`,c([d({type:String})],Ce.prototype,"tone",2),Ce=c([k("deck-kbd")],Ce);var J=class extends g{render(){let t=(this.keys??"").trim().split(/\s+/).filter(Boolean);return m`<span class="keys" part="keys"> ${t.map(e=>m`<span class="k">${e}</span>`)}
636
676
  </span>
637
677
  <div class="body" part="body">
638
- ${this.label?f`<div class="label">${this.label}</div>`:""}
639
- ${this.note?f`<div class="note">${this.note}</div>`:f`<div class="note"><slot></slot></div>`}
678
+ ${this.label?m`<div class="label">${this.label}</div>`:""}
679
+ ${this.note?m`<div class="note">${this.note}</div>`:m`<div class="note"><slot></slot></div>`}
640
680
  </div>
641
- `}};J.styles=v`:host{display:flex;align-items:center;gap:var(--rik-space-3);padding:var(--rik-space-2) 0;font-family:var(--rik-font-sans)}.keys{display:inline-flex;gap:4px;flex-shrink:0}.keys deck-kbd,.keys .k{display:inline-flex;align-items:center;justify-content:center;background:var(--rik-surface-raised--strong);border:1px solid var(--rik-border-default);border-bottom:3px solid rgba(0,0,0,0.10);border-radius:5px;padding:3px 8px;font:700 0.92rem/1 var(--rik-font-mono);color:var(--rik-text-default);min-width:22px;text-align:center}.body{flex:1;min-width:0}.label{font:700 var(--rik-font-size-body)/1.2 var(--rik-font-sans);color:var(--rik-text-default)}.note{font:400 var(--rik-font-size-sm)/1.4 var(--rik-font-sans);color:var(--rik-text-default--faint);margin-top:2px}:host([tone="accent"]) .keys .k{background:var(--rik-accent);color:var(--rik-surface-inverse);border-color:rgba(0,0,0,0.15)}:host([tone="ok"]) .keys .k{background:var(--rik-status-success);color:var(--rik-surface-inverse);border-color:rgba(0,0,0,0.15)}`,c([d({type:String})],J.prototype,"keys",2),c([d({type:String})],J.prototype,"label",2),c([d({type:String})],J.prototype,"note",2),c([d({type:String})],J.prototype,"tone",2),J=c([k("deck-shortcut")],J);var ge=class extends g{updated(){if(this.colGap){let t=parseInt(this.colGap,10),e=!Number.isNaN(t)&&t>=1&&t<=6?`var(--sp-${t})`:this.colGap;this.style.setProperty("--_col-gap",e)}}render(){return f`<slot></slot>`}};ge.styles=v`:host{display:grid;grid-template-columns:1fr 1fr;gap:0 var(--_col-gap,var(--rik-space-5));font-family:var(--rik-font-sans)}:host([cols="1"]){grid-template-columns:1fr}::slotted(deck-shortcut){border-bottom:1px solid var(--rik-border-default)}`,c([d({type:String})],ge.prototype,"cols",2),c([d({type:String,attribute:"col-gap"})],ge.prototype,"colGap",2),ge=c([k("deck-shortcut-list")],ge);var us={start:"flex-start",center:"center",end:"flex-end",between:"space-between",around:"space-around"},fs={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch"},D=class extends g{updated(){if(this.gap){let t=parseInt(this.gap,10);!Number.isNaN(t)&&t>=1&&t<=6?this.style.setProperty("--_gap",`var(--rik-space-${t})`):this.style.setProperty("--_gap",this.gap)}else this.style.removeProperty("--_gap");this.style.setProperty("--_dir",this.direction==="row"?"row":"column"),this.align&&this.style.setProperty("--_align",fs[this.align]??this.align),this.justify&&this.style.setProperty("--_justify",us[this.justify]??this.justify)}render(){return f`<slot></slot>`}};D.styles=v`:host{display:flex;flex-direction:var(--_dir,column);gap:var(--_gap,var(--deck-stack-gap,var(--rik-space-3)));align-items:var(--_align,stretch);justify-content:var(--_justify,flex-start);min-width:0;min-height:0}:host([fill]){flex:1 1 auto}`,c([d({type:String})],D.prototype,"gap",2),c([d({type:String})],D.prototype,"direction",2),c([d({type:String})],D.prototype,"align",2),c([d({type:String})],D.prototype,"justify",2),D=c([k("deck-stack")],D);var Pr={start:"start",center:"center",end:"end",stretch:"stretch"};function Ir(o){if(!o)return null;let t=parseInt(o,10);return!Number.isNaN(t)&&String(t)===o.trim()&&t>=1&&t<=12?`repeat(${t}, minmax(0, 1fr))`:o}function ms(o){if(!o)return null;let t=parseInt(o,10);return!Number.isNaN(t)&&t>=1&&t<=6?`var(--rik-space-${t})`:o}var Z=class extends g{updated(){let t=Ir(this.cols),e=Ir(this.rows),r=ms(this.gap);t&&this.style.setProperty("--_cols",t),e&&this.style.setProperty("--_rows",e),r&&this.style.setProperty("--_gap",r),this.align&&this.style.setProperty("--_align",Pr[this.align]??this.align),this.justify&&this.style.setProperty("--_justify",Pr[this.justify]??this.justify)}render(){return f`<slot></slot>`}};Z.styles=v`:host{display:grid;grid-template-columns:var(--_cols,1fr);grid-template-rows:var(--_rows,auto);gap:var(--_gap,var(--deck-grid-gap,var(--rik-space-3)));align-items:var(--_align,stretch);justify-items:var(--_justify,stretch);min-width:0;min-height:0}:host([fill]){flex:1 1 auto;height:100%}`,c([d({type:String})],Z.prototype,"cols",2),c([d({type:String})],Z.prototype,"rows",2),c([d({type:String})],Z.prototype,"gap",2),c([d({type:String})],Z.prototype,"align",2),c([d({type:String})],Z.prototype,"justify",2),Z=c([k("deck-grid")],Z);var Ce=class extends g{render(){return f`<slot></slot>`}};Ce.styles=v`:host{display:inline-block;padding:var(--deck-badge-padding-y,var(--rik-space-1)) var(--deck-badge-padding-x,var(--rik-space-3));margin-bottom:var(--rik-space-2);font:700 var(--rik-font-size-xs)/1.2 var(--rik-font-sans);letter-spacing:0.1em;text-transform:uppercase;border-radius:var(--deck-badge-radius,var(--rik-radius-pill));background:var(--deck-badge-bg,var(--rik-surface-tint));color:var(--deck-badge-fg,var(--rik-text-default--faint));border:1px solid var(--deck-badge-border,var(--rik-border-default))}:host([type="bad"]){--deck-badge-bg:var(--rik-status-danger__bg);--deck-badge-fg:var(--rik-status-danger);--deck-badge-border:var(--rik-status-danger__border)}:host([type="ok"]){--deck-badge-bg:var(--rik-status-success__bg);--deck-badge-fg:var(--rik-status-success);--deck-badge-border:var(--rik-status-success__border)}:host([type="info"]){--deck-badge-bg:var(--rik-status-info__bg--strong);--deck-badge-fg:var(--rik-status-info__text);--deck-badge-border:var(--rik-status-info__border)}:host([type="warn"]){--deck-badge-bg:var(--rik-status-warn__bg);--deck-badge-fg:var(--rik-status-warn);--deck-badge-border:var(--rik-status-warn__border)}`,c([d({type:String})],Ce.prototype,"type",2),Ce=c([k("deck-badge")],Ce);var Ot=class extends g{static{this.styles=v`:host{display:block;font:700 var(--deck-kicker-font-size,var(--rik-font-size-xs))/1.2 var(--rik-font-sans);letter-spacing:var(--deck-kicker-tracking,0.14em);text-transform:uppercase;color:var(--deck-kicker-color,var(--rik-text-default--faint));margin-bottom:var(--deck-kicker-margin,var(--rik-space-2))}:host([on-dark]){color:var(--deck-kicker-on-dark-color,var(--rik-text-inverse--faint))}`}render(){return f`<slot></slot>`}};customElements.define("deck-kicker",Ot);var Nr={warn:"var(--rik-status-warn)",danger:"var(--rik-status-danger)",ok:"var(--rik-status-success)",info:"var(--rik-accent)",muted:"var(--rik-text-default--faint)",accent:"var(--rik-accent)"},Rr={lead:"var(--rik-font-size-lead)",big:"var(--rik-font-size-big)",mega:"var(--rik-font-size-mega)",stat:"var(--rik-font-size-stat)",display:"clamp(2.6rem, 6cqw, 5rem)"},ee=class extends g{updated(){this.tone&&Nr[this.tone]?this.style.setProperty("--_color",Nr[this.tone]):this.style.removeProperty("--_color"),this.size&&Rr[this.size]?this.style.setProperty("--_size",Rr[this.size]):this.style.removeProperty("--_size")}render(){return f`<slot></slot>`}};ee.styles=v`:host{display:block;margin:0;font-family:var(--rik-font-display,var(--rik-font-sans));font-weight:900;line-height:1.1;letter-spacing:-0.02em;font-size:var(--deck-punch-size,var(--_size,var(--rik-font-size-lead)));color:var(--deck-punch-color,var(--_color,inherit))}:host([weight="700"]){font-weight:700}:host([weight="800"]){font-weight:800}:host([align="center"]){text-align:center}:host([align="right"]){text-align:right}`,c([d({type:String})],ee.prototype,"tone",2),c([d({type:String})],ee.prototype,"size",2),c([d({type:String,reflect:!0})],ee.prototype,"weight",2),c([d({type:String,reflect:!0})],ee.prototype,"align",2),ee=c([k("deck-punch")],ee);function gs(o,t){let e=o.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),r=[],i=(a,l)=>{let h="P"+r.length+"E";return r.push('<span class="'+a+'">'+l+"</span>"),h};return t==="html"||t==="xml"||t==="svg"?(e=e.replace(/(&lt;!--[\s\S]*?--&gt;)/g,a=>i("cmt",a)),e=e.replace(/(&lt;!doctype[^&]*&gt;)/gi,a=>i("cmt",a)),e=e.replace(/("[^"]*"|'[^']*')/g,a=>i("str",a)),e=e.replace(/(&lt;\/?)([a-zA-Z][a-zA-Z0-9:-]*)/g,(a,l,h)=>l+i("kw",h)),e=e.replace(/\b([a-zA-Z][a-zA-Z0-9-]*)(?==)/g,a=>i("prop",a))):t==="css"||t==="scss"||t==="less"?(e=e.replace(/(\/\*[\s\S]*?\*\/)/g,a=>i("cmt",a)),e=e.replace(/("[^"]*"|'[^']*')/g,a=>i("str",a)),e=e.replace(/([a-zA-Z-]+)(?=\s*:)/g,a=>i("prop",a)),e=e.replace(/(#[0-9a-fA-F]{3,8})\b/g,a=>i("num",a)),e=e.replace(/\b(\d+(?:\.\d+)?)(px|rem|em|%|vh|vw|vmin|vmax|s|ms|deg)?/g,(a,l,h)=>i("num",l+(h??"")))):(e=e.replace(/(\/\/[^\n]*)/g,a=>i("cmt",a)),e=e.replace(/(['"`])((?:\\.|(?!\1)[^\\])*)\1/g,a=>i("str",a)),e=e.replace(/\b(const|let|var|function|return|if|else|for|while|class|extends|new|export|import|from|as|await|async|of|in|typeof|instanceof|true|false|null|undefined)\b/g,a=>i("kw",a)),e=e.replace(/\b(\d+(?:\.\d+)?)\b/g,a=>i("num",a))),e=e.replace(/P(\d+)E/g,(a,l)=>r[+l]??""),e}var X=class extends g{constructor(){super(...arguments);this.lang="";this.hero=!1;this.nested=!1;this._html="";this._groups=null}connectedCallback(){super.connectedCallback(),this._highlight();try{this._groups=JSON.parse(this.getAttribute("step-groups")??"null")}catch{this._groups=null}}_highlight(){let r=(this.textContent??"").split(`
642
- `);for(;r.length&&!r[0].trim();)r.shift();for(;r.length&&!r[r.length-1].trim();)r.pop();let i=r.filter(n=>n.trim().length>0).reduce((n,a)=>Math.min(n,a.match(/^ */)?.[0].length??0),1/0),s=i===1/0?r:r.map(n=>n.slice(i));this._html=s.map((n,a)=>'<span class="line" data-line="'+(a+1)+'">'+gs(n||" ",this.lang)+"</span>").join("")}applyStep(e){if(!this._groups)return;let r=this.shadowRoot?.querySelectorAll(".line");if(r)if(e===0)r.forEach(i=>i.classList.remove("dim","lit"));else{let i=this._groups[Math.min(e-1,this._groups.length-1)]??[];r.forEach(s=>{let n=parseInt(s.dataset.line??"0",10);s.classList.toggle("lit",i.includes(n)),s.classList.toggle("dim",!i.includes(n))})}}render(){return f`<pre><code .innerHTML="${this._html}"></code></pre>`}};X.styles=v`:host{display:block;background:var(--deck-code-bg,var(--rik-code__bg));border:1px solid var(--deck-code-border,var(--rik-code__border));border-radius:var(--deck-code-radius,var(--rik-radius-md));padding:var(--deck-code-padding-y,var(--rik-space-3)) var(--deck-code-padding-x,var(--rik-space-4));font-family:var(--rik-font-mono);font-size:var(--rik-font-size-mono);line-height:1.7;color:var(--deck-code-text,var(--rik-code__text));box-shadow:var(--rik-elevation-2);overflow:auto;white-space:pre}:host([hero]){display:flex;align-items:safe center;padding:var(--deck-code-padding-y,var(--rik-space-4)) var(--deck-code-padding-x,var(--rik-space-5))}:host([nested]){box-shadow:none;border-radius:var(--rik-radius-sm);padding:var(--deck-code-padding-y,var(--rik-space-2)) var(--deck-code-padding-x,var(--rik-space-3))}pre{margin:0;font:inherit;color:inherit}code{display:block;width:100%;font:inherit;color:inherit}.line{transition:opacity 0.25s ease;display:block}.line.dim{opacity:0.25}.line.lit{opacity:1}.kw{color:var(--deck-code-syntax-kw,var(--rik-code__syntax-keyword))}.fn{color:var(--deck-code-syntax-fn,var(--rik-code__syntax-function))}.str{color:var(--deck-code-syntax-str,var(--rik-code__syntax-string))}.num{color:var(--deck-code-syntax-num,var(--rik-code__syntax-number))}.cmt{color:var(--deck-code-syntax-cmt,var(--rik-code__syntax-comment));font-style:italic}.ty{color:var(--deck-code-syntax-ty,var(--rik-code__syntax-type))}.prop{color:var(--deck-code-syntax-prop,var(--rik-code__syntax-property))}`,c([d({type:String})],X.prototype,"lang",2),c([d({type:Boolean,reflect:!0})],X.prototype,"hero",2),c([d({type:Boolean,reflect:!0})],X.prototype,"nested",2),c([d({type:String,attribute:"step-groups"})],X.prototype,"stepGroups",2),c([B()],X.prototype,"_html",2),X=c([k("deck-code")],X);new URLSearchParams(location.search).has("live")&&Promise.resolve().then(()=>(Br(),ys));
681
+ `}};J.styles=v`:host{display:flex;align-items:center;gap:var(--rik-space-3);padding:var(--rik-space-2) 0;font-family:var(--rik-font-sans)}.keys{display:inline-flex;gap:4px;flex-shrink:0}.keys deck-kbd,.keys .k{display:inline-flex;align-items:center;justify-content:center;background:var(--rik-surface-raised--strong);border:1px solid var(--rik-border-default);border-bottom:3px solid rgba(0,0,0,0.10);border-radius:5px;padding:3px 8px;font:700 0.92rem/1 var(--rik-font-mono);color:var(--rik-text-default);min-width:22px;text-align:center}.body{flex:1;min-width:0}.label{font:700 var(--rik-font-size-body)/1.2 var(--rik-font-sans);color:var(--rik-text-default)}.note{font:400 var(--rik-font-size-sm)/1.4 var(--rik-font-sans);color:var(--rik-text-default--faint);margin-top:2px}:host([tone="accent"]) .keys .k{background:var(--rik-accent);color:var(--rik-surface-inverse);border-color:rgba(0,0,0,0.15)}:host([tone="ok"]) .keys .k{background:var(--rik-status-success);color:var(--rik-surface-inverse);border-color:rgba(0,0,0,0.15)}`,c([d({type:String})],J.prototype,"keys",2),c([d({type:String})],J.prototype,"label",2),c([d({type:String})],J.prototype,"note",2),c([d({type:String})],J.prototype,"tone",2),J=c([k("deck-shortcut")],J);var ve=class extends g{updated(){if(this.colGap){let t=parseInt(this.colGap,10),e=!Number.isNaN(t)&&t>=1&&t<=6?`var(--sp-${t})`:this.colGap;this.style.setProperty("--_col-gap",e)}}render(){return m`<slot></slot>`}};ve.styles=v`:host{display:grid;grid-template-columns:1fr 1fr;gap:0 var(--_col-gap,var(--rik-space-5));font-family:var(--rik-font-sans)}:host([cols="1"]){grid-template-columns:1fr}::slotted(deck-shortcut){border-bottom:1px solid var(--rik-border-default)}`,c([d({type:String})],ve.prototype,"cols",2),c([d({type:String,attribute:"col-gap"})],ve.prototype,"colGap",2),ve=c([k("deck-shortcut-list")],ve);var Cn={start:"flex-start",center:"center",end:"flex-end",between:"space-between",around:"space-around"},Pn={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch"},D=class extends g{updated(){if(this.gap){let t=parseInt(this.gap,10);!Number.isNaN(t)&&t>=1&&t<=6?this.style.setProperty("--_gap",`var(--rik-space-${t})`):this.style.setProperty("--_gap",this.gap)}else this.style.removeProperty("--_gap");this.style.setProperty("--_dir",this.direction==="row"?"row":"column"),this.align&&this.style.setProperty("--_align",Pn[this.align]??this.align),this.justify&&this.style.setProperty("--_justify",Cn[this.justify]??this.justify)}render(){return m`<slot></slot>`}};D.styles=v`:host{display:flex;flex-direction:var(--_dir,column);gap:var(--_gap,var(--deck-stack-gap,var(--rik-space-3)));align-items:var(--_align,stretch);justify-content:var(--_justify,flex-start);min-width:0;min-height:0}:host([fill]){flex:1 1 auto}`,c([d({type:String})],D.prototype,"gap",2),c([d({type:String})],D.prototype,"direction",2),c([d({type:String})],D.prototype,"align",2),c([d({type:String})],D.prototype,"justify",2),D=c([k("deck-stack")],D);var Yr={start:"start",center:"center",end:"end",stretch:"stretch"};function Wr(s){if(!s)return null;let t=parseInt(s,10);return!Number.isNaN(t)&&String(t)===s.trim()&&t>=1&&t<=12?`repeat(${t}, minmax(0, 1fr))`:s}function Mn(s){if(!s)return null;let t=parseInt(s,10);return!Number.isNaN(t)&&t>=1&&t<=6?`var(--rik-space-${t})`:s}var Z=class extends g{updated(){let t=Wr(this.cols),e=Wr(this.rows),r=Mn(this.gap);t&&this.style.setProperty("--_cols",t),e&&this.style.setProperty("--_rows",e),r&&this.style.setProperty("--_gap",r),this.align&&this.style.setProperty("--_align",Yr[this.align]??this.align),this.justify&&this.style.setProperty("--_justify",Yr[this.justify]??this.justify)}render(){return m`<slot></slot>`}};Z.styles=v`:host{display:grid;grid-template-columns:var(--_cols,1fr);grid-template-rows:var(--_rows,auto);gap:var(--_gap,var(--deck-grid-gap,var(--rik-space-3)));align-items:var(--_align,stretch);justify-items:var(--_justify,stretch);min-width:0;min-height:0}:host([fill]){flex:1 1 auto;height:100%}`,c([d({type:String})],Z.prototype,"cols",2),c([d({type:String})],Z.prototype,"rows",2),c([d({type:String})],Z.prototype,"gap",2),c([d({type:String})],Z.prototype,"align",2),c([d({type:String})],Z.prototype,"justify",2),Z=c([k("deck-grid")],Z);var Pe=class extends g{render(){return m`<slot></slot>`}};Pe.styles=v`:host{display:inline-block;padding:var(--deck-badge-padding-y,var(--rik-space-1)) var(--deck-badge-padding-x,var(--rik-space-3));margin-bottom:var(--rik-space-2);font:700 var(--rik-font-size-xs)/1.2 var(--rik-font-sans);letter-spacing:0.1em;text-transform:uppercase;border-radius:var(--deck-badge-radius,var(--rik-radius-pill));background:var(--deck-badge-bg,var(--rik-surface-tint));color:var(--deck-badge-fg,var(--rik-text-default--faint));border:1px solid var(--deck-badge-border,var(--rik-border-default))}:host([type="bad"]){--deck-badge-bg:var(--rik-status-danger__bg);--deck-badge-fg:var(--rik-status-danger);--deck-badge-border:var(--rik-status-danger__border)}:host([type="ok"]){--deck-badge-bg:var(--rik-status-success__bg);--deck-badge-fg:var(--rik-status-success);--deck-badge-border:var(--rik-status-success__border)}:host([type="info"]){--deck-badge-bg:var(--rik-status-info__bg--strong);--deck-badge-fg:var(--rik-status-info__text);--deck-badge-border:var(--rik-status-info__border)}:host([type="warn"]){--deck-badge-bg:var(--rik-status-warn__bg);--deck-badge-fg:var(--rik-status-warn);--deck-badge-border:var(--rik-status-warn__border)}`,c([d({type:String})],Pe.prototype,"type",2),Pe=c([k("deck-badge")],Pe);var Bt=class extends g{static{this.styles=v`:host{display:block;font:700 var(--deck-kicker-font-size,var(--rik-font-size-xs))/1.2 var(--rik-font-sans);letter-spacing:var(--deck-kicker-tracking,0.14em);text-transform:uppercase;color:var(--deck-kicker-color,var(--rik-text-default--faint));margin-bottom:var(--deck-kicker-margin,var(--rik-space-2))}:host([on-dark]){color:var(--deck-kicker-on-dark-color,var(--rik-text-inverse--faint))}`}render(){return m`<slot></slot>`}};customElements.define("deck-kicker",Bt);var Xr={warn:"var(--rik-status-warn)",danger:"var(--rik-status-danger)",ok:"var(--rik-status-success)",info:"var(--rik-accent)",muted:"var(--rik-text-default--faint)",accent:"var(--rik-accent)"},Zr={lead:"var(--rik-font-size-lead)",big:"var(--rik-font-size-big)",mega:"var(--rik-font-size-mega)",stat:"var(--rik-font-size-stat)",display:"clamp(2.6rem, 6cqw, 5rem)"},ee=class extends g{updated(){this.tone&&Xr[this.tone]?this.style.setProperty("--_color",Xr[this.tone]):this.style.removeProperty("--_color"),this.size&&Zr[this.size]?this.style.setProperty("--_size",Zr[this.size]):this.style.removeProperty("--_size")}render(){return m`<slot></slot>`}};ee.styles=v`:host{display:block;margin:0;font-family:var(--rik-font-display,var(--rik-font-sans));font-weight:900;line-height:1.1;letter-spacing:-0.02em;font-size:var(--deck-punch-size,var(--_size,var(--rik-font-size-lead)));color:var(--deck-punch-color,var(--_color,inherit))}:host([weight="700"]){font-weight:700}:host([weight="800"]){font-weight:800}:host([align="center"]){text-align:center}:host([align="right"]){text-align:right}`,c([d({type:String})],ee.prototype,"tone",2),c([d({type:String})],ee.prototype,"size",2),c([d({type:String,reflect:!0})],ee.prototype,"weight",2),c([d({type:String,reflect:!0})],ee.prototype,"align",2),ee=c([k("deck-punch")],ee);function Hn(s,t){let e=s.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),r=[],i=(a,l)=>{let u=`P${r.length}E`;return r.push(`<span class="${a}">${l}</span>`),u};return t==="html"||t==="xml"||t==="svg"?(e=e.replace(/(&lt;!--[\s\S]*?--&gt;)/g,a=>i("cmt",a)),e=e.replace(/(&lt;!doctype[^&]*&gt;)/gi,a=>i("cmt",a)),e=e.replace(/("[^"]*"|'[^']*')/g,a=>i("str",a)),e=e.replace(/(&lt;\/?)([a-zA-Z][a-zA-Z0-9:-]*)/g,(a,l,u)=>l+i("kw",u)),e=e.replace(/\b([a-zA-Z][a-zA-Z0-9-]*)(?==)/g,a=>i("prop",a))):t==="css"||t==="scss"||t==="less"?(e=e.replace(/(\/\*[\s\S]*?\*\/)/g,a=>i("cmt",a)),e=e.replace(/("[^"]*"|'[^']*')/g,a=>i("str",a)),e=e.replace(/([a-zA-Z-]+)(?=\s*:)/g,a=>i("prop",a)),e=e.replace(/(#[0-9a-fA-F]{3,8})\b/g,a=>i("num",a)),e=e.replace(/\b(\d+(?:\.\d+)?)(px|rem|em|%|vh|vw|vmin|vmax|s|ms|deg)?/g,(a,l,u)=>i("num",l+(u??"")))):(e=e.replace(/(\/\/[^\n]*)/g,a=>i("cmt",a)),e=e.replace(/(['"`])((?:\\.|(?!\1)[^\\])*)\1/g,a=>i("str",a)),e=e.replace(/\b(const|let|var|function|return|if|else|for|while|class|extends|new|export|import|from|as|await|async|of|in|typeof|instanceof|true|false|null|undefined)\b/g,a=>i("kw",a)),e=e.replace(/\b(\d+(?:\.\d+)?)\b/g,a=>i("num",a))),e=e.replace(/P(\d+)E/g,(a,l)=>r[+l]??""),e}var O=class extends g{constructor(){super(...arguments);this.lang="";this.hero=!1;this.nested=!1;this._html="";this._groups=null}static rehighlightAll(){document.querySelectorAll("deck-code").forEach(e=>{e.rehighlight()})}connectedCallback(){super.connectedCallback(),this._highlight();try{this._groups=JSON.parse(this.getAttribute("step-groups")??"null")}catch{this._groups=null}}rehighlight(){this._highlight(),this.requestUpdate()}_highlight(){let e=O.highlighter?.(this.textContent??"",this.lang||"txt");if(e!=null){this._html=e;return}let i=(this.textContent??"").split(`
682
+ `);for(;i.length&&!i[0].trim();)i.shift();for(;i.length&&!i[i.length-1].trim();)i.pop();let n=i.filter(a=>a.trim().length>0).reduce((a,l)=>Math.min(a,l.match(/^ */)?.[0].length??0),1/0),o=n===1/0?i:i.map(a=>a.slice(n));this._html=o.map((a,l)=>'<span class="line" data-line="'+(l+1)+'">'+Hn(a||" ",this.lang)+"</span>").join("")}applyStep(e){if(!this._groups)return;let r=this.shadowRoot?.querySelectorAll(".line");if(r)if(e===0)r.forEach(i=>{i.classList.remove("dim","lit")});else{let i=this._groups[Math.min(e-1,this._groups.length-1)]??[];r.forEach(n=>{let o=parseInt(n.dataset.line??"0",10);n.classList.toggle("lit",i.includes(o)),n.classList.toggle("dim",!i.includes(o))})}}render(){return m`<pre><code .innerHTML="${this._html}"></code></pre>`}};O.highlighter=null,O.styles=v`:host{display:block;background:var(--deck-code-bg,var(--rik-code__bg));border:1px solid var(--deck-code-border,var(--rik-code__border));border-radius:var(--deck-code-radius,var(--rik-radius-md));padding:var(--deck-code-padding-y,var(--rik-space-3)) var(--deck-code-padding-x,var(--rik-space-4));font-family:var(--rik-font-mono);font-size:var(--rik-font-size-mono);line-height:1.7;color:var(--deck-code-text,var(--rik-code__text));box-shadow:var(--rik-elevation-2);overflow:auto;white-space:pre}:host([hero]){display:flex;align-items:safe center;padding:var(--deck-code-padding-y,var(--rik-space-4)) var(--deck-code-padding-x,var(--rik-space-5))}:host([nested]){box-shadow:none;border-radius:var(--rik-radius-sm);padding:var(--deck-code-padding-y,var(--rik-space-2)) var(--deck-code-padding-x,var(--rik-space-3))}pre{margin:0;font:inherit;color:inherit}code{display:block;width:100%;font:inherit;color:inherit}.line{transition:opacity 0.25s ease;display:block}.line.dim{opacity:0.25}.line.lit{opacity:1}.kw{color:var(--deck-code-syntax-kw,var(--rik-code__syntax-keyword))}.fn{color:var(--deck-code-syntax-fn,var(--rik-code__syntax-function))}.str{color:var(--deck-code-syntax-str,var(--rik-code__syntax-string))}.num{color:var(--deck-code-syntax-num,var(--rik-code__syntax-number))}.cmt{color:var(--deck-code-syntax-cmt,var(--rik-code__syntax-comment));font-style:italic}.ty{color:var(--deck-code-syntax-ty,var(--rik-code__syntax-type))}.prop{color:var(--deck-code-syntax-prop,var(--rik-code__syntax-property))}`,c([d({type:String})],O.prototype,"lang",2),c([d({type:Boolean,reflect:!0})],O.prototype,"hero",2),c([d({type:Boolean,reflect:!0})],O.prototype,"nested",2),c([d({type:String,attribute:"step-groups"})],O.prototype,"stepGroups",2),c([j()],O.prototype,"_html",2),O=c([k("deck-code")],O);function In(s){let t=customElements.get("deck-code");if(!t){console.warn("[rikiki/deck-code] <deck-code> is not defined yet \xB7 import rikiki first");return}t.highlighter=s,t.rehighlightAll()}new URLSearchParams(location.search).has("live")&&Promise.resolve().then(()=>(Qr(),qn));export{In as setDeckCodeHighlighter};