@bendyline/squisq-cli 2.8.1 → 2.8.2
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.
|
@@ -3587,7 +3587,7 @@ ${n}${i}`)}return r.theme}var a5="squisq-custom-themes";var lL={id:"light",backg
|
|
|
3587
3587
|
`),n=_wt(r),i={contentLines:0,connectorLines:0,looseLines:0,indentLevels:0},a=new Set,o=[];for(let h of r){if(h.trim().length===0)continue;i.contentLines++;let f=Awt(h);if(!f||f.label.length===0){i.looseLines++;continue}f.hadConnector&&i.connectorLines++,a.add(f.indent),o.push(f);}i.indentLevels=a.size;let s=[],l=[];for(let h of o){let f={id:"",label:h.label,children:[],...h.comment?{comment:h.comment}:{}};for(;l.length>0&&l[l.length-1].indent>=h.indent;)l.pop();l.length===0?s.push(f):l[l.length-1].node.children.push(f),l.push({indent:h.indent,node:f});}let u=new Map,d=h=>{h.isDir=h.label.endsWith("/")||h.children.length>0;let f=Lwt(Rwt(h.label)),p=u.get(f)??0;u.set(f,p+1),h.id=p===0?f:`${f}-${p+1}`;for(let m of h.children)d(m);};for(let h of s)d(h);return o.length>0&&i.looseLines>0&&e.push(`loose-lines(${i.looseLines})`),{tree:{roots:s,style:n,warnings:e},stats:i}}function Awt(t){let e=Array.from(t),r=0,n=false;for(;;){for(;r<e.length&&(e[r]===" "||e[r]===" ");)r++;let u=e[r];if(u===void 0)return null;if(yye(u)&&!a8(e[r+1]??"")){r++;continue}break}let i=e[r];if(i!==void 0)if(kwt(i)||Twt(i)){for(r++;r<e.length&&(a8(e[r])||yye(e[r]));)r++;n=true;}else if((i==="|"||i==="`"||i==="+")&&a8(e[r+1]??"")){for(r++;r<e.length&&a8(e[r]);)r++;n=true;}else (i==="-"||i==="*"||i==="+")&&(e[r+1]??"")===" "&&(r++,n=false);for(;r<e.length&&(e[r]===" "||e[r]===" ");)r++;let a=r,o=e.slice(r).join("").replace(/\s+$/u,"");if(o.length===0)return null;let s,l=/\s{2,}(?:#|<--|\/\/)\s?(.*)$/.exec(o);return l&&(s=l[1].trim()||void 0,o=o.slice(0,l.index).replace(/\s+$/u,"")),o.length===0?null:{indent:a,label:o,hadConnector:n,...s?{comment:s}:{}}}function _wt(t){let e=0,r=0;for(let n of t)for(let i of n)Cwt(i)?e++:Swt(i)&&r++;return r>e?"ascii":"unicode"}function Rwt(t){return t.endsWith("/")?t.slice(0,-1):t}function Lwt(t){return t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"node"}var zye=new Set(["text","txt","plaintext","plain","ascii","tree"]),Iwt=400,Mwt=2,Dwt=2,Nwt=2,Owt=/[┌┐┘┏┓┛╔╗╝╭╮╯]/u;function o4(t){if(t==null)return true;let e=t.trim().toLowerCase();return e===""||zye.has(e)}function s4(t){return typeof t=="string"&&t.trim().toLowerCase()==="tree"}function l4(t,e={}){let r=e.explicit===true,n=t.replace(/\r\n?/g,`
|
|
3588
3588
|
`).split(`
|
|
3589
3589
|
`),i=n.filter(p=>p.trim().length>0),a=r?1:Mwt;if(i.length<a)return {isTree:false,reasons:[`too-few-lines(${i.length})`]};if(n.length>Iwt)return {isTree:false,reasons:[`too-many-lines(${n.length})`]};let o=i.filter(p=>/^\s*\|.*\|\s*$/.test(p)).length,s=i.some(p=>/^\s*\|?[\s:|-]+\|?\s*$/.test(p)&&p.includes("-"));if(o>i.length/2&&s)return {isTree:false,reasons:["markdown-table"]};if(Owt.test(t))return {isTree:false,reasons:["has-box-corners"]};if(!r&&yx(t).isTimeline)return {isTree:false,reasons:["is-timeline"]};let l=l8(t).stats.boxNodes;if(l>=2)return {isTree:false,reasons:[`has-boxes(${l})`]};let{tree:u,stats:d}=Ewt(t),h=Hye(u.roots);if(h<(r?1:Nwt))return {isTree:false,reasons:[`too-few-nodes(${h})`]};if(!r){if(d.connectorLines<Dwt)return {isTree:false,reasons:[`too-few-connectors(${d.connectorLines})`]};if(d.looseLines>d.contentLines*.25)return {isTree:false,reasons:[`loose-ratio(${d.looseLines}/${d.contentLines})`]}}return {isTree:true,tree:u,reasons:[`nodes(${h})`,r?"explicit":`connectors(${d.connectorLines})`]}}function Hye(t){let e=0;for(let r of t)e+=1+Hye(r.children);return e}var Pwt=/(?:[$€£¥]\s?\d+(?:[.,]\d+)*(?:\s?(?:[MBK]|million|billion|thousand))?|\d+(?:[.,]\d+)*\s?(?:%|‰|x|×|[MBK]|million|billion|thousand|percent|years?|days?|hours?)|\d{3,}(?:[.,]\d+)*)/i;function d8(t){let e=Pwt.exec(t);return !e||e.index===void 0?null:{value:e[0],index:e.index,end:e.index+e[0].length}}var Bwt=Object.freeze({hasImage:false,imageCount:0,hasVideo:false,hasBlockquote:false,hasList:false,hasTable:false,hasDate:false,hasNumberHighlight:false,wordCount:0}),Fwt=[/\b(January|February|March|April|May|June|July|August|September|October|November|December)\s+(\d{1,2},?\s+)?\d{4}\b/i,/\b\d{1,2}\s+(January|February|March|April|May|June|July|August|September|October|November|December)\s+\d{4}\b/i,/\b(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Sept|Oct|Nov|Dec)\.?\s+\d{1,2},?\s+\d{4}\b/i,/\b\d{4}-\d{2}-\d{2}\b/,/\b\d{1,2}\/\d{1,2}\/\d{2,4}\b/,/\bQ[1-4]\s+\d{4}\b/,/\b\d{4}s\b/,/\b\d{1,2}(st|nd|rd|th)\s+century\b/i],bye=/(youtube\.com|youtu\.be|vimeo\.com|wistia\.|loom\.com)/i;function vye(t,e){let r=td(t,"htmlBlock"),n=td(t,"htmlInline"),i=[],a=o=>{if(o.type==="htmlElement"){e.has(o.tagName.toLowerCase())&&i.push(o);for(let s of o.children)a(s);}};for(let o of r)for(let s of o.htmlChildren)a(s);for(let o of n)if(Array.isArray(o.htmlChildren))for(let s of o.htmlChildren)a(s);return i}function Uye(t){if(!t||t.length===0)return {...Bwt};let e=0,r=false,n=false,i=false,a=[];for(let v of t)e+=td(v,"image").length,e+=td(v,"imageReference").length,td(v,"blockquote").length>0&&(r=true),td(v,"list").length>0&&(n=true),td(v,"table").length>0&&(i=true),a.push(vn(v));let o={type:"document",children:t},s=vye(o,new Set(["img"]));e+=s.length;let l=vye(o,new Set(["video","iframe","source"])),u=false;for(let v of l){if(v.tagName.toLowerCase()==="video"){u=true;break}let x=v.attributes.src||v.attributes.href||"";if(bye.test(x)){u=true;break}}if(!u){let v=td(o,"link");for(let x of v)if(x.url&&bye.test(x.url)){u=true;break}}let d=a.join(" ").trim(),h=d?d.split(/\s+/).length:0,f=false;for(let v of Fwt)if(v.test(d)){f=true;break}let p=false;Am(o,v=>{if(p)return true;if(v.type!=="paragraph")return;let x=vn(v).trim();return !x||!d8(x)||x.split(/\s+/).length<=8&&(p=true),true});let m=false,g=[];for(let v of t)g.push(...td(v,"code"));if(g.length===1&&px(g[0].lang)&&!i&&e===0&&!u){let v=Math.max(0,d.length-g[0].value.length),x=a4(g[0].lang);v<=400&&mx(g[0].value,{explicit:x}).isDiagram&&(m=true);}let y=false;if(!m&&g.length===1&&gx(g[0].lang)&&!i&&e===0&&!u){let v=Math.max(0,d.length-g[0].value.length),x=u8(g[0].lang);v<=400&&yx(g[0].value,{explicit:x}).isTimeline&&(y=true);}let b=false;if(!m&&!y&&g.length===1&&o4(g[0].lang)&&!i&&e===0&&!u){let v=Math.max(0,d.length-g[0].value.length),x=s4(g[0].lang);v<=400&&l4(g[0].value,{explicit:x}).isTree&&(b=true);}return {hasImage:e>0,imageCount:e,hasVideo:u,hasBlockquote:r,hasList:n,hasTable:i,hasDate:f,hasNumberHighlight:p,wordCount:h,hasAsciiDiagram:m,hasTimeline:y,hasTree:b}}function Gye(t,e=0){if(t.hasAsciiDiagram)return "diagram";if(t.hasTimeline)return "timeline";if(t.hasTree)return "tree";if(t.hasTable)return "dataTable";if(t.hasVideo)return "videoWithCaption";if(t.imageCount>=2)return "photoGrid";if(t.hasImage)return e%2===0?"leftFeature":"rightFeature";if(t.hasBlockquote)return "quote";if(t.hasNumberHighlight)return "statHighlight";if(t.hasList)return "list"}var $wt=200;function Wye(t,e){let n=$wt,i=t.split(/\s+/).filter(o=>o.length>0).length,a=i/n;return {words:i,minutes:a,seconds:Math.round(a*60)}}var Vye=class Yye{constructor(e){this.state=e>>>0,this.state===0&&(this.state=3735928559);}next(){let e=this.state=this.state+1831565813>>>0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}nextInt(e){return Math.floor(this.next()*e)}nextIntRange(e,r){return e+Math.floor(this.next()*(r-e))}nextBool(e=.5){return this.next()<e}pick(e){if(e.length!==0)return e[this.nextInt(e.length)]}pickRequired(e){if(e.length===0)throw new Error("Cannot pick from empty array");return e[this.nextInt(e.length)]}pickMultiple(e,r){if(r>=e.length)return this.shuffle([...e]);let n=[],i=[...e];for(let a=0;a<r&&i.length>0;a++){let o=this.nextInt(i.length);n.push(i[o]),i.splice(o,1);}return n}shuffle(e){for(let r=e.length-1;r>0;r--){let n=this.nextInt(r+1);[e[r],e[n]]=[e[n],e[r]];}return e}shuffled(e){return this.shuffle([...e])}pickWeighted(e){if(e.length===0)return;let r=e.reduce((i,{weight:a})=>i+a,0);if(r<=0)return e[0]?.item;let n=this.next()*r;for(let{item:i,weight:a}of e)if(n-=a,n<=0)return i;return e[e.length-1]?.item}getState(){return this.state>>>0}derive(e){let r=typeof e=="string"?OG(e):e>>>0;return new Yye(this.state^r)}};function OG(t){let e=5381;for(let r=0;r<t.length;r++)e=(e<<5)+e^t.charCodeAt(r);return e>>>0}var qwt={"dark-vignette":"radial-gradient(ellipse at center, rgba(26,32,44,0.8) 0%, rgba(0,0,0,0.95) 100%)","radial-dark":"radial-gradient(ellipse at center, #1a202c 0%, #000000 100%)","warm-sunset":"linear-gradient(135deg, rgba(124,58,48,0.9) 0%, rgba(46,20,16,0.95) 100%)","cool-blue":"linear-gradient(135deg, rgba(26,54,93,0.9) 0%, rgba(26,32,44,0.95) 100%)","earth-tones":"linear-gradient(135deg, rgba(68,51,34,0.9) 0%, rgba(30,22,15,0.95) 100%)"};function zwt(t){return {type:"shape",id:"persistent-bg-solid",content:{shape:"rect",fill:t.color},position:{x:0,y:0,width:"100%",height:"100%"}}}function Hwt(t){return {type:"shape",id:"persistent-bg-gradient",content:{shape:"rect",fill:t.gradient??qwt[t.preset??"dark-vignette"]},position:{x:0,y:0,width:"100%",height:"100%"}}}function Uwt(t){let e=[],r=t.opacity??.4,n={type:"image",id:"persistent-bg-image",content:{src:t.src,alt:"Background",fit:"cover",...t.blur!=null&&t.blur>0?{blur:t.blur}:{}},position:{x:0,y:0,width:"100%",height:"100%"},animation:t.ambientMotion?{type:t.ambientMotion,duration:30}:void 0};return e.push(n),e.push({type:"shape",id:"persistent-bg-overlay",content:{shape:"rect",fill:`rgba(0,0,0,${.5+(1-r)*.3})`},position:{x:0,y:0,width:"100%",height:"100%"}}),e}function Gwt(t){if(t.pattern==="noise")return {type:"shape",id:"persistent-grain",content:{shape:"rect",fill:"#000000",filter:{type:"noise",opacity:t.opacity??.05}},position:{x:0,y:0,width:"100%",height:"100%"}};let e=t.opacity??.06;return {type:"shape",id:"persistent-bg-pattern",content:{shape:"rect",pattern:{kind:t.pattern,color:t.color??"#ffffff",size:Math.round(24*(t.scale??1)),opacity:e}},position:{x:0,y:0,width:"100%",height:"100%"}}}function Wwt(t){let e=Math.max(0,Math.min(1,t.strength??.3)),r=t.color??"#000000",n=rr(r,e);return {type:"shape",id:"persistent-vignette",content:{shape:"rect",fill:`radial-gradient(ellipse at center, ${rr(r,0)} 55%, ${n} 100%)`},position:{x:0,y:0,width:"100%",height:"100%"}}}function Vwt(t,e){let r=t.from??e?.colors.backgroundLight??"#1a202c",n=t.to??(e?Df(e.colors.background,.04):"#0f141d");return {type:"shape",id:"persistent-ambient-gradient",content:{shape:"rect",fill:`linear-gradient(150deg, ${r} 0%, ${n} 100%)`},position:{x:"-5%",y:"-5%",width:"110%",height:"110%"},animation:{type:"slowZoom",panDirection:"left",duration:t.duration??40}}}function Ywt(t){let e=[],r=t.fontSize??18,n=!!t.subtitle,i=t.position.includes("bottom"),a=t.position.includes("left"),o=3,s=1.5,l=n?"15%":"7%",u=i?n?"78%":"84%":"2%",d=t.showThumbnail?30:28,h=a?o:100-o-d,f=`${h}%`,p=n?6:5,m=`${p}%`,g=n?"10%":"5%",y=h+s,b=d-s*2,v=t.showThumbnail&&a?`${y+p+s}%`:`${y}%`,x=t.showThumbnail?`${b-p-s}%`:`${b}%`,C=i?n?"80%":"86%":"4%";if(e.push({type:"shape",id:"persistent-caption-bg",content:{shape:"rect",fill:"rgba(0,0,0,0.6)",borderRadius:8},position:{x:f,y:u,width:`${d}%`,height:l}}),t.showThumbnail&&t.thumbnailSrc){let T=a?`${y}%`:`${h+d-s-p}%`,k=i?n?`${78+s}%`:"85%":"3%";e.push({type:"image",id:"persistent-caption-thumb",content:{src:t.thumbnailSrc,alt:"Article thumbnail",fit:"cover"},position:{x:T,y:k,width:m,height:g}});}if(e.push({type:"text",id:"persistent-caption-title",content:{text:t.title,style:{fontSize:r,fontWeight:"bold",color:"rgba(255,255,255,0.9)",textAlign:a?"left":"right",maxLines:1}},position:{x:v,y:C,width:x}}),n){let T=i?"85.5%":"8%";e.push({type:"text",id:"persistent-caption-subtitle",content:{text:t.subtitle,style:{fontSize:18,fontWeight:"normal",color:"rgba(255,255,255,0.55)",textAlign:a?"left":"right"}},position:{x:v,y:T,width:x}});}return e}function jwt(t){let e=t.position.includes("bottom"),n=t.position.includes("left")?"3%":"90%",i=e?"94%":"3%";return t.isImage?{type:"image",id:"persistent-branding",content:{src:t.content,alt:"Branding",fit:"contain"},position:{x:n,y:i,width:"8%",height:"4%"}}:{type:"text",id:"persistent-branding",content:{text:t.content,style:{fontSize:14,fontWeight:"normal",color:"rgba(255,255,255,0.6)"}},position:{x:n,y:i}}}function Xwt(t){let e=t.color??"rgba(255,255,255,0.3)",r=t.position==="top"?"1%":"98%";return {type:"shape",id:"persistent-progress",content:{shape:"rect",fill:e,borderRadius:2},position:{x:"5%",y:r,width:"90%",height:"0.5%"}}}function Kwt(t,e){if(!Dq(t))return [Is(t)];let n=t.config;switch(n.type){case "solidBackground":return [zwt(n)];case "gradientBackground":return [Hwt(n)];case "imageBackground":return Uwt(n);case "patternBackground":return [Gwt(n)];case "vignette":return [Wwt(n)];case "ambientGradient":return [Vwt(n,e)];case "titleCaption":return Ywt(n);case "cornerBranding":return [jwt(n)];case "progressIndicator":return [Xwt(n)];default:return console.warn("Unknown persistent layer template:",n.type),[]}}function Wm(t,e){return !t||t.length===0?[]:t.reduce((r,n)=>r.concat(Kwt(n,e)),[])}function f4(t,e){let r=t.persistentLayers;if(!!r&&((r.bottomLayers?.length??0)>0||(r.topLayers?.length??0)>0))return r;let i=e.persistentLayers;return !!i&&((i.bottomLayers?.length??0)>0||(i.topLayers?.length??0)>0)?i:r}function A1e(t,e,r,n){if(r.length===0&&n.length===0)return t;let i=e.useBottomLayer!==false,a=e.useTopLayer!==false;return [...i?r.map(o=>Is(o)):[],...t,...a?n.map(o=>Is(o)):[]]}var Qwt={bg:"#1a365d",text:"#63b3ed",accent:"#90cdf4"};function os(t,e){let r=t.theme.colorSchemes;if(e&&e in r)return r[e];let n=Object.keys(r);return n.length>0?r[n[0]]:Qwt}var Zwt='system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',Jwt='Georgia, "Times New Roman", serif',ekt='Consolas, "Courier New", monospace';function Yt(t,e){let{typography:r}=t.theme;switch(e){case "title":return yo(r.titleFont,Jwt);case "body":return yo(r.bodyFont,Zwt);case "mono":return yo(r.monoFont,ekt)}}function Qt(t,e,r=false){let{fontScale:n,layout:i,theme:a}=e,o=r?i.titleScale:i.bodyScale,s=r?a.typography.titleScale??1:a.typography.bodyScale??1;return Math.round(t*n*o*s)}function _1e(t,e){let r=t.theme.renderStyle;return e==="text"?r.defaultTextAnimation:r.defaultImageAnimation}function qo(t,e,r){let n=_1e(t,e);return !n||n==="slowZoom"||n===r.type?r:{...r,type:n}}function $n(t){return t.theme.style.textShadow??true}function R1e(t){return t.theme.style.overlayOpacity??.5}function Ul(t,e){if(e==="none")return;let r=t.theme.style.imageTreatment,n=e?{type:e,strength:r?.strength}:r;if(!(!n||n.type==="none"))return n.type==="duotone"&&!n.color?{...n,color:t.theme.colors.primary}:n}function Mc(t,e=160){let{background:r,backgroundLight:n}=t.theme.colors;return `linear-gradient(${e}deg, ${n} 0%, ${Df(r,.04)} 100%)`}function L1e(t,e){let r=Math.max(.55,R1e(t));return rr(t.theme.colors.background,r)}function p4(t,e,r,n){let i=t.theme.renderStyle.templateHints;if(!i)return n;let a=i[e];return !a||!(r in a)?n:a[r]}var tkt=/[.;:!?]+$/;function ZG(t){return t.replace(tkt,"").trim()}function ph(t,e){return {type:"shape",id:t,content:{shape:"rect",fill:e},position:{x:0,y:0,width:"100%",height:"100%"}}}function Ic(t,e,r,n){let i=e*.52,a=Math.max(8,Math.floor(r/i));return Math.max(1,Math.ceil(t.length/a))*e*n}function T8(t,e){let{title:r,subtitle:n,backgroundColor:i}=t,{theme:a,layout:o,viewport:s}=e,l=Qt(96,e,true),u=Qt(36,e,false),d=i||a.colors.primary,h=parseFloat(o.maxTextWidth)/100*s.width,f=Ic(r,l,h,1.15),m=56+(Math.max(1,Math.round(f/(l*1.15)))>1?l*.25:0),g=n?42:48,y=v=>v/s.height*100,b=[{type:"shape",id:"bg",content:{shape:"rect",fill:a.colors.background},position:{x:0,y:0,width:"100%",height:"100%"}},{type:"shape",id:"bg-tint",content:{shape:"rect",fill:`radial-gradient(ellipse at 50% 40%, ${rr(d,.32)} 0%, ${rr(d,0)} 75%)`},position:{x:0,y:0,width:"100%",height:"100%"}}];if(p4(e,"title","showAccentLine",true)&&b.push({type:"shape",id:"accent-line",content:{shape:"rect",fill:rr(a.colors.text,.3)},position:{x:"44%",y:`${g-y(f/2+56)}%`,width:"12%",height:"3px"}}),b.push({type:"text",id:"title",content:{text:r,style:{fontSize:l,fontFamily:Yt(e,"title"),fontWeight:"bold",color:a.colors.text,textAlign:"center",shadow:$n(e)}},position:{x:"50%",y:`${g}%`,anchor:"center",width:o.maxTextWidth},animation:qo(e,"text",{type:"fadeIn",duration:2})}),n){let v=Ic(n,u,h,1.5);b.push({type:"text",id:"subtitle",content:{text:n,style:{fontSize:u,fontFamily:Yt(e,"body"),color:a.colors.textMuted,textAlign:"center",lineHeight:1.5}},position:{x:"50%",y:`${g+y(f/2+m+v/2)}%`,anchor:"center",width:o.maxTextWidth},animation:{type:"fadeIn",duration:1.5,delay:1}});}return b}var rkt=/^(\d+(?:\.\d+)?)\s*%?$/,Vm={textCenterX:"50%",textWidth:"85%",textYAdjust:0,adjustY:false};function jf(t,e){if(!t)return;let r=e!==void 0?{duration:e}:{};switch(t){case "zoomIn":case "in":return {type:"slowZoom",direction:"in",...r};case "zoomOut":case "out":return {type:"slowZoom",direction:"out",...r};case "panLeft":case "left":return {type:"slowZoom",panDirection:"left",...r};case "panRight":case "right":return {type:"slowZoom",panDirection:"right",...r};default:return}}var fh=35,I1e=`${fh}%`;function Iy(t){switch(t){case "left-strip":return {textCenterX:`${50+fh/2}%`,textWidth:`${100-fh-8}%`,textYAdjust:0,adjustY:false};case "right-strip":return {textCenterX:`${50-fh/2}%`,textWidth:`${100-fh-8}%`,textYAdjust:0,adjustY:false};case "bottom-strip":return {textCenterX:"50%",textWidth:"85%",textYAdjust:-10,adjustY:true};case "corner-inset":return {textCenterX:"45%",textWidth:"70%",textYAdjust:0,adjustY:false};default:return Vm}}function My(t,e,r){let n=[],{src:i,alt:a,position:o,ambientMotion:s,credit:l,license:u}=t;switch(o){case "left-strip":n.push(jye(i,a,"left",e,s,l,u,r)),n.push(Xye("left",e));break;case "right-strip":n.push(jye(i,a,"right",e,s,l,u,r)),n.push(Xye("right",e));break;case "bottom-strip":n.push(nkt(i,a,e,s,l,u,r)),n.push(ikt(e));break;case "corner-inset":n.push(akt(i,a,e,s,l,u,r)),n.push(okt(e));break}return n}function jye(t,e,r,n,i,a,o,s){return {type:"image",id:`${n}-accent-img`,content:{src:t,alt:e,fit:"cover",credit:a,license:o,...s?{treatment:s}:{}},position:{x:r==="left"?0:`${100-fh}%`,y:0,width:I1e,height:"100%"},animation:jf(i,15)}}function Xye(t,e){let r=t==="left"?"accent-gradient-left":"accent-gradient-right";return {type:"shape",id:`${e}-accent-fade`,content:{shape:"rect",fill:`url(#${r})`},position:{x:t==="left"?`${fh-8}%`:`${100-fh}%`,y:0,width:"10%",height:"100%"}}}function nkt(t,e,r,n,i,a,o){return {type:"image",id:`${r}-accent-img`,content:{src:t,alt:e,fit:"cover",credit:i,license:a,...o?{treatment:o}:{}},position:{x:0,y:`${100-fh}%`,width:"100%",height:I1e},animation:jf(n,15)}}function ikt(t){return {type:"shape",id:`${t}-accent-fade`,content:{shape:"rect",fill:"url(#accent-gradient-bottom)"},position:{x:0,y:`${100-fh-8}%`,width:"100%",height:"12%"}}}function akt(t,e,r,n,i,a,o){return {type:"image",id:`${r}-accent-img`,content:{src:t,alt:e,fit:"cover",credit:i,license:a,...o?{treatment:o}:{}},position:{x:"70%",y:"60%",width:"28%",height:"38%",anchor:"top-left"},animation:jf(n,15)??{type:"fadeIn",duration:2,delay:.5}}}function okt(t){return {type:"shape",id:`${t}-accent-vignette`,content:{shape:"rect",fill:"url(#accent-vignette-corner)",borderRadius:8},position:{x:"69%",y:"59%",width:"30%",height:"40%"}}}function za(t,e){if(!e.adjustY||e.textYAdjust===0)return typeof t=="number"?`${t}%`:t;let r=typeof t=="number"?`${t}`:t,n=r.match(rkt);if(n){let i=parseFloat(n[1]);return `${Math.max(5,i+e.textYAdjust)}%`}return r}function JG(t,e){let{title:r="",colorScheme:n="blue",imageSrc:i,imageAlt:a,ambientMotion:o}=t,{theme:s,layout:l}=e,u=Ul(e,t.imageTreatment),d=os(e,n),h=Qt(84,e,true),f=[];return i?(f.push({type:"image",id:"bg-image",content:{src:i,alt:a||r,fit:"cover",...u?{treatment:u}:{}},position:{x:0,y:0,width:"100%",height:"100%"},animation:jf(o,8)??{type:"slowZoom",duration:8,direction:"in"}}),f.push({type:"shape",id:"overlay",content:{shape:"rect",fill:L1e(e)},position:{x:0,y:0,width:"100%",height:"100%"}})):(f.push({type:"shape",id:"bg",content:{shape:"rect",fill:d.bg},position:{x:0,y:0,width:"100%",height:"100%"}}),f.push({type:"shape",id:"line-top",content:{shape:"rect",fill:rr(d.text,.2)},position:{x:"50%",y:"40%",width:"20%",height:"2px",anchor:"center"}}),f.push({type:"shape",id:"line-bottom",content:{shape:"rect",fill:rr(d.text,.2)},position:{x:"50%",y:"60%",width:"20%",height:"2px",anchor:"center"}})),f.push({type:"text",id:"title",content:{text:r,style:{fontSize:h,fontFamily:Yt(e,"title"),fontWeight:"bold",color:i?s.colors.text:d.text,textAlign:"center",shadow:$n(e)}},position:{x:"50%",y:"50%",anchor:"center",width:l.maxTextWidth},animation:qo(e,"text",{type:"fadeIn",duration:1.5})}),f}var w8=1.05,M1e=.92,D1e=.86,Kye=.62,PG=48;function skt(t,e){let r=1,n=0;for(let i of t){let a=n===0?i:n+1+i;a<=e?n=a:(r+=1,n=i);}return r}function N1e(t,e){let r=e.width*M1e,n=e.height*D1e,i=t.trim().split(/\s+/).filter(Boolean).map(h=>h.length);if(i.length===0)return Math.floor(n/w8);let a=Math.max(...i),o=r/(Kye*a),s=n/w8,l=h=>{let f=Math.max(1,Math.floor(r/(h*Kye)));return skt(i,f)*h*w8<=n},u=PG,d=Math.min(o,s);if(d<=u)return Math.max(PG,Math.floor(d));if(!l(u))return PG;for(let h=0;h<24;h+=1){let f=(u+d)/2;l(f)?u=f:d=f;}return Math.floor(u)}function lkt(t){return `radial-gradient(ellipse at 50% 50%, ${rr(t,.92)} 0%, ${rr(t,.78)} 38%, ${rr(t,.32)} 66%, ${rr(t,0)} 88%)`}function eW(t,e){let{title:r="",imageSrc:n,imageAlt:i,ambientMotion:a}=t,{theme:o,viewport:s}=e,l=Ul(e,t.imageTreatment),u=r.toUpperCase(),d=N1e(u,s),h=[];return n?h.push({type:"image",id:"bigtext-image",content:{src:n,alt:i||r,fit:"cover",...l?{treatment:l}:{}},position:{x:0,y:0,width:"100%",height:"100%"},animation:jf(a,8)??{type:"slowZoom",duration:8,direction:"in"}},{type:"shape",id:"bigtext-bloom",content:{shape:"rect",fill:lkt(o.colors.background)},position:{x:0,y:0,width:"100%",height:"100%"}}):h.push({type:"shape",id:"bigtext-bg",content:{shape:"rect",fill:o.colors.background},position:{x:0,y:0,width:"100%",height:"100%"}},{type:"shape",id:"bigtext-tint",content:{shape:"rect",fill:`radial-gradient(ellipse at 50% 50%, ${rr(o.colors.primary,.38)} 0%, ${rr(o.colors.primary,.14)} 48%, ${rr(o.colors.primary,0)} 78%)`},position:{x:0,y:0,width:"100%",height:"100%"}}),h.push({type:"text",id:"bigtext-title",content:{text:u,style:{fontSize:d,fontFamily:Yt(e,"title"),fontWeight:"bold",color:o.colors.text,textAlign:"center",lineHeight:w8,shadow:!!n,shrinkToFit:true}},position:{x:"50%",y:"50%",anchor:"center",width:`${M1e*100}%`,height:`${D1e*100}%`},animation:qo(e,"text",{type:"fadeIn",duration:1})}),h}var ckt={gapX:260,gapY:140,gridPad:80,gridOriginX:80,gridOriginY:80};function O1e(t,e={}){let r={...ckt,...e},n=[],i=[],a=[];for(let d=0;d<t.length;d++){let h=t[d],f=typeof h.x=="number",p=typeof h.y=="number";f&&p?i.push({child:h,pinned:true,x:h.x,y:h.y}):(i.push({child:h,pinned:false,x:0,y:0}),a.push(d));}if(a.length>0){let d=Math.max(1,Math.ceil(Math.sqrt(a.length))),h=r.gridOriginX,f=r.gridOriginY,p=i.filter(m=>m.pinned);if(p.length>0){let m=Math.min(...p.map(y=>y.x)),g=Math.max(...p.map(y=>y.y));h=m,f=g+r.gridPad+r.gapY;}a.forEach((m,g)=>{let y=g%d,b=Math.floor(g/d);i[m].x=h+y*r.gapX,i[m].y=f+b*r.gapY;});}let o=i.map(d=>({id:d.child.id,label:d.child.title??d.child.id,x:d.x,y:d.y,pinned:d.pinned,...d.child.classes&&d.child.classes.length>0?{classes:d.child.classes}:{}})),s=new Set(o.map(d=>d.id)),l=[],u=new Set;for(let d of t)if(d.connectsTo)for(let h of d.connectsTo){if(!s.has(h.target)){n.push(`Edge from "${d.id}" to "${h.target}" dropped: no such sibling node`);continue}let f=ukt(d.id,h);u.has(f)||(u.add(f),l.push({id:f,source:d.id,target:h.target,...h.type?{type:h.type}:{}}));}return {nodes:o,edges:l,warnings:n}}function ukt(t,e){return e.type?`${t}->${e.target}:${e.type}`:`${t}->${e.target}`}var _y=14,Ry=28;function P1e(t,e){return {x:t*_y,y:e*Ry}}function A8(t){let e=t.nodes.map(i=>({id:i.id,label:i.label,...P1e(i.col,i.row),w:i.wCols*_y,h:i.hRows*Ry,...i.containerId?{container:i.containerId}:{}})),r=dkt(e,t.edges),n=t.edges.map((i,a)=>({source:i.source,target:i.target,...i.label?{label:i.label}:{},...i.directed?{}:{directed:false},...r[a],routing:"orthogonal"}));return {nodes:e,edges:n}}function dkt(t,e){let r=new Map(t.map(i=>[i.id,i])),n=e.map(i=>{let a=r.get(i.source),o=r.get(i.target);if(!a||!o)return {sourceAnchor:{side:"right",offset:.5},targetAnchor:{side:"left",offset:.5}};let s=a.w??_y*12,l=a.h??Ry*3,u=o.w??_y*12,d=o.h??Ry*3,h=o.x+u/2-(a.x+s/2),f=o.y+d/2-(a.y+l/2),p=Math.abs(h)/Math.max(1,(s+u)/2);return Math.abs(f)/Math.max(1,(l+d)/2)>=p?f>=0?{sourceAnchor:{side:"bottom",offset:.5},targetAnchor:{side:"top",offset:.5}}:{sourceAnchor:{side:"top",offset:.5},targetAnchor:{side:"bottom",offset:.5}}:h>=0?{sourceAnchor:{side:"right",offset:.5},targetAnchor:{side:"left",offset:.5}}:{sourceAnchor:{side:"left",offset:.5},targetAnchor:{side:"right",offset:.5}}});return Qye(n,e,t,"source"),Qye(n,e,t,"target"),hkt(n,e,t),n}function hkt(t,e,r){let n=new Map(r.map(a=>[a.id,a])),i=new Map;e.forEach((a,o)=>{let s=i.get(a.source)??[];s.push(o),i.set(a.source,s);});for(let[a,o]of i){if(o.length<2)continue;let s=n.get(a),l=o.map(b=>n.get(e[b].target)).filter(b=>b!==void 0);if(!s||l.length!==o.length)continue;let u=s.w??_y*12,d=s.h??Ry*3,h=s.x+u,f=s.y+d,p=b=>b.x+(b.w??_y*12),m=b=>b.y+(b.h??Ry*3),g,y;if(l.every(b=>b.y>=f)?(g="bottom",y="top"):l.every(b=>m(b)<=s.y)?(g="top",y="bottom"):l.every(b=>b.x>=h)?(g="right",y="left"):l.every(b=>p(b)<=s.x)&&(g="left",y="right"),!(!g||!y))for(let b of o)t[b]={sourceAnchor:{side:g,offset:.5},targetAnchor:{side:y,offset:.5}};}}function Qye(t,e,r,n){let i=new Map(r.map(o=>[o.id,o])),a=new Map;for(let o=0;o<e.length;o++){let s=e[o],l=n==="source"?t[o].sourceAnchor:t[o].targetAnchor,d=`${n==="source"?s.source:s.target}:${l.side}`,h=a.get(d)??[];h.push(o),a.set(d,h);}for(let o of a.values()){if(o.length<2)continue;let s=n==="source"?t[o[0]].sourceAnchor.side:t[o[0]].targetAnchor.side;o.sort((l,u)=>{let d=i.get(n==="source"?e[l].target:e[l].source),h=i.get(n==="source"?e[u].target:e[u].source),f=s==="top"||s==="bottom"?d?.x??0:d?.y??0,p=s==="top"||s==="bottom"?h?.x??0:h?.y??0;return f-p||l-u}),o.forEach((l,u)=>{let d=n==="source"?t[l].sourceAnchor:t[l].targetAnchor;d.offset=(u+1)/(o.length+1);});}}function tW(t){let e=t.tracks.length>0?Math.min(...t.tracks.map(o=>o.startColumn)):0,r=t.tracks.length>0?Math.max(...t.tracks.map(o=>o.endColumn)):1,n=Math.max(1,r-e),i=t.tracks.map(o=>({id:o.id,...o.label?{label:o.label}:{},...o.endLabel?{endLabel:o.endLabel}:{},events:o.events.map(s=>({id:s.id,label:s.label,...s.description?{description:s.description}:{},position:fkt((s.column-e)/n),...s.side?{side:s.side}:{},...s.descriptionSide?{descriptionSide:s.descriptionSide}:{},...s.callout===false?{callout:false}:{},...s.marker?{marker:s.marker}:{}}))})),a=t.links.map(o=>({...o}));return {tracks:i,links:a}}function fkt(t){return Math.max(0,Math.min(1,t))}function C8(t){return {items:t.roots.map(B1e)}}function B1e(t){return {id:t.id,label:t.label,...t.isDir?{isDir:true}:{},...t.comment?{comment:t.comment}:{},children:t.children.map(B1e)}}function F1e(t){let e=new Map,r=a=>a.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"node",n=a=>{let o=r(a.replace(/\/$/,"")),s=e.get(o)??0;return e.set(o,s+1),s===0?o:`${o}-${s+1}`},i=a=>{let o=a.children.find(d=>d.type!=="list"),s=o?vn(o).trim():"",l=a.children.filter(d=>d.type==="list"),u=[];for(let d of l)for(let h of d.children)u.push(i(h));return {id:n(s),label:s,children:u,isDir:s.endsWith("/")||u.length>0}};return {roots:t.children.map(i),style:"unicode",warnings:[]}}function $1e(t){return t?.find(e=>e.type==="list")}var pkt=/\.(?:webm|mp4|mov|m4v|ogv)(?:[?#].*)?$/i;function Ly(t){return !t||t.length===0?"":t.filter(e=>!(e.type==="code"&&e.lang?.trim().toLowerCase()==="mermaid")).map(e=>vn(e)).join(`
|
|
3590
|
-
`).trim()}function q1e(t){return m4(t).map(e=>e.text)}function ul(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function od(t){return t.map(e=>{switch(e.type){case "text":return ul(e.value);case "emphasis":return `<em>${od(e.children)}</em>`;case "strong":return `<strong>${od(e.children)}</strong>`;case "delete":return `<del>${od(e.children)}</del>`;case "superscript":return `<sup>${od(e.children)}</sup>`;case "subscript":return `<sub>${od(e.children)}</sub>`;case "inlineCode":return `<code>${ul(e.value)}</code>`;case "link":{let r=od(e.children),n=as(e.url,"link");if(!n)return r;let i=e.title?` title="${ul(e.title)}"`:"";return `<a href="${ul(n)}"${i}>${r}</a>`}case "break":return "<br>";case "image":return ul(e.alt??"");case "inlineMath":return ul(`$${e.value}$`);case "footnoteReference":return ul(`[^${e.label??e.identifier}]`);case "linkReference":case "textDirective":return od(e.children);case "imageReference":return ul(e.alt??"");case "mention":return ul(`@${e.displayName}`);case "inlineIcon":return `<i class="fa-${e.family} fa-${e.name}" aria-hidden="true"></i>`;case "htmlInline":return ul(e.rawHtml)}}).join("")}function z1e(t){let e=i=>i.map((a,o)=>{let s=i[o-1],l=s?Math.max(0,rW(s,a)-2):0;return `${'<div data-squisq-source-gap aria-hidden="true"><br></div>'.repeat(l)}${n(a)}`}).join(""),r=i=>{let a=i.ordered?"ol":"ul",o=i.ordered&&i.start!=null?` start="${i.start}"`:"",s=i.children.map(l=>`<li>${l.checked==null?"":`<span>${l.checked?"[x]":"[ ]"} </span>`}${e(l.children)}</li>`).join("");return `<${a}${o}>${s}</${a}>`},n=i=>{switch(i.type){case "paragraph":return `<p>${od(i.children)}</p>`;case "heading":return `<h${i.depth}>${od(i.children)}</h${i.depth}>`;case "blockquote":return `<blockquote>${e(i.children)}</blockquote>`;case "list":return r(i);case "code":return `<pre><code>${ul(i.value)}</code></pre>`;case "thematicBreak":return "<hr>";case "table":{let[a,...o]=i.children,s=(d,h)=>`<tr>${d.map(f=>{let
|
|
3590
|
+
`).trim()}function q1e(t){return m4(t).map(e=>e.text)}function ul(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function od(t){return t.map(e=>{switch(e.type){case "text":return ul(e.value);case "emphasis":return `<em>${od(e.children)}</em>`;case "strong":return `<strong>${od(e.children)}</strong>`;case "delete":return `<del>${od(e.children)}</del>`;case "superscript":return `<sup>${od(e.children)}</sup>`;case "subscript":return `<sub>${od(e.children)}</sub>`;case "inlineCode":return `<code>${ul(e.value)}</code>`;case "link":{let r=od(e.children),n=as(e.url,"link");if(!n)return r;let i=e.title?` title="${ul(e.title)}"`:"";return `<a href="${ul(n)}"${i}>${r}</a>`}case "break":return "<br>";case "image":return ul(e.alt??"");case "inlineMath":return ul(`$${e.value}$`);case "footnoteReference":return ul(`[^${e.label??e.identifier}]`);case "linkReference":case "textDirective":return od(e.children);case "imageReference":return ul(e.alt??"");case "mention":return ul(`@${e.displayName}`);case "inlineIcon":return `<i class="fa-${e.family} fa-${e.name}" aria-hidden="true"></i>`;case "htmlInline":return ul(e.rawHtml)}}).join("")}function z1e(t){let e=i=>i.map((a,o)=>{let s=i[o-1],l=s?Math.max(0,rW(s,a)-2):0;return `${'<div data-squisq-source-gap aria-hidden="true"><br></div>'.repeat(l)}${n(a)}`}).join(""),r=i=>{let a=i.ordered?"ol":"ul",o=i.ordered&&i.start!=null?` start="${i.start}"`:"",s=i.children.map(l=>`<li>${l.checked==null?"":`<span>${l.checked?"[x]":"[ ]"} </span>`}${e(l.children)}</li>`).join("");return `<${a}${o}>${s}</${a}>`},n=i=>{switch(i.type){case "paragraph":return `<p>${od(i.children)}</p>`;case "heading":return `<h${i.depth}>${od(i.children)}</h${i.depth}>`;case "blockquote":return `<blockquote>${e(i.children)}</blockquote>`;case "list":return r(i);case "code":return `<pre><code>${ul(i.value)}</code></pre>`;case "thematicBreak":return "<hr>";case "table":{let[a,...o]=i.children,s=(d,h)=>`<tr>${d.map((f,p)=>{let m=h?"th":"td",g=i.align?.[p],y=g?` align="${g}"`:"";return `<${m}${y}>${od(f.children)}</${m}>`}).join("")}</tr>`,l=a?`<thead>${s(a.children,true)}</thead>`:"",u=o.length?`<tbody>${o.map(d=>s(d.children,false)).join("")}</tbody>`:"";return `<table>${l}${u}</table>`}case "math":return `<pre><code>${ul(i.value)}</code></pre>`;case "definition":return "";default:{let a=vn(i).trim();return a?`<p>${ul(a)}</p>`:""}}};return e(t)}function rW(t,e){let r=t.position?.end.line,n=e.position?.start.line;return r==null||n==null||n<=r?2:Math.max(2,n-r)}function mkt(t){return t.map(e=>e.type==="paragraph"||e.type==="heading"?od(e.children):ul(vn(e))).join("<br>")}function m4(t){if(!t)return [];let e=[];for(let r of t)if(r.type==="list")for(let n of r.children){let i=vn(n).trim();if(!i)continue;let a=mkt(n.children),o=ul(i).replace(/\r?\n/g,"<br>");e.push({text:i,markdown:n.children,...a&&a!==o?{html:a}:{}});}return e}function Zye(t){if(t===void 0)return;let e=parseFloat(t);return Number.isFinite(e)&&e>0?e:void 0}function g4(t,e=1/0){if(!t||t.length===0)return [];let r=[];function n(a){for(let o of a){if(r.length>=e)return;if(!o||typeof o!="object")continue;let s=o;if(s.type==="htmlElement"&&s.tagName==="img"){let l=s.attributes;l&&typeof l.src=="string"&&l.src&&r.push({src:l.src,alt:typeof l.alt=="string"?l.alt:"",width:Zye(l.width),height:Zye(l.height)});}Array.isArray(s.children)&&n(s.children);}}function i(a){if(r.length>=e||!a||typeof a!="object")return;let o=a;if(o.type==="image"&&typeof o.url=="string"&&o.url){r.push({src:o.url,alt:typeof o.alt=="string"?o.alt:""});return}if((o.type==="htmlBlock"||o.type==="htmlInline")&&Array.isArray(o.htmlChildren)&&n(o.htmlChildren),Array.isArray(o.children))for(let s of o.children)i(s);}for(let a of t){if(r.length>=e)break;i(a);}return r}function k8(t){return g4(t,1)[0]??null}function y4(t,e=1/0){if(!t||t.length===0)return [];let r=[],n=new Set,i=s=>{!s.src||r.length>=e||n.has(s.src)||(n.add(s.src),r.push(s));};function a(s){if(Array.isArray(s))for(let l of s){if(!l||typeof l!="object")continue;let u=l;if(u.tagName==="source"){let h=u.attributes;if(typeof h?.src=="string"&&h.src)return h.src}let d=a(u.children);if(d)return d}}function o(s){if(r.length>=e||!s||typeof s!="object")return;let l=s;if(l.type==="htmlElement"&&l.tagName==="video"){let u=l.attributes,d=u?.src||a(l.children);if(d){let h=u?.["data-squisq-video-start-at"]?ry(u["data-squisq-video-start-at"]):null,f=u?.["data-squisq-video-clip-start"]?ry(u["data-squisq-video-clip-start"]):null,p=u?.["data-squisq-video-clip-end"]?ry(u["data-squisq-video-clip-end"]):null;i({src:d,...u?.poster?{posterSrc:u.poster}:{},alt:u?.["aria-label"]||u?.title||u?.alt||"",...h!=null?{startAt:h}:{},...f!=null?{clipStart:f}:{},...p!=null?{clipEnd:p}:{}});}}else (l.type==="link"||l.type==="image")&&typeof l.url=="string"&&pkt.test(l.url)&&i({src:l.url,alt:typeof l.alt=="string"?l.alt:vn(l).trim()});Array.isArray(l.children)&&l.children.forEach(o),Array.isArray(l.htmlChildren)&&l.htmlChildren.forEach(o);}return t.forEach(o),r}function H1e(t){return y4(t,1)[0]??null}function S8(t){if(!t)return null;for(let e of t)if(e.type==="table"){let r=e,[n,...i]=r.children;if(!n)return null;let a=n.children.map(s=>vn(s).trim()),o=i.map(s=>s.children.map(l=>vn(l).trim()));return {headers:a,rows:o,align:r.align}}return null}function HG(t){if(!t)return "";for(let e of t)if(e.type==="blockquote")return vn(e).trim();return ""}function gkt(t){if(!t)return null;let e=t.findIndex(r=>r.type==="paragraph");return e<0?null:{node:t[e],index:e}}function ykt(t){for(let e of t.children){if(e.type==="text"&&e.value.trim()==="")continue;return e.type!=="strong"?null:vn(e).trim().match(/^(?:[$€£¥]\s*)?[+-]?\d+(?:[.,]\d+)*(?:\s?(?:[%‰x×]|[A-Za-z]+))?/)?.[0].trim()||null}return null}function bkt(t,e,r){let n=t.slice(0,e).trim(),i=t.slice(r);return n?i=i.trim():i=i.replace(/^\s*(?:[-–—:]\s*)?/,""),[n,i].filter(Boolean).join(" ").trim()}function Jye(t,e,r,n,i){return t?t.map((a,o)=>o===e?bkt(r,n,i):vn(a).trim()).filter(Boolean).join(`
|
|
3591
3591
|
`).trim():""}function vkt(t,e,r){let n=gkt(e);if(n){let o=vn(n.node).trim(),s=ykt(n.node);if(s){let l=o.indexOf(s),u=Jye(e,n.index,o,l,l+s.length);return {stat:s,description:u||t||s}}}let i=t.trim(),a=d8(i);if(a&&a.index===0&&a.end===i.length)return {stat:t,description:r||t};if(n){let o=vn(n.node).trim(),s=d8(o);if(s){let l=Jye(e,n.index,o,s.index,s.end);return {stat:s.value,description:l||t||s.value}}}return {stat:t,description:r||t}}function h8(t){return t.replace(/\s+/g," ").trim()}function U1e(t,e){let r=e??[];switch(t){case "quote":return r.length===1&&r[0]?.type==="blockquote";case "dataTable":return r.length===1&&r[0]?.type==="table";case "list":return r.length===1&&r[0]?.type==="list";case "diagram":case "timeline":return r.length===1&&r[0]?.type==="code";case "tree":return r.length===1&&(r[0]?.type==="code"||r[0]?.type==="list");case "photoGrid":{let n=g4(r);if(n.length<2||n.length>4)return false;let i=h8(Ly(r)),a=h8(n.map(o=>o.alt).filter(Boolean).join(" "));return i===""||i===a}case "videoWithCaption":{let n=y4(r);return n.length!==1?false:h8(Ly(r))===h8(n[0]?.alt??"")}case "leftFeature":case "rightFeature":case "statHighlight":return true;default:return false}}function Xf(t,e,r,n={}){let i=n.placeholders===true,a=Ly(r);switch(t){case "statHighlight":{let o=vkt(e,r,a);return n.preserveSourceHeading&&e&&o.stat!==e&&o.description!==e?{...o,description:e,...o.description?{detail:o.description}:{}}:o}case "quote":{let o=HG(r)||a;return o?{quote:o,...e?{title:e}:{}}:{quote:e}}case "fullBleedQuote":case "pullQuote":return {text:HG(r)||a||e};case "factCard":return {fact:e,explanation:a||e};case "comparisonBar":return i?{leftLabel:"A",leftValue:60,rightLabel:"B",rightValue:40}:null;case "list":{let o=q1e(r);return o.length>0?{items:o,...e?{title:e}:{}}:i?{items:["Item 1","Item 2","Item 3"]}:null}case "definitionCard":return {term:e,definition:a||e};case "dateEvent":return {date:e,description:a||e};case "dataTable":{let o=S8(r);return o?{...o,...e?{title:e}:{}}:i?{headers:["Column"],rows:[["Data"]]}:null}case "barChart":case "columnChart":case "pieChart":case "donutChart":case "lineChart":case "areaChart":case "scatterChart":{let o=S8(r);return o?{headers:o.headers,rows:o.rows,...e?{title:e}:{}}:i&&!a.trim()?{headers:["Quarter","Revenue","Costs"],rows:[["Q1","40","28"],["Q2","55","31"],["Q3","48","30"],["Q4","62","35"]],...e?{title:e}:{}}:null}case "imageWithCaption":{let o=k8(r);return o?{imageSrc:o.src,imageAlt:o.alt||e,caption:e}:i?{caption:e}:null}case "bigText":{let o=k8(r);return {title:e,...o?{imageSrc:o.src,imageAlt:o.alt||e}:{}}}case "photoGrid":{let o=g4(r,4);return o.length<2?i?{}:null:{images:o.map(s=>({src:s.src,alt:s.alt})),caption:e}}case "videoWithCaption":{let o=H1e(r);return o?{videoSrc:o.src,posterSrc:o.posterSrc,videoAlt:o.alt||e,caption:e}:i?{caption:e}:null}case "leftFeature":case "rightFeature":{let o=k8(r);return !o&&!i?null:{imageSrc:o?.src??"",imageAlt:o?.alt||e,imageWidth:o?.width,imageHeight:o?.height,title:e,body:a}}case "diagram":{let o=(r??[]).filter(h=>h.type==="code"),s=o.length===1&&px(o[0].lang)?o[0]:void 0,l=s?mx(s.value,{explicit:a4(s.lang)}):void 0;if(!l?.isDiagram||!l.diagram)return i?{}:null;let{nodes:u,edges:d}=A8(l.diagram);return {nodes:u,edges:d,...e?{title:e}:{}}}case "timeline":{let o=(r??[]).filter(h=>h.type==="code"),s=o.length===1&&gx(o[0].lang)?o[0]:void 0,l=s?yx(s.value,{explicit:true}):void 0;if(!l?.isTimeline||!l.timeline)return i?{}:null;let{tracks:u,links:d}=tW(l.timeline);return {tracks:u,links:d,...e?{title:e}:{}}}case "tree":{let o=(r??[]).filter(u=>u.type==="code"),s=o.length===1&&o4(o[0].lang)?o[0]:void 0;if(s){let u=l4(s.value,{explicit:s4(s.lang)});if(u.isTree&&u.tree){let{items:d}=C8(u.tree);return {items:d,...e?{title:e}:{}}}}let l=$1e(r);if(l){let{items:u}=C8(F1e(l));if(u.length>0)return {items:u,...e?{title:e}:{}}}return i?{}:null}default:return i?{}:null}}function xkt(t){return (t.block?.contents??[]).filter(e=>!(e.type==="code"&&e.lang?.trim().toLowerCase()==="mermaid"))}function G1e(t,e=0){let r=" ".repeat(e);return t.children.flatMap((n,i)=>{let a=n.children.filter(l=>l.type!=="list").map(l=>vn(l).trim()).filter(Boolean).join(" "),o=t.ordered?`${(t.start??1)+i}.`:"\u2022",s=a?[`${r}${o} ${a}`]:[];for(let l of n.children)l.type==="list"&&s.push(G1e(l,e+1));return s}).join(`
|
|
3592
3592
|
`)}function wkt(t){return t.map((e,r)=>{let n=e.type==="list"?G1e(e):vn(e);return r===0?n:`${`
|
|
3593
3593
|
`.repeat(rW(t[r-1],e))}${n}`}).join("").trim()}function kkt(t,e){let r=t.length>1800?18:t.length>1100?21:t.length>650?24:28;return Qt(r,e,false)}function nW(t,e){let{theme:r}=e,n=t.title??e.block?.title??"",i=xkt(e),a=wkt(i),o=z1e(i),s=[ph("bg",r.colors.background)];return n&&s.push({type:"text",id:"title",content:{text:n,style:{fontSize:Qt(46,e,true),fontFamily:Yt(e,"title"),fontWeight:"bold",color:r.colors.text,textAlign:"left",lineHeight:1.15,shadow:$n(e)}},position:{x:"8%",y:"9%",width:"84%",height:"15%",anchor:"top-left"}}),a&&s.push({type:"text",id:"body",content:{text:a,...o?{html:o}:{},style:{fontSize:kkt(a,e),fontFamily:Yt(e,"body"),color:r.colors.text,textAlign:"left",lineHeight:1.35,shadow:$n(e)}},position:{x:"8%",y:n?"28%":"10%",width:"84%",height:n?"64%":"82%",anchor:"top-left"}}),s}function W1e(t,e){let{stat:r,description:n,detail:i,colorScheme:a="blue",accentImage:o}=t,{theme:s}=e,l=os(e,a),u=o?Iy(o.position):Vm,d=Qt(148,e,true),h=Qt(32,e,false),f=Qt(26,e,false),p=[ph("bg",Mc(e,180))];return o&&p.push(...My(o,t.id,Ul(e,t.imageTreatment))),p.push({type:"text",id:"stat",content:{text:r,style:{fontSize:d,fontFamily:Yt(e,"title"),fontWeight:"bold",color:l.text,shadow:$n(e)}},position:{x:u.textCenterX,y:za("36%",u),anchor:"center"},animation:p4(e,"statHighlight","entrance","subtle")==="dramatic"?{type:"zoomIn",duration:.4}:{type:"zoomIn",duration:.6}}),p.push({type:"text",id:"description",content:{text:n,style:{fontSize:h,fontFamily:Yt(e,"body"),color:s.colors.textMuted,textAlign:"center",lineHeight:1.5,shadow:$n(e)}},position:{x:u.textCenterX,y:za("54%",u),width:u.textWidth,anchor:"center"},animation:{type:"fadeIn",duration:1,delay:.3}}),i&&p.push({type:"text",id:"detail",content:{text:i,style:{fontSize:f,fontFamily:Yt(e,"body"),color:l.text,textAlign:"center",shadow:$n(e)}},position:{x:u.textCenterX,y:za("66%",u),width:u.textWidth,anchor:"center"},animation:{type:"fadeIn",duration:1,delay:1}}),p}function V1e(t,e){let{title:r,quote:n,attribution:i,accentImage:a}=t,{theme:o,viewport:s}=e,l=a?Iy(a.position):Vm,u=Qt(48,e,true),d=Qt(34,e,true),h=Qt(26,e,false),f=Math.max(o.typography.titleLineHeight??1.4,1.25),p=Qt(280,e,true),m=[ph("bg",Mc(e,160))];a&&m.push(...My(a,t.id,Ul(e,t.imageTreatment))),r&&m.push({type:"text",id:"quote-title",content:{text:r,style:{fontSize:d,fontFamily:Yt(e,"body"),fontWeight:"bold",color:o.colors.textMuted,textAlign:"center",shadow:$n(e)}},position:{x:l.textCenterX,y:za("14%",l),width:l.textWidth,anchor:"center"},animation:{type:"fadeIn",duration:.8}}),m.push({type:"text",id:"deco-quote",content:{text:"\u201C",style:{fontSize:p,fontFamily:Yt(e,"title"),color:rr(o.colors.text,.09),textAlign:"center"}},position:{x:l.textCenterX,y:za("26%",l),anchor:"center"}});let g=i?45:r?52:50;if(m.push({type:"text",id:"quote",content:{text:n,style:{fontSize:u,fontFamily:Yt(e,"title"),color:o.colors.text,textAlign:"center",lineHeight:f,shadow:$n(e)}},position:{x:l.textCenterX,y:za(`${g}%`,l),anchor:"center",width:l.textWidth},animation:qo(e,"text",{type:"fadeIn",duration:2})}),i){let y=parseFloat(l.textWidth)/100*s.width,b=Ic(n,u,y,f),v=u*1.7,x=Math.min(82,g+(b/2+v)/s.height*100);m.push({type:"text",id:"attribution",content:{text:`\u2014 ${i}`,style:{fontSize:h,fontFamily:Yt(e,"body"),color:o.colors.textMuted,textAlign:"center",shadow:$n(e)}},position:{x:l.textCenterX,y:za(`${x}%`,l),anchor:"center"},animation:{type:"fadeIn",duration:1,delay:1.5}});}return m}function Y1e(t,e){let{fact:r,explanation:n,source:i,accentImage:a}=t,{theme:o,viewport:s}=e,l=a?Iy(a.position):Vm,u=Qt(56,e,true),d=Qt(34,e,false),h=Qt(20,e,false),f=[ph("bg",Mc(e,170))];a&&f.push(...My(a,t.id,Ul(e,t.imageTreatment)));let p=parseFloat(l.textWidth)/100*s.width,m=Ic(r,u,p,1.3),g=Ic(n,d,p,1.5),y=i?h*1.4:0,b=u*.9,v=i?d*1.1:0,C=47-(m+b+g+v+y)/2/s.height*100,T=A=>C+A/s.height*100,k=T(m/2),S=T(m+b+g/2),E=T(m+b+g+v+y/2);return f.push({type:"text",id:"fact",content:{text:r,style:{fontSize:u,fontFamily:Yt(e,"title"),fontWeight:"bold",color:o.colors.text,textAlign:"center",lineHeight:1.3,shadow:$n(e)}},position:{x:l.textCenterX,y:za(`${k}%`,l),width:l.textWidth,anchor:"center"},animation:qo(e,"text",{type:"fadeIn",duration:1.5})}),f.push({type:"text",id:"explanation",content:{text:n,style:{fontSize:d,fontFamily:Yt(e,"body"),color:o.colors.textMuted,textAlign:"center",lineHeight:1.5,shadow:$n(e)}},position:{x:l.textCenterX,y:za(`${S}%`,l),width:l.textWidth,anchor:"center"},animation:qo(e,"text",{type:"fadeIn",duration:1,delay:.8})}),i&&f.push({type:"text",id:"source",content:{text:i,style:{fontSize:h,fontFamily:Yt(e,"body"),color:o.colors.textMuted,textAlign:"center",shadow:$n(e)}},position:{x:l.textCenterX,y:za(`${E}%`,l),anchor:"center"},animation:{type:"fadeIn",duration:.8,delay:1.5}}),f}function j1e(t,e){let{left:r,right:n,header:i,leftColor:a="green",rightColor:o="blue"}=t;if(!r?.label||!n?.label)return [];let{theme:s,layout:l,orientation:u}=e,d=os(e,a),h=os(e,o),f=ZR(u),p=l.stackColumns,m=p?"85%":"42%",g=Qt(36,e,true),y=Qt(44,e,true),b=Qt(22,e,false),v=i&&!p?22:15,x=i&&!p?64:70,C=[{type:"shape",id:"bg",content:{shape:"rect",fill:Mc(e,135)},position:{x:0,y:0,width:"100%",height:"100%"}}];if(!p){let _=rr(s.colors.text,.05);C.push({type:"shape",id:"left-panel",content:{shape:"rect",fill:_,borderRadius:12},position:{x:"3%",y:`${v}%`,width:"44%",height:`${x}%`}}),C.push({type:"shape",id:"right-panel",content:{shape:"rect",fill:_,borderRadius:12},position:{x:"53%",y:`${v}%`,width:"44%",height:`${x}%`}});}let T=p?"8%":"12%";i&&C.push({type:"text",id:"header",content:{text:i,style:{fontSize:g,fontFamily:Yt(e,"title"),fontWeight:"bold",color:s.colors.text,textAlign:"center"}},position:{x:"50%",y:T,anchor:"center"},animation:qo(e,"text",{type:"fadeIn",duration:.8})});let k,S,E,A;if(p)k=i?"30%":"25%",S=i?"40%":"35%",E=i?"60%":"55%",A=i?"70%":"65%";else {let _=v+x/2;k=`${_-4}%`,S=`${_+7}%`,E=`${_-4}%`,A=`${_+7}%`;}C.push({type:"text",id:"left-label",content:{text:r.label,style:{fontSize:y,fontFamily:Yt(e,"body"),fontWeight:"bold",color:d.text,textAlign:"center",lineHeight:1.3}},position:{x:f.left.x,y:k,anchor:"center",width:m},animation:qo(e,"text",{type:"fadeIn",duration:1})}),r.sublabel&&C.push({type:"text",id:"left-sublabel",content:{text:r.sublabel,style:{fontSize:b,fontFamily:Yt(e,"body"),color:s.colors.textMuted,textAlign:"center",lineHeight:1.4}},position:{x:f.left.x,y:S,anchor:"center",width:m},animation:{type:"fadeIn",duration:.8,delay:.3}});let R=Qt(64,e,true),P=p?"48%":`${v+x/2}%`,L=p?"\u2193":"\u2192";return C.push({type:"text",id:"connector",content:{text:L,style:{fontSize:R,fontFamily:Yt(e,"title"),fontWeight:"bold",color:rr(s.colors.text,.45),textAlign:"center"}},position:{x:"50%",y:P,anchor:"center"},animation:{type:"fadeIn",duration:.6,delay:.4}}),C.push({type:"text",id:"right-label",content:{text:n.label,style:{fontSize:y,fontFamily:Yt(e,"body"),fontWeight:"bold",color:h.text,textAlign:"center",lineHeight:1.3}},position:{x:f.right.x,y:E,anchor:"center",width:m},animation:qo(e,"text",{type:"fadeIn",duration:1,delay:.5})}),n.sublabel&&C.push({type:"text",id:"right-sublabel",content:{text:n.sublabel,style:{fontSize:b,fontFamily:Yt(e,"body"),color:s.colors.textMuted,textAlign:"center",lineHeight:1.4}},position:{x:f.right.x,y:A,anchor:"center",width:m},animation:{type:"fadeIn",duration:.8,delay:.8}}),C}var Tkt={neutral:"#63b3ed",somber:"#e53e3e",celebratory:"#68d391"};function X1e(t,e){let{date:r,description:n,footer:i,mood:a="neutral",accentImage:o}=t,{theme:s}=e,l=Tkt[a],u=Xd(s.colors.background)>.5?Df(l,.25):l,d=o?Iy(o.position):Vm,h=Qt(96,e,true),f=Qt(30,e,false),p=Qt(26,e,false),m=[{type:"shape",id:"bg",content:{shape:"rect",fill:Mc(e,135)},position:{x:0,y:0,width:"100%",height:"100%"}}];return o&&m.push(...My(o,t.id,Ul(e,t.imageTreatment))),m.push({type:"text",id:"date",content:{text:r,style:{fontSize:h,fontFamily:Yt(e,"title"),fontWeight:"bold",color:u,shadow:$n(e)}},position:{x:d.textCenterX,y:za("35%",d),anchor:"center"},animation:{type:"fadeIn",duration:1.5}}),m.push({type:"text",id:"description",content:{text:n,style:{fontSize:f,fontFamily:Yt(e,"body"),color:s.colors.text,textAlign:"center",lineHeight:1.6,shadow:$n(e)}},position:{x:d.textCenterX,y:za("58%",d),width:d.textWidth,anchor:"center"},animation:{type:"fadeIn",duration:2,delay:1}}),i&&m.push({type:"text",id:"footer",content:{text:i,style:{fontSize:p,fontFamily:Yt(e,"body"),color:s.colors.textMuted,shadow:$n(e)}},position:{x:d.textCenterX,y:za("72%",d),anchor:"center"},animation:{type:"fadeIn",duration:1,delay:3}}),m}function iW(t,e){let{imageSrc:r,imageAlt:n,caption:i,captionPosition:a="bottom",ambientMotion:o,isTitle:s,subtitle:l,imageCredit:u,imageLicense:d}=t,h=i&&ZG(i),{theme:f,layout:p}=e,m=Ul(e,t.imageTreatment),g=Qt(30,e,false),y=Qt(96,e,true),b=Qt(36,e,false),v=t.kenBurns,C=jf(o||v),T=[{type:"image",id:"bg-image",content:{src:r,alt:n,fit:"cover",credit:u,license:d,...m?{treatment:m}:{}},position:{x:0,y:0,width:"100%",height:"100%"},animation:C}],k=f.colors.background;if(s&&h)return T.push({type:"shape",id:"title-gradient",content:{shape:"rect",fill:`linear-gradient(0deg, ${rr(k,.85)} 0%, ${rr(k,.45)} 40%, ${rr(k,.1)} 70%, ${rr(k,0)} 100%)`},position:{x:0,y:0,width:"100%",height:"100%"}}),T.push({type:"text",id:"title",content:{text:h,style:{fontSize:y,fontFamily:Yt(e,"title"),fontWeight:"bold",color:f.colors.text,textAlign:"center",shadow:$n(e)}},position:{x:"50%",y:l?"70%":"75%",anchor:"center",width:p.maxTextWidth},animation:{type:"fadeIn",duration:.8}}),l&&T.push({type:"text",id:"subtitle",content:{text:l,style:{fontSize:b,fontFamily:Yt(e,"body"),color:f.colors.textMuted,textAlign:"center",lineHeight:1.5}},position:{x:"50%",y:"82%",anchor:"center",width:p.maxTextWidth},animation:{type:"fadeIn",duration:.8,delay:.2}}),T;if(h){let S=a==="top"?"7%":a==="center"?"42%":"68%",E=a==="top"?"13%":a==="center"?"48%":"74%";T.push({type:"shape",id:"caption-gradient",content:{shape:"rect",fill:`linear-gradient(90deg, ${rr(k,0)}, ${rr(k,.78)} 16%, ${rr(k,.78)} 84%, ${rr(k,0)})`},position:{x:0,y:S,width:"100%",height:"16%"}}),T.push({type:"text",id:"caption",content:{text:h,style:{fontSize:g,fontFamily:Yt(e,"body"),color:f.colors.text,textAlign:"center",shadow:$n(e),lineHeight:1.18,maxLines:2}},position:{x:"50%",y:E,anchor:"center",width:"78%"},animation:{type:"fadeIn",duration:1.5,delay:.5}});}return T}function K1e(t,e,r){let{imageSrc:n,imageAlt:i,imageWidth:a,imageHeight:o,title:s,body:l}=t,{theme:u,layout:d}=e,h=Ul(e,t.imageTreatment),f=(a??0)>0||(o??0)>0,p=d.stackColumns,m=Qt(48,e,true),g=Qt(24,e,false),y,b,v,x,C;p?(y="0",b="0",v="100%",x="50%",C=f?"contain":"cover"):f?(y=`${r==="left"?5:55}%`,b="5%",v="40%",x="90%",C="contain"):(y=r==="left"?"0":"50%",b="0",v="50%",x="100%",C="cover");let T=4,k=p?90:42,S=p?`${(100-k)/2}%`:r==="left"?`${50+T}%`:`${T+2}%`,E=p?"60%":l?"42%":"50%",A=p?"78%":s?"55%":"50%",R="top-left",P="left",L=[{type:"shape",id:"feature-bg",content:{shape:"rect",fill:u.colors.background},position:{x:0,y:0,width:"100%",height:"100%"}}];return n&&L.push({type:"image",id:"feature-image",content:{src:n,alt:i??s??"",fit:C,...h?{treatment:h}:{}},position:{x:y,y:b,width:v,height:x}}),s&&L.push({type:"text",id:"feature-title",content:{text:s,style:{fontSize:m,fontFamily:Yt(e,"title"),fontWeight:"bold",color:u.colors.text,textAlign:P,lineHeight:1.2}},position:{x:S,y:E,anchor:R,width:`${k}%`},animation:qo(e,"text",{type:"fadeIn",duration:.8})}),l&&L.push({type:"text",id:"feature-body",content:{text:l,style:{fontSize:g,fontFamily:Yt(e,"body"),color:u.colors.textMuted,textAlign:P,lineHeight:1.5}},position:{x:S,y:A,anchor:R,width:`${k}%`},animation:qo(e,"text",{type:"fadeIn",duration:.8,delay:.2})}),L}function Q1e(t,e){return K1e(t,e,"left")}function Z1e(t,e){return K1e(t,e,"right")}function J1e(t,e){let{center:r,zoom:n,mapStyle:i="terrain",title:a,caption:o,markers:s,ambientMotion:l,staticSrc:u}=t,{theme:d,layout:h}=e,f=Qt(64,e,true),p=Qt(32,e,false),m=jf(l),g=[{type:"map",id:"map-bg",content:{center:r,zoom:n,style:i,markers:s,showAttribution:true,staticSrc:u},position:{x:0,y:0,width:"100%",height:"100%"},animation:m}],y=d.colors.background;return a&&(g.push({type:"shape",id:"title-overlay",content:{shape:"rect",fill:`linear-gradient(180deg, ${rr(y,.85)} 0%, ${rr(y,.6)} 70%, ${rr(y,0)} 100%)`},position:{x:0,y:0,width:"100%",height:"20%"}}),g.push({type:"text",id:"title",content:{text:a,style:{fontSize:f,fontFamily:Yt(e,"title"),fontWeight:"bold",color:d.colors.text,textAlign:"center",shadow:$n(e)}},position:{x:"50%",y:"9%",anchor:"center",width:h.maxTextWidth},animation:{type:"fadeIn",duration:1,delay:.3}})),o&&(g.push({type:"shape",id:"caption-overlay",content:{shape:"rect",fill:`linear-gradient(0deg, ${rr(y,.85)} 0%, ${rr(y,.6)} 70%, ${rr(y,0)} 100%)`},position:{x:0,y:"80%",width:"100%",height:"20%"}}),g.push({type:"text",id:"caption",content:{text:o,style:{fontSize:p,fontFamily:Yt(e,"body"),color:d.colors.text,textAlign:"center",shadow:$n(e)}},position:{x:"50%",y:h.captionY,anchor:"center",width:h.maxTextWidth},animation:{type:"fadeIn",duration:1,delay:.5}})),g}function ebe(t,e){let{text:r,colorScheme:n="blue"}=t,i=os(e,n),a=Qt(120,e,true);return [{type:"shape",id:"bg",content:{shape:"rect",fill:`radial-gradient(ellipse at 50% 50%, ${i.bg} 0%, ${Df(i.bg,.12)} 100%)`},position:{x:0,y:0,width:"100%",height:"100%"}},{type:"text",id:"impact-text",content:{text:r,style:{fontSize:a,fontFamily:Yt(e,"title"),fontWeight:"bold",color:i.text,textAlign:"center",lineHeight:1.2,shadow:$n(e)}},position:{x:"50%",y:"50%",anchor:"center",width:"85%"},animation:p4(e,"fullBleedQuote","entrance","subtle")==="dramatic"?{type:"zoomIn",duration:.8}:{type:"fadeIn",duration:1.5}}]}var BG=1.2,Ckt=18;function Skt(t,e,r){if(!t.trim())return 1;let n=Math.floor(r/(e*.5));if(n<=0)return 1;let i=0,a=0;for(let o of t.split(/\s+/)){let s=a?a+1+o.length:o.length;if(s<=n){a=s;continue}a&&(i+=1);let l=o.length;for(;l>n;)i+=1,l-=n;a=l;}return Math.max(1,i+(a?1:0))}function tbe(t,e){let{title:r,accentImage:n}=t,i=Array.isArray(t.items)?t.items:[],a=m4(e.block?.contents),{theme:o}=e,s=n?Iy(n.position):Vm,l=Qt(44,e,true),u=Qt(34,e,false),d=[{type:"shape",id:"bg",content:{shape:"rect",fill:`linear-gradient(155deg, ${o.colors.backgroundLight} 0%, ${o.colors.background} 100%)`},position:{x:0,y:0,width:"100%",height:"100%"}}];n&&d.push(...My(n,t.id,Ul(e,t.imageTreatment)));let h=parseFloat(s.textCenterX),f=parseFloat(s.textWidth),p=Number.isFinite(h)&&Number.isFinite(f)?h-f/2:8,m=`${p}%`,g=r?34:26;r&&d.push({type:"text",id:"list-title",content:{text:r,style:{fontSize:l,fontFamily:Yt(e,"title"),fontWeight:"bold",color:o.colors.text,textAlign:"left",shadow:$n(e)}},position:{x:m,y:za("20%",s),width:s.textWidth},animation:qo(e,"text",{type:"fadeIn",duration:1})});let y=(Number.isFinite(f)?f/100:.85)*e.viewport.width,b=`${i.length}.`,v=Math.max(u,b.length*u*.5),x=u*.35,C=v+x,T=`${p+C/e.viewport.width*100}%`,k=Math.max(u,y-C),S=g;for(let E=0;E<i.length;E++){let A=i[E],R=a[E]?.text===A?a[E]?.html:void 0,P=Skt(A,u,k),L=qo(e,"text",{type:"fadeIn",duration:.8,delay:.3+.3*E});d.push({type:"text",id:`item-${E}-marker`,content:{text:`${E+1}.`,style:{fontSize:u,fontFamily:Yt(e,"body"),color:o.colors.text,textAlign:"right",lineHeight:BG,shadow:$n(e)}},position:{x:m,y:za(`${S}%`,s),width:v},animation:L}),d.push({type:"text",id:`item-${E}`,content:{text:A,...R?{html:R}:{},style:{fontSize:u,fontFamily:Yt(e,"body"),color:o.colors.text,textAlign:"left",lineHeight:BG,shadow:$n(e)}},position:{x:T,y:za(`${S}%`,s),width:k},animation:L});let _=P*u*BG;S+=(_+Ckt)/e.viewport.height*100;}return d}var $s=1.2;function rbe(t,e){let{images:r,caption:n,ambientMotion:i}=t;if(!r||r.length===0)return [];let a=n&&ZG(n),{theme:o,layout:s}=e,l=Ul(e,t.imageTreatment),u=[{type:"shape",id:"bg",content:{shape:"rect",fill:o.colors.background},position:{x:0,y:0,width:"100%",height:"100%"}}],h=Ekt(r.length,100,s.stackColumns);for(let f=0;f<Math.min(r.length,4);f++){let p=r[f],m=h[f];u.push({type:"shape",id:`grid-placeholder-${f}`,content:{shape:"rect",fill:o.colors.background},position:{x:`${m.x}%`,y:`${m.y}%`,width:`${m.w}%`,height:`${m.h}%`}}),u.push({type:"image",id:`grid-img-${f}`,content:{src:p.src,alt:p.alt,fit:"cover",credit:p.credit,license:p.license,...l?{treatment:l}:{}},position:{x:`${m.x}%`,y:`${m.y}%`,width:`${m.w}%`,height:`${m.h}%`},animation:f===0&&i?{type:i,duration:15}:{type:"fadeIn",duration:1,delay:.2*f}});}if(a){let f=Qt(s.stackColumns?24:26,e,false),p=s.stackColumns?"78%":"74%",m=s.stackColumns?"72%":"68%",g=s.stackColumns?"13%":"16%",y=o.colors.background;u.push({type:"shape",id:"caption-bg",content:{shape:"rect",fill:`linear-gradient(90deg, ${rr(y,0)}, ${rr(y,.78)} 16%, ${rr(y,.78)} 84%, ${rr(y,0)})`},position:{x:0,y:m,width:"100%",height:g}}),u.push({type:"text",id:"caption",content:{text:a,style:{fontSize:f,fontFamily:Yt(e,"body"),color:o.colors.text,textAlign:"center",shadow:true,lineHeight:1.18,maxLines:s.stackColumns?2:1}},position:{x:"50%",y:p,anchor:"center",width:"78%"},animation:{type:"fadeIn",duration:1,delay:.5}});}return u}function Ekt(t,e,r){let n=50-$s/2,i=e/2-$s/2;switch(t){case 1:return [{x:0,y:0,w:100,h:e}];case 2:return r?[{x:0,y:0,w:100,h:i},{x:0,y:e/2+$s/2,w:100,h:i}]:[{x:0,y:0,w:n,h:e},{x:50+$s/2,y:0,w:n,h:e}];case 3:{if(r){let s=e/3-$s*2/3;return [{x:0,y:0,w:100,h:s},{x:0,y:e/3+$s/3,w:100,h:s},{x:0,y:e*2/3+$s*2/3,w:100,h:s}]}let a=60-$s/2,o=40-$s/2;return [{x:0,y:0,w:a,h:e},{x:60+$s/2,y:0,w:o,h:i},{x:60+$s/2,y:e/2+$s/2,w:o,h:i}]}default:return [{x:0,y:0,w:n,h:i},{x:50+$s/2,y:0,w:n,h:i},{x:0,y:e/2+$s/2,w:n,h:i},{x:50+$s/2,y:e/2+$s/2,w:n,h:i}]}}function nbe(t,e){let{term:r,definition:n,origin:i,colorScheme:a="blue",accentImage:o}=t,{theme:s}=e,l=os(e,a),u=o?Iy(o.position):Vm,d=Qt(72,e,true),h=Qt(32,e,false),f=Qt(22,e,false),p=[ph("bg",Mc(e,145))];return o&&p.push(...My(o,t.id,Ul(e,t.imageTreatment))),p.push({type:"text",id:"term",content:{text:r,style:{fontSize:d,fontFamily:Yt(e,"title"),fontWeight:"bold",color:l.text,textAlign:"center",shadow:$n(e)}},position:{x:u.textCenterX,y:za("30%",u),anchor:"center"},animation:qo(e,"text",{type:"fadeIn",duration:1.5})}),p.push({type:"shape",id:"separator",content:{shape:"rect",fill:`${l.text}33`},position:{x:u.textCenterX,y:za("42%",u),width:"30%",height:"2px",anchor:"center"}}),p.push({type:"text",id:"definition",content:{text:n,style:{fontSize:h,fontFamily:Yt(e,"body"),color:s.colors.text,textAlign:"center",lineHeight:1.6,maxLines:4,shadow:$n(e)}},position:{x:u.textCenterX,y:za("55%",u),width:u.textWidth,anchor:"center"},animation:qo(e,"text",{type:"fadeIn",duration:1,delay:.8})}),i&&p.push({type:"text",id:"origin",content:{text:i,style:{fontSize:f,fontFamily:Yt(e,"body"),color:s.colors.textMuted,textAlign:"center",shadow:$n(e)}},position:{x:u.textCenterX,y:za("70%",u),anchor:"center"},animation:{type:"fadeIn",duration:.8,delay:1.5}}),p}function ibe(t,e){let{leftLabel:r,rightLabel:n,unit:i,colorScheme:a="blue"}=t,{theme:o,viewport:s}=e,l=os(e,a),u=Number.isFinite(t.leftValue)?t.leftValue:0,d=Number.isFinite(t.rightValue)?t.rightValue:0,h=Qt(28,e,false),f=Qt(48,e,true),p=L=>Number.isFinite(L)?L>=1e6?`${(L/1e6).toFixed(1)}M`:L>=1e3?`${(L/1e3).toFixed(L>=1e4?0:1)}K`:L.toLocaleString():"\u2014",m=i?`${p(u)} ${i}`:p(u),g=i?`${p(d)} ${i}`:p(d),y=15,b=6,v=36,x=58,C=Math.max(0,u),T=Math.max(0,d),k=Math.max(C,T,1),E=Math.max(m.length,g.length)*f*.58/s.width*100,A=Math.max(20,Math.min(65,96-y-E-2)),R=C/k*A,P=T/k*A;return [{type:"shape",id:"bg",content:{shape:"rect",fill:Mc(e,180)},position:{x:0,y:0,width:"100%",height:"100%"}},{type:"text",id:"left-label",content:{text:r,style:{fontSize:h,fontFamily:Yt(e,"body"),color:o.colors.textMuted}},position:{x:`${y}%`,y:`${v-8}%`}},{type:"text",id:"left-value",content:{text:m,style:{fontSize:f,fontFamily:Yt(e,"body"),fontWeight:"bold",color:l.text}},position:{x:`${y+R+2}%`,y:`${v-1}%`},animation:{type:"fadeIn",duration:.8,delay:.3}},{type:"shape",id:"left-bar",content:{shape:"rect",fill:l.text,borderRadius:4},position:{x:`${y}%`,y:`${v}%`,width:`${R}%`,height:`${b}%`},animation:{type:"fadeIn",duration:1}},{type:"text",id:"right-label",content:{text:n,style:{fontSize:h,fontFamily:Yt(e,"body"),color:o.colors.textMuted}},position:{x:`${y}%`,y:`${x-8}%`}},{type:"text",id:"right-value",content:{text:g,style:{fontSize:f,fontFamily:Yt(e,"body"),fontWeight:"bold",color:l.accent}},position:{x:`${y+P+2}%`,y:`${x-1}%`},animation:{type:"fadeIn",duration:.8,delay:.6}},{type:"shape",id:"right-bar",content:{shape:"rect",fill:l.accent,borderRadius:4},position:{x:`${y}%`,y:`${x}%`,width:`${P}%`,height:`${b}%`},animation:{type:"fadeIn",duration:1,delay:.3}}]}function abe(t,e){let{text:r,attribution:n,backgroundImage:i,ambientMotion:a}=t,{viewport:o}=e,s=Ul(e,t.imageTreatment);if(!i?.src)return [];let l=Qt(52,e,true),u=Qt(26,e,false),d=Qt(200,e,true),h=1.4,f=n?45:50,p=[{type:"image",id:"bg-image",content:{src:i.src,alt:i.alt,fit:"cover",credit:i.credit,license:i.license,...s?{treatment:s}:{}},position:{x:0,y:0,width:"100%",height:"100%"},animation:jf(a,15)},{type:"shape",id:"overlay",content:{shape:"rect",fill:"rgba(0, 0, 0, 0.55)"},position:{x:0,y:0,width:"100%",height:"100%"}},{type:"text",id:"deco-quote",content:{text:"\u201C",style:{fontSize:d,fontFamily:Yt(e,"title"),color:"rgba(255, 255, 255, 0.08)",textAlign:"center"}},position:{x:"50%",y:"20%",anchor:"center"}},{type:"text",id:"quote-text",content:{text:r,style:{fontSize:l,fontFamily:Yt(e,"title"),color:"#ffffff",textAlign:"center",lineHeight:h,shadow:true}},position:{x:"50%",y:`${f}%`,anchor:"center",width:"72%"},animation:qo(e,"text",{type:"fadeIn",duration:2})}];if(n){let m=.72*o.width,g=Ic(r,l,m,h),y=Math.min(82,f+(g/2+l*1.7)/o.height*100);p.push({type:"text",id:"attribution",content:{text:`\u2014 ${n}`,style:{fontSize:u,fontFamily:Yt(e,"body"),color:"rgba(255, 255, 255, 0.85)",textAlign:"center",shadow:true}},position:{x:"50%",y:`${y}%`,anchor:"center"},animation:{type:"fadeIn",duration:1,delay:1.5}});}return p}function obe(t,e){let{videoSrc:r,posterSrc:n,videoAlt:i,clipStart:a=0,clipEnd:o,sourceDuration:s,caption:l,captionPosition:u="bottom",videoCredit:d,videoLicense:h}=t,f=l&&ZG(l),{theme:p}=e,m=Math.max(a,o??a+Math.max(0,t.duration)),g=Qt(30,e,false),y=Qt(16,e,false),b=[{type:"video",id:"bg-video",content:{src:r,posterSrc:n,alt:i,fit:"cover",clipStart:a,clipEnd:m,sourceDuration:s,credit:d,license:h},position:{x:0,y:0,width:"100%",height:"100%"}}];if(f){let v=p.colors.background,x=u==="top"?"7%":u==="center"?"42%":"68%",C=u==="top"?"13%":u==="center"?"48%":"74%";b.push({type:"shape",id:"caption-gradient",content:{shape:"rect",fill:`linear-gradient(90deg, ${rr(v,0)}, ${rr(v,.78)} 16%, ${rr(v,.78)} 84%, ${rr(v,0)})`},position:{x:0,y:x,width:"100%",height:"16%"}}),b.push({type:"text",id:"caption",content:{text:f,style:{fontSize:g,fontFamily:Yt(e,"body"),color:p.colors.text,textAlign:"center",shadow:$n(e),lineHeight:1.18,maxLines:2}},position:{x:"50%",y:C,anchor:"center",width:"78%"},animation:{type:"fadeIn",duration:1.5,delay:.5}});}return d&&b.push({type:"text",id:"credit",content:{text:d,style:{fontSize:y,fontFamily:Yt(e,"body"),color:rr(p.colors.text,.65),textAlign:"right"}},position:{x:"96%",y:"96%",anchor:"bottom-right"}}),b}function sbe(t,e){let{text:r,attribution:n,backgroundVideo:i}=t,{viewport:a}=e;if(!i?.src)return [];let o=Qt(52,e,true),s=Qt(26,e,false),l=Qt(200,e,true),u=1.4,d=n?45:50,h=[{type:"video",id:"bg-video",content:{src:i.src,posterSrc:i.posterSrc,alt:i.alt,fit:"cover",clipStart:i.clipStart,clipEnd:i.clipEnd,credit:i.credit,license:i.license},position:{x:0,y:0,width:"100%",height:"100%"}},{type:"shape",id:"overlay",content:{shape:"rect",fill:"rgba(0, 0, 0, 0.55)"},position:{x:0,y:0,width:"100%",height:"100%"}},{type:"text",id:"deco-quote",content:{text:"\u201C",style:{fontSize:l,fontFamily:Yt(e,"title"),color:"rgba(255, 255, 255, 0.08)",textAlign:"center"}},position:{x:"50%",y:"20%",anchor:"center"}},{type:"text",id:"quote-text",content:{text:r,style:{fontSize:o,fontFamily:Yt(e,"title"),color:"#ffffff",textAlign:"center",lineHeight:u,shadow:true}},position:{x:"50%",y:`${d}%`,anchor:"center",width:"72%"},animation:qo(e,"text",{type:"fadeIn",duration:2})}];if(n){let f=.72*a.width,p=Ic(r,o,f,u),m=Math.min(82,d+(p/2+o*1.7)/a.height*100);h.push({type:"text",id:"attribution",content:{text:`\u2014 ${n}`,style:{fontSize:s,fontFamily:Yt(e,"body"),color:"rgba(255, 255, 255, 0.85)",textAlign:"center",shadow:true}},position:{x:"50%",y:`${m}%`,anchor:"center"},animation:{type:"fadeIn",duration:1,delay:1.5}});}return h}function lbe(t,e){let{title:r,headers:n,rows:i,align:a,colorScheme:o}=t,{theme:s,viewport:l}=e,u=os(e,o),d=Qt(48,e,true),h=Qt(28,e,false),f=[ph("bg",Mc(e,170))],p=(Array.isArray(i)?i.length:0)+1,m=Math.min(74,p*h*2.4/l.height*100),g=r?d*2.2*100/l.height:0,y=Math.max(8,(100-g-m)/2);return r&&f.push({type:"text",id:"title",content:{text:r,style:{fontSize:d,fontFamily:Yt(e,"title"),fontWeight:"bold",color:s.colors.text,textAlign:"center",shadow:$n(e)}},position:{x:"50%",y:`${y+g/2}%`,width:"80%",anchor:"center"},animation:{type:"fadeIn",duration:.8}}),f.push({type:"table",id:"table",content:{headers:n,rows:i,align:a,style:{headerBackground:u.accent,headerColor:ey(u.accent),cellBackground:rr(s.colors.text,.04),cellColor:s.colors.text,borderColor:rr(s.colors.text,.15),fontSize:h,fontFamily:Yt(e,"body"),headerFontFamily:Yt(e,"title"),borderRadius:8}},position:{x:"10%",y:`${y+g}%`,width:"80%",height:`${m}%`},animation:{type:"fadeIn",duration:1,delay:r?.4:0}}),f}var E8=1.25,cbe=24,ube=16,UG=10;function dbe(t,e,r,n){let i=Math.max(1,e-cbe),a=Math.max(1,r-ube),s=Math.max(UG,Math.floor(n)),l=e1e(t,s,i);for(;s>UG&&l*s*E8>a;)s--,l=e1e(t,s,i);return {fontSize:s,lineCount:l,firstLineOffset:l===1?0:-((l-1)*s*E8)/2,textWidth:i}}function e1e(t,e,r){return t.split(`
|
|
@@ -4141,13 +4141,13 @@ ${ove}
|
|
|
4141
4141
|
`;var kve=[1,1.5,2];function BW(t){let e=typeof t=="number"?t:typeof t=="string"?Number(t.trim().replace(/%$/,"")):Number.NaN;if(!Number.isFinite(e))return;let r=e>3?e/100:e;return kve.find(n=>Math.abs(n-r)<.001)}var mEt=new Set(["content","list","quote","definitionCard","factCard","dateEvent"]),gEt=160,yEt=360;function Tve(t){return !t.template||!mEt.has(t.template)?1:t.textLength<gEt?2:t.textLength<yEt?1.5:1}function Cve(t,e){let r=t.map(o=>o.explicit!==void 0?o.explicit:e==="auto"?Tve(o):1),n=new Map;if(t.forEach((o,s)=>{let l=r[s];if(l===1)return;let u=o.explicit!==void 0?2:1;n.set(l,(n.get(l)??0)+u);}),n.size<=1)return r;let i=2,a=-1;for(let[o,s]of n)(s>a||s===a&&o>i)&&(i=o,a=s);return t.map((o,s)=>o.explicit!==void 0?o.explicit:r[s]===1?1:i)}var sve=32,lve=64,bEt=/^[a-z0-9][a-z0-9-]*$/;function Kf(t){if(typeof t=="number")return Number.isFinite(t)?t:void 0;if(typeof t!="string")return;let e=t.trim().replace(/%$/,"");if(e.length===0)return;let r=Number(e);return Number.isFinite(r)?r:void 0}function E4(t){return `${Math.round(t*1e3)/1e3}%`}function vEt(t,e,r){if(!t||typeof t!="object"){r.push({path:e,message:"cell must be an object"});return}let n=t,i=Kf(n.x),a=Kf(n.y),o=Kf(n.width),s=Kf(n.height);if(i===void 0||i<0||i>100){r.push({path:`${e}.x`,message:"x must be a percent between 0 and 100"});return}if(a===void 0||a<0||a>100){r.push({path:`${e}.y`,message:"y must be a percent between 0 and 100"});return}if(o===void 0||o<=0||o>100){r.push({path:`${e}.width`,message:"width must be a percent greater than 0"});return}if(s===void 0||s<=0||s>100){r.push({path:`${e}.height`,message:"height must be a percent greater than 0"});return}let l={x:E4(i),y:E4(a),width:E4(o),height:E4(s)};if(n.block!==void 0){let u=typeof n.block=="string"?Number(n.block):n.block;if(typeof u!="number"||!Number.isInteger(u)||u<1||u>lve){r.push({path:`${e}.block`,message:`block must be an integer between 1 and ${lve}`});return}l.block=u;}if(n.zoom!==void 0){let u=BW(n.zoom);if(u===void 0){r.push({path:`${e}.zoom`,message:"zoom must be 1, 1.5, or 2 (or 100/150/200 percent)"});return}l.zoom=u;}return l}function CW(t,e,r){if(!Array.isArray(t)){r.push({path:e,message:"must be an array of cells"});return}if(t.length<1||t.length>sve){r.push({path:e,message:`must contain between 1 and ${sve} cells`});return}let n=[];for(let i=0;i<t.length;i++){let a=vEt(t[i],`${e}[${i}]`,r);if(!a)return;n.push(a);}return n}function xEt(t,e){if(!t||typeof t!="object"){e.push({path:"titleSlot",message:"titleSlot must be an object"});return}let r=t,n=r.placement==="bottom"?"bottom":r.placement==="top"?"top":void 0;if(n===void 0&&r.placement!==void 0){e.push({path:"titleSlot.placement",message:"placement must be 'top' or 'bottom'"});return}let i=Kf(r.height);if(i===void 0||i<=0||i>40){e.push({path:"titleSlot.height",message:"height must be a percent between 0 and 40"});return}return {placement:n??"top",height:E4(i)}}function FW(t){let e=[];if(!t||typeof t!="object")return {valid:false,errors:[{path:"",message:"definition must be an object"}]};let r=t,n=typeof r.name=="string"?r.name.trim().toLowerCase():"";bEt.test(n)||e.push({path:"name",message:"name must be a slug (lowercase letters, digits, hyphens)"});let i=typeof r.label=="string"?r.label.trim():"";i.length===0&&e.push({path:"label",message:"label must be a non-empty string"});let a=r.cells,o,s,l;!a||typeof a!="object"?e.push({path:"cells",message:"cells must be an object with a landscape array"}):(o=CW(a.landscape,"cells.landscape",e),a.portrait!==void 0&&(s=CW(a.portrait,"cells.portrait",e)),a.square!==void 0&&(l=CW(a.square,"cells.square",e)),o&&(s&&s.length!==o.length&&e.push({path:"cells.portrait",message:"portrait must define the same number of cells as landscape"}),l&&l.length!==o.length&&e.push({path:"cells.square",message:"square must define the same number of cells as landscape"})));let u;if(r.titleSlot!==void 0&&(u=xEt(r.titleSlot,e)),e.length>0||!o)return {valid:false,errors:e};let d={name:n,label:i,cells:{landscape:o,...s?{portrait:s}:{},...l?{square:l}:{}}};return typeof r.description=="string"&&r.description.trim()&&(d.description=r.description.trim()),u&&(d.titleSlot=u),r.auto===false&&(d.auto=false),{valid:true,errors:e,layout:d}}function Cx(t){return t.cells.landscape.length}function Sve(t){return t.map(e=>({x:e.y,y:e.x,width:e.height,height:e.width,...e.block!==void 0?{block:e.block}:{},...e.zoom!==void 0?{zoom:e.zoom}:{}}))}function Eve(t,e,r){return (e==="portrait"?t.cells.portrait??Sve(t.cells.landscape):e==="square"?t.cells.square??t.cells.landscape:t.cells.landscape).map(i=>{let a=Kf(i.x)??0,o=Kf(i.y)??0,s=Kf(i.width)??0,l=Kf(i.height)??0,u={rect:{x:r.x+a/100*r.width,y:r.y+o/100*r.height,width:Math.max(1,s/100*r.width),height:Math.max(1,l/100*r.height)}};i.block!==void 0&&(u.block=i.block);let d=BW(i.zoom);return d!==void 0&&(u.zoom=d),u})}var Ave="squisq-dashboard-layouts",wEt={label:"lb",description:"ds",cells:"ce",landscape:"ls",portrait:"pt",square:"sq",width:"wd",height:"hg",block:"bk",zoom:"zo",titleSlot:"ts",placement:"pl",auto:"au"},kEt=Object.fromEntries(Object.entries(wEt).map(([t,e])=>[e,t]));function EW(t,e){if(Array.isArray(t))return t.map(r=>EW(r,e));if(t&&typeof t=="object"){let r={};for(let[n,i]of Object.entries(t))r[e[n]??n]=EW(i,e);return r}return t}function _ve(t){if(!t)return;let e=SEt(t[Ave]);if(!e)return;let r=[];for(let n of e){let i=FW(n);i.layout&&r.push(i.layout);}return r.length>0?r:void 0}function Rve(t){return Object.entries(t).map(([e,r])=>{let n=EW(r&&typeof r=="object"?r:{},kEt);return {name:e,...n}})}function TEt(t){return Array.isArray(t)?t:t&&typeof t=="object"?Rve(t):null}function CEt(t){try{return JSON.parse(t)}catch{return}}function SEt(t){if(t==null)return null;if(Array.isArray(t))return t;if(typeof t=="object")return Rve(t);if(typeof t!="string")return null;let e=CEt(t.trim());return e!==void 0?TEt(e):null}var z8=2;function mn(t){return `${Math.round(t*1e3)/1e3}%`}function Py(t,e,r=z8){let n=(100-(t-1)*r)/t,i=(100-(e-1)*r)/e,a=[];for(let o=0;o<e;o++)for(let s=0;s<t;s++)a.push({x:mn(s*(n+r)),y:mn(o*(i+r)),width:mn(n),height:mn(i)});return a}function EEt(t,e,r=z8){let n=t+r,i=100-n,a=(100-(e-1)*r)/e,o=[{x:"0%",y:"0%",width:mn(t),height:"100%"}];for(let s=0;s<e;s++)o.push({x:mn(n),y:mn(s*(a+r)),width:mn(i),height:mn(a)});return o}function AEt(t,e,r=z8){let n=t+r,i=100-n,a=(100-(e-1)*r)/e,o=[{x:"0%",y:"0%",width:"100%",height:mn(t)}];for(let s=0;s<e;s++)o.push({x:mn(s*(a+r)),y:mn(n),width:mn(a),height:mn(i)});return o}function _Et(t,e=z8){let r=t+e,i=(100-r-e)/2,a=(100-e)/2,o=[{x:"0%",y:"0%",width:mn(t),height:"100%"}];for(let s=0;s<2;s++)for(let l=0;l<2;l++)o.push({x:mn(r+l*(i+e)),y:mn(s*(a+e)),width:mn(i),height:mn(a)});return o}var $8=Object.freeze([{name:"focus-1",label:"Focus",description:"One block fills the dashboard.",cells:{landscape:[{x:"0%",y:"0%",width:"100%",height:"100%"}]}},{name:"split-2",label:"Split",description:"Two blocks side by side.",cells:{landscape:Py(2,1)}},{name:"hero-left",label:"Hero + 2",description:"A large lead block with two companions.",cells:{landscape:EEt(58,2),portrait:[{x:"0%",y:"0%",width:"100%",height:mn(46)},{x:"0%",y:mn(48),width:"100%",height:mn(25)},{x:"0%",y:mn(75),width:"100%",height:mn(25)}]}},{name:"grid-2x2",label:"Grid 2\xD72",description:"Four blocks in a balanced grid.",cells:{landscape:Py(2,2)}},{name:"hero-top",label:"Hero band",description:"A wide lead band with three blocks below.",cells:{landscape:AEt(46,3),portrait:[{x:"0%",y:"0%",width:"100%",height:mn(40)},{x:"0%",y:mn(42),width:"100%",height:mn(18)},{x:"0%",y:mn(62),width:"100%",height:mn(18)},{x:"0%",y:mn(82),width:"100%",height:mn(18)}]},auto:false},{name:"mosaic-5",label:"Mosaic",description:"A hero block beside a 2\xD72 grid.",cells:{landscape:_Et(58),portrait:[{x:"0%",y:"0%",width:"100%",height:mn(40)},{x:"0%",y:mn(42),width:mn(49),height:mn(27)},{x:mn(51),y:mn(42),width:mn(49),height:mn(27)},{x:"0%",y:mn(71),width:mn(49),height:mn(29)},{x:mn(51),y:mn(71),width:mn(49),height:mn(29)}]}},{name:"grid-3x2",label:"Grid 3\xD72",description:"Six blocks in three columns.",cells:{landscape:Py(3,2)}},{name:"grid-3x3",label:"Grid 3\xD73",description:"Nine blocks in a square grid.",cells:{landscape:Py(3,3),square:Py(3,3)}},{name:"grid-4x3",label:"Grid 4\xD73",description:"Twelve blocks in four columns.",cells:{landscape:Py(4,3)}},{name:"grid-4x4",label:"Grid 4\xD74",description:"Sixteen blocks \u2014 the densest wall.",cells:{landscape:Py(4,4)}}]);var H8="auto";function Lve(t,e){let r=t.trim().toLowerCase();if(r)return e?.find(n=>n.name===r)??$8.find(n=>n.name===r)}function Ive(t,e,r){let i=[...[...(r??[]).filter(l=>l.auto!==false),...$8.filter(l=>l.auto!==false)]].sort((l,u)=>Cx(l)-Cx(u)),a=Math.max(1,t),o=i.find(l=>Cx(l)>=a);if(o)return o;let s=i.reduce((l,u)=>Math.max(l,Cx(u)),0);return i.find(l=>Cx(l)===s)??$8[0]}var Mve=["basic","card","panel","accent"],Dve="basic";function AW(t){if(typeof t!="string")return;let e=t.trim().toLowerCase();if(e)return e==="none"||e==="default"||e==="flat"?"basic":e==="cards"?"card":e==="panels"||e==="outline"?"panel":e==="accents"||e==="accent-cards"?"accent":Mve.includes(e)?e:void 0}function O8(t,e,r){return Math.min(r,Math.max(e,t))}function LEt(t){return Xd(t)>.45}function Nve(t,e){let r=e.colors.background;return t==="basic"||t==="panel"?r:LEt(r)?Df(r,.05):i5(r,.04)}function Ove(t,e){let r=Object.values(t.colorSchemes??{});if(r.length===0)return t.colors.primary;let n=r[(e%r.length+r.length)%r.length];return n.accent||n.text||t.colors.primary}function IEt(t,e,r){let n=Math.max(1,Math.min(r.width,r.height)),i=e.style?.borderRadius??14;return t==="panel"?{edge:O8(n*.014,3,12),radius:O8(i*.45,0,n*.05)}:{edge:O8(n*.03,6,26),radius:O8(i,6,n*.1)}}function MEt(t,e){if(t<=0)return;let r=Math.round(t/Math.max(1,e.width)*1e5)/1e3,n=Math.round(t/Math.max(1,e.height)*1e5)/1e3;return `${r}% / ${n}%`}function Pve(t,e){let{theme:r,rect:n,index:i}=e;if(t==="basic")return null;let{edge:a,radius:o}=IEt(t,r,n),s={x:n.x+a,y:n.y+a,width:Math.max(1,n.width-a*2),height:Math.max(1,n.height-a*2)},l={x:a,y:a,width:s.width,height:s.height},u=Math.max(1,Math.min(n.width,n.height)),d=Math.max(1,Math.round(u*.004)),h=Ove(r,i),f=[];t!=="panel"&&[{spread:.45,dy:.5,alpha:.05},{spread:.25,dy:.42,alpha:.05},{spread:.08,dy:.3,alpha:.06}].forEach((v,x)=>{let C=a*v.spread,T=a*v.dy;f.push({type:"shape",id:`cell-shadow-${x}`,content:{shape:"rect",fill:rr(r.colors.text,v.alpha),borderRadius:o+C},position:{x:l.x-C,y:l.y-C+T,width:l.width+C*2,height:l.height+C*2}});}),f.push({type:"shape",id:"cell-surface",content:{shape:"rect",fill:r.colors.background,borderRadius:o},position:{x:l.x,y:l.y,width:l.width,height:l.height}});let p=[];if(t==="accent"&&p.push({type:"shape",id:"cell-accent-wash",content:{shape:"rect",fill:rr(h,.1),borderRadius:o},position:{x:0,y:0,width:"100%",height:"100%"}}),t==="accent"||t==="panel"){let b=Math.max(2,Math.round(u*.014));p.push({type:"shape",id:"cell-accent-bar",content:{shape:"rect",fill:h},position:{x:0,y:0,width:"100%",height:b}});}let m=t==="panel"?d:Math.max(1,d*.6);p.push({type:"shape",id:"cell-border",content:{shape:"rect",fill:"none",stroke:t==="panel"?rr(h,.45):rr(r.colors.text,.14),strokeWidth:m,borderRadius:o},position:{x:m/2,y:m/2,width:Math.max(1,l.width-m),height:Math.max(1,l.height-m)}});let g={cardRect:s,contentRect:s,layers:f,overlayLayers:p,radius:o},y=MEt(o,s);return y&&(g.contentRadiusPct=y),g}function Bve(t){return t!=="basic"}function Fve(t,e){let r=t[0];if(!r||r.type!=="shape")return [...t];let{content:n,position:i}=r,a=typeof n.fill=="string"?n.fill.trim().toLowerCase():"";return !(n.shape==="rect"&&(i.x===0||i.x==="0%")&&(i.y===0||i.y==="0%")&&i.width==="100%"&&i.height==="100%")||n.gradient||n.pattern?[...t]:a!==e.colors.background.trim().toLowerCase()?[...t]:t.slice(1)}var A4=Object.freeze({layout:{canonical:"squisq-dashboard-layout",legacy:"dashboard-layout"},showTitle:{canonical:"squisq-dashboard-title",legacy:"dashboard-title"},zoom:{canonical:"squisq-dashboard-zoom",legacy:"dashboard-zoom"},style:{canonical:"squisq-dashboard-style",legacy:"dashboard-style"}}),_4=Object.freeze({layout:H8,showTitle:true,zoom:"auto",style:Dve});function P8(t,e){if(t)return Object.prototype.hasOwnProperty.call(t,e.canonical)?t[e.canonical]:t[e.legacy]}function DEt(t){if(typeof t=="boolean")return t;if(typeof t!="string")return;let e=t.trim().toLowerCase();if(["true","yes","on","show","visible"].includes(e))return true;if(["false","no","off","hide","hidden"].includes(e))return false}function cve(t){if(typeof t!="string")return;let e=t.trim().toLowerCase();if(e)return e==="auto"||e==="default"?H8:e}function NEt(t){if(typeof t=="boolean")return t?"auto":"off";if(typeof t!="string")return;let e=t.trim().toLowerCase();if(["auto","on","true","yes"].includes(e))return "auto";if(["off","false","no","none","100","100%","1"].includes(e))return "off"}function $ve(t,e={}){let r={layout:cve(P8(t,A4.layout))??_4.layout,showTitle:DEt(P8(t,A4.showTitle))??_4.showTitle,zoom:NEt(P8(t,A4.zoom))??_4.zoom,style:AW(P8(t,A4.style))??_4.style};return {layout:cve(e.layout)??r.layout,showTitle:e.showTitle??r.showTitle,zoom:e.zoom??r.zoom,style:AW(e.style)??r.style}}var OEt={placement:"top",height:"9%"},PEt=.015,BEt=.02;function FEt(t){let e=Number(t.trim().replace(/%$/,""));return Number.isFinite(e)?e:0}function B8(t,e){return `${Math.round(t/Math.max(1,e)*1e5)/1e3}%`}function SW(t,e){return {left:B8(t.x,e.width),top:B8(t.y,e.height),width:B8(t.width,e.width),height:B8(t.height,e.height)}}function $Et(t,e){let r=t.frontmatter?.title;return typeof r=="string"&&r.trim()?r.trim():e?.trim()??""}function qEt(t,e){if(t.length===0||!e)return t;let r=t[0],n=typeof r.title=="string"?r.title.trim().toLowerCase():"";if(!n||n!==e.trim().toLowerCase())return t;let i=r.template,a=i==="title"||i==="sectionHeader"||i==="cover",o=Array.isArray(r.contents)&&r.contents.length>0;return a||!o?t.slice(1):t}function zEt(t,e,r,n,i,a){let o=jd(n,0,1,i),s=JE(i),l=Math.min(44*s,e.height*.52),u=Math.max(4,Math.round(6*s)),d=a+u+Math.max(10,Math.round(u*2.5));return [{type:"shape",id:"dashboard-title-accent",content:{shape:"rect",fill:n.colors.primary},position:{x:a,y:"26%",width:u,height:"48%"}},{type:"text",id:"dashboard-title-text",content:{text:t,style:{fontSize:l,fontFamily:Yt(o,"title"),fontWeight:"bold",color:n.colors.text,textAlign:"left",verticalAlign:"middle",maxLines:1}},position:{x:d,y:0,width:Math.max(1,e.width-d-a),height:"100%"}},{type:"shape",id:"dashboard-title-rule",content:{shape:"rect",fill:rr(n.colors.text,.14)},position:{x:0,y:r.placement==="bottom"?0:e.height-2,width:"100%",height:2}}]}function $W(t,e={}){let r=e.theme??ua,n=e.viewport??Yi.landscape,i=Mf(n),a=e.customLayouts??_ve(t.frontmatter),o=e.customTemplates??t.customTemplates,s=[],l=$ve(t.frontmatter,{layout:typeof e.layout=="string"?e.layout:void 0,showTitle:e.showTitle,zoom:e.zoom,...e.style!==void 0?{style:e.style}:{}}),u=l.style,d,h="auto";if(e.layout&&typeof e.layout=="object"){let N=FW(e.layout);N.layout?(d=N.layout,h="option"):s.push({type:"unknown-layout",message:"Inline dashboard layout definition is invalid; falling back to auto.",requestedLayout:e.layout.name});}else if(l.layout!==H8){let N=Lve(l.layout,a);N?(d=N,h=typeof e.layout=="string"&&e.layout.trim()?"option":"frontmatter"):s.push({type:"unknown-layout",message:`Unknown dashboard layout "${l.layout}"; falling back to auto.`,requestedLayout:l.layout});}let p=mve(t,{documentTitle:e.documentTitle}).blocks??[];p.length===0&&s.push({type:"empty-doc",message:"The document has no renderable blocks; the dashboard has no cells."});let m=l.showTitle?$Et(t,e.documentTitle):"",g=m.length>0;g&&(p=qEt(p,m)),d||(d=Ive(p.length,i,a),h="auto");let y=BEt*Math.min(n.width,n.height),b={x:y,y,width:Math.max(1,n.width-y*2),height:Math.max(1,n.height-y*2)},v=null;if(g){let N=d.titleSlot??OEt,O=Math.min(40,Math.max(2,FEt(N.height)))/100*n.height,$=PEt*n.height,F=N.placement==="bottom"?{x:0,y:n.height-O,width:n.width,height:O}:{x:0,y:0,width:n.width,height:O};b=N.placement==="bottom"?{x:y,y,width:Math.max(1,n.width-y*2),height:Math.max(1,n.height-O-$-y)}:{x:y,y:O+$,width:Math.max(1,n.width-y*2),height:Math.max(1,n.height-O-$-y)};let H={width:Math.max(1,Math.round(F.width)),height:Math.max(1,Math.round(F.height)),name:"Dashboard title"};v={text:m,rect:F,rectPct:SW(F,n),viewport:H,layers:zEt(m,H,N,r,n,y)};}let x=Eve(d,i,b),C=[],T=new Set;x.forEach((N,B)=>{if(N.block===void 0)return;let O=N.block-1;if(O<0||O>=p.length){s.push({type:"invalid-cell-assignment",message:`Cell ${B+1} of layout "${d.name}" requests block ${N.block}, but the document has ${p.length} block(s); the cell is left empty.`});return}T.add(O),C.push({cellIndex:B,rect:N.rect,candidateIndex:O,explicitZoom:N.zoom});});let k=new Set,S=0;x.forEach((N,B)=>{if(N.block===void 0){for(;S<p.length&&T.has(S);)S++;S>=p.length||(k.add(S),C.push({cellIndex:B,rect:N.rect,candidateIndex:S,explicitZoom:N.zoom}),S++);}});let E=[];for(let N=0;N<p.length;N++)!T.has(N)&&!k.has(N)&&E.push(N);E.length>0&&s.push({type:"overflow",message:`${E.length} block(s) exceed the "${d.name}" layout's ${x.length} cell(s) and are not rendered.`,hiddenBlockIds:E.map(N=>String(p[N].id??N))});let A=C.sort((N,B)=>N.cellIndex-B.cellIndex),R=Cve(A.map(({candidateIndex:N,explicitZoom:B})=>{let O=p[N],$=typeof O.title=="string"?O.title:"";return {template:da(O.template??""),textLength:$.length+h4(O).length,...B!==void 0?{explicit:B}:{}}}),l.zoom),P=o&&o.length>0?v4(o):Ny,L=A.map(({cellIndex:N,rect:B,candidateIndex:O},$)=>{let F=p[O],H=R[$],q=Pve(u,{theme:r,rect:B,index:N}),z=q?q.contentRect:B,G={width:Math.max(1,Math.round(z.width)),height:Math.max(1,Math.round(z.height)),name:`Dashboard cell ${N+1}`},j=jd(r,O,p.length,G);H!==1&&(j.fontScale*=H);let K=R8(F,{theme:r,viewport:G,persistentLayers:false,blockIndex:O,totalBlocks:p.length,failureMode:e.failureMode},{registry:P,templateContext:j}),V=Bve(u)?Fve(K.layers,r):K.layers,ie;if(q){let Z={width:Math.max(1,Math.round(B.width)),height:Math.max(1,Math.round(B.height)),name:`Dashboard cell ${N+1} frame`};ie={rect:B,rectPct:SW(B,n),viewport:Z,layers:q.layers,overlayLayers:q.overlayLayers,overlayViewport:{width:G.width,height:G.height,name:`Dashboard cell ${N+1} overlay`},...q.contentRadiusPct?{contentRadiusPct:q.contentRadiusPct}:{}};}return {index:N,block:F,blockIndex:O,layers:V,rect:z,rectPct:SW(z,n),...ie?{frame:ie}:{},viewport:G,zoom:H,source:K.source,...K.diagnostic?{diagnostic:K.diagnostic}:{}}}),_=f4(t,r),D=Nve(u,r),I={fill:D,bottomLayers:[{type:"shape",id:"dashboard-backdrop",content:{shape:"rect",fill:D},position:{x:0,y:0,width:"100%",height:"100%"}},...Wm(_?.bottomLayers,r)],topLayers:Wm(_?.topLayers,r)};return {layout:d,layoutSource:h,style:u,viewport:n,cells:L,title:v,backdrop:I,diagnostics:s}}var HEt=new Set(["answer","back","solution","explanation","correct answer","correct","distractor","option"]);function qve(t){return typeof t=="string"?t.trim().toLowerCase().replace(/[\s_-]+/g,""):""}function F8(t){let e=qve(t);if(e==="flashcard"||e==="card"||e==="basicflashcard")return "basic";if(e==="multiplechoiceflashcard"||e==="multiplechoice"||e==="quiz")return "multiple-choice";if(e==="group"||e==="flashcardgroup"||e==="deck")return "group"}function U8(t){let e=F8(t.metadata?.study)??F8(t.metadata?.["study-mode"]);if(e)return e;for(let r of t.classes??[]){let n=F8(r);if(n)return n}return F8(t.template)}function Sx(t){return typeof t.title=="string"&&t.title.trim().length>0}function L4(t){return (t.contents?.length??0)>0||(t.media?.length??0)>0||(t.layers?.length??0)>0}function mh(t){return Sx(t)||L4(t)}function zve(t){return Sx(t)&&HEt.has(t.title.trim().toLowerCase())}function UEt(t){let{children:e,...r}=t;return r}function GEt(t){let{children:e,contents:r,media:n,layers:i,...a}=t;return a}function Hve(t){let{children:e,title:r,...n}=t;return n}function dl(...t){return {blocks:t}}function uve(t){return t===true?true:typeof t!="string"?false:["true","yes","on","1","correct"].includes(t.trim().toLowerCase())}function WEt(t){return uve(t.metadata?.correct)||uve(t.metadata?.answer)||(t.classes??[]).some(e=>qve(e)==="correct")}function _W(t){let e=U8(t);if(e==="group")return false;if(e==="basic"||e==="multiple-choice")return true;if(zve(t))return false;let r=t.children??[];return r.length===0?Sx(t)&&L4(t):r.length===1?mh(t)&&mh(r[0]):r.every(mh)}function Uve(t){for(let e of t.children??[]){let r=U8(e);if(r==="basic"||r==="multiple-choice"||Uve(e))return true}return false}function VEt(t){let e=t.children??[];return e.length===0?false:Uve(t)?true:L4(t)?false:e.length===1?_W(e[0])&&!zve(e[0]):e.filter(_W).length>=2}function Gve(t){return L4(t)?dl(Hve(t)):void 0}function dve(t,e){let r=t.children??[],n,i,a,o;if(r.length===0?(n=Sx(t)?dl(GEt(t)):dl(),i=L4(t)?dl(Hve(t)):dl()):r.length===1?(n=mh(t)?dl(UEt(t)):dl(),i=mh(r[0])?dl(r[0]):dl()):(n=mh(r[0])?dl(r[0]):dl(),i=dl(...r.slice(1).filter(mh)),a=Sx(t)?t.title.trim():void 0,o=Gve(t)),n.blocks.length===0&&e.push({severity:"error",code:"empty-front",message:`Flashcard "${t.id}" has no content for its front`,blockId:t.id}),i.blocks.length===0&&e.push({severity:"error",code:"empty-back",message:`Flashcard "${t.id}" has no content for its answer`,blockId:t.id}),!(n.blocks.length===0||i.blocks.length===0))return {id:t.id,sourceBlockId:t.id,kind:"basic",...a?{label:a}:{},front:n,back:i,...o?{explanation:o}:{}}}function YEt(t,e){let r=t.children??[],n=r[0],i=r.slice(1).filter(mh);if((!n||!mh(n))&&e.push({severity:"error",code:"empty-front",message:`Multiple-choice flashcard "${t.id}" has no question block`,blockId:t.id}),i.length===0&&e.push({severity:"error",code:"empty-back",message:`Multiple-choice flashcard "${t.id}" has no answer choices`,blockId:t.id}),!n||!mh(n)||i.length===0)return;let a=i.filter(WEt);a.length>1&&e.push({severity:"warning",code:"multiple-correct-answers",message:`Multiple-choice flashcard "${t.id}" marks more than one answer correct; the first marker wins`,blockId:t.id});let o=a[0]??i[0];i.length<2&&e.push({severity:"warning",code:"multiple-choice-needs-distractor",message:`Multiple-choice flashcard "${t.id}" needs at least one distractor`,blockId:t.id});let s=i.map((u,d)=>({id:`${t.id}-choice-${d+1}`,sourceBlockId:u.id,content:dl(u),correct:u===o})),l=Gve(t);return {id:t.id,sourceBlockId:t.id,kind:"multiple-choice",...Sx(t)?{label:t.title.trim()}:{},front:dl(n),back:dl(o),choices:s,...l?{explanation:l}:{}}}function jEt(t){let e=t.frontmatter?.title;return typeof e=="string"&&e.trim()?e.trim():t.startBlock?.title?.trim()||void 0}function qW(t,e={}){let r=e.source??"auto",n=[],i=[],a=d=>{let h=U8(d);if(h==="group"){for(let f of d.children??[])a(f);return}if(h==="basic"){let f=dve(d,i);f&&n.push(f);return}if(h==="multiple-choice"){let f=YEt(d,i);f&&n.push(f);return}if(r==="explicit"){for(let f of d.children??[])a(f);return}if(VEt(d)){for(let f of d.children??[])a(f);return}if(_W(d)){let f=dve(d,i);f&&n.push(f);return}for(let f of d.children??[])a(f);};for(let d of t.blocks)a(d);let o=jEt(t),s=typeof t.frontmatter?.title=="string"?t.frontmatter.title.trim():"",l=n[0]?.front.blocks[0]?.title?.trim(),u=o&&(s||o!==l)?o:void 0;return {...u?{title:u}:{},cards:n,diagnostics:i}}function qr(t,e){return typeof t=="number"?t:t.endsWith("%")?parseFloat(t)/100*e:parseFloat(t)}function Gl(t,e,r){switch(t){case "center":return {x:-e/2,y:-r/2};case "top-right":return {x:-e,y:0};case "bottom-left":return {x:0,y:-r};case "bottom-right":return {x:-e,y:-r};default:return {x:0,y:0}}}function Wve({layer:t,basePath:e,viewport:r,blockTime:n,animationsEnabled:i=true}){let{content:a,position:o,animation:s}=t,l=qr(o.x,r.width),u=qr(o.y,r.height),d=o.width?qr(o.width,r.width):r.width,h=o.height?qr(o.height,r.height):r.height,f=Gl(o.anchor,d,h),p=l+f.x,m=u+f.y,g=to(a.src,e),y=Ha(s,n),b=RW(a.treatment,a.blur),v=QEt(a.fit),x=a.fit==="cover",C=s&&ZEt.has(s.type);if(x&&e5t(r,d,h,i,s)){let k=t5t(s),S=r5t(C?s:void 0),E=C?{className:"",style:{}}:y;return te("g",{className:`block-layer block-layer--image ${E.className}`,style:E.style,"data-layer-id":t.id,"data-image-framing":"portrait-pan",children:te("foreignObject",{x:p,y:m,width:d,height:h,children:te("div",{style:{width:`${d}px`,height:`${h}px`,overflow:"hidden"},children:te("img",{src:g,alt:a.alt||"",className:k,style:{width:`${d}px`,height:`${h}px`,objectFit:"cover",objectPosition:"center",display:"block",pointerEvents:"none",...b?{filter:b}:{},...a.blur&&a.blur>0?{transform:"scale(1.06)"}:{},...S}})})})})}if(x&&C&&s){let k=n5t(s),S=Ha(k,n);return te("g",{className:"block-layer block-layer--image","data-layer-id":t.id,children:te("foreignObject",{x:p,y:m,width:d,height:h,children:te("div",{style:{width:`${d}px`,height:`${h}px`,overflow:"hidden"},children:te("img",{src:g,alt:a.alt||"",className:S.className,style:{width:`${d}px`,height:`${h}px`,objectFit:"cover",objectPosition:"center",display:"block",pointerEvents:"none",transformOrigin:"center center",...b?{filter:b}:{},...S.style}})})})})}return x?te("g",{className:`block-layer block-layer--image ${y.className}`,style:y.style,"data-layer-id":t.id,children:te("foreignObject",{x:p,y:m,width:d,height:h,children:te("img",{src:g,alt:a.alt||"",style:{width:`${d}px`,height:`${h}px`,objectFit:"cover",objectPosition:"center",display:"block",pointerEvents:"none",...b?{filter:b}:{},...a.blur&&a.blur>0?{transform:"scale(1.06)"}:{}}})})}):te("g",{className:`block-layer block-layer--image ${y.className}`,style:y.style,"data-layer-id":t.id,children:te("image",{href:g,x:p,y:m,width:d,height:h,preserveAspectRatio:v,style:{pointerEvents:"none",...b?{filter:b}:{}}})})}function QEt(t){switch(t){case "cover":return "xMidYMid slice";case "fill":return "none";default:return "xMidYMid meet"}}var ZEt=new Set(["panLeft","panRight","slowZoom","zoomIn","zoomOut"]),JEt=.83;function e5t(t,e,r,n,i){return !n||i?.type==="none"||t.width/t.height>=JEt?false:e>=t.width*.7&&r>=t.height*.7}function t5t(t){return t?.type==="panRight"||t?.type==="slowZoom"&&t.panDirection==="right"?"squisq-image--portrait-pan-left":"squisq-image--portrait-pan-right"}function r5t(t){return {"--portrait-pan-duration":`${t?.duration??12}s`,"--portrait-pan-delay":`${t?.delay??0}s`,"--portrait-pan-easing":t?.easing??"ease-in-out"}}function n5t(t){switch(t.type){case "panLeft":return {...t,type:"slowZoom",panDirection:"left"};case "panRight":return {...t,type:"slowZoom",panDirection:"right"};case "zoomIn":return {...t,type:"slowZoom",direction:"in"};case "zoomOut":return {...t,type:"slowZoom",direction:"out"};default:return t}}function Ax(t,e){if(!t||t==="solid")return;let r=Math.max(1,e??1);return t==="dotted"?`${r} ${r*2}`:`${r*3} ${r*2}`}function i5t(t=0){let e=t*Math.PI/180,r=Math.sin(e),n=Math.cos(e);return {x1:.5-r/2,y1:.5-n/2,x2:.5+r/2,y2:.5+n/2}}function a5t(t){return `squisq-grad-${t}`}function _x(t,e,r,n){if(n){let i=`squisq-pattern-${t}`;return {fill:`url(#${i})`,def:o5t(i,n)}}if(r){let i=a5t(t),a=i5t(r.angle);return {fill:`url(#${i})`,def:te("linearGradient",{id:i,x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,children:[te("stop",{offset:"0%",stopColor:r.from}),te("stop",{offset:"100%",stopColor:r.to})]})}}return {fill:e,def:null}}function o5t(t,e){let r=e.size??24,n=e.opacity??1,i=e.color;return te("pattern",{id:t,width:r,height:r,patternUnits:"userSpaceOnUse",patternTransform:e.kind==="diagonal"?"rotate(45)":void 0,children:[e.kind==="dots"&&te("circle",{cx:r/2,cy:r/2,r:Math.max(1,r/12),fill:i,opacity:n}),e.kind==="grid"&&te("path",{d:`M ${r} 0 L 0 0 0 ${r}`,fill:"none",stroke:i,strokeWidth:1,opacity:n}),e.kind==="diagonal"&&te("line",{x1:0,y1:0,x2:0,y2:r,stroke:i,strokeWidth:1,opacity:n})]})}function Vve(t,e){if(!e||e.type!=="noise")return {filterAttr:void 0,def:null};let r=`squisq-noise-${t}`,n=e.opacity??.05;return {filterAttr:`url(#${r})`,def:te("filter",{id:r,x:"0%",y:"0%",width:"100%",height:"100%",children:[te("feTurbulence",{type:"fractalNoise",baseFrequency:e.baseFrequency??.8,numOctaves:2,stitchTiles:"stitch",result:"noise"}),te("feColorMatrix",{in:"noise",type:"saturate",values:"0",result:"mono"}),te("feComponentTransfer",{in:"mono",result:"faded",children:te("feFuncA",{type:"linear",slope:n,intercept:0})}),te("feComposite",{in:"faded",in2:"SourceGraphic",operator:"in"})]})}}function Yve(t){return t.layer.content.html?.trim()?te(d5t,{...t}):xW(t.layer.content.text??"")?te(c5t,{...t}):te(u5t,{...t})}function s5t(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function l5t(t){return kW(t).map(e=>e.type==="icon"?`<i class="${TW(e.family,e.name)}" aria-hidden="true"></i>`:s5t(e.text).replace(/\n/g,"<br>")).join("")}function c5t({layer:t,viewport:e,blockTime:r}){let{content:n,position:i,animation:a}=t,{text:o,style:s}=n,l=qr(i.x,e.width),u=qr(i.y,e.height),d=i.width!=null?qr(i.width,e.width):e.width,h=i.anchor??"top-left",f=s.lineHeight||1.4,p=s.fontSize*f,m=s.padding??0,g=wW(o??""),y=g.split(`
|
|
4142
4142
|
`).flatMap(E=>jve(E,s.fontSize,d)),b=i.height!=null?qr(i.height,e.height):Math.max(p,y.length*p)+m*2,v=l-Xm(h,d,"x"),x=u-Xm(h,b,"y"),C=Ha(a,r),T=cr(()=>l5t(o??""),[o]),S={boxSizing:"border-box",width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:s.verticalAlign==="top"?"flex-start":s.verticalAlign==="bottom"?"flex-end":"center",padding:m,color:s.color,fontSize:`${s.fontSize}px`,fontFamily:s.fontFamily||t5,fontWeight:s.fontWeight||"normal",fontStyle:s.fontStyle||"normal",lineHeight:f,textAlign:s.textAlign??"left",...s.shadow?{textShadow:"0 2px 3px rgba(0,0,0,0.7)"}:{},...C.style};return te("g",{className:`block-layer block-layer--text ${C.className}`,"data-layer-id":t.id,children:te("foreignObject",{x:v,y:x,width:d,height:b,style:{overflow:"visible"},children:te("div",{xmlns:"http://www.w3.org/1999/xhtml",style:S,children:te("div",{style:{width:"100%",whiteSpace:"pre-wrap",wordBreak:"break-word"},"aria-label":g,dangerouslySetInnerHTML:{__html:T}})})})})}function u5t({layer:t,viewport:e,blockTime:r}){let n=`${tl().replace(/:/g,"")}-${t.id}`,{content:i,position:a,animation:o}=t,{text:s,style:l}=i,u=qr(a.x,e.width),d=qr(a.y,e.height),h=a.width!=null?qr(a.width,e.width):void 0,f=a.height!=null?qr(a.height,e.height):void 0,p=h,m=p5t(l.textAlign,a.anchor),g=m5t(l.verticalAlign,a.anchor),y=a.anchor??"top-left",b=g5t(u,h,y,m),v=y5t(d,f,y,g),x=Ha(o,r),C=(s??"").split(`
|
|
4143
4143
|
`),T=p?C.reduce((O,$)=>O.concat(jve($,l.fontSize,p)),[]):C;if(l.maxLines&&T.length>l.maxLines){T=T.slice(0,l.maxLines);let O=T[T.length-1];T[T.length-1]=O.replace(/\s*$/,"")+"...";}let k=l.lineHeight||1.4,S=l.fontSize*k,E=l.shrinkToFit===true,R=E&&g==="middle"?-((T.length-1)/2)*S:0,P=xr(null),[L,_]=Rr(null),D=T.join(`
|
|
4144
|
-
`);vm(()=>{if(!E){_(null);return}let O=P.current;if(!O||typeof O.getBBox!="function")return;let $=()=>{try{let H=O.getBBox();if(H.width<=0||H.height<=0)return;let q=h??e.width,z=f??e.height,G=Math.min(1,q/H.width,z/H.height);_(G<.995?{scale:G,cx:H.x+H.width/2,cy:H.y+H.height/2}:null);}catch{}};$();let F=O.ownerDocument?.fonts;if(F&&F.status!=="loaded"){let H=false;return F.ready.then(()=>{H||$();}),()=>{H=true;}}},[E,D,h,f,e.width,e.height,l.fontSize,l.fontFamily,l.fontWeight]);let I=L?`translate(${L.cx} ${L.cy}) scale(${L.scale}) translate(${-L.cx} ${-L.cy})`:void 0,N={fontSize:`${l.fontSize}px`,fontFamily:l.fontFamily||t5,fontWeight:l.fontWeight||"normal",fontStyle:l.fontStyle||"normal",fill:l.color,...x.style},B=l.shadow?`shadow-${n}`:void 0;return te("g",{className:`block-layer block-layer--text ${x.className}`,"data-layer-id":t.id,children:[l.shadow&&te("defs",{children:te("filter",{id:B,x:"-20%",y:"-20%",width:"140%",height:"140%",children:te("feDropShadow",{dx:"0",dy:"2",stdDeviation:"3",floodColor:"rgba(0,0,0,0.7)"})})}),te(f5t,{layerId:n,style:l,box:h!=null&&f!=null?{x:u-Xm(y,h,"x"),y:d-Xm(y,f,"y"),width:h,height:f}:{x:b-(l.padding||16),y:v-l.fontSize-(l.padding||16),width:b5t(T,l)+(l.padding||16)*2,height:T.length*S+(l.padding||16)*2}}),te("text",{ref:P,x:b,y:v,textAnchor:m,dominantBaseline:g,style:N,filter:B?`url(#${B})`:void 0,transform:I,children:T.map((O,$)=>te("tspan",{x:b,dy:$===0?R:S,children:[O||"\xA0"," "]},$))})]})}function d5t({layer:t,viewport:e,blockTime:r}){let{content:n,position:i,animation:a}=t,{html:o,style:s}=n,l=qr(i.x,e.width),u=qr(i.y,e.height),d=i.width!=null?qr(i.width,e.width):e.width,h=i.height!=null?qr(i.height,e.height):s.fontSize*(s.lineHeight||1.4)*2,f=i.anchor??"top-left",p=l-Xm(f,d,"x"),m=u-Xm(f,h,"y"),g=cr(()=>Nz(qv(ly(o??""))),[o]),y=Ha(a,r),b=s.verticalAlign==="middle"?"center":s.verticalAlign==="bottom"?"flex-end":"flex-start",v=!!(s.borderColor&&(s.borderWidth??0)>0),x={boxSizing:"border-box",width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:b,padding:s.padding??0,color:s.color,fontSize:`${s.fontSize}px`,fontFamily:s.fontFamily||t5,fontWeight:s.fontWeight||"normal",fontStyle:s.fontStyle||"normal",lineHeight:s.lineHeight||1.4,textAlign:s.textAlign??"left",overflow:"hidden",...s.background?{background:s.background}:{},...v?{border:`${s.borderWidth}px ${s.borderStyle??"solid"} ${s.borderColor}`,borderRadius:4}:{},...s.shadow?{textShadow:"0 2px 3px rgba(0,0,0,0.7)"}:{},...y.style},C=`squisq-rich-text-${h5t(t.id)}`,T=s.textAlign==="center"||s.textAlign==="right"?"inside":"outside",k=`.${C}{margin:0}.${C} p{margin:0 0 .4em}.${C} h1,.${C} h2,.${C} h3,.${C} h4,.${C} h5,.${C} h6{margin:0 0 .3em;line-height:1.2}.${C} ul,.${C} ol{margin:0 0 .7em;padding-left:1.2em;list-style-position:${T}}.${C} li{margin:0}.${C} li>p{display:inline;margin:0}.${C} *:first-child{margin-top:0}.${C} *:last-child{margin-bottom:0}.${C} a{color:inherit;text-decoration:underline}`;return te("g",{className:`block-layer block-layer--text ${y.className}`,"data-layer-id":t.id,children:te("foreignObject",{x:p,y:m,width:d,height:h,color:s.color,style:{color:s.color},children:te("div",{xmlns:"http://www.w3.org/1999/xhtml",style:x,children:[te("style",{children:k}),te("div",{className:C,"aria-label":n.text,style:{width:"100%",color:s.color,whiteSpace:"pre-wrap",wordBreak:"break-word"},dangerouslySetInnerHTML:{__html:g}})]})})})}function h5t(t){return t.replace(/[^a-zA-Z0-9_-]/g,"-")}function f5t({layerId:t,style:e,box:r}){let n=!!(e.background||e.backgroundGradient),i=!!(e.borderColor&&(e.borderWidth??0)>0);if(!n&&!i)return null;let{fill:a,def:o}=_x(t,e.background,e.backgroundGradient),s=Ax(e.borderStyle,e.borderWidth);return te(Nn,{children:[o&&te("defs",{children:o}),te("rect",{x:r.x,y:r.y,width:r.width,height:r.height,fill:n?a:"none",fillOpacity:n?e.backgroundOpacity:void 0,stroke:i?e.borderColor:void 0,strokeWidth:i?e.borderWidth:void 0,strokeDasharray:i?s:void 0,rx:4,ry:4})]})}function p5t(t,e){return t==="center"?"middle":t==="right"?"end":t==="left"?"start":e?.includes("right")?"end":e==="center"?"middle":"start"}function m5t(t,e){return t==="top"?"text-before-edge":t==="middle"?"middle":t==="bottom"||e?.includes("bottom")?"text-after-edge":e==="center"?"middle":"text-before-edge"}function g5t(t,e,r,n){if(e==null)return t;let i=t-Xm(r,e,"x");return n==="middle"?i+e/2:n==="end"?i+e:i}function y5t(t,e,r,n){if(e==null)return t;let i=t-Xm(r,e,"y");return n==="middle"?i+e/2:n==="text-after-edge"?i+e:i}function Xm(t,e,r){return t==="center"?e/2:r==="x"?t.includes("right")?e:0:t.includes("bottom")?e:0}function b5t(t,e){return Math.max(...t.map(n=>n.length))*e.fontSize*.55}function jve(t,e,r){if(!t.trim())return [""];let n=e*.5,i=Math.floor(r/n);if(i<=0)return [t];let a=t.split(/\s+/),o=[],s="";for(let l of a){let u=s?`${s} ${l}`:l;if(u.length<=i)s=u;else if(s&&o.push(s),l.length>i){let d=l;for(;d.length>i;)o.push(d.slice(0,i)),d=d.slice(i);s=d;}else s=l;}return s&&o.push(s),o.length>0?o:[""]}var v5t=1;function Xve({layer:t,viewport:e,blockTime:r}){let{content:n,position:i,animation:a}=t,o=`${tl().replace(/:/g,"")}-${t.id}`,s=qr(i.x,e.width),l=qr(i.y,e.height),u=i.width?qr(i.width,e.width):100,d=i.height?qr(i.height,e.height):100,h=Gl(i.anchor,u,d),f=s+h.x,p=l+h.y,g=n.shape==="rect"&&f===0&&p===0&&u===e.width&&d===e.height&&!n.stroke&&!n.borderRadius?v5t:0,y=f-g,b=p-g,v=u+g*2,x=d+g*2,C=Ha(a,r),T=n.fill||"none",k=typeof T=="string"&&T.includes("gradient(");if(n.shape==="rect"&&k&&!n.gradient)return te("g",{className:`block-layer block-layer--shape ${C.className}`,style:C.style,"data-layer-id":t.id,children:te("foreignObject",{x:y,y:b,width:v,height:x,children:te("div",{style:{width:`${v}px`,height:`${x}px`,background:T,borderRadius:n.borderRadius?`${n.borderRadius}px`:void 0,pointerEvents:"none"}})})});let{fill:S,def:E}=_x(o,T,n.gradient,n.pattern),{filterAttr:A,def:R}=Vve(o,n.filter),P=Ax(n.borderStyle,n.strokeWidth),L={fill:S,fillOpacity:n.fillOpacity,stroke:n.stroke,strokeWidth:n.strokeWidth,strokeDasharray:P,...A?{filter:A}:{}};return te("g",{className:`block-layer block-layer--shape ${C.className}`,style:C.style,"data-layer-id":t.id,children:[(E||R)&&te("defs",{children:[E,R]}),n.shape==="rect"&&te("rect",{x:y,y:b,width:v,height:x,rx:n.borderRadius,ry:n.borderRadius,...L}),n.shape==="circle"&&te("circle",{cx:f+u/2,cy:p+d/2,r:Math.min(u,d)/2,...L}),n.shape==="line"&&te("line",{x1:f,y1:p,x2:f+u,y2:p+d,stroke:n.stroke||"#ffffff",strokeWidth:n.strokeWidth||2,strokeDasharray:P})]})}function x5t(t,e){let{content:r,position:n}=t;if(!r.shapeKind)return r.d;let i=n.width?qr(n.width,e.width):0,a=n.height?qr(n.height,e.height):0,o=qr(n.x,e.width),s=qr(n.y,e.height),l=Gl(n.anchor,i,a);return fx(r.shapeKind,o+l.x,s+l.y,i,a)??r.d}function w5t(t){return t.arrow}function Kve(t,e,r){return t||(e==="both"||e===r?"arrow":"none")}function Zve({layer:t,viewport:e,blockTime:r}){let{content:n,animation:i,id:a}=t,o=`${tl().replace(/:/g,"")}-${a}`,s=x5t(t,e),l=n.stroke??"#1e293b",u=n.strokeWidth??2,{fill:d,def:h}=_x(o,n.fill??"none",n.gradient),f=n.borderStyle?Ax(n.borderStyle,u):n.dasharray,p=Ha(i,r),m=`marker-start-${o}`,g=`marker-end-${o}`,y=w5t(n),b=JI(Kve(n.startMarker,y,"start"),"start"),v=JI(Kve(n.endMarker,y,"end"),"end");return te("g",{className:`block-layer block-layer--path ${p.className}`,style:p.style,"data-layer-id":a,children:[te("defs",{children:[h,v&&te(Qve,{id:g,dir:"end",d:v.d,filled:v.filled,stroke:l}),b&&te(Qve,{id:m,dir:"start",d:b.d,filled:b.filled,stroke:l})]}),te("path",{d:s,stroke:l,strokeWidth:u,fill:d,fillOpacity:n.fillOpacity,strokeDasharray:f,markerStart:b?`url(#${m})`:void 0,markerEnd:v?`url(#${g})`:void 0})]})}function Qve({id:t,dir:e,d:r,filled:n,stroke:i}){return te("marker",{id:t,viewBox:"0 0 10 10",refX:e==="end"?9:1,refY:5,markerWidth:4,markerHeight:4,orient:"auto-start-reverse",markerUnits:"strokeWidth",children:te("path",{d:r,fill:n?i:"none",stroke:n?"none":i,strokeWidth:n?void 0:1.5})})}var k5t={terrain:{url:"https://tile.opentopomap.org/{z}/{x}/{y}.png",attribution:"Map: OpenTopoMap (CC-BY-SA)",maxZoom:17},road:{url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:"\xA9 OpenStreetMap contributors",maxZoom:19},satellite:{url:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",attribution:"Imagery: Esri, Maxar, Earthstar",maxZoom:18},toner:{url:"https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png",attribution:"Map: Stadia Maps, Stamen Design",maxZoom:20},watercolor:{url:"https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg",attribution:"Map: Stadia Maps, Stamen Design",maxZoom:16}};function zW(t,e,r){let n=Math.pow(2,r),i=Math.floor((e+180)/360*n),a=t*Math.PI/180,o=Math.floor((1-Math.log(Math.tan(a)+1/Math.cos(a))/Math.PI)/2*n);return {x:i,y:o}}function HW(t,e,r,n=256){let i=Math.pow(2,r),a=(e+180)/360*i,o=t*Math.PI/180,s=(1-Math.log(Math.tan(o)+1/Math.cos(o))/Math.PI)/2*i;return {x:(a-Math.floor(a))*n,y:(s-Math.floor(s))*n}}function T5t(t,e,r,n,i,a=256){let o=zW(t,e,r),s=HW(t,e,r,a),l=Math.ceil(n/a)+1,u=Math.ceil(i/a)+1,d=o.x-Math.floor(l/2),h=o.y-Math.floor(u/2),f=n/2-s.x,p=i/2-s.y,m=[];for(let g=0;g<u;g++)for(let y=0;y<l;y++){let b=d+y,v=h+g,x=f+(b-o.x)*a,C=p+(v-o.y)*a;m.push({x:b,y:v,screenX:x,screenY:C});}return m}function Jve(t,e,r,n){return t.url.replace("{z}",String(n)).replace("{x}",String(e)).replace("{y}",String(r))}async function C5t(t){return new Promise((e,r)=>{let n=new Image;n.crossOrigin="anonymous",n.onload=()=>e(n),n.onerror=()=>r(new Error(`Failed to load tile: ${t}`)),n.src=t;})}async function exe(t){let{center:e,zoom:r,style:n,width:i,height:a,markers:o=[],showAttribution:s=true}=t,l=k5t[n],u=l.tileSize||256,d=Math.min(r,l.maxZoom),h=Jve(l,0,0,d);if(!fu(h,t.policy))throw new ch("RESOURCE_BLOCKED",`Map tiles for style "${n}" are blocked by the resource policy (${l.url}). Composing a map contacts the tile host; supply the map as \`staticSrc\` to render it without any remote request.`);let f=document.createElement("canvas");f.width=i,f.height=a;let p=f.getContext("2d");if(!p)throw new Error("Failed to get canvas context");p.fillStyle=n==="toner"?"#ffffff":"#e5e7eb",p.fillRect(0,0,i,a);let g=T5t(e.lat,e.lng,d,i,a,u).map(async y=>{let b=Jve(l,y.x,y.y,d);try{let v=await C5t(b);p.drawImage(v,y.screenX,y.screenY,u,u);}catch(v){console.warn(`Tile load failed: ${b}`,v);}});await Promise.all(g);for(let y of o)S5t(p,y,e,d,i,a,u);return s&&A5t(p,l.attribution,i,a),f.toDataURL("image/png")}function S5t(t,e,r,n,i,a,o){let s=zW(r.lat,r.lng,n),l=zW(e.lat,e.lng,n),u=HW(r.lat,r.lng,n,o),d=HW(e.lat,e.lng,n,o),h=(l.x-s.x)*o+(d.x-u.x),f=(l.y-s.y)*o+(d.y-u.y),p=i/2+h,m=a/2+f,g=e.color||"#ef4444",y=e.icon||"pin";t.save(),y==="pin"?(t.fillStyle=g,t.beginPath(),t.arc(p,m-12,8,Math.PI,0,false),t.lineTo(p,m),t.closePath(),t.fill(),t.fillStyle="#ffffff",t.beginPath(),t.arc(p,m-12,3,0,Math.PI*2),t.fill()):y==="circle"?(t.fillStyle=g,t.beginPath(),t.arc(p,m,8,0,Math.PI*2),t.fill(),t.strokeStyle="#ffffff",t.lineWidth=2,t.stroke()):y==="star"&&(t.fillStyle=g,E5t(t,p,m,5,10,5),t.fill()),e.label&&(t.fillStyle="#1f2937",t.font="bold 12px system-ui, sans-serif",t.textAlign="center",t.fillText(e.label,p,m+20)),t.restore();}function E5t(t,e,r,n,i,a){let o=Math.PI/2*3,s=Math.PI/n;t.beginPath(),t.moveTo(e,r-i);for(let l=0;l<n;l++)t.lineTo(e+Math.cos(o)*i,r+Math.sin(o)*i),o+=s,t.lineTo(e+Math.cos(o)*a,r+Math.sin(o)*a),o+=s;t.lineTo(e,r-i),t.closePath();}function A5t(t,e,r,n){t.save(),t.fillStyle="rgba(255, 255, 255, 0.8)";let i=4;t.font="10px system-ui, sans-serif";let a=t.measureText(e).width;t.fillRect(r-a-i*2-4,n-16,a+i*2,14),t.fillStyle="#374151",t.textAlign="right",t.fillText(e,r-i-4,n-5),t.restore();}function txe({layer:t,basePath:e,viewport:r,blockTime:n}){let{content:i,position:a,animation:o}=t,s=`map-clip-${tl().replace(/:/g,"")}-${t.id}`,[l,u]=Rr(null),[d,h]=Rr(true),[f,p]=Rr(null),[m,g]=Rr(false),y=qr(a.x,r.width),b=qr(a.y,r.height),v=a.width?qr(a.width,r.width):r.width,x=a.height?qr(a.height,r.height):r.height,C=Gl(a.anchor,v,x),T=y+C.x,k=b+C.y,S=to(i.staticSrc??"",e),E=Cy();kr(()=>{let R=false;if(i.staticSrc){u(S||null),h(false);return}return h(true),p(null),g(false),exe({center:i.center,zoom:i.zoom,style:i.style,width:v,height:x,markers:i.markers,showAttribution:i.showAttribution!==false,policy:E}).then(P=>{R||(u(P),h(false));}).catch(P=>{if(!R){let L=P instanceof ch;L||console.error("Failed to compose map:",P),p(P instanceof Error?P.message:String(P)),g(L),h(false);}}),()=>{R=true;}},[i.center,i.zoom,i.style,i.staticSrc,S,i.markers,i.showAttribution,v,x,e,E]);let A=Ha(o,n);return d?te("g",{className:`block-layer block-layer--map ${A.className}`,style:A.style,"data-layer-id":t.id,children:[te("rect",{x:T,y:k,width:v,height:x,fill:"#e5e7eb"}),te("text",{x:T+v/2,y:k+x/2,textAnchor:"middle",dominantBaseline:"middle",fill:"#9ca3af",fontSize:"24",fontFamily:"system-ui, sans-serif",children:"Loading map..."})]}):f||!l?te("g",{className:`block-layer block-layer--map ${A.className}`,style:A.style,"data-layer-id":t.id,children:[te("rect",{x:T,y:k,width:v,height:x,fill:m?"#f3f4f6":"#fef2f2"}),te("text",{x:T+v/2,y:k+x/2,textAnchor:"middle",dominantBaseline:"middle",fill:m?"#6b7280":"#dc2626",fontSize:"18",fontFamily:"system-ui, sans-serif",children:m?"Map unavailable offline":"Map failed to load"})]}):te("g",{className:`block-layer block-layer--map ${A.className}`,style:A.style,"data-layer-id":t.id,children:[te("defs",{children:te("clipPath",{id:s,children:te("rect",{x:T,y:k,width:v,height:x})})}),te("g",{clipPath:`url(#${s})`,children:te("image",{href:l,x:T,y:k,width:v,height:x,preserveAspectRatio:"xMidYMid slice",style:{pointerEvents:"none"}})})]})}var _5t=.2;function rxe({layer:t,basePath:e,viewport:r,blockTime:n,isPlaying:i,muted:a=false}){let{content:o,position:s}=t,l=xr(null),u=xr(false),d=o.startAt??0,h=n<d,f=qr(s.x,r.width),p=qr(s.y,r.height),m=s.width?qr(s.width,r.width):r.width,g=s.height?qr(s.height,r.height):r.height,y=Gl(s.anchor,m,g),b=f+y.x,v=p+y.y,x=to(o.src,e),C=to(o.posterSrc||"",e),T=o.posterSrc?C:void 0;return kr(()=>{let k=l.current;if(!k)return;if(k.currentTime=o.clipStart,u.current=true,i){let E=k.play();E&&E.catch(()=>{});}let S=()=>{k.currentTime>=o.clipEnd&&(k.pause(),k.currentTime=o.clipEnd);};return k.addEventListener("timeupdate",S),()=>{k.removeEventListener("timeupdate",S),k.pause();}},[x,o.clipStart,o.clipEnd]),kr(()=>{let k=l.current;if(!k||!u.current)return;let S=h?o.clipStart:Math.min(o.clipEnd,o.clipStart+Math.max(0,n-d));if(k.dataset.captureSequential!=="true"&&Math.abs(k.currentTime-S)>_5t&&(k.currentTime=S),h){k.pause();return}if(S>=o.clipEnd){k.pause();return}if(i){let E=k.play();E&&E.catch(()=>{});}else k.dataset.captureSequential!=="true"&&k.pause();},[i,h,n,d,x,o.clipStart,o.clipEnd]),te("g",{className:"block-layer block-layer--video","data-layer-id":t.id,children:te("foreignObject",{x:b,y:v,width:m,height:g,children:te("video",{ref:l,src:x,poster:T,muted:a,playsInline:true,preload:"auto","data-clip-start":o.clipStart,"data-clip-end":o.clipEnd,"data-start-at":d,style:{width:`${m}px`,height:`${g}px`,objectFit:o.fit||"cover",objectPosition:"center",display:"block",pointerEvents:"none"}})})})}function nxe({layer:t,viewport:e,blockTime:r}){let{content:n,position:i,animation:a}=t,{headers:o,rows:s,align:l,style:u}=n,d=qr(i.x,e.width),h=qr(i.y,e.height),f=i.width?qr(i.width,e.width):e.width,p=i.height?qr(i.height,e.height):e.height,m=Gl(i.anchor,f,p),g=d+m.x,y=h+m.y,b=Ha(a,r),v=C=>{let T=l?.[C];return T?{textAlign:T}:void 0},x=u.borderRadius??8;return te("g",{className:`block-layer block-layer--table ${b.className}`,style:b.style,"data-layer-id":t.id,children:te("foreignObject",{x:g,y,width:f,height:p,children:te("div",{xmlns:"http://www.w3.org/1999/xhtml",style:{width:`${f}px`,height:`${p}px`,display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",boxSizing:"border-box"},children:te("table",{style:{width:"100%",borderCollapse:"separate",borderSpacing:0,fontSize:`${u.fontSize}px`,fontFamily:u.fontFamily??"system-ui, sans-serif",overflow:"hidden",borderRadius:`${x}px`,border:`1px solid ${u.borderColor}`},children:[o.length>0&&te("thead",{children:te("tr",{children:o.map((C,T)=>te("th",{style:{background:u.headerBackground,color:u.headerColor,fontFamily:u.headerFontFamily??u.fontFamily??"system-ui, sans-serif",fontWeight:600,padding:"12px 16px",borderBottom:`2px solid ${u.borderColor}`,borderRight:T<o.length-1?`1px solid ${u.borderColor}`:void 0,...v(T)},children:C},T))})}),s.length>0&&te("tbody",{children:s.map((C,T)=>te("tr",{children:C.map((k,S)=>te("td",{style:{background:u.cellBackground,color:u.cellColor,padding:"10px 16px",borderBottom:T<s.length-1?`1px solid ${u.borderColor}`:void 0,borderRight:S<C.length-1?`1px solid ${u.borderColor}`:void 0,...v(S)},children:k},S))},T))})]})})})})}function ixe(t,e){let r=t&&t.trim()?t.trim():e,n=r.indexOf(":");return n>0?`fa-${r.slice(0,n).replace(/^fa-/,"")} fa-${r.slice(n+1)}`:`fa-solid fa-${r}`}function axe({layer:t,viewport:e,blockTime:r}){let{content:n,position:i,animation:a}=t,{items:o,style:s}=n,l=qr(i.x,e.width),u=qr(i.y,e.height),d=i.width?qr(i.width,e.width):e.width,h=i.height?qr(i.height,e.height):e.height,f=Gl(i.anchor,d,h),p=Ha(a,r);return te("g",{className:`block-layer block-layer--tree ${p.className}`,style:p.style,"data-layer-id":t.id,children:te("foreignObject",{x:l+f.x,y:u+f.y,width:d,height:h,children:te("div",{xmlns:"http://www.w3.org/1999/xhtml",className:"squisq-treelayer",style:{width:`${d}px`,height:`${h}px`,display:"flex",flexDirection:"column",justifyContent:"center",padding:"24px 32px",boxSizing:"border-box",fontFamily:s.fontFamily??"system-ui, sans-serif",fontSize:`${s.fontSize}px`,lineHeight:1.7,overflow:"hidden"},children:te(oxe,{items:o,depth:0,style:s})})})})}function oxe({items:t,depth:e,style:r}){return te("ul",{style:{listStyle:"none",margin:0,padding:0,paddingLeft:e===0?0:`${r.indentPx}px`,borderLeft:e===0?"none":`1px solid ${r.connectorColor}`},children:t.map(n=>te(R5t,{item:n,style:r},n.id))})}function R5t({item:t,style:e}){let r=t.children.length>0,[n,i]=Rr(false),a=t.isDir||r,o=a?ixe(e.folderIcon,n?"folder":"folder-open"):ixe(e.fileIcon,"file");return te("li",{style:{position:"relative"},children:[te("div",{style:{display:"flex",alignItems:"baseline",gap:"8px",padding:"1px 0"},children:[r?te("button",{type:"button","aria-label":n?"Expand":"Collapse",onClick:()=>i(s=>!s),style:{flex:"0 0 auto",width:"1em",border:"none",background:"transparent",cursor:"pointer",color:e.connectorColor,padding:0,fontSize:"0.8em"},children:te("i",{className:`fa-solid ${n?"fa-chevron-right":"fa-chevron-down"}`,"aria-hidden":"true"})}):te("span",{style:{flex:"0 0 auto",width:"1em"}}),te("i",{className:o,"aria-hidden":"true",style:{flex:"0 0 auto",color:e.iconColor,width:"1.2em",textAlign:"center"}}),te("span",{style:{color:a?e.dirColor:e.rowColor,fontWeight:a?600:400},children:t.label}),t.comment?te("span",{style:{color:e.commentColor,fontSize:"0.85em",fontStyle:"italic"},children:t.comment}):null]}),r&&!n?te(oxe,{items:t.children,depth:1,style:e}):null]})}var oq=null,w2r={startOnLoad:false,securityLevel:"strict",suppressErrorRendering:true,deterministicIds:false,logLevel:"error"};async function k2r(){return oq||(oq=Promise.resolve().then(()=>(qlt(),$lt)).then(({default:t})=>t).catch(t=>{throw oq=null,t})),oq}function T2r(t){let e=globalThis,n=(e.__squisqMermaidWorkQueue??Promise.resolve()).then(t,t);return e.__squisqMermaidWorkQueue=n.then(()=>{},()=>{}),n}function zlt(t,e,r,n=ua){return T2r(async()=>{let i=await k2r();i.initialize({...w2r,theme:"base",themeVariables:ez(n)});let{svg:a,diagramType:o}=await i.render(t,e,r);return {svg:a,diagramType:o}})}function Hlt(t){return (t instanceof Error?t.message:String(t)).split(/\r?\n/).map(r=>r.trimEnd()).filter(Boolean).slice(0,6).join(`
|
|
4144
|
+
`);vm(()=>{if(!E){_(null);return}let O=P.current;if(!O||typeof O.getBBox!="function")return;let $=()=>{try{let H=O.getBBox();if(H.width<=0||H.height<=0)return;let q=h??e.width,z=f??e.height,G=Math.min(1,q/H.width,z/H.height);_(G<.995?{scale:G,cx:H.x+H.width/2,cy:H.y+H.height/2}:null);}catch{}};$();let F=O.ownerDocument?.fonts;if(F&&F.status!=="loaded"){let H=false;return F.ready.then(()=>{H||$();}),()=>{H=true;}}},[E,D,h,f,e.width,e.height,l.fontSize,l.fontFamily,l.fontWeight]);let I=L?`translate(${L.cx} ${L.cy}) scale(${L.scale}) translate(${-L.cx} ${-L.cy})`:void 0,N={fontSize:`${l.fontSize}px`,fontFamily:l.fontFamily||t5,fontWeight:l.fontWeight||"normal",fontStyle:l.fontStyle||"normal",fill:l.color,...x.style},B=l.shadow?`shadow-${n}`:void 0;return te("g",{className:`block-layer block-layer--text ${x.className}`,"data-layer-id":t.id,children:[l.shadow&&te("defs",{children:te("filter",{id:B,x:"-20%",y:"-20%",width:"140%",height:"140%",children:te("feDropShadow",{dx:"0",dy:"2",stdDeviation:"3",floodColor:"rgba(0,0,0,0.7)"})})}),te(f5t,{layerId:n,style:l,box:h!=null&&f!=null?{x:u-Xm(y,h,"x"),y:d-Xm(y,f,"y"),width:h,height:f}:{x:b-(l.padding||16),y:v-l.fontSize-(l.padding||16),width:b5t(T,l)+(l.padding||16)*2,height:T.length*S+(l.padding||16)*2}}),te("text",{ref:P,x:b,y:v,textAnchor:m,dominantBaseline:g,style:N,filter:B?`url(#${B})`:void 0,transform:I,children:T.map((O,$)=>te("tspan",{x:b,dy:$===0?R:S,children:[O||"\xA0"," "]},$))})]})}function d5t({layer:t,viewport:e,blockTime:r}){let{content:n,position:i,animation:a}=t,{html:o,style:s}=n,l=qr(i.x,e.width),u=qr(i.y,e.height),d=i.width!=null?qr(i.width,e.width):e.width,h=i.height!=null?qr(i.height,e.height):s.fontSize*(s.lineHeight||1.4)*2,f=i.anchor??"top-left",p=l-Xm(f,d,"x"),m=u-Xm(f,h,"y"),g=cr(()=>Nz(qv(ly(o??""))),[o]),y=Ha(a,r),b=s.verticalAlign==="middle"?"center":s.verticalAlign==="bottom"?"flex-end":"flex-start",v=!!(s.borderColor&&(s.borderWidth??0)>0),x={boxSizing:"border-box",width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:b,padding:s.padding??0,color:s.color,fontSize:`${s.fontSize}px`,fontFamily:s.fontFamily||t5,fontWeight:s.fontWeight||"normal",fontStyle:s.fontStyle||"normal",lineHeight:s.lineHeight||1.4,textAlign:s.textAlign??"left",overflow:"hidden",...s.background?{background:s.background}:{},...v?{border:`${s.borderWidth}px ${s.borderStyle??"solid"} ${s.borderColor}`,borderRadius:4}:{},...s.shadow?{textShadow:"0 2px 3px rgba(0,0,0,0.7)"}:{},...y.style},C=`squisq-rich-text-${h5t(t.id)}`,T=s.textAlign==="center"||s.textAlign==="right"?"inside":"outside",k=`.${C}{margin:0}.${C} p{margin:0 0 .4em}.${C} h1,.${C} h2,.${C} h3,.${C} h4,.${C} h5,.${C} h6{margin:0 0 .3em;line-height:1.2}.${C} ul,.${C} ol{margin:0 0 .7em;padding-left:1.2em;list-style-position:${T}}.${C} li{margin:0}.${C} li>p{display:inline;margin:0}.${C} table{width:100%;margin:.65em 0;border-collapse:collapse;border-spacing:0;table-layout:fixed}.${C} th,.${C} td{box-sizing:border-box;padding:.38em .55em;border:1px solid rgba(127,127,127,.55);border-color:color-mix(in srgb,currentColor 32%,transparent);vertical-align:top;white-space:normal;overflow-wrap:anywhere}.${C} th{background:rgba(127,127,127,.16);background:color-mix(in srgb,currentColor 12%,transparent);font-weight:600}.${C} tbody tr:nth-child(even){background:rgba(127,127,127,.07);background:color-mix(in srgb,currentColor 5%,transparent)}.${C} *:first-child{margin-top:0}.${C} *:last-child{margin-bottom:0}.${C} a{color:inherit;text-decoration:underline}`;return te("g",{className:`block-layer block-layer--text ${y.className}`,"data-layer-id":t.id,children:te("foreignObject",{x:p,y:m,width:d,height:h,color:s.color,style:{color:s.color},children:te("div",{xmlns:"http://www.w3.org/1999/xhtml",style:x,children:[te("style",{children:k}),te("div",{className:C,"aria-label":n.text,style:{width:"100%",color:s.color,whiteSpace:"pre-wrap",wordBreak:"break-word"},dangerouslySetInnerHTML:{__html:g}})]})})})}function h5t(t){return t.replace(/[^a-zA-Z0-9_-]/g,"-")}function f5t({layerId:t,style:e,box:r}){let n=!!(e.background||e.backgroundGradient),i=!!(e.borderColor&&(e.borderWidth??0)>0);if(!n&&!i)return null;let{fill:a,def:o}=_x(t,e.background,e.backgroundGradient),s=Ax(e.borderStyle,e.borderWidth);return te(Nn,{children:[o&&te("defs",{children:o}),te("rect",{x:r.x,y:r.y,width:r.width,height:r.height,fill:n?a:"none",fillOpacity:n?e.backgroundOpacity:void 0,stroke:i?e.borderColor:void 0,strokeWidth:i?e.borderWidth:void 0,strokeDasharray:i?s:void 0,rx:4,ry:4})]})}function p5t(t,e){return t==="center"?"middle":t==="right"?"end":t==="left"?"start":e?.includes("right")?"end":e==="center"?"middle":"start"}function m5t(t,e){return t==="top"?"text-before-edge":t==="middle"?"middle":t==="bottom"||e?.includes("bottom")?"text-after-edge":e==="center"?"middle":"text-before-edge"}function g5t(t,e,r,n){if(e==null)return t;let i=t-Xm(r,e,"x");return n==="middle"?i+e/2:n==="end"?i+e:i}function y5t(t,e,r,n){if(e==null)return t;let i=t-Xm(r,e,"y");return n==="middle"?i+e/2:n==="text-after-edge"?i+e:i}function Xm(t,e,r){return t==="center"?e/2:r==="x"?t.includes("right")?e:0:t.includes("bottom")?e:0}function b5t(t,e){return Math.max(...t.map(n=>n.length))*e.fontSize*.55}function jve(t,e,r){if(!t.trim())return [""];let n=e*.5,i=Math.floor(r/n);if(i<=0)return [t];let a=t.split(/\s+/),o=[],s="";for(let l of a){let u=s?`${s} ${l}`:l;if(u.length<=i)s=u;else if(s&&o.push(s),l.length>i){let d=l;for(;d.length>i;)o.push(d.slice(0,i)),d=d.slice(i);s=d;}else s=l;}return s&&o.push(s),o.length>0?o:[""]}var v5t=1;function Xve({layer:t,viewport:e,blockTime:r}){let{content:n,position:i,animation:a}=t,o=`${tl().replace(/:/g,"")}-${t.id}`,s=qr(i.x,e.width),l=qr(i.y,e.height),u=i.width?qr(i.width,e.width):100,d=i.height?qr(i.height,e.height):100,h=Gl(i.anchor,u,d),f=s+h.x,p=l+h.y,g=n.shape==="rect"&&f===0&&p===0&&u===e.width&&d===e.height&&!n.stroke&&!n.borderRadius?v5t:0,y=f-g,b=p-g,v=u+g*2,x=d+g*2,C=Ha(a,r),T=n.fill||"none",k=typeof T=="string"&&T.includes("gradient(");if(n.shape==="rect"&&k&&!n.gradient)return te("g",{className:`block-layer block-layer--shape ${C.className}`,style:C.style,"data-layer-id":t.id,children:te("foreignObject",{x:y,y:b,width:v,height:x,children:te("div",{style:{width:`${v}px`,height:`${x}px`,background:T,borderRadius:n.borderRadius?`${n.borderRadius}px`:void 0,pointerEvents:"none"}})})});let{fill:S,def:E}=_x(o,T,n.gradient,n.pattern),{filterAttr:A,def:R}=Vve(o,n.filter),P=Ax(n.borderStyle,n.strokeWidth),L={fill:S,fillOpacity:n.fillOpacity,stroke:n.stroke,strokeWidth:n.strokeWidth,strokeDasharray:P,...A?{filter:A}:{}};return te("g",{className:`block-layer block-layer--shape ${C.className}`,style:C.style,"data-layer-id":t.id,children:[(E||R)&&te("defs",{children:[E,R]}),n.shape==="rect"&&te("rect",{x:y,y:b,width:v,height:x,rx:n.borderRadius,ry:n.borderRadius,...L}),n.shape==="circle"&&te("circle",{cx:f+u/2,cy:p+d/2,r:Math.min(u,d)/2,...L}),n.shape==="line"&&te("line",{x1:f,y1:p,x2:f+u,y2:p+d,stroke:n.stroke||"#ffffff",strokeWidth:n.strokeWidth||2,strokeDasharray:P})]})}function x5t(t,e){let{content:r,position:n}=t;if(!r.shapeKind)return r.d;let i=n.width?qr(n.width,e.width):0,a=n.height?qr(n.height,e.height):0,o=qr(n.x,e.width),s=qr(n.y,e.height),l=Gl(n.anchor,i,a);return fx(r.shapeKind,o+l.x,s+l.y,i,a)??r.d}function w5t(t){return t.arrow}function Kve(t,e,r){return t||(e==="both"||e===r?"arrow":"none")}function Zve({layer:t,viewport:e,blockTime:r}){let{content:n,animation:i,id:a}=t,o=`${tl().replace(/:/g,"")}-${a}`,s=x5t(t,e),l=n.stroke??"#1e293b",u=n.strokeWidth??2,{fill:d,def:h}=_x(o,n.fill??"none",n.gradient),f=n.borderStyle?Ax(n.borderStyle,u):n.dasharray,p=Ha(i,r),m=`marker-start-${o}`,g=`marker-end-${o}`,y=w5t(n),b=JI(Kve(n.startMarker,y,"start"),"start"),v=JI(Kve(n.endMarker,y,"end"),"end");return te("g",{className:`block-layer block-layer--path ${p.className}`,style:p.style,"data-layer-id":a,children:[te("defs",{children:[h,v&&te(Qve,{id:g,dir:"end",d:v.d,filled:v.filled,stroke:l}),b&&te(Qve,{id:m,dir:"start",d:b.d,filled:b.filled,stroke:l})]}),te("path",{d:s,stroke:l,strokeWidth:u,fill:d,fillOpacity:n.fillOpacity,strokeDasharray:f,markerStart:b?`url(#${m})`:void 0,markerEnd:v?`url(#${g})`:void 0})]})}function Qve({id:t,dir:e,d:r,filled:n,stroke:i}){return te("marker",{id:t,viewBox:"0 0 10 10",refX:e==="end"?9:1,refY:5,markerWidth:4,markerHeight:4,orient:"auto-start-reverse",markerUnits:"strokeWidth",children:te("path",{d:r,fill:n?i:"none",stroke:n?"none":i,strokeWidth:n?void 0:1.5})})}var k5t={terrain:{url:"https://tile.opentopomap.org/{z}/{x}/{y}.png",attribution:"Map: OpenTopoMap (CC-BY-SA)",maxZoom:17},road:{url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:"\xA9 OpenStreetMap contributors",maxZoom:19},satellite:{url:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",attribution:"Imagery: Esri, Maxar, Earthstar",maxZoom:18},toner:{url:"https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png",attribution:"Map: Stadia Maps, Stamen Design",maxZoom:20},watercolor:{url:"https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg",attribution:"Map: Stadia Maps, Stamen Design",maxZoom:16}};function zW(t,e,r){let n=Math.pow(2,r),i=Math.floor((e+180)/360*n),a=t*Math.PI/180,o=Math.floor((1-Math.log(Math.tan(a)+1/Math.cos(a))/Math.PI)/2*n);return {x:i,y:o}}function HW(t,e,r,n=256){let i=Math.pow(2,r),a=(e+180)/360*i,o=t*Math.PI/180,s=(1-Math.log(Math.tan(o)+1/Math.cos(o))/Math.PI)/2*i;return {x:(a-Math.floor(a))*n,y:(s-Math.floor(s))*n}}function T5t(t,e,r,n,i,a=256){let o=zW(t,e,r),s=HW(t,e,r,a),l=Math.ceil(n/a)+1,u=Math.ceil(i/a)+1,d=o.x-Math.floor(l/2),h=o.y-Math.floor(u/2),f=n/2-s.x,p=i/2-s.y,m=[];for(let g=0;g<u;g++)for(let y=0;y<l;y++){let b=d+y,v=h+g,x=f+(b-o.x)*a,C=p+(v-o.y)*a;m.push({x:b,y:v,screenX:x,screenY:C});}return m}function Jve(t,e,r,n){return t.url.replace("{z}",String(n)).replace("{x}",String(e)).replace("{y}",String(r))}async function C5t(t){return new Promise((e,r)=>{let n=new Image;n.crossOrigin="anonymous",n.onload=()=>e(n),n.onerror=()=>r(new Error(`Failed to load tile: ${t}`)),n.src=t;})}async function exe(t){let{center:e,zoom:r,style:n,width:i,height:a,markers:o=[],showAttribution:s=true}=t,l=k5t[n],u=l.tileSize||256,d=Math.min(r,l.maxZoom),h=Jve(l,0,0,d);if(!fu(h,t.policy))throw new ch("RESOURCE_BLOCKED",`Map tiles for style "${n}" are blocked by the resource policy (${l.url}). Composing a map contacts the tile host; supply the map as \`staticSrc\` to render it without any remote request.`);let f=document.createElement("canvas");f.width=i,f.height=a;let p=f.getContext("2d");if(!p)throw new Error("Failed to get canvas context");p.fillStyle=n==="toner"?"#ffffff":"#e5e7eb",p.fillRect(0,0,i,a);let g=T5t(e.lat,e.lng,d,i,a,u).map(async y=>{let b=Jve(l,y.x,y.y,d);try{let v=await C5t(b);p.drawImage(v,y.screenX,y.screenY,u,u);}catch(v){console.warn(`Tile load failed: ${b}`,v);}});await Promise.all(g);for(let y of o)S5t(p,y,e,d,i,a,u);return s&&A5t(p,l.attribution,i,a),f.toDataURL("image/png")}function S5t(t,e,r,n,i,a,o){let s=zW(r.lat,r.lng,n),l=zW(e.lat,e.lng,n),u=HW(r.lat,r.lng,n,o),d=HW(e.lat,e.lng,n,o),h=(l.x-s.x)*o+(d.x-u.x),f=(l.y-s.y)*o+(d.y-u.y),p=i/2+h,m=a/2+f,g=e.color||"#ef4444",y=e.icon||"pin";t.save(),y==="pin"?(t.fillStyle=g,t.beginPath(),t.arc(p,m-12,8,Math.PI,0,false),t.lineTo(p,m),t.closePath(),t.fill(),t.fillStyle="#ffffff",t.beginPath(),t.arc(p,m-12,3,0,Math.PI*2),t.fill()):y==="circle"?(t.fillStyle=g,t.beginPath(),t.arc(p,m,8,0,Math.PI*2),t.fill(),t.strokeStyle="#ffffff",t.lineWidth=2,t.stroke()):y==="star"&&(t.fillStyle=g,E5t(t,p,m,5,10,5),t.fill()),e.label&&(t.fillStyle="#1f2937",t.font="bold 12px system-ui, sans-serif",t.textAlign="center",t.fillText(e.label,p,m+20)),t.restore();}function E5t(t,e,r,n,i,a){let o=Math.PI/2*3,s=Math.PI/n;t.beginPath(),t.moveTo(e,r-i);for(let l=0;l<n;l++)t.lineTo(e+Math.cos(o)*i,r+Math.sin(o)*i),o+=s,t.lineTo(e+Math.cos(o)*a,r+Math.sin(o)*a),o+=s;t.lineTo(e,r-i),t.closePath();}function A5t(t,e,r,n){t.save(),t.fillStyle="rgba(255, 255, 255, 0.8)";let i=4;t.font="10px system-ui, sans-serif";let a=t.measureText(e).width;t.fillRect(r-a-i*2-4,n-16,a+i*2,14),t.fillStyle="#374151",t.textAlign="right",t.fillText(e,r-i-4,n-5),t.restore();}function txe({layer:t,basePath:e,viewport:r,blockTime:n}){let{content:i,position:a,animation:o}=t,s=`map-clip-${tl().replace(/:/g,"")}-${t.id}`,[l,u]=Rr(null),[d,h]=Rr(true),[f,p]=Rr(null),[m,g]=Rr(false),y=qr(a.x,r.width),b=qr(a.y,r.height),v=a.width?qr(a.width,r.width):r.width,x=a.height?qr(a.height,r.height):r.height,C=Gl(a.anchor,v,x),T=y+C.x,k=b+C.y,S=to(i.staticSrc??"",e),E=Cy();kr(()=>{let R=false;if(i.staticSrc){u(S||null),h(false);return}return h(true),p(null),g(false),exe({center:i.center,zoom:i.zoom,style:i.style,width:v,height:x,markers:i.markers,showAttribution:i.showAttribution!==false,policy:E}).then(P=>{R||(u(P),h(false));}).catch(P=>{if(!R){let L=P instanceof ch;L||console.error("Failed to compose map:",P),p(P instanceof Error?P.message:String(P)),g(L),h(false);}}),()=>{R=true;}},[i.center,i.zoom,i.style,i.staticSrc,S,i.markers,i.showAttribution,v,x,e,E]);let A=Ha(o,n);return d?te("g",{className:`block-layer block-layer--map ${A.className}`,style:A.style,"data-layer-id":t.id,children:[te("rect",{x:T,y:k,width:v,height:x,fill:"#e5e7eb"}),te("text",{x:T+v/2,y:k+x/2,textAnchor:"middle",dominantBaseline:"middle",fill:"#9ca3af",fontSize:"24",fontFamily:"system-ui, sans-serif",children:"Loading map..."})]}):f||!l?te("g",{className:`block-layer block-layer--map ${A.className}`,style:A.style,"data-layer-id":t.id,children:[te("rect",{x:T,y:k,width:v,height:x,fill:m?"#f3f4f6":"#fef2f2"}),te("text",{x:T+v/2,y:k+x/2,textAnchor:"middle",dominantBaseline:"middle",fill:m?"#6b7280":"#dc2626",fontSize:"18",fontFamily:"system-ui, sans-serif",children:m?"Map unavailable offline":"Map failed to load"})]}):te("g",{className:`block-layer block-layer--map ${A.className}`,style:A.style,"data-layer-id":t.id,children:[te("defs",{children:te("clipPath",{id:s,children:te("rect",{x:T,y:k,width:v,height:x})})}),te("g",{clipPath:`url(#${s})`,children:te("image",{href:l,x:T,y:k,width:v,height:x,preserveAspectRatio:"xMidYMid slice",style:{pointerEvents:"none"}})})]})}var _5t=.2;function rxe({layer:t,basePath:e,viewport:r,blockTime:n,isPlaying:i,muted:a=false}){let{content:o,position:s}=t,l=xr(null),u=xr(false),d=o.startAt??0,h=n<d,f=qr(s.x,r.width),p=qr(s.y,r.height),m=s.width?qr(s.width,r.width):r.width,g=s.height?qr(s.height,r.height):r.height,y=Gl(s.anchor,m,g),b=f+y.x,v=p+y.y,x=to(o.src,e),C=to(o.posterSrc||"",e),T=o.posterSrc?C:void 0;return kr(()=>{let k=l.current;if(!k)return;if(k.currentTime=o.clipStart,u.current=true,i){let E=k.play();E&&E.catch(()=>{});}let S=()=>{k.currentTime>=o.clipEnd&&(k.pause(),k.currentTime=o.clipEnd);};return k.addEventListener("timeupdate",S),()=>{k.removeEventListener("timeupdate",S),k.pause();}},[x,o.clipStart,o.clipEnd]),kr(()=>{let k=l.current;if(!k||!u.current)return;let S=h?o.clipStart:Math.min(o.clipEnd,o.clipStart+Math.max(0,n-d));if(k.dataset.captureSequential!=="true"&&Math.abs(k.currentTime-S)>_5t&&(k.currentTime=S),h){k.pause();return}if(S>=o.clipEnd){k.pause();return}if(i){let E=k.play();E&&E.catch(()=>{});}else k.dataset.captureSequential!=="true"&&k.pause();},[i,h,n,d,x,o.clipStart,o.clipEnd]),te("g",{className:"block-layer block-layer--video","data-layer-id":t.id,children:te("foreignObject",{x:b,y:v,width:m,height:g,children:te("video",{ref:l,src:x,poster:T,muted:a,playsInline:true,preload:"auto","data-clip-start":o.clipStart,"data-clip-end":o.clipEnd,"data-start-at":d,style:{width:`${m}px`,height:`${g}px`,objectFit:o.fit||"cover",objectPosition:"center",display:"block",pointerEvents:"none"}})})})}function nxe({layer:t,viewport:e,blockTime:r}){let{content:n,position:i,animation:a}=t,{headers:o,rows:s,align:l,style:u}=n,d=qr(i.x,e.width),h=qr(i.y,e.height),f=i.width?qr(i.width,e.width):e.width,p=i.height?qr(i.height,e.height):e.height,m=Gl(i.anchor,f,p),g=d+m.x,y=h+m.y,b=Ha(a,r),v=C=>{let T=l?.[C];return T?{textAlign:T}:void 0},x=u.borderRadius??8;return te("g",{className:`block-layer block-layer--table ${b.className}`,style:b.style,"data-layer-id":t.id,children:te("foreignObject",{x:g,y,width:f,height:p,children:te("div",{xmlns:"http://www.w3.org/1999/xhtml",style:{width:`${f}px`,height:`${p}px`,display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",boxSizing:"border-box"},children:te("table",{style:{width:"100%",borderCollapse:"separate",borderSpacing:0,fontSize:`${u.fontSize}px`,fontFamily:u.fontFamily??"system-ui, sans-serif",overflow:"hidden",borderRadius:`${x}px`,border:`1px solid ${u.borderColor}`},children:[o.length>0&&te("thead",{children:te("tr",{children:o.map((C,T)=>te("th",{style:{background:u.headerBackground,color:u.headerColor,fontFamily:u.headerFontFamily??u.fontFamily??"system-ui, sans-serif",fontWeight:600,padding:"12px 16px",borderBottom:`2px solid ${u.borderColor}`,borderRight:T<o.length-1?`1px solid ${u.borderColor}`:void 0,...v(T)},children:C},T))})}),s.length>0&&te("tbody",{children:s.map((C,T)=>te("tr",{children:C.map((k,S)=>te("td",{style:{background:u.cellBackground,color:u.cellColor,padding:"10px 16px",borderBottom:T<s.length-1?`1px solid ${u.borderColor}`:void 0,borderRight:S<C.length-1?`1px solid ${u.borderColor}`:void 0,...v(S)},children:k},S))},T))})]})})})})}function ixe(t,e){let r=t&&t.trim()?t.trim():e,n=r.indexOf(":");return n>0?`fa-${r.slice(0,n).replace(/^fa-/,"")} fa-${r.slice(n+1)}`:`fa-solid fa-${r}`}function axe({layer:t,viewport:e,blockTime:r}){let{content:n,position:i,animation:a}=t,{items:o,style:s}=n,l=qr(i.x,e.width),u=qr(i.y,e.height),d=i.width?qr(i.width,e.width):e.width,h=i.height?qr(i.height,e.height):e.height,f=Gl(i.anchor,d,h),p=Ha(a,r);return te("g",{className:`block-layer block-layer--tree ${p.className}`,style:p.style,"data-layer-id":t.id,children:te("foreignObject",{x:l+f.x,y:u+f.y,width:d,height:h,children:te("div",{xmlns:"http://www.w3.org/1999/xhtml",className:"squisq-treelayer",style:{width:`${d}px`,height:`${h}px`,display:"flex",flexDirection:"column",justifyContent:"center",padding:"24px 32px",boxSizing:"border-box",fontFamily:s.fontFamily??"system-ui, sans-serif",fontSize:`${s.fontSize}px`,lineHeight:1.7,overflow:"hidden"},children:te(oxe,{items:o,depth:0,style:s})})})})}function oxe({items:t,depth:e,style:r}){return te("ul",{style:{listStyle:"none",margin:0,padding:0,paddingLeft:e===0?0:`${r.indentPx}px`,borderLeft:e===0?"none":`1px solid ${r.connectorColor}`},children:t.map(n=>te(R5t,{item:n,style:r},n.id))})}function R5t({item:t,style:e}){let r=t.children.length>0,[n,i]=Rr(false),a=t.isDir||r,o=a?ixe(e.folderIcon,n?"folder":"folder-open"):ixe(e.fileIcon,"file");return te("li",{style:{position:"relative"},children:[te("div",{style:{display:"flex",alignItems:"baseline",gap:"8px",padding:"1px 0"},children:[r?te("button",{type:"button","aria-label":n?"Expand":"Collapse",onClick:()=>i(s=>!s),style:{flex:"0 0 auto",width:"1em",border:"none",background:"transparent",cursor:"pointer",color:e.connectorColor,padding:0,fontSize:"0.8em"},children:te("i",{className:`fa-solid ${n?"fa-chevron-right":"fa-chevron-down"}`,"aria-hidden":"true"})}):te("span",{style:{flex:"0 0 auto",width:"1em"}}),te("i",{className:o,"aria-hidden":"true",style:{flex:"0 0 auto",color:e.iconColor,width:"1.2em",textAlign:"center"}}),te("span",{style:{color:a?e.dirColor:e.rowColor,fontWeight:a?600:400},children:t.label}),t.comment?te("span",{style:{color:e.commentColor,fontSize:"0.85em",fontStyle:"italic"},children:t.comment}):null]}),r&&!n?te(oxe,{items:t.children,depth:1,style:e}):null]})}var oq=null,w2r={startOnLoad:false,securityLevel:"strict",suppressErrorRendering:true,deterministicIds:false,logLevel:"error"};async function k2r(){return oq||(oq=Promise.resolve().then(()=>(qlt(),$lt)).then(({default:t})=>t).catch(t=>{throw oq=null,t})),oq}function T2r(t){let e=globalThis,n=(e.__squisqMermaidWorkQueue??Promise.resolve()).then(t,t);return e.__squisqMermaidWorkQueue=n.then(()=>{},()=>{}),n}function zlt(t,e,r,n=ua){return T2r(async()=>{let i=await k2r();i.initialize({...w2r,theme:"base",themeVariables:ez(n)});let{svg:a,diagramType:o}=await i.render(t,e,r);return {svg:a,diagramType:o}})}function Hlt(t){return (t instanceof Error?t.message:String(t)).split(/\r?\n/).map(r=>r.trimEnd()).filter(Boolean).slice(0,6).join(`
|
|
4145
4145
|
`)||"Unknown Mermaid rendering error."}var C2r=0;function sq({source:t,className:e,ariaLabel:r="Mermaid diagram",theme:n=ua}){let[i,a]=Rr(""),[o,s]=Rr(""),[l,u]=Rr(true);kr(()=>{let h=true,f=`squisq-rich-mermaid-${++C2r}`;return u(true),s(""),zlt(f,t,void 0,n).then(p=>{h&&a(p.svg);}).catch(p=>{h&&(a(""),s(Hlt(p)));}).finally(()=>{h&&u(false);}),()=>{h=false;}},[t,n]);let d=["squisq-mermaid-rendered",e].filter(Boolean).join(" ");return te("div",{className:d,role:"img","aria-label":r,style:{background:n.colors.backgroundLight,color:n.colors.text},children:[l&&te("div",{className:"squisq-mermaid-render-status",children:"Rendering diagram\u2026"}),!l&&o&&te("div",{className:"squisq-mermaid-render-error",role:"alert",children:[te("strong",{children:"Mermaid could not render this diagram."}),te("pre",{children:o})]}),!l&&!o&&i&&te("div",{className:"squisq-mermaid-render-svg",dangerouslySetInnerHTML:{__html:i}})]})}function Ult({layer:t,viewport:e,blockTime:r,theme:n}){let{position:i,content:a,animation:o}=t,s=qr(i.width??e.width,e.width),l=qr(i.height??e.height,e.height),u=qr(i.x,e.width),d=qr(i.y,e.height),h=i.anchor??"top-left";h==="center"?(u-=s/2,d-=l/2):(h.endsWith("right")&&(u-=s),h.startsWith("bottom")&&(d-=l));let f=Ha(o,r),p={boxSizing:"border-box",width:"100%",height:"100%",padding:a.padding??16,borderRadius:16,background:a.background,color:a.foreground,overflow:"hidden"};return te("g",{className:`block-layer block-layer--mermaid ${f.className}`,"data-layer-id":t.id,style:f.style,children:te("foreignObject",{x:u,y:d,width:s,height:l,children:te("div",{xmlns:"http://www.w3.org/1999/xhtml",className:"squisq-mermaid-layer-frame",style:p,children:te(sq,{source:a.source,ariaLabel:"Mermaid diagram on slide",theme:n})})})})}var S2r={width:1920,height:1080};function Bl({block:t,blockTime:e,basePath:r,isEntering:n=false,isExiting:i=false,transition:a,viewport:o=S2r,isPlaying:s,muted:l=false,animationsEnabled:u=true,theme:d}){let h="",f={},p=u?a??t.transition:void 0;p&&n?(h=R4(p.type,true,p.direction),f["--transition-duration"]=`${$v(p)}s`):p&&i&&(h=R4(p.type,false,p.direction),f["--transition-duration"]=`${$v(p)}s`);let g=`vb-clip-${tl().replace(/:/g,"")}-${t.id}`;return te("svg",{className:`block-svg ${h}`,style:f,viewBox:`0 0 ${o.width} ${o.height}`,preserveAspectRatio:"xMidYMid meet",overflow:"hidden","data-block-id":t.id,children:[te("defs",{children:te("clipPath",{id:g,children:te("rect",{x:"0",y:"0",width:o.width,height:o.height})})}),te("g",{clipPath:`url(#${g})`,children:(t.layers??[]).map(y=>te(E2r,{layer:y,basePath:r,viewport:o,blockTime:e,isPlaying:s,muted:l,animationsEnabled:u,theme:d},y.id))})]})}function E2r({layer:t,basePath:e,viewport:r,blockTime:n,isPlaying:i,muted:a,animationsEnabled:o,theme:s}){let l=o||!t.animation?t:{...t,animation:void 0};switch(l.type){case "image":return te(Wve,{layer:l,basePath:e,viewport:r,blockTime:n,animationsEnabled:o});case "text":return te(Yve,{layer:l,viewport:r,blockTime:n});case "shape":return te(Xve,{layer:l,viewport:r,blockTime:n});case "path":return te(Zve,{layer:l,viewport:r,blockTime:n});case "map":return te(txe,{layer:l,basePath:e,viewport:r,blockTime:n});case "video":return te(rxe,{layer:l,basePath:e,viewport:r,blockTime:n,isPlaying:i,muted:a});case "table":return te(nxe,{layer:l,viewport:r,blockTime:n});case "tree":return te(axe,{layer:l,viewport:r,blockTime:n});case "mermaid":return te(Ult,{layer:l,viewport:r,blockTime:n,theme:s});default:return console.warn(`Unknown layer type: ${l.type}`),null}}function Glt(t){switch(t){case "top":return {top:"8%"};case "center":return {top:"50%",transform:"translateY(-50%)"};default:return {bottom:"18%"}}}var A2r=4,Wlt=2,_2r=6;function R2r(t){if(t.words&&t.words.length>0)return t.words.map(i=>({text:i.text,startTime:i.startTime,endTime:i.endTime}));let e=t.text.split(/\s+/).filter(i=>i.length>0);if(e.length===0)return [];let n=(t.endTime-t.startTime)/e.length;return e.map((i,a)=>({text:i,startTime:t.startTime+a*n,endTime:t.startTime+(a+1)*n}))}function L2r(t){let e=[];for(let i of t.phrases)e.push(...R2r(i));if(e.length===0)return {words:[],chunks:[]};let r=A2r;if(e.length>r){let i=Math.ceil(e.length/r);r=Math.ceil(e.length/i),r=Math.min(_2r,Math.max(Wlt,r));}else r=Math.max(Wlt,e.length);let n=[];for(let i=0;i<e.length;i+=r){let a=e.slice(i,i+r);n.push({words:a,startTime:a[0].startTime,endTime:a[a.length-1].endTime});}return {words:e,chunks:n}}function Vlt({captions:t,currentTime:e,enabled:r=true,theme:n,viewport:i,position:a="bottom"}){let{chunks:o}=cr(()=>t?L2r(t):{words:[],chunks:[]},[t]);if(!r||o.length===0)return te("div",{className:"social-caption-overlay",style:{position:"absolute",...Glt(a),left:0,right:0,zIndex:50,pointerEvents:"none",opacity:0,transition:"opacity 0.15s ease-in-out"}});let s=null,l=-1;for(let m of o)if(e>=m.startTime&&e<m.endTime){s=m;break}if(!s){for(let m=0;m<o.length-1;m++)if(e>=o[m].endTime&&e<o[m+1].startTime){s=o[m],l=s.words.length-1;break}!s&&o.length>0&&e>=o[o.length-1].startTime&&(s=o[o.length-1],l=s.words.length-1);}if(!s)return null;if(l===-1){for(let m=0;m<s.words.length;m++){let g=s.words[m];if(e>=g.startTime&&e<g.endTime){l=m;break}}if(l===-1){for(let m=s.words.length-1;m>=0;m--)if(e>=s.words[m].startTime){l=m;break}}l===-1&&(l=0);}let u=n?.colors?.primary??"#5b9bd5",d=n?.typography?.titleFont?yo(n.typography.titleFont,'"PT Serif", Georgia, serif'):'"PT Serif", Georgia, serif',h=i?.height??720,f=Math.round(h*.055),p=Math.max(24,Math.min(72,f));return te("div",{className:"social-caption-overlay",style:{position:"absolute",...Glt(a),left:0,right:0,zIndex:50,pointerEvents:"none",textAlign:"center",padding:"0 8%",boxSizing:"border-box",opacity:1,transition:"opacity 0.15s ease-in-out"},children:te("div",{style:{display:"inline-block",lineHeight:1.3},children:s.words.map((m,g)=>{let y=g===l;return te("span",{style:{fontFamily:d,fontSize:`${p}px`,fontWeight:y?800:600,color:y?u:"rgba(255, 255, 255, 0.9)",textShadow:"0 2px 8px rgba(0,0,0,0.7), 0 0 20px rgba(0,0,0,0.4)",marginRight:g<s.words.length-1?"0.3em":void 0,transition:"color 0.1s ease, font-weight 0.1s ease",textTransform:"uppercase"},children:m.text},`${m.startTime}-${g}`)})})})}function I2r(t){switch(t){case "bottom":return {bottom:"6px",left:"50%",transform:"translateX(-50%)"};case "center":return {top:"50%",left:"50%",transform:"translate(-50%, -50%)"};default:return {top:"6px",left:"50%",transform:"translateX(-50%)"}}}function Ylt({captions:t,currentTime:e,enabled:r=true,fontSize:n=16,captionStyle:i="standard",captionPosition:a,theme:o,viewport:s}){if(i==="social")return te(Vlt,{captions:t,currentTime:e,enabled:r,theme:o,viewport:s,position:a??"bottom"});let u=(r&&t?s5(t,e):null)?.text??null;return te("div",{className:"caption-overlay",style:{position:"absolute",...I2r(a??"top"),zIndex:50,pointerEvents:"none",maxWidth:"100%",width:"100%",textAlign:"center",opacity:u?1:0,transition:"opacity 0.15s ease-in-out",padding:"0 4px",boxSizing:"border-box"},children:u&&te("div",{style:{display:"inline-block",padding:"3px 10px",background:"rgba(0, 0, 0, 0.65)",borderRadius:"4px",backdropFilter:"blur(4px)"},children:te("span",{style:{color:"#ffffff",fontSize:`${n}px`,fontFamily:"'Hanken Grotesk', system-ui, sans-serif",fontWeight:500,lineHeight:1.25,textShadow:"0 1px 3px rgba(0,0,0,0.5)",whiteSpace:"pre-wrap",wordWrap:"break-word"},children:u})})})}var M2r="(prefers-color-scheme: dark)";function lq(t){let e=cr(()=>t&&typeof window<"u"?window.matchMedia(M2r):null,[t]),r=Zr(i=>e?(e.addEventListener("change",i),()=>e.removeEventListener("change",i)):()=>{},[e]),n=Zr(()=>e?.matches?Xq:lL,[e]);return kde(r,n)}function _ue(t){if(!t?.length)return {segmentStarts:[],totalDuration:0};let e=0;return {segmentStarts:t.map(n=>{let i=e;return e+=n.duration,i}),totalDuration:e}}function jlt(t,e,r){if(!e?.length)return {segmentIndex:0,segmentStart:0};let n=0,i=0;for(let a=0;a<e.length;a++){let o=r[a]+e[a].duration;if(t<o){n=a,i=r[a];break}a===e.length-1&&(n=a,i=r[a]);}return {segmentIndex:n,segmentStart:i}}var N2r=15e3,Xlt="Audio could not be loaded. Check that the media file is available.";function O2r(t,e){return !t||/^(?:[a-z][a-z0-9+.-]*:|\/\/|\/)/i.test(t)||!e?t:`${e.replace(/\/$/,"")}/${t.replace(/^\//,"")}`}function Klt(t,e,r="",n=true,i="media",a=0){let o=cr(()=>i!=="synthetic"||e?.segments?.length||a<=0?e:{...e,segments:[{src:"",name:"synthetic",duration:a,startTime:0}]},[e,i,a]),s=Cy(),[l,u]=Rr(0),[d,h]=Rr(false),[f,p]=Rr(0),[m,g]=Rr(false),[y,b]=Rr(false),[v,x]=Rr(0),[C,T]=Rr(true),[k,S]=Rr(),E=xr([]),A=xr(null),R=xr(null),P=xr(false),L=xr(new Map),_=xr(new Map),D=xr(new Set),I=xr(0),N=xr(void 0);N.current=o?.segments[f]?.src;let B=xr(null),O=xr(0);O.current=f;let $=xr(false);kr(()=>{if(I.current+=1,A.current=null,R.current?.(),R.current=null,P.current=false,$.current=false,B.current=null,u(0),p(0),h(false),g(false),b(false),T(true),S(void 0),!n||!o?.segments){E.current=[],x(0);return}let V=_ue(o.segments);E.current=V.segmentStarts,x(V.totalDuration),i==="synthetic"&&b(true);},[o,n,i]);let F=Zr(async V=>{let ie=O2r(V,r);if(!fu(ie,s))return "";if(L.current.has(V)){let re=L.current.get(V);return L.current.delete(V),L.current.set(V,re),re}if(_.current.has(V))return _.current.get(V);let Z=new AbortController;D.current.add(Z);let le=I.current,ae=(async()=>{try{let re=await kG(ie,{policy:s,signal:Z.signal,contentTypePrefixes:["audio/","video/","application/octet-stream"]}),Ce=new Blob([re.bytes.slice().buffer],{type:re.contentType||"application/octet-stream"}),me=URL.createObjectURL(Ce);if(Z.signal.aborted||le!==I.current)return URL.revokeObjectURL(me),ie;for(L.current.set(V,me);L.current.size>2;){let Me=[...L.current.entries()].find(([Le])=>Le!==N.current)??L.current.entries().next().value;if(!Me)break;L.current.delete(Me[0]),URL.revokeObjectURL(Me[1]);}return me}catch{return ""}})();return _.current.set(V,ae),ae.then(()=>{D.current.delete(Z),_.current.get(V)===ae&&_.current.delete(V);}),ae},[r,s]);kr(()=>{if(!n||!o?.segments)return;let V=L.current,ie=D.current,Z=_.current;return ()=>{I.current+=1,ie.forEach(le=>le.abort()),ie.clear(),Z.clear(),V.forEach(le=>{URL.revokeObjectURL(le);}),V.clear();}},[o,F,n]),kr(()=>{if(!n||i==="synthetic")return;let V=o?.segments[f];V&&F(V.src);},[o,f,n,i,F]),kr(()=>{if(!n||i==="synthetic")return;let V=t.current;if(!V)return;let ie=()=>{if($.current)return;let me=(E.current[f]||0)+V.currentTime;u(me);},Z=()=>{h(true);},le=()=>h(false),ae=()=>{b(true),h(false),T(false),S(Xlt),P.current=false,A.current!==null&&(u(A.current),A.current=null),R.current?.(),R.current=null;},re=()=>{o&&f<o.segments.length-1?(P.current=true,p(Ce=>Ce+1)):(g(true),h(false));};return V.addEventListener("timeupdate",ie),V.addEventListener("play",Z),V.addEventListener("pause",le),V.addEventListener("ended",re),V.addEventListener("error",ae),()=>{V.removeEventListener("timeupdate",ie),V.removeEventListener("play",Z),V.removeEventListener("pause",le),V.removeEventListener("ended",re),V.removeEventListener("error",ae);}},[t,f,o,n,i]),kr(()=>{if(!n||i==="synthetic")return;let V=t.current;if(!V||!o?.segments)return;let ie=o.segments[f];if(!ie)return;let Z=()=>{if(A.current!==null){let Me=E.current[f]||0,Le=A.current-Me;V.currentTime=Math.max(0,Le),u(A.current),A.current=null,R.current?.(),R.current=null;}P.current&&(V.play().catch(Me=>{h(false),Me instanceof Error&&Me.name==="NotAllowedError"||(T(false),S("Audio playback failed. Check that the media file is supported and available."));}),P.current=false);},le=V.src,ae=B.current,re=!!le&&ae?.key===ie.src&&ae.url===le,Ce=false,me=null;return re?Z():(async()=>{let Le=await F(ie.src);if(!Ce){if(!Le){V.removeAttribute("src"),V.load(),B.current=null,P.current=false,b(true),h(false),T(false),S(Xlt),A.current!==null&&(u(A.current),A.current=null),R.current?.(),R.current=null;return}me=()=>{Ce||(b(true),Z(),me&&V.removeEventListener("canplay",me));},V.addEventListener("canplay",me),V.src=Le,B.current={key:ie.src,url:V.src},V.load(),await Promise.resolve(),V.readyState>=3&&(me&&V.removeEventListener("canplay",me),b(true),Z());}})(),()=>{Ce=true,me&&V.removeEventListener("canplay",me);}},[t,f,o,F,n,i]);let H=Zr(async V=>{let ie=t.current;if(!o?.segments)return;let Z=v>0?Math.max(0,Math.min(V,v)):Math.max(0,V),le=E.current.length===o.segments.length?E.current:_ue(o.segments).segmentStarts,{segmentIndex:ae,segmentStart:re}=jlt(Z,o.segments,le),Ce=i==="synthetic"?d:!ie?.paused;if(g(false),!ie&&i==="media"){p(ae),u(Z);return}if(ae!==O.current){A.current=Z,P.current=Ce;let me=new Promise(Me=>{R.current?.();let Le=false,Be=()=>{Le||(Le=true,clearTimeout(de),R.current===Be&&(R.current=null),Me());},de=setTimeout(Be,N2r);R.current=Be;});p(ae),i==="synthetic"&&(u(Z),A.current=null,R.current?.(),R.current=null),await me;}else {let me=Z-re;ie&&i==="media"&&(ie.currentTime=Math.max(0,me)),u(Z);}},[t,o,d,i,v]),q=Zr(async()=>{if(i==="synthetic"){$.current=true,h(true);return}let V=t.current;if(V){m&&await H(0);try{await V.play(),$.current=!1,T(!0),S(void 0);}catch(ie){$.current=false,h(false),(ie instanceof Error?ie.name:"")!=="NotAllowedError"&&(T(false),S("Audio playback failed. Check that the media file is supported and available."));}}},[t,m,i,H]),z=Zr(()=>{let V=t.current;V&&V.pause(),h(false);},[t]),G=Zr(()=>{!t.current&&i==="media"||(d?z():q());},[t,d,i,q,z]),j=Zr(V=>{!o?.segments||V<0||V>=o.segments.length||(p(V),g(false));},[o]),K=Zr(async()=>{await H(0),await q();},[H,q]);return kr(()=>{if(!d||!$.current||!v)return;let V=performance.now(),ie,Z=le=>{if(!$.current)return;let ae=(le-V)/1e3;V=le,u(re=>{let Ce=re+ae;return Ce>=v?($.current=false,g(true),h(false),v):Ce}),ie=requestAnimationFrame(Z);};return ie=requestAnimationFrame(Z),()=>cancelAnimationFrame(ie)},[d,v]),{currentTime:l,isPlaying:d,currentSegment:f,totalDuration:v,isEnded:m,isReady:y,isAvailable:C,unavailableMessage:k,play:q,pause:async()=>z(),toggle:async()=>G(),seekTo:H,skipToSegment:async V=>j(V),restart:K}}function Qlt(t,e,r={}){let{viewport:n=Yi.landscape,theme:i,onSeek:a,useAudioSegmentTiming:o=true}=r,s=cr(()=>{if(!t?.blocks)return [];let P=t.blocks.some(I=>I.children&&I.children.length>0)?kx(t.blocks):t.blocks,L=P.some(ql),_=i??ua,D=f4({persistentLayers:t.persistentLayers},_);if(L){let I=o?t.audio?.segments?.map(B=>({startTime:B.startTime,duration:B.duration})):void 0;return pW(P,{audioSegments:I,viewport:n,persistentLayers:D,theme:i,customTemplates:t.customTemplates})}return P.map((I,N)=>{let B=r5(I,_,N);return B!==I.transition?{...I,transition:B}:I})},[t?.blocks,t?.audio?.segments,t?.persistentLayers,t?.customTemplates,n,i,o]),l=cr(()=>Zq(s,e),[s,e]),u=cr(()=>l?s.indexOf(l):-1,[s,l]),d=cr(()=>l?Math.max(0,e-l.startTime):0,[l,e]),h=cr(()=>!l||l.duration===0?0:Math.min(1,d/l.duration),[l,d]),f=cr(()=>!t||t.duration===0?0:Math.min(1,e/t.duration),[t,e]),p=xr(null),m=xr(null),g=xr(null),y=xr(null),b=Zr(R=>{if(m.current===R){p.current=null,y.current=null;return}y.current=R;},[]);if(l&&l.id!==m.current){let R=y.current===l.id;p.current=R?null:g.current,y.current=null,m.current=l.id;}g.current=l;let v=l?.transition?$v(l.transition):0,x=!!l&&v>0&&d<v,C=p.current,T=x&&C!=null&&C.id!==l?.id,k=T?C:null,S=Zr(R=>{if(!t||R<0||R>=s.length)return;let P=s[R];P&&a?.(P.startTime);},[t,s,a]),E=Zr(()=>{if(u<s.length-1)return S(u+1)},[u,s.length,S]),A=Zr(()=>{if(u>0)return S(u-1)},[u,S]);return {currentBlock:l,currentBlockIndex:u,previousBlock:k,isEntering:x,isExiting:T,blockTime:d,blockProgress:h,docProgress:f,nextBlock:E,prevBlock:A,goToBlock:S,suppressOutgoingForNextBlock:b,blocks:s}}function P2r(t,e){let r=t/e;return r>1.2?"landscape":r<.83?"portrait":"square"}function B2r(t){switch(t){case "portrait":return Yi.portrait;case "square":return Yi.square;default:return Yi.landscape}}function Zlt(){let[t,e]=Rr(()=>({width:typeof window<"u"?window.innerWidth:1920,height:typeof window<"u"?window.innerHeight:1080}));kr(()=>{if(typeof window>"u")return;let i=()=>{e({width:window.innerWidth,height:window.innerHeight});},a,o=()=>{clearTimeout(a),a=setTimeout(i,100);};return window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o),clearTimeout(a);}},[]);let r=cr(()=>P2r(t.width,t.height),[t.width,t.height]);return {viewport:cr(()=>B2r(r),[r]),orientation:r,windowSize:t}}var F2r=.3,$2r=.5,q2r=12,z2r=.35,H2r=260;function U2r({dx:t,width:e,elapsedMs:r,canNext:n,canPrev:i}){let a=e>0?e*F2r:1/0,o=r>0?Math.abs(t)/r:0,s=Math.abs(t)>=a,l=o>=$2r&&Math.abs(t)>=q2r;return !s&&!l?"snap":t<0?n?"next":"snap":t>0&&i?"prev":"snap"}function Jlt(t){let e=t.settleMs??H2r,[r,n]=Rr(0),[i,a]=Rr("idle"),o=xr(t);o.current=t;let s=xr(null),l=xr("idle");l.current=i;let u=xr(null),d=xr(null),h=Zr(()=>{u.current!=null&&(clearTimeout(u.current),u.current=null),d.current!=null&&(cancelAnimationFrame(d.current),d.current=null);},[]),f=Zr(p=>{if(!o.current.enabled||l.current==="settling"||p.pointerType==="mouse"&&p.button!==0)return;let g=p.target;if(!g.closest?.("button, a, input, textarea, select, [data-no-swipe]")){s.current={pointerId:p.pointerId,startX:p.clientX,startTime:performance.now(),target:g};try{g.setPointerCapture?.(p.pointerId);}catch{}a("dragging"),n(0);}},[]);return kr(()=>{function p(){return o.current.containerRef.current?.getBoundingClientRect().width??0}function m(x){s.current=null;try{x.target.releasePointerCapture?.(x.pointerId);}catch{}}function g(x,C){a("settling"),d.current=requestAnimationFrame(()=>{d.current=null,n(x),u.current=setTimeout(()=>{u.current=null,C?.(),n(0),a("idle");},e);});}function y(x){let C=s.current;if(!C||x.pointerId!==C.pointerId)return;let T=o.current,k=x.clientX-C.startX,S=k>0&&!T.canGoPrev||k<0&&!T.canGoNext;n(S?k*z2r:k);}function b(x){let C=s.current;if(!C||x.pointerId!==C.pointerId)return;m(C);let T=o.current,k=x.clientX-C.startX,S=p(),E=performance.now()-C.startTime,A=U2r({dx:k,width:S,elapsedMs:E,canNext:T.canGoNext,canPrev:T.canGoPrev});if(A==="snap"){g(0);return}let R=Math.max(S,Math.abs(k)),P=A==="next"?-R:R;g(P,A==="next"?T.onNext:T.onPrev);}function v(x){let C=s.current;!C||x.pointerId!==C.pointerId||(m(C),g(0));}return window.addEventListener("pointermove",y),window.addEventListener("pointerup",b),window.addEventListener("pointercancel",v),()=>{window.removeEventListener("pointermove",y),window.removeEventListener("pointerup",b),window.removeEventListener("pointercancel",v);}},[e]),kr(()=>{t.enabled||(s.current=null,h(),a("idle"),n(0));},[t.enabled,h]),kr(()=>h,[h]),{offsetPx:r,phase:i,onPointerDown:f}}function Ov(t){let e=Math.floor(t/60),r=Math.floor(t%60);return `${e}:${r.toString().padStart(2,"0")}`}function cq({state:t,actions:e,blockMarkers:r,expandedBlocks:n,getBlockTitle:i}){let a=xr(null),[o,s]=Rr(null),l=t.totalDuration>0?Math.max(0,Math.min(1,t.currentTime/t.totalDuration)):0,u=Zr(p=>{let m=a.current;if(!m)return;let g=m.getBoundingClientRect(),y=p.clientX-g.left,b=Math.max(0,Math.min(1,y/g.width));s(b);},[]),d=Zr(()=>{s(null);},[]),h=Zr(p=>{let m=null;switch(p.key){case "ArrowLeft":case "ArrowDown":m=t.currentTime-5;break;case "ArrowRight":case "ArrowUp":m=t.currentTime+5;break;case "Home":m=0;break;case "End":m=t.totalDuration;break}m!=null&&(p.preventDefault(),e.seekTo(Math.max(0,Math.min(t.totalDuration,m))));},[e,t.currentTime,t.totalDuration]),f=Zr(p=>{for(let m=n.length-1;m>=0;m--){let g=n[m];if(p>=g.startTime)return {block:g,index:m}}return n.length>0?{block:n[0],index:0}:null},[n]);return te("div",{ref:a,role:"group","aria-label":"Playback timeline",style:{flex:1,height:"24px",cursor:"pointer",position:"relative",display:"flex",alignItems:"center"},onClick:p=>{let m=p.currentTarget.getBoundingClientRect(),y=(p.clientX-m.left)/m.width;e.seekTo(y*t.totalDuration);},onMouseMove:u,onMouseLeave:d,children:[te("div",{role:"slider",tabIndex:0,"aria-label":"Playback position","aria-valuemin":0,"aria-valuemax":t.totalDuration,"aria-valuenow":Math.max(0,Math.min(t.totalDuration,t.currentTime)),"aria-valuetext":`${Ov(t.currentTime)} of ${Ov(t.totalDuration)}`,onKeyDown:h,style:{position:"absolute",left:0,right:0,height:"6px",background:"rgba(255,255,255,0.2)",borderRadius:"3px"}}),te("div",{"data-testid":"doc-progress-fill",style:{position:"absolute",left:0,width:`${l*100}%`,height:"6px",background:"#5b9bd5",borderRadius:"3px"}}),r.map((p,m)=>te("button",{type:"button",style:{position:"absolute",left:`${p.position}%`,transform:"translateX(-50%)",width:"10px",height:"10px",borderRadius:"50%",background:p.index===t.currentBlockIndex?"#ffffff":"rgba(255,255,255,0.5)",border:"2px solid #5b9bd5",padding:0,cursor:"pointer",zIndex:2,transition:"transform 0.15s, background 0.15s"},title:p.title,"aria-label":`Seek to ${p.title}`,onClick:g=>{g.stopPropagation(),e.seekTo(p.block.startTime);},onMouseEnter:g=>{g.currentTarget.style.transform="translateX(-50%) scale(1.3)";},onMouseLeave:g=>{g.currentTarget.style.transform="translateX(-50%)";}},`${p.block.id}-${m}`)),o!==null&&te("div",{style:{position:"absolute",left:`${o*100}%`,bottom:"100%",transform:"translateX(-50%)",marginBottom:"8px",padding:"6px 10px",background:"rgba(0,0,0,0.9)",borderRadius:"4px",whiteSpace:"nowrap",pointerEvents:"none",zIndex:10},children:[te("div",{style:{color:"white",fontSize:"12px",fontFamily:"monospace"},children:Ov(o*t.totalDuration)}),(()=>{let p=o*t.totalDuration,m=f(p);return m&&i?te("div",{style:{color:"rgba(255,255,255,0.7)",fontSize:"11px",marginTop:"2px"},children:i(m.block)}):null})()]}),o!==null&&te("div",{style:{position:"absolute",left:`${o*100}%`,top:"50%",transform:"translate(-50%, -50%)",width:"2px",height:"16px",background:"rgba(255,255,255,0.6)",pointerEvents:"none",zIndex:1}})]})}function ect({state:t,actions:e,blockMarkers:r,expandedBlocks:n,getBlockTitle:i}){return te("div",{className:"doc-player__controls",style:{position:"absolute",bottom:0,left:0,right:0,padding:"12px 16px",background:"linear-gradient(transparent, rgba(0,0,0,0.8))",display:"flex",alignItems:"center",gap:"8px",zIndex:100},children:[te("button",{onClick:e.restart,style:{background:"none",border:"none",color:"rgba(255,255,255,0.7)",cursor:"pointer",padding:"8px",fontSize:"14px",display:"flex",alignItems:"center"},title:"Restart","aria-label":"Restart from beginning",children:te("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"18",height:"18",children:te("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"})})}),te("button",{onClick:e.toggle,style:{background:"rgba(255,255,255,0.2)",border:"none",borderRadius:"50%",color:"white",cursor:"pointer",padding:"10px",fontSize:"16px",display:"flex",alignItems:"center",justifyContent:"center",width:"40px",height:"40px"},"aria-label":t.isPlaying?"Pause":"Play",children:t.isPlaying?te("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"20",height:"20",children:te("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"})}):te("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"20",height:"20",children:te("path",{d:"M8 5v14l11-7z"})})}),te("span",{style:{color:"white",fontSize:"12px",minWidth:"80px",fontFamily:"monospace"},children:[Ov(t.currentTime)," / ",Ov(t.totalDuration)]}),te(cq,{state:t,actions:e,blockMarkers:r,expandedBlocks:n,getBlockTitle:i}),te("span",{style:{color:"rgba(255,255,255,0.5)",fontSize:"11px",whiteSpace:"nowrap"},children:[t.currentBlockIndex+1,"/",t.totalBlocks]}),t.hasCaptions&&te("button",{onClick:()=>e.cycleCaptionMode(),style:{background:t.captionMode!=="off"?"rgba(255,255,255,0.2)":"none",border:"none",color:t.captionMode!=="off"?"white":"rgba(255,255,255,0.5)",cursor:"pointer",padding:"8px",fontSize:"12px",display:"flex",alignItems:"center",gap:"4px",borderRadius:"4px"},title:t.captionMode==="off"?"Captions: Off (click for Standard)":t.captionMode==="standard"?"Captions: Standard (click for Social)":"Captions: Social (click to turn off)","aria-label":"Cycle caption style",children:[te("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"18",height:"18",children:te("path",{d:"M19 4H5a2 2 0 00-2 2v12a2 2 0 002 2h14a2 2 0 002-2V6a2 2 0 00-2-2zm-8 7H9.5v-.5h-2v3h2V13H11v1a1 1 0 01-1 1H7a1 1 0 01-1-1v-4a1 1 0 011-1h3a1 1 0 011 1v1zm7 0h-1.5v-.5h-2v3h2V13H18v1a1 1 0 01-1 1h-3a1 1 0 01-1-1v-4a1 1 0 011-1h3a1 1 0 011 1v1z"})}),t.captionMode!=="off"&&te("span",{style:{fontSize:"10px",textTransform:"uppercase",letterSpacing:"0.5px"},children:t.captionMode==="standard"?"CC":"SM"})]}),e.toggleFullscreen&&te("button",{onClick:e.toggleFullscreen,style:{background:t.isFullscreen?"rgba(255,255,255,0.2)":"none",border:"none",color:t.isFullscreen?"white":"rgba(255,255,255,0.5)",cursor:"pointer",padding:"8px",display:"flex",alignItems:"center",borderRadius:"4px"},title:t.isFullscreen?"Exit fullscreen (F)":"Fullscreen (F)","aria-label":t.isFullscreen?"Exit fullscreen":"Enter fullscreen",children:t.isFullscreen?te("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"18",height:"18",children:te("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"})}):te("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"18",height:"18",children:te("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"})})})]})}function tct({state:t,slideNav:e,slides:r=[],pickerOpen:n,onPickerOpenChange:i}){let[a,o]=Rr(false),s=n??a,l=Zr(E=>{n===void 0&&o(E),i?.(E);},[n,i]),[u,d]=Rr(280),h=xr(null),f=xr(null),p=xr(null),m=tl(),{currentBlockIndex:g,currentSlideLabel:y,currentSlideNumber:b,totalBlocks:v,totalSlideNumber:x}=t,C=g<=0,T=g>=v-1,k=v>0?y??`${b??g+1} / ${x??v}`:"\u2014";kr(()=>{if(!s)return;let E=R=>{h.current?.contains(R.target)||l(false);},A=R=>{R.key==="Escape"&&(R.preventDefault(),l(false),f.current?.focus());};return document.addEventListener("pointerdown",E),document.addEventListener("keydown",A),()=>{document.removeEventListener("pointerdown",E),document.removeEventListener("keydown",A);}},[s,l]),vm(()=>{if(!s)return;let E=h.current,A=E?.closest(".doc-player")??E?.parentElement;if(!E||!A)return;let R=()=>{let L=E.getBoundingClientRect(),_=A.getBoundingClientRect(),D=Math.floor(L.top-_.top-8-16);d(Math.max(72,D));};R();let P=typeof ResizeObserver>"u"?null:new ResizeObserver(R);return P?.observe(A),P?.observe(E),window.addEventListener("resize",R),()=>{P?.disconnect(),window.removeEventListener("resize",R);}},[s]),kr(()=>{s&&p.current?.querySelector('[aria-current="true"]')?.focus();},[s]);let S=E=>{if(!["ArrowDown","ArrowUp","Home","End"].includes(E.key))return;let A=Array.from(p.current?.querySelectorAll('[role="menuitem"]')??[]);if(A.length===0)return;E.preventDefault();let R=A.indexOf(document.activeElement),P=R;E.key==="Home"?P=0:E.key==="End"?P=A.length-1:E.key==="ArrowDown"?P=(R+1)%A.length:P=(R-1+A.length)%A.length,A[P]?.focus();};return te("div",{ref:h,className:"doc-controls-slideshow","data-testid":"slideshow-controls",style:{position:"absolute",bottom:"16px",right:"16px",display:"flex",alignItems:"center",gap:"2px",background:"rgba(0, 0, 0, 0.65)",borderRadius:"8px",padding:"4px 6px",zIndex:100,userSelect:"none",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)"},children:[te("button",{onClick:E=>{E.stopPropagation(),e.prevSlide();},disabled:C,"data-testid":"slide-prev","aria-label":"Previous slide",title:"Previous slide",style:{background:"none",border:"none",color:C?"rgba(255,255,255,0.3)":"rgba(255,255,255,0.9)",cursor:C?"default":"pointer",padding:"6px 8px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",transition:"background 0.15s"},onMouseEnter:E=>{C||(E.currentTarget.style.background="rgba(255,255,255,0.1)");},onMouseLeave:E=>{E.currentTarget.style.background="none";},children:te("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"18",height:"18",children:te("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})})}),te("button",{ref:f,type:"button","data-testid":"slide-counter","aria-label":`Choose slide, current ${k}`,"aria-haspopup":"menu","aria-expanded":s,"aria-controls":s?m:void 0,title:"Choose slide",disabled:r.length===0,onClick:E=>{E.stopPropagation(),l(!s);},style:{background:s?"rgba(255,255,255,0.12)":"none",border:"none",color:"rgba(255,255,255,0.9)",cursor:r.length>0?"pointer":"default",fontSize:"13px",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontVariantNumeric:"tabular-nums",minWidth:"48px",textAlign:"center",padding:"6px 4px",letterSpacing:"0.02em",borderRadius:"4px",transition:"background 0.15s"},children:k}),s&&te("div",{ref:p,id:m,role:"menu","aria-label":"Choose a slide","data-testid":"slide-picker",onClick:E=>E.stopPropagation(),onKeyDown:S,style:{position:"absolute",right:0,bottom:"calc(100% + 8px)",width:"min(280px, calc(100vw - 32px))",maxHeight:`${u}px`,overflowY:"auto",padding:"6px",background:"rgba(20, 20, 20, 0.94)",border:"1px solid rgba(255,255,255,0.14)",borderRadius:"8px",boxShadow:"0 10px 30px rgba(0,0,0,0.38)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)"},children:r.map((E,A)=>{let R=A===g;return te("button",{type:"button",role:"menuitem","aria-current":R?"true":void 0,"data-testid":`slide-picker-item-${A}`,onClick:()=>{e.goToSlide(A),l(false);},style:{display:"grid",gridTemplateColumns:"42px minmax(0, 1fr)",alignItems:"center",gap:"8px",width:"100%",padding:"8px 10px",background:R?"rgba(255,255,255,0.14)":"transparent",border:"none",borderRadius:"5px",color:"rgba(255,255,255,0.94)",cursor:"pointer",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',textAlign:"left"},onMouseEnter:P=>{P.currentTarget.style.background="rgba(255,255,255,0.1)";},onMouseLeave:P=>{P.currentTarget.style.background=R?"rgba(255,255,255,0.14)":"transparent";},children:[te("span",{style:{color:R?"#fff":"rgba(255,255,255,0.58)",fontSize:"12px",fontVariantNumeric:"tabular-nums",textAlign:"right"},children:E.label}),te("span",{style:{minWidth:0,overflow:"hidden",color:R?"#fff":"rgba(255,255,255,0.82)",fontSize:"13px",lineHeight:1.3,textOverflow:"ellipsis",whiteSpace:"nowrap"},children:E.summary})]},`${E.id}-${A}`)})}),te("button",{onClick:E=>{E.stopPropagation(),e.nextSlide();},disabled:T,"data-testid":"slide-next","aria-label":"Next slide",title:"Next slide",style:{background:"none",border:"none",color:T?"rgba(255,255,255,0.3)":"rgba(255,255,255,0.9)",cursor:T?"default":"pointer",padding:"6px 8px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",transition:"background 0.15s"},onMouseEnter:E=>{T||(E.currentTarget.style.background="rgba(255,255,255,0.1)");},onMouseLeave:E=>{E.currentTarget.style.background="none";},children:te("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"18",height:"18",children:te("path",{d:"M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z"})})})]})}function Rue(t){return t?Object.keys(t).map(e=>e.trim().toLowerCase()):[]}var G2r={theme:ua,pageStyle:$y(ua),basePath:"/",viewport:Yi.landscape,renderContext:{theme:ua},animationsEnabled:true,imageDisplayMode:"inline",showCodeCopyButton:false},Lue=If(G2r);function Xu(){return xm(Lue)}function rct({section:t}){let{renderContext:e,basePath:r,animationsEnabled:n,theme:i}=Xu(),a=t.slots.media,o=a?.type==="canvas"?a:void 0,s=cr(()=>{if(!o)return null;let{layers:h}=w4(o.block,{...e,blockIndex:t.index});return {...o.block,layers:h}},[o,e,t.index]);if(!o||!s)return null;let l=o.aspect,d=t.hints?.frame==="terminal"?" squisq-page-canvas--terminal squisq-page-canvas--framed":" squisq-page-canvas--framed";return te("div",{className:`squisq-page-canvas${d}`,style:{aspectRatio:`${l.width} / ${l.height}`,maxHeight:"min(70vh, 720px)",maxWidth:`calc(min(70vh, 720px) * ${(l.width/Math.max(1,l.height)).toFixed(4)})`},children:te(Bl,{block:s,blockTime:0,basePath:r,viewport:{width:l.width,height:l.height},animationsEnabled:n,theme:i})})}var W2r=If(null);function nct(){return xm(W2r)}function uq({src:t,basePath:e="",width:r,height:n,poster:i,controls:a=true,preload:o="metadata",className:s}){let l=to(t,e),u=to(i??"",e),d=i?u:void 0;return l?te("span",{className:`squisq-inline-video-player ${s??""}`.trim(),children:te("video",{src:l,poster:d,controls:a,preload:o,width:r,height:n,playsInline:true})}):null}function ict({src:t,basePath:e="",controls:r=true,preload:n="metadata",className:i}){let a=to(t,e);return a?te("span",{className:`squisq-inline-audio-player ${i??""}`.trim(),children:te("audio",{src:a,controls:r,preload:n})}):null}var WE={htmlPolicy:"sanitize"},V2r={idle:"Copy",copying:"Copying\u2026",copied:"Copied",failed:"Copy failed"};async function Y2r(t,e,r){if(r){await r(t,e===void 0?{}:{language:e});return}if(typeof navigator>"u"||!navigator.clipboard?.writeText)throw new Error("Clipboard access is unavailable in this host");await navigator.clipboard.writeText(t);}function act({value:t,language:e,ctx:r}){let[n,i]=Rr("idle"),a=xr();kr(()=>()=>{a.current!==void 0&&clearTimeout(a.current);},[]);let o=te("pre",{className:"squisq-md-code-block",children:te("code",{className:e?`language-${e}`:void 0,children:t})});if(!r.showCodeCopyButton)return o;let s=async()=>{if(n!=="copying"){i("copying");try{await Y2r(t,e??void 0,r.onCopyCode),i("copied");}catch{i("failed");}a.current!==void 0&&clearTimeout(a.current),a.current=setTimeout(()=>i("idle"),1600);}};return te("div",{className:"squisq-md-code-frame",children:[o,te("button",{type:"button",className:"squisq-md-code-copy","data-copy-state":n,disabled:n==="copying",onClick:()=>{s();},"aria-label":"Copy code to clipboard",children:V2r[n]})]})}var Iue=class extends Cc{constructor(){super(...arguments);this.state={failed:false};}static getDerivedStateFromError(){return {failed:true}}render(){return this.state.failed?this.props.fallback:this.props.children}};function j2r({node:t,lang:e,ctx:r}){let n=r.fenceRenderers?.[e];return n?te("div",{className:`squisq-md-fence-widget squisq-md-fence-widget-${e}`,"data-fence-lang":e,children:n({lang:e,...t.meta!=null?{meta:t.meta}:{},value:t.value,...r.theme?{theme:r.theme}:{},mode:"read"})}):null}function Js(t,e="",r=WE){return t.map((n,i)=>{let a=`${e}i${i}`;switch(n.type){case "text":{if(!n.value.includes(`
|
|
4146
4146
|
`))return te(Nn,{children:n.value},a);let o=n.value.split(`
|
|
4147
4147
|
`);return te(Nn,{children:o.map((s,l)=>te(Nn,{children:[l>0&&te("br",{}),s]},l))},a)}case "emphasis":return te("em",{className:"squisq-md-em",children:Js(n.children,a,r)},a);case "strong":return te("strong",{className:"squisq-md-strong",children:Js(n.children,a,r)},a);case "delete":return te("del",{className:"squisq-md-del",children:Js(n.children,a,r)},a);case "superscript":return te("sup",{className:"squisq-md-sup",children:Js(n.children,a,r)},a);case "subscript":return te("sub",{className:"squisq-md-sub",children:Js(n.children,a,r)},a);case "inlineCode":return te("code",{className:"squisq-md-inline-code",children:n.value},a);case "link":{if(r.accessoryPaths?.has(n.url))return te("span",{className:"squisq-md-attachment","data-attachment-path":n.url,title:n.title??`Attachment: ${n.url}`,children:[te("i",{className:"fa-solid fa-paperclip","aria-hidden":"true"}),te("span",{className:"squisq-md-attachment-label",children:Js(n.children,a,r)})]},a);let o=as(n.url,"link",{extraLinkSchemes:r.linkSchemes});return o?te("a",{className:"squisq-md-link",href:o,title:n.title??void 0,target:"_blank",rel:"noopener noreferrer",children:Js(n.children,a,r)},a):te("span",{className:"squisq-md-link squisq-md-link--blocked",children:Js(n.children,a,r)},a)}case "image":return te(Q2r,{src:n.url,alt:n.alt??"",title:n.title??void 0},a);case "break":return te("br",{},a);case "inlineMath":return te("code",{className:"squisq-md-inline-math",children:n.value},a);case "inlineIcon":return te("i",{className:`fa-${n.family} fa-${n.name}`,"data-icon":n.token,"aria-hidden":"true"},a);case "htmlInline":return r.htmlPolicy==="strip"?null:te("span",{className:"squisq-md-html-inline",children:Mue(lct(n.htmlChildren,r.htmlPolicy),`${a}h`,r)},a);case "footnoteReference":return te("sup",{className:"squisq-md-footnote-ref",children:te("a",{href:`#fn-${n.identifier}`,children:["[",n.label??n.identifier,"]"]})},a);case "linkReference":return te("span",{className:"squisq-md-link-ref",children:Js(n.children,a,r)},a);case "imageReference":return te("span",{className:"squisq-md-image-ref",children:["[",n.alt??n.identifier,"]"]},a);case "textDirective":return te("span",{className:"squisq-md-text-directive","data-directive":n.name,children:Js(n.children,a,r)},a);case "mention":return te("span",{className:"squisq-md-mention mention","data-mention":"true","data-kind":n.targetKind,"data-id":n.targetId,"data-label":n.displayName,children:["@",n.displayName]},a);default:return null}})}function X2r(t,e,r=WE){switch(t.type){case "paragraph":return te("p",{className:"squisq-md-p",children:Js(t.children,e,r)},e);case "heading":{let n=`h${t.depth}`;return te(n,{className:`squisq-md-heading squisq-md-h${t.depth}`,children:Js(t.children,e,r)},e)}case "blockquote":return te("blockquote",{className:"squisq-md-blockquote",children:GE(t.children,e,r)},e);case "list":return t.ordered?te("ol",{className:"squisq-md-list squisq-md-ol",start:t.start??void 0,children:t.children.map((n,i)=>oct(n,`${e}li${i}`,r))},e):te("ul",{className:"squisq-md-list squisq-md-ul",children:t.children.map((n,i)=>oct(n,`${e}li${i}`,r))},e);case "code":{let n=t.lang?.trim().toLowerCase();return n&&r.fenceRenderers?.[n]?te(Iue,{fallback:te(act,{value:t.value,language:t.lang,ctx:r}),children:te(j2r,{node:t,lang:n,ctx:r})},e):n==="mermaid"?te(sq,{source:t.value,className:"squisq-md-mermaid",ariaLabel:"Mermaid diagram",theme:r.theme},e):te(act,{value:t.value,language:t.lang,ctx:r},e)}case "thematicBreak":return te("hr",{className:"squisq-md-hr"},e);case "table":return K2r(t.children,t.align,e,r);case "htmlBlock":return r.htmlPolicy==="strip"?null:te("div",{className:"squisq-md-html-block",children:Mue(lct(t.htmlChildren,r.htmlPolicy),`${e}h`,r)},e);case "math":return te("pre",{className:"squisq-md-math-block",children:te("code",{children:t.value})},e);case "definition":return null;case "footnoteDefinition":return te("div",{className:"squisq-md-footnote-def",id:`fn-${t.identifier}`,children:[te("sup",{children:t.label??t.identifier}),GE(t.children,e,r)]},e);case "containerDirective":return te("div",{className:`squisq-md-directive squisq-md-directive-${t.name}`,"data-directive":t.name,children:[t.label&&te("div",{className:"squisq-md-directive-label",children:t.label}),GE(t.children,e,r)]},e);case "leafDirective":return te("div",{className:`squisq-md-directive squisq-md-directive-${t.name}`,"data-directive":t.name,children:Js(t.children,e,r)},e);case "definitionList":return te("dl",{className:"squisq-md-dl",children:t.children.map((n,i)=>n.type==="definitionTerm"?te("dt",{className:"squisq-md-dt",children:Js(n.children,`${e}dt${i}`,r)},`${e}dt${i}`):te("dd",{className:"squisq-md-dd",children:GE(n.children,`${e}dd${i}`,r)},`${e}dd${i}`))},e);default:return null}}function oct(t,e,r=WE){let n=t.checked!==null&&t.checked!==void 0;return te("li",{className:`squisq-md-li${n?" squisq-md-task":""}`,children:[n&&te("input",{type:"checkbox",checked:!!t.checked,readOnly:true,className:"squisq-md-checkbox"}),GE(t.children,e,r)]},e)}function K2r(t,e,r,n=WE){let[i,...a]=t;return te("table",{className:"squisq-md-table",children:[i&&te("thead",{children:te("tr",{children:i.children.map((o,s)=>te("th",{className:"squisq-md-th",style:e?.[s]?{textAlign:e[s]}:void 0,children:Js(o.children,`${r}th${s}`,n)},`${r}th${s}`))})}),a.length>0&&te("tbody",{children:a.map((o,s)=>te("tr",{children:o.children.map((l,u)=>te("td",{className:"squisq-md-td",style:e?.[u]?{textAlign:e[u]}:void 0,children:Js(l.children,`${r}td${s}-${u}`,n)},`${r}td${s}-${u}`))},`${r}tr${s}`))})]},r)}function GE(t,e="",r=WE){return t.map((n,i)=>X2r(n,`${e}b${i}`,r))}function Q2r({src:t,alt:e,title:r}){let n=as(t,"media"),i=to(n??"",".");return n?te("img",{className:"squisq-md-image",src:i,alt:e,title:r}):null}function lct(t,e){return e==="strip"?[]:e==="trusted"?t:qv(t)}var Z2r=new Set(["base","embed","iframe","link","meta","object","script","style","title"]),J2r={class:"className",id:"id",title:"title",style:"style",width:"width",height:"height",src:"src",alt:"alt",loading:"loading",decoding:"decoding",href:"href",target:"target",rel:"rel"},ewr=new Set(["","_self","_parent","_top"]);function twr(t,e){let r={};for(let[n,i]of Object.entries(t)){let a=J2r[n];if(a){if(a==="style"){r["data-style"]=i;continue}if(a==="href"){let o=as(i,"link",{extraLinkSchemes:e.linkSchemes});o&&(r.href=o);continue}if(a==="src"){let o=as(i,"media");o&&(r.src=o);continue}r[a]=i;}}if(typeof r.target=="string"&&!ewr.has(r.target.toLowerCase())){let i=(typeof r.rel=="string"?r.rel:"").split(/\s+/).filter(a=>a&&a.toLowerCase()!=="opener");i.some(a=>a.toLowerCase()==="noopener")||i.push("noopener"),r.rel=i.join(" ");}return r}function rwr(t,e,r){let n=t.tagName.toLowerCase();if(Z2r.has(n))return null;if(n==="video"){let o=as(t.attributes.src??"","media")??"",s=as(t.attributes.poster??"","media")??void 0;return te(uq,{src:o,width:t.attributes.width,height:t.attributes.height,poster:s,controls:"controls"in t.attributes,preload:t.attributes.preload==="none"||t.attributes.preload==="metadata"||t.attributes.preload==="auto"?t.attributes.preload:void 0},e)}if(n==="audio"){let o=as(t.attributes.src??"","media")??"";return te(ict,{src:o,controls:"controls"in t.attributes,preload:t.attributes.preload==="none"||t.attributes.preload==="metadata"||t.attributes.preload==="auto"?t.attributes.preload:void 0},e)}let i=n,a=twr(t.attributes,r);return t.selfClosing?te(i,{...a},e):te(i,{...a,children:Mue(t.children,`${e}c`,r)},e)}function Mue(t,e,r=WE){return t.map((n,i)=>{let a=`${e}${i}`;switch(n.type){case "htmlElement":return rwr(n,a,r);case "htmlText":return te(Nn,{children:n.value},a);case "htmlComment":return null;default:return null}})}var cct=new Set,sct=t=>t.size===0?t:cct;function X0({nodes:t,className:e,htmlPolicy:r="sanitize",linkSchemes:n,theme:i,showCodeCopyButton:a=false,onCopyCode:o,fenceRenderers:s}){let l=nct(),u=t4(),[d,h]=Rr(cct);return kr(()=>{if(!u){h(sct);return}let f=false;return u.listMedia().then(p=>{f||h(new Set(p.map(m=>m.name)));},()=>{f||h(sct);}),()=>{f=true;}},[u]),!t||t.length===0?null:te("div",{className:`squisq-md ${e||""}`,children:GE(t,"",{htmlPolicy:r,linkSchemes:n,theme:i,showCodeCopyButton:a,onCopyCode:o,accessoryPaths:d,fenceRenderers:s??l??void 0})})}function K0({media:t,eager:e,className:r}){let{basePath:n}=Xu(),i=as(t.src,"media"),a=to(i??"",n);return i?te("img",{className:r,src:a,alt:t.alt,loading:e?"eager":"lazy",decoding:"async",width:t.width,height:t.height}):null}function nwr({media:t}){let{basePath:e}=Xu(),r=as(t.src,"media"),n=to(r??"",e),i=t.posterSrc?as(t.posterSrc,"media"):void 0,a=to(i??"",e);return r?te("video",{src:n,poster:i?a:void 0,muted:true,loop:true,autoPlay:true,playsInline:true,preload:"metadata"}):null}function OR({section:t}){return t.slots.eyebrow?te("span",{className:"squisq-page-eyebrow",children:t.slots.eyebrow}):null}function Due({media:t}){return !t||t.type==="canvas"||!t.credit?null:te("span",{className:"squisq-page-media-credit",children:[t.credit,t.license?` \xB7 ${t.license}`:""]})}function uct({section:t}){let{pageStyle:e}=Xu(),r=t.slots.media,n=r?.type==="image"?r:void 0,i=e.tokens.heroStyle,a=te("div",{className:"squisq-page-hero-body",children:[te(OR,{section:t}),te("h1",{className:"squisq-page-hero-title",children:t.slots.title}),t.slots.subtitle&&te("p",{className:"squisq-page-hero-subtitle",children:t.slots.subtitle})]});return n&&i==="split"?te("div",{className:"squisq-page-hero-grid",children:[a,te("div",{className:"squisq-page-hero-media squisq-page-media-frame",children:[te(K0,{media:n,eager:true}),te(Due,{media:n})]})]}):te(Nn,{children:[n&&t.background==="media"&&te("div",{className:"squisq-page-hero-backdrop",children:te(K0,{media:n,eager:true})}),a]})}function dct({section:t}){let e=t.slots.media,r=e?.type==="image"?e:void 0;return te(Nn,{children:[r&&t.background==="media"&&te("div",{className:"squisq-page-hero-backdrop",children:te(K0,{media:r})}),te("div",{className:"squisq-page-banner-body",children:[te(OR,{section:t}),te("h2",{className:"squisq-page-section-title squisq-page-banner-title",children:t.slots.title})]})]})}function hct({section:t}){let e=t.slots.items??[],r=t.variant==="comparison",n=e.map(a=>typeof a.value=="number"?a.value:Number.parseFloat(String(a.value??""))),i=Math.max(1,...n.filter(a=>Number.isFinite(a)));return te(Nn,{children:[te("div",{className:"squisq-page-stats",children:e.map((a,o)=>te("div",{className:`squisq-page-stat${r?" squisq-page-stat--bars":""}`,children:[te("span",{className:"squisq-page-stat-value",children:a.value}),r&&Number.isFinite(n[o])&&te("div",{className:"squisq-page-stat-bar",style:{width:`${Math.max(4,n[o]/i*100)}%`}}),a.title&&te("span",{className:"squisq-page-stat-title",children:a.title}),a.body&&te("span",{className:"squisq-page-stat-body",children:a.body})]},o))}),t.slots.meta&&te("div",{className:"squisq-page-stat-meta",children:t.slots.meta})]})}function fct({section:t}){let e=t.slots.media,r=t.background==="media"&&e&&e.type!=="canvas";return te(Nn,{children:[r&&te("div",{className:"squisq-page-quote-backdrop",children:e.type==="image"?te(K0,{media:e}):te(nwr,{media:e})}),t.slots.title&&te("h2",{className:"squisq-page-section-title",children:t.slots.title}),te("figure",{className:"squisq-page-quote-figure",style:{margin:0},children:[te("blockquote",{className:"squisq-page-quote",children:t.slots.body?.text}),t.slots.attribution&&te("figcaption",{className:"squisq-page-quote-attribution",children:t.slots.attribution})]})]})}function pct({section:t,flip:e}){let r=t.slots.media,n=r?.type==="image"?r:void 0,i=e?t.variant!=="media-right":t.variant==="media-right";return te("div",{className:`squisq-page-feature${i?" squisq-page-feature--media-right":""}`,children:[te("div",{className:"squisq-page-feature-media squisq-page-media-frame",children:[n&&te(K0,{media:n}),te(Due,{media:n})]}),te("div",{className:"squisq-page-feature-text",children:[te(OR,{section:t}),t.slots.title&&te("h3",{className:"squisq-page-section-title squisq-page-feature-title",children:t.slots.title}),t.slots.body?.text&&te("p",{className:"squisq-page-feature-body",children:t.slots.body.text})]})]})}function mct({section:t}){let{basePath:e}=Xu(),r=t.slots.media;return !r||r.type==="canvas"?null:te("figure",{className:"squisq-page-figure",children:[te("div",{className:"squisq-page-media-frame",children:r.type==="image"?te(K0,{media:r}):te(uq,{src:r.src,poster:r.posterSrc,basePath:e})}),(t.slots.caption||r.credit)&&te("figcaption",{children:[t.slots.caption,r.credit&&te(Nn,{children:[t.slots.caption?" ":"",te(Due,{media:r})]})]})]})}function gct({section:t}){let e=t.slots.items??[];return e.length===0?te("div",{className:"squisq-page-gallery-empty",children:[t.slots.title&&te("h2",{className:"squisq-page-section-title",children:t.slots.title}),t.slots.body?.text&&te("p",{children:t.slots.body.text}),t.slots.caption&&te("div",{className:"squisq-page-gallery-caption",children:t.slots.caption})]}):te(Nn,{children:[te("div",{className:"squisq-page-gallery",children:e.map((r,n)=>r.media?.type==="image"?te("div",{className:"squisq-page-media-frame",children:te(K0,{media:r.media})},n):null)}),t.slots.caption&&te("div",{className:"squisq-page-gallery-caption",children:t.slots.caption})]})}function yct({section:t}){let e=t.slots.media,r=e?.type==="image"?e:void 0,n=t.hints?.framing;return te("div",{className:"squisq-page-callout","data-hint-framing":typeof n=="string"?n:void 0,children:[r&&te("div",{className:"squisq-page-media-frame",children:te(K0,{media:r})}),te("div",{children:[te(OR,{section:t}),t.slots.title&&te("h3",{className:"squisq-page-callout-title",children:t.slots.title}),t.slots.body?.text&&te("p",{className:"squisq-page-callout-body",children:t.slots.body.text}),t.slots.meta&&te("div",{className:"squisq-page-callout-meta",children:t.slots.meta})]})]})}function bct({section:t}){let{theme:e}=Xu(),r=t.slots.items??[];return te(Nn,{children:[t.slots.title&&te("h2",{className:"squisq-page-section-title squisq-page-cards-title",children:t.slots.title}),te("div",{className:"squisq-page-cards",children:r.map((n,i)=>{let a=n.accentScheme?e.colorSchemes?.[n.accentScheme]:void 0;return te("div",{className:"squisq-page-card",style:a?{"--squisq-page-card-accent":a.accent}:void 0,children:[n.title&&te("h3",{className:"squisq-page-card-title",children:n.title}),n.body&&te("p",{className:"squisq-page-card-body",children:n.body})]},i)})})]})}function vct({section:t}){let{theme:e,showCodeCopyButton:r,onCopyCode:n,fenceRenderers:i,htmlPolicy:a,linkSchemes:o}=Xu(),s=t.slots.items??[];return te(Nn,{children:[t.slots.title&&te("h2",{className:"squisq-page-section-title squisq-page-items-title",children:t.slots.title}),te("ol",{className:"squisq-page-items",children:s.map((l,u)=>te("li",{children:te("div",{className:"squisq-page-item-body",children:l.markdown?te(X0,{nodes:l.markdown,theme:e,showCodeCopyButton:r,onCopyCode:n,fenceRenderers:i,htmlPolicy:a,linkSchemes:o}):l.body})},u))})]})}function xct({section:t}){let e=t.slots.milestone;return e?te("div",{className:"squisq-page-milestone","data-mood":e.mood,children:[te("div",{className:"squisq-page-milestone-date",children:e.date}),te("div",{className:"squisq-page-milestone-rail","aria-hidden":"true"}),te("div",{className:"squisq-page-milestone-body",children:[e.description,e.footer&&te("div",{className:"squisq-page-milestone-footer",children:e.footer})]})]}):null}function wct({section:t}){let e=t.slots.table;if(!e)return null;let r=n=>e.align?.[n]??void 0;return te(Nn,{children:[t.slots.title&&te("h2",{className:"squisq-page-section-title squisq-page-table-title",children:t.slots.title}),te("div",{className:"squisq-page-table-scroll",children:te("table",{className:"squisq-page-table",children:[te("thead",{children:te("tr",{children:e.headers.map((n,i)=>te("th",{style:{textAlign:r(i)},children:n},i))})}),te("tbody",{children:e.rows.map((n,i)=>te("tr",{children:n.map((a,o)=>te("td",{style:{textAlign:r(o)},children:a},o))},i))})]})})]})}function kct({section:t,block:e}){let{theme:r,showCodeCopyButton:n,onCopyCode:i,fenceRenderers:a,htmlPolicy:o,linkSchemes:s}=Xu(),l=t.slots.title!==void 0&&e?.sourceHeading?te(X0,{nodes:[e.sourceHeading],theme:r,showCodeCopyButton:n,onCopyCode:i,htmlPolicy:o,linkSchemes:s}):null,u=t.slots.body?.markdown??e?.contents;return te("div",{className:"squisq-page-prose",children:[l,u&&u.length>0&&te(X0,{nodes:u,theme:r,showCodeCopyButton:n,onCopyCode:i,fenceRenderers:a,htmlPolicy:o,linkSchemes:s})]})}function Tct({section:t}){return te("div",{children:[te(OR,{section:t}),t.slots.title&&te("h2",{className:"squisq-page-section-title",children:t.slots.title}),t.slots.body?.text&&te("p",{children:t.slots.body.text})]})}function iwr(t,e){return t.kind==="hero"&&t.background==="media"&&t.slots.media?.type==="image"&&e!=="split"}function awr(t){let e=t.accent.scheme;if(e)return {"--squisq-page-accent":e.accent,"--squisq-page-accent-bg":e.bg,"--squisq-page-accent-text":e.text}}function owr(t,e){let{section:r,block:n}=t;switch(r.kind){case "hero":return te(uct,{section:r,block:n});case "banner":return te(dct,{section:r,block:n});case "stat-band":return te(hct,{section:r,block:n});case "quote-band":return te(fct,{section:r,block:n});case "feature-split":return te(pct,{section:r,block:n,flip:e});case "media-figure":return te(mct,{section:r,block:n});case "gallery":return te(gct,{section:r,block:n});case "callout":return te(yct,{section:r,block:n});case "card-grid":return te(bct,{section:r,block:n});case "item-list":return te(vct,{section:r,block:n});case "timeline-rail":return te(xct,{section:r,block:n});case "table-section":return te(wct,{section:r,block:n});case "canvas-embed":return te(rct,{section:r});case "footer":return te(Tct,{section:r,block:n});default:return te(kct,{section:r,block:n})}}function Cct({entry:t,featureFlip:e,isLeadProse:r}){let{pageStyle:n,theme:i,showCodeCopyButton:a,onCopyCode:o,fenceRenderers:s,htmlPolicy:l,linkSchemes:u}=Xu(),{section:d}=t,h=d.slots.richContent?.markdown,f=["squisq-linear-section","squisq-page-section",`squisq-page-section--${d.kind}`,`squisq-page-section--bg-${d.background}`,`squisq-page-section--em-${d.emphasis}`];d.variant&&f.push(`squisq-page-section--v-${d.variant}`),iwr(d,n.tokens.heroStyle)&&f.push("squisq-page-section--hero-media");let p={};return d.hints?.vignette&&(p["data-hint-vignette"]=""),d.hints?.dropCap&&r&&(p["data-hint-drop-cap"]=""),te("section",{className:f.join(" "),"data-section-kind":d.kind,"data-block-id":d.blockId,"data-block-index":d.index,"data-template":d.template,style:awr(d),...p,children:te("div",{className:"squisq-page-section-inner",children:[owr(t,e),h&&h.length>0&&te("div",{className:"squisq-page-rich-content",children:te(X0,{nodes:h,theme:i,showCodeCopyButton:a,onCopyCode:o,fenceRenderers:s,htmlPolicy:l,linkSchemes:u})})]})})}function dq({doc:t,markdown:e,basePath:r="/",viewport:n,className:i,theme:a,surface:o,animationsEnabled:s=true,thinMargins:l=false,imageDisplayMode:u="inline",globalKeyboardShortcuts:d=false,showCover:h=true,transformPage:f,showCodeCopyButton:p=false,onCopyCode:m,fenceRenderers:g,htmlPolicy:y,linkSchemes:b}){let v=xr(null),x=n??Yi.landscape,C=cr(()=>!t&&e!==void 0?wx(id(e)):void 0,[t,e]),T=t??C,k=lq(o==="auto"),S=o==="auto"?k:o,E=cr(()=>{let G=a??ua;return S?o5(G,S):G},[a,S]),A=cr(()=>$y(E,f),[E,f]),R=cr(()=>Rue(g),[g]),P=cr(()=>T?DW(T,{theme:E,viewport:x,customTemplates:T.customTemplates,cover:h!==false?T.startBlock:false,transformPage:f,...R.length>0?{widgetFenceLangs:R}:{}}):[],[T,E,x,h,f,R]),L=cr(()=>({theme:E,viewport:x,totalBlocks:P.length,persistentLayers:E.persistentLayers,customTemplates:T?.customTemplates}),[E,x,P.length,T?.customTemplates]),_=cr(()=>({theme:E,pageStyle:A,basePath:r,viewport:x,renderContext:L,animationsEnabled:s,imageDisplayMode:u,showCodeCopyButton:p,onCopyCode:m,fenceRenderers:g,htmlPolicy:y,linkSchemes:b}),[E,A,r,x,L,s,u,p,m,g,y,b]),{featureOrdinals:D,leadProseIndex:I}=cr(()=>{let G=new Map,j=0,K=-1;for(let V of P)V.section.kind==="feature-split"&&G.set(V.section.index,j++),K<0&&V.section.kind==="prose"&&(K=V.section.index);return {featureOrdinals:G,leadProseIndex:K}},[P]);if(kr(()=>{if(!d)return;let G=j=>{if(j.defaultPrevented||j.altKey||j.ctrlKey||j.metaKey||j.shiftKey||j.key!=="ArrowDown"&&j.key!=="ArrowUp"||(j.target instanceof Element?j.target:null)?.closest('input, textarea, select, [contenteditable]:not([contenteditable="false"]), [role="textbox"], [role="combobox"], [role="listbox"], [role="menu"], [role="dialog"], [aria-modal="true"], .monaco-editor'))return;let V=v.current;if(!V)return;j.preventDefault();let ie=Math.max(64,Math.round(V.clientHeight*.12));V.scrollBy({top:j.key==="ArrowDown"?ie:-ie,behavior:"smooth"});};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[d]),!T)return te("div",{ref:v,className:`squisq-linear squisq-linear--empty ${i||""}`});let N=E.colors.background,B=E.colors.text,O=E.colors.textMuted,$=E.colors.primary,F=yo(E.typography.bodyFont,"system-ui, sans-serif"),H=yo(E.typography.titleFont,"Georgia, serif"),q=E.typography.lineHeight??1.65,z=["squisq-linear-content","squisq-md","squisq-page",l?"squisq-linear-content--thin squisq-page--thin":"",u==="thumbnail"?"squisq-linear-content--thumbnail-images squisq-page--thumbnail-images":""].filter(Boolean).join(" ");return te("div",{ref:v,className:`squisq-linear ${i||""}`,role:"region","aria-label":"Document page",tabIndex:l?void 0:0,style:{width:"100%",height:l?"auto":"100%",overflowY:l?"visible":"auto",overflowX:"hidden",background:N,containerType:"inline-size",containerName:"squisq-page"},children:te("div",{className:z,...OW(A),style:{lineHeight:q,fontSize:"16px",fontFamily:F,color:B,...NW(E,A),"--squisq-linear-title-font":H,"--squisq-linear-body-font":F,"--squisq-linear-text":B,"--squisq-linear-muted":O,"--squisq-linear-primary":$,"--squisq-linear-bg":N},children:[te("style",{"data-squisq-page":"",children:PW}),te(Lue.Provider,{value:_,children:P.map(G=>{let j=D.get(G.section.index)??0,K=!!G.section.hints?.alternate&&j%2===1;return te(Cct,{entry:G,featureFlip:K,isLeadProse:G.section.index===I},`${G.section.blockId}-${G.section.index}`)})})]})})}async function swr(t){if(typeof document<"u"&&document.fonts?.ready)try{await document.fonts.ready;}catch{}let e=Array.from(t.querySelectorAll("img"));await Promise.allSettled(e.map(r=>r.complete?Promise.resolve():typeof r.decode=="function"?r.decode().catch(()=>{}):new Promise(n=>{r.addEventListener("load",()=>n(),{once:true}),r.addEventListener("error",()=>n(),{once:true});}))),await new Promise(r=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>requestAnimationFrame(()=>r())):setTimeout(r,0);});}function PR(t,e){return {id:t,startTime:0,duration:0,audioSegment:0,layers:e}}function Sct({doc:t,theme:e,viewport:r,layout:n,showTitle:i,style:a,documentTitle:o,basePath:s=".",animationsEnabled:l=true,muted:u=true,renderMode:d=false,onRenderAPIReady:h,className:f}){let p=xr(null),m=cr(()=>e??By(t),[e,t]),g=r??Yi.landscape,y=cr(()=>$W(t,{theme:m,viewport:g,layout:n,showTitle:i,style:a,documentTitle:o}),[t,m,g,n,i,a,o]),b=cr(()=>PR("dashboard-backdrop-bottom",y.backdrop.bottomLayers),[y]),v=cr(()=>y.backdrop.topLayers.length>0?PR("dashboard-backdrop-top",y.backdrop.topLayers):null,[y]),x=cr(()=>y.title?PR("dashboard-title-band",y.title.layers):null,[y]);kr(()=>!d||!h?void 0:(h({seekTo:async()=>{let E=p.current;E&&await swr(E);},getRenderedTime:()=>0,getDuration:()=>0,getBlocks:()=>y.cells.map(E=>({id:String(E.block.id),template:E.block.template??"content",startTime:0,duration:0})),getAudioSegments:()=>[],getCaptions:()=>[],getChapters:()=>[],showCover:async()=>{},hideCover:async()=>{},hasCoverBlock:()=>false}),()=>h(null)),[d,h,y]);let C={width:g.width,height:g.height},T={position:"absolute",inset:0},k={position:"relative",width:"var(--squisq-dashboard-fit-width, 100%)",aspectRatio:`${g.width} / ${g.height}`,overflow:"hidden",background:y.backdrop.fill,margin:"0 auto","--squisq-dashboard-aspect":(g.width/g.height).toFixed(6)};return te("div",{ref:p,className:f?`squisq-dashboard ${f}`:"squisq-dashboard","data-dashboard-layout":y.layout.name,"data-dashboard-style":y.style,style:k,children:[te("div",{style:T,"aria-hidden":"true",children:te(Bl,{block:b,blockTime:0,basePath:s,viewport:C,isPlaying:false,muted:true,animationsEnabled:l,theme:m})}),y.cells.map(S=>te(Nn,{children:[S.frame&&te("div",{className:"squisq-dashboard__frame","data-cell-index":S.index,"aria-hidden":"true",style:{position:"absolute",left:S.frame.rectPct.left,top:S.frame.rectPct.top,width:S.frame.rectPct.width,height:S.frame.rectPct.height,pointerEvents:"none"},children:te(Bl,{block:PR(`dashboard-frame-${S.index}`,S.frame.layers),blockTime:0,basePath:s,viewport:{width:S.frame.viewport.width,height:S.frame.viewport.height},isPlaying:false,muted:true,animationsEnabled:l,theme:m})}),te("div",{className:"squisq-dashboard__cell","data-cell-index":S.index,style:{position:"absolute",left:S.rectPct.left,top:S.rectPct.top,width:S.rectPct.width,height:S.rectPct.height,...S.frame?.contentRadiusPct?{borderRadius:S.frame.contentRadiusPct,overflow:"hidden"}:{}},children:[te(Bl,{block:{...S.block,layers:S.layers},blockTime:0,basePath:s,viewport:{width:S.viewport.width,height:S.viewport.height},isPlaying:false,muted:u,animationsEnabled:l,theme:m}),S.frame&&S.frame.overlayLayers.length>0&&te("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:te(Bl,{block:PR(`dashboard-frame-overlay-${S.index}`,S.frame.overlayLayers),blockTime:0,basePath:s,viewport:{width:S.frame.overlayViewport.width,height:S.frame.overlayViewport.height},isPlaying:false,muted:true,animationsEnabled:l,theme:m})})]})]},`${S.index}-${S.block.id}`)),y.title&&x&&te("div",{className:"squisq-dashboard__title",style:{position:"absolute",left:y.title.rectPct.left,top:y.title.rectPct.top,width:y.title.rectPct.width,height:y.title.rectPct.height},children:te(Bl,{block:x,blockTime:0,basePath:s,viewport:{width:y.title.viewport.width,height:y.title.viewport.height},isPlaying:false,muted:true,animationsEnabled:l,theme:m})}),v&&te("div",{style:{...T,pointerEvents:"none"},"aria-hidden":"true",children:te(Bl,{block:v,blockTime:0,basePath:s,viewport:C,isPlaying:false,muted:true,animationsEnabled:l,theme:m})})]})}var lwr=new Set(["diagram","tree","timeline","map","drawing","layout","barChart","columnChart","pieChart","donutChart","lineChart","areaChart","scatterChart"]);function cwr(t,e,r,n){let i=q8(t);if(!(!!i.templateName&&(lwr.has(i.templateName)||!!n?.some(u=>u.name===i.templateName))))return null;let o=i.templateBlock??t,{layers:s,source:l}=w4(o,{theme:e,viewport:r,customTemplates:n,persistentLayers:false});return s.length===0||l==="fallback"?null:{...o,layers:s}}function Act({block:t,depth:e,theme:r,basePath:n,showCodeCopyButton:i,onCopyCode:a,fenceRenderers:o,viewport:s,customTemplates:l}){let u=e===0?"h2":e===1?"h3":"h4",d=cr(()=>cwr(t,r,s,l),[t,l,r,s]);return te("section",{className:"squisq-flashcards__content-block","data-source-block-id":t.id,children:[!d&&t.title&&te(u,{className:"squisq-flashcards__content-title",children:t.title}),!d&&t.contents&&t.contents.length>0&&te(X0,{nodes:t.contents,theme:r,showCodeCopyButton:i,onCopyCode:a,fenceRenderers:o}),(d||t.layers&&t.layers.length>0)&&te("div",{className:"squisq-flashcards__canvas",style:{aspectRatio:`${s.width} / ${s.height}`},children:te(Bl,{block:d??t,blockTime:Math.max(0,t.duration??0),basePath:n,viewport:s,animationsEnabled:false,theme:r,muted:true})}),!d&&t.children?.map(h=>te(Act,{block:h,depth:e+1,theme:r,basePath:n,showCodeCopyButton:i,onCopyCode:a,fenceRenderers:o,viewport:s,customTemplates:l},h.id))]})}function BR(t){return te("div",{className:"squisq-flashcards__face-content",children:t.face.blocks.map(e=>te(Act,{block:e,depth:0,...t},e.id))})}function uwr(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=Math.imul(e,16777619);return e>>>0}function Ect(t,e){let r=[...t],n=uwr(e)||1,i=()=>{n+=1831565813;let a=n;return a=Math.imul(a^a>>>15,a|1),a^=a+Math.imul(a^a>>>7,a|61),((a^a>>>14)>>>0)/4294967296};for(let a=r.length-1;a>0;a--){let o=Math.floor(i()*(a+1));[r[a],r[o]]=[r[o],r[a]];}return r}function dwr(t){return te(BR,{...t,face:t.choice.content})}function hwr(t){return t instanceof Element&&!!t.closest('button, a, input, select, textarea, [contenteditable="true"]')}function _ct({doc:t,theme:e,basePath:r=".",source:n="auto",shuffle:i=false,globalKeyboardShortcuts:a=false,showCodeCopyButton:o=false,onCopyCode:s,fenceRenderers:l,viewport:u=Yi.landscape,className:d}){let h=cr(()=>e??By(t),[t,e]),f=cr(()=>qW(t,{source:n}),[t,n]),[p,m]=Rr(i),[g,y]=Rr(1),[b,v]=Rr(0),[x,C]=Rr(false),[T,k]=Rr(null),[S,E]=Rr({}),[A,R]=Rr(null),P=xr(null),L=cr(()=>p?Ect(f.cards,`${t.articleId}:${g}`):[...f.cards],[f.cards,t.articleId,g,p]),_=cr(()=>A?A.map(re=>L.find(Ce=>Ce.id===re)).filter(re=>!!re):L,[L,A]),D=_[b],I=_.length>0&&b>=_.length,N=Zr(()=>{v(0),C(false),k(null);},[]),B=Zr(()=>{E({}),R(null),N(),y(re=>re+1);},[N]);kr(()=>{E({}),R(null),N();},[f,N]),kr(()=>{P.current&&(P.current.scrollTop=0);},[b,A]);let O=Zr(()=>{D&&(C(true),D.kind==="multiple-choice"&&T===null&&E(re=>({...re,[D.id]:"again"})));},[D,T]),$=Zr(()=>{if(D){if(!x){O();return}v(re=>re+1),C(false),k(null);}},[D,O,x]),F=Zr(()=>{if(I){v(Math.max(0,_.length-1)),C(true);return}if(x){C(false),k(null);return}b>0&&(v(re=>re-1),C(true),k(null));},[b,I,x,_.length]),H=Zr(re=>{!D||x||(k(re.id),C(true),E(Ce=>({...Ce,[D.id]:re.correct?"got-it":"again"})));},[D,x]),q=Zr(re=>{D&&(E(Ce=>({...Ce,[D.id]:re})),v(Ce=>Ce+1),C(false),k(null));},[D]),z=Zr(re=>{if(!(re.defaultPrevented||hwr(re.target))){if(/^[1-9]$/.test(re.key)&&D?.kind==="multiple-choice"&&!x){let Ce=D.choices?.[Number(re.key)-1];Ce&&(re.preventDefault(),H(Ce));return}re.key==="ArrowLeft"?(re.preventDefault(),F()):(re.key==="ArrowRight"||re.key===" "||re.key==="Enter")&&(re.preventDefault(),$());}},[H,D,$,F,x]);kr(()=>{if(!a)return;let re=Ce=>z(Ce);return document.addEventListener("keydown",re),()=>document.removeEventListener("keydown",re)},[a,z]);let G={theme:h,basePath:r,showCodeCopyButton:o,onCopyCode:s,fenceRenderers:l,viewport:u,customTemplates:t.customTemplates},j=yo(h.typography.titleFont,"Georgia, serif"),K=yo(h.typography.bodyFont,"system-ui, sans-serif"),V={"--squisq-flashcards-bg":h.colors.background,"--squisq-flashcards-surface":h.colors.backgroundLight,"--squisq-flashcards-text":h.colors.text,"--squisq-flashcards-muted":h.colors.textMuted,"--squisq-flashcards-primary":h.colors.primary,"--squisq-flashcards-secondary":h.colors.secondary,"--squisq-flashcards-highlight":h.colors.highlight,"--squisq-flashcards-warning":h.colors.warning,"--squisq-flashcards-radius":`${h.style.borderRadius??18}px`,"--squisq-flashcards-title-font":j,"--squisq-flashcards-body-font":K},ie=f.cards.filter(re=>S[re.id]==="again").map(re=>re.id),Z=f.cards.filter(re=>S[re.id]==="got-it").length;if(f.cards.length===0)return te("div",{className:`squisq-flashcards squisq-flashcards--empty${d?` ${d}`:""}`,style:V,role:"region","aria-label":"Flashcards",children:te("div",{className:"squisq-flashcards__empty-card",children:[te("h2",{children:"No complete flashcards yet"}),te("p",{children:"Add an answer beneath a heading, or nest an answer block under a question."}),f.diagnostics.length>0&&te("ul",{children:f.diagnostics.map((re,Ce)=>te("li",{children:re.message},`${re.blockId}-${re.code}-${Ce}`))})]})});if(I)return te("div",{className:`squisq-flashcards${d?` ${d}`:""}`,style:V,role:"region","aria-label":"Flashcard session summary",tabIndex:0,onKeyDown:a?void 0:z,children:te("div",{className:"squisq-flashcards__summary",children:[te("span",{className:"squisq-flashcards__eyebrow",children:"Session complete"}),te("h2",{children:[Z," remembered"]}),te("p",{children:ie.length===0?`You completed all ${f.cards.length} cards.`:`${ie.length} ${ie.length===1?"card needs":"cards need"} another look.`}),te("div",{className:"squisq-flashcards__summary-actions",children:[ie.length>0&&te("button",{type:"button",className:"squisq-flashcards__button squisq-flashcards__button--primary",onClick:()=>{R(ie),N();},children:"Retry missed"}),te("button",{type:"button",className:"squisq-flashcards__button",onClick:B,children:"Study again"}),te("button",{type:"button",className:"squisq-flashcards__button",onClick:F,children:"Previous card"})]})]})});let le=D?.choices?Ect(D.choices,`${D.id}:${g}`):[],ae=le.find(re=>re.id===T);return te("div",{className:`squisq-flashcards${d?` ${d}`:""}`,style:V,role:"region","aria-label":"Flashcards",tabIndex:0,onKeyDown:a?void 0:z,children:[te("header",{className:"squisq-flashcards__header",children:[te("div",{className:"squisq-flashcards__deck-copy",children:[te("span",{className:"squisq-flashcards__eyebrow",children:"Flashcards"}),f.title&&te("h1",{children:f.title})]}),te("div",{className:"squisq-flashcards__tools",children:[te("button",{type:"button",className:"squisq-flashcards__tool","aria-pressed":p,onClick:()=>{m(re=>!re),B();},children:"Shuffle"}),te("button",{type:"button",className:"squisq-flashcards__tool",onClick:B,children:"Restart"})]})]}),te("div",{className:"squisq-flashcards__progress-row",children:[te("span",{children:["Card ",b+1," of ",_.length]}),te("span",{children:x?"Answer revealed":"Question"})]}),te("div",{className:"squisq-flashcards__progress","aria-hidden":"true",children:te("span",{style:{width:`${(b+(x?1:0))/_.length*100}%`}})}),te("main",{ref:P,className:"squisq-flashcards__card","data-card-kind":D.kind,"aria-label":"Scrollable flashcard content",tabIndex:0,children:[D.label&&te("div",{className:"squisq-flashcards__label",children:D.label}),te("section",{className:"squisq-flashcards__front","aria-label":"Question",children:te(BR,{...G,face:D.front})}),D.kind==="multiple-choice"&&te("div",{className:"squisq-flashcards__choices",role:"group","aria-label":"Answer choices",children:le.map((re,Ce)=>{let me=T===re.id,Me=x?re.correct?"correct":me?"incorrect":"idle":"idle";return te("button",{type:"button",className:"squisq-flashcards__choice","data-choice-status":Me,"aria-pressed":me,disabled:x,onClick:()=>H(re),children:[te("span",{className:"squisq-flashcards__choice-key","aria-hidden":"true",children:Ce+1}),te(dwr,{...G,choice:re})]},re.id)})}),x&&D.kind==="basic"&&te("section",{className:"squisq-flashcards__answer","aria-label":"Answer",children:[te("span",{className:"squisq-flashcards__answer-label",children:"Answer"}),te(BR,{...G,face:D.back})]}),x&&D.kind==="multiple-choice"&&te("div",{className:"squisq-flashcards__feedback","data-correct":ae?.correct===true,"aria-live":"polite",children:[te("strong",{children:ae===void 0?"Answer revealed":ae.correct?"Correct":"Not quite"}),!ae?.correct&&te("div",{className:"squisq-flashcards__correct-answer",children:[te("span",{children:"The correct answer is"}),te(BR,{...G,face:D.back})]})]}),x&&D.explanation&&te("section",{className:"squisq-flashcards__explanation","aria-label":"Explanation",children:[te("span",{className:"squisq-flashcards__answer-label",children:"Explanation"}),te(BR,{...G,face:D.explanation})]})]}),te("footer",{className:"squisq-flashcards__footer",children:[te("button",{type:"button",className:"squisq-flashcards__button",disabled:b===0&&!x,onClick:F,children:"Previous"}),te("div",{className:"squisq-flashcards__primary-actions",children:x&&D.kind==="basic"?te(Nn,{children:[te("button",{type:"button",className:"squisq-flashcards__button",onClick:()=>q("again"),children:"Again"}),te("button",{type:"button",className:"squisq-flashcards__button squisq-flashcards__button--primary",onClick:()=>q("got-it"),children:"Got it"})]}):te("button",{type:"button",className:"squisq-flashcards__button squisq-flashcards__button--primary",onClick:$,children:x?b===_.length-1?"Finish":"Next card":"Reveal answer"})})]}),te("p",{className:"squisq-flashcards__shortcut-hint",children:["Use \u2190 and \u2192 to navigate, Space to reveal",D.kind==="multiple-choice"?", or 1\u20139 to answer":"","."]})]})}var fwr=new Set(["a","an","the","and","but","or","for","nor","on","at","to","in","of","by","is"]);function Nue(t){let e=new Map;for(let r of t.blocks)if(ql(r)&&r.template==="sectionHeader"&&"title"in r){let n=r.audioSegment;e.has(n)||e.set(n,r.title);}for(let r=0;r<t.audio.segments.length;r++){if(e.has(r))continue;let n=t.audio.segments[r].name;if(n.includes("intro"))e.set(r,"Introduction");else if(n.includes("flight-context"))e.set(r,"Flight Context");else {let i=n.split("-").map((a,o)=>o===0||!fwr.has(a)?a.charAt(0).toUpperCase()+a.slice(1):a).join(" ");e.set(r,i);}}return e}function hq(t,e,r){if(t)return Object.prototype.hasOwnProperty.call(t,e)?t[e]:t[r]}function pwr(t){if(typeof t!="string")return;let e=t.trim().toLowerCase();if(e==="background"||e==="behind")return "background";if(e==="full-frame"||e==="fullscreen"||e==="full")return "full-frame";if(e==="picture-in-picture"||e==="pip"||e==="overlay")return "picture-in-picture"}function mwr(t){if(typeof t!="string")return;let e=t.trim().toLowerCase();if(e==="small"||e==="sm"||e==="pip-small")return "small";if(e==="large"||e==="lg"||e==="big"||e==="pip-large")return "large"}function gwr(t){if(typeof t!="string")return;let e=t.trim().toLowerCase();if(e==="square"||e==="1:1")return "square";if(e==="wide"||e==="16:9"||e==="widescreen")return "wide"}function ywr(t){if(typeof t!="string")return;let e=t.trim().toLowerCase().replace(/[_\s]+/g,"-");return {"top-left":"top-left","upper-left":"top-left","top-right":"top-right","upper-right":"top-right","bottom-left":"bottom-left","lower-left":"bottom-left","bottom-right":"bottom-right","lower-right":"bottom-right"}[e]}function Rct(t,e={}){let r=t.frontmatter,n=LW(r,{...e.showCoverSlide!==void 0?{enabled:e.showCoverSlide}:{},...e.coverSlideTemplate!==void 0?{template:e.coverSlideTemplate}:{},...e.coverSlideDuration!==void 0?{duration:e.coverSlideDuration}:{},...e.coverSlidePlayback!==void 0?{playback:e.coverSlidePlayback}:{}});return {theme:e.theme??By(t),videoPresentation:e.videoPresentation??pwr(hq(r,"squisq-video-presentation","video-presentation"))??"background",pipSize:e.pipSize??mwr(hq(r,"squisq-pip-size","pip-size"))??"small",pipShape:e.pipShape??gwr(hq(r,"squisq-pip-shape","pip-shape"))??"square",pipPosition:e.pipPosition??ywr(hq(r,"squisq-pip-position","pip-position"))??"bottom-right",showCoverSlide:n.enabled,coverSlideTemplate:n.template,coverSlideDuration:n.duration,coverSlidePlayback:n.playback}}function VE(t){return Number.isFinite(t)?`${t.toFixed(3)}s`:String(t)}function FR(t,e){let r=t.duration;return Number.isFinite(r)?Math.max(0,Math.min(e,r)):e}function Oue(t,e){return Math.abs(t.currentTime-FR(t,e))<=.01}function Lct(t){if(!t.isConnected)return false;let e=t.ownerDocument.defaultView;if(!e)return false;for(let r=t;r;r=r.parentElement){let n=e.getComputedStyle(r);if(n.display==="none"||n.visibility==="hidden"||n.visibility==="collapse"||Number.parseFloat(n.opacity||"1")<=0)return false}return true}function Ict(t,e,r){let n=null,i=()=>{n!==null&&(clearTimeout(n),n=null);};return {arm:()=>{i(),t.visibilityState==="visible"&&(n=setTimeout(r,e));},clear:i}}function Mct(t,e,r=2e3){return t.pause(),new Promise((n,i)=>{let a=false,o=null,s=t.ownerDocument,l=()=>s.visibilityState!=="visible",u=()=>{m.clear(),clearInterval(b),t.removeEventListener("seeked",p),t.removeEventListener("loadeddata",p),t.removeEventListener("canplay",p),s.removeEventListener("visibilitychange",y),o!==null&&typeof t.cancelVideoFrameCallback=="function"&&t.cancelVideoFrameCallback(o);},d=()=>{a||(a=true,u(),n());},h=()=>{a||(a=true,u(),i(new Error(`Video frame did not become ready at ${VE(e)} within ${r}ms (currentTime=${VE(t.currentTime)}, reachableTime=${VE(FR(t,e))}, duration=${VE(t.duration)}, readyState=${t.readyState}, seeking=${String(t.seeking)}, visible=${String(Lct(t))}).`)));},f=()=>{if(!(a||t.seeking||t.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||!Oue(t,e))){if(typeof t.requestVideoFrameCallback!="function"||!Lct(t)){d();return}o===null&&(o=t.requestVideoFrameCallback(()=>{o=null,d();}));}};function p(){f();}let m=Ict(s,r,h),g=()=>{try{return t.currentTime=FR(t,e),queueMicrotask(f),!0}catch(v){return a=true,u(),i(v),false}};function y(){if(!a){if(l()){m.clear();return}f(),!a&&(!t.seeking&&!Oue(t,e)&&!g()||m.arm());}}let b=setInterval(f,16);t.addEventListener("seeked",p),t.addEventListener("loadeddata",p),t.addEventListener("canplay",p),s.addEventListener("visibilitychange",y),m.arm(),g();})}function bwr(t,e,r){return new Promise((n,i)=>{let a=false,o=t.ownerDocument,s=()=>o.visibilityState!=="visible",l=()=>{g.clear(),clearInterval(x),t.removeEventListener("timeupdate",f),t.removeEventListener("loadeddata",f),t.removeEventListener("canplay",f),t.removeEventListener("error",h),o.removeEventListener("visibilitychange",v);},u=()=>{a||(a=true,l(),n());},d=()=>{a||(a=true,t.pause(),l(),Mct(t,e,r).then(n,i));},h=()=>{a||(a=true,t.pause(),l(),i(new Error(`Video frame did not advance to ${VE(e)} within ${r}ms (currentTime=${VE(t.currentTime)}, readyState=${t.readyState}).`)));};function f(){t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&t.currentTime>=FR(t,e)&&(t.pause(),u());}let p=()=>{a||s()||d();},m=()=>{if(!(a||s()))try{t.playbackRate=1,t.paused&&t.play().catch(p);}catch{p();}},g=Ict(o,r,h),y=()=>{t.pause(),g.clear();},b=()=>{a||s()||(f(),!a&&(m(),g.arm()));};function v(){if(o.visibilityState!=="visible"){y();return}b();}let x=setInterval(f,16);t.addEventListener("timeupdate",f),t.addEventListener("loadeddata",f),t.addEventListener("canplay",f),t.addEventListener("error",h,{once:true}),o.addEventListener("visibilitychange",v),b();})}function Pue(t,e,r=2e3){if(t.readyState>=HTMLMediaElement.HAVE_METADATA&&t.videoWidth<=0&&t.videoHeight<=0)return t.pause(),Promise.resolve();let i=FR(t,e)-t.currentTime;if(t.dataset.captureSequential==="true"){if(t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&i<=.01)return i<-0.01&&t.pause(),Promise.resolve();if(i>0&&i<=.5&&t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA)return bwr(t,e,r)}return t.pause(),!t.seeking&&t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&Oue(t,e)?Promise.resolve():Mct(t,e,r)}function vwr(){try{return typeof process<"u"&&!1}catch{return false}}var Dct=false,xwr=100,Nct=1e-6;function Bue(){return new Promise(t=>{let e=false,r=null,n=()=>{e||(e=true,window.clearTimeout(i),r!==null&&window.cancelAnimationFrame(r),t());},i=window.setTimeout(n,document.visibilityState==="visible"?xwr:0);document.visibilityState==="visible"&&(r=window.requestAnimationFrame(n));})}function Oct(t){let{doc:e,markdown:r}=t,n=cr(()=>!e&&r!==void 0?wx(id(r)):void 0,[e,r]),i=e??n;return i?t.displayMode==="flashcards"?te("div",{className:"doc-player doc-player--flashcards",children:te(_ct,{doc:i,basePath:t.basePath,theme:t.theme,globalKeyboardShortcuts:t.globalKeyboardShortcuts,showCodeCopyButton:t.showCodeCopyButton,onCopyCode:t.onCopyCode,fenceRenderers:t.fenceRenderers,viewport:t.forceViewport})}):te(wwr,{...t,doc:i}):te("div",{className:"doc-player doc-player--empty"})}function wwr({doc:t,basePath:e=".",renderMode:r=false,animationsEnabled:n=true,autoPlay:i=false,loop:a=false,onEnded:o,onTimeUpdate:s,audioController:l,audioMode:u="media",showControls:d=true,showScrubber:h=false,muted:f=false,captionsEnabled:p,onCaptionsToggle:m,onPlaybackStateChange:g,onControlsReady:y,onRenderAPIReady:b,isFullscreen:v=false,onFullscreenToggle:x,onBlockMarkers:C,forceViewport:T,displayMode:k="video",dashboardLayout:S,dashboardShowTitle:E,dashboardStyle:A,dashboardDocumentTitle:R,showCoverSlide:P,coverSlideTemplate:L,coverSlideDuration:_,coverSlidePlayback:D,coverVisible:I,theme:N,surface:B,captionStyle:O="standard",captionPosition:$,videoPresentation:F,pipSize:H,pipShape:q,pipPosition:z,enableSwipe:G=true,globalKeyboardShortcuts:j=false,showCodeCopyButton:K=false,onCopyCode:V,fenceRenderers:ie}){let Z=k==="slideshow",le=k==="linear",ae=k==="dashboard",re=xr(null),Ce=xr(null),me=`squisq-player-${tl().replace(/:/g,"")}`,[Me,Le]=Rr(null),Be=xr(),{viewport:de}=Zlt(),fe=T||(r?Yi.landscape:de),Ee=fe.height>fe.width?"portrait":"landscape",pe=cr(()=>typeof window>"u"?false:new URLSearchParams(window.location.search).get("debug")==="true",[]),oe=cr(()=>u==="synthetic"?KR(t):0,[u,t]),J=Klt(re,t.audio,e,!l,u,oe),he=l||J;kr(()=>{if(Dct||!vwr())return;let _t=Ce.current;if(!_t||typeof getComputedStyle!="function")return;getComputedStyle(_t).getPropertyValue("--squisq-styles-loaded").trim()||(Dct=true,console.warn('[squisq] @bendyline/squisq-react/styles is not loaded \u2014 import "@bendyline/squisq-react/styles"'));},[]);let{currentTime:ke,isPlaying:ue,currentSegment:ye,totalDuration:_e,isEnded:xe,isReady:se,isAvailable:U,unavailableMessage:ge,play:Q,pause:be,toggle:ee,seekTo:Ge,skipToSegment:Ie,restart:ze}=he,[qe,Xe]=Rr(null),We=qe?.doc===t?qe.time:null,Ke=r?We??ke:ke,Ue=cr(()=>Fv(t),[t]),rt=rye(Ue,e),Se=cr(()=>Fv(t,{intrinsicDuration:_t=>rt.get(_t.src)}),[t,rt]),St=Zr(()=>{if(r)return;let _t=Ce.current;if(!_t)return;_t.querySelectorAll('.doc-player__block--active video[data-clip-start], [data-clip-id][data-active="true"]').forEach(Bn=>{let is=Bn.play();is&&is.catch(()=>{});});},[r]),Ne=Zr(()=>(St(),Q()),[Q,St]),pt=Zr(()=>(ue||St(),ee()),[ue,St,ee]),Et=xr(Ke);Et.current=Ke;let $t=xr(Ke),vt=xr([]),Dt=xr(_e);Dt.current=_e;let wt=xr(0);vm(()=>{$t.current=Ke;let _t=vt.current;vt.current=_t.filter(Qr=>Math.abs(Qr.time-Ke)>Nct?true:(Qr.resolve(),false));},[Ke]),kr(()=>()=>{let _t=new Error("DocPlayer unmounted before the requested frame committed.");vt.current.splice(0).forEach(Qr=>Qr.reject(_t));},[]);let Te=Zr(_t=>Math.abs($t.current-_t)<=Nct?Promise.resolve():new Promise((Qr,Bn)=>{vt.current.push({time:_t,resolve:Qr,reject:Bn});}),[]),yt=Zr(_t=>{if(r||le)return;let Qr=_t.target;if(Z){Qr.closest('button, a, input, textarea, select, [contenteditable="true"]')||Ce.current?.focus({preventScroll:true});return}if(Qr.closest('button, a, input, textarea, select, [contenteditable="true"], .doc-player__controls, .doc-player__scrubber, .doc-controls-sidebar, .doc-controls-slideshow'))return;Ce.current?.focus({preventScroll:true}),pt(),Le(ue?"pause":"play"),clearTimeout(Be.current),Be.current=setTimeout(()=>Le(null),600);},[r,pt,ue,Z,le]),bt=lq(B==="auto"),it=B==="auto"?bt:B,Tt=cr(()=>Rct(t,{theme:N,videoPresentation:F,pipSize:H,pipShape:q,pipPosition:z,showCoverSlide:P,coverSlideTemplate:L,coverSlideDuration:_,coverSlidePlayback:D}),[t,N,F,H,q,z,P,L,_,D]),br=cr(()=>{let _t=Tt.theme;return it?o5(_t,it):_t},[Tt.theme,it]),Oe=cr(()=>Jq(br),[br]),et=Oe,gt=cr(()=>({border:Oe["--squisq-pip-border"],borderRadius:Oe["--squisq-pip-radius"],boxShadow:Oe["--squisq-pip-shadow"]}),[Oe]),{currentBlock:dt,currentBlockIndex:Vt,previousBlock:wr,isEntering:Yr,isExiting:Zt,blockTime:ar,docProgress:ut,blocks:Ft,suppressOutgoingForNextBlock:Nr}=Qlt(t,Ke,{viewport:fe,theme:br,onSeek:Ge,useAudioSegmentTiming:u!=="synthetic"}),$r=cr(()=>{let _t=t.startBlock;if(!Tt.showCoverSlide||!_t)return null;let Qr=jd(br,0,1,fe);return {id:"cover-block",startTime:-1,duration:0,audioSegment:-1,layers:fW(_t,Qr,Tt.coverSlideTemplate)}},[t.startBlock,fe,br,Tt.showCoverSlide,Tt.coverSlideTemplate]),Or=!!$r,[Pt,kt]=Rr(false),[Gt,jt]=Rr(false),At=xr("");kr(()=>{let _t=`${t.articleId}:${Z}:${Or}:${r}`;At.current!==_t&&(At.current=_t,Z&&Or&&!r?(kt(true),be()):kt(false));},[t.articleId,Z,Or,r,be]);let[Er,Re]=Rr(false),[ei,Fe]=Rr(false),Ar=xr(),ki=xr(false),Ka=xr(false);kr(()=>{Ka.current=false,ki.current=false,clearTimeout(Ar.current),Fe(false),Re(false);},[t]),$r&&!Z&&!ue&&Ke===0&&!Ka.current&&!r&&!i&&(ki.current=true),kr(()=>{ue&&ki.current&&$r&&!r&&!Z&&(ki.current=false,Ka.current=true,Fe(true),Ar.current=setTimeout(()=>Fe(false),Tt.coverSlideDuration*1e3));},[ue,$r,r,Z,Tt.coverSlideDuration]),kr(()=>()=>clearTimeout(Ar.current),[]),kr(()=>()=>clearTimeout(Be.current),[]);let Yd=!Z&&!le&&!!$r&&(Er||ei||!ue&&Ke===0&&!Ka.current&&!r&&!i),ou=I??Pt,Ti=!!(Z&&!le&&!r&&$r&&ou),wa=I===void 0?Yd||Ti:!!$r&&I,ka=!!(Z&&!r&&$r),Qa=ka?ou?0:Vt+1:Vt,su=ka?Ft.length+1:Ft.length,Ba=xr(false);kr(()=>{Ba.current=false;},[t]),kr(()=>{se&&i&&!Ba.current&&(Ba.current=true,Ne());},[se,i,Ne]),kr(()=>{s?.(Ke);},[Ke,s]),kr(()=>{xe&&(o?.(),a&&!Z&&!le&&!ae&&ze());},[xe,ae,le,Z,a,o,ze]);let Fl=xr(null),Fa=xr(null);if(!Fa.current){let _t=()=>{let Qr=Fl.current;if(!Qr)throw new Error("Squisq render API is not currently available.");return Qr};Fa.current={seekTo:Qr=>_t().seekTo(Qr),getRenderedTime:()=>_t().getRenderedTime(),getDuration:()=>_t().getDuration(),getBlocks:()=>_t().getBlocks(),getAudioSegments:()=>_t().getAudioSegments(),getCaptions:()=>_t().getCaptions(),getChapters:()=>_t().getChapters(),showCover:()=>_t().showCover(),hideCover:()=>_t().hideCover(),hasCoverBlock:()=>_t().hasCoverBlock()};}let pm=Fa.current;kr(()=>{if(ae||!r&&!pe){Fl.current=null;return}let _t=Ce.current;if(!_t){Fl.current=null;return}let que={seekTo:async Ci=>{if(r){let Tc=Te(Ci);Rde(()=>Xe({doc:t,time:Ci})),l&&Ge(Ci).catch(()=>{}),await Tc;}else await Ge(Ci);let Z0=0;for(let Tc=Ft.length-1;Tc>=0;Tc--)if(Ci>=Ft[Tc].startTime){Z0=Ft[Tc].startTime;break}let qR=(Ci-Z0)*1e3;(_t.getAnimations?.()??[]).forEach(Tc=>{let Ku=Tc.effect?.target;Ku&&(Ku.closest(".doc-player__block--active")||Ku.closest(".doc-player__block--previous"))&&(Tc.currentTime=Math.max(0,qR));});let qct=Ci-Z0,pq=[],zue=_t.querySelector(".doc-player__block--active");zue&&zue.querySelectorAll("video[data-clip-start]").forEach(Ku=>{let J0=Ku,mq=parseFloat(J0.dataset.clipStart||"0"),gq=parseFloat(J0.dataset.clipEnd||"0"),yq=parseFloat(J0.dataset.startAt||"0"),zct=Math.min(mq+Math.max(0,qct-yq),gq);pq.push(Pue(J0,zct));}),_t.querySelectorAll("video[data-clip-id]").forEach(Tc=>{let Ku=Tc,J0=parseFloat(Ku.dataset.absStart||"0"),mq=parseFloat(Ku.dataset.absEnd||"0"),gq=parseFloat(Ku.dataset.sourceIn||"0");if(Ku.pause(),Ci<J0||Ci>=mq)return;let yq=gq+(Ci-J0);pq.push(Pue(Ku,yq));}),await Promise.all(pq),await Bue();},getRenderedTime:()=>$t.current,getDuration:()=>{let Ci=KR(t);return _e>0?Math.max(_e,Ci):Ci},getBlocks:()=>Ft.map(Ci=>({id:Ci.id,template:Ci.template??"raw",startTime:Ci.startTime,duration:Ci.duration})),getAudioSegments:()=>t.audio.segments.map(Ci=>({src:Ci.src,name:Ci.name,duration:Ci.duration,startTime:Ci.startTime})),getCaptions:()=>t.captions?.phrases?.map(Ci=>({text:Ci.text,startTime:Ci.startTime,endTime:Ci.endTime}))||[],getChapters:()=>{let Ci=Nue(t);return t.audio.segments.map((Z0,qR)=>({title:Ci.get(qR)||Z0.name,startTime:Z0.startTime,duration:Z0.duration}))},showCover:()=>(Re(true),Bue()),hideCover:()=>(Re(false),Bue()),hasCoverBlock:()=>!!$r};return Fl.current=que,()=>{Fl.current===que&&(Fl.current=null);}},[r,pe,Ge,_e,Ft,$r,t,l,Te,ae]),kr(()=>{if(!ae){if(!r&&!pe||!Ce.current){b?.(null);return}return b?.(pm),()=>b?.(null)}},[r,pe,ae,b,pm]);let $l=p===false?"off":O||"standard",[Ta,mm]=Rr($l);kr(()=>{mm($l);},[$l]);let Ot=Ta!=="off",Pe=Ta==="social"?"social":"standard",tt=Zr(_t=>{mm(_t?O||"standard":"off"),m?.(_t);},[m,O]),xt=Zr(()=>{mm(_t=>{let Qr=_t==="off"?"standard":_t==="standard"?"social":"off";return m?.(Qr!=="off"),Qr});},[m]),er=t.captions&&t.captions.phrases.length>0,hr=cr(()=>Nue(t),[t]),_r=cr(()=>({isPlaying:ue,currentTime:Ke,totalDuration:_e,isCoverVisible:wa,currentBlockIndex:Qa,totalBlocks:su,docProgress:ut,hasCaptions:!!er,captionsEnabled:Ot,captionMode:Ta,isFullscreen:v,currentSegmentIndex:ye,currentSegmentName:hr.get(ye)??t.audio.segments[ye]?.name??null,currentBlock:Ti?$r:dt??null,currentSlideLabel:Ti?"Cover":void 0,currentSlideNumber:ka&&!Ti?Vt+1:void 0,totalSlideNumber:ka?Ft.length:void 0}),[ue,Ke,_e,wa,Qa,su,ut,er,Ot,Ta,v,ye,hr,dt,Vt,Ti,$r,ka,Ft.length]),yn=cr(()=>({toggle:pt,restart:ze,seekTo:Ge,setCaptionsEnabled:tt,cycleCaptionMode:xt,toggleFullscreen:x}),[pt,ze,Ge,tt,xt,x]),Un=cr(()=>({nextSlide:()=>{if(ka&&Pt){let _t=Ft[0];_t&&(kt(false),Ge(_t.startTime),be());return}if(Vt<Ft.length-1){let _t=Ft[Vt+1];_t&&(kt(false),Ge(_t.startTime),be());}},prevSlide:()=>{if(ka&&!Pt&&Vt<=0){kt(true),Ge(0),be();return}if(Vt>0){let _t=Ft[Vt-1];_t&&(kt(false),Ge(_t.startTime),be());}},goToSlide:_t=>{if(ka){if(_t===0){kt(true),Ge(0),be();return}let Qr=Ft[_t-1];Qr&&(kt(false),Ge(Qr.startTime),be());return}if(_t>=0&&_t<Ft.length){let Qr=Ft[_t];Qr&&(Ge(Qr.startTime),be());}}}),[Vt,Ft,Ge,be,ka,Pt]),mo=Z&&!le&&!r&&G,go=Zr(_t=>{let Qr=_t-(ka?1:0),Bn=Ft[Qr];Bn&&Nr(Bn.id);},[Ft,ka,Nr]),jE=Zr(()=>{go(Qa+1),Un.nextSlide();},[go,Qa,Un]),ns=Zr(()=>{go(Qa-1),Un.prevSlide();},[go,Qa,Un]),gm=Jlt({enabled:mo,containerRef:Ce,canGoNext:Qa<su-1,canGoPrev:Qa>0,onNext:jE,onPrev:ns});kr(()=>{g?.(_r);},[_r,g]),kr(()=>{y?.({play:Ne,pause:be,...yn});},[Ne,be,yn,y]);let Q0=Zr(_t=>{let Qr=_t;if(ql(Qr)){let Bn=Qr;if(typeof Bn.title=="string")return Bn.title;if(typeof Bn.stat=="string")return Bn.stat;if(typeof Bn.quote=="string"){let is=Bn.quote.split(`
|
|
4148
4148
|
`)[0];return is.length<=30?is:is.slice(0,27)+"..."}if(typeof Bn.date=="string")return Bn.date;if(typeof Bn.fact=="string")return Bn.fact}if(_t.layers&&Array.isArray(_t.layers)){let Bn=_t.layers.find(is=>is.type==="text");if(Bn?.content?.text){let is=Bn.content.text.split(`
|
|
4149
4149
|
`)[0];return is.length<=30?is:is.slice(0,27)+"..."}}return _t.id.replace(/-/g," ").replace(/\b\w/g,Bn=>Bn.toUpperCase())},[]),Fct=cr(()=>{let _t=Ft.map((Qr,Bn)=>({id:Qr.id,label:String(Bn+1),summary:Q0(Qr)}));return !ka||!$r?_t:[{id:"__cover__",label:"Cover",summary:Q0($r)},..._t]},[$r,Ft,Q0,ka]),XE=cr(()=>{if(!_e||!Ft.length)return [];let _t=-1;return Ft.map((Qr,Bn)=>{let is=Qr.audioSegment!==_t;return _t=Qr.audioSegment,{block:Qr,index:Bn,position:Qr.startTime/_e*100,title:Q0(Qr),isSectionStart:is}})},[Ft,_e,Q0]);kr(()=>{XE.length>0&&C?.(XE);},[XE,C]),wt.current=Z?su:Ft.length;let $R=Zr((_t,Qr)=>{if(_t.defaultPrevented||_t.altKey||_t.ctrlKey||_t.metaKey||_t.shiftKey)return;let Bn=_t.target instanceof Element?_t.target:null,is=!!Bn?.closest('input, textarea, select, [contenteditable]:not([contenteditable="false"]), [role="textbox"], [role="combobox"], [role="listbox"], [role="slider"], [role="spinbutton"], .monaco-editor'),Fue=!!Bn?.closest('[role="menu"], [role="dialog"], [aria-modal="true"]'),$ue=Z&&!!Bn?.closest(".doc-controls-slideshow")&&!Bn.closest('[role="menu"]');if(!(is||Qr&&Fue||!Qr&&Bn?.closest('input, textarea, select, button, a, [contenteditable]:not([contenteditable="false"]), [role="textbox"]')&&!$ue)&&!(le||ae)){if(_t.key==="f"||_t.key==="F"){if(!x)return;_t.preventDefault(),x();return}if(Z)switch(_t.key){case "ArrowRight":case "ArrowDown":case " ":_t.preventDefault(),Un.nextSlide();break;case "ArrowLeft":_t.preventDefault(),Un.prevSlide();break;case "ArrowUp":_t.preventDefault(),jt(true);break;case "Home":_t.preventDefault(),Un.goToSlide(0);break;case "End":_t.preventDefault(),Un.goToSlide(wt.current-1);break}else switch(_t.key){case " ":_t.preventDefault(),pt();break;case "ArrowRight":_t.preventDefault(),Ge(Math.min(Et.current+10,Dt.current));break;case "ArrowLeft":_t.preventDefault(),Ge(Math.max(Et.current-10,0));break}}},[Z,le,ae,pt,Ge,Un,x]),$ct=Zr(_t=>$R(_t,false),[$R]);return kr(()=>{if(!j||r||le||ae)return;let _t=Qr=>{$R(Qr,true);};return document.addEventListener("keydown",_t),()=>document.removeEventListener("keydown",_t)},[j,$R,ae,le,r]),le?te("div",{ref:Ce,"data-player-id":me,className:"doc-player doc-player--linear",style:{position:"relative",width:"100%",height:"100%",overflow:"hidden"},children:te(dq,{doc:t,basePath:e,viewport:fe,theme:N,surface:B,animationsEnabled:n,showCodeCopyButton:K,onCopyCode:V,fenceRenderers:ie})}):ae?te("div",{ref:Ce,"data-player-id":me,className:"doc-player doc-player--dashboard",style:{position:"relative",width:"100%",aspectRatio:`${fe.width} / ${fe.height}`,margin:"0 auto",overflow:"hidden"},children:te(Sct,{doc:t,theme:N,viewport:fe,layout:S,showTitle:E,style:A,documentTitle:R,basePath:e,animationsEnabled:n,muted:r||f,renderMode:r||pe,onRenderAPIReady:b})}):te("div",{ref:Ce,"data-player-id":me,"data-orientation":Ee,"data-playback-state":ue?"playing":"paused","data-swipe-phase":gm.phase,tabIndex:r?-1:0,role:"region","aria-label":"Document player",onKeyDown:r?void 0:$ct,className:`doc-player${mo?" doc-player--swipe":""}${gm.phase==="dragging"?" doc-player--grabbing":""}`,onClick:yt,onPointerDown:gm.onPointerDown,style:{...et,position:"relative",width:"100%",aspectRatio:`${fe.width} / ${fe.height}`,margin:"0 auto",overflow:"hidden",cursor:r||mo?void 0:"pointer",touchAction:mo?"pan-y":void 0},children:[te("audio",{ref:re,preload:"auto",muted:f}),te(eye,{schedule:Se,currentTime:Ke,isPlaying:ue,basePath:e,renderMode:r,muted:f,presentation:Tt.videoPresentation,pipSize:Tt.pipSize,pipShape:Tt.pipShape,pipPosition:Tt.pipPosition,pipOrientation:Ee,pipFrameStyle:gt}),te("div",{className:"doc-player__viewport",children:[wa&&$r&&te("div",{className:"doc-player__block doc-player__block--cover",children:te(Bl,{block:$r,blockTime:0,basePath:e,isEntering:false,viewport:fe,muted:r||f,animationsEnabled:n,theme:br})}),n&&!wa&&wr&&Zt&&te("div",{className:"doc-player__block doc-player__block--previous",children:te(Bl,{block:wr,blockTime:ar,basePath:e,isExiting:true,transition:dt?.transition,viewport:fe,muted:r||f,animationsEnabled:n,theme:br})},wr.id),dt&&te("div",{className:`doc-player__block doc-player__block--active${gm.phase!=="idle"?` doc-player__block--${gm.phase}`:""}`,"aria-hidden":wa||void 0,style:wa||gm.phase!=="idle"?{...gm.phase!=="idle"?{transform:`translateX(${gm.offsetPx}px)`}:{},...wa?{opacity:0,pointerEvents:"none"}:{}}:void 0,children:te(Bl,{block:dt,blockTime:ar,basePath:e,isEntering:n&&Yr,viewport:fe,isPlaying:ue,muted:r||f,animationsEnabled:n,theme:br})},dt.id),er&&(r?Ot:true)&&te(Ylt,{captions:t.captions,currentTime:Ke,enabled:Ot&&(r||ue||Ke>0),fontSize:Math.min(34,Math.max(16,Math.round(fe.height*.026))),captionStyle:Pe,captionPosition:$,theme:br,viewport:fe}),pe&&te("div",{className:"doc-player__debug",style:{position:"absolute",top:"8px",right:"8px",padding:"8px 12px",background:"rgba(0, 0, 0, 0.85)",borderRadius:"6px",color:"#00ff00",fontFamily:"monospace",fontSize:"11px",lineHeight:"1.5",zIndex:200,maxWidth:"280px",pointerEvents:"none",textAlign:"left"},children:[te("div",{style:{color:"#ffcc00",fontWeight:"bold",marginBottom:"4px"},children:"DEBUG MODE"}),te("div",{children:[te("span",{style:{color:"#888"},children:"template:"})," ",te("span",{style:{color:"#ff6b6b"},children:dt?.template??"raw"})]}),te("div",{children:[te("span",{style:{color:"#888"},children:"block:"})," ",Vt+1,"/",Ft.length," ",te("span",{style:{color:"#666"},children:["(",dt?.id||"none",")"]})]}),te("div",{children:[te("span",{style:{color:"#888"},children:"time:"})," ",Ke.toFixed(2),"s /"," ",_e.toFixed(1),"s"," ",te("span",{style:{color:"#666"},children:["(progress: ",(ut*100).toFixed(1),"%, scriptDur: ",t.duration.toFixed(1),")"]})]}),te("div",{children:[te("span",{style:{color:"#888"},children:"blockTime:"})," ",ar.toFixed(2),"s /"," ",(dt?.duration||0).toFixed(1),"s"]}),te("div",{children:[te("span",{style:{color:"#888"},children:"segment:"})," ",ye,"/",t.audio.segments.length-1," ",te("span",{style:{color:"#666"},children:["(",t.audio.segments[ye]?.name||"none",")"]})]}),te("div",{children:[te("span",{style:{color:"#888"},children:"viewport:"})," ",fe.name||`${fe.width}x${fe.height}`," ",te("span",{style:{color:"#666"},children:["(",Ee,")"]})]}),te("div",{children:[te("span",{style:{color:"#888"},children:"playing:"})," ",te("span",{style:{color:ue?"#4ade80":"#f87171"},children:ue?"yes":"no"}),wa&&te("span",{style:{color:"#60a5fa"},children:" (cover)"})]}),er&&(()=>{let _t=s5(t.captions,Ke),Qr=Ot&&(ue||Ke>0);return te(Nn,{children:[te("div",{children:[te("span",{style:{color:"#888"},children:"captions:"})," ",t.captions?.phrases.length||0," phrases"," ",te("span",{style:{color:Ot?"#4ade80":"#666"},children:["(",Ot?"on":"off",")"]})]}),te("div",{children:[te("span",{style:{color:"#888"},children:"cc.enabled:"})," ",te("span",{style:{color:Qr?"#4ade80":"#f87171"},children:String(Qr)})," ",te("span",{style:{color:"#666"},children:["(playing=",String(ue)," t>0=",String(Ke>0),")"]})]}),te("div",{children:[te("span",{style:{color:"#888"},children:"cc.phrase:"})," ",te("span",{style:{color:_t?"#4ade80":"#f87171"},children:_t?`"${_t.text.slice(0,30)}..."`:"null"})]}),_t&&te("div",{children:[te("span",{style:{color:"#888"},children:"cc.range:"})," ",te("span",{style:{color:"#60a5fa"},children:[_t.startTime.toFixed(2),"-",_t.endTime.toFixed(2)]})]})]})})()]})]}),!U&&ge&&te("div",{className:"doc-player__unavailable",style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",gap:"16px",background:"rgba(0, 0, 0, 0.7)",color:"rgba(255, 255, 255, 0.9)",fontSize:"14px",zIndex:50},children:[te("span",{style:{fontSize:"32px"},children:"\u{1F50A}"}),te("span",{children:ge})]}),!r&&!Z&&d&&te(ect,{state:_r,actions:yn,blockMarkers:XE,expandedBlocks:Ft,getBlockTitle:Q0}),!r&&!Z&&!d&&h&&te("div",{className:"doc-player__scrubber",style:{position:"absolute",bottom:0,left:0,right:0,padding:"12px 16px 8px",background:"linear-gradient(transparent, rgba(0,0,0,0.6))",display:"flex",alignItems:"center",zIndex:100},children:te(cq,{state:_r,actions:yn,blockMarkers:XE,expandedBlocks:Ft,getBlockTitle:Q0})}),!r&&Z&&d&&te(tct,{state:_r,slideNav:Un,slides:Fct,pickerOpen:Gt,onPickerOpenChange:jt}),!Z&&Me&&te("div",{className:"doc-player__tap-feedback",children:te("svg",{viewBox:"0 0 24 24",fill:"white",width:"48",height:"48",children:Me==="pause"?te("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"}):te("path",{d:"M8 5v14l11-7z"})})},Me)]})}var Pct=".squisq-md-attachment{display:inline-flex;align-items:center;gap:.35em;max-width:100%;border:1px solid color-mix(in srgb,currentColor 22%,transparent);border-radius:999px;padding:.1em .5em;background:color-mix(in srgb,currentColor 8%,transparent);font-size:.86em;line-height:1.35;vertical-align:middle}.squisq-md-attachment>.fa-paperclip{flex:0 0 auto;opacity:.72}.squisq-md-attachment-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@keyframes slowZoomIn{0%{transform:scale(1)}to{transform:scale(1.15)}}.squisq-flashcards{display:flex;flex-direction:column;box-sizing:border-box;width:100%;height:100%;min-height:420px;overflow:hidden;padding:clamp(18px,4vw,48px);color:var(--squisq-flashcards-text);background:radial-gradient(circle at 12% 5%,color-mix(in srgb,var(--squisq-flashcards-primary) 22%,transparent),transparent 34%),var(--squisq-flashcards-bg);font-family:var(--squisq-flashcards-body-font);outline:none}.squisq-flashcards *,.squisq-flashcards *:before,.squisq-flashcards *:after{box-sizing:border-box}.squisq-flashcards__header,.squisq-flashcards__progress-row,.squisq-flashcards__progress,.squisq-flashcards__card,.squisq-flashcards__footer,.squisq-flashcards__shortcut-hint,.squisq-flashcards__summary,.squisq-flashcards__empty-card{width:min(920px,100%);margin-inline:auto}.squisq-flashcards__header,.squisq-flashcards__footer,.squisq-flashcards__progress-row,.squisq-flashcards__tools,.squisq-flashcards__primary-actions,.squisq-flashcards__summary-actions{display:flex;align-items:center;gap:10px}.squisq-flashcards__header,.squisq-flashcards__footer,.squisq-flashcards__progress-row{justify-content:space-between}.squisq-flashcards__header{flex:0 0 auto;margin-bottom:22px}.squisq-flashcards__deck-copy h1,.squisq-flashcards__summary h2,.squisq-flashcards__empty-card h2{margin:2px 0 0;font:700 clamp(22px,3vw,34px) / 1.1 var(--squisq-flashcards-title-font)}.squisq-flashcards__eyebrow,.squisq-flashcards__answer-label,.squisq-flashcards__label{color:var(--squisq-flashcards-primary);font-size:12px;font-weight:800;letter-spacing:.11em;text-transform:uppercase}.squisq-flashcards__tool,.squisq-flashcards__button{min-height:40px;border:1px solid color-mix(in srgb,var(--squisq-flashcards-text) 22%,transparent);border-radius:999px;padding:8px 16px;color:var(--squisq-flashcards-text);background:color-mix(in srgb,var(--squisq-flashcards-surface) 88%,transparent);font:700 14px/1 var(--squisq-flashcards-body-font);cursor:pointer}.squisq-flashcards__tool:hover,.squisq-flashcards__button:hover:not(:disabled){border-color:var(--squisq-flashcards-primary)}.squisq-flashcards__tool:focus-visible,.squisq-flashcards__button:focus-visible,.squisq-flashcards__choice:focus-visible{outline:3px solid color-mix(in srgb,var(--squisq-flashcards-primary) 45%,transparent);outline-offset:2px}.squisq-flashcards__tool[aria-pressed=true],.squisq-flashcards__button--primary{border-color:var(--squisq-flashcards-primary);color:var(--squisq-flashcards-bg);background:var(--squisq-flashcards-primary)}.squisq-flashcards__button:disabled{opacity:.38;cursor:default}.squisq-flashcards__progress-row{flex:0 0 auto;color:var(--squisq-flashcards-muted);font-size:13px}.squisq-flashcards__progress{flex:0 0 auto;height:5px;margin-top:8px;margin-bottom:18px;overflow:hidden;border-radius:999px;background:color-mix(in srgb,var(--squisq-flashcards-text) 12%,transparent)}.squisq-flashcards__progress>span{display:block;height:100%;border-radius:inherit;background:var(--squisq-flashcards-primary);transition:width .22s ease}.squisq-flashcards__card,.squisq-flashcards__summary,.squisq-flashcards__empty-card{border:1px solid color-mix(in srgb,var(--squisq-flashcards-text) 16%,transparent);border-radius:var(--squisq-flashcards-radius);padding:clamp(24px,5vw,58px);background:color-mix(in srgb,var(--squisq-flashcards-surface) 94%,var(--squisq-flashcards-bg));box-shadow:0 28px 80px color-mix(in srgb,#000 26%,transparent)}.squisq-flashcards__card{flex:1 1 auto;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}.squisq-flashcards__label{margin-bottom:18px}.squisq-flashcards__content-block+.squisq-flashcards__content-block{margin-top:24px}.squisq-flashcards__content-title{margin:0 0 .45em;color:inherit;font-family:var(--squisq-flashcards-title-font);font-size:clamp(24px,4vw,46px);line-height:1.12}.squisq-flashcards__content-block .squisq-flashcards__content-block .squisq-flashcards__content-title{font-size:clamp(19px,2.7vw,30px)}.squisq-flashcards .squisq-md{font-size:clamp(16px,2vw,21px);line-height:1.55}.squisq-flashcards .squisq-md>:first-child{margin-top:0}.squisq-flashcards .squisq-md>:last-child{margin-bottom:0}.squisq-flashcards .squisq-md img,.squisq-flashcards .squisq-md video{max-width:100%;max-height:42vh;border-radius:calc(var(--squisq-flashcards-radius) * .65);object-fit:contain}.squisq-flashcards__canvas{width:min(720px,100%);aspect-ratio:16 / 9;margin-top:18px;overflow:hidden;border-radius:calc(var(--squisq-flashcards-radius) * .65)}.squisq-flashcards__answer,.squisq-flashcards__explanation,.squisq-flashcards__feedback{margin-top:28px;border-top:1px solid color-mix(in srgb,var(--squisq-flashcards-text) 18%,transparent);padding-top:24px;animation:squisq-flashcard-reveal .18s ease-out both}.squisq-flashcards__answer-label{display:block;margin-bottom:12px}.squisq-flashcards__choices{display:grid;gap:12px;margin-top:28px}.squisq-flashcards__choice{display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:14px;width:100%;border:1px solid color-mix(in srgb,var(--squisq-flashcards-text) 18%,transparent);border-radius:calc(var(--squisq-flashcards-radius) * .72);padding:14px 18px;color:var(--squisq-flashcards-text);background:color-mix(in srgb,var(--squisq-flashcards-bg) 32%,transparent);text-align:left;cursor:pointer}.squisq-flashcards__choice:not(:disabled):hover{border-color:var(--squisq-flashcards-primary);transform:translateY(-1px)}.squisq-flashcards__choice[data-choice-status=correct]{border-color:var(--squisq-flashcards-highlight);background:color-mix(in srgb,var(--squisq-flashcards-highlight) 14%,transparent)}.squisq-flashcards__choice[data-choice-status=incorrect]{border-color:var(--squisq-flashcards-warning);background:color-mix(in srgb,var(--squisq-flashcards-warning) 14%,transparent)}.squisq-flashcards__choice-key{display:grid;width:30px;height:30px;place-items:center;border-radius:50%;color:var(--squisq-flashcards-muted);background:color-mix(in srgb,var(--squisq-flashcards-text) 10%,transparent);font-weight:800}.squisq-flashcards__choice .squisq-flashcards__content-title{margin:0;font:700 clamp(16px,2vw,20px) / 1.3 var(--squisq-flashcards-body-font)}.squisq-flashcards__choice .squisq-md{font-size:16px}.squisq-flashcards__feedback>strong{color:var(--squisq-flashcards-warning);font:700 20px/1.2 var(--squisq-flashcards-title-font)}.squisq-flashcards__feedback[data-correct=true]>strong{color:var(--squisq-flashcards-highlight)}.squisq-flashcards__correct-answer>span{display:block;margin:12px 0 8px;color:var(--squisq-flashcards-muted);font-size:13px}.squisq-flashcards__footer{flex:0 0 auto;margin-top:18px}.squisq-flashcards__shortcut-hint{flex:0 0 auto;margin-top:12px;color:var(--squisq-flashcards-muted);font-size:12px;text-align:center}.squisq-flashcards__summary,.squisq-flashcards__empty-card{margin-top:min(12vh,120px);text-align:center}.squisq-flashcards__summary p,.squisq-flashcards__empty-card p,.squisq-flashcards__empty-card ul{color:var(--squisq-flashcards-muted)}.squisq-flashcards__summary-actions{justify-content:center;flex-wrap:wrap;margin-top:24px}@keyframes squisq-flashcard-reveal{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@media(max-width:640px){.squisq-flashcards__header,.squisq-flashcards__footer{align-items:stretch;flex-direction:column}.squisq-flashcards__tools,.squisq-flashcards__primary-actions,.squisq-flashcards__footer>.squisq-flashcards__button{width:100%}.squisq-flashcards__tools>*,.squisq-flashcards__primary-actions>*{flex:1}}@media(prefers-reduced-motion:reduce){.squisq-flashcards__progress>span,.squisq-flashcards__answer,.squisq-flashcards__explanation,.squisq-flashcards__feedback{animation:none;transition:none}}@keyframes slowZoomOut{0%{transform:scale(1.15)}to{transform:scale(1)}}@keyframes slowZoomPanLeft{0%{transform:translate(0) scale(1.1)}to{transform:translate(-8%) scale(1.1)}}@keyframes slowZoomPanRight{0%{transform:translate(-8%) scale(1.1)}to{transform:translate(0) scale(1.1)}}@keyframes slowZoomPanUp{0%{transform:translateY(0) scale(1.1)}to{transform:translateY(-8%) scale(1.1)}}@keyframes slowZoomPanDown{0%{transform:translateY(-8%) scale(1.1)}to{transform:translateY(0) scale(1.1)}}@keyframes slowZoomCombinedPanLeft{0%{transform:translate(0) scale(1)}to{transform:translate(-5%) scale(1.12)}}@keyframes slowZoomCombinedPanRight{0%{transform:translate(-5%) scale(1.12)}to{transform:translate(0) scale(1)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeInUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeInDown{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateY(0)}}@keyframes zoomIn{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}@keyframes zoomOut{0%{transform:scale(1);opacity:1}to{transform:scale(.9);opacity:0}}@keyframes panLeft{0%{transform:translate(0)}to{transform:translate(-10%)}}@keyframes panRight{0%{transform:translate(-10%)}to{transform:translate(0)}}@keyframes portraitCoverPanRight{0%{object-position:left center}to{object-position:right center}}@keyframes portraitCoverPanLeft{0%{object-position:right center}to{object-position:left center}}@keyframes slideInLeft{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideInRight{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes slideOutLeft{0%{transform:translate(0)}to{transform:translate(-100%)}}@keyframes slideOutRight{0%{transform:translate(0)}to{transform:translate(100%)}}@keyframes slideInTop{0%{transform:translateY(-100%)}to{transform:translateY(0)}}@keyframes slideInBottom{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideOutTop{0%{transform:translateY(0)}to{transform:translateY(-100%)}}@keyframes slideOutBottom{0%{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes transitionZoomIn{0%{opacity:0;transform:scale(.82)}to{opacity:1;transform:scale(1)}}@keyframes transitionZoomOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(1.08)}}@keyframes transitionFlipIn{0%{opacity:0;transform:perspective(1400px) rotateY(-72deg) scale(.96)}to{opacity:1;transform:perspective(1400px) rotateY(0) scale(1)}}@keyframes transitionFlipOut{0%{opacity:1;transform:perspective(1400px) rotateY(0) scale(1)}to{opacity:0;transform:perspective(1400px) rotateY(56deg) scale(.96)}}@keyframes transitionRotateIn{0%{opacity:0;transform:rotate(-8deg) scale(.88)}to{opacity:1;transform:rotate(0) scale(1)}}@keyframes transitionRotateOut{0%{opacity:1;transform:rotate(0) scale(1)}to{opacity:0;transform:rotate(8deg) scale(1.04)}}@keyframes transitionDissolveIn{0%{opacity:0;filter:blur(10px)}60%{opacity:.72}to{opacity:1;filter:blur(0)}}@keyframes transitionDissolveOut{0%{opacity:1;filter:blur(0)}to{opacity:0;filter:blur(12px)}}@keyframes transitionMorphIn{0%{opacity:0;filter:blur(16px) saturate(.8);transform:scale(1.025)}to{opacity:1;filter:blur(0) saturate(1);transform:scale(1)}}@keyframes transitionMorphOut{0%{opacity:1;filter:blur(0) saturate(1);transform:scale(1)}to{opacity:0;filter:blur(16px) saturate(.85);transform:scale(.985)}}@keyframes transitionHold{0%,to{opacity:1;transform:none}}@keyframes transitionWipeLeftIn{0%{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0)}}@keyframes transitionWipeLeftOut{0%{clip-path:inset(0)}to{clip-path:inset(0 0 0 100%)}}@keyframes transitionWipeRightIn{0%{clip-path:inset(0 0 0 100%)}to{clip-path:inset(0)}}@keyframes transitionWipeRightOut{0%{clip-path:inset(0)}to{clip-path:inset(0 100% 0 0)}}@keyframes transitionWipeUpIn{0%{clip-path:inset(100% 0 0 0)}to{clip-path:inset(0)}}@keyframes transitionWipeUpOut{0%{clip-path:inset(0)}to{clip-path:inset(0 0 100% 0)}}@keyframes transitionWipeDownIn{0%{clip-path:inset(0 0 100% 0)}to{clip-path:inset(0)}}@keyframes transitionWipeDownOut{0%{clip-path:inset(0)}to{clip-path:inset(100% 0 0 0)}}@keyframes transitionSplitHorizontalIn{0%{clip-path:inset(0 50% 0 50%)}to{clip-path:inset(0)}}@keyframes transitionSplitHorizontalOut{0%{clip-path:inset(0)}to{clip-path:inset(0 50% 0 50%)}}@keyframes transitionSplitVerticalIn{0%{clip-path:inset(50% 0 50% 0)}to{clip-path:inset(0)}}@keyframes transitionSplitVerticalOut{0%{clip-path:inset(0)}to{clip-path:inset(50% 0 50% 0)}}@keyframes transitionCircleIn{0%{clip-path:circle(0% at 50% 50%);opacity:.4}to{clip-path:circle(75% at 50% 50%);opacity:1}}@keyframes transitionCircleOut{0%{clip-path:circle(75% at 50% 50%);opacity:1}to{clip-path:circle(0% at 50% 50%);opacity:0}}@keyframes transitionDiamondIn{0%{clip-path:polygon(50% 50%,50% 50%,50% 50%,50% 50%);opacity:.35}to{clip-path:polygon(50% -30%,130% 50%,50% 130%,-30% 50%);opacity:1}}@keyframes transitionDiamondOut{0%{clip-path:polygon(50% -30%,130% 50%,50% 130%,-30% 50%);opacity:1}to{clip-path:polygon(50% 50%,50% 50%,50% 50%,50% 50%);opacity:0}}@keyframes transitionPlusIn{0%{clip-path:polygon(50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%);opacity:.45}70%{clip-path:polygon(43% 0,57% 0,57% 43%,100% 43%,100% 57%,57% 57%,57% 100%,43% 100%,43% 57%,0 57%,0 43%,43% 43%);opacity:1}to{clip-path:inset(0);opacity:1}}@keyframes transitionPlusOut{0%{clip-path:inset(0);opacity:1}to{clip-path:polygon(50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%);opacity:0}}@keyframes transitionFlashIn{0%{opacity:0;filter:brightness(2.8) contrast(1.5);transform:scale(1.04)}42%{opacity:1;filter:brightness(3.5) contrast(1.8)}to{opacity:1;filter:brightness(1) contrast(1);transform:scale(1)}}@keyframes transitionFlashOut{0%{opacity:1;filter:brightness(1) contrast(1)}55%{opacity:.9;filter:brightness(3) contrast(1.6)}to{opacity:0;filter:brightness(.4) contrast(1)}}@keyframes transitionNewsflashIn{0%{opacity:0;filter:brightness(3) contrast(1.8);transform:scale(.72) rotate(-2deg)}45%{opacity:1;filter:brightness(2.8) contrast(1.6);transform:scale(1.08) rotate(1deg)}to{opacity:1;filter:brightness(1) contrast(1);transform:scale(1) rotate(0)}}@keyframes transitionNewsflashOut{0%{opacity:1;filter:brightness(1) contrast(1);transform:scale(1)}to{opacity:0;filter:brightness(2.4) contrast(1.6);transform:scale(1.18) rotate(2deg)}}@keyframes transitionFallOverIn{0%{opacity:0;transform:perspective(1200px) rotateX(-72deg) translateY(-8%);transform-origin:50% 100%}to{opacity:1;transform:perspective(1200px) rotateX(0) translateY(0);transform-origin:50% 100%}}@keyframes transitionFallOverOut{0%{opacity:1;transform:perspective(1200px) rotateX(0) translateY(0);transform-origin:50% 100%}to{opacity:0;transform:perspective(1200px) rotateX(76deg) translateY(8%);transform-origin:50% 100%}}@keyframes transitionDrapeIn{0%{opacity:0;transform:perspective(1200px) rotateX(-42deg) skew(-8deg) scaleY(.82);transform-origin:50% 0}to{opacity:1;transform:perspective(1200px) rotateX(0) skew(0) scaleY(1);transform-origin:50% 0}}@keyframes transitionDrapeOut{0%{opacity:1;transform:perspective(1200px) rotateX(0) skew(0) scaleY(1);transform-origin:50% 0}to{opacity:0;transform:perspective(1200px) rotateX(48deg) skew(7deg) scaleY(.74);transform-origin:50% 0}}@keyframes transitionCurtainsIn{0%{opacity:.4;transform:scaleX(.04);filter:brightness(.75)}to{opacity:1;transform:scaleX(1);filter:brightness(1)}}@keyframes transitionCurtainsOut{0%{opacity:1;transform:scaleX(1);filter:brightness(1)}to{opacity:.35;transform:scaleX(.04);filter:brightness(.55)}}@keyframes transitionWindIn{0%{opacity:0;filter:blur(14px);transform:translate(24%) skew(-14deg)}to{opacity:1;filter:blur(0);transform:translate(0) skew(0)}}@keyframes transitionWindOut{0%{opacity:1;filter:blur(0);transform:translate(0) skew(0)}to{opacity:0;filter:blur(14px);transform:translate(-24%) skew(14deg)}}@keyframes transitionPrestigeIn{0%{opacity:0;filter:brightness(1.8) saturate(.7);transform:perspective(1200px) translateZ(-180px) scale(.82)}to{opacity:1;filter:brightness(1) saturate(1);transform:perspective(1200px) translateZ(0) scale(1)}}@keyframes transitionPrestigeOut{0%{opacity:1;filter:brightness(1) saturate(1);transform:perspective(1200px) translateZ(0) scale(1)}to{opacity:0;filter:brightness(1.6) saturate(.75);transform:perspective(1200px) translateZ(140px) scale(1.06)}}@keyframes transitionFractureIn{0%{opacity:0;filter:contrast(1.8) brightness(1.4);clip-path:polygon(0 0,48% 0,52% 24%,100% 0,100% 100%,55% 78%,45% 100%,0 100%);transform:skew(-6deg) scale(1.03)}to{opacity:1;filter:contrast(1) brightness(1);clip-path:inset(0);transform:skew(0) scale(1)}}@keyframes transitionFractureOut{0%{opacity:1;filter:contrast(1) brightness(1);clip-path:inset(0);transform:skew(0) scale(1)}to{opacity:0;filter:contrast(1.8) brightness(1.2);clip-path:polygon(0 0,42% 8%,56% 28%,100% 0,100% 100%,58% 72%,40% 94%,0 100%);transform:skew(8deg) scale(1.05)}}@keyframes transitionCrushIn{0%{opacity:0;transform:scaleX(1.22) scaleY(.08);filter:contrast(1.4)}to{opacity:1;transform:scaleX(1) scaleY(1);filter:contrast(1)}}@keyframes transitionCrushOut{0%{opacity:1;transform:scaleX(1) scaleY(1);filter:contrast(1)}to{opacity:0;transform:scaleX(1.28) scaleY(.04);filter:contrast(1.5)}}@keyframes transitionPeelIn{0%{opacity:0;transform:perspective(1400px) rotateY(-78deg) skewY(8deg);transform-origin:0 50%}to{opacity:1;transform:perspective(1400px) rotateY(0) skewY(0);transform-origin:0 50%}}@keyframes transitionPeelOut{0%{opacity:1;transform:perspective(1400px) rotateY(0) skewY(0);transform-origin:100% 50%}to{opacity:0;transform:perspective(1400px) rotateY(82deg) skewY(-8deg);transform-origin:100% 50%}}@keyframes transitionPageCurlIn{0%{opacity:0;transform:perspective(1400px) rotateY(-64deg) rotate(-2deg);transform-origin:0 50%;filter:brightness(.85)}to{opacity:1;transform:perspective(1400px) rotateY(0) rotate(0);transform-origin:0 50%;filter:brightness(1)}}@keyframes transitionPageCurlOut{0%{opacity:1;transform:perspective(1400px) rotateY(0) rotate(0);transform-origin:100% 50%;filter:brightness(1)}to{opacity:0;transform:perspective(1400px) rotateY(68deg) rotate(2deg);transform-origin:100% 50%;filter:brightness(.8)}}@keyframes transitionAirplaneIn{0%{opacity:0;transform:translate(-40%,30%) rotate(-18deg) scale(.72);filter:blur(2px)}to{opacity:1;transform:translate(0) rotate(0) scale(1);filter:blur(0)}}@keyframes transitionAirplaneOut{0%{opacity:1;transform:translate(0) rotate(0) scale(1);filter:blur(0)}to{opacity:0;transform:translate(42%,-28%) rotate(18deg) scale(.72);filter:blur(2px)}}@keyframes transitionOrigamiIn{0%{opacity:0;transform:perspective(1400px) rotateX(58deg) rotateY(-42deg) scale(.86);filter:brightness(.85)}to{opacity:1;transform:perspective(1400px) rotateX(0) rotateY(0) scale(1);filter:brightness(1)}}@keyframes transitionOrigamiOut{0%{opacity:1;transform:perspective(1400px) rotateX(0) rotateY(0) scale(1);filter:brightness(1)}to{opacity:0;transform:perspective(1400px) rotateX(-58deg) rotateY(42deg) scale(.82);filter:brightness(.82)}}@keyframes transitionRippleIn{0%{opacity:0;filter:blur(10px);transform:scale(.86);clip-path:circle(0% at 50% 50%)}60%{opacity:.88;filter:blur(3px);transform:scale(1.035);clip-path:circle(65% at 50% 50%)}to{opacity:1;filter:blur(0);transform:scale(1);clip-path:circle(75% at 50% 50%)}}@keyframes transitionRippleOut{0%{opacity:1;filter:blur(0);transform:scale(1);clip-path:circle(75% at 50% 50%)}to{opacity:0;filter:blur(10px);transform:scale(1.08);clip-path:circle(0% at 50% 50%)}}@keyframes transitionTexturedIn{0%{opacity:.12;filter:contrast(1.6)}88%{opacity:1;filter:contrast(1.05)}to{opacity:1;filter:contrast(1);-webkit-mask-image:none;mask-image:none}}@keyframes transitionTexturedOut{0%{opacity:1;filter:contrast(1)}to{opacity:0;filter:contrast(1.7)}}@keyframes transitionVortexIn{0%{opacity:0;transform:rotate(-110deg) scale(.28);filter:blur(8px)}to{opacity:1;transform:rotate(0) scale(1);filter:blur(0)}}@keyframes transitionVortexOut{0%{opacity:1;transform:rotate(0) scale(1);filter:blur(0)}to{opacity:0;transform:rotate(120deg) scale(.2);filter:blur(10px)}}@keyframes transitionShredIn{0%{opacity:0;clip-path:inset(0 42% 0 42%);transform:translateY(-9%) skew(-8deg);filter:contrast(1.7)}to{opacity:1;clip-path:inset(0);transform:translateY(0) skew(0);filter:contrast(1)}}@keyframes transitionShredOut{0%{opacity:1;clip-path:inset(0);transform:translateY(0) skew(0);filter:contrast(1)}to{opacity:0;clip-path:inset(0 44% 0 44%);transform:translateY(11%) skew(8deg);filter:contrast(1.8)}}@keyframes transitionSwitchIn{0%{opacity:0;transform:perspective(1400px) rotateY(-48deg) translate(18%)}to{opacity:1;transform:perspective(1400px) rotateY(0) translate(0)}}@keyframes transitionSwitchOut{0%{opacity:1;transform:perspective(1400px) rotateY(0) translate(0)}to{opacity:0;transform:perspective(1400px) rotateY(48deg) translate(-18%)}}@keyframes transitionCubeIn{0%{opacity:0;transform:perspective(1200px) rotateY(-86deg) translate(44%);transform-origin:0 50%}to{opacity:1;transform:perspective(1200px) rotateY(0) translate(0);transform-origin:0 50%}}@keyframes transitionCubeOut{0%{opacity:1;transform:perspective(1200px) rotateY(0) translate(0);transform-origin:100% 50%}to{opacity:0;transform:perspective(1200px) rotateY(86deg) translate(-44%);transform-origin:100% 50%}}@keyframes transitionDoorsIn{0%{opacity:.2;transform:perspective(1200px) scaleX(.04);filter:brightness(.7)}to{opacity:1;transform:perspective(1200px) scaleX(1);filter:brightness(1)}}@keyframes transitionDoorsOut{0%{opacity:1;transform:perspective(1200px) scaleX(1);filter:brightness(1)}to{opacity:.2;transform:perspective(1200px) scaleX(.04);filter:brightness(.65)}}@keyframes transitionBoxIn{0%{opacity:.2;transform:scale(.18);clip-path:inset(38%)}to{opacity:1;transform:scale(1);clip-path:inset(0)}}@keyframes transitionBoxOut{0%{opacity:1;transform:scale(1);clip-path:inset(0)}to{opacity:0;transform:scale(.18);clip-path:inset(38%)}}@keyframes transitionGalleryIn{0%{opacity:0;transform:translate(28%) scale(.84);filter:brightness(.82)}to{opacity:1;transform:translate(0) scale(1);filter:brightness(1)}}@keyframes transitionGalleryOut{0%{opacity:1;transform:translate(0) scale(1);filter:brightness(1)}to{opacity:0;transform:translate(-28%) scale(.84);filter:brightness(.82)}}@keyframes transitionFerrisIn{0%{opacity:0;transform:translateY(42%) rotate(-34deg) scale(.78);transform-origin:50% 140%}to{opacity:1;transform:translateY(0) rotate(0) scale(1);transform-origin:50% 140%}}@keyframes transitionFerrisOut{0%{opacity:1;transform:translateY(0) rotate(0) scale(1);transform-origin:50% 140%}to{opacity:0;transform:translateY(-42%) rotate(34deg) scale(.78);transform-origin:50% 140%}}@keyframes transitionWindowIn{0%{opacity:.35;clip-path:inset(50% 50% 50% 50%);transform:scale(1.08)}to{opacity:1;clip-path:inset(0);transform:scale(1)}}@keyframes transitionWindowOut{0%{opacity:1;clip-path:inset(0);transform:scale(1)}to{opacity:0;clip-path:inset(50% 50% 50% 50%);transform:scale(1.08)}}@keyframes transitionOrbitIn{0%{opacity:0;transform:rotate(-42deg) translate(18%) scale(.76);transform-origin:50% 50%}to{opacity:1;transform:rotate(0) translate(0) scale(1);transform-origin:50% 50%}}@keyframes transitionOrbitOut{0%{opacity:1;transform:rotate(0) translate(0) scale(1);transform-origin:50% 50%}to{opacity:0;transform:rotate(42deg) translate(-18%) scale(.76);transform-origin:50% 50%}}@keyframes transitionFlyThroughIn{0%{opacity:0;transform:perspective(1200px) translateZ(-520px) scale(.56);filter:blur(4px)}to{opacity:1;transform:perspective(1200px) translateZ(0) scale(1);filter:blur(0)}}@keyframes transitionFlyThroughOut{0%{opacity:1;transform:perspective(1200px) translateZ(0) scale(1);filter:blur(0)}to{opacity:0;transform:perspective(1200px) translateZ(420px) scale(1.28);filter:blur(5px)}}@keyframes transitionWheelIn{0%{opacity:0;transform:rotate(-58deg) scale(.7);clip-path:circle(0% at 50% 50%)}to{opacity:1;transform:rotate(0) scale(1);clip-path:circle(75% at 50% 50%)}}@keyframes transitionWheelOut{0%{opacity:1;transform:rotate(0) scale(1);clip-path:circle(75% at 50% 50%)}to{opacity:0;transform:rotate(58deg) scale(.7);clip-path:circle(0% at 50% 50%)}}@keyframes transitionWheelReverseIn{0%{opacity:0;transform:rotate(58deg) scale(.7);clip-path:circle(0% at 50% 50%)}to{opacity:1;transform:rotate(0) scale(1);clip-path:circle(75% at 50% 50%)}}@keyframes transitionWheelReverseOut{0%{opacity:1;transform:rotate(0) scale(1);clip-path:circle(75% at 50% 50%)}to{opacity:0;transform:rotate(-58deg) scale(.7);clip-path:circle(0% at 50% 50%)}}@keyframes transitionWedgeIn{0%{opacity:.4;clip-path:polygon(50% 50%,50% 0,50% 0)}to{opacity:1;clip-path:polygon(50% 50%,-30% -30%,130% -30%,130% 130%,-30% 130%)}}@keyframes transitionWedgeOut{0%{opacity:1;clip-path:polygon(50% 50%,-30% -30%,130% -30%,130% 130%,-30% 130%)}to{opacity:0;clip-path:polygon(50% 50%,50% 0,50% 0)}}@keyframes transitionPrismIn{0%{opacity:0;transform:perspective(1200px) rotateY(-28deg) skew(-12deg) scale(.9);filter:hue-rotate(24deg) saturate(1.6)}to{opacity:1;transform:perspective(1200px) rotateY(0) skew(0) scale(1);filter:hue-rotate(0deg) saturate(1)}}@keyframes transitionPrismOut{0%{opacity:1;transform:perspective(1200px) rotateY(0) skew(0) scale(1);filter:hue-rotate(0deg) saturate(1)}to{opacity:0;transform:perspective(1200px) rotateY(28deg) skew(12deg) scale(.9);filter:hue-rotate(-24deg) saturate(1.6)}}@keyframes transitionWarpIn{0%{opacity:0;transform:scaleX(.72) scaleY(1.18) skew(-14deg);filter:blur(8px)}to{opacity:1;transform:scaleX(1) scaleY(1) skew(0);filter:blur(0)}}@keyframes transitionWarpOut{0%{opacity:1;transform:scaleX(1) scaleY(1) skew(0);filter:blur(0)}to{opacity:0;transform:scaleX(1.2) scaleY(.72) skew(14deg);filter:blur(8px)}}@keyframes transitionClockIn{0%{opacity:.35;transform:rotate(-90deg) scale(.84);clip-path:circle(0% at 50% 50%)}to{opacity:1;transform:rotate(0) scale(1);clip-path:circle(75% at 50% 50%)}}@keyframes transitionClockOut{0%{opacity:1;transform:rotate(0) scale(1);clip-path:circle(75% at 50% 50%)}to{opacity:0;transform:rotate(90deg) scale(.84);clip-path:circle(0% at 50% 50%)}}@keyframes typewriter{0%{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0 0 0 0)}}@keyframes typewriterFallback{0%{width:0;overflow:hidden}to{width:100%;overflow:hidden}}.transition-fade-enter{animation:fadeIn var(--transition-duration, 1.5s) ease-out forwards}.transition-fade-exit{animation:fadeOut var(--transition-duration, 1.5s) ease-out forwards}.transition-dissolve-enter{animation:transitionDissolveIn var(--transition-duration, .8s) ease-in-out forwards}.transition-dissolve-exit{animation:transitionDissolveOut var(--transition-duration, .8s) ease-in-out forwards}.transition-morph-enter{animation:transitionMorphIn var(--transition-duration, .9s) ease-in-out forwards}.transition-morph-exit{animation:transitionMorphOut var(--transition-duration, .9s) ease-in-out forwards}.transition-pushLeft-enter,.transition-slideLeft-enter{animation:slideInRight var(--transition-duration, .8s) ease-out forwards}.transition-pushLeft-exit,.transition-slideLeft-exit{animation:slideOutLeft var(--transition-duration, .8s) ease-out forwards}.transition-pushRight-enter,.transition-slideRight-enter{animation:slideInLeft var(--transition-duration, .8s) ease-out forwards}.transition-pushRight-exit,.transition-slideRight-exit{animation:slideOutRight var(--transition-duration, .8s) ease-out forwards}.transition-pushUp-enter,.transition-slideUp-enter{animation:slideInBottom var(--transition-duration, .8s) ease-out forwards}.transition-pushUp-exit,.transition-slideUp-exit{animation:slideOutTop var(--transition-duration, .8s) ease-out forwards}.transition-pushDown-enter,.transition-slideDown-enter{animation:slideInTop var(--transition-duration, .8s) ease-out forwards}.transition-pushDown-exit,.transition-slideDown-exit{animation:slideOutBottom var(--transition-duration, .8s) ease-out forwards}.transition-zoom-enter{animation:transitionZoomIn var(--transition-duration, .7s) ease-out forwards}.transition-zoom-exit{animation:transitionZoomOut var(--transition-duration, .7s) ease-in forwards}.transition-flip-enter{animation:transitionFlipIn var(--transition-duration, .8s) ease-out forwards}.transition-flip-exit{animation:transitionFlipOut var(--transition-duration, .8s) ease-in forwards}.transition-rotate-enter{animation:transitionRotateIn var(--transition-duration, .8s) ease-out forwards}.transition-rotate-exit{animation:transitionRotateOut var(--transition-duration, .8s) ease-in forwards}.transition-wipeLeft-enter,.transition-revealLeft-enter{animation:transitionWipeLeftIn var(--transition-duration, .75s) ease-out forwards}.transition-wipeLeft-exit{animation:transitionWipeLeftOut var(--transition-duration, .75s) ease-in forwards}.transition-wipeRight-enter,.transition-revealRight-enter{animation:transitionWipeRightIn var(--transition-duration, .75s) ease-out forwards}.transition-wipeRight-exit{animation:transitionWipeRightOut var(--transition-duration, .75s) ease-in forwards}.transition-wipeUp-enter,.transition-revealUp-enter{animation:transitionWipeUpIn var(--transition-duration, .75s) ease-out forwards}.transition-wipeUp-exit{animation:transitionWipeUpOut var(--transition-duration, .75s) ease-in forwards}.transition-wipeDown-enter,.transition-revealDown-enter{animation:transitionWipeDownIn var(--transition-duration, .75s) ease-out forwards}.transition-wipeDown-exit{animation:transitionWipeDownOut var(--transition-duration, .75s) ease-in forwards}.transition-revealLeft-exit,.transition-revealRight-exit,.transition-revealUp-exit,.transition-revealDown-exit{animation:fadeOut var(--transition-duration, .75s) ease-in forwards}.transition-splitHorizontal-enter{animation:transitionSplitHorizontalIn var(--transition-duration, .8s) ease-out forwards}.transition-splitHorizontal-exit{animation:transitionSplitHorizontalOut var(--transition-duration, .8s) ease-in forwards}.transition-splitVertical-enter{animation:transitionSplitVerticalIn var(--transition-duration, .8s) ease-out forwards}.transition-splitVertical-exit{animation:transitionSplitVerticalOut var(--transition-duration, .8s) ease-in forwards}.transition-coverLeft-enter,.transition-pullLeft-enter{animation:slideInRight var(--transition-duration, .75s) ease-out forwards}.transition-coverRight-enter,.transition-pullRight-enter{animation:slideInLeft var(--transition-duration, .75s) ease-out forwards}.transition-coverUp-enter,.transition-pullUp-enter{animation:slideInBottom var(--transition-duration, .75s) ease-out forwards}.transition-coverDown-enter,.transition-pullDown-enter{animation:slideInTop var(--transition-duration, .75s) ease-out forwards}.transition-coverLeft-exit,.transition-coverRight-exit,.transition-coverUp-exit,.transition-coverDown-exit,.transition-pullLeft-exit,.transition-pullRight-exit,.transition-pullUp-exit,.transition-pullDown-exit{animation:transitionHold var(--transition-duration, .75s) linear forwards}.transition-uncoverLeft-enter,.transition-uncoverRight-enter,.transition-uncoverUp-enter,.transition-uncoverDown-enter{animation:fadeIn var(--transition-duration, .75s) ease-out forwards}.transition-uncoverLeft-exit{animation:slideOutLeft var(--transition-duration, .75s) ease-in forwards}.transition-uncoverRight-exit{animation:slideOutRight var(--transition-duration, .75s) ease-in forwards}.transition-uncoverUp-exit{animation:slideOutTop var(--transition-duration, .75s) ease-in forwards}.transition-uncoverDown-exit{animation:slideOutBottom var(--transition-duration, .75s) ease-in forwards}.transition-shapeCircle-enter{animation:transitionCircleIn var(--transition-duration, .75s) ease-out forwards}.transition-shapeCircle-exit{animation:transitionCircleOut var(--transition-duration, .75s) ease-in forwards}.transition-shapeDiamond-enter{animation:transitionDiamondIn var(--transition-duration, .75s) ease-out forwards}.transition-shapeDiamond-exit{animation:transitionDiamondOut var(--transition-duration, .75s) ease-in forwards}.transition-shapePlus-enter{animation:transitionPlusIn var(--transition-duration, .8s) ease-out forwards}.transition-shapePlus-exit{animation:transitionPlusOut var(--transition-duration, .8s) ease-in forwards}.transition-flash-enter{animation:transitionFlashIn var(--transition-duration, .7s) ease-out forwards}.transition-flash-exit{animation:transitionFlashOut var(--transition-duration, .7s) ease-in forwards}.transition-newsflash-enter{animation:transitionNewsflashIn var(--transition-duration, .75s) ease-out forwards}.transition-newsflash-exit{animation:transitionNewsflashOut var(--transition-duration, .75s) ease-in forwards}.transition-fallOver-enter{animation:transitionFallOverIn var(--transition-duration, .85s) ease-out forwards}.transition-fallOver-exit{animation:transitionFallOverOut var(--transition-duration, .85s) ease-in forwards}.transition-drape-enter{animation:transitionDrapeIn var(--transition-duration, .85s) ease-out forwards}.transition-drape-exit{animation:transitionDrapeOut var(--transition-duration, .85s) ease-in forwards}.transition-curtains-enter{animation:transitionCurtainsIn var(--transition-duration, .85s) ease-out forwards}.transition-curtains-exit{animation:transitionCurtainsOut var(--transition-duration, .85s) ease-in forwards}.transition-wind-enter{animation:transitionWindIn var(--transition-duration, .8s) ease-out forwards}.transition-wind-exit{animation:transitionWindOut var(--transition-duration, .8s) ease-in forwards}.transition-prestige-enter{animation:transitionPrestigeIn var(--transition-duration, .85s) ease-out forwards}.transition-prestige-exit{animation:transitionPrestigeOut var(--transition-duration, .85s) ease-in forwards}.transition-fracture-enter{animation:transitionFractureIn var(--transition-duration, .8s) ease-out forwards}.transition-fracture-exit{animation:transitionFractureOut var(--transition-duration, .8s) ease-in forwards}.transition-crush-enter{animation:transitionCrushIn var(--transition-duration, .75s) ease-out forwards}.transition-crush-exit{animation:transitionCrushOut var(--transition-duration, .75s) ease-in forwards}.transition-peelOff-enter{animation:transitionPeelIn var(--transition-duration, .85s) ease-out forwards}.transition-peelOff-exit{animation:transitionPeelOut var(--transition-duration, .85s) ease-in forwards}.transition-pageCurl-enter,.transition-pageCurlDouble-enter,.transition-pageCurlSingle-enter{animation:transitionPageCurlIn var(--transition-duration, .9s) ease-out forwards}.transition-pageCurl-exit,.transition-pageCurlDouble-exit,.transition-pageCurlSingle-exit{animation:transitionPageCurlOut var(--transition-duration, .9s) ease-in forwards}.transition-airplane-enter{animation:transitionAirplaneIn var(--transition-duration, .85s) ease-out forwards}.transition-airplane-exit{animation:transitionAirplaneOut var(--transition-duration, .85s) ease-in forwards}.transition-origami-enter{animation:transitionOrigamiIn var(--transition-duration, .85s) ease-out forwards}.transition-origami-exit{animation:transitionOrigamiOut var(--transition-duration, .85s) ease-in forwards}.transition-ripple-enter{animation:transitionRippleIn var(--transition-duration, .85s) ease-out forwards}.transition-ripple-exit{animation:transitionRippleOut var(--transition-duration, .85s) ease-in forwards}.transition-checkerboard-enter,.transition-random-enter{-webkit-mask-image:linear-gradient(45deg,#000 25%,transparent 25%,transparent 75%,#000 75%),linear-gradient(45deg,#000 25%,transparent 25%,transparent 75%,#000 75%);-webkit-mask-size:12% 12%;-webkit-mask-position:0 0,6% 6%;mask-image:linear-gradient(45deg,#000 25%,transparent 25%,transparent 75%,#000 75%),linear-gradient(45deg,#000 25%,transparent 25%,transparent 75%,#000 75%);mask-size:12% 12%;mask-position:0 0,6% 6%;animation:transitionTexturedIn var(--transition-duration, .85s) steps(8,end) forwards}.transition-checkerboard-exit,.transition-random-exit{-webkit-mask-image:linear-gradient(45deg,#000 25%,transparent 25%,transparent 75%,#000 75%),linear-gradient(45deg,#000 25%,transparent 25%,transparent 75%,#000 75%);-webkit-mask-size:12% 12%;-webkit-mask-position:0 0,6% 6%;mask-image:linear-gradient(45deg,#000 25%,transparent 25%,transparent 75%,#000 75%),linear-gradient(45deg,#000 25%,transparent 25%,transparent 75%,#000 75%);mask-size:12% 12%;mask-position:0 0,6% 6%;animation:transitionTexturedOut var(--transition-duration, .85s) steps(8,end) forwards}.transition-randomBarsHorizontal-enter,.transition-blindsHorizontal-enter,.transition-combHorizontal-enter,.transition-stripsLeft-enter,.transition-stripsRight-enter{-webkit-mask-image:repeating-linear-gradient(0deg,#000 0 6%,transparent 6% 12%);mask-image:repeating-linear-gradient(0deg,#000 0 6%,transparent 6% 12%);animation:transitionTexturedIn var(--transition-duration, .8s) steps(9,end) forwards}.transition-randomBarsHorizontal-exit,.transition-blindsHorizontal-exit,.transition-combHorizontal-exit,.transition-stripsLeft-exit,.transition-stripsRight-exit{-webkit-mask-image:repeating-linear-gradient(0deg,#000 0 6%,transparent 6% 12%);mask-image:repeating-linear-gradient(0deg,#000 0 6%,transparent 6% 12%);animation:transitionTexturedOut var(--transition-duration, .8s) steps(9,end) forwards}.transition-randomBarsVertical-enter,.transition-blindsVertical-enter,.transition-combVertical-enter,.transition-stripsUp-enter,.transition-stripsDown-enter{-webkit-mask-image:repeating-linear-gradient(90deg,#000 0 6%,transparent 6% 12%);mask-image:repeating-linear-gradient(90deg,#000 0 6%,transparent 6% 12%);animation:transitionTexturedIn var(--transition-duration, .8s) steps(9,end) forwards}.transition-randomBarsVertical-exit,.transition-blindsVertical-exit,.transition-combVertical-exit,.transition-stripsUp-exit,.transition-stripsDown-exit{-webkit-mask-image:repeating-linear-gradient(90deg,#000 0 6%,transparent 6% 12%);mask-image:repeating-linear-gradient(90deg,#000 0 6%,transparent 6% 12%);animation:transitionTexturedOut var(--transition-duration, .8s) steps(9,end) forwards}.transition-honeycomb-enter{-webkit-mask-image:radial-gradient(circle,#000 0 34%,transparent 35% 48%,#000 49%);-webkit-mask-size:10% 17%;mask-image:radial-gradient(circle,#000 0 34%,transparent 35% 48%,#000 49%);mask-size:10% 17%;animation:transitionTexturedIn var(--transition-duration, .85s) steps(8,end) forwards}.transition-honeycomb-exit{-webkit-mask-image:radial-gradient(circle,#000 0 34%,transparent 35% 48%,#000 49%);-webkit-mask-size:10% 17%;mask-image:radial-gradient(circle,#000 0 34%,transparent 35% 48%,#000 49%);mask-size:10% 17%;animation:transitionTexturedOut var(--transition-duration, .85s) steps(8,end) forwards}.transition-glitter-enter{-webkit-mask-image:radial-gradient(circle,#000 0 18%,transparent 20% 36%,#000 38%);-webkit-mask-size:7% 7%;mask-image:radial-gradient(circle,#000 0 18%,transparent 20% 36%,#000 38%);mask-size:7% 7%;animation:transitionFlashIn var(--transition-duration, .85s) steps(10,end) forwards}.transition-glitter-exit{-webkit-mask-image:radial-gradient(circle,#000 0 18%,transparent 20% 36%,#000 38%);-webkit-mask-size:7% 7%;mask-image:radial-gradient(circle,#000 0 18%,transparent 20% 36%,#000 38%);mask-size:7% 7%;animation:transitionFlashOut var(--transition-duration, .85s) steps(10,end) forwards}.transition-vortex-enter{animation:transitionVortexIn var(--transition-duration, .85s) ease-out forwards}.transition-vortex-exit{animation:transitionVortexOut var(--transition-duration, .85s) ease-in forwards}.transition-shred-enter{-webkit-mask-image:repeating-linear-gradient(90deg,#000 0 5%,transparent 5% 8%);mask-image:repeating-linear-gradient(90deg,#000 0 5%,transparent 5% 8%);animation:transitionShredIn var(--transition-duration, .85s) ease-out forwards}.transition-shred-exit{-webkit-mask-image:repeating-linear-gradient(90deg,#000 0 5%,transparent 5% 8%);mask-image:repeating-linear-gradient(90deg,#000 0 5%,transparent 5% 8%);animation:transitionShredOut var(--transition-duration, .85s) ease-in forwards}.transition-switch-enter{animation:transitionSwitchIn var(--transition-duration, .8s) ease-out forwards}.transition-switch-exit{animation:transitionSwitchOut var(--transition-duration, .8s) ease-in forwards}.transition-cube-enter{animation:transitionCubeIn var(--transition-duration, .85s) ease-out forwards}.transition-cube-exit{animation:transitionCubeOut var(--transition-duration, .85s) ease-in forwards}.transition-doors-enter{animation:transitionDoorsIn var(--transition-duration, .85s) ease-out forwards}.transition-doors-exit{animation:transitionDoorsOut var(--transition-duration, .85s) ease-in forwards}.transition-box-enter{animation:transitionBoxIn var(--transition-duration, .75s) ease-out forwards}.transition-box-exit{animation:transitionBoxOut var(--transition-duration, .75s) ease-in forwards}.transition-gallery-enter{animation:transitionGalleryIn var(--transition-duration, .8s) ease-out forwards}.transition-gallery-exit{animation:transitionGalleryOut var(--transition-duration, .8s) ease-in forwards}.transition-conveyor-enter,.transition-panLeft-enter{animation:slideInRight var(--transition-duration, .8s) ease-out forwards}.transition-conveyor-exit,.transition-panLeft-exit{animation:slideOutLeft var(--transition-duration, .8s) ease-in forwards}.transition-panRight-enter{animation:slideInLeft var(--transition-duration, .8s) ease-out forwards}.transition-panRight-exit{animation:slideOutRight var(--transition-duration, .8s) ease-in forwards}.transition-panUp-enter{animation:slideInBottom var(--transition-duration, .8s) ease-out forwards}.transition-panUp-exit{animation:slideOutTop var(--transition-duration, .8s) ease-in forwards}.transition-panDown-enter{animation:slideInTop var(--transition-duration, .8s) ease-out forwards}.transition-panDown-exit{animation:slideOutBottom var(--transition-duration, .8s) ease-in forwards}.transition-ferrisWheel-enter{animation:transitionFerrisIn var(--transition-duration, .85s) ease-out forwards}.transition-ferrisWheel-exit{animation:transitionFerrisOut var(--transition-duration, .85s) ease-in forwards}.transition-window-enter{animation:transitionWindowIn var(--transition-duration, .8s) ease-out forwards}.transition-window-exit{animation:transitionWindowOut var(--transition-duration, .8s) ease-in forwards}.transition-orbit-enter{animation:transitionOrbitIn var(--transition-duration, .85s) ease-out forwards}.transition-orbit-exit{animation:transitionOrbitOut var(--transition-duration, .85s) ease-in forwards}.transition-flyThrough-enter{animation:transitionFlyThroughIn var(--transition-duration, .85s) ease-out forwards}.transition-flyThrough-exit{animation:transitionFlyThroughOut var(--transition-duration, .85s) ease-in forwards}.transition-wheel-enter{animation:transitionWheelIn var(--transition-duration, .85s) ease-out forwards}.transition-wheel-exit{animation:transitionWheelOut var(--transition-duration, .85s) ease-in forwards}.transition-wheelReverse-enter{animation:transitionWheelReverseIn var(--transition-duration, .85s) ease-out forwards}.transition-wheelReverse-exit{animation:transitionWheelReverseOut var(--transition-duration, .85s) ease-in forwards}.transition-wedge-enter{animation:transitionWedgeIn var(--transition-duration, .8s) ease-out forwards}.transition-wedge-exit{animation:transitionWedgeOut var(--transition-duration, .8s) ease-in forwards}.transition-prism-enter{animation:transitionPrismIn var(--transition-duration, .85s) ease-out forwards}.transition-prism-exit{animation:transitionPrismOut var(--transition-duration, .85s) ease-in forwards}.transition-warp-enter{animation:transitionWarpIn var(--transition-duration, .85s) ease-out forwards}.transition-warp-exit{animation:transitionWarpOut var(--transition-duration, .85s) ease-in forwards}.transition-clock-enter{animation:transitionClockIn var(--transition-duration, .8s) ease-out forwards}.transition-clock-exit{animation:transitionClockOut var(--transition-duration, .8s) ease-in forwards}.anim-none{animation:none}.anim-fadeIn{animation:fadeIn var(--anim-duration, 1s) var(--anim-easing, ease-out) var(--anim-delay, 0s) forwards}.anim-fadeOut{animation:fadeOut var(--anim-duration, 1s) var(--anim-easing, ease-out) var(--anim-delay, 0s) forwards}.anim-fadeInUp{animation:fadeInUp var(--anim-duration, .6s) var(--anim-easing, ease-out) var(--anim-delay, 0s) forwards}.anim-slowZoom-in{animation:slowZoomIn var(--anim-duration, 8s) var(--anim-easing, linear) var(--anim-delay, 0s) forwards}.anim-slowZoom-out{animation:slowZoomOut var(--anim-duration, 8s) var(--anim-easing, linear) var(--anim-delay, 0s) forwards}.anim-slowZoom-panLeft{animation:slowZoomCombinedPanLeft var(--anim-duration, 8s) var(--anim-easing, linear) var(--anim-delay, 0s) forwards}.anim-slowZoom-panRight{animation:slowZoomCombinedPanRight var(--anim-duration, 8s) var(--anim-easing, linear) var(--anim-delay, 0s) forwards}.anim-zoomIn{animation:zoomIn var(--anim-duration, .5s) var(--anim-easing, ease-out) var(--anim-delay, 0s) forwards}.anim-zoomOut{animation:zoomOut var(--anim-duration, .5s) var(--anim-easing, ease-out) var(--anim-delay, 0s) forwards}.anim-panLeft{animation:panLeft var(--anim-duration, 8s) var(--anim-easing, linear) var(--anim-delay, 0s) forwards}.anim-panRight{animation:panRight var(--anim-duration, 8s) var(--anim-easing, linear) var(--anim-delay, 0s) forwards}.squisq-image--portrait-pan-right{animation:portraitCoverPanRight var(--portrait-pan-duration, 12s) var(--portrait-pan-easing, ease-in-out) var(--portrait-pan-delay, 0s) forwards;will-change:object-position}.squisq-image--portrait-pan-left{animation:portraitCoverPanLeft var(--portrait-pan-duration, 12s) var(--portrait-pan-easing, ease-in-out) var(--portrait-pan-delay, 0s) forwards;will-change:object-position}.anim-typewriter{animation:typewriter var(--anim-duration, 2s) var(--anim-easing, steps(40, end)) var(--anim-delay, 0s) forwards}.doc-player{position:relative;overflow:hidden;clip-path:inset(0);background:#000;max-width:100%;max-height:100%}.doc-player__media-clips{position:absolute;inset:0;z-index:0;pointer-events:none}.doc-player__media-clips--full-frame,.doc-player__media-clips--picture-in-picture{z-index:10}.doc-player__media-video{position:absolute;display:block;object-fit:cover;opacity:0;visibility:hidden}.doc-player__media-video--active{opacity:1;visibility:visible}.doc-player__media-clips--background .doc-player__media-video,.doc-player__media-clips--full-frame .doc-player__media-video{inset:0;width:100%;height:100%}.doc-player__media-clips--picture-in-picture .doc-player__media-video{width:22%;aspect-ratio:1;border:var(--squisq-pip-border, max(1px, .12vw) solid rgba(255, 255, 255, .72));border-radius:var(--squisq-pip-radius, 14%);box-shadow:var(--squisq-pip-shadow, 0 .75em 2em rgba(0, 0, 0, .34))}.doc-player__media-clips--picture-in-picture[data-pip-shape=wide] .doc-player__media-video{aspect-ratio:16 / 9}.doc-player__media-clips--picture-in-picture[data-pip-size=small] .doc-player__media-video{width:9%}.doc-player__media-clips--picture-in-picture[data-pip-size=large] .doc-player__media-video{width:15%}.doc-player[data-orientation=portrait] .doc-player__media-clips--picture-in-picture .doc-player__media-video{width:34%}.doc-player[data-orientation=portrait] .doc-player__media-clips--picture-in-picture[data-pip-size=small] .doc-player__media-video{width:15%}.doc-player[data-orientation=portrait] .doc-player__media-clips--picture-in-picture[data-pip-size=large] .doc-player__media-video{width:23%}.doc-player__media-clips--picture-in-picture[data-pip-position=top-left] .doc-player__media-video{top:4%;left:3%}.doc-player__media-clips--picture-in-picture[data-pip-position=top-right] .doc-player__media-video{top:4%;right:3%}.doc-player__media-clips--picture-in-picture[data-pip-position=bottom-left] .doc-player__media-video{bottom:6%;left:3%}.doc-player__media-clips--picture-in-picture[data-pip-position=bottom-right] .doc-player__media-video{right:3%;bottom:6%}.doc-player__viewport,.doc-player__block{position:absolute;top:0;left:0;width:100%;height:100%}.doc-player__block--active{z-index:2}.doc-player__block--previous{z-index:1}.doc-player__block--active.doc-player__block--dragging{transition:none}.doc-player__block--active.doc-player__block--settling{transition:transform .26s cubic-bezier(.22,1,.36,1)}.doc-player--swipe{cursor:grab;-webkit-user-select:none;user-select:none}.doc-player--swipe.doc-player--grabbing{cursor:grabbing}.doc-player__tap-feedback{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:150;pointer-events:none;display:flex;align-items:center;justify-content:center;width:72px;height:72px;border-radius:50%;background:#00000073;animation:tap-feedback-fade .6s ease-out forwards}@keyframes tap-feedback-fade{0%{opacity:1;transform:translate(-50%,-50%) scale(1)}to{opacity:0;transform:translate(-50%,-50%) scale(1.3)}}.block-svg{width:100%;height:100%;display:block;transform-origin:center;transform-box:fill-box}.block-svg[class*=transition-]{backface-visibility:hidden;will-change:transform,opacity,filter,clip-path}.block-layer{overflow:hidden}.block-layer--image{overflow:visible}.squisq-mermaid-rendered{position:relative;display:flex;box-sizing:border-box;width:100%;min-height:260px;align-items:center;justify-content:center;color:inherit;overflow:hidden}.squisq-mermaid-render-svg{display:flex;width:100%;height:100%;min-height:0;align-items:center;justify-content:center}.squisq-mermaid-render-svg>svg{display:block;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%}.squisq-mermaid-render-status,.squisq-mermaid-render-error{padding:1rem;color:inherit;font:500 .9rem/1.4 system-ui,sans-serif;text-align:center}.squisq-mermaid-render-error pre{max-height:8em;margin:.5rem 0 0;overflow:auto;font:400 .75rem/1.35 ui-monospace,monospace;text-align:left;white-space:pre-wrap}.squisq-md-mermaid{min-height:min(460px,60vh);margin:1.25rem 0;padding:1rem;border:1px solid color-mix(in srgb,currentcolor 18%,transparent);border-radius:10px;background:color-mix(in srgb,currentcolor 4%,transparent)}.squisq-md-code-frame{position:relative;margin:1em 0}.squisq-md-code-frame>.squisq-md-code-block{margin:0;padding-right:5rem}.squisq-md-code-copy{position:absolute;z-index:1;top:.55rem;right:.55rem;min-width:3.7rem;padding:.28rem .5rem;border:1px solid color-mix(in srgb,currentcolor 20%,transparent);border-radius:5px;background:color-mix(in srgb,Canvas 90%,transparent);color:inherit;font:500 .72rem/1.2 system-ui,sans-serif;cursor:pointer;opacity:.58;transition:opacity .12s ease,background-color .12s ease}.squisq-md-code-frame:hover>.squisq-md-code-copy,.squisq-md-code-copy:focus-visible,.squisq-md-code-copy[data-copy-state=copied],.squisq-md-code-copy[data-copy-state=failed]{opacity:1}.squisq-md-code-copy:hover{background:Canvas}.squisq-md-code-copy:disabled{cursor:wait}.squisq-md-fence-widget{margin:.75rem 0}.squisq-json-fence-error{margin-top:.3rem;font-size:.78rem;opacity:.7}.squisq-json-fence-actions{display:flex;gap:.45rem;margin-top:.55rem}.squisq-json-fence-action{padding:.32rem .75rem;border:1px solid color-mix(in srgb,currentcolor 25%,transparent);border-radius:6px;background:color-mix(in srgb,Canvas 92%,transparent);color:inherit;font:500 .8rem/1.2 system-ui,sans-serif;cursor:pointer;transition:background-color .12s ease}.squisq-json-fence-action:hover{background:Canvas}.squisq-json-fence-action--primary{border-color:color-mix(in srgb,currentcolor 45%,transparent);font-weight:600}.squisq-mermaid-layer-frame{width:100%;height:100%}.squisq-mermaid-layer-frame .squisq-mermaid-rendered{height:100%;min-height:0}.squisq-mermaid-rendered :is(path.flowchart-link,.edgePath .path,.relationshipLine,.messageLine0,.messageLine1):not([style*=\"stroke:\"]){stroke:currentcolor!important}.squisq-mermaid-rendered marker :is(path,polygon):not([fill=none]){fill:currentcolor!important;stroke:currentcolor!important}.text-shadow{text-shadow:0 2px 4px rgba(0,0,0,.8),0 4px 8px rgba(0,0,0,.4)}.text-shadow-light{text-shadow:0 1px 2px rgba(0,0,0,.6)}.text-box{background:#0009;padding:16px 24px;border-radius:4px}.text-box--light{background:#ffffffe6;color:#1a1a1a}.squisq-inline-video-player{display:inline-block;max-width:480px;width:100%;margin:.5em 0}.squisq-inline-video-player video{display:block;width:100%;max-width:100%;height:auto;border-radius:4px;background:#000}.squisq-inline-audio-player{display:inline-block;max-width:360px;width:100%;margin:.25em 0;vertical-align:middle}.squisq-inline-audio-player audio{display:block;width:100%}@media(prefers-reduced-motion:reduce){.anim-slowZoom-in,.anim-slowZoom-out,.anim-slowZoom-panLeft,.anim-slowZoom-panRight,.anim-panLeft,.anim-panRight,.squisq-image--portrait-pan-left,.squisq-image--portrait-pan-right,.anim-drift{animation:none}}.doc-player--empty{min-height:120px;width:100%;background:#f0f0f0}.doc-player{--squisq-styles-loaded: 1}\n";var Bct=false;function Twr(){if(Bct||typeof document>"u")return;let t=document.createElement("style");t.setAttribute("data-squisq-player","animations");let e=globalThis.__SQUISQ_PLAYER_ICON_STYLES__;t.textContent=Pct,e&&(t.textContent+=`
|
|
4150
|
-
${e}`),document.head.appendChild(t),Bct=true;}function Cwr(t,e){let r={};for(let n of Object.keys(t)){let i=n.split("/").pop();r[i]=t[n];}return {async resolveUrl(n){if(n in t)return t[n];let i=n.replace(/^\.\//,"");if(i!==n&&i in t)return t[i];let a=n.split("/").pop();return a in r?r[a]:n.startsWith("http")||n.startsWith("data:")||n.startsWith("blob:")?n:`${e}/${n}`},async listMedia(){return Object.keys(t).map(n=>({name:n,mimeType:Swr(n),size:0}))},async addMedia(){throw new Error("Standalone player is read-only")},async removeMedia(){throw new Error("Standalone player is read-only")},dispose(){}}}function Swr(t){let e=t.split(".").pop()?.toLowerCase()??"";return {jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",gif:"image/gif",webp:"image/webp",svg:"image/svg+xml",mp3:"audio/mpeg",mp4:"video/mp4",webm:"video/webm"}[e]??"application/octet-stream"}function Ewr(t,e){if(!t.audio?.segments?.length)return t;let r=t.audio.segments.map(n=>{let i=e[n.name]??e[n.src]??n.src;return {...n,src:i}});return {...t,audio:{...t.audio,segments:r}}}var fq=new WeakMap,YE=new WeakMap;function Awr(t,e){let r=null,n=true,i=false,a,o=new Promise(u=>{a=u;}),s=u=>{i||(i=true,a(u));};e||s(null);let l={element:t,renderAPI:o,getRenderAPI:()=>r,unmount:()=>{YE.get(t)===l&&_wr(t);},setRenderAPI(u){n&&(r=u,u&&s(u));},cancel(){n=false,r=null,s(null);}};return l}function xCn(t,e,r={}){Twr();let{mode:n="slideshow",dashboard:i,basePath:a=".",images:o,audio:s,autoPlay:l=false,loop:u=false,theme:d,videoPresentation:h,pipSize:f,pipShape:p,pipPosition:m,renderMode:g=false,animationsEnabled:y=true,captionStyle:b,captionPosition:v,globalKeyboardShortcuts:x=true,showCodeCopyButton:C=false,onCopyCode:T}=r,k=s?Ewr(e,s):e,S=o?Cwr(o,a):null;YE.get(t)?.cancel();let E=Awr(t,(n==="slideshow"||n==="video"||n==="dashboard")&&g);YE.set(t,E);let A;if(n==="static")A=Lf(dq,{doc:k,basePath:a,theme:d,animationsEnabled:y,globalKeyboardShortcuts:x,showCodeCopyButton:C,onCopyCode:T});else {let P=n==="dashboard"?t.getBoundingClientRect():void 0,L=P&&P.width>0&&P.height>0?{width:Math.round(P.width),height:Math.round(P.height),name:"Host viewport"}:void 0;A=Lf(Oct,{doc:k,basePath:a,audioMode:k.audio?.segments?.length?"media":"synthetic",displayMode:n==="dashboard"?"dashboard":n==="flashcards"?"flashcards":n==="video"?"video":"slideshow",loop:n==="video"?u:void 0,dashboardLayout:i?.layout,dashboardShowTitle:i?.title,dashboardStyle:i?.style,dashboardDocumentTitle:i?.documentTitle,forceViewport:L,autoPlay:g?false:l,showControls:!g,renderMode:g,animationsEnabled:y,theme:d,videoPresentation:h,pipSize:f,pipShape:p,pipPosition:m,captionsEnabled:!!b,captionStyle:b??"standard",captionPosition:v,globalKeyboardShortcuts:x,onRenderAPIReady:_=>E.setRenderAPI(_)});}S&&(A=Lf(CG.Provider,{value:S},A));let R=fq.get(t);return R||(R=Lde(t),fq.set(t,R)),R.render(A),E}function wCn(t){return YE.get(t)}function _wr(t){YE.get(t)?.cancel(),YE.delete(t);let r=fq.get(t);r&&(r.unmount(),fq.delete(t));}var kCn="2.11.
|
|
4150
|
+
${e}`),document.head.appendChild(t),Bct=true;}function Cwr(t,e){let r={};for(let n of Object.keys(t)){let i=n.split("/").pop();r[i]=t[n];}return {async resolveUrl(n){if(n in t)return t[n];let i=n.replace(/^\.\//,"");if(i!==n&&i in t)return t[i];let a=n.split("/").pop();return a in r?r[a]:n.startsWith("http")||n.startsWith("data:")||n.startsWith("blob:")?n:`${e}/${n}`},async listMedia(){return Object.keys(t).map(n=>({name:n,mimeType:Swr(n),size:0}))},async addMedia(){throw new Error("Standalone player is read-only")},async removeMedia(){throw new Error("Standalone player is read-only")},dispose(){}}}function Swr(t){let e=t.split(".").pop()?.toLowerCase()??"";return {jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",gif:"image/gif",webp:"image/webp",svg:"image/svg+xml",mp3:"audio/mpeg",mp4:"video/mp4",webm:"video/webm"}[e]??"application/octet-stream"}function Ewr(t,e){if(!t.audio?.segments?.length)return t;let r=t.audio.segments.map(n=>{let i=e[n.name]??e[n.src]??n.src;return {...n,src:i}});return {...t,audio:{...t.audio,segments:r}}}var fq=new WeakMap,YE=new WeakMap;function Awr(t,e){let r=null,n=true,i=false,a,o=new Promise(u=>{a=u;}),s=u=>{i||(i=true,a(u));};e||s(null);let l={element:t,renderAPI:o,getRenderAPI:()=>r,unmount:()=>{YE.get(t)===l&&_wr(t);},setRenderAPI(u){n&&(r=u,u&&s(u));},cancel(){n=false,r=null,s(null);}};return l}function xCn(t,e,r={}){Twr();let{mode:n="slideshow",dashboard:i,basePath:a=".",images:o,audio:s,autoPlay:l=false,loop:u=false,theme:d,videoPresentation:h,pipSize:f,pipShape:p,pipPosition:m,renderMode:g=false,animationsEnabled:y=true,captionStyle:b,captionPosition:v,globalKeyboardShortcuts:x=true,showCodeCopyButton:C=false,onCopyCode:T}=r,k=s?Ewr(e,s):e,S=o?Cwr(o,a):null;YE.get(t)?.cancel();let E=Awr(t,(n==="slideshow"||n==="video"||n==="dashboard")&&g);YE.set(t,E);let A;if(n==="static")A=Lf(dq,{doc:k,basePath:a,theme:d,animationsEnabled:y,globalKeyboardShortcuts:x,showCodeCopyButton:C,onCopyCode:T});else {let P=n==="dashboard"?t.getBoundingClientRect():void 0,L=P&&P.width>0&&P.height>0?{width:Math.round(P.width),height:Math.round(P.height),name:"Host viewport"}:void 0;A=Lf(Oct,{doc:k,basePath:a,audioMode:k.audio?.segments?.length?"media":"synthetic",displayMode:n==="dashboard"?"dashboard":n==="flashcards"?"flashcards":n==="video"?"video":"slideshow",loop:n==="video"?u:void 0,dashboardLayout:i?.layout,dashboardShowTitle:i?.title,dashboardStyle:i?.style,dashboardDocumentTitle:i?.documentTitle,forceViewport:L,autoPlay:g?false:l,showControls:!g,renderMode:g,animationsEnabled:y,theme:d,videoPresentation:h,pipSize:f,pipShape:p,pipPosition:m,captionsEnabled:!!b,captionStyle:b??"standard",captionPosition:v,globalKeyboardShortcuts:x,onRenderAPIReady:_=>E.setRenderAPI(_)});}S&&(A=Lf(CG.Provider,{value:S},A));let R=fq.get(t);return R||(R=Lde(t),fq.set(t,R)),R.render(A),E}function wCn(t){return YE.get(t)}function _wr(t){YE.get(t)?.cancel(),YE.delete(t);let r=fq.get(t);r&&(r.unmount(),fq.delete(t));}var kCn="2.11.1";/*! Bundled license information:
|
|
4151
4151
|
|
|
4152
4152
|
dompurify/dist/purify.es.mjs:
|
|
4153
4153
|
(*! @license DOMPurify 3.4.14 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.14/LICENSE *)
|