11 lines
12 KiB
JavaScript
11 lines
12 KiB
JavaScript
import{r as n,j as e}from"./index-CEeZxcxj.js";const L="_container_12iml_1",$="_introScreen_12iml_19",z="_introTitle_12iml_27",E="_introSubtitle_12iml_33",Q="_carouselDots_12iml_39",W="_carouselDot_12iml_39",F="_active_12iml_53",K="_continueButton_12iml_57",P="_quizScreen_12iml_75",U="_intro_12iml_19",V="_progress_12iml_90",G="_progressDot_12iml_97",H="_completed_12iml_109",J="_questionContainer_12iml_113",X="_questionText_12iml_120",Z="_questionContext_12iml_127",tt="_options_12iml_134",et="_option_12iml_134",st="_selected_12iml_158",ot="_diagnosticComplete_12iml_171",it="_summaryBox_12iml_178",nt="_summaryLabel_12iml_186",rt="_summaryText_12iml_194",ct="_roleCards_12iml_210",at="_roleCard_12iml_210",ut="_recommended_12iml_202",lt="_roleTitle_12iml_242",mt="_roleDescription_12iml_249",dt="_roleStrengths_12iml_255",ht="_strengthTag_12iml_262",yt="_selectable_12iml_267",pt="_resultScreen_12iml_277",_t="_assignedLabel_12iml_285",xt="_resultCard_12iml_292",bt="_resultButtons_12iml_314",gt="_acceptButton_12iml_321",ft="_decideButton_12iml_338",Rt="_selectionScreen_12iml_356",vt="_selectionTitle_12iml_363",t={container:L,introScreen:$,introTitle:z,introSubtitle:E,carouselDots:Q,carouselDot:W,active:F,continueButton:K,quizScreen:P,intro:U,progress:V,progressDot:G,completed:H,questionContainer:J,questionText:X,questionContext:Z,options:tt,option:et,selected:st,diagnosticComplete:ot,summaryBox:it,summaryLabel:nt,summaryText:rt,roleCards:ct,roleCard:at,recommended:ut,roleTitle:lt,roleDescription:mt,roleStrengths:dt,strengthTag:ht,selectable:yt,resultScreen:pt,assignedLabel:_t,resultCard:xt,resultButtons:bt,acceptButton:gt,decideButton:ft,selectionScreen:Rt,selectionTitle:vt},St="Your glitch-modalities will now be tested.",Nt=[{id:"q1",question:'Mom says: "Ask Dad." Dad says: "Ask Mom."',context:"What do you do?",options:[{id:"a",text:"I technically asked both. That's permission.",scores:{authorityAutonomy:2,structureOutcome:1,stabilityReconstruction:0}},{id:"b",text:"I don't have permission. Stop.",scores:{authorityAutonomy:-2,structureOutcome:-1,stabilityReconstruction:-1}},{id:"c",text:"Tell Dad: Mom said you decide.",scores:{authorityAutonomy:1,structureOutcome:0,stabilityReconstruction:1}},{id:"d",text:"Tell Mom: Dad said you decide.",scores:{authorityAutonomy:1,structureOutcome:0,stabilityReconstruction:1}}]},{id:"q2",question:"A system works flawlessly. You discover it rests on a shaky assumption.",context:"Do you:",options:[{id:"a",text:"Ignore it. It works.",scores:{authorityAutonomy:-1,structureOutcome:2,stabilityReconstruction:-2}},{id:"b",text:"Patch the assumption quietly.",scores:{authorityAutonomy:0,structureOutcome:1,stabilityReconstruction:0}},{id:"c",text:"Expose the assumption publicly.",scores:{authorityAutonomy:1,structureOutcome:-1,stabilityReconstruction:1}},{id:"d",text:"Rebuild the system to remove it.",scores:{authorityAutonomy:1,structureOutcome:-1,stabilityReconstruction:2}}]},{id:"q3",question:"You find a paradox in your own model.",context:"Your reaction:",options:[{id:"a",text:"I must be wrong.",scores:{authorityAutonomy:-1,structureOutcome:0,stabilityReconstruction:-1}},{id:"b",text:"The paradox is wrong.",scores:{authorityAutonomy:0,structureOutcome:1,stabilityReconstruction:-1}},{id:"c",text:"The definitions are wrong.",scores:{authorityAutonomy:1,structureOutcome:-1,stabilityReconstruction:1}},{id:"d",text:"This is interesting. Push deeper.",scores:{authorityAutonomy:2,structureOutcome:0,stabilityReconstruction:2}}]},{id:"q4",question:"You prove something elegant. Reality disagrees.",context:"You:",options:[{id:"a",text:"Recheck the math.",scores:{authorityAutonomy:-1,structureOutcome:-1,stabilityReconstruction:0}},{id:"b",text:"Recheck the experiment.",scores:{authorityAutonomy:0,structureOutcome:1,stabilityReconstruction:0}},{id:"c",text:"Recheck the assumptions.",scores:{authorityAutonomy:1,structureOutcome:0,stabilityReconstruction:1}},{id:"d",text:"Accept chaos.",scores:{authorityAutonomy:2,structureOutcome:1,stabilityReconstruction:2}}]},{id:"q5",question:"What annoys you more?",options:[{id:"a",text:"Vague thinking.",scores:{authorityAutonomy:0,structureOutcome:-2,stabilityReconstruction:0}},{id:"b",text:"Sloppy math.",scores:{authorityAutonomy:-1,structureOutcome:-2,stabilityReconstruction:-1}},{id:"c",text:"Blind obedience.",scores:{authorityAutonomy:2,structureOutcome:0,stabilityReconstruction:1}},{id:"d",text:"Overconfidence.",scores:{authorityAutonomy:0,structureOutcome:1,stabilityReconstruction:0}}]}],jt=[{id:"philosopher-builder",name:"philosopher-builder",title:"Philosopher-Builder",description:"You approach systems from first principles. You like pulling assumptions apart and rebuilding from scratch. Formal training may vary — curiosity does not.",strengths:["Identifying hidden assumptions","Navigating paradox","Reconstructing from new foundations"],risk:"Building a house of cards. Impressive but useless.",mission:"Clarify structure before defending it.",axisProfile:{authorityAutonomy:1,structureOutcome:-1,stabilityReconstruction:2},summaries:[`You break loops instead of waiting inside them.
|
|
You are comfortable redirecting authority.`,`You question foundations before building on them.
|
|
Assumptions are targets, not givens.`,`You prefer rebuilding to patching.
|
|
Clarity matters more than comfort.`]},{id:"cross-domain-nerd",name:"cross-domain-nerd",title:"Cross-Domain Nerd",description:"You are fluent somewhere else. Math, biology, finance, code, art — you've built things in another domain. You suspect physics might benefit from outside pattern recognition.",strengths:["Translating ideas across domains","Spotting structural analogies","Bringing alien intuition"],risk:"Overextending metaphors. Using your favourite tool. Always.",mission:"Stress-test physics with alien intuition.",axisProfile:{authorityAutonomy:1,structureOutcome:1,stabilityReconstruction:1},summaries:[`You see patterns that others miss.
|
|
Your intuition comes from somewhere else.`,`You translate fluently between worlds.
|
|
Analogies are your native tongue.`,`You import tools from foreign domains.
|
|
Fresh perspective is your advantage.`]},{id:"formal-student",name:"formal-student",title:"Formal Student",description:"You are inside the machinery of formal education. You work with equations daily. You care about precision.",strengths:["Technical rigor","Mathematical discipline","Knowing what is good enough"],risk:"Over-trusting established formalism. Thinking you own the place.",mission:"Master the tools. Then question them.",axisProfile:{authorityAutonomy:-1,structureOutcome:-1,stabilityReconstruction:-1},summaries:[`You trust the process but verify the details.
|
|
Rigor is your foundation.`,`You work within structure to understand it.
|
|
Precision is non-negotiable.`,`You respect the machinery of knowledge.
|
|
Mastery precedes revolution.`]}],f={intro:St,questions:Nt,roles:jt};function Ct({onComplete:_,onProgress:u,className:j}){const[y,g]=n.useState("intro"),[A,C]=n.useState(0),[m,T]=n.useState(0),[d,q]=n.useState({}),[r,w]=n.useState(null),R=n.useRef(null),O=n.useRef(null),h=f.questions,l=f.roles,v=n.useCallback(s=>{const o={authorityAutonomy:0,structureOutcome:0,stabilityReconstruction:0};return h.forEach(i=>{const c=s[i.id],a=i.options.find(b=>b.id===c);a&&(o.authorityAutonomy+=a.scores.authorityAutonomy,o.structureOutcome+=a.scores.structureOutcome,o.stabilityReconstruction+=a.scores.stabilityReconstruction)}),o},[h]),S=n.useCallback(s=>{let o=l[0],i=1/0;return l.forEach(c=>{const a=Math.sqrt(Math.pow(s.authorityAutonomy-c.axisProfile.authorityAutonomy,2)+Math.pow(s.structureOutcome-c.axisProfile.structureOutcome,2)+Math.pow(s.stabilityReconstruction-c.axisProfile.stabilityReconstruction,2));a<i&&(i=a,o=c)}),o},[l]),N=n.useCallback((s,o)=>{const i=Math.max(Math.abs(o.authorityAutonomy),Math.abs(o.structureOutcome),Math.abs(o.stabilityReconstruction));let c=0;return Math.abs(o.structureOutcome)===i&&(c=1),Math.abs(o.stabilityReconstruction)===i&&(c=2),s.summaries[c]||s.summaries[0]},[]),k=n.useCallback((s,o)=>{const i={...d,[s]:o};q(i);const c=(m+1)/h.length*50;u?.(c),setTimeout(()=>{if(m<h.length-1)T(m+1);else{const a=v(i),b=S(a),I=N(b,a);w({scores:a,recommendedRole:b.id,summary:I}),g("result"),u?.(75)}},300)},[d,m,h.length,v,S,N,u]),D=n.useCallback(()=>{if(!r)return;const s=l.find(o=>o.id===r.recommendedRole);s&&(u?.(100),_({success:!0,score:100,data:{selectedRole:s.id,recommendedRole:r.recommendedRole,scores:r.scores,answers:d,completedAt:new Date().toISOString()}}))},[r,l,d,_,u]),B=n.useCallback(()=>{g("selection"),u?.(80)},[u]),Y=n.useCallback(s=>{r&&(u?.(100),_({success:!0,score:100,data:{selectedRole:s.id,recommendedRole:r.recommendedRole,scores:r.scores,answers:d,completedAt:new Date().toISOString()}}))},[r,d,_,u]),M=n.useCallback(()=>{g("quiz"),u?.(10)},[u]);n.useEffect(()=>{const s=R.current;if(!s||y!=="intro")return;const o=()=>{const i=s.scrollLeft,a=Math.round(i/296);C(Math.min(Math.max(a,0),l.length-1))};return s.addEventListener("scroll",o),()=>s.removeEventListener("scroll",o)},[y,l.length]);const p=h[m],x=r?l.find(s=>s.id===r.recommendedRole):null;return e.jsxs("div",{className:`${t.container} ${j||""}`,children:[y==="intro"&&e.jsxs("div",{className:t.introScreen,children:[e.jsx("h2",{className:t.introTitle,children:"Meet the Operator Modes"}),e.jsx("p",{className:t.introSubtitle,children:"Swipe to explore the three paths"}),e.jsx("div",{className:t.roleCards,ref:R,children:l.map(s=>e.jsxs("div",{className:t.roleCard,children:[e.jsx("h3",{className:t.roleTitle,children:s.title}),e.jsx("p",{className:t.roleDescription,children:s.description}),e.jsx("div",{className:t.roleStrengths,children:s.strengths.map((o,i)=>e.jsxs("span",{className:t.strengthTag,children:["+ ",o]},i))})]},s.id))}),e.jsx("div",{className:t.carouselDots,children:l.map((s,o)=>e.jsx("div",{className:`${t.carouselDot} ${o===A?t.active:""}`},o))}),e.jsx("button",{className:t.continueButton,onClick:M,children:"Begin Diagnostic"})]}),y==="quiz"&&e.jsxs("div",{className:t.quizScreen,children:[m===0&&e.jsx("h2",{className:t.intro,children:f.intro}),e.jsx("div",{className:t.progress,children:h.map((s,o)=>e.jsx("div",{className:`${t.progressDot} ${o===m?t.active:""} ${o<m?t.completed:""}`},o))}),e.jsxs("div",{className:t.questionContainer,children:[e.jsx("p",{className:t.questionText,children:p.question}),p.context&&e.jsx("p",{className:t.questionContext,children:p.context}),e.jsx("div",{className:t.options,children:p.options.map(s=>e.jsx("button",{className:`${t.option} ${d[p.id]===s.id?t.selected:""}`,onClick:()=>k(p.id,s.id),children:s.text},s.id))})]})]}),y==="result"&&r&&x&&e.jsxs("div",{className:t.resultScreen,children:[e.jsx("p",{className:t.diagnosticComplete,children:"Diagnostic complete."}),e.jsxs("div",{className:t.summaryBox,children:[e.jsx("p",{className:t.summaryLabel,children:"Your reflex under uncertainty:"}),e.jsx("p",{className:t.summaryText,children:r.summary})]}),e.jsx("p",{className:t.assignedLabel,children:"Your assigned operator mode:"}),e.jsxs("div",{className:t.resultCard,children:[e.jsx("h3",{className:t.roleTitle,children:x.title}),e.jsx("p",{className:t.roleDescription,children:x.description}),e.jsx("div",{className:t.roleStrengths,children:x.strengths.map((s,o)=>e.jsxs("span",{className:t.strengthTag,children:["+ ",s]},o))})]}),e.jsxs("div",{className:t.resultButtons,children:[e.jsx("button",{className:t.acceptButton,onClick:D,children:"Accept"}),e.jsx("button",{className:t.decideButton,onClick:B,children:"I want to decide"})]})]}),y==="selection"&&r&&e.jsxs("div",{className:t.selectionScreen,children:[e.jsx("p",{className:t.selectionTitle,children:"Choose your operator mode"}),e.jsx("div",{className:t.roleCards,ref:O,children:l.map(s=>e.jsxs("div",{className:`${t.roleCard} ${t.selectable} ${s.id===r.recommendedRole?t.recommended:""}`,onClick:()=>Y(s),children:[e.jsx("h3",{className:t.roleTitle,children:s.title}),e.jsx("p",{className:t.roleDescription,children:s.description}),e.jsx("div",{className:t.roleStrengths,children:s.strengths.map((o,i)=>e.jsxs("span",{className:t.strengthTag,children:["+ ",o]},i))})]},s.id))})]})]})}const Tt={name:"level-questions",displayName:"Level Questions",version:"1.0.0",paramSchema:{},defaultParams:{}};export{Ct as default,Tt as metadata};
|