PageSourceSearch

https://avua.com/assets/ConversationalMockInterviewStart-qBn_0Y4e.js

js avua.com collected 2026-09-24 12:55:16 UTC 40,615 bytes, 65 lines download raw bytes

1import{a2 as Pt,u as Dt,b as Nt,c as r,cK as zt,A as $t,f as Ot,j as t,x as st,i as he,Q as Wt}from"./index-B9q78oLf.js";import{a as Ht,c as Lt}from"./mockInterviewApi-Blq3nKMM.js";import{N as Ut,I as qt}from"./InternalServerErrorInterview-CRzC9P25.js";import{r as xt,p as mt}from"./mockInterviewDashboardUtils-BtKpAHUU.js";import{u as Gt}from"./use-animation-frame-D7FTHVTK.js";const Jt=h=>{const b=String(Math.floor(h/60)).padStart(2,"0"),v=String(h%60).padStart(2,"0");return`${b}:${v}`},it=h=>{const b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(h);return b?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null},Yt=(h,b,v)=>"#"+[h,b,v].map(I=>{const x=Math.round(I).toString(16);return x.length===1?"0"+x:x}).join(""),D=(h,b,v)=>{const I=it(h),x=it(b);if(!I||!x)return h;const N=I.r+(x.r-I.r)*v,K=I.g+(x.g-I.g)*v,Q=I.b+(x.b-I.b)*v;return Yt(N,K,Q)},ht=(h,b,v)=>{const I=z=>{if(z.startsWith("rgba")){const F=z.match(/rgba?\((\d+),\s*(\d+),\s*(\d+),?\s*([\d.]+)?\)/);if(F)return{r:parseInt(F[1]),g:parseInt(F[2]),b:parseInt(F[3]),a:parseFloat(F[4]||1)}}const $=it(z);return $?{...$,a:1}:{r:255,g:255,b:255,a:1}},x=I(h),N=I(b),K=x.r+(N.r-x.r)*v,Q=x.g+(N.g-x.g)*v,M=x.b+(N.b-x.b)*v,w=x.a+(N.a-x.a)*v;return`rgba(${Math.round(K)}, ${Math.round(Q)}, ${Math.round(M)}, ${w.toFixed(2)})`},j={background:"#F4F2F8",cardBackground:"#FFFFFF",cardBorder:"#E5E7EE",transcriptBackground:"#FFFFFF",transcriptBorder:"#D9D9D9",textPrimary:"#1B1B1B",textSecondary:"#424242",textMuted:"#A2A2A2",textTranscript:"#B0B0B0",timerBackground:"#FFFFFF",recordingBarBackground:"#FFFFFF",buttonBackground:"#FFFFFF",buttonBorder:"#502F99",buttonText:"#502F99",separatorColor:"#1B1B1B",waveformActive:"#6B3BAB",waveformInactive:"#D9D9D9"},A={background:"#16151A",cardBackground:"#1F1E25",cardBorder:"#36353C",transcriptBackground:"rgba(31, 30, 37, 0.3)",transcriptBorder:"#36353C",textPrimary:"#FFFFFF",textSecondary:"#A2A2A2",textMuted:"#A2A2A2",textTranscript:"#B0B0B0",timerBackground:"#1F1E25",recordingBarBackground:"#1F1E25",buttonBackground:"#1F1E25",buttonBorder:"rgba(255, 255, 255, 0.2)",buttonText:"#A2A2A2",separatorColor:"#FFFFFF",waveformActive:"#6B3BAB",waveformInactive:"#36353C"},Kt=600,nt=h=>({color:h,fontSize:"11px",fontWeight:"700",letterSpacing:"0.5px",textTransform:"uppercase",marginBottom:"4px"}),Qt=.04,yt=50,Vt=500,Xt=3,Zt=800,er=6e3,tr=250,bt=5e3,vt=[{size:150,color:"#4B00B4",opacity:.6,blur:18,breathDur:4,freq:1,phase:0},{size:135,color:"#8B5CF6",opacity:.55,blur:16,breathDur:5.5,freq:.75,phase:Math.PI*.7},{size:140,color:"#a855f7",opacity:.5,blur:20,breathDur:3.2,freq:1.3,phase:Math.PI*1.4},{size:125,color:"#2D1B69",opacity:.5,blur:22,breathDur:6,freq:.6,phase:Math.PI*2.1}],ot=10;function rr({isConnected:h,isSpeaking:b,logoSrc:v}){const I=r.useRef([]),x=r.useRef(null),N=r.useRef([]),K=r.useRef(b),Q=r.useRef(h);return r.useEffect(()=>{K.current=b},[b]),r.useEffect(()=>{Q.current=h},[h]),Gt(M=>{const w=M/1e3,z=K.current,$=Q.current,F=$?z?2:1:.2,U=$?z?1.5:1:.3,ee=$?1:.15;if(vt.forEach((k,V)=>{const _=I.current[V];if(!_)return;const X=w*F,ke=k.freq,de=k.phase,T=[];for(let q=0;q<8;q++)T.push(Math.round(40+20*U*Math.sin(X*ke+de+q*.9)));_.style.borderRadius=`${T[0]}% ${T[1]}% ${T[2]}% ${T[3]}% / ${T[4]}% ${T[5]}% ${T[6]}% ${T[7]}%`;const Se=1+.06*U*Math.sin(X*(2*Math.PI)/k.breathDur+de),ye=(V%2===0?1:-1)*15*F,te=w*ye%360;_.style.transform=`scale(${Se.toFixed(4)}) rotate(${te.toFixed(2)}deg)`,_.style.opacity=(k.opacity*ee).toFixed(3)}),x.current){const k=$?.8:.1,_=1+.15*Math.sin(w*F*1.5),X=k+k*.3*Math.sin(w*F*1.2);x.current.style.transform=`scale(${_.toFixed(4)})`,x.current.style.opacity=X.toFixed(3)}for(let k=0;k<ot;k++){const V=N.current[k];if(!V)continue;const _=k/ot*Math.PI*2+w*F*.3,X=85+10*Math.sin(w*F*.5+k*1.2),ke=Math.cos(_)*X,de=Math.sin(_)*X;V.style.transform=`translate(${ke.toFixed(1)}px, ${de.toFixed(1)}px)`,V.style.opacity=$?z?(.4+.3*Math.sin(w*3+k)).toFixed(2):(.3+.1*Math.sin(w+k)).toFixed(2):"0.05"}}),t.jsxs("div",{style:{width:200,height:200,position:"relative",display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx("div",{ref:x,style:{position:"absolute",width:180,height:180,borderRadius:"50%",background:"radial-gradient(circle, rgba(139,92,246,0.25) 0%, rgba(107,59,171,0.12) 40%, transparent 70%)",filter:"blur(30px)",willChange:"transform, opacity"}}),vt.map((M,w)=>t.jsx("div",{ref:z=>I.current[w]=z,style:{position:"absolute",width:M.size,height:M.size,background:`radial-gradient(circle at 40% 40%, ${M.color}cc, ${M.color}88 50%, ${M.color}
133 100%)`,filter:`blur(${M.blur}px)`,opacity:M.opacity,willChange:"transform, border-radius, opacity",zIndex:w+1}},w)),Array.from({length:ot}).map((M,w)=>t.jsx("div",{ref:z=>N.current[w]=z,style:{position:"absolute",width:3,height:3,borderRadius:"50%",background:"#a855f7",opacity:.3,willChange:"transform, opacity",zIndex:5}},`p-${w}`)),t.jsx(st.div,{style:{position:"relative",width:60,height:60,borderRadius:"50%",background:"transparent",border:"none",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10},animate:{scale:h?[1,1.04,1]:.95,opacity:h?1:.25},transition:h?{scale:{repeat:1/0,duration:3,ease:"easeInOut"},opacity:{type:"spring",stiffness:100,damping:15}}:{type:"spring",stiffness:100,damping:15},children:t.jsx("img",{src:v,alt:"Avua AI",style:{width:36,height:36,objectFit:"contain",filter:b?"brightness(1.5) drop-shadow(0 0 14px rgba(139, 92, 246, 0.8))":"brightness(1.2) drop-shadow(0 0 8px rgba(139, 92, 246, 0.5))",transition:"filter 0.6s ease"}})})]})}function cr(){const h=Pt(),b=Dt(),v=Nt(e=>e.auth.token),{audioSource:I,cameraSource:x,jobTitle:N,jobDescription:K,experienceLevel:Q,language:M,technicalRatio:w,culturalFit:z,interviewRoomId:$,interviewId:F}=h.state||{},U=r.useRef($),ee=r.useRef(F),k=r.useRef(null);r.useEffect(()=>{const e=xt($),i=$||e?.interviewRoomId,o=F||e?.interviewId;i&&(U.current=i),o&&(ee.current=o),i&&o&&mt(i,o)},[$,F]);const V=U.current;ee.current;const[_,X]=r.useState(!1),[ke,de]=r.useState(!1),[T,wt]=r.useState(N||""),[Se,ye]=r.useState(!1),[te,q]=r.useState([]),[re,_e]=r.useState(""),[be,pe]=r.useState(""),[se,at]=r.useState(!1),[Te,Oe]=r.useState(0),[We,Rt]=r.useState(0),[It,He]=r.useState(!1),[kt,Le]=r.useState(!1),[St,_t]=r.useState(""),[Tt,jt]=r.useState("error"),[At,ct]=r.useState(!1),[Ft,Bt]=r.useState(!1),[je,Ct]=r.useState(!1),[R,Mt]=r.useState(window.innerWidth<768);r.useEffect(()=>{const e=()=>Mt(window.innerWidth<768);return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const J=r.useMemo(()=>je===!0?1:je===!1?0:Math.min(We/Kt,1),[We,je]),s=r.useMemo(()=>{const e=J;return{background:D(j.background,A.background,e),cardBackground:D(j.cardBackground,A.cardBackground,e),cardBorder:D(j.cardBorder,A.cardBorder,e),transcriptBackground:ht(j.transcriptBackground,A.transcriptBackground,e),transcriptBorder:D(j.transcriptBorder,A.transcriptBorder,e),textPrimary:D(j.textPrimary,A.textPrimary,e),textSecondary:D(j.textSecondary,A.textSecondary,e),textMuted:D(j.textMuted,A.textMuted,e),textTranscript:D(j.textTranscript,A.textTranscript,e),timerBackground:D(j.timerBackground,A.timerBackground,e),recordingBarBackground:D(j.recordingBarBackground,A.recordingBarBackground,e),buttonBackground:D(j.buttonBackground,A.buttonBackground,e),buttonBorder:ht(j.buttonBorder,A.buttonBorder,e),buttonText:D(j.buttonText,A.buttonText,e),separatorColor:D(j.separatorColor,A.separatorColor,e),waveformActive:D(j.waveformActive,A.waveformActive,e),waveformInactive:D(j.waveformInactive,A.waveformInactive,e)}},[J]),Et=r.useCallback(()=>{Ct(e=>!e)},[]),E=r.useCallback((e,i="error")=>{_t(e),jt(i),ct(!0)},[]),ve=r.useRef(null),Ue=r.useRef(null),ie=r.useRef(null),lt=r.useRef(null),Ae=r.useRef(null),we=r.useRef(null),Re=r.useRef(null),ae=r.useRef(null),Fe=r.useRef(null),B=r.useRef(""),m=r.useRef(null),fe=r.useRef(null),Be=r.useRef(null),Ce=r.useRef(""),qe=r.useRef(!1),ce=r.useRef(!0),Ge=r.useRef(!1),Z=r.useRef([]),Y=r.useRef(null),Je=r.useRef([]),Ye=r.useRef(null),ge=r.useRef(""),Ke=r.useRef(null),Qe=r.useRef(!1),Me=r.useRef(!1),O=r.useRef(null),Ee=r.useRef(!1),Pe=r.useRef(!1),H=r.useRef(null),De=r.useRef(!1),Ne=r.useRef(null),Ve=r.useRef(null),Xe=r.useRef(null),ne=r.useRef(null),ut=r.useRef(0),Ze=r.useRef({voiceMs:0,quietTicks:0}),dt=r.useRef(!1),L=r.useRef(new Set),xe=r.useRef({}),Ie=r.useRef(new Set),et=r.useRef([]);r.useEffect(()=>{Ce.current=re},[re]),r.useEffect(()=>{qe.current=_},[_]),r.useEffect(()=>{Z.current=te},[te]);const me=r.useCallback(e=>{(ae.current?.getAudioTracks()||[]).forEach(o=>{o.enabled=e})},[]),le=r.useCallback(()=>{ne.current&&(clearInterval(ne.current),ne.current=null),Ze.current={voiceMs:0,quietTicks:0}},[]),pt=r.useCallback(e=>{le();const i=Be.current;if(!(!i||i.readyState!=="open")){console.log(`[BARGE-IN] sustained voice during assistant audio (rms=${e.toFixed(3)}
1) — cancelling response`);try{i.send(JSON.stringify({type:"response.cancel"})),i.send(JSON.stringify({type:"output_audio_buffer.clear"}))}catch(o){console.error("[BARGE-IN] failed to send cancel events:",o)}Ee.current=!1,me(!0),O.current&&(clearTimeout(O.current),O.current=null)}},[me,le]),ft=r.useCallback(()=>{if(ne.current)return;const e=Ve.current;e&&(Ze.current={voiceMs:0,quietTicks:0},ut.current=Date.now(),ne.current=setInterval(()=>{if(Pe.current||De.current){le();return}const i=ie.current;if(!i||i.state!=="running"){i?.resume?.().catch(()=>{});return}if(Date.now()-ut.current<Zt)return;const o=Xe.current;e.getFloatTimeDomainData(o);let a=0;for(let p=0;p<o.length;p++)a+=o[p]*o[p];const c=Math.sqrt(a/o.length),l=Ze.current;c>Qt?(l.quietTicks=0,l.voiceMs+=yt,l.voiceMs>=Vt&&pt(c)):(l.quietTicks+=1,l.quietTicks>=Xt&&(l.voiceMs=0))},yt))},[le,pt]),gt=r.useCallback(e=>{const{type:i}=e;switch(i&&(et.current=[...et.current.slice(-149),{type:i,at:Date.now()}]),i){case"input_audio_buffer.committed":e.item_id&&(L.current.add(e.item_id),Oe(L.current.size),console.log("[TRANSCRIPT] audio committed, awaiting transcription:",e.item_id));break;case"conversation.item.input_audio_transcription.delta":e.item_id&&(xe.current[e.item_id]=(xe.current[e.item_id]||"")+(e.delta||"")),_e(o=>o+(e.delta||""));break;case"conversation.item.input_audio_transcription.completed":{e.item_id?L.current.delete(e.item_id):L.current.clear(),Oe(L.current.size);const o=(e.transcript||"").trim(),a=(e.item_id&&xe.current[e.item_id]||Ce.current||"").trim();e.item_id&&delete xe.current[e.item_id];const c=a.length>o.length?a:o;a.length>o.length&&console.log("[TRANSCRIPT] deltas longer than completed transcript — using deltas"),console.log("[TRANSCRIPT] user done:",c),c&&q(l=>{const p=l[l.length-1];if(De.current&&p?.role==="user"&&c.startsWith(p.content)){const y=[...l.slice(0,-1),{role:"user",content:c,timestamp:Date.now()}];return Z.current=y,y}const g=[...l,{role:"user",content:c,timestamp:Date.now()}];return Z.current=g,g}),_e("");break}case"conversation.item.input_audio_transcription.failed":{console.error("[TRANSCRIPT] user transcription failed:",e.error||e),e.item_id?L.current.delete(e.item_id):L.current.clear(),Oe(L.current.size);const o=(e.item_id&&xe.current[e.item_id]||Ce.current||"").trim();e.item_id&&delete xe.current[e.item_id],o&&(console.log("[TRANSCRIPT] salvaging partial transcript after failure:",o),q(a=>{const c=[...a,{role:"user",content:o,timestamp:Date.now()}];return Z.current=c,c})),_e("");break}case"response.created":Me.current=!0;break;case"response.output_audio_transcript.delta":console.log("[TRANSCRIPT] output_audio_transcript.delta:",e.delta),Me.current=!0,B.current+=e.delta||"",m.current||(m.current=setInterval(()=>{if(B.current.length>0){const o=B.current.slice(0,2);B.current=B.current.slice(2),pe(a=>a+o)}else clearInterval(m.current),m.current=null},60));break;case"response.output_audio_transcript.done":{console.log("[TRANSCRIPT] output_audio_transcript.done:",e.transcript),e.item_id&&Ie.current.add(e.item_id),m.current&&(clearInterval(m.current),m.current=null);const o=(e.transcript||"").trim();B.current="",pe(()=>(o&&q(a=>{const c=[...a].reverse().find(l=>l.role==="assistant");return c&&c.content===o?a:[...a,{role:"assistant",content:o,timestamp:Date.now()}]}),""));break}case"response.output_text.delta":console.log("[TRANSCRIPT] output_text.delta:",e.delta),B.current+=e.delta||"",m.current||(m.current=setInterval(()=>{if(B.current.length>0){const o=B.current.slice(0,2);B.current=B.current.slice(2),pe(a=>a+o)}else clearInterval(m.current),m.current=null},60));break;case"response.output_text.done":{console.log("[TRANSCRIPT] output_text.done:",e.text),e.item_id&&Ie.current.add(e.item_id),m.current&&(clearInterval(m.current),m.current=null);const o=(e.text||"").trim();B.current="",pe(()=>(o&&q(a=>[...a,{role:"assistant",content:o,timestamp:Date.now()}]),""));break}case"response.done":{console.log("[TRANSCRIPT] response.done:",e.response),m.current&&(clearInterval(m.current),m.current=null),B.current="";const o=(e.response?.output||[]).filter(a=>!(a.id&&Ie.current.has(a.id))).map(a=>({id:a.id,content:(a.content||[]).map(c=>
1c.transcript||c.text||"").filter(Boolean).join(" ").trim()})).filter(a=>a.content);pe(()=>(o.length>0&&q(a=>{let c=a;return o.forEach(({id:l,content:p})=>{l&&Ie.current.add(l);const g=[...c].reverse().find(y=>y.role==="assistant");g&&g.content===p||(c=[...c,{role:"assistant",content:p,timestamp:Date.now()}])}),c}),""));break}case"input_audio_buffer.speech_started":at(!0);break;case"input_audio_buffer.speech_stopped":at(!1);break;case"output_audio_buffer.started":Me.current=!0,Ee.current=!0,me(!1),O.current&&clearTimeout(O.current),O.current=setTimeout(()=>{O.current=null,me(!0),le()},6e4),ft();break;case"output_audio_buffer.stopped":case"output_audio_buffer.cleared":Ee.current=!1,me(!0),le(),O.current&&(clearTimeout(O.current),O.current=null),Pe.current&&H.current&&(clearTimeout(H.current),H.current=setTimeout(()=>{H.current=null,ce.current&&k.current?.()},1500));break;case"error":{console.error("[Realtime error]",e.error||e);const o=JSON.stringify(e.error||e);!dt.current&&/turn_detection|semantic_vad|eagerness/i.test(o)&&Be.current?.readyState==="open"&&(dt.current=!0,console.warn("[VAD] turn_detection rejected — re-sending patient server_vad"),Be.current.send(JSON.stringify({type:"session.update",session:{type:"realtime",audio:{input:{transcription:{model:"gpt-4o-transcribe"},turn_detection:{type:"server_vad",threshold:.6,prefix_padding_ms:300,silence_duration_ms:bt,create_response:!0,interrupt_response:!0}}}}})));break}}if(e.transcript&&e.transcript.toLowerCase().includes("end_of_interview")&&!Pe.current){Pe.current=!0;const o=Ee.current?2e4:5e3;H.current=setTimeout(()=>{H.current=null,ce.current&&k.current?.()},o)}},[me,ft,le]),ze=r.useCallback(()=>{const e=Ue.current;if(!e)return;const i=e.getContext("2d"),o=lt.current,a=()=>{if(!ce.current)return;Ae.current=requestAnimationFrame(a);const c=e.width,l=e.height;if(i.fillStyle="#000000",i.fillRect(0,0,c,l),!qe.current||!o){const p=Date.now()/1e3,g=window.innerWidth<768?40:70,y=c/g;for(let P=0;P<g;P++){const G=P*y,n=20+Math.sin(p*2+P*.3)*10,u=i.createLinearGradient(0,0,0,l);u.addColorStop(0,"#00FFA3"),u.addColorStop(1,"#00AA66"),i.fillStyle=u,i.fillRect(G,l/2-n/2,y-2,n)}}else{const p=o.frequencyBinCount,g=new Uint8Array(p);o.getByteFrequencyData(g);const y=window.innerWidth<768?40:70,P=c/y;for(let G=0;G<y;G++){const n=Math.floor(G/y*p),u=g[n]/255*l*.8,d=G*P,f=l/2-u/2,S=g[n]/255,W=Math.floor(S*0),C=Math.floor(255*S),oe=Math.floor(163*S),rt=i.createLinearGradient(0,f,0,f+u);rt.addColorStop(0,`rgb(${W}, ${C+50}, ${oe+50})`),rt.addColorStop(1,`rgb(${W}, ${C}, ${oe})`),i.fillStyle=rt,i.fillRect(d,f,P-2,u||2)}}};a()},[]),ue=r.useCallback(()=>{if(ve.current){try{ve.current.signalingState!=="closed"&&ve.current.close()}catch(e){console.error("Error closing peer connection:",e)}ve.current=null}if(ie.current){try{ie.current.state!=="closed"&&ie.current.close()}catch(e){console.error("Error closing audio context:",e)}ie.current=null,Ke.current=null,Qe.current=!1}if(we.current){try{we.current.pause(),we.current.srcObject=null}catch(e){console.error("Error cleaning up audio element:",e)}we.current=null}if(ae.current){try{ae.current.getTracks().forEach(e=>e.stop())}catch(e){console.error("Error stopping local stream tracks:",e)}ae.current=null}if(Y.current){try{Y.current.state!=="inactive"&&(console.log("Stopping media recorder during cleanup"),Y.current.stop())}catch(e){console.error("Error stopping media recorder:",e)}Y.current=null,Je.current=[],Ye.current=null}if(Re.current)try{Re.current.srcObject=null}catch(e){console.error("Error cleaning up video element:",e)}if(m.current&&(clearInterval(m.current),m.current=null),B.current="",Ie.current.clear(),O.current&&(clearTimeout(O.current),O.current=null),ne.current&&(clearInterval(ne.current),ne.current=null),Ne.current){try{Ne.current.stop()}catch(e){console.error("Error stopping mic monitor track:",e)}Ne.current=null}Ve.current=null,Xe.current=null,H.current&&(clearTimeout(H.current),H.current=null),fe.current&&(clearInterval(fe.current),fe.current=null),Ae.current&&(cancelAnimationFrame(Ae.current),Ae.current=null)},[]),tt=r.useCallback(async()=>
1{if(!De.current){De.current=!0;try{Bt(!0),H.current&&(clearTimeout(H.current),H.current=null),fe.current&&clearInterval(fe.current);const e=Date.now();for(L.current.size>0&&console.log("[TRANSCRIPT] draining",L.current.size,"pending transcription(s)...");L.current.size>0&&Date.now()-e<er;)await new Promise(n=>setTimeout(n,tr));L.current.size>0&&console.warn("[TRANSCRIPT] drain timed out; flushing partial deltas instead"),m.current&&(clearInterval(m.current),m.current=null);const i=B.current;B.current="",pe(n=>{const u=(n+i).trim();return u&&q(d=>{const f=[...d].reverse().find(W=>W.role==="assistant");if(f&&f.content===u)return d;const S=[...d,{role:"assistant",content:u,timestamp:Date.now()}];return Z.current=S,S}),""});const o=(Ce.current||"").trim(),a=Z.current[Z.current.length-1],c=a?.role==="user"&&a.content.startsWith(o);o&&!c&&(q(n=>{const u=[...n,{role:"user",content:o,timestamp:Date.now()}];return Z.current=u,u}),_e("")),await new Promise(n=>setTimeout(n,100));const l=Z.current.map(({role:n,content:u})=>({role:n,content:u}));sessionStorage.setItem("mock_interview_rtc_events",JSON.stringify(et.current));const p=xt(U.current),g=p?.interviewRoomId||U.current,y=p?.interviewId||ee.current;g&&y&&(U.current=g,ee.current=y,mt(g,y));let P=null;try{Y.current&&Y.current.state!=="inactive"&&(console.log("Stopping audio recording..."),await new Promise(u=>{const d=Y.current.onstop;Y.current.onstop=f=>{d&&d(f),u()},Y.current.stop()}),console.log("Audio recording stopped successfully"));const n=Ye.current;if(n&&n.size>0){const d=ge.current&&ge.current.includes("webm")?"webm":"mp4",f=`conv_interview_${g}_${zt()}.${d}`;console.log("Getting presigned URL for audio upload:",f);const{data:{data:S}}=await $t(f,"smarthire_audio_file",v);console.log("Presigned URL received, uploading to S3...",{fileName:f,size:n.size,mimeType:ge.current});const W=async()=>{try{return await Ot.put(S.url,n,{headers:{"Content-Type":S.type}})}catch(oe){return console.error("S3 upload attempt failed:",oe),{status:null}}};let C=await W();C?.status!==200&&(console.warn("Audio upload failed, retrying once..."),C=await W()),C?.status===200?(P=S?.path,console.log("Audio uploaded successfully to S3:",P)):console.error("Audio upload failed after retry")}}catch(n){console.error("Error uploading interview audio:",n)}const G={interview_type:"mock",interview_room_id:g,interview_id:y,messages:l,conv_interview_audio:P??""};if(console.info("[MockInterview] Submitting report payload:",G),sessionStorage.setItem("mock_interview_last_submit",JSON.stringify(G)),g&&v&&y)if(l.length===0)E("No interview transcript was captured. The report may not be generated.","error");else{g===y&&console.warn("[MockInterview] interview_room_id matches interview_id — submitting anyway"),l.some(n=>n.role==="assistant")||E("Interview questions were not captured. The report may fail to generate.","error");try{const n=await Ht(g,l,v,P,y);console.info("[MockInterview] Report submit response:",n),sessionStorage.setItem("mock_interview_last_submit_response",JSON.stringify(n??null));const u=(n?.msg||"").toLowerCase();u&&u!=="success"&&!u.includes("success")&&E(n?.msg||"Report submission returned an unexpected response.","error")}catch(n){console.error("Error submitting mock interview report:",n),sessionStorage.setItem("mock_interview_last_submit_error",JSON.stringify(n?.response?.data||n?.message||String(n))),E("Failed to submit interview for scoring. Your report may not be available.","error")}}else E("Missing interview session IDs. The report could not be submitted.","error");ue(),await new Promise(n=>setTimeout(n,3e3)),window.scrollTo(0,0),b("/mock-interview/end",{state:{refetchInterviews:!0,jobTitle:T||N||"",interviewRoomId:U.current||"",interviewId:ee.current||""},replace:!0})}catch(e){console.error("Error ending mock interview:",e),ue(),E("Failed to end interview properly. Redirecting...","error"),setTimeout(()=>{b("/mock-interview/end",{state:{jobTitle:T||N||"",interviewRoomId:U.current||"",interviewId:ee.current||""},replace:!0})},2e3)}}},[v,ue,b,E,T,N]);r.useEffect(()=>{k.current=tt},[tt]);const $e=r.useCallback(async()=>
1{if(!(Se||_)){if(!T.trim()){E("Job title is required to start the interview","error");return}ye(!0);try{const i={iceServers:[{urls:"stun:stun.l.google.com:19302"}]},o=new RTCPeerConnection(i);ve.current=o;const a=n=>{!n||n.__mockInterviewHandlersAttached||(n.__mockInterviewHandlersAttached=!0,n.onmessage=u=>{try{const d=JSON.parse(u.data);console.info("[MockInterview] Realtime event:",d?.type,d),gt(d)}catch(d){console.error("Error parsing data channel message:",d)}},n.onerror=u=>{console.error("Data channel error:",u),E("Connection error occurred. Please check your network.","error")},n.onclose=()=>{})};o.ondatachannel=n=>{console.info("[MockInterview] Remote data channel opened:",n.channel?.label),a(n.channel)};const c=o.createDataChannel("oai-events");Be.current=c,a(c),c.onopen=()=>{X(!0),de(!0),c.send(JSON.stringify({type:"session.update",session:{modalities:["audio","text"],output_audio_format:"pcm16",input_audio_transcription:{model:"gpt-4o-transcribe"}}})),c.send(JSON.stringify({type:"session.update",session:{type:"realtime",audio:{input:{transcription:{model:"gpt-4o-transcribe"},turn_detection:{type:"server_vad",threshold:.6,prefix_padding_ms:300,silence_duration_ms:bt,create_response:!0,interrupt_response:!0}}}}})),setTimeout(()=>{Me.current||c.send(JSON.stringify({type:"response.create"}))},1e3),fe.current=setInterval(()=>{Rt(n=>n+1)},1e3)};const l=await navigator.mediaDevices.getUserMedia({audio:{deviceId:I?{exact:I}:void 0,echoCancellation:!0,noiseSuppression:!0,sampleRate:48e3},video:{width:{ideal:391},height:{ideal:249},facingMode:"user"}});if(!ce.current){l.getTracks().forEach(n=>n.stop());return}ae.current&&ae.current.getTracks().forEach(n=>n.stop()),ae.current=l,Re.current&&(Re.current.srcObject=l);const p=new(window.AudioContext||window.webkitAudioContext);ie.current=p,p.state==="suspended"&&p.resume().catch(()=>{});const g=p.createAnalyser();g.fftSize=256,lt.current=g;const y=p.createMediaStreamSource(l);y.connect(g);try{const n=l.getAudioTracks()[0];if(n){const u=n.clone();Ne.current=u;const d=p.createMediaStreamSource(new MediaStream([u])),f=p.createAnalyser();f.fftSize=1024,d.connect(f),Ve.current=f,Xe.current=new Float32Array(f.fftSize)}}catch(n){console.error("[BARGE-IN] failed to create mic monitor:",n)}ze();try{const n=p.createMediaStreamDestination();Ke.current=n,y.connect(n);const u=["audio/mp4","audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus"];let d="";for(const C of u)if(MediaRecorder.isTypeSupported(C)){d=C;break}console.log("Selected recording MIME type:",d||"browser default"),ge.current=d;const f=d?{mimeType:d}:{},S=new MediaRecorder(n.stream,f),W=[];Je.current=W,S.ondataavailable=C=>{C.data.size>0&&W.push(C.data)},S.onstop=()=>{console.log("Finished stopping recording");const C=ge.current||"audio/mp4",oe=new Blob(W,{type:C});console.log("Audio blob created:",{size:oe.size,type:oe.type,recordedAs:ge.current}),Je.current=W,Ye.current=oe},S.onerror=C=>{console.error("Recorder error:",C.error)},console.log("Starting audio recording now..."),S.start(1e3),Y.current=S,console.log("Audio recording started")}catch(n){console.error("Failed to start audio recording:",n)}if(o.signalingState==="closed")throw console.error("Peer connection is closed! Cannot add tracks."),new Error("Peer connection was closed during initialization");l.getTracks().forEach(n=>{o.addTrack(n,l)}),o.ontrack=n=>{const[u]=n.streams,d=new Audio;d.srcObject=u,d.autoplay=!0,we.current=d,d.play().catch(f=>{console.error("Error playing remote audio:",f)});try{const f=ie.current,S=Ke.current;f&&f.state!=="closed"&&S&&!Qe.current&&(f.createMediaStreamSource(u).connect(S),Qe.current=!0)}catch(f){console.error("Failed to mix assistant audio into recording:",f)}};const P=await o.createOffer();await o.setLocalDescription(P);const G=await Lt(P.sdp,{jobTitle:T,jobDescription:K,experienceLevel:Q,language:M,technicalRatio:w,culturalFit:z,interviewRoomId:U.current,interviewType:"mock"},v);await o.setRemoteDescription({type:"answer",sdp:G}),ye(!1)}catch(e){console.error("Error initializing connection:",e),ye(!1),ue(),e.name==="NotAllowedError"||e.name==="NotFoundError"?E("Please allow microphone and camera access to start the interview","error"):e.message?.includes("RTCPeerConnection")||e.message?.includes("RTCIceServer")?E("Network configuration error. Please check your connection and try again.","error"):e.message==="Network Error"?He(!0):e.message?.includes("Peer connection was closed")?E("Connection was interrupted. Please try again.","error"):Le(!0)}}},[Se,_,T,K,Q,M,w,z,V,v,I,gt,ze,E,ue]);return r.useEffect(()=>{Fe.current&&(Fe.current.scrollTop=Fe.current.scrollHeight)},[te,be,re,se,Te]),r.useEffect(()=>{Ue.current&&ze()},[ze]),r.useEffect(()=>{if(Ge.current)return;if(!T.trim()){console.error("Job title is empty or invalid!"),E("Job title is required. Please go back to the previous screen.","error");return}const e=setTimeout(()=>
1{Ge.current||(Ge.current=!0,ce.current&&!qe.current&&$e())},100);return()=>{clearTimeout(e)}},[T,E,$e]),r.useEffect(()=>(ce.current=!0,()=>{ce.current=!1,ue()}),[ue]),t.jsxs("div",{style:{minHeight:"100vh",width:"100%",background:s.background,color:s.textPrimary,fontFamily:"Poppins, sans-serif",position:"relative",overflow:"hidden",transition:"background 0.5s ease, color 0.5s ease"},children:[Ft&&t.jsx(st.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.4,ease:"easeOut"},style:{position:"fixed",inset:0,zIndex:1e4,background:s.background,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",fontFamily:"Poppins, sans-serif"},children:t.jsxs(st.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.15,ease:"easeOut"},style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"28px"},children:[t.jsxs("div",{style:{position:"relative",width:120,height:120},children:[[0,1,2].map(e=>t.jsx("div",{style:{position:"absolute",inset:`${e*14}px`,borderRadius:"50%",border:`2px solid ${s.waveformActive}`,opacity:.6-e*.15,animation:`endingPulse 2s ease-in-out ${e*.3}s infinite`}},e)),t.jsx("div",{style:{position:"absolute",inset:"42px",borderRadius:"50%",background:s.waveformActive,opacity:.25,animation:"endingPulse 2s ease-in-out 0.1s infinite"}})]}),t.jsxs("div",{style:{textAlign:"center"},children:[t.jsx("p",{style:{fontSize:"20px",fontWeight:600,color:s.textPrimary,margin:"0 0 8px 0",transition:"color 0.5s ease"},children:"Wrapping up your interview..."}),t.jsx("p",{style:{fontSize:"14px",fontWeight:400,color:s.textSecondary,margin:0,transition:"color 0.5s ease"},children:"Please wait while we save your responses"})]})]})}),It&&t.jsx(Ut,{onClose:()=>He(!1),onRetry:()=>{He(!1),$e()}}),kt&&t.jsx(qt,{onClose:()=>Le(!1),onRetry:()=>{Le(!1),$e()}}),t.jsxs("div",{style:{width:"100%",maxWidth:"1440px",margin:"0 auto",display:"flex",justifyContent:"space-between",alignItems:"center",padding:"14px 24px",background:s.background,transition:"background 0.5s ease",borderBottom:`1px solid ${s.cardBorder}`},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"13px"},children:[t.jsx("img",{src:he.CommonHeader?.avua_header_logo,alt:"Avua Logo",style:{height:"18px",filter:J>.5?"brightness(0) invert(1)":"none",transition:"filter 0.5s ease"}}),!R&&t.jsxs(t.Fragment,{children:[t.jsx("span",{style:{fontSize:"17.78px",fontWeight:"500",color:s.separatorColor,lineHeight:"1.2",transition:"color 0.5s ease"},children:"|"}),t.jsx("span",{style:{fontSize:"13px",fontWeight:"500",color:s.textSecondary,lineHeight:"1.2",transition:"color 0.5s ease",border:`1px solid ${s.cardBorder}`,padding:"7px 14px",borderRadius:"999px",background:`${s.timerBackground}`},children:"Practice Interview"})]})]}),t.jsxs("div",{className:"flex gap-3",children:[t.jsxs("div",{style:{background:s.timerBackground,borderRadius:"50px",padding:"7px 14px",display:"flex",alignItems:"center",gap:"10px",transition:"background 0.5s ease"},children:[t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:s.textPrimary,strokeWidth:"2",style:{transition:"stroke 0.5s ease"},children:[t.jsx("circle",{cx:"12",cy:"12",r:"10"}),t.jsx("polyline",{points:"12 6 12 12 16 14"})]}),t.jsx("span",{style:{fontSize:"13px",color:s.textPrimary,lineHeight:"1.5",transition:"color 0.5s ease"},children:Jt(We)})]}),t.jsx("button",{style:{background:s.buttonBackground,border:`0.2px solid ${s.buttonBorder}`,borderRadius:"50px",padding:"10px 10px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.5s ease"},onClick:Et,title:je?"Dark (click to force light)":"Light (click to force dark)",children:J>.5?t.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:s.buttonText,strokeWidth:"2",style:{transition:"stroke 0.5s ease"},children:t.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}):t.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:s.buttonText,strokeWidth:"2",style:{transition:"stroke 0.5s ease"},children:[t.jsx("circle",{cx:"12",cy:"12",r:"5"}),t.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),t.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),t.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),t.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),t.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),t.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),t.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),t.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})})]})]}),t.jsxs("div",{style:{width:"100%",maxWidth:"1380px",margin:"0 auto",display:"flex",flexDirection:R?"column":"row",gap:R?"12px":"18px",marginTop:"17px",padding:"16px 16px 140px",boxSizing:"border-box"},children:[t.jsxs("div",{style:{flex:"1",minWidth:0,background:s.transcriptBackgroun
1d,border:`1px solid ${s.transcriptBorder}`,borderRadius:"16px",height:R?"400px":"570px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between",transition:"background 0.5s ease, border-color 0.5s ease",position:"relative",overflow:"hidden"},children:[J>.3&&t.jsx("div",{style:{position:"absolute",right:"-100px",bottom:"-100px",width:"334px",height:"334px",borderRadius:"50%",background:`radial-gradient(circle, rgba(107, 59, 171, ${.3*J}) 0%, transparent 70%)`,pointerEvents:"none",transition:"opacity 0.5s ease"}}),t.jsxs("div",{ref:Fe,className:"scrollbar-hide",style:{width:"100%",maxWidth:"830px",height:R?"342px":"512px",padding:R?"16px":"30px",overflowY:"auto",display:"flex",flexDirection:"column",justifyContent:te.length===0&&!re&&!be&&!se&&Te===0?"center":"flex-start",position:"relative",zIndex:1},children:[te.length===0&&!re&&!be&&!se&&Te===0&&t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:s.textMuted,fontSize:R?"16px":"20px",fontWeight:"500",textAlign:"center",lineHeight:"1.5",transition:"color 0.5s ease"},children:"Waiting for practice conversation to start..."}),te.map((e,i)=>t.jsxs("div",{style:{marginBottom:"20px",animation:"fadeIn 0.3s ease-in",display:"flex",gap:"15px",alignItems:"flex-start"},children:[e.role==="assistant"?t.jsx("div",{style:{width:"31px",height:"31px",borderRadius:"50%",background:J>.5?"rgba(255,255,255,0.1)":"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,boxShadow:"0 2px 8px rgba(107, 59, 171, 0.2)"},children:t.jsx("img",{src:he.conversationalAI.avuaIcon,alt:"Avua AI",style:{width:"16px",height:"16px",objectFit:"contain"}})}):t.jsx("div",{style:{width:"31px",height:"31px",borderRadius:"50%",background:J>.5?"rgba(255,255,255,0.1)":"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,boxShadow:"0 2px 8px rgba(107, 59, 171, 0.2)"},children:t.jsx("img",{src:he.conversationalAI.avuaIcon,alt:"User",style:{width:"16px",height:"16px",objectFit:"contain"}})}),t.jsxs("div",{style:{flex:1},children:[t.jsx("div",{style:nt(e.role==="assistant"?"#6B3BAB":s.textMuted),children:e.role==="assistant"?"AI Interviewer":"You"}),t.jsx("div",{style:{color:s.textTranscript,fontSize:R?"15px":"18px",lineHeight:"1.5",transition:"color 0.5s ease"},children:e.content})]})]},i)),(re||se||Te>0)&&t.jsxs("div",{style:{marginBottom:"20px",opacity:.8,display:"flex",gap:"15px",alignItems:"flex-start"},children:[t.jsx("div",{style:{width:"31px",height:"31px",borderRadius:"50%",background:J>.5?"rgba(255,255,255,0.1)":"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,boxShadow:"0 2px 8px rgba(107, 59, 171, 0.2)"},children:t.jsx("img",{src:he.conversationalAI.avuaIcon,alt:"User",style:{width:"16px",height:"16px",objectFit:"contain"}})}),t.jsxs("div",{style:{flex:1},children:[t.jsxs("div",{style:nt(s.textMuted),children:["You"," ",t.jsx("span",{style:{fontWeight:"400"},children:se?"(speaking…)":"(transcribing…)"})]}),t.jsx("div",{style:{color:s.textTranscript,fontSize:R?"15px":"18px",lineHeight:"1.5",transition:"color 0.5s ease"},children:re||t.jsx("span",{style:{display:"inline-flex",gap:"5px",alignItems:"center",height:"1em"},children:[0,1,2].map(e=>t.jsx("span",{style:{width:"7px",height:"7px",borderRadius:"50%",background:s.textTranscript,display:"inline-block",animation:`listeningDot 1.2s ease-in-out ${e*.2}s infinite`}},e))})})]})]}),be&&t.jsxs("div",{style:{marginBottom:"20px",opacity:.8,display:"flex",gap:"15px",alignItems:"flex-start"},children:[t.jsx("div",{style:{width:"31px",height:"31px",borderRadius:"50%",background:J>.5?"rgba(255,255,255,0.1)":"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,boxShadow:"0 2px 8px rgba(107, 59, 171, 0.2)"},children:t.jsx("img",{src:he.conversationalAI.avuaIcon,alt:"Avua AI",style:{width:"16px",height:"16px",objectFit:"contain"}})}),t.jsxs("div",{style:{flex:1},children:[t.jsx("div",{style:nt("#6B3BAB"),children:"AI Interviewer"}),t.jsxs("div",{style:{color:s.textTranscript,fontSize:R?"15px":"18px",lineHeight:"1.5",transition:"color 0.5s ease"},children:[be,t.jsx("span",{style:{animation:"blink 1s infinite",marginLeft:"2px"},children:"|"})]})]})]})]})]}),t.jsxs("div",{style:{width:R?"100%":"414px",flexShrink:0,display:"flex",flexDirection:R?"row":"column",gap:R?"12px":"18px"}
1,children:[t.jsx("div",{style:{flex:R?"1":"none",background:s.cardBackground,border:`1px solid ${s.cardBorder}`,borderRadius:"16px",height:R?"200px":"275px",padding:"13px",display:"flex",alignItems:"center",justifyContent:"center",position:"relative",transition:"background 0.5s ease, border-color 0.5s ease"},children:t.jsx(rr,{isConnected:_,isSpeaking:se,logoSrc:he.conversationalAI.avuaIcon})}),t.jsx("div",{style:{flex:R?"1":"none",background:s.cardBackground,border:`1px solid ${s.cardBorder}`,borderRadius:"16px",height:R?"200px":"275px",padding:"13px",position:"relative",transition:"background 0.5s ease, border-color 0.5s ease"},children:t.jsxs("div",{style:{width:"100%",height:"100%",background:"#AAAAAA",borderRadius:"13px",display:"flex",alignItems:"center",justifyContent:"center",position:"relative",overflow:"hidden"},children:[t.jsx("video",{ref:Re,autoPlay:!0,playsInline:!0,muted:!0,style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:"13px",transform:"scaleX(-1)"}}),!_&&t.jsx("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"35px",height:"35px",background:"rgba(255, 255, 255, 0.9)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},children:t.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"#2B1845",children:t.jsx("polygon",{points:"5 3 19 12 5 21 5 3"})})})]})})]})]}),t.jsx(Wt,{message:St,type:Tt,isVisible:At,onClose:()=>ct(!1)}),t.jsx("div",{style:{position:"fixed",bottom:"0",left:"0",right:"0px",display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",width:"100%"},children:t.jsxs("div",{className:"w-full mx-auto max-w-[1440px] px-6",children:[t.jsxs("div",{style:{background:s.recordingBarBackground,borderRadius:"10px",padding:"10px",width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",transition:"background 0.5s ease"},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"16px"},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[t.jsx("div",{style:{width:"15px",height:"15px",borderRadius:"50%",background:_?"#FF0000":"#CCC",animation:_?"recordingPulse 1.5s infinite":"none"}}),t.jsx("span",{style:{fontSize:"16px",fontWeight:"600",color:s.textPrimary,lineHeight:"1.2",transition:"color 0.5s ease"},children:"Practice"})]}),t.jsx("div",{style:{width:R?"70px":"140px",height:"15px",overflow:"hidden",display:"flex",alignItems:"center",gap:"2px"},children:[...Array(R?25:40)].map((e,i)=>t.jsx("div",{style:{width:"3px",height:se?`${Math.random()*14+2}px`:`${Math.sin(i*.3)*4+6}px`,background:i<20?s.waveformActive:s.waveformInactive,borderRadius:"1px",transition:"height 0.1s ease, background 0.5s ease"}},i))})]}),t.jsxs("button",{onClick:tt,style:{background:s.buttonBackground,border:`0.2px solid ${s.buttonBorder}`,borderRadius:"50px",padding:"10px 20px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",gap:"10px",transition:"all 0.5s ease"},children:[t.jsx("span",{style:{fontSize:"14px",fontWeight:"500",color:s.buttonText,lineHeight:"1.2",transition:"color 0.5s ease",whiteSpace:"nowrap"},children:"Finish Interview"}),!R&&t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:s.buttonText,strokeWidth:"2",style:{transform:"rotate(180deg) scaleY(-1)",transition:"stroke 0.5s ease"},children:[t.jsx("polyline",{points:"9 10 4 15 9 20"}),t.jsx("path",{d:"M20 4v7a4 4 0 0 1-4 4H4"})]})]})]}),t.jsx("div",{style:{fontSize:"14px",color:s.textMuted,textAlign:"center",width:"100%",lineHeight:"1.5",transition:"color 0.5s ease",padding:"10px 0"},children:"Attention: Please don't refresh this page — your responses will be lost."})]})}),t.jsx("canvas",{ref:Ue,width:391,height:249,style:{display:"none"}}),t.jsx("style",{children:`
2        @keyframes fadeIn {
3          from {
4            opacity: 0;
5            transform: translateY(-5px);
6          }
7          to {
8            opacity: 1;
9            transform: translateY(0);
10          }
11        }
12
13        @keyframes blink {
14          0%, 50% {
15            opacity: 1;
16          }
17          51%, 100% {
18            opacity: 0;
19          }
20        }
21
22        @keyframes pulse {
23          0%, 100% {
24            transform: scale(1);
25            opacity: 0.8;
26          }
27          50% {
28            transform: scale(1.15);
29            opacity: 1;
30          }
31        }
32
33        @keyframes recordingPulse {
34          0%, 100% {
35            opacity: 1;
36          }
37          50% {
38            opacity: 0.4;
39          }
40        }
41
42        @keyframes endingPulse {
43          0%, 100% {
44            transform: scale(1);
45            opacity: 0.6;
46          }
47          50% {
48            transform: scale(1.08);
49            opacity: 1;
50          }
51        }
52
53        @keyframes listeningDot {
54          0%, 60%, 100% {
55            opacity: 0.25;
56            transform: translateY(0);
57          }
58          30% {
59            opacity: 1;
60            transform: translateY(-3px);
61          }
62        }
63
64      `})]})}
64export{cr as default};
65//# sourceMappingURL=ConversationalMockInterviewStart-qBn_0Y4e.js.map

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.