PageSourceSearch

https://app.cubelet.ai/_next/static/chunks/3895-40f3ee25853de355.js

js cubelet.ai collected 2026-10-05 15:20:43 UTC 51,814 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3895],{93079:(e,s,t)=>{t.d(s,{Xf:()=>d});var a,n=t(73365);let r={instructor:{id:"instructor",name:"Instructor",initial:"I",accentVar:"--room-lecture-accent",aiPersona:!1},skeptic:{id:"skeptic",name:"Skeptic",initial:"S",accentVar:"--lumin",aiPersona:!0},assessor:{id:"assessor",name:"Assessor",initial:"A",accentVar:"--accent",aiPersona:!1},mirror:{id:"mirror",name:"Mirror",initial:"M",accentVar:"--lumin",aiPersona:!0},coach:{id:"coach",name:"Coach",initial:"C",accentVar:"--accent",aiPersona:!1},registrar:{id:"registrar",name:"Registrar",initial:"R",accentVar:"--ink-faint",aiPersona:!1}};function i(e){return e?r[e.toLowerCase()]??null:null}function l({speaker:e}){return(0,n.jsxs)("div",{className:"speaker-header","data-speaker":e.id,children:[(0,n.jsx)("span",{className:"speaker-avatar",style:{background:`var(${e.accentVar})`},"aria-hidden":"true",children:e.initial}),(0,n.jsx)("span",{className:"speaker-name",children:e.name}),e.aiPersona&&(0,n.jsx)("span",{className:"speaker-ai",title:"AI persona — modeled on a real-world role",children:"AI persona"})]})}let o=new Map;function c(e){return function({message:s,position:t}){if("before"!==t||"assistant"!==s.role)return null;let a=i(e);return a?(0,n.jsx)(l,{speaker:a}):null}}let d=[{agentId:"lecture",render:(a="lecture",function({message:e,position:s}){if("before"!==s||"assistant"!==e.role)return null;let t=e.name;t||(t=o.get(a)),t||(t="instructor"),o.set(a,t);let r=i(t);return r?(0,n.jsx)(l,{speaker:r}):null})},{agentId:"coaching",render:c("coach")},{agentId:"lab",render:c("coach")},{agentId:"debrief",render:c("coach")},{agentId:"war_room",render:c("assessor")}]},93895:(e,s,t)=>{t.r(s),t.d(s,{ActiveRoom:()=>el,RoomModal:()=>en});var a=t(73365);t(91799);var n=t(1521),r=t(67676),i=t(18939),l=t(86844);let o=[{patterns:[/\b90.day plan\b/i,/remediation sprint/i,/remediation plan/i],appId:"compliance-sprint",appName:"Compliance Sprint",route:"/apps/compliance-sprint",reason:"Build your 90-day remediation sprint"},{patterns:[/what cert.*next/i,/next cert/i,/certification path/i,/after cmmc/i,/after cisa/i,/roadmap.*cert/i],appId:"certification-roadmap",appName:"Certification Roadmap",route:"/apps/certification-roadmap",reason:"Map your certification sequence"},{patterns:[/audit next month/i,/upcoming audit/i,/evidence package/i,/gather evidence/i,/audit window/i],appId:"evidence-package",appName:"Evidence Package Builder",route:"/apps/evidence-package",reason:"Build your audit evidence package"},{patterns:[/\bboard\b/i,/executive brief/i,/\bleadership\b/i,/board presentation/i,/explain.*board/i],appId:"board-brief",appName:"Board-Ready Brief",route:"/apps/board-brief",reason:"Generate a board-ready compliance brief"},{patterns:[/\bsprs\b/i,/\bpoa.?m\b/i,/plan of action/i],appId:"gap-scanner",appName:"Cross-Framework Gap Scanner",route:"/apps/gap-scanner",reason:"Scan your full gap picture before building a remediation plan"},{patterns:[/\baudit\b/i,/\bassessment\b.*\bcoming\b/i,/\bdays?\b.*\baudit\b/i,/\bupcoming review\b/i],appId:"gap-scanner",appName:"Cross-Framework Gap Scanner",route:"/apps/gap-scanner",reason:"Map your gaps before your audit window"},{patterns:[/both.*cmmc.*ai.?gov/i,/multiple framework/i,/crosswalk/i,/map.*controls/i,/what do i already have/i],appId:"compliance-passport",appName:"Compliance Passport",route:"/apps/compliance-passport",reason:"See what transfers across your frameworks"},{patterns:[/learning plan/i,/study plan/i,/curriculum/i,/what.*should.*study/i,/sequence.*learning/i],appId:"curriculum-builder",appName:"Training Curriculum Builder",route:"/apps/curriculum-builder",reason:"Build a sequenced learning plan for your gaps"},{patterns:[/risk.*register/i,/unified risk/i,/my exposure/i,/risk.*dashboard/i],appId:"risk-dashboard",appName:"Unified Risk Dashboard",route:"/apps/risk-dashboard",reason:"See your full risk posture across frameworks"}];var c=t(99568),d=t.n(c);function m({appName:e,route:s,reason:t}){let[r,i]=(0,n.useState)(!1);return r?null:(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 12px",margin:"4px 0",borderRadius:8,border:"1px solid var(--accent)",background:"rgba(99, 102, 241, 0.06)",fontSize:12},children:[(0,a.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,a.jsxs)("span",{style:{color:"var(--ink-dim)"},children:[t," → "]}),(0,a.jsx)(d(),{href:s,style:{color:"var(--accent)",fontWeight:600,textDecoration:"none"},children:e})]}),(0,a.jsx)("button",{onClick:()=>i(!0),style:{background:"none",border:"none",cursor:"pointer",color:"var(--ink-faint)",fontSize:14,lineHeight:1,padding:"0 2px",flexShrink:0},"aria-label":"Dismiss",children:"\xd7"})]})}var x=t(29717);async function p(e){if(!e.passed)return{ok:!1};try{let s=await fetch("/api/mastery",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return await s.json()}catch{return{ok:!1}}}function h({actions:e}){return e.length?(0,a.jsx)("div",{className:"flex flex-wrap gap-2 mt-3",children:e.map(e=>(0,a.jsx)("button",{onClick:()=>{"external.url"===e.intent&&e.payload?.url&&window.open(e.payload.url,"_blank","noopener,noreferrer")},className:`text-xs px-3 py-1.5 rounded font-medium transition-colors ${"primary"===e.style?"bg-indigo-600 text-white hover:bg-indigo-700":"bg-stone-100 text-stone-700 hover:bg-stone-200 border border-stone-200"}`,children:e.label},e.id))}):null}function u({card:e,session:s}){let{npc_response:t,message_count:n,messages_remaining:r,next_action_hint:i}=e.data;return(0,a.jsxs)("div",{className:"rounded-sm border border-stone-200 bg-white p-4 my-2 text-sm",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-stone-500 uppercase tracking-wide",children:"NPC Response"}),s&&(0,a.jsxs)("span",{className:"text-[10px] font-mono text-stone-400",children:[n,"/",n+r," turns"]})]}),(0,a.jsx)("p",{className:"text-stone-800 leading-relaxed whitespace-pre-wrap",children:t}),i&&(0,a.jsx)("p",{className:"mt-2 text-xs text-stone-400 italic",children:i}),(0,a.jsx)(h,{actions:e.actions})]})}function b({card:e}){let{accuracy:s,determination:t,face_gaps:n,feedback:r}=e.data;return(0,a.jsxs)("div",{className:`rounded-sm border p-4 my-2 text-sm ${s?"border-green-200 bg-green-50":"border-red-200 bg-red-50"}`,children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,a.jsxs)("span",{className:"text-xs font-semibold uppercase tracking-wide",style:{color:s?"var(--ok)":"var(--danger)"},children:[s?"Correct":"Incorrect"," — ",t]})}),(0,a.jsx)("p",{className:"text-stone-700 leading-relaxed",children:r}),n.length>0&&(0,a.jsxs)("div",{className:"mt-2",children:[(0,a.jsx)("p",{className:"text-xs text-stone-500 mb-1",children:"Knowledge gaps:"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:n.map(e=>(0,a.jsx)("span",{className:"text-[10px] font-mono bg-stone-100 text-stone-600 px-1.5 py-0.5 rounded",children:e},e))})]}),(0,a.jsx)(h,{actions:e.actions})]})}function j({card:e}){let{id:s,label:t,family:n,nistNumber:r,assessmentObjectives:i,prerequisites:l}=e.data;return(0,a.jsxs)("div",{className:"rounded-sm border border-stone-200 bg-white p-4 my-2 text-sm",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between mb-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-xs font-mono text-indigo-600",children:s}),(0,a.jsx)("p",{className:"font-medium text-stone-800 mt-0.5",children:t})]}),(0,a.jsx)("span",{className:"text-[10px] text-stone-400 bg-stone-100 px-2 py-0.5 rounded font-medium shrink-0 ml-2",children:n})]}),(0,a.jsxs)("p",{className:"text-xs text-stone-400 mb-3",children:["NIST SP 800-171 ",r]}),i.length>0&&(0,a.jsxs)("div",{className:"mb-3",children:[(0,a.jsxs)("p",{className:"text-xs font-medium text-stone-500 mb-1",children:["Assessment objectives (",i.length,")"]}),(0,a.jsx)("ul",{className:"space-y-1",children:i.map(e=>(0,a.jsxs)("li",{className:"text-xs text-stone-600",children:[(0,a.jsx)("span",{className:"font-mono text-stone-400 mr-1",children:e.id}),e.label]},e.id))})]}),l.length>0&&(0,a.jsxs)("p",{className:"text-xs text-stone-400 mb-2",children:["Prerequisites:"," ",l.map(e=>(0,a.jsx)("code",{className:"font-mono mx-0.5",children:e},e))]}),(0,a.jsx)(h,{actions:e.actions})]})}function g({card:e}){let{context:s,count:t,practices:n}=e.data;return(0,a.jsxs)("div",{className:"rounded-sm border border-stone-200 bg-white p-4 my-2 text-sm",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-stone-500 uppercase tracking-wide",children:s}),(0,a.jsxs)("span",{className:"text-xs text-stone-400",children:[t," practices"]})]}),(0,a.jsx)("ul",{className:"space-y-2",children:n.map(e=>(0,a.jsxs)("li",{className:"flex items-start gap-2",children:[(0,a.jsx)("code",{className:"text-[10px] font-mono text-indigo-600 bg-indigo-50 px-1 py-0.5 rounded shrink-0 mt-0.5",children:e.id}),(0,a.jsx)("span",{className:"text-xs text-stone-700",children:e.label})]},e.id))}),(0,a.jsx)(h,{actions:e.actions})]})}function f(e){return e>=90?"var(--ok)":e>=50?"var(--warn)":"var(--danger)"}function N({card:e}){let{families:s,summary:t}=e.data,n=t.totalPractices>0?Math.round(t.met/t.totalPractices*100):0;return(0,a.jsxs)("div",{className:"rounded-sm border border-stone-200 bg-white p-4 my-2 text-sm",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-stone-500 uppercase tracking-wide",children:"Gap Analysis"}),(0,a.jsxs)("span",{className:"text-xs font-medium text-indigo-600",children:[n,"% met"]})]}),(0,a.jsx)("div",{className:"space-y-2",children:s.map(e=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between text-xs mb-0.5",children:[(0,a.jsx)("span",{className:"text-stone-600",children:e.familyLabel}),(0,a.jsxs)("span",{className:"text-stone-400 font-mono",children:[e.met,"/",e.total]})]}),(0,a.jsx)("div",{className:"h-1.5 bg-stone-100 rounded-full overflow-hidden",children:(0,a.jsx)("div",{className:"h-full bg-indigo-500 rounded-full",style:{width:`${e.total>0?e.met/e.total*100:0}%`}})})]},e.familyId))}),(0,a.jsxs)("div",{className:"flex gap-3 mt-3 text-xs text-stone-400",children:[(0,a.jsxs)("span",{children:[t.not_met," not met"]}),(0,a.jsxs)("span",{children:[t.not_applicable," N/A"]}),(0,a.jsxs)("span",{children:[t.not_assessed," unassessed"]})]}),(0,a.jsx)(h,{actions:e.actions})]})}function y({card:e}){let{sprsScore:s,maxScore:t,totalDeductions:n,deductions:r}=e.data,i=f(s);return(0,a.jsxs)("div",{className:"rounded-sm border border-stone-200 bg-white p-4 my-2 text-sm",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-stone-500 uppercase tracking-wide",children:"SPRS Score"}),(0,a.jsx)("span",{className:"text-2xl font-bold font-mono",style:{color:i},children:s})]}),(0,a.jsxs)("p",{className:"text-xs text-stone-400 mb-3",children:["of ",t," max — ",n," points deducted"]}),r.slice(0,5).map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between text-xs py-1 border-t border-stone-100",children:[(0,a.jsx)("code",{className:"font-mono text-stone-500",children:e.practice_id}),(0,a.jsxs)("span",{className:"text-red-500 font-medium",children:["-",e.deduction]})]},e.practice_id)),r.length>5&&(0,a.jsxs)("p",{className:"text-xs text-stone-400 mt-1",children:["+",r.length-5," more deductions"]}),(0,a.jsx)(h,{actions:e.actions})]})}function v({card:e}){let{title:s,timeline_weeks:t,total_gaps:n,milestones:r,summary:i}=e.data;return(0,a.jsxs)("div",{className:"rounded-sm border border-stone-200 bg-white p-4 my-2 text-sm",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-stone-500 uppercase tracking-wide",children:"POA&M"}),(0,a.jsxs)("span",{className:"text-xs text-stone-400",children:[t," weeks \xb7 ",n," gaps"]})]}),(0,a.jsx)("p",{className:"font-medium text-stone-800 mb-2",children:s}),(0,a.jsx)("p",{className:"text-xs text-stone-600 leading-relaxed mb-3",children:i}),(0,a.jsx)("div",{className:"space-y-1",children:r.map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between text-xs py-1 border-t border-stone-100",children:[(0,a.jsx)("span",{className:"font-medium text-stone-700",children:e.name}),(0,a.jsxs)("span",{className:"text-stone-400",children:["Week ",e.target_week]})]},e.id))}),(0,a.jsx)(h,{actions:e.actions})]})}function w({card:e}){let{practiceLabel:s,practiceId:t,artifacts:n}=e.data;return(0,a.jsxs)("div",{className:"rounded-sm border border-stone-200 bg-white p-4 my-2 text-sm",children:[(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("span",{className:"text-xs font-mono text-indigo-600",children:t}),(0,a.jsx)("p",{className:"font-medium text-stone-800 mt-0.5",children:s})]}),(0,a.jsx)("p",{className:"text-xs font-semibold text-stone-500 uppercase tracking-wide mb-2",children:"Required evidence"}),(0,a.jsx)("div",{className:"space-y-3",children:n.map(e=>(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs font-medium text-stone-700 capitalize",children:e.type.replace(/_/g," ")}),(0,a.jsx)("p",{className:"text-xs text-stone-500 mt-0.5",children:e.description}),(0,a.jsx)("ul",{className:"mt-1 space-y-0.5",children:e.examples.slice(0,2).map(e=>(0,a.jsx)("li",{className:"text-[10px] text-stone-400 pl-2 before:content-['\xb7'] before:mr-1",children:e},e))})]},e.type))}),(0,a.jsx)(h,{actions:e.actions})]})}function k({card:e}){let{sprsScore:s,familyCompletion:t,priorityGapCount:n,recommendation:r}=e.data,i=f(s);return(0,a.jsxs)("div",{className:"rounded-sm border border-stone-200 bg-white p-4 my-2 text-sm",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-stone-500 uppercase tracking-wide",children:"Readiness Report"}),(0,a.jsxs)("span",{className:"text-xl font-bold font-mono",style:{color:i},children:["SPRS ",s]})]}),(0,a.jsx)("p",{className:"text-xs text-stone-600 leading-relaxed mb-3",children:r}),(0,a.jsx)("div",{className:"space-y-1.5",children:t.slice(0,5).map(e=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between text-[10px] text-stone-400 mb-0.5",children:[(0,a.jsx)("span",{children:e.familyLabel}),(0,a.jsxs)("span",{children:[e.percentComplete,"%"]})]}),(0,a.jsx)("div",{className:"h-1 bg-stone-100 rounded-full overflow-hidden",children:(0,a.jsx)("div",{className:"h-full bg-indigo-400 rounded-full",style:{width:`${e.percentComplete}%`}})})]},e.familyId))}),n>0&&(0,a.jsxs)("p",{className:"text-xs text-amber-600 mt-3",children:[n," priority gaps require remediation"]}),(0,a.jsx)(h,{actions:e.actions})]})}function S({card:e}){let{practiceId:s,practiceLabel:t,family:n,what_it_requires:r,why_it_matters:i,common_pitfalls:l,quick_win_evidence_tips:o}=e.data;return(0,a.jsxs)("div",{className:"rounded-sm border border-stone-200 bg-white p-4 my-2 text-sm",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between mb-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-xs font-mono text-indigo-600",children:s}),(0,a.jsx)("p",{className:"font-medium text-stone-800 mt-0.5",children:t})]}),(0,a.jsx)("span",{className:"text-[10px] text-stone-400 bg-stone-100 px-2 py-0.5 rounded shrink-0 ml-2",children:n})]}
1),[["What it requires",r],["Why it matters",i],["Common pitfalls",l],["Quick wins",o]].map(([e,s])=>(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsx)("p",{className:"text-xs font-semibold text-stone-500 uppercase tracking-wide mb-1",children:e}),(0,a.jsx)("p",{className:"text-xs text-stone-600 leading-relaxed",children:s})]},e)),(0,a.jsx)(h,{actions:e.actions})]})}function I({card:e}){let{recommended:s,mastered_count:t,total:n,remaining:r}=e.data;return(0,a.jsxs)("div",{className:"rounded-sm border border-indigo-100 bg-indigo-50 p-4 my-2 text-sm",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-indigo-700 uppercase tracking-wide",children:"Next practice"}),(0,a.jsxs)("span",{className:"text-xs text-indigo-500",children:[t,"/",n," mastered"]})]}),s?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"font-medium text-stone-800",children:s.practiceLabel}),(0,a.jsx)("code",{className:"text-xs font-mono text-indigo-600",children:s.practiceId}),(0,a.jsx)("p",{className:"text-xs text-stone-600 mt-2 leading-relaxed",children:s.rationale})]}):(0,a.jsxs)("p",{className:"text-stone-600",children:["All ",n," practices mastered — CMMC Level 2 complete!"]}),r>0&&(0,a.jsxs)("p",{className:"text-xs text-stone-400 mt-2",children:[r," practices remaining"]}),(0,a.jsx)(h,{actions:e.actions})]})}function C({card:e}){let{tool_label:s,current_tier:t,recommended_tier:n,rationale:r,required_tiers:i}=e.data,l=i.find(e=>e.id===n);return(0,a.jsxs)("div",{className:"rounded-sm border border-amber-200 bg-amber-50 p-4 my-2 text-sm",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-amber-700 uppercase tracking-wide",children:"Upgrade required"}),(0,a.jsxs)("span",{className:"text-[10px] text-amber-600 bg-amber-100 px-2 py-0.5 rounded font-medium",children:[t," → ",n]})]}),(0,a.jsx)("p",{className:"font-medium text-stone-800 mb-1",children:s}),(0,a.jsx)("p",{className:"text-stone-600 text-xs leading-relaxed mb-3",children:r}),l&&!l.contact&&void 0!==l.price_monthly&&(0,a.jsxs)("p",{className:"text-xs text-amber-700 font-medium mb-2",children:["$",l.price_monthly,"/month"]}),(0,a.jsx)(h,{actions:e.actions})]})}function T({card:e}){let{tool_label:s,errors:t}=e.data;return(0,a.jsxs)("div",{className:"rounded-sm border border-red-200 bg-red-50 p-4 my-2 text-sm",children:[(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-red-700 uppercase tracking-wide",children:"Invalid input"}),(0,a.jsx)("span",{className:"ml-2 text-xs text-red-500",children:s})]}),(0,a.jsx)("ul",{className:"space-y-2",children:t.map((e,s)=>(0,a.jsxs)("li",{className:"text-xs",children:[(0,a.jsx)("code",{className:"font-mono text-red-700 bg-red-100 px-1 rounded",children:e.field_path}),(0,a.jsx)("span",{className:"ml-2 text-stone-600",children:e.rationale}),e.allowed_values&&(0,a.jsxs)("div",{className:"mt-0.5 text-stone-400",children:["Allowed: ",e.allowed_values.join(", ")]})]},s))}),(0,a.jsx)(h,{actions:e.actions})]})}function _({card:e}){let{tool_label:s,rationale:t,session_preserved:n}=e.data;return(0,a.jsxs)("div",{className:"rounded-sm border border-stone-200 bg-stone-50 p-4 my-2 text-sm",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-stone-500 uppercase tracking-wide",children:"Service error"}),n&&(0,a.jsx)("span",{className:"text-[10px] text-green-600 bg-green-50 px-2 py-0.5 rounded",children:"Session preserved"})]}),(0,a.jsx)("p",{className:"font-medium text-stone-700 mb-1",children:s}),(0,a.jsx)("p",{className:"text-stone-500 text-xs leading-relaxed",children:t}),(0,a.jsx)(h,{actions:e.actions})]})}function P({card:e}){let{label:s,price_monthly:t,audience:n,tools:r,locked_tools:i}=e.data;return(0,a.jsxs)("div",{className:"rounded-sm border border-stone-200 bg-white p-4 my-2 text-sm",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsxs)("span",{className:"font-semibold text-stone-800",children:[s," tier"]}),(0,a.jsx)("span",{className:"text-sm font-bold text-indigo-600",children:0===t?"Free":`$${t}/mo`})]}),(0,a.jsx)("p",{className:"text-xs text-stone-500 mb-3",children:n}),(0,a.jsxs)("p",{className:"text-xs font-medium text-stone-600 mb-1",children:[r.length," tools included"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1 mb-3",children:r.map(e=>(0,a.jsx)("span",{className:"text-[10px] bg-indigo-50 text-indigo-600 border border-indigo-100 px-1.5 py-0.5 rounded font-mono",children:e.id},e.id))}),i.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("p",{className:"text-xs font-medium text-stone-400 mb-1",children:[i.length," locked tools"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:i.map(e=>(0,a.jsx)("span",{className:"text-[10px] bg-stone-50 text-stone-400 border border-stone-200 px-1.5 py-0.5 rounded font-mono line-through",children:e.id},e.id))})]}),(0,a.jsx)(h,{actions:e.actions})]})}function R({card:e}){let{tiers:s,matrix:t,pricing:n}=e.data,r=Object.keys(t).slice(0,10);return(0,a.jsxs)("div",{className:"rounded-sm border border-stone-200 bg-white p-4 my-2 text-sm overflow-x-auto",children:[(0,a.jsx)("p",{className:"text-xs font-semibold text-stone-500 uppercase tracking-wide mb-3",children:"Tier comparison"}),(0,a.jsxs)("table",{className:"text-[10px] w-full",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"text-left text-stone-400 font-medium pb-1 pr-2",children:"Tool"}),s.map(e=>(0,a.jsx)("th",{className:"text-center text-stone-500 font-medium pb-1 px-1 capitalize",children:e.replace(/_/g," ")},e))]})}),(0,a.jsx)("tbody",{children:r.map(e=>(0,a.jsxs)("tr",{className:"border-t border-stone-100",children:[(0,a.jsx)("td",{className:"font-mono text-stone-500 py-1 pr-2",children:e}),s.map(s=>(0,a.jsx)("td",{className:"text-center py-1 px-1",children:t[e]?.[s]?(0,a.jsx)("span",{className:"text-green-500",children:"✓"}):(0,a.jsx)("span",{className:"text-stone-200",children:"—"})},s))]},e))})]}),Object.keys(t).length>10&&(0,a.jsxs)("p",{className:"text-[10px] text-stone-400 mt-2",children:["+",Object.keys(t).length-10," more tools"]}),(0,a.jsx)("div",{className:"flex gap-4 mt-3",children:s.map(e=>{let s=n[e];return s?(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("p",{className:"font-medium text-stone-600 capitalize text-[10px]",children:e.replace(/_/g," ")}),(0,a.jsx)("p",{className:"text-stone-800 font-bold",children:s.contact?"Contact":0===s.monthly?"Free":`$${s.monthly}`})]},e):null})}),(0,a.jsx)(h,{actions:e.actions})]})}function A({card:e}){let{evidence_type:s,availability:t,content:n,relevance:r}=e.data;return(0,a.jsxs)("div",{className:`rounded-sm border p-4 my-2 text-sm ${{strong:"border-green-200 bg-green-50",partial:"border-amber-200 bg-amber-50",absent:"border-stone-200 bg-stone-50",contradictory:"border-red-200 bg-red-50"}[t]??"border-stone-200 bg-stone-50"}`,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-stone-600 uppercase tracking-wide",children:s.replace(/_/g," ")}),(0,a.jsxs)("span",{className:"text-[10px] capitalize text-stone-500",children:[t," \xb7 ",r.replace(/_/g," ")
1]})]}),(0,a.jsx)("p",{className:"text-xs text-stone-700 leading-relaxed",children:n}),(0,a.jsx)(h,{actions:e.actions})]})}function $({card:e}){let{name:s,certification:t,focus:n,reasoning_pattern:r,evidence_markers:i,priority_emphasis:l}=e.data;return(0,a.jsxs)("div",{className:"rounded-sm border border-stone-200 bg-white p-4 my-2 text-sm",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between mb-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-stone-800",children:s}),(0,a.jsx)("span",{className:"text-xs text-stone-500",children:t})]}),l.length>0&&(0,a.jsx)("div",{className:"flex gap-1 shrink-0 ml-2",children:l.map(e=>(0,a.jsx)("span",{className:"text-[10px] font-mono bg-indigo-50 text-indigo-600 px-1.5 py-0.5 rounded",children:e},e))})]}),[["Focus",n],["Reasoning pattern",r]].map(([e,s])=>(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsx)("p",{className:"text-xs font-semibold text-stone-500 uppercase tracking-wide mb-1",children:e}),(0,a.jsx)("p",{className:"text-xs text-stone-600 leading-relaxed",children:s})]},e)),i.length>0&&(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsx)("p",{className:"text-xs font-semibold text-stone-500 uppercase tracking-wide mb-1",children:"Evidence markers"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:i.map(e=>(0,a.jsx)("span",{className:"text-[10px] bg-stone-100 text-stone-600 px-2 py-0.5 rounded",children:e},e))})]}),(0,a.jsx)(h,{actions:e.actions})]})}function q({card:e}){let{domain:s,levels:t}=e.data;return(0,a.jsxs)("div",{className:"rounded-sm border border-stone-200 bg-white p-4 my-2 text-sm",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-stone-500 uppercase tracking-wide",children:"Governance priority stack"}),(0,a.jsx)("span",{className:"text-xs text-stone-400",children:s})]}),(0,a.jsx)("div",{className:"flex flex-col gap-2",children:t.map((e,s)=>(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsxs)("span",{className:"text-xs font-mono text-indigo-600 w-6 shrink-0 pt-0.5",children:["P",s+1]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs font-medium text-stone-800",children:e.name}),(0,a.jsx)("p",{className:"text-xs text-stone-500 leading-relaxed",children:e.description})]})]},e.id))}),(0,a.jsx)(h,{actions:e.actions})]})}function M({card:e}){let{id:s,name:t,description:n,nist_citations:r,governs_over:i}=e.data;return(0,a.jsxs)("div",{className:"rounded-sm border border-stone-200 bg-white p-4 my-2 text-sm",children:[(0,a.jsx)("div",{className:"flex items-start justify-between mb-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-xs font-mono text-indigo-600",children:s}),(0,a.jsx)("p",{className:"font-medium text-stone-800 mt-0.5",children:t})]})}),(0,a.jsx)("p",{className:"text-xs text-stone-600 leading-relaxed mt-1",children:n}),r.length>0&&(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsx)("p",{className:"text-xs font-semibold text-stone-500 uppercase tracking-wide mb-1",children:"NIST citations"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:r.map(e=>(0,a.jsx)("span",{className:"text-[10px] font-mono bg-stone-100 text-stone-600 px-2 py-0.5 rounded",children:e},e))})]}),i.length>0&&(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsx)("p",{className:"text-xs font-semibold text-stone-500 uppercase tracking-wide mb-1",children:"Governs over"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:i.map(e=>(0,a.jsx)("span",{className:"text-[10px] bg-indigo-50 text-indigo-700 px-2 py-0.5 rounded",children:e},e))})]}),(0,a.jsx)(h,{actions:e.actions})]})}function L({card:e}){let{scenario_title:s,briefing:t,role:n,difficulty:r,estimated_duration_minutes:i}=e.data;return(0,a.jsxs)("div",{className:"rounded-sm border border-stone-200 bg-white p-4 my-2 text-sm",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 mb-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-stone-500 uppercase tracking-wide",children:"Scenario"}),(0,a.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[n&&(0,a.jsxs)(O,{children:["You are the ",n]}),r&&(0,a.jsx)(O,{children:r}),i?(0,a.jsxs)(O,{children:["~",i," min"]}):null]})]}),s&&(0,a.jsx)("h3",{className:"text-base font-semibold text-stone-900 mb
1-2 leading-snug",children:s}),(0,a.jsx)("p",{className:"text-stone-800 leading-relaxed whitespace-pre-wrap",children:t}),(0,a.jsx)(h,{actions:e.actions})]})}function D({card:e}){let{scenario_title:s,certification:t,phase:n,turns_completed:r,max_turns:i}=e.data;return(0,a.jsxs)("div",{className:"rounded-sm border border-stone-200 bg-stone-50 px-4 py-3 my-2 text-sm",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,a.jsx)("span",{className:"font-semibold text-stone-800",children:s}),(0,a.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[t&&(0,a.jsx)(O,{children:t.toUpperCase()}),n&&(0,a.jsx)(O,{children:n}),(0,a.jsxs)(O,{children:["Turn ",r," of ",i]})]})]}),(0,a.jsx)(h,{actions:e.actions})]})}function O({children:e}){return(0,a.jsx)("span",{className:"text-[10px] font-mono bg-stone-100 text-stone-600 px-1.5 py-0.5 rounded whitespace-nowrap",children:e})}function F({card:e}){return(0,a.jsxs)("div",{className:"rounded-sm border border-stone-200 bg-stone-50 p-4 my-2 text-sm",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-stone-500 uppercase tracking-wide",children:e.title}),(0,a.jsx)("span",{className:"text-[10px] font-mono text-stone-300",children:e.type})]}),(0,a.jsx)("pre",{className:"text-[10px] text-stone-400 overflow-x-auto whitespace-pre-wrap",children:"data"in e?JSON.stringify(e.data,null,2):""}),(0,a.jsx)(h,{actions:e.actions})]})}function E({view:e}){return e.components?.length?(0,a.jsx)("div",{className:"flex flex-col gap-2",children:e.components.map(s=>(0,a.jsx)(B,{component:s,session:e.session},s.id))}):null}function B({component:e,session:s}){switch(e.type){case"card.scenario":return(0,a.jsx)(L,{card:e});case"card.session_summary":return(0,a.jsx)(D,{card:e});case"card.cmmc_interview":return(0,a.jsx)(u,{card:e,session:s});case"card.cmmc_score":return(0,a.jsx)(b,{card:e});case"card.cmmc_practice":return(0,a.jsx)(j,{card:e});case"card.cmmc_practice_list":return(0,a.jsx)(g,{card:e});case"card.cmmc_gap_analysis":return(0,a.jsx)(N,{card:e});case"card.cmmc_sprs":return(0,a.jsx)(y,{card:e});case"card.cmmc_poam":return(0,a.jsx)(v,{card:e});case"card.cmmc_evidence_guide":return(0,a.jsx)(w,{card:e});case"card.cmmc_readiness":return(0,a.jsx)(k,{card:e});case"card.cmmc_explain":return(0,a.jsx)(S,{card:e});case"card.cmmc_recommend":return(0,a.jsx)(I,{card:e});case"card.cmmc_paywall":return(0,a.jsx)(C,{card:e});case"card.cmmc_validation_error":return(0,a.jsx)(T,{card:e});case"card.cmmc_runtime_error":return(0,a.jsx)(_,{card:e});case"card.cmmc_tier_capabilities":return(0,a.jsx)(P,{card:e});case"card.cmmc_tier_matrix":return(0,a.jsx)(R,{card:e});case"card.isaca_lens":return(0,a.jsx)($,{card:e});case"card.isaca_priority_stack":return(0,a.jsx)(q,{card:e});case"card.isaca_priority_level":return(0,a.jsx)(M,{card:e});case"card.evidence":return(0,a.jsx)(A,{card:e});default:return(0,a.jsx)(F,{card:e})}}let U=[{id:"briefing",index:1,label:"Briefing",shortLabel:"Brief",hint:"Instructor opens. You hear what's on the table."},{id:"inquiry",index:2,label:"Inquiry",shortLabel:"Inquiry",hint:"Your turn. Ask what you want to explore."},{id:"challenge",index:3,label:"Challenge",shortLabel:"Challenge",hint:"The Skeptic pushes back with a real failure mode."},{id:"judgment",index:4,label:"Judgment",shortLabel:"Judge",hint:"You weigh the challenge against the inquiry."},{id:"reconstruction",index:5,label:"Reconstruction",shortLabel:"Re-form",hint:"Rebuild your read with the new constraint absorbed."},{id:"transition",index:6,label:"Transition",shortLabel:"Next",hint:"Coach names the next step in your formation."}];function z({currentStage:e,accentVar:s="--room-accent"}){let t=e?U.findIndex(s=>s.id===e):-1;return(0,a.jsxs)("div",{className:"stage-strip",role:"list","aria-label":"Session stage progression",children:[(0,a.jsxs)("div",{className:"stage-strip-head",children:[(0,a.jsx)("span",{className:"smallcaps",children:"Arc \xb7 6 stages"}),e&&(0,a.jsxs)("span",{className:"stage-now",children:["now \xb7 ",(0,a.jsx)("b",{children:U[t]?.label??e})]})]}),(0,a.jsx)("ol",{className:"stage-strip-list",style:{"--room-stripe":`var(${s})`},children:U.map((e,s)=>(0,a.jsxs)("li",{role:"listitem",className:`stage-step ${-1===t?"neutral":s<t?"passed":s===t?"current":"future"}`,title:`${e.label} — ${e.hint}`,children:[(0,a.jsx)("span",{className:"stage-dot","aria-hidden":"true"}),(0,a.jsx)("span",{className:"stage-label",children:e.shortLabel})]},e.id))})]})}let V={Coach:{role:"Looks at where you are and suggests your next move."},Assessor:{role:"Frames scenarios and scores your reasoning."},Instructor:{role:"Opens, names what's on the table, follows your thread."}
1,Skeptic:{role:"Senior CISO, 15y. Pushes back with real failure modes.",aiPersona:!0},Mirror:{role:"Reflects your reasoning back so you can see your own move.",aiPersona:!0},Tutor:{role:"Walks you through worked examples and analogies."},Registrar:{role:"Updates your Passport with credentials and evidence."},"Peer A":{role:"An eager classmate who asks beginner-friendly questions.",aiPersona:!0},"Peer B":{role:"A thoughtful classmate who tests connections.",aiPersona:!0}},W=["var(--accent)","var(--lumin)","var(--face-where-accent)","var(--face-when-accent)"];function G({room:e}){return(0,a.jsxs)("div",{className:"roster-pane",children:[(0,a.jsxs)("div",{className:"roster-head",children:[(0,a.jsx)("span",{className:"smallcaps",children:"stage"===e.kind?"Speakers":"Personas on call"}),(0,a.jsx)("span",{className:"roster-count tnum",children:e.personas.length})]}),(0,a.jsxs)("ul",{className:"roster-list",children:[e.personas.map((e,s)=>{let t,n=V[e]??{role:"Session participant."};return(0,a.jsxs)("li",{className:"roster-row",children:[(0,a.jsx)("span",{className:"roster-avatar",style:{background:W[s%W.length]},"aria-hidden":"true",children:(t=e.split(/\s+/)).length>=2?t[0][0]+t[1][0]:e[0]??"?"}),(0,a.jsxs)("div",{className:"roster-text",children:[(0,a.jsxs)("div",{className:"roster-name",children:[e,n.aiPersona&&(0,a.jsx)("span",{className:"roster-ai",title:"AI persona — modeled on real-world roles",children:"AI persona"})]}),(0,a.jsx)("div",{className:"roster-role",children:n.role})]})]},e)}),(0,a.jsxs)("li",{className:"roster-row learner",children:[(0,a.jsx)("span",{className:"roster-avatar you","aria-hidden":"true",children:"you"}),(0,a.jsxs)("div",{className:"roster-text",children:[(0,a.jsx)("div",{className:"roster-name",children:"You"}),(0,a.jsx)("div",{className:"roster-role",children:"stage"===e.kind?"Observe, interject, decide. Your turn signals are explicit.":"Ask anything. The Coach pulls the right tool when needed."})]})]})]})]})}var J=t(64658);function Y({prompts:e,agentId:s,accentVar:t="--room-accent"}){let{agent:i}=(0,r.tt)({agentId:s}),{copilotkit:l}
1=(0,J.kr)(),[o,c]=(0,n.useState)(!1),[d,m]=(0,n.useState)(!1),x=i?.messages?.length??0,p=(0,n.useMemo)(()=>x>0,[x]),h=(0,n.useCallback)(async e=>{if(!o&&i){c(!0),m(!0);try{i.addMessage({id:crypto.randomUUID(),role:"user",content:e}),await l.runAgent({agent:i})}catch(e){m(!1),console.error("[QuickPrompts] runAgent failed:",e)}finally{c(!1)}}},[i,l,o]);return p||d||0===e.length?null:(0,a.jsxs)("div",{className:"quick-prompts",style:{"--room-stripe":`var(${t})`},role:"group","aria-label":"Starter prompts",children:[(0,a.jsx)("span",{className:"smallcaps",children:"Try"}),(0,a.jsx)("div",{className:"quick-prompts-row",children:e.map(e=>(0,a.jsx)("button",{type:"button",disabled:o,onClick:()=>h(e),className:"quick-prompt",children:e},e))})]})}function H({agentId:e,openingTurn:s}){let{agent:t}=(0,r.tt)({agentId:e}),{copilotkit:i}=(0,J.kr)(),l=(0,n.useRef)(null),o=(0,n.useRef)(!1);return((0,n.useEffect)(()=>{let e;if(o.current||!s?.trim())return;let a=null,n=()=>{o.current||(a=setTimeout(()=>{if(o.current)return;let e=t?.messages?.length??0;t&&0===e&&s?.trim()&&(o.current=!0,l.current?.click())},1500))};return"connected"===i.runtimeConnectionStatus?n():e=i.subscribe({onRuntimeConnectionStatusChanged:({status:e})=>{"connected"===e&&n()}}),()=>{a&&clearTimeout(a),e?.unsubscribe()}},[t,s,i]),s?.trim())?(0,a.jsx)("button",{ref:l,type:"button","aria-hidden":"true",tabIndex:-1,style:{display:"none"},onClick:()=>{t&&(t.addMessage({id:crypto.randomUUID(),role:"user",content:s.trim()}),i.runAgent({agent:t}))}}):null}var X=t(93079);function K({name:e,args:s,status:t}){let n="complete"===String(t).toLowerCase(),r=function(e){if(!e||"object"!=typeof e)return null;let s=Object.entries(e).slice(0,2);return 0===s.length?null:s.map(([e,s])=>{var t;return`${e}=${null==(t=s)?"—":"string"==typeof t?t.length>24?`"${t.slice(0,22)}…"`:`"${t}"`:"number"==typeof t||"boolean"==typeof t?String(t):Array.isArray(t)?`[${t.length}]`:"{…}"}`}).join(" \xb7 ")}(s);return(0,a.jsxs)("div",{className:`tool-trace${n?" complete":" in-flight"}`,role:"status",children:[(0,a.jsx)("span",{className:"trace-dot","aria-hidden":"true"}),(0,a.jsx)("span",{className:"trace-verb",children:n?"Called":"Calling"}),(0,a.jsx)("span",{className:"trace-name",children:e}),r&&(0,a.jsx)("span",{className:"trace-args",title:JSON.stringify(s),children:r})]})}var Q=t(84953),Z=t(14503),ee=t(53967);let es=new Set(["sessionPing","recordMastery"]),et="grid42.roomDrawer.expanded",ea="grid42.roomTraces.show";function en({trajectory:e,entitledDomains:s,scope:t,initialRoomType:i,onClose:o}){let[c,d]=(0,n.useState)(i?{roomType:i,cubeletId:t?.cubeletId}:null),m=(0,x.usePathname)(),[p,h]=(0,n.useState)(()=>{try{return"1"===localStorage.getItem(et)}catch{return!1}}),[u,b]=(0,n.useState)(()=>{try{return"1"===localStorage.getItem(ea)}catch{return!1}});if((0,n.useEffect)(()=>{function e(e){"Escape"===e.key&&o()}return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[o]),c){let s=l.pR[c.roomType],n=t?(0,Z.CC)(t):{scopeLevel:"global"},i="lecture"===c.roomType?`/api/rooms/lecture?${new URLSearchParams({cubeletId:t?.cubeletId??"",contentKey:t?.face??""}).toString()}`:`/api/copilotkit?${new URLSearchParams({roomType:c.roomType,trajectory:e,...n}).toString()}`;return"conversation"===s.kind?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"room-drawer-backdrop",onClick:o,"aria-hidden":"true"}),(0,a.jsxs)("div",{className:"room-drawer-panel","data-expanded":p?"true":"false",style:{background:`var(${s.bgToken})`},role:"dialog","aria-modal":!0,"aria-label":s.label,children:[(0,a.jsxs)("div",{className:"drawer-head",style:{background:`var(${s.bgToken})`},children:[(0,a.jsxs)("div",{className:"drawer-head-info",children:[(0,a.jsx)("span",{className:"sigil",style:{color:`var(${s.accentToken})`},children:s.sigil}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"tag",style:{color:`var(${s.accentToken})`},children:s.label}),(0,a.jsx)("div",{className:"desc",children:s.description}),t&&"global"!==t.level&&(0,a.jsxs)("div",{className:"scope-chip",title:`Scope: ${(0,Z.kV)(t)}`,children:[(0,a.jsx)("span",{className:"scope-label-small",children:"Scope"}),(0,a.jsx)("span",{className:"scope-label-text",children:(0,Z.kV)(t)})]})]})]}),(0,a.jsxs)("div",{className:"drawer-head-actions",children:[(0,a.jsx)("button",{onClick:()=>{b(e=>{let s=!e;try{localStorage.setItem(ea,s?"1":"0")}catch{}return s})},className:"drawer-toggle","aria-label":u?"Hide tool calls":"Show tool calls",title:u?"Hide tool calls":"Show tool calls","data-active":u?"true":"false",children:"⚙"}),(0,a.jsx)("button",{onClick:()=>{h(e=>{let s=!e;try{localStorage.setItem(et,s?"1":"0")}catch{}return s})},className:"drawer-toggle","aria-label":p?"Narrow drawer":"Widen drawer",title:p?"Narrow drawer":"Widen drawer",children:p?"→ |":"| ←"}),(0,a.jsx)("button",{onClick:o,className:"drawer-close","aria-label":"Close room",children:"\xd7"})]})]}),(0,a.jsx)("div",{className:"drawer-body",children:(0,a.jsx)(r.t,{runtimeUrl:i,agent:c.roomType,renderCustomMessages:X.Xf,children:(0,a.jsx)(el,{roomType:c.roomType,copilotAgentId:c.roomType,onBack:()=>d(null),onClose:o,scope:t,showTraces:u})})})]})]}):(0,a.jsx)("div",{className:"room",style:{zIndex:100},children:(0,a.jsx)(r.t,{runtimeUrl:i,agent:c.roomType,renderCustomMessages:X.Xf,children:(0,a.jsx)(el,{roomType:c.roomType,copilotAgentId:c.roomType,onBack:()=>d(null),onClose:o,scope:t,showTraces:u})})})}return(0,a.jsx)("div",{style:{position:"fixed",inset:0,zIndex:100,background:"rgba(26,24,20,0.55)",backdropFilter:"blur(4px)",display:"grid",placeItems:"center",padding:24},onClick:e=>{e.target===e.currentTarget&&o()},children:(0,a.jsx)("div",{style:{width:"min(520px,100%)",background:"var(--bg-elev)",border:"1px solid var(--rule)",borderRadius:18,overflow:"hidden",animation:"g42-reveal 280ms cubic-bezier(0.2,0.7,0.2,1)"},children:(0,a.jsx)(er,{pathname:m,entitledDomains:s,onEnter:d,onClose:o})})})}function er({pathname:e,entitledDomains:s,onEnter:t,onClose:n}){var r;let i,o=(i=[],(r={pathname:e}).pathname.startsWith("/catalog")&&i.push({roomType:"war_room",reason:"Run a determination drill"}),r.pathname.startsWith("/learn/")&&(i.push({roomType:"war_room",reason:"Test this practice in a simulation"}
1),void 0!==r.bktConfidence&&r.bktConfidence<.7&&i.push({roomType:"coaching",reason:"Get unstuck on this concept"}),i.push({roomType:"lecture",reason:"Watch a narrated walkthrough"})),r.pathname.startsWith("/pursue/")&&(i.push({roomType:"war_room",reason:"Practice a determination drill"}),i.push({roomType:"lecture",reason:"Attend the lecture for this practice"}),i.push({roomType:"debrief",reason:"Review your progress in this domain"})),r.pathname.startsWith("/pursuit/")&&(i.push({roomType:"war_room",reason:"Practice a determination drill"}),i.push({roomType:"debrief",reason:"Review your progress in this domain"})),"/scaffold"===r.pathname&&(i.push({roomType:"scaffold",reason:"Explore your role formation gaps"}),i.push({roomType:"debrief",reason:"Review your overall progress"})),i.find(e=>"coaching"===e.roomType)||i.push({roomType:"coaching",reason:"Get help with any concept"}),i.slice(0,3)),c=new Set(o.map(e=>e.roomType)),d=l.PI.filter(e=>"canvas"!==e.id&&(!e.domains||e.domains.some(e=>s.some(s=>s===e||s.startsWith(e+"-")))));return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"18px 24px",borderBottom:"1px solid var(--rule)"},children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"smallcaps",style:{color:"var(--lumin)",marginBottom:2},children:"Room"}),(0,a.jsx)("div",{style:{fontSize:13,color:"var(--ink-dim)"},children:"Choose a session type"})]}),(0,a.jsx)("button",{onClick:n,style:{width:32,height:32,borderRadius:"50%",border:"1px solid var(--rule)",background:"transparent",color:"var(--ink-faint)",fontSize:16,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"},children:"\xd7"})]}),(0,a.jsxs)("div",{style:{padding:"16px 24px 24px",display:"flex",flexDirection:"column",gap:16,maxHeight:"70vh",overflowY:"auto"},children:[o.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"smallcaps",style:{marginBottom:10},children:"Suggested"}),(0,a.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:o.map(e=>{let s=l.pR[e.roomType];return(0,a.jsxs)("button",{onClick:()=>t({roomType:e.roomType}),className:"btn room-pick suggested",children:[(0,a.jsxs)("div",{className:"row-top",children:[(0,a.jsx)("span",{className:"label",children:s.label}),"stage"===s.kind&&(0,a.jsxs)("span",{className:"kind-pill",children:[s.personas.length," voices"]})]}),(0,a.jsx)("div",{className:"reason",children:e.reason}),(0,a.jsx)("div",{className:"framing",children:s.framing})]},e.roomType)})})]}),(0,a.jsxs)("div",{children:[o.length>0&&(0,a.jsx)("div",{className:"smallcaps",style:{marginBottom:10},children:"All Rooms"}),(0,a.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:d.filter(e=>!c.has(e.id)).map(e=>(0,a.jsxs)("button",{onClick:()=>t({roomType:e.id}),className:"btn room-pick",children:[(0,a.jsxs)("div",{className:"row-top",children:[(0,a.jsx)("span",{className:"label",children:e.label}),"stage"===e.kind&&(0,a.jsxs)("span",{className:"kind-pill",children:[e.personas.length," voices"]})]}),(0,a.jsx)("div",{className:"reason",children:e.description}),(0,a.jsx)("div",{className:"framing",children:e.framing})]},e.id))})]})]})]})}function ei({agentId:e,cubeletId:s}){return(0,ee.lb)(e,s),null}function el({roomType:e,copilotAgentId:s,onBack:t,onClose:c,hideClose:d=!1,onMessageSent:x,onEngaged:h,scope:u,showTraces:b=!1}){var j;let g,f,N,y=l.pR[e],v=s??e,w="stage"===y.kind,[k,S]=(0,n.useState)(!w),{agent:I}=(0,r.tt)({agentId:v}),C=(0,n.useRef)(!1),T=I?.messages?.length??0;(0,n.useEffect)(()=>{h&&!C.current&&T>=6&&(C.current=!0,h())},[T,h]);let _=(g=(j=(I?.messages??[]).map(e=>({role:e.role??"user",speakerId:"assistant"===e.role?e.name??"instructor":"learner"}))).filter(e=>"user"===e.role).length,f=j.filter(e=>"assistant"===e.role).length,N=j.some(e=>"assistant"===e.role&&"skeptic"===e.speakerId),0===f||g<=0?"briefing":1===g?"inquiry":N&&2!==g?3===g?"judgment":4===g?"reconstruction":"transition":"challenge");(0,n.useEffect)(()=>{if(!w)return;let e=setTimeout(()=>S(!0),380);return()=>clearTimeout(e)},[w]),(0,r.X)("conversation"===y.kind?{available:"after-first-message",providerAgentId:v,consumerAgentId:v,instructions:"Propose 2 short follow-up actions the learner is most likely to want next, based on the last exchange. Each chip is read OUT OF CONTEXT — the learner sees it without re-reading the prior message — so name the concrete thing being acted on, not a pronoun or in-scene shorthand. Good: 'Pull the SSP as evidence', 'Compare AC.L2-3.1.1 with AT.L2-2.1.1', 'Show the practice list'. Bad: 'Flag the Register's age first' (which Register?), 'Push back on that claim' (which claim?). Each suggestion 4 to 9 words, in the learner's voice, written as something they'd type. Stay in scope. Do not echo what the learner just asked.",maxSuggestions:2}:null,[y.kind,v]),(0,r.it)({name:"*",render:({name:e,args:s,status:t,result:n})=>{let r="complete"===t?function(e){if(!e)return null;try{let s=JSON.parse(e);if("object"==typeof s&&null!==s&&Array.isArray(s.content)){let e=s.content.find(e=>"object"==typeof e&&null!==e&&"text"===e.type&&"string"==typeof e.text);e&&(s=JSON.parse(e.text))}let t=s;if(!t.components||!Array.isArray(t.components))return null;return t}catch{return null}}(n):null,i=b&&!es.has(e);return(0,a.jsxs)(a.Fragment,{children:[i&&(0,a.jsx)(K,{name:e,args:s,status:t}),r&&(0,a.jsx)(E,{view:r})]})}},[b]),(0,i.aF)({name:"recordMastery",description:"Record that a cubelet has been mastered after a passing simulation. Call this immediately when simulation_score returns a pass.",parameters:[{name:"cubeletId",type:"string",description:"Cubelet ID used in the simulation",required:!0},{name:"competencyId",type:"string",description:"Canonical competency ID",required:!0},{name:"sessionId",type:"string",description:"Session ID from simulation_start",required:!0},{name:"domain",type:"string",description:"Domain: cmmc or isaca",required:!0},{name:"score",type:"number",description:"1 for CMMC pass; composite 0-3 for ISACA",required:!0},{name:"passed",type:"boolean",description:"True if simulation was passed",required:!0}],handler:async e=>{let s=await p(e);return s.gated?s.message??"Mastery records require Practitioner. Upgrade at cubelet.ai/pricing for 5 simulations/month with mastery records.":s.ok?"Mastery recorded.":"Mastery recording skipped (not passed)."}},[]),(0,i.aF)({name:"sessionPing",description:"Called silently after every agent response to track session activity. No visible effect on the learner.",parameters:[],handler:()=>{x?.()}},[x]),(0,i.aF)({name:"launchNotebook",description:"Launch an interactive Python notebook sandbox so the learner can test a concept from this cubelet. Call this when the learner asks to try code, run an example, or experiment with a concept hands-on. Opens the notebook in a new browser tab.",parameters:[{name:"cubeletId",type:"string",description:"The cubelet ID to associate the notebook session with. Use the cubelet currently in scope for this coaching session.",required:!0}],handler:async({cubeletId:s})=>{if("voice_seminar"===e||"voice_coaching"===e)return"Just ask me verbally to launch a notebook and I'll open it for you right here.";try{let e=await fetch("/api/notebook/session",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cubeletId:s})});if(!e.ok){let s=await e.json().catch(()=>({}));if(403===e.status&&s.gated)return"Notebook sandbox requires the Consulting Partner plan. Visit cubelet.ai/pricing to upgrade.";return"Failed to launch notebook. Please try again."}let{sessionId:t}=await e.json();return window.open(`/notebook/${t}`,"_blank"),"Notebook launched in a new tab. You can run Python cells there to test the concept. Shift+Enter runs a cell."}catch{return"Failed to launch notebook. Please try again."}}},[]);let P="voice_seminar"===e||"voice_coaching"===e;return(0,a.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%"},children:[!P&&(0,a.jsx)(ei,{agentId:v,cubeletId:u?.cubeletId}),(0,a.jsxs)("div",{className:"room-header",children:[(0,a.jsxs)("div",{className:"title-cluster",children:[(0,a.jsx)("div",{className:"room-tag",children:y.id.replace("_"," ").toUpperCase()}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"room-title",children:y.label}),(0,a.jsx)("div",{className:"room-sub",children:y.description}),u&&"global"!==u.level&&(0,a.jsxs)("div",{className:"scope-chip room-scope",title:`Scope: ${(0,Z.kV)(u)}`,children:[(0,a.jsx)("span",{className:"scope-label-small",children:"Scope"}),(0,a.jsx)("span",{className:"scope-label-text",children:(0,Z.kV)(u)})]})]})]}),(0,a.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,a.jsx)("button",{onClick:t,className:"close",style:{fontSize:11,width:"auto",padding:"0 12px",borderRadius:999},children:"← Rooms"}),!d&&(0,a.jsx)("button",{onClick:c,className:"close",children:"\xd7"})]})]}),("voice_seminar"===e||"voice_coaching"===e)&&(0,a.jsx)("div",{style:{flex:1,overflow:"auto"},children:(0,a.jsx)(Q.t,{cubeletId:u?.cubeletId??"",roomType:e,onSessionEnd:c})}),"voice_seminar"!==e&&"voice_coaching"!==e&&!k&&(0,a.jsxs)("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",background:"var(--bg-room)"},children:[(0,a.jsxs)("div",{className:"coach-orb",children:[(0,a.jsx)("div",{className:"ring"}),(0,a.jsx)("div",{className:"core"})]}),(0,a.jsxs)("div",{style:{fontFamily:"'General Sans', sans-serif",fontSize:13,color:"var(--ink-room-faint)",marginTop:8},children:[y.label,"…"]})]}),"voice_seminar"!==e&&"voice_coaching"!==e&&k&&(0,a.jsxs)("div",{className:"room-body",style:{animation:"msg-fade-in 600ms cubic-bezier(0.2,0.7,0.2,1) both"},children:[(0,a.jsxs)("div",{className:"coach-pane",children:[(0,a.jsx)(Y,{prompts:y.quickPrompts,agentId:v,accentVar:y.accentToken}),(0,a.jsx)(H,{agentId:v,openingTurn:u?.seedContext}),(()=>{let e=[...I?.messages??[]].reverse().find(e=>"assistant"===e.role);if(!e)return null;let s=e.content,t=function(e){let s=new Set,t=[];for(let a of o)!s.has(a.appId)&&a.patterns.some(s=>s.test(e))&&(s.add(a.appId),t.push({appId:a.appId,appName:a.appName,route:a.route,reason:a.reason}));return t.slice(0,1)}("string"==typeof s?s:Array.isArray(s)?s.map(e=>e.text??"").join(" "):"");return 0===t.length?null:t.map(e=>(0,a.jsx)(m,{appName:e.appName,route:e.route,reason:e.reason},e.appId))})(),(0,a.jsx)("div",{className:"chat-frame",children:(0,a.jsx)(r.D,{className:"h-full",agentId:v,labels:{modalHeaderTitle:y.label}})})]}),(0,a.jsxs)("div",{className:"plan-pane",children:[(0,a.jsxs)("div",{className:"pane-head",children:[(0,a.jsxs)("div",{className:"smallcaps",children:[y.label," \xb7 active"]}),(0,a.jsx)("h3",{children:"stage"===y.kind?`${y.label} in progress`:"Session in progress"}),(0,a.jsx)("div",{className:"occ",children:y.framing})]}),(0,a.jsxs)("div",{className:"draft",children:["stage"===y.kind&&(0,a.jsx)(z,{currentStage:_,accentVar:y.accentToken}),(0,a.jsx)(G,{room:y}),(0,a.jsxs)("div",{className:"draft-card exit-card",children:[(0,a.jsx)("span",{className:"axis-tag",children:"Done when"}),(0,a.jsx)("div",{className:"title",children:y.exitCondition})]})]})]})]})]})}}}]);

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.