1import{r as n,j as e,ag as k,ah as A,ai as G}from"./index-CXbI75Kg.js";function y({children:p,className:d="",scale:o}){const u=n.useRef(null),[c,x]=n.useState(o??.5);return n.useEffect(()=>{if(o!=null){x(o);return}const f=u.current;if(!f)return;const i=()=>{const{width:h,height:a}=f.getBoundingClientRect();if(h===0||a===0)return;const v=Math.min(h/1920,a/1080);x(v)};i();const r=new ResizeObserver(i);return r.observe(f),()=>r.disconnect()},[o]),e.jsx("div",{ref:u,className:`relative h-full w-full overflow-hidden ${d}`,children:e.jsx("div",{className:"slide-wrapper",style:{"--scale":c},children:p})})}function z({slideIndex:p,setSlideIndex:d,printMode:o=!1}){const[u,c]=n.useState(!1),[x,f]=n.useState(!0),[i,r]=n.useState(!1),[h,a]=n.useState(220),v=n.useRef(null),[S,C]=n.useState(!1),m=k.length,l=Math.max(0,Math.min(p,m-1)),j=k[l],b=n.useCallback(t=>{const s=Math.max(0,Math.min(t,m-1));d(s)},[m,d]),w=n.useCallback(()=>b(l+1),[b,l]),N=n.useCallback(()=>b(l-1),[b,l]);n.useEffect(()=>{const t=s=>{o||(s.key==="ArrowRight"||s.key===" "||s.key==="PageDown"?(s.preventDefault(),w()):s.key==="ArrowLeft"||s.key==="PageUp"?(s.preventDefault(),N()):s.key==="g"||s.key==="G"?c(g=>!g):s.key==="n"||s.key==="N"?f(g=>!g):s.key==="Escape"?u?c(!1):i&&P():(s.key==="F5"||s.key==="p"&&s.shiftKey)&&(s.preventDefault(),E()))};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[w,N,u,i,o]),n.useEffect(()=>{document.title=`${l+1}/${m} - ${j.title} - The Pro-Kids Show`},[l,m,j.title]);const E=n.useCallback(()=>{const t=document.documentElement;t.requestFullscreen?t.requestFullscreen().then(()=>r(!0)).catch(()=>r(!0)):r(!0)},[]),P=n.useCallback(()=>{document.fullscreenElement&&document.exitFullscreen().catch(()=>{}),r(!1)},[]);n.useEffect(()=>{const t=()=>{document.fullscreenElement||r(!1)};return document.addEventListener("fullscreenchange",t),()=>document.removeEventListener("fullscreenchange",t)},[]),n.useEffect(()=>{if(!i){C(!1);return}const t=()=>{C(!1),v.current&&window.clearTimeout(v.current),v.current=window.setTimeout(()=>C(!0),2500)};return window.addEventListener("mousemove",t),t(),()=>{window.removeEventListener("mousemove",t),v.current&&window.clearTimeout(v.current)}},[i]);const F=n.useCallback(t=>{t.preventDefault();const s=t.clientX,g=h,$=T=>{const R=Math.max(150,Math.min(350,g+T.clientX-s));a(R)},D=()=>{window.removeEventListener("mousemove",$),window.removeEventListener("mouseup",D)};window.addEventListener("mousemove",$),window.addEventListener("mouseup",D)},[h]);if(o)return e.jsx("div",{className:"deck-print",style:{background:"#000"},children:k.map((t,s)=>e.jsx("div",{className:"slide-print-page",style:{width:1920,height:1080,position:"relative"},children:e.jsx(y,{scale:1,children:e.jsx(t.Component,{})})},t.id))});if(i){const t=j.Component;return e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{background:"#000",cursor:S?"none":"default"},onClick:s=>{s.clientX/window.innerWidth>.5?w():N()},children:[e.jsx("div",{className:"relative h-full w-full",children:e.jsx(y,{children:e.jsx(t,{})})}),e.jsxs("div",{className:"absolute bottom-4 left-1/2 flex -translate-x-1/2 items-center gap-3 rounded-full px-5 py-2",style:{background:"rgba(0,0,0,0.5)",color:"#fff",fontSize:14,opacity:S?0:1,transition:"opacity 0.3s"},children:[e.jsx("button",{onClick:s=>{s.stopPropagation(),N()},className:"px-2 text-lg",children:"â¹"}),e.jsxs("span",{children:[l+1," / ",m]}),e.jsx("button",{onClick:s=>{s.stopPropagation(),w()},className:"px-2 text-lg",children:"âº"}),e.jsx("button",{onClick:s=>{s.stopPropagation(),P()},className:"ml-2 text-sm underline",children:"Exit"})]})]})}if(u)return e.jsxs("div",{className:"flex h-screen flex-col",style:{background:"#0d1820"},children:[e.jsx(L,{onGrid:()=>c(!1),gridActive:!0,onPresent:E,onNotes:()=>f(t=>!t),notesActive:x,slideNum:l+1,total:m,onNavHome:void 0}),e.jsx("div",{className:"flex-1 overflow-y-auto p-8",children:e.jsx("div",{className:"mx-auto grid max-w-7xl grid-cols-3 gap-6 lg:grid-cols-4",children:k.map((t,s)=>e.jsxs("button",{onClick:()=>{b(s),c(!1)},className:"group overflow-hidden rounded-xl border-2 text-left transition",style:{borderColor:s===l?"#fcd700":"rgba(255,255,255,0.1)",background:"rgba(255,255,255,0.03)"},children:[e.jsx("div",{className:"aspect-[16/9] overflow-hidden",children:e.jsx(y,{scale:.18,children:e.jsx(t.Component,{})})}),e.jsxs("div",{className:"p-3",children:[e.jsx("p",{className:"text-xs font-semibold",style:{color:"#fcd700"},children:s+1}),e.jsx("p",{className:"text-sm",style:{color:"rgba(255,255,255,0.8)"},children:t.title})]})]},t.id))})})]});const M=j.Component;return e.jsxs("div",{className:"flex h-screen flex-col",style:{background:"#0d1820"},children:[e.jsx(L,{onGrid:()=>c(!0),gridActive:!1,onPresent:E,onNotes:()=>f(t=>!t),notesActive:x,slideNum:l+1,total:m,onNavHome:()=>b(0)}),e.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[e.jsxs("div",{className:"relative flex-shrink-0 overflow-y-auto",style:{width:h,background:"rgba(0,0,0,0.3)"},children:[e.jsx("div",{className:"py-3",children:k.map((t,s)=>e.jsxs("button",{onClick:()=>b(s),className:"block w-full px-3 pb-3 text-left",children:[e.jsx("div",{className:"overflow-hidden rounded-lg border-2 transition",style:{borderColor:s===l?"#fcd700":"rgba(255,255,255,0.1)"},children:e.jsx("div",{className:"aspect-[16/9] overflow-hidden",children:e.jsx(y,{scale:.095,children:e.jsx(t.Component,{})})})}),e.jsxs("p",{className:"mt-1 truncate text-xs",style:{color:s===l?"#fcd700":"rgba(255,255,255,0.6)"},children:[s+1,". ",t.title]})]},t.id))}),e.jsx("div",{className:"absolute right-0 top-0 h-full w-1 cursor-col-resize",style:{background:"rgba(255,255,255,0.1)"},onMouseDown:F})]}),e.jsxs("div",{className:"flex flex-1 flex-col",children:[e.jsxs("div",{className:"relative flex-1 overflow-hidden p-4",style:{background:"#1a1a2e"},children:[e.jsx(y,{children:e.jsx(M,{})}),e.jsxs("div",{className:"absolute bottom-6 left-1/2 flex -translate-x-1/2 items-center gap-2 rounded-full px-4 py-2",style:{background:"rgba(0,0,0,0.5)"},children:[e.jsx("button",{onClick:N,disabled:l===0,className:"px-3 text-xl text-white disabled:opacity-30",children:"â¹"}),e.jsxs("span",{className:"text-sm text-white",children:[l+1," / ",m]}),e.jsx("button",{onClick:w,disabled:l===m-1,className:"px-3 text-xl text-white disabled:opacity-30",children:"âº"})]})]}),x&&e.jsxs("div",{className:"flex-shrink-0 p-5",style:{background:"#162934",borderTop:"1px solid rgba(255,255,255,0.1)"},children:[e.jsx("p",{className:"mb-1 text-xs font-semibold uppercase tracking-wider",style:{color:"#fcd700"},children:"Presenter Notes"}),e.jsx("p",{className:"text-sm",style:{color:"rgba(255,255,255,0.85)"},children:j.notes})]})]})]})]})}function L({onGrid:p,gridActive:d,onPresent:o,onNotes:u,notesActive:c,slideNum:x,total:f,onNavHome:i}){const r="rounded-lg px-3 py-2 text-sm font-medium transition",h="bg-[#fcd700] text-[#162934]",a="bg-white/10 text-white hover:bg-white/20";return e.jsxs("div",{className:"flex items-center justify-between px-4 py-2",style:{background:"#0d1820",borderBottom:"1px solid rgba(255,255,255,0.1)"},children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"font-bold",style:{color:"#fcd700",fontFamily:'"Sora", sans-serif'},children:"Pro-Kids Show"}),e.jsx("span",{className:"text-xs",style:{color:"rgba(255,255,255,0.4)"},children:"| Sales Deck"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:p,className:`${r} ${d?h:a}`,children:"Grid (G)"}),e.jsx("button",{onClick:u,className:`${r} ${c?h:a}`,children:"Notes (N)"}),e.jsx("button",{onClick:o,className:`${r} ${a}`,children:"Present (F5)"}),i&&e.jsx("button",{onClick:i,className:`${r} ${a}`,children:"First"}),e.jsxs("span",{className:"ml-2 text-sm",style:{color:"rgba(255,255,255,0.5)"},children:[x,"/",f]}),e.jsx("a",{href:"/?print",target:"_blank",className:`${r} ${a}`,children:"Print PDF"}),e.jsx("a",{href:"/",className:`${r} ${a}`,children:"Exit"})]})]})}function K(){const{slide:p,print:d}=A({from:"/deck"}),o=G({from:"/deck"}),u=c=>{o({to:"/deck",search:x=>({...x,slide:c})})};return n.useEffect(()=>{d||window.scrollTo(0,0)},[p,d]),e.jsx("div",{className:"h-screen w-screen overflow-hidden",children:e.jsx(z,{slideIndex:p,setSlideIndex:u,printMode:d})})}export{K as component};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.