PageSourceSearch

https://app.colaj.ai/_nuxt/Dc84_RQX.js

js colaj.ai collected 2026-10-05 12:26:08 UTC 59,881 bytes, 1 lines download raw bytes

1import{j as z,C as b,f as fe,N as U,c as r,o as s,R as Ye,z as E,a as e,t as f,S as be,d as D,_ as O,m,k as Ct,v as _,b as L,x as wt,A as bt,y as t,F as $t,T as xt,U as Te,O as ae,H as B,I as N,Q as J,q as I,P as Pe,w as W,V as hn,W as gn,X as Xe,Y as St,M as Q,Z as kn,$ as Mt,a0 as qt,a1 as Fe,a2 as yn,l as _n,J as wn,a3 as bn,a4 as $n,e as Cn,p as xn}from"./CGV4ffa1.js";import{_ as je,a as Sn}from"./CBNqyO99.js";import{u as Mn,_ as It}from"./Dwo6gwO4.js";import{_ as Bt}from"./1lV4WTQK.js";import{c as qn,v as In,_ as Bn,a as Pn,b as Tn}from"./DYCb1ytl.js";import{_ as jn}from"./D81gbQV5.js";import{u as Dn,a as An,b as En,c as Ln,d as Rn}from"./BDx528ve.js";import{u as On}from"./DvpF8isP.js";import{u as Qn,a as zn}from"./Cy3Q7lpX.js";import{s as Vn}from"./8NsT7qR7.js";import"./DEjg0PAf.js";const Un=["aria-label"],Gn={class:"title"},Hn={class:"body"},Nn={class:"actions"},Wn=z({__name:"Confirm",props:{label:{},title:{},body:{default:""},cancelLabel:{},confirmLabel:{},tone:{default:"destructive"}},emits:["cancel","confirm"],setup(p){const i=b(null),u=b(null);function l(){return Array.from(i.value?.querySelectorAll("button")??[])}function v(n){const d=l();if(!d.length)return;const o=d[0],h=d[d.length-1];n.shiftKey&&document.activeElement===o?(n.preventDefault(),h.focus()):!n.shiftKey&&document.activeElement===h&&(n.preventDefault(),o.focus())}return fe(()=>U(()=>u.value?.focus())),(n,d)=>(s(),r("div",{ref_key:"el",ref:i,class:E(["confirm",p.tone]),role:"dialog","aria-modal":"true","aria-label":p.label,onKeydown:Ye(v,["tab"])},[e("div",Gn,f(p.title),1),e("p",Hn,[be(n.$slots,"body",{},()=>[D(f(p.body),1)],!0)]),e("div",Nn,[e("button",{ref_key:"cancelBtn",ref:u,type:"button",class:"cancel",onClick:d[0]||(d[0]=o=>n.$emit("cancel"))},f(p.cancelLabel),513),e("button",{type:"button",class:"commit",onClick:d[1]||(d[1]=o=>n.$emit("confirm"))},f(p.confirmLabel),1)])],42,Un))}}),Fn=Object.assign(O(Wn,[["__scopeId","data-v-026b7a38"]]),{__name:"ConsoleConfirm"}),Kn={class:"signin"},Yn={class:"brand"},Jn={class:"field"},Xn={class:"field"},Zn={key:0,class:"error",role:"alert"},es=["disabled"],ts=["href"],ns=z({__name:"SignIn",setup(p){const i=b(""),u=b(""),l=b(!1),v=b(""),n=m(()=>`${window.location.origin}/forgot-password`),{fetch:d}=Ct();async function o(){if(!(l.value||!i.value||!u.value)){v.value="",l.value=!0;try{await $fetch("/api/auth/login",{method:"POST",body:{email:i.value.trim(),password:u.value}}),await d()}catch{v.value="Invalid email or password."}finally{l.value=!1}}}return(h,w)=>{const $=je;return s(),r("div",Kn,[e("span",Yn,[L($,{size:24}),w[2]||(w[2]=e("span",{class:"title"},"Sign in to Colaj",-1))]),e("label",Jn,[w[3]||(w[3]=e("span",{class:"field-label"},"Email",-1)),wt(e("input",{"onUpdate:modelValue":w[0]||(w[0]=M=>$t(i)?i.value=M:null),type:"email",autocomplete:"username",spellcheck:"false",onKeydown:Ye(o,["enter"])},null,544),[[bt,t(i)]])]),e("label",Xn,[w[4]||(w[4]=e("span",{class:"field-label"},"Password",-1)),wt(e("input",{"onUpdate:modelValue":w[1]||(w[1]=M=>$t(u)?u.value=M:null),type:"password",autocomplete:"current-password",onKeydown:Ye(o,["enter"])},null,544),[[bt,t(u)]])]),t(v)?(s(),r("p",Zn,f(t(v)),1)):_("",!0),e("button",{type:"button",class:"submit",disabled:t(l)||!t(i)||!t(u),onClick:o},f(t(l)?"Signing in…":"Sign in"),9,es),e("a",{class:"forgot",href:t(n),target:"_blank",rel:"noreferrer"},"Forgot my password",8,ts)])}}}),ss=Object.assign(O(ns,[["__scopeId","data-v-d4fd2395"]]),{__name:"ConsoleSignIn"}),os={class:"mic-test-block"},is={class:"mic-card"},ls={class:"bars","aria-hidden":"true"},as={class:"copy"},rs={class:"name"},us=["aria-expanded"],ds={key:0,class:"options",role:"radiogroup","aria-label":"Microphone"},cs=["aria-checked","onClick"],ps={class:"check"},vs={key:0,width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.4","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},ms={class:"option-label"},fs={class:"meters","aria-hidden":"true"},hs={class:"mrow"},gs={class:"meter"},ks={class:"mrow"},ys={class:"meter"},_s={class:"mrow"},ws={class:"meter"},bs=z({__name:"MicTest",props:{deviceId:{},deviceLabel:{},devices:{}},emits:["select-mic"],setup(p,{emit:i}){const u=i,l=xt(),v=Te(),n=[3.2,4.6,2.6],d=b(!1),o=M=>`${Math.min(100,Math.round(M*300))}%`;function h(M){return{transform:`scaleY(${Math.min(1,.2+l.mixedLevel*M*3).toFixed(3)})`}}function w(M){d.value=!1,u("select-mic",M)}let $=!1;return fe(async()=>{l.source||($=!0,await l.requestMixedPermission())}),ae(()=>{$&&!v.isActive&&l.stop()}),(M,y)=>(s(),r("div",os,[e("div",is,[e("span",ls,[(s(),r(B,null,N(n,(S,Y)=>e("span",{key:Y,class:"bar",style:J(h(S))},null,4)),64))]),e("div",as,[y[1]||(y[1]=e("div",{class:"title"}," Say a few words ",-1)),e("div",rs,f(p.deviceLabel),1)]),p.devices.length>
11?(s(),r("button",{key:0,type:"button",class:"change","aria-expanded":t(d),onClick:y[0]||(y[0]=S=>d.value=!t(d))},[y[3]||(y[3]=D(" Change ",-1)),(s(),r("svg",{class:E(["chev",{open:t(d)}]),width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.4","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[...y[2]||(y[2]=[e("polyline",{points:"6 9 12 15 18 9"},null,-1)])],2))],8,us)):_("",!0)]),t(d)?(s(),r("div",ds,[(s(!0),r(B,null,N(p.devices,S=>(s(),r("button",{key:S.deviceId,type:"button",role:"radio",class:"option","aria-checked":S.deviceId===p.deviceId,onClick:Y=>w(S.deviceId)},[e("span",ps,[S.deviceId===p.deviceId?(s(),r("svg",vs,[...y[4]||(y[4]=[e("polyline",{points:"20 6 9 17 4 12"},null,-1)])])):_("",!0)]),e("span",ms,f(S.label),1)],8,cs))),128))])):_("",!0),e("div",fs,[e("div",hs,[y[5]||(y[5]=e("span",{class:"mlabel"},"System",-1)),e("span",gs,[e("span",{class:"fill sys",style:J({width:o(t(l).systemLevel)})},null,4)])]),e("div",ks,[y[6]||(y[6]=e("span",{class:"mlabel"},"Mic",-1)),e("span",ys,[e("span",{class:"fill mic",style:J({width:o(t(l).micLevel)})},null,4)])]),e("div",_s,[y[7]||(y[7]=e("span",{class:"mlabel"},"Mixed",-1)),e("span",ws,[e("span",{class:"fill mix",style:J({width:o(t(l).mixedLevel)})},null,4)])])])]))}}),$s=Object.assign(O(bs,[["__scopeId","data-v-29a5f8e8"]]),{__name:"ConsoleMicTest"}),Cs={class:"ready"},xs=["disabled"],Ss={class:"account-row"},Ms={class:"mark","aria-hidden":"true"},qs={class:"email"},Is=["aria-expanded"],Bs=["href"],Ps=z({__name:"ReadyPanel",props:{email:{},starting:{type:Boolean},deviceId:{},deviceLabel:{},devices:{}},emits:["start-session","log-out","select-mic"],setup(p){const i=b(!1),u=b(null);function l(){const n=document.activeElement;n instanceof HTMLElement&&n!==document.body&&!n.classList.contains("logout")&&!n.closest(".title-strip")||u.value?.focus()}fe(()=>{U(l),window.addEventListener("focus",l)}),ae(()=>window.removeEventListener("focus",l));const v=m(()=>`${window.location.origin}/`);return(n,d)=>{const o=je,h=$s;return s(),r("div",Cs,[e("button",{ref_key:"startBtn",ref:u,type:"button",class:"start",autofocus:"",disabled:p.starting,onClick:d[0]||(d[0]=w=>n.$emit("start-session"))},[d[4]||(d[4]=e("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor",stroke:"none","aria-hidden":"true"},[e("path",{d:"M8 5v14l11-7z"})],-1)),D(" "+f(p.starting?"Starting…":"Start session"),1)],8,xs),e("div",Ss,[e("span",Ms,[L(o,{size:24})]),e("span",qs,f(p.email),1),e("button",{type:"button",class:"logout",onClick:d[1]||(d[1]=w=>n.$emit("log-out"))},[...d[5]||(d[5]=[e("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[e("path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}),e("polyline",{points:"16 17 21 12 16 7"}),e("line",{x1:"21",y1:"12",x2:"9",y2:"12"})],-1),D(" Log out ",-1)])])]),e("button",{type:"button",class:"mic-test","aria-expanded":t(i),onClick:d[2]||(d[2]=w=>i.value=!t(i))},[...d[6]||(d[6]=[e("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[e("path",{d:"M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"}),e("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),e("line",{x1:"12",y1:"19",x2:"12",y2:"23"})],-1),D(" Test microphone ",-1)])],8,Is),t(i)?(s(),I(h,{key:0,"device-id":p.deviceId,"device-label":p.deviceLabel,devices:p.devices,onSelectMic:d[3]||(d[3]=w=>n.$emit("select-mic",w))},null,8,["device-id","device-label","devices"])):_("",!0),e("a",{class:"dash-link",href:t(v),target:"_blank",rel:"noreferrer"},[...d[7]||(d[7]=[D(" Instructor dashboard ",-1),e("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[e("line",{x1:"7",y1:"17",x2:"17",y2:"7"}),e("polyline",{points:"7 7 17 7 17 17"})],-1)])],8,Bs)])}}}),Ts=Object.assign(O(Ps,[["__scopeId","data-v-ee6ff456"]]),{__name:"ConsoleReadyPanel"}),js=["aria-expanded","aria-label"],Ds={key:0,width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},As={key:1,class:"icon-stack","aria-hidden":"true"},Es={class:"bars","aria-hidden":"true"},Ls="Mute or choose a microphone.",Rs=z({__name:"MicPill",props:{muted:{type:Boolean},menuOpen:{type:Boolean},level:{}},emits:["toggle-menu"],setup(p){const i=p,u=[3.2,4.6,2.6],l=m(()=>i.muted?"Microphone muted — audio options: mute or choose a microphone":"Audio options — mute or choose a microphone");function v(n){return i.muted?{transform:"none"}:{transform:`scaleY(${Math.min(1,.22+i.level*n*3).toFixed(3)})`}}return(n,d)=>(s(),r("button",{type:"button",class:E(["mic-pill",{muted:p.muted,open:p.menuOpen}]),"aria-expanded":p.menuOpen,"aria-label":t(l),title:Ls,onClick:d[0]||(d[0]=o=>n.$emit("toggle-menu"))},[p.muted?(s(),r("svg",Ds,[...d[1]||(d[1]=[e("line",{x1:"1",y1:"1",x2:"23",y2:"23"},null,-1),e("path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"},null,-1),e("path",{d:"M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"},null,-1),e("line",{x1:"12",y1:"19",x2:"12",y2:"23"},null,-1)])])):(s(),r("span",As,[...d[2]||(d[2]=[Pe('<svg class="mic-on" width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-1bc67526><path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" data-v-1bc67526></path><path d="M19 10v2a7 7 0 0 1-14 0v-2" data-v-1bc67526></path><line x1="12" y1="19" x2="12" y2="23" data-v-1bc67526></line></svg><svg class="mic-off" width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-1bc67526><line x1="1" y1="1" x2="23" y2="23" data-v-1bc67526></line><path d="M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6" data-v-1bc67526></path><path d="M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23" data-v-1bc67526></path><line x1="12" y1="19" x2="12" y2="23" data-v-1bc67526></line></svg>',2)])])),e("span",Es,[(s(),r(B,null,N(u,(o,h)=>e("span",{key:h,class:"bar",style:J(v(o))},null,4)),64))])],10,js))}}),Os=Object.assign(O(Rs,[["__scopeId","data-v-1bc67526"]]),{__name:"ConsoleMicPill"}),Qs=["aria-label"],zs=z({__name:"MenuShell",props:{label:{}},setup(p){const i=b(null);function u(){return i.value?Array.from(i.value.querySelectorAll('[role^="menuitem"]:not([disabled])')):[]}function l(v){const n=u();if(!n.length)return;const d=n.indexOf(document.activeElement);let o=-1;v.key==="ArrowDown"?o=d<0?0:(d+1)%n.length:v.key==="ArrowUp"?o=d<0?n.length-1:(d-1+n.length)%n.length:v.key==="Home"?o=0:v.key==="End"&&(o=n.length-1),!(o<0)&&(v.preventDefault(),n[o]?.focus())}return fe(()=>U(()=>
1u()[0]?.focus())),(v,n)=>(s(),r("div",{ref_key:"el",ref:i,class:"menu",role:"menu","aria-label":p.label,onKeydown:l},[be(v.$slots,"default",{},void 0,!0)],40,Qs))}}),Pt=Object.assign(O(zs,[["__scopeId","data-v-0b911fbe"]]),{__name:"ConsoleMenuShell"}),Vs={class:"row-label"},Us=["aria-expanded"],Gs={key:0,class:"row-aside font-mono"},Hs=["aria-checked","onClick"],Ns={class:"row-icon check"},Ws={key:0,width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.4","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},Fs={class:"row-label option-label"},Ks={key:0,class:"no-devices"},Ys=z({__name:"MicMenu",props:{muted:{type:Boolean},deviceLabel:{default:"Default"},devices:{default:()=>[]},selectedId:{default:null}},emits:["toggle-mute","select-mic"],setup(p){const i=b(!1);return(u,l)=>{const v=Pt;return s(),I(v,{label:"Audio"},{default:W(()=>[e("button",{type:"button",role:"menuitem",class:"menu-row",onClick:l[0]||(l[0]=n=>u.$emit("toggle-mute"))},[l[2]||(l[2]=e("span",{class:"row-icon"},[e("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[e("line",{x1:"1",y1:"1",x2:"23",y2:"23"}),e("path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"}),e("path",{d:"M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"})])],-1)),e("span",Vs,f(p.muted?"Unmute microphone":"Mute microphone"),1)]),e("button",{type:"button",role:"menuitem",class:"menu-row","aria-expanded":t(i),onClick:l[1]||(l[1]=n=>i.value=!t(i))},[l[4]||(l[4]=e("span",{class:"row-icon"},[e("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[e("path",{d:"M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"}),e("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),e("line",{x1:"12",y1:"19",x2:"12",y2:"23"})])],-1)),l[5]||(l[5]=e("span",{class:"row-label"},"Select microphone",-1)),t(i)?_("",!0):(s(),r("span",Gs,f(p.deviceLabel),1)),(s(),r("svg",{class:E(["chev",{open:t(i)}]),width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.4","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[...l[3]||(l[3]=[e("polyline",{points:"6 9 12 15 18 9"},null,-1)])],2))],8,Us),t(i)?(s(),r(B,{key:0},[(s(!0),r(B,null,N(p.devices,n=>(s(),r("button",{key:n.deviceId,type:"button",role:"menuitemradio",class:"menu-row option","aria-checked":n.deviceId===p.selectedId,onClick:d=>u.$emit("select-mic",n.deviceId)},[e("span",Ns,[n.deviceId===p.selectedId?(s(),r("svg",Ws,[...l[6]||(l[6]=[e("polyline",{points:"20 6 9 17 4 12"},null,-1)])])):_("",!0)]),e("span",Fs,f(n.label),1)],8,Hs))),128)),p.devices.length?_("",!0):(s(),r("p",Ks," No microphones found. "))],64)):_("",!0)]),_:1})}}}),Js=Object.assign(O(Ys,[["__scopeId","data-v-ac4c1e02"]]),{__name:"ConsoleMicMenu"}),Xs=["aria-checked"],Zs={class:"row-label"},eo={class:"row-icon"},to={key:0,width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},no={key:1,width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},so={class:"row-label","aria-live":"polite"},oo=z({__name:"CodeMenu",props:{qrHidden:{type:Boolean},code:{}},emits:["toggle-qr"],setup(p){const i=p,u=b("idle");let l;async function v(){try{const n=window.colajWidget;n?.copyText?n.copyText(i.code):await navigator.clipboard.writeText(i.code),u.value="done"}catch{u.value="failed"}clearTimeout(l),l=setTimeout(()=>{u.value="idle"},2e3)}return ae(()=>clearTimeout(l)),(n,d)=>{const o=Pt;return s(),I(o,{label:"Join code"},{default:W(()=>[e("button",{type:"button",role:"menuitemcheckbox",class:"menu-row","aria-checked":!p.qrHidden,onClick:d[0]||(d[0]=h=>n.$emit("toggle-qr"))},[d[2]||(d[2]=e("span",{class:"row-icon"},[e("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[e("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1"}),e("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1"}),e("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1"}),e("line",{x1:"14",y1:"14",x2:"21",y2:"14"}),e("line",{x1:"14",y1:"18",x2:"18",y2:"18"})])],-1)),e("span",Zs,f(p.qrHidden?"QR hidden on beacon":"Show QR on beacon"),1),e("span",{class:E(["track",{off:p.qrHidden}])},[...d[1]||(d[1]=[e("span",{class:"knob"},null,-1)])],2)],8,Xs),e("button",{type:"button",role:"menuitem",class:"menu-row",onClick:v},[e("span",eo,[t(u)==="done"?(s(),r("svg",to,[...d[3]||(d[3]=[e("polyline",{points:"20 6 9 17 4 12"},null,-1)])])):(s(),r("svg",no,[...d[4]||(d[4]=[e("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2"},null,-1),e("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},null,-1)])]))]),e("span",so,f(t(u)==="done"?"Copied":t(u)==="failed"?"Couldn’t copy":"Copy code to clipboard"),1)])]),_:1})}}}),io=Object.assign(O(oo,[["__scopeId","data-v-c5fa4445"]]),{__name:"ConsoleCodeMenu"}),lo={class:"drawer"},ao={class:"head"},ro={class:"head-copy"},uo={class:"title font-mono"},co=["aria-live"],po={key:0,class:"gen-ellipsis","aria-hidden":"true"},vo=22,mo=240,fo=z({__name:"Drawer",props:{title:{},helper:{},dot:{},working:{type:Boolean,default:!1},listMax:{default:300},fit:{type:Boolean,default:!1}},emits:["close"],setup(p){const i=p,u=hn("listEl"),l=b(i.listMax),v=m(()=>i.fit?l.value:i.listMax);function n(){const o=u.value;if(!o)return;const h=window.screen?.availHeight||window.innerHeight,w=o.getBoundingClientRect().top;l.value=Math.max(mo,Math.floor(h-w-2*vo))}let d=null;return fe(()=>{U(n),window.addEventListener("resize",n);const o=u.value?.previousElementSibling;o&&(d=new ResizeObserver(()=>n()),d.observe(o))}),ae(()=>{window.removeEventListener("resize",n),d?.disconnect(),d=null}),(o,h)=>(s(),r("div",lo,[e("div",ao,[e("span",{class:"dot",style:J({background:p.dot}),"aria-hidden":"true"},null,4),e("span",ro,[e("span",uo,f(p.title),1),p.helper?(s(),r("span",{key:0,class:"helper","aria-live":p.working?"polite":void 0},[D(f(p.helper),1),p.working?(s(),r("span",po,[...h[1]||(h[1]=[e("i",null,".",-1),e("i",null,".",-1),e("i",null,".",-1)])])):_("",!0)],8,co)):_("",!0)]),e("button",{type:"button",class:"close","aria-label":"Close drawer",onClick:h[0]||(h[0]=w=>o.$emit("close"))},[...h[2]||(h[2]=[e("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[e("polyline",{points:"18 15 12 9 6 15"})],-1)])])]),e("div",{ref_key:"listEl",ref:u,class:"list",style:J({maxHeight:`${t(v)}px`})},[be(o.$slots,"default",{},void 0,!0)],4)]))}}),De=Object.assign(O(fo,[["__scopeId","data-v-6649c018"]]),{__name:"ConsoleDrawer"}),ho=5;function Ze(){const p=gn(),i=Xe(),u=m(()=>(i.aiQuestions||[]).filter(o=>(o.upvoteCount??0)>0).map(o=>({id:o.id,question:o.question,upvoteCount:o.upvoteCount??0,done:!!o.done,hot:(o.upvoteCount??0)>=ho})).sort((o,h)=>h.upvoteCount-o.upvoteCount)),l=m(()=>{const o=new Map;for(const h of i.aiQuestions||[])(h.upvoteCount??0)<=0||!h.keyTermId||o.set(h.keyTermId,(o.get(h.keyTermId)??0)+1);return p.allKeyTermsChronological.map(h=>({id:h.id,term:h.term,confusion:h.confusionCount??0,likes:h.likeCount??0,questions:o.get(h.id)??0,createdAt:new Date(h.createdAt).getTime()}))}),v=m(()=>u.value.filter(o=>!o.done)),n=m(()=>v.value.length),d=m(()=>({questions:v.value.reduce((o,h)=>
1o+h.upvoteCount,0),confused:l.value.reduce((o,h)=>o+h.confusion,0),likes:l.value.reduce((o,h)=>o+h.likes,0)}));return{topicRows:l,questionRows:u,openQuestions:n,totals:d}}const go=["aria-pressed","aria-label","onClick"],ko={class:"text"},yo={key:0,width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},_o={key:1},wo={key:0,class:"empty"},bo=z({__name:"QuestionsDrawer",emits:["close"],setup(p){const i=Xe(),{questionRows:u,openQuestions:l}=Ze();return Mn(()=>({visible:u.value.length,unclicked:l.value})),(v,n)=>{const d=De;return s(),I(d,{title:"Questions",helper:`${t(l)} open · tap to close`,dot:"var(--color-yellow)",onClose:n[0]||(n[0]=o=>v.$emit("close"))},{default:W(()=>[(s(!0),r(B,null,N(t(u),o=>(s(),r("button",{key:o.id,type:"button",class:E(["row",{answered:o.done}]),"aria-pressed":o.done,"aria-label":o.done?`Answered: ${o.question} — reopen`:`${o.upvoteCount} waiting: ${o.question} — mark answered`,onClick:h=>t(i).toggleAiQuestionDone(o.id)},[e("span",ko,f(o.question),1),e("span",{class:E(["pill font-mono",o.done?"green":o.hot?"red":"yellow"])},[o.done?(s(),r("svg",yo,[...n[1]||(n[1]=[e("polyline",{points:"20 6 9 17 4 12"},null,-1)])])):(s(),r("span",_o,f(o.upvoteCount),1))],2)],10,go))),128)),t(u).length?_("",!0):(s(),r("p",wo," No questions yet — students ask from their devices. "))]),_:1},8,["helper"])}}}),$o=Object.assign(O(bo,[["__scopeId","data-v-cadc1f4b"]]),{__name:"ConsoleQuestionsDrawer"}),Co={class:"name"},xo={class:"marks"},So={key:0,class:"mark purple font-mono"},Mo={class:"sr-only"},qo={key:1,class:"mark green font-mono"},Io={class:"sr-only"},Bo={key:0,class:"empty"},Po=z({__name:"TopicsDrawer",emits:["close"],setup(p){const{topicRows:i,totals:u}=Ze(),l=m(()=>i.value.map(v=>({...v,activity:v.confusion+v.likes})).filter(v=>v.activity>0).sort((v,n)=>n.activity-v.activity||v.createdAt-n.createdAt));return(v,n)=>{const d=De;return s(),I(d,{title:"Active topics",helper:`${t(u).confused} confused · ${t(u).likes} liked`,dot:"var(--fg-muted-soft)",onClose:n[0]||(n[0]=o=>v.$emit("close"))},{default:W(()=>[(s(!0),r(B,null,N(t(l),o=>(s(),r("div",{key:o.id,class:"row"},[e("span",Co,f(o.term),1),e("span",xo,[o.confusion?(s(),r("span",So,[n[1]||(n[1]=e("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.6","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[e("path",{d:"M 4 12 A 8 8 0 0 1 20 12 A 6 6 0 0 1 8 12 A 4 4 0 0 1 16 12 A 2 2 0 0 1 12 12"})],-1)),D(" "+f(o.confusion),1),e("span",Mo,f(o.confusion===1?"confusion flag":"confusion flags"),1)])):_("",!0),o.likes?(s(),r("span",qo,[n[2]||(n[2]=e("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"currentColor",stroke:"none","aria-hidden":"true"},[e("path",{d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l8.84 8.84 8.84-8.84a5.5 5.5 0 0 0 0-7.78z"})],-1)),D(" "+f(o.likes),1),e("span",Io,f(o.likes===1?"like":"likes"),1)])):_("",!0)])]))),128)),t(l).length?_("",!0):(s(),r("p",Bo," No reactions yet. "))]),_:1},8,["helper"])}}}),To=Object.assign(O(Po,[["__scopeId","data-v-3fc20b02"]]),{__name:"ConsoleTopicsDrawer"}),jo=z({__name:"DrawerAction",props:{variant:{default:"outline"}},setup(p){return(i,u)=>(s(),r("button",{type:"button",class:E(["drawer-action",p.variant])},[be(i.$slots,"default",{},void 0,!0)],2))}}),Tt=Object.assign(O(jo,[["__scopeId","data-v-b488ec1c"]]),{__name:"ConsoleDrawerAction"}),Do={},Ao={class:"reading","aria-hidden":"true"};function Eo(p,i){return s(),r("div",Ao,[...i[0]||(i[0]=[e("span",{class:"sk-bar sk-bar-breathe lead"},null,-1),e("span",{class:"sk-bar sk-bar-breathe row",style:{"animation-delay":"0.12s"}},null,-1),e("span",{class:"sk-bar sk-bar-breathe row",style:{"animation-delay":"0.24s"}},null,-1),e("span",{class:"sk-bar sk-bar-breathe row",style:{"animation-delay":"0.36s"}},null,-1)])])}const jt=Object.assign(O(Do,[["render",Eo],["__scopeId","data-v-c053c213"]]),{__name:"ConsoleReadingBars"}),Lo={class:"qcard"},Ro={class:"results-card"},Oo={class:"qtext"},Qo={class:"results-card"},zo={class:"qtext"},Vo={class:"verdict-row"},Uo={class:"seg-cap font-mono"},Go={class:"bands"},Ho={key:0,class:"takeaway"},No=z({__name:"PollDrawer",emits:["close","done"],setup(p){const i=St(),u=kn(),l=m(()=>i.instructorPhase),v=m(()=>i.resultsPollId),n=m(()=>l.value==="live"?"live":l.value==="reading"||l.value==="results"?"results":"composer"),d=m(()=>l.value==="generating");function o(q,A){i.sendPoll(q,A)}const h=b(null),w=m(()=>i.resultsPoll),$=m(()=>w.value?.question??""),M=m(()=>w.value?.result??null),y=m(()=>M.value?qn(M.value):[]),S=m(()=>M.value?In(M.value):null),Y=m(()=>{const q=M.value;return q?q.attendeeCount>0?`${q.responseCount} of ${q.attendeeCount} answered`:`${q.responseCount} answered`:""}),Z=m(()=>l.value==="live"?"Poll live":l.value==="reading"?"Poll closed":l.value==="results"?"Poll results":"Poll"),C=m(()=>l.value==="generating"||l.value==="reading"),P=m(()=>l.value==="generating"?"Reading the last 10 minutes":l.value==="live"?k.value:l.value==="reading"?"Reading what the room said":l.value==="results"?"Saved to the study guide":"Send one, or write your own"),k=m(()=>`${i.responses} of ${i.attendees} answered`);Q(n,q=>{q==="composer"&&l.value==="idle"&&i.requestSuggestions()},{immediate:!0});let g=null,R=null;function x(){g===null||!R||(u("poll.results.displayed",{poll_id:R,display_duration_ms:Date.now()-g,
1shown_to_students:!0}),g=null,R=null)}return Q([n,v],([q,A])=>{const F=q==="results"?A:null;F!==R&&(x(),F&&(g=Date.now(),R=F))},{immediate:!0}),ae(x),(q,A)=>{const F=It,T=Bt,ee=Tt,re=jt,Ae=Bn,he=Pn,$e=De;return s(),I($e,{title:t(Z),helper:t(P),working:t(C),dot:t(l)==="live"?"var(--color-red)":"var(--color-cream)",fit:"",onClose:A[2]||(A[2]=j=>q.$emit("close"))},{default:W(()=>[t(n)==="composer"?(s(),r(B,{key:0},[L(F,{dense:"",manual:"",glyph:"poll",placeholder:"Write your own poll question…",disabled:t(i).sendingPoll,sending:t(i).sendingPoll,onSend:o},null,8,["disabled","sending"]),t(d)?(s(),r(B,{key:0},N(2,j=>L(F,{key:`sk${j}`,dense:"",skeleton:"",glyph:"poll"})),64)):(s(!0),r(B,{key:1},N(t(i).suggestions,(j,te)=>(s(),I(F,{key:`${te}-${j.text}`,dense:"",glyph:"poll",question:j.text,source:j.source,disabled:t(i).sendingPoll,sending:t(i).sendingPoll,onSend:o},null,8,["question","source","disabled","sending"]))),128)),A[3]||(A[3]=e("p",{class:"how-to"}," Send one question. It lands on every device in the room, answers come back anonymous, and the read appears here when you close it. ",-1))],64)):t(n)==="live"?(s(),r(B,{key:1},[e("div",Lo,[e("p",null,f(t(i).activePoll?.question),1)]),L(T,{dense:"",label:"Answers coming in",count:t(i).responses,total:t(i).attendees,pct:Math.round(t(i).responseProgress*100)},null,8,["count","total","pct"]),L(ee,{onClick:A[0]||(A[0]=j=>t(i).endPoll())},{default:W(()=>[...A[4]||(A[4]=[e("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",stroke:"none","aria-hidden":"true"},[e("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})],-1),D(" Close poll and show results ",-1)])]),_:1})],64)):t(n)==="results"?(s(),r(B,{key:2},[t(M)?(s(),r(B,{key:1},[e("div",Qo,[e("p",zo,f(t($)),1),e("div",Vo,[t(S)?(s(),I(Ae,{key:0,size:"sm",color:t(S).color,label:t(S).label},null,8,["color","label"])):_("",!0),e("span",Uo,f(t(Y)),1)])]),e("div",Go,[(s(!0),r(B,null,N(t(y),j=>(s(),I(he,{key:j.key,dense:"",expandable:"",label:j.label,pct:j.pct,color:j.color,note:j.note,quotes:j.quotes,open:t(h)===j.key,onToggle:te=>h.value=t(h)===j.key?null:j.key},null,8,["label","pct","color","note","quotes","open","onToggle"]))),128))]),t(M).analysis?(s(),r("p",Ho,f(t(M).analysis),1)):_("",!0),L(ee,{variant:"primary",onClick:A[1]||(A[1]=j=>q.$emit("done"))},{default:W(()=>[...A[5]||(A[5]=[e("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[e("polyline",{points:"20 6 9 17 4 12"})],-1),D(" Done ",-1)])]),_:1})],64)):(s(),r(B,{key:0},[e("div",Ro,[e("p",Oo,f(t($)),1)]),L(re)],64))],64)):_("",!0)]),_:1},8,["title","helper","working","dot"])}}}),Wo=Object.assign(O(No,[["__scopeId","data-v-9e742b61"]]),{__name:"ConsolePollDrawer"}),Fo={class:"qcard"},Ko={key:0,class:"waiting","aria-live":"polite"},Yo=["aria-expanded"],Jo={class:"collapse-text"},Xo={key:1,class:"rows","aria-live":"polite"},Zo={class:"gn font-mono"},ei={class:"gsum"},ti={key:0,class:"gcheck",role:"img","aria-label":"Summary final"},ni={key:1,class:"rec-dot",role:"img","aria-label":"Still talking — summary updating"},si={class:"results-card"},oi={class:"qtext"},ii={class:"seg-cap font-mono"},li={class:"block"},ai={class:"read"},ri={class:"lead"},ui={key:0,class:"block"},di={class:"list"},ci={class:"every-head"},pi={class:"gn-lbl font-mono"},vi={class:"every-text"},mi=8,fi=z({__name:"GroupsDrawer",emits:["close","done"],setup(p){const i=Mt(),u=m(()=>i.instructorPhase),l=m(()=>u.value==="live"?"live":u.value==="reading"||u.value==="results"?"results":"composer"),v=m(()=>u.value==="generating"),n=m(()=>i.synthesis);function d(k,g){i.send(k,g)}Q(l,k=>{k==="composer"&&u.value==="idle"&&i.requestPrompts()},{immediate:!0});const o=m(()=>{const k=n.value?.groupCount??i.groups.length,g=n.value?.groups.filter(R=>R.summary).length??0;return k?`${g} of ${k} ${k===1?"group":"groups"} answered`:""}),h=m(()=>{const k=n.value?.read??(n.value?.groupCount?"Too little was recorded to synthesize.":"No group recorded."),g=k.match(/^(.+?[.!?:—])(\s*\S.*)?$/s);return!g||!g[2]?.trim()?{lead:"",rest:k}:{lead:g[1],rest:g[2]}});function w(k){const g=n.value?.themes.findIndex(R=>R.groupNs.includes(k))??-1;return g===-1?"var(--color-gray-300)":Tn({},"open",g)}const $=m(()=>{const k=i.groups.length;return k?Math.round(i.summaryCount/k*100):0}),M=m(()=>i.groups.length>mi),y=b(!1);function S(k){return k.status!=="recording"&&!!k.summary}function Y(k){return k.summary?k.summary:k.status==="paused"?"Paused":"Recording…"}const Z=m(()=>u.value==="live"?"Groups live":u.value==="reading"?"Groups closed":u.value==="results"?"Group results":"Groups"),C=m(()=>u.value==="generating"||u.value==="reading"),P=m(()=>{if(u.value==="generating")return"Reading the last 10 minutes";if(u.value==="live"){const k=i.groups.length;return k?`${i.summaryCount} of ${k} summarized`:"Waiting for a group"}return u.value==="reading"?"Reading what the groups said":u.value==="results"?"Saved to the study guide":"Send one, or write your own"});return(k,g)=>{const R=It,x=Bt,q=Tt,A=jt,F=De;
1return s(),I(F,{title:t(Z),helper:t(P),working:t(C),dot:t(u)==="live"?"var(--color-red)":"var(--color-cream)",fit:"",onClose:g[3]||(g[3]=T=>k.$emit("close"))},{default:W(()=>[t(l)==="composer"?(s(),r(B,{key:0},[L(R,{dense:"",manual:"",glyph:"groups",placeholder:"Write your own group prompt…","track-edits":!1,disabled:t(i).sending,sending:t(i).sending,onSend:d},null,8,["disabled","sending"]),t(v)?(s(),r(B,{key:0},N(2,T=>L(R,{key:`sk${T}`,dense:"",skeleton:"",glyph:"groups"})),64)):(s(!0),r(B,{key:1},N(t(i).prompts,(T,ee)=>(s(),I(R,{key:`${ee}-${T.text}`,dense:"",glyph:"groups",question:T.text,source:T.source,"track-edits":!1,disabled:t(i).sending,sending:t(i).sending,onSend:d},null,8,["question","source","disabled","sending"]))),128)),g[4]||(g[4]=e("p",{class:"how-to"}," Say how to group up out loud. One person per group hits record — everyone else keeps their screen. Summaries land here while they talk. ",-1))],64)):t(l)==="live"?(s(),r(B,{key:1},[e("div",Fo,[e("p",null,f(t(i).activity?.prompt),1)]),L(x,{dense:"",label:"Summaries landing",count:t(i).summaryCount,total:t(i).groups.length,pct:t($)},null,8,["count","total","pct"]),t(i).groups.length?(s(),r(B,{key:1},[t(M)?(s(),r("button",{key:0,type:"button",class:"count-row","aria-expanded":t(y),onClick:g[0]||(g[0]=T=>y.value=!t(y))},[e("span",Jo,f(t(i).recordingCount)+" recording · "+f(t(i).summaryCount)+" summarized",1),(s(),r("svg",{class:E(["caret",{open:t(y)}]),width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.4","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[...g[5]||(g[5]=[e("polyline",{points:"6 9 12 15 18 9"},null,-1)])],2))],8,Yo)):_("",!0),!t(M)||t(y)?(s(),r("div",Xo,[(s(!0),r(B,null,N(t(i).groups,T=>(s(),r("div",{key:T.id,class:"g-row"},[e("span",Zo,f(T.n),1),e("span",ei,f(Y(T)),1),S(T)?(s(),r("span",ti,[...g[6]||(g[6]=[e("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#000","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[e("polyline",{points:"20 6 9 17 4 12"})],-1)])])):T.status==="recording"?(s(),r("span",ni)):_("",!0)]))),128))])):_("",!0)],64)):(s(),r("p",Ko," Waiting for the first group to start recording. ")),L(q,{disabled:t(i).closing,onClick:g[1]||(g[1]=T=>t(i).close())},{default:W(()=>[g[7]||(g[7]=e("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",stroke:"none","aria-hidden":"true"},[e("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})],-1)),D(" "+f(t(i).closing?"Closing…":"Close and synthesize"),1)]),_:1},8,["disabled"])],64)):(s(),r(B,{key:2},[e("div",si,[e("p",oi,f(t(i).activity?.prompt),1),e("span",ii,f(t(o)),1)]),t(n)?(s(),r(B,{key:1},[e("div",li,[g[8]||(g[8]=e("div",{class:"mini-eyebrow font-mono"}," Summary ",-1)),e("p",ai,[e("span",ri,f(t(h).lead),1),D(f(t(h).rest),1)])]),t(n).groups.length?(s(),r("div",ui,[g[9]||(g[9]=e("div",{class:"mini-eyebrow font-mono"}," Every group ",-1)),e("div",di,[(s(!0),r(B,null,N(t(n).groups,T=>(s(),r("div",{key:T.n,class:"every"},[e("div",ci,[e("span",{class:"dot",style:J({background:w(T.n)})},null,4),e("span",pi,"Group "+f(T.n),1)]),e("p",vi,f(T.summary??"Nothing was recorded."),1)]))),128))])])):_("",!0),L(q,{variant:"primary",onClick:g[2]||(g[2]=T=>k.$emit("done"))},{default:W(()=>[...g[10]||(g[10]=[e("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[e("polyline",{points:"20 6 9 17 4 12"})],-1),D(" Done ",-1)])]),_:1})],64)):(s(),I(A,{key:0}))],64))]),_:1},8,["title","helper","working","dot"])}}}),hi=Object.assign(O(fi,[["__scopeId","data-v-7c481327"]]),{__name:"ConsoleGroupsDrawer"}),gi={class:"captions","aria-live":"off"},ki={class:"window"},yi={class:"text font-mono"},_i={key:0,class:"caption-cursor"},wi={key:1,class:"waiting"},bi=z({__name:"CaptionsBlock",setup(p){const i=qt(),u=m(()=>{const l=(i.finalTranscripts??[]).slice(-2).map(n=>n.transcript),v=i.inProgressTranscript?.transcript??"";
1return[...l,v].filter(Boolean).join(" ")});return(l,v)=>(s(),r("div",gi,[e("div",ki,[e("div",yi,[D(f(t(u)),1),t(u)?(s(),r("span",_i)):_("",!0),t(u)?_("",!0):(s(),r("span",wi,"Listening…"))])])]))}}),$i=Object.assign(O(bi,[["__scopeId","data-v-15b15db1"]]),{__name:"ConsoleCaptionsBlock"}),Ci={class:"ended"},xi={class:"head"},Si={class:"acct","aria-hidden":"true"},Mi={class:"duration font-mono"},qi={key:0,class:"recap font-mono"},Ii={key:1,class:"tiles"},Bi={class:"tile"},Pi={class:"num font-mono"},Ti={class:"tile"},ji={class:"num font-mono"},Di={class:"tile"},Ai={class:"num font-mono"},Ei={key:2,class:"top-q"},Li={class:"top-q-row"},Ri={class:"top-q-text"},Oi={class:"votes font-mono"},Qi=["href"],zi={class:"account-row"},Vi={class:"email"},Ui={class:"row"},Gi=["href"],Hi=z({__name:"EndedPanel",props:{snapshot:{},email:{},confirming:{type:Boolean}},emits:["home","log-out","resume"],setup(p){const i=p,u=m(()=>i.snapshot.sessionLabel||"this class"),l=m(()=>`${window.location.origin}/`);return(v,n)=>{const d=je,o=jn;return s(),r("div",Ci,[e("div",xi,[e("span",Si,[L(d,{size:22})]),n[3]||(n[3]=e("span",{class:"title"},"Class ended",-1)),n[4]||(n[4]=e("span",{class:"spacer"},null,-1)),e("span",Mi,f(p.snapshot.durationMin)+" min",1)]),be(v.$slots,"default",{},void 0,!0),p.confirming?_("",!0):(s(),r(B,{key:0},[p.snapshot.canResume?(s(),r("p",qi,f(p.snapshot.joined)+" joined · "+f(p.snapshot.questions)+" questions · "+f(p.snapshot.polls)+" polls ",1)):(s(),r("div",Ii,[e("div",Bi,[e("span",Pi,f(p.snapshot.joined),1),n[5]||(n[5]=e("span",{class:"lbl"},"joined",-1))]),e("div",Ti,[e("span",ji,f(p.snapshot.questions),1),n[6]||(n[6]=e("span",{class:"lbl"},"questions",-1))]),e("div",Di,[e("span",Ai,f(p.snapshot.polls),1),n[7]||(n[7]=e("span",{class:"lbl"},"polls",-1))])])),p.snapshot.topQuestion?(s(),r("div",Ei,[n[10]||(n[10]=e("span",{class:"eyebrow font-mono"},"Top question",-1)),e("div",Li,[e("span",Ri,f(p.snapshot.topQuestion.text),1),e("span",Oi,[n[8]||(n[8]=e("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.6","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[e("path",{d:"M12 19V5M5 12l7-7 7 7"})],-1)),D(" "+f(p.snapshot.topQuestion.upvotes)+" ",1),n[9]||(n[9]=e("span",{class:"sr-only"},"upvotes",-1))])])])):_("",!0),e("a",{class:"guide",href:p.snapshot.studyGuideUrl,target:"_blank",rel:"noreferrer"},[...n[11]||(n[11]=[e("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[e("path",{d:"M4 19.5A2.5 2.5 0 0 1 6.5 17H20"}),e("path",{d:"M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"})],-1),D(" Open study guide ",-1)])],8,Qi),p.snapshot.canResume?(s(),I(o,{key:3,"session-name":t(u),size:"panel","full-width":"",onResume:n[0]||(n[0]=h=>v.$emit("resume"))},null,8,["session-name"])):_("",!0),e("div",zi,[e("span",Vi,f(p.email),1),e("button",{type:"button",class:"logout",onClick:n[1]||(n[1]=h=>v.$emit("log-out"))},[...n[12]||(n[12]=[e("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[e("path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}),e("polyline",{points:"16 17 21 12 16 7"}),e("line",{x1:"21",y1:"12",x2:"9",y2:"12"})],-1),D(" Log out ",-1)])])]),e("div",Ui,[e("a",{class:"ghost",href:t(l),target:"_blank",rel:"noreferrer"},[...n[13]||(n[13]=[Pe('<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-e19b488d><rect x="3" y="3" width="7" height="9" rx="1" data-v-e19b488d></rect><rect x="14" y="3" width="7" height="5" rx="1" data-v-e19b488d></rect><rect x="14" y="12" width="7" height="9" rx="1" data-v-e19b488d></rect><rect x="3" y="16" width="7" height="5" rx="1" data-v-e19b488d></rect></svg> Dashboard ',2)])],8,Gi),e("button",{type:"button",class:"ghost",onClick:n[2]||(n[2]=h=>v.$emit("home"))},[...n[14]||(n[14]=[e("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[e("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),e("polyline",{points:"9 22 9 12 15 12 15 22"})],-1),D(" Home ",-1)])])])],64))])}}}),Ni=Object.assign(O(Hi,[["__scopeId","data-v-e19b488d"]]),{__name:"ConsoleEndedPanel"}),Ke={questions:3,confused:2,likes:5},Wi=1e3;function Fi(p,i){const u=Fe({questions:0,confused:0,likes:0}),l=Fe({questions:!1,confused:!1,likes:!1}),v=Fe({questions:0,confused:0,likes:0}),n={},d=b(null);function o(C){d.value=C,v[C]+=1,l[C]=!0,clearTimeout(n[C]),n[C]=setTimeout(()=>{l[C]=!1},Wi)}yn(()=>
1{Object.values(n).forEach(C=>clearTimeout(C))});const h=Te(),w=new Map,$=new Map,M=b(!1);function y(){w.clear();for(const C of p.value)w.set(C.id,{confusion:C.confusion,likes:C.likes});$.clear();for(const C of i.value)$.set(C.id,C.done?0:C.upvoteCount)}Q(()=>h.currentSession?.id??null,C=>{M.value=!1,C&&U(()=>{y(),M.value=!0})},{immediate:!0}),Q(p,C=>{if(M.value)for(const P of C){const k=w.get(P.id);k&&(P.confusion>k.confusion&&(u.confused+=P.confusion-k.confusion,o("confused")),P.likes>k.likes&&(u.likes+=P.likes-k.likes,o("likes"))),w.set(P.id,{confusion:P.confusion,likes:P.likes})}}),Q(i,C=>{if(M.value)for(const P of C){const k=P.done?0:P.upvoteCount,g=$.get(P.id);g===void 0?k>0&&(u.questions+=k,o("questions")):k>g&&(u.questions+=k-g,o("questions")),$.set(P.id,k)}});function S(C){u[C]=0}const Y=m(()=>({questions:u.questions>=Ke.questions,confused:u.confused>=Ke.confused,likes:u.likes>=Ke.likes}));function Z(C){return l[C]?v[C]%2?"pill-arrive-a":"pill-arrive-b":""}return{unseen:u,pilingUp:Y,markSeen:S,arriving:l,arrivalClass:Z,lastArrival:d}}const Je=2e4,Ki=2e3;function Yi(){const p=Xe(),i=Te(),u=b(null);let l=null,v=null;function n(){l&&clearTimeout(l),v&&clearTimeout(v),l=v=null}function d(){n(),u.value=null}return Q(()=>p.latestArrival,o=>{if(!o)return d();n(),u.value={id:o.id,text:o.text,startedAt:o.at,retreating:!1},l=setTimeout(()=>{u.value&&(u.value.retreating=!0)},Je-Ki),v=setTimeout(d,Je)}),Q(()=>{const o=u.value?.id;if(!o)return!1;const h=p.aiQuestions.find(w=>w.id===o);return!h||h.done},o=>{o&&d()}),Q(()=>i.isActive,o=>{o||d()}),ae(n),{onWall:u}}const Ji={class:"title-strip"},Xi=["aria-label","title"],Zi={key:1,class:"light-spacer","aria-hidden":"true"},el={key:2,class:"no-classroom"},tl={key:3,class:"taken-over",role:"status"},nl={class:"head-row"},sl={class:"acct-mark","aria-hidden":"true"},ol={class:"connected"},il={class:"connected-num font-mono"},ll=["aria-expanded","aria-label"],al={class:"code-chip"},rl={class:"code-text font-mono"},ul={key:0,class:"qr-off",width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},dl={class:"pill-row",role:"tablist","aria-label":"Engagement"},cl=["aria-selected","aria-label"],pl={key:0,class:"pill-bloom","aria-hidden":"true"},vl={key:1,class:"alert-mark alert-quiet","aria-hidden":"true"},ml={key:2,class:"alert-mark alert-loud","aria-hidden":"true"},fl=["aria-selected","aria-label"],hl={key:0,class:"pill-bloom","aria-hidden":"true"},gl={key:1,class:"alert-mark alert-quiet","aria-hidden":"true"},kl={key:2,class:"alert-mark alert-loud","aria-hidden":"true"},yl=["aria-selected","aria-label"],_l=["aria-selected","aria-label"],wl={key:0,class:"unseen-check","aria-hidden":"true"},bl={class:"unseen-text"},$l={class:"code"},Cl='.title-strip, .drawer, button, a, input, textarea, select, [role="dialog"], [role="menu"], [role="tablist"]',xl=z({__name:"console.client",setup(p){const u=_n().query.native==="1";window.__COLAJ_OVERLAY__=u;const l=window.colajWidget,v=typeof l?.quit=="function",{loggedIn:n,user:d,clear:o}=Ct(),{joinUrl:h}=wn().public,w=bn(),$=Te(),M=qt(),y=St(),S=xt(),Y=$n(),{$emit:Z}=Cn();Dn(),An(),En(),Ln(),Rn(),On();const C=b("one"),P=m(()=>C.value==="one");xn("isDarkMode",P);let k=null;const g=b(!1),R=b(!1),x=b(null);Qn(),zn("instructor",()=>x.value??"glance");const q=m(()=>n.value?Y.takenOver?"superseded":$.isActive||$.isPaused?"live":H.value?"ended":"ready":"login"),A=m(()=>v||q.value==="live"),F=m(()=>q.value==="live"?"End session":"Quit Colaj");function T(){q.value==="live"?ut("light"):Gt()}const ee=m(()=>d.value?.email??""),re=m(()=>($.currentSession?.shortcode||w.classroomShortcode||"").toUpperCase().replace(/^(.{3})(.{3})$/,"$1 $2")),{topicRows:Ae,questionRows:he,openQuestions:$e,totals:j}=Ze(),te=m(()=>j.value.questions),et=m(()=>j.value.confused),Ee=m(()=>j.value.likes),{unseen:G,pilingUp:Le,markSeen:Dt,arriving:ue,arrivalClass:de,lastArrival:At}=Fi(Ae,he),{onWall:Ce}=Yi(),tt=Je,Re=m(()=>j.value.confused+j.value.likes),Oe=m(()=>{const c=xe("confused"),a=xe("likes");return c==="loud"||a==="loud"?"loud":c==="quiet"||a==="quiet"?"quiet":"none"}),Et=m(()=>At.value==="likes"?P.value?"rgba(65, 207, 0, 0.9)":"var(--color-green)":P.value?"rgba(203, 141, 248, 0.9)":"var(--color-purple)"),Lt=m(()=>{const c=G.confused+G.likes;return c?` — ${c} new, unseen${Oe.value==="loud"?", needs attention":""}`:""}),Rt={questions:["questions"],topics:["confused","likes"]},ge=m(()=>{const c=[];if(G.questions&&c.push({kind:"questions",text:G.questions===1?"a new upvote on a question":`${G.questions} new upvotes on questions`}),G.confused&&c.push({kind:"confused",text:G.confused===1?"a student is confused":`${G.confused} more students are confused`}),G.likes&&c.push({kind:"likes",text:G.likes===1?"a new like":`${G.likes} new likes`}),c.length){const a=c.map(V=>V.text).join(", ");return{lead:c[0].kind,urgent:Le.value[c[0].kind],text:a.charAt(0).toUpperCase()+a.slice(1),receipt:!1}}return oe.value?{lead:"likes",urgent:!1,text:oe.value,receipt:!0}:null});function Ot(c){const a=G[c];return a?` — ${a} new, unseen${Le.value[c]?", needs attention":""}`:""}function xe(c){return G[c]?Le.value[c]?"loud":"quiet":"none"}function ke(c){const a=x.value!==c;x.value=a?c:null,a&&Rt[c]?.forEach(Dt),st()}
1const ce=b(!1),pe=b(!1),ne=b(!1),X=b(!1),se=b(!1),ye=b(!1),nt=[ce,pe,ne,X,se],ve=m(()=>nt.some(c=>c.value));function st(){nt.forEach(c=>{c.value=!1})}function _e(){st(),x.value=null}const ot=b(null),it=b(null),Qe=b(null),lt=b(null);function Se(c=!1){const a=ce.value?"mic":pe.value?"code":null;ce.value=!1,pe.value=!1,c&&a&&U(()=>{a==="code"?ot.value?.focus():it.value?.$el?.focus()})}function at(c){const a=c==="mic"?ce:pe,V=!a.value;_e(),a.value=V,c==="mic"&&V&&Ie()}function Qt(){S.toggleMute(),Se(!0)}const rt=b("circle");function ut(c="circle"){_e(),rt.value=c,ne.value=!0}function ze(){ne.value=!1,U(()=>(rt.value==="light"?Qe.value:lt.value)?.focus())}function zt(){ne.value=!1,Ft()}const dt=b(null),Ve=b(!1);function Vt(){_e(),X.value=!0}function Ue(){X.value=!1,U(()=>dt.value?.$el?.querySelector(".resume-btn")?.focus())}async function Ut(){if(Ve.value)return;X.value=!1,Ve.value=!0;const c=$.userCount;try{await $fetch(`/api/sessions/${$.id}/resume`,{method:"POST"}),oe.value=`Class is live again — ${c} ${c===1?"student is":"students are"} back.`}catch(a){oe.value=a?.data?.statusMessage||"Couldn't resume the class.",console.error("failed to resume session:",a)}finally{Ve.value=!1}}function Gt(){_e(),se.value=!0}function Ge(){se.value=!1,U(()=>Qe.value?.focus())}function Ht(){se.value=!1,q.value!=="live"&&l?.quit?.()}function ct(c){if(c.key==="Escape"){if(se.value)Ge();else if(ne.value)ze();else if(X.value)Ue();else if(ve.value)Se(!0);else if(x.value)x.value=null;else return;U(()=>ie())}}function pt(c){if(!c.target?.closest?.(Cl)){if(se.value)Ge();else if(ne.value)ze();else if(X.value)Ue();else if(ve.value)Se(!0);else if(x.value)x.value=null;else return;U(()=>ie())}}async function Nt(){const c=d.value?.classroomId;if(!c){g.value=!0;return}g.value=!1,await w.setCookieAuth(c,"instructor"),await $.init({classroomId:c})}async function Wt(){if(!(!w.classroomId||R.value)){R.value=!0,H.value=null,me=0;try{const c=await $fetch(`/api/classrooms/${w.classroomId}/sessions`,{method:"POST",body:{name:"Session"}});$.createSession({label:"Session",status:"active",startTime:new Date,createdAt:new Date,updatedAt:new Date,...c,classroomId:w.classroomId})}catch(c){console.error("Failed to start session:",c)}finally{R.value=!1}}}function Ft(){$.id&&Z("end session",$.id)}async function vt(){S.stop(),await o(),w.clearCredentials(),g.value=!1,H.value=null}const He=m(()=>y.isLive),Kt=m(()=>y.resultsPollId);function Yt(){y.dismissResults(),oe.value="Poll saved to the study guide",x.value=null}const Me=Mt(),oe=b(null);Q(()=>y.instructorPhase==="generating"||y.instructorPhase==="composing"||Me.instructorPhase==="generating"||Me.instructorPhase==="composing",c=>{c&&(oe.value=null)});const mt=m(()=>Me.isLive);function Jt(){Me.newDiscussion(),oe.value="Group work saved to the study guide",x.value=null}const qe=b([]),ft=m(()=>{const c=S.selectedDeviceId,a=qe.value.find(V=>V.deviceId===c);return a?a.label||`Microphone ${a.deviceId.slice(0,8)}`:"Default"});async function Ie(){try{let c=null;try{c=await navigator.mediaDevices.getUserMedia({audio:!0});const a=await navigator.mediaDevices.enumerateDevices();qe.value=a.filter(V=>V.kind==="audioinput"&&V.deviceId!=="default")}finally{c?.getTracks().forEach(a=>a.stop())}}catch{qe.value=[]}}const ht=m(()=>qe.value.map(c=>({deviceId:c.deviceId,label:c.label||`Microphone ${c.deviceId.slice(0,8)}`})));async function Xt(){if(!S.source)return;const c=S.isActive;await S.stop(),u?await S.requestMixedPermission():await S.requestPermission(),c&&await S.start()}async function gt(c){c!==S.selectedDeviceId&&(S.selectedDeviceId=c,await Xt())}async function Zt(c){Se(!0),await gt(c)}const H=b(null);let me=0;Q(()=>$.userCount,c=>{c>me&&(me=c)}),Q(()=>$.isActive,c=>{c&&(H.value=null,me=$.userCount)}),Q(()=>$.status,(c,a)=>{if(c!=="ended"||a==="ended")return;const V=$.currentSession?.startTime,Be=V?new Date(V).getTime():null,le=he.value[0];H.value={durationMin:Be?Math.max(1,Math.round((Date.now()-Be)/6e4)):0,joined:me,questions:he.value.length,likes:Ee.value,polls:y.polls.length,topQuestion:le?{text:le.question,upvotes:le.upvoteCount}:null,studyGuideUrl:`${window.location.origin}/session/${$.id}/study-guide`,canResume:!0,sessionLabel:$.currentSession?.label||""}});function en(){H.value=null,me=0}const kt=m(()=>($.currentSession?.shortcode||"").toUpperCase()),tn=m(()=>`HTTPS://WWW.${String(h).replace(/^https?:\/\//,"").replace(/^www\./,"").toUpperCase()}/?code=${kt.value}`),yt=m(()=>y.resultsPoll),_t=m(()=>H.value?"ended":y.activePoll?"poll":Kt.value?"poll-closed":$.isActive||$.isPaused?"live":"waiting"),nn=m(()=>({v:1,phase:_t.value,join:{code:kt.value.replace(/^(.{3})(.{3})$/,"$1 $2"),url:tn.value,qrVisible:!ye.value},counts:{questions:te.value,confused:et.value,likes:Ee.value,connected:$.userCount},arrivals:{questions:de("questions"),confused:de("confused"),likes:de("likes")},captions:{lines:(M.finalTranscripts??[]).slice(-4).map(c=>c.transcript),live:M.inProgressTranscript?.transcript??""},poll:y.activePoll?{question:y.activePoll.question,answeredCount:y.responses,attendees:y.attendees}:null,pollResults:yt.value?{answered:yt.value.result?.responseCount??y.responses}:null,question:_t.value==="live"&&Ce.value?{...Ce.value,dwellMs:tt}:null,ended:H.value?{questions:H.value.questions,likes:H.value.likes,studyGuideUrl:H.value.studyGuideUrl}:null}));Q(nn,c=>{l?.publishBeaconState(c)},{immediate:!0});const we=b(null);let Ne=null;function sn(){U(()=>ie())}function ie(){if(!l||!we.value)return;const c=we.value.getBoundingClientRect().height;c&&l.reportSize({height:Math.ceil(c)})}Q(n,c=>{c&&(Nt(),Ie())},{immediate:!0});let We=null;return fe(()=>{window.addEventListener("keydown",ct),window.addEventListener("pointerdown",pt,!0),navigator.mediaDevices?.addEventListener?.("devicechange",Ie),l&&(k=l.onDisplayMode(c=>{C.value=c}),Ne=new ResizeObserver(()=>ie()),we.value&&Ne.observe(we.value),U(()=>ie()),We=Vn(ie,300))}),Q(q,_e),Q([q,x,C,ve,Ce],()=>U(()=>ie())),ae(()=>{window.removeEventListener("keydown",ct),window.removeEventListener("pointerdown",pt,!0),navigator.mediaDevices?.removeEventListener?.("devicechange",Ie),k?.(),Ne?.disconnect(),We&&clearInterval(We)}),(c,a)=>{const V=Fn,Be=ss,le=je,on=Ts,ln=Os,an=Js,rn=io,un=$o,dn=To,cn=Wo,pn=hi,vn=Sn,mn=$i,fn=Ni;return s(),r("div",{class:E(["console-root",{dark:t(P)}])},[e("div",{ref_key:"shellEl",ref:we,class:E(["card-shell",{native:u}])},[e("div",{class:E(["card",{shadowed:!u}]),role:"region","aria-label":"Colaj instructor console",onClickCapture:sn},[e("div",Ji,[t(A)?(s(),r("button",{key:0,ref_key:"lightBtn",ref:Qe,type:"button",class:"title-light","aria-label":t(F),title:t(F),onClick:T},[...a[13]||(a[13]=[e("span",{class:"light-dot","aria-hidden":"true"},null,-1)])],8,Xi)):(s(),r("span",Zi)),a[14]||(a[14]=e("span",{class:"strip-spacer","aria-hidden":"true"},null,-1)),a[15]||(a[15]=e("span",{class:"strip-label font-mono"},"Colaj",-1)),a[16]||(a[16]=e("span",{class:"strip-spacer","aria-hidden":"true"},null,-1)),a[17]||(a[17]=e("span",{class:"light-spacer","aria-hidden":"true"},null,-1))]),t(se)?(s(),I(V,{key:0,label:"Quit Colaj?",title:"Quit Colaj?",body:"You won't need to sign in again. You stay signed in until you log out.","cancel-label":"Stay open","confirm-label":"Quit",onCancel:Ge,onConfirm:Ht})):_("",!0),t(q)==="login"?(s(),I(Be,{key:1})):t(g)?(s(),r("div",el,[L(le,{size:24}),a[18]||(a[18]=e("p",null,"This account has no classroom assigned. Contact support.",-1))])):t(q)==="superseded"?(s(),r("div",tl,[L(le,{size:24}),a[19]||(a[19]=e("p",null,"Your class opened on another device. It is still running there — this window has stopped listening.",-1))])):t(q)==="ready"?(s(),I(on,{key:4,email:t(ee),starting:t(R),"device-id":t(S).selectedDeviceId,"device-label":t(ft),devices:t(ht),onStartSession:Wt,onLogOut:vt,onSelectMic:gt},null,8,["email","starting","device-id","device-label","devices"])):t(q)==="live"?(s(),r(B,{key:5},[e("div",nl,[e("span",sl,[L(le,{size:24})]),L(ln,{ref_key:"micPillRef",ref:it,muted:t(S).muted,"menu-open":t(ce),level:t(S).mixedLevel,onToggleMenu:a[0]||(a[0]=K=>at("mic"))},null,8,["muted","menu-open","level"]),e("button",{ref_key:"endBtn",ref:lt,type:"button",class:"end-btn","aria-label":"End session and build the study guide",title:"End session",onClick:a[1]||(a[1]=K=>ut("circle"))},[...a[20]||(a[20]=[e("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"
1currentColor",stroke:"none","aria-hidden":"true"},[e("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})],-1)])],512),a[24]||(a[24]=e("span",{class:"spacer"},null,-1)),e("span",ol,[a[21]||(a[21]=e("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[e("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),e("circle",{cx:"9",cy:"7",r:"4"})],-1)),e("span",il,f(t($).userCount),1),a[22]||(a[22]=e("span",{class:"sr-only"},"students connected",-1))]),e("button",{ref_key:"codeBtn",ref:ot,type:"button",class:"code-btn","aria-expanded":t(pe),"aria-label":`Join code ${t(re)} — beacon options`,onClick:a[2]||(a[2]=K=>at("code"))},[e("span",al,[e("span",rl,f(t(re)),1),t(ye)?(s(),r("svg",ul,[...a[23]||(a[23]=[e("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94"},null,-1),e("path",{d:"M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19"},null,-1),e("line",{x1:"1",y1:"1",x2:"23",y2:"23"},null,-1)])])):_("",!0)])],8,ll)]),e("div",dl,[e("button",{type:"button",role:"tab",class:E(["count-pill q",[t(de)("questions"),{active:t(x)==="questions"}]]),"aria-selected":t(x)==="questions","aria-label":`${t(te)} upvotes across ${t($e)} open question${t($e)===1?"":"s"} — open the list${Ot("questions")}`,title:"Questions",onClick:a[3]||(a[3]=K=>ke("questions"))},[t(ue).questions?(s(),r("span",pl)):_("",!0),xe("questions")==="quiet"?(s(),r("span",vl)):xe("questions")==="loud"?(s(),r("span",ml,"!")):_("",!0),a[25]||(a[25]=Pe('<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-191503fa><path d="M18 11V6a2 2 0 0 0-2-2 2 2 0 0 0-2 2" data-v-191503fa></path><path d="M14 10V4a2 2 0 0 0-2-2 2 2 0 0 0-2 2v2" data-v-191503fa></path><path d="M10 10.5V6a2 2 0 0 0-2-2 2 2 0 0 0-2 2v8" data-v-191503fa></path><path d="M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15" data-v-191503fa></path></svg>',1)),(s(),r("span",{key:`qn${t(te)}`,class:E(["count font-mono",{"count-arrive":t(ue).questions}])},f(t(te)),3))],10,cl),e("button",{type:"button",role:"tab",class:E(["count-pill t",[t(de)("confused")||t(de)("likes"),{active:t(x)==="topics"}]]),"aria-selected":t(x)==="topics",style:J({"--ring-hue":t(Et)}),"aria-label":`${t(Re)} topic reactions — ${t(et)} confused, ${t(Ee)} liked — open the active topics${t(Lt)}`,title:"Active topics",onClick:a[4]||(a[4]=K=>ke("topics"))},[t(ue).confused||t(ue).likes?(s(),r("span",hl)):_("",!0),t(Oe)==="quiet"?(s(),r("span",gl)):t(Oe)==="loud"?(s(),r("span",kl,"!")):_("",!0),a[26]||(a[26]=e("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[e("polygon",{points:"12 2 2 7 12 12 22 7 12 2"}),e("polyline",{points:"2 17 12 22 22 17"}),e("polyline",{points:"2 12 12 17 22 12"})],-1)),(s(),r("span",{key:`tn${t(Re)}`,class:E(["count font-mono",{"count-arrive":t(ue).confused||t(ue).likes}])},f(t(Re)),3))],14,fl),e("button",{type:"button",role:"tab",class:E(["poll-pill",{active:t(x)==="poll",live:t(He)}]),"aria-selected":t(x)==="poll","aria-label":t(He)?"Poll — open poll controls":"Send a poll — open suggestions",title:"Polls",onClick:a[5]||(a[5]=K=>ke("poll"))},[...a[27]||(a[27]=[e("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[e("line",{class:"pb pb-a",x1:"18",y1:"20",x2:"18",y2:"10"}),e("line",{class:"pb pb-b",x1:"12",y1:"20",x2:"12",y2:"4"}),e("line",{class:"pb pb-c",x1:"6",y1:"20",x2:"6",y2:"14"})],-1),D(" Polls ",-1)])],10,yl),e("button",{type:"button",role:"tab",class:E(["poll-pill",{active:t(x)==="groups",live:t(mt)}]),"aria-selected":t(x)==="groups","aria-label":t(mt)?"Groups live — open group controls":"Groups — send a discussion prompt",title:"Groups",onClick:a[6]||(a[6]=K=>ke("groups"))}
1,[...a[28]||(a[28]=[Pe('<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-191503fa><circle class="gb gb-a" cx="7" cy="7" r="3" data-v-191503fa></circle><circle class="gb gb-b" cx="17" cy="7" r="3" data-v-191503fa></circle><circle class="gb gb-c" cx="7" cy="17" r="3" data-v-191503fa></circle><circle class="gb gb-d" cx="17" cy="17" r="3" data-v-191503fa></circle></svg> Groups ',2)])],10,_l)]),t(ge)&&!t(x)&&!t(ve)?(s(),r("p",{key:0,class:E(["unseen-line",{urgent:t(ge).urgent}]),role:"status"},[t(ge).receipt?(s(),r("span",wl,[...a[29]||(a[29]=[e("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3.2","stroke-linecap":"round","stroke-linejoin":"round"},[e("polyline",{points:"20 6 9 17 4 12"})],-1)])])):(s(),r("span",{key:1,class:E(["unseen-dot",t(ge).lead]),"aria-hidden":"true"},null,2)),e("span",bl,f(t(ge).text),1)],2)):_("",!0),t(ce)?(s(),I(an,{key:1,muted:t(S).muted,"device-label":t(ft),devices:t(ht),"selected-id":t(S).selectedDeviceId,onToggleMute:Qt,onSelectMic:Zt},null,8,["muted","device-label","devices","selected-id"])):_("",!0),t(pe)?(s(),I(rn,{key:2,"qr-hidden":t(ye),code:t(re).replace(" ",""),onToggleQr:a[7]||(a[7]=K=>ye.value=!t(ye))},null,8,["qr-hidden","code"])):_("",!0),t(ne)?(s(),I(V,{key:3,label:"End this session?",title:"End session and build the study guide?","cancel-label":"Keep going","confirm-label":"End session",onCancel:ze,onConfirm:zt},{body:W(()=>[...a[30]||(a[30]=[D(" Students move to the study guide. The join code stops working. ",-1),e("span",{class:"confirm-meta"},"Ended early? You can resume this class for 24 hours.",-1)])]),_:1})):_("",!0),t(x)==="questions"?(s(),I(un,{key:4,onClose:a[8]||(a[8]=K=>x.value=null)})):t(x)==="topics"?(s(),I(dn,{key:5,onClose:a[9]||(a[9]=K=>x.value=null)})):t(x)==="poll"?(s(),I(cn,{key:6,onClose:a[10]||(a[10]=K=>x.value=null),onDone:Yt})):t(x)==="groups"?(s(),I(pn,{key:7,onClose:a[11]||(a[11]=K=>x.value=null),onDone:Jt})):_("",!0),L(vn,{variant:"console",question:t(P)&&!t(x)&&!t(ve)&&!t(He)?t(Ce):null,"dwell-ms":t(tt),onOpen:a[12]||(a[12]=K=>ke("questions"))},null,8,["question","dwell-ms"]),t(P)&&!t(x)&&!t(ve)?(s(),I(mn,{key:8})):_("",!0)],64)):t(q)==="ended"&&t(H)?(s(),I(fn,{key:6,ref_key:"endedPanelRef",ref:dt,snapshot:t(H),email:t(ee),confirming:t(X),onHome:en,onLogOut:vt,onResume:Vt},{default:W(()=>[t(X)?(s(),I(V,{key:0,label:"Resume this class?",title:"Resume this class?","cancel-label":"Not now","confirm-label":"Resume",tone:"neutral",onCancel:Ue,onConfirm:Ut},{body:W(()=>[a[31]||(a[31]=D(" Everyone comes back and ",-1)),e("span",$l,f(t(re)),1),a[32]||(a[32]=D(" works again. The study guide is rewritten to cover the whole class. ",-1))]),_:1})):_("",!0)]),_:1},8,["snapshot","email","confirming"])):_("",!0)],34)],2)],2)}}}),Ll=O(xl,[["__scopeId","data-v-191503fa"]]);export{Ll as default};

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.