1import{d as z,w as U,af as L,b6 as B,a7 as P,h as A,r as _,c as V,y as C,b7 as M,k as j,aR as D,ae as F,i as W,aC as q,L as N,S as I,b8 as O,$ as G,aI as Y,_ as E,B as H,a,g as n,e as o,b as i,t as m,f as s,E as y,n as v,F as d,p as K,q as k,s as h,o as t}from"./index-DKueJ56C.js";import{U as J}from"./UiButton-D4rLGMnN.js";import{U as Q}from"./UiTextField-ROeT5wsN.js";const X=z({name:"MeetingsRecord",__name:"RecordView",setup(T,{expose:r}){r();const x=U(),e=L(),u=B(),l=_(null),g=_(!1),c=V(()=>l.value?Y.fromSeconds(l.value.started_at||0).toFormat("ccc d LLL, HH:mm"):"");async function b(){var p;const f=await C("POST","meetings/inperson/pending");l.value=((p=f==null?void 0:f.data)==null?void 0:p.pending)||null}async function R(){if(!l.value||g.value)return;g.value=!0;const f=await u.finishPending(l.value);if(g.value=!1,!f){e.error("Could not start the transcription");return}l.value=null}async function S(){!l.value||g.value||(g.value=!0,await C("POST","meetings/inperson/cancel",{id:l.value.id}),g.value=!1,l.value=null)}P(()=>u.phase,f=>{if(f==="recording"&&(l.value=null),f==="done"&&u.meetingId){const p=u.meetingId;setTimeout(()=>{u.reset(),x.push(`/meetings/${p}`)},900)}}),A(()=>{b(),u.loadPool()});const w={router:x,toast:e,rec:u,pending:l,pendingBusy:g,pendingWhen:c,loadPending:b,finishPending:R,discardPending:S,get Mic(){return G},get Square(){return O},get Sparkles(){return I},get Loader2(){return N},get Trash2(){return q},get CheckCircle2(){return W},get AlertTriangle(){return F},get CloudUpload(){return D},get Clock(){return j},get UiButton(){return J},get UiTextField(){return Q},get fmtClock(){return M}};return Object.defineProperty(w,"__isScriptSetup",{enumerable:!1,value:!0}),w}}),Z={class:"max-w-3xl mx-auto py-6"},$={key:0,class:"rounded-2xl border border-amber-200 bg-amber-50 p-5 mb-4 flex items-start gap-3"},ee={class:"flex-1 min-w-0"},re={class:"text-sm text-amber-800 mt-0.5"},te={class:"font-medium"},ae={class:"flex items-center gap-2 mt-3"},ne={class:"rounded-2xl border border-gray-200 bg-white shadow-sm p-8"},ie={key:0,class:"mb-6 flex items-start gap-2 text-sm text-amber-800 bg-amber-50 border border-amber-200 rounded-lg px-3 py-2"},se={key:1,class:"mb-8 max-w-md"},oe={class:"flex flex-col items-center py-4"},le={class:"relative flex items-center justify-center mb-6"},de={key:0,class:"absolute inline-flex h-40 w-40 rounded-full bg-red-400/30 animate-ping"},ce=["disabled"],ge={class:"text-xs font-semibold tracking-wide uppercase"},me={key:4,class:"relative w-36 h-36 rounded-full bg-gray-100 flex items-center justify-center"},ue=["title"],fe={key:1,class:"mt-2 inline-flex items-start gap-1.5 text-sm font-medium text-amber-700 bg-amber-50 border border-amber-200 rounded-lg px-3 py-2"},he={key:3,class:"w-full max-w-sm h-2 rounded-full bg-gray-100 overflow-hidden mt-4"},ye={key:4,class:"mt-5 flex items-start gap-2 text-sm text-amber-800 bg-amber-50 border border-amber-200 rounded-lg px-3 py-2 max-w-md"},be={key:5,class:"flex items-center gap-3 mt-8"},pe={key:6,class:"mt-6"};function ve(T,r,x,e,u,l){const g=H("RouterLink");return t(),a("div",Z,[n(" Unfinished recording found on the server "),e.pending&&e.rec.phase==="idle"?(t(),a("div",$,[o(e.Clock,{size:18,class:"text-amber-600 shrink-0 mt-0.5"}),i("div",ee,[r[8]||(r[8]=i("p",{class:"text-sm font-semibold text-amber-900"},"You have an unfinished recording",-1)),i("p",re,[i("span",te,m(e.pending.title||"In-person meeting"),1),s(", started "+m(e.pendingWhen)+". "+m(e.fmtClock(e.pending.seconds_saved))+" of audio was saved before the page closed. ",1)]),i("div",ae,[o(e.UiButton,{class:"!bg-red-600 hover:!bg-red-700",loading:e.pendingBusy,onClick:e.finishPending},{default:y(()=>[o(e.Sparkles,{size:14}),r[6]||(r[6]=s(" Generate transcript & summary",-1))]),_:1},8,["loading"]),o(e.UiButton,{variant:"secondary",disabled:e.pendingBusy,onClick:e.discardPending},{default:y(()=>[o(e.Trash2,{size:14}),r[7]||(r[7]=s(" Discard",-1))]),_:1},8,["disabled"])])])])):n("v-if",!0),i("div",ne,[r[16]||(r[16]=i("div",{class:"flex items-start justify-between gap-4 mb-8"},[i("div",null,[i("h2",{class:"text-lg font-bold text-gray-900"},"Record an in-person meeting"),i("p",{class:"text-sm text-gray-500 mt-1"}," Put your laptop or phone on the table and press record. You get the full transcript, a summary and next steps, just like a recorded video call. ")])],-1)),n(" Low pool warning (the pool is only checked at start) "),e.rec.poolWarning&&(e.rec.phase==="idle"||e.rec.phase==="error")?(t(),a("div",ie,[o(e.AlertTriangle,{size:15,class:"shrink-0 mt-0.5"}),i("span",null,[s(m(e.rec.poolWarning)+" ",1),o(g,{to:"/upgrade",class:"font-medium underline"},{default:y(()=>[...r[9]||(r[9]=[s("Buy hours",-1)])]),_:1})])])):n("v-if",!0),n(" Title (optional, editable later as well) "),e.rec.phase!=="processing"&&e.rec.phase!=="done"?(t(),a("div",se,[r[10]||(r[10]=i("label",{class:"block text-xs font-medium text-gray-500 mb-1"},"Meeting title",-1)),o(e.UiTextField,{modelValue:e.rec.title,"onUpdate:modelValue":r[0]||(r[0]=c=>e.rec.title=c),placeholder:"e.g. Coffee with Anna, Acme",disabled:e.rec.busy},null,8,["modelValue","disabled"])])):n("v-if",!0),n(" Stage "),i("div",oe,[n(" Level bars "),i("div",{class:v(["h-16 flex items-end gap-1 mb-8",e.rec.isRecording?"opacity-100":"opacity-30"])},[(t(!0),a(d,null,K(e.rec.bars,(c,b)=>(t(),a("span",{key:b,class:v(["w-1.5 rounded-full transition-[height] duration-75",e.rec.isRecording?"bg-red-500":"bg-gray-300"]),style:k({height:Math.round(c*64)+"px"})},null,6))),128))],2),n(" The button "),i("div",le,[e.rec.isRecording?(t(),a("span",de)):n("v-if",!0),e.rec.isRecording?(t(),a("span",{key:1,class:"absolute inline-flex rounded-full bg-red-500/20 transition-transform duration-100",style:k({width:"160px",height:"160px",transform:`scale(${1+e.rec.level*.35})`})},null,4)):n("v-if",!0),e.rec.phase==="idle"||e.rec.phase==="starting"||e.rec.phase==="error"?(t(),a("button",{key:2,type:"button",class:"relative w-36 h-36 rounded-full bg-red-600 hover:bg-red-700 text-white shadow-xl shadow-red-600/30 flex flex-col items-center justify-center gap-1 transition-transform hover:scale-105 disabled:opacity-60 disabled:hover:scale-100",disabled:e.rec.phase==="starting",onClick:r[1]||(r[1]=c=>e.rec.start())},[e.rec.phase==="starting"?(t(),h(e.Loader2,{key:0,size:32,class:"animate-spin"})):(t(),h(e.Mic,{key:1,size:34})),i("span",ge,m(e.rec.phase==="starting"?"Starting":"Record"),1)],8,ce)):e.rec.isRecording?(t(),a("button",{key:3,type:"button",class:"relative w-36 h-36 rounded-full bg-gray-900 hover:bg-black text-white shadow-xl flex flex-col items-center justify-center gap-1 transition-transform hover:scale-105",onClick:r[2]||(r[2]=c=>e.rec.stop())},[o(e.Square,{size:30,class:"fill-current"}),r[11]||(r[11]=i("span",{class:"text-xs font-semibold tracking-wide uppercase"},"Stop",-1))])):(t(),a("div",me,[e.rec.phase==="done"?(t(),h(e.CheckCircle2,{key:0,size:40,class:"text-emerald-500"})):e.rec.busy?(t(),h(e.Loader2,{key:1,size:36,class:"text-gray-500 animate-spin"})):(t(),h(e.Mic,{key:2,size:34,class:"text-gray-400"}))]))]),n(" Timer / state line "),e.rec.isRecording||e.rec.phase==="stopped"?(t(),a("p",{key:0,class:"text-3xl font-bold tabular-nums text-gray-900",title:"Audio captured. Running since "+e.rec.elapsedLabel},m(e.rec.capturedLabel),9,ue)):n("v-if",!0),e.rec.isRecording&&e.rec.captureStalled?(t(),a("p",fe,[o(e.AlertTriangle,{size:14,class:"mt-0.5 shrink-0"}),r[12]||(r[12]=s(" No audio is coming from the microphone. Keep Weezly open and the screen on while recording, otherwise this part of the meeting is lost.",-1))])):n("v-if",!0),i("p",{class:v(["text-sm mt-2",e.rec.isRecording?"text-red-600 font-medium":"text-gray-500"])},[e.rec.phase==="idle"?(t(),a(d,{key:0},[s("Ready when you are. The audio is saved to your account every 2 minutes while you record, and
1you can use the rest of Weezly meanwhile. Do not refresh or close this tab.")],64)):e.rec.phase==="starting"?(t(),a(d,{key:1},[s("Asking for the microphoneâ¦")],64)):e.rec.isRecording?(t(),a(d,{key:2},[s("Recording⦠speak normally, the assistant picks up everyone in the room. You can leave this page, the recording keeps going.")],64)):e.rec.phase==="stopped"?(t(),a(d,{key:3},[s("Recording stopped. Generate the transcript and summary, or discard it.")],64)):e.rec.phase==="uploading"?(t(),a(d,{key:4},[s("Uploading the last part of your recording⦠"+m(e.rec.uploadPct)+"%",1)],64)):e.rec.phase==="processing"?(t(),a(d,{key:5},[s("Transcribing and writing the summary and next steps. This takes a few minutes for a long meeting, you can leave this page.")],64)):e.rec.phase==="done"?(t(),a(d,{key:6},[s("Done. Opening your meetingâ¦")],64)):n("v-if",!0)],2),n(" Saved-so-far line "),e.rec.isRecording||e.rec.phase==="stopped"?(t(),a("p",{key:2,class:v(["text-xs mt-2 inline-flex items-center gap-1.5",e.rec.uploadTrouble?"text-amber-700":"text-gray-400"])},[e.rec.uploadingPart?(t(),h(e.Loader2,{key:0,size:12,class:"animate-spin"})):(t(),h(e.CloudUpload,{key:1,size:12})),e.rec.uploadTrouble?(t(),a(d,{key:2},[s("Could not reach the server, still recording on this device. Keep this tab open.")],64)):e.rec.uploadingPart?(t(),a(d,{key:3},[s("Saving to your accountâ¦")],64)):e.rec.savedSeconds>0?(t(),a(d,{key:4},[s("Saved up to "+m(e.rec.savedLabel),1)],64)):(t(),a(d,{key:5},[s("Saved to your account every 2 minutes")],64))],2)):n("v-if",!0),e.rec.phase==="uploading"?(t(),a("div",he,[i("div",{class:"h-full bg-red-500 transition-all duration-300",style:k({width:e.rec.uploadPct+"%"})},null,4)])):n("v-if",!0),e.rec.errorText?(t(),a("div",ye,[o(e.AlertTriangle,{size:15,class:"shrink-0 mt-0.5"}),i("span",null,m(e.rec.errorText),1)])):n("v-if",!0),n(" Actions after stop "),e.rec.phase==="stopped"?(t(),a("div",be,[o(e.UiButton,{variant:"secondary",onClick:r[3]||(r[3]=c=>e.rec.discard())},{default:y(()=>[o(e.Trash2,{size:14}),r[13]||(r[13]=s(" Discard",-1))]),_:1}),o(e.UiButton,{class:"!bg-red-600 hover:!bg-red-700",onClick:r[4]||(r[4]=c=>e.rec.generate())},{default:y(()=>[o(e.Sparkles,{size:14}),r[14]||(r[14]=s(" Generate transcript & summary",-1))]),_:1})])):e.rec.phase==="error"?(t(),a("div",pe,[o(e.UiButton,{variant:"secondary",onClick:r[5]||(r[5]=c=>e.rec.reset())},{default:y(()=>[...r[15]||(r[15]=[s("Try again",-1)])]),_:1})])):n("v-if",!0)])]),r[17]||(r[17]=i("p",{class:"text-xs text-gray-400 text-center mt-4"}," Recording hours count against your Multichannel pool like video calls. Participants are labelled Speaker 1, 2, ⦠and can be renamed on the meeting page. ",-1))])}const _e=E(X,[["render",ve],["__file","/home/gitlab-runner/weezly-v3/callendo-frontend-v3/src/views/meetings/RecordView.vue"]]);export{_e 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.