import{r as c,j as s}from"./index-CEeZxcxj.js";const w="_wrapper_61dhl_1",k="_frame_61dhl_15",v="_scan_61dhl_30",S="_stack_61dhl_47",B="_meta_61dhl_57",$="_progressTrack_61dhl_68",C="_progressFill_61dhl_77",E="_slide_61dhl_87",G="_title_61dhl_95",L="_rgbGlitch_61dhl_105",F="_rgbBase_61dhl_110",R="_rgbLayer_61dhl_116",Y="_layerR_61dhl_124",I="_layerG_61dhl_129",P="_layerB_61dhl_134",W="_content_61dhl_139",M="_line_61dhl_148",A="_spacer_61dhl_153",D="_list_61dhl_158",H="_warning_61dhl_166",O="_cta_61dhl_176",q="_controls_61dhl_195",U="_navButton_61dhl_201",e={wrapper:w,frame:k,scan:v,stack:S,meta:B,progressTrack:$,progressFill:C,slide:E,title:G,rgbGlitch:L,rgbBase:F,rgbLayer:R,layerR:Y,layerG:I,layerB:P,content:W,line:M,spacer:A,list:D,warning:H,cta:O,controls:q,navButton:U},z=40,i=[{title:"The Premise",lines:["This facility tests foundational assumptions.","","Not interpretations.","Assumptions."]},{title:"The method",lines:["This is math and philosophy.","Make assumption.","Pretend it's true.","Where does that lead?"]},{title:"The law",lines:["We make predictions.","If they fail, the idea fails."]},{title:"The way",lines:["You will:"],bullets:["Pass challenges","Collect paradoxes","Examine anomalies","Learn to think sharply"]},{title:"Warning",lines:["You may feel:"],bullets:["This is not a game!","Temporary confusion","The urge to defend existing physics!"],bulletStyle:"warning",after:"Good. This is not for everyone."},{title:"How This Works",lines:["Watch a short module","Pass the glitch gate","Unlock the next tech","That's it. For now."]},{title:"Proceed",lines:["You may proceed as an investigator.","Begin at the intersection","Get briefed"],cta:"[ ENTER FACILITY ]"}];function K({config:h,onComplete:u,onProgress:_,theme:n,className:p}){const[l,g]=c.useState(0),o=c.useRef(null),y=c.useMemo(()=>n?{"--gc-primary":n.primary,"--gc-accent":n.accent,"--gc-bg":n.bg,"--gc-bg-secondary":n.bgSecondary,"--gc-text":n.text,"--gc-text-muted":n.textMuted,"--gc-border":n.border}:{},[n]);c.useEffect(()=>{const t=(l+1)/i.length*100;_?.(Math.round(t))},[l,_]);const d=c.useCallback(t=>{if(t>0&&l===i.length-1){g(0);return}const r=l+t;r<0||r>=i.length||g(r)},[l]),b=c.useCallback(t=>{o.current=t.changedTouches[0]?.clientY??null},[]),x=c.useCallback(t=>{if(o.current==null)return;const r=t.changedTouches[0]?.clientY??o.current,m=o.current-r;Math.abs(m)>z&&d(m>0?1:-1),o.current=null},[d]),f=c.useCallback(()=>{u({success:!0,score:100,data:{sequence:"facility-slideshow",configId:h.id,completedAt:new Date().toISOString()}})},[h.id,u]),a=i[l],j=l===i.length-1,N=(l+1)/i.length*100,T=p?`${e.wrapper} ${p}`:e.wrapper;return s.jsx("div",{className:T,style:y,children:s.jsxs("section",{className:e.frame,"aria-label":"Facility onboarding slideshow",onTouchStart:b,onTouchEnd:x,children:[s.jsx("div",{className:e.scan,"aria-hidden":"true"}),s.jsxs("div",{className:e.stack,children:[s.jsxs("header",{children:[s.jsxs("div",{className:e.meta,children:[s.jsx("span",{children:"Glitch Facility"}),s.jsxs("span",{children:[l+1," / ",i.length]})]}),s.jsx("div",{className:e.progressTrack,children:s.jsx("div",{className:e.progressFill,style:{width:`${N}%`}})})]}),s.jsxs("article",{className:e.slide,"aria-live":"polite",children:[s.jsx("h2",{className:e.title,children:s.jsxs("span",{className:e.rgbGlitch,children:[s.jsx("span",{className:e.rgbBase,children:a.title}),s.jsx("span",{className:`${e.rgbLayer} ${e.layerR}`,"aria-hidden":"true",children:a.title}),s.jsx("span",{className:`${e.rgbLayer} ${e.layerG}`,"aria-hidden":"true",children:a.title}),s.jsx("span",{className:`${e.rgbLayer} ${e.layerB}`,"aria-hidden":"true",children:a.title})]})}),s.jsxs("div",{className:e.content,children:[a.lines.map((t,r)=>t===""?s.jsx("p",{className:e.spacer,"aria-hidden":"true"},`line-${r}`):s.jsx("p",{className:e.line,children:t},`line-${r}`)),a.bullets&&s.jsx("ul",{className:`${e.list} ${a.bulletStyle==="warning"?e.warning:""}`,children:a.bullets.map(t=>s.jsx("li",{children:t},t))}),a.after&&s.jsx("p",{className:e.line,children:a.after}),a.cta&&s.jsx("button",{type:"button",className:e.cta,onClick:f,children:a.cta})]})]}),s.jsxs("nav",{className:e.controls,"aria-label":"Slideshow controls",children:[s.jsx("button",{type:"button",className:e.navButton,onClick:()=>d(-1),disabled:l===0,children:"Previous"}),s.jsx("button",{type:"button",className:e.navButton,onClick:()=>d(1),children:j?"Restart":"Next"})]})]})]})})}const Q={name:"onboarding2",displayName:"Facility Slideshow",version:"1.0.0",paramSchema:{},defaultParams:{}};export{K as default,Q as metadata};
