PageSourceSearch

https://app.captivet.com/_expo/static/js/web/index-2509be2b78ee0f0fdc01e496ca0a5988.js

js captivet.com collected 2026-10-02 01:25:35 UTC 45,678 bytes, 12 lines download raw bytes

1__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return o}}),r(d[0]);var e,t=r(d[1]),n=((e=t)&&e.__esModule,r(d[2])),u=r(d[3]);function o(){return(0,u.jsx)(n.TodayScreen,{})}},1759,[104,1760,1765,2]);
2__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return z}});var s=r(d[0]),t=r(d[1]),n=r(d[2]),l=e(r(d[3]));r(d[4]);var o=e(r(d[5])),c=e(r(d[6])),p=r(d[7]),u=r(d[8]),f=r(d[9]),x=r(d[10]),h=r(d[11]),j=r(d[12]),A=r(d[13]),y=r(d[14]),b=r(d[15]),v=r(d[16]);const R={trial:'Trial',active:'Active',past_due:'Past Due',canceled:'Canceled'},w={active:{label:'Active',solid:'#22c55e',gradient:'linear-gradient(135deg, #22c55e, #16a34a)'},past_due:{label:'Past Due',solid:'#ef4444',gradient:'linear-gradient(135deg, #ef4444, #dc2626)'},canceled:{label:'Canceled',solid:'#78716c',gradient:'linear-gradient(135deg, #78716c, #57534e)'}};function S(){const e=(new Date).getHours();return e<12?'Good morning':e<17?'Good afternoon':'Good evening'}function z(){const{user:e,organization:z}=(0,h.useAuth)(),T=(0,j.useApi)(),[N,C]=(0,n.useState)(!1),{isWizardOpen:k}=(0,b.useOnboardingWizard)(),I='owner'===e?.role||'admin'===e?.role,O='support_staff'===e?.role,{data:D,isLoading:E,error:L,refetch:P}=(0,u.useQuery)({queryKey:['dashboard','stats',z?.id],queryFn:()=>T.organizations.getDashboardStats()});if(E)return(0,v.jsx)(f.LoadingState,{message:"Loading dashboard...",fullScreen:!0});const _=D?.recentRecordings??[],U=D?.me?.totalTranscribedSeconds??0,B=Math.min(100,Math.round(U/36e4*100)),$=D?.me?.estimatedTimeSavedSeconds??0,M=(D?.me?.daily??[]).slice(-7).map(e=>e.recordings),W=M.some(e=>e>0),G=D?.billing?.status??'trial',F=D?.billing?.trialDaysRemaining??null,q=D?.billing?.notesDuringTrial??0,H=null!==F?Math.min(100,Math.max(0,Math.round((x.LIMITS.TRIAL_DURATION_DAYS-F)/x.LIMITS.TRIAL_DURATION_DAYS*100))):0,V=R[G]??G,Y=e?.fullName||'there',K=[];if(D?.attention){const e=D.attention;e.failedRecordings>0&&K.push({key:'failed',count:e.failedRecordings,label:`${e.failedRecordings} failed recording${1===e.failedRecordings?'':'s'} to review`,icon:'alert-triangle',color:'#dc2626',variant:'error',href:`${x.ROUTES.RECORDS}?status=failed`}),e.draftsAwaitingDetails>0&&K.push({key:'drafts',count:e.draftsAwaitingDetails,label:`${e.draftsAwaitingDetails} recording${1===e.draftsAwaitingDetails?'':'s'} awaiting patient details`,icon:'clock',color:'#d97706',variant:'warning',href:`${x.ROUTES.RECORDS}?status=pending_metadata`}),e.unexportedNotes>0&&K.push({key:'unexported',count:e.unexportedNotes,label:`${e.unexportedNotes} completed note${1===e.unexportedNotes?'':'s'} not yet exported`,icon:'upload',color:'#0ea5e9',variant:'info',href:`${x.ROUTES.RECORDS}?status=completed`}),e.openTasks>0&&K.push({key:'tasks',count:e.openTasks,label:`${e.openTasks} open task${1===e.openTasks?'':'s'}`,icon:'list-checks',color:'#0d8775',variant:'default',href:x.ROUTES.TASKS})}const Q='vmg-48'===z?.settings?.cohort,J=['Record or upload an appointment','CaptiVet transcribes the audio','Review, edit, and export the SOAP note',...I?['Invite your team from Settings']:[],'Install the mobile app or Chrome extension when ready'];return(0,v.jsxs)(f.AppStack,{spacing:24,className:'stagger-children',children:[(0,v.jsxs)(l.default,{className:"rounded-2xl p-6 overflow-hidden",style:[{backgroundImage:'linear-gradient(135deg, #0d8775 0%, #14a890 50%, #0f766e 100%)',minHeight:180,position:'relative'},!1],children:[(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(l.default,{style:{position:'absolute',top:-20,right:-20,width:200,height:200,borderRadius:f.clinicalTokens.radius.pill,backgroundColor:'rgba(14, 165, 233, 0.15)',filter:'blur(60px)'}}),(0,v.jsx)(l.default,{style:{position:'absolute',bottom:-30,left:-20,width:180,height:180,borderRadius:f.clinicalTokens.radius.pill,backgroundColor:'rgba(245, 158, 11, 0.12)',filter:'blur(50px)'}})]}),(0,v.jsxs)(l.default,{className:"flex-row justify-between items-start",style:{position:'relative',zIndex:1},children:[(0,v.jsxs)(l.default,{style:{flex:1},children:[(0,v.jsxs)(o.default,{style:{color:'rgba(255,255,255,0.8)',fontSize:15,marginBottom:4},children:[S(),","]}),(0,v.jsx)(o.default,{role:"heading","aria-level":1,style:[{color:'#ffffff',fontSize:26,fontWeight:'700',marginBottom:Q?8:16},{fontFamily:"'Plus Jakarta Sans', sans-serif"}],children:Y}),Q&&(0,v.jsx)(l.default,{style:{alignSelf:'flex-start',marginBottom:16},children:(0,v.jsx)(f.AppBadge,{variant:"info",children:"Free via VMG-48"})}),!O&&$>0&&(0,v.jsxs)(f.AppRow,{spacing:6,align:"center",style:{marginBottom:16},children:[(0,v.jsx)(f.AppIcon,{name:"clock",size:14,color:"rgba(255,255,255,0.85)"}),(0,v.jsxs)(o.default,{style:{color:'rgba(255,255,255,0.9)',fontSize:14},children:["You've saved ~",(0,s.formatDuration)($)," on notes this month",(0,v.jsxs)(o.default,{style:{color:'rgba(255,255,255,0.6)',fontSize:12},children:['  ',"est. ",x.TIME_SAVED_MINUTES_PER_NOTE," min/note"]})]})]}),'support_staff'!==e?.role?(0,v.jsxs)(f.AppRow,{spacing:12,children:[(0,v.jsx)(p.Link,{href:x.ROUTES.UPLOAD,asChild:!0,children:(0,v.jsx)(f.AppButton,{variant:"outline",size:"md",style:{backgroundColor:'rgba(255,255,255,0.18)',borderColor:'rgba(255,255,255,0.30)'},children:(0,v.jsxs)(f.AppRow,{spacing:6,align:"center",children:[(0,v.jsx)(f.AppIcon,{name:"upload",size:16,color:"#ffffff"}),(0,v.jsx)(o.default,{style:{color:'#ffffff',fontWeight:'600',fontSize:14},children:"Upload"})]})})}),(0,v.jsx)(p.Link,{href:x.ROUTES.RECORD,asChild:!0,children:(0,v.jsx)(f.AppButton,{variant:"outline",size:"md",style:{backgroundColor:'rgba(255,255,255,0.18)',borderColor:'rgba(255,255,255,0.30)'},children:(0,v.jsxs)(f.AppRow,{spacing:6,align:"center",children:[(0,v.jsx)(f.AppIcon,{name:"mic",size:16,color:"#ffffff"}),(0,v.jsx)(o.default,{style:{color:'#ffffff',fontWeight:'600',fontSize:14},children:"Record"})]})})})]}):(0,v.jsxs)(f.AppRow,{spacing:6,align:"center",children:[(0,v.jsx)(f.AppIcon,{name:"clipboard-copy",
2size:16,color:"rgba(255,255,255,0.8)"}),(0,v.jsx)(o.default,{style:{color:'rgba(255,255,255,0.8)',fontSize:14},children:"View recordings and copy SOAP notes"})]})]}),(0,v.jsx)(l.default,{className:"rounded-2xl items-center justify-center",style:[{width:60,height:60,backgroundColor:'rgba(255,255,255,0.12)',borderWidth:1,borderColor:'rgba(255,255,255,0.18)'},{backdropFilter:'blur(12px)',WebkitBackdropFilter:'blur(12px)'}],children:(0,v.jsx)(f.AppIcon,{name:"stethoscope",size:30,color:"rgba(255,255,255,0.85)"})})]})]}),0===_.length&&!N&&'support_staff'!==e?.role&&(0,v.jsx)(f.AppCard,{variant:"outlined",padding:"lg",children:(0,v.jsxs)(l.default,{style:{position:'relative'},children:[(0,v.jsx)(c.default,{onPress:()=>C(!0),style:{position:'absolute',top:-4,right:-4,padding:4,zIndex:1},children:(0,v.jsx)(f.AppIcon,{name:"x",size:18,color:"#a8a29e"})}),(0,v.jsxs)(f.AppStack,{spacing:16,children:[(0,v.jsxs)(f.AppRow,{spacing:10,align:"center",children:[(0,v.jsx)(l.default,{className:"w-10 h-10 rounded-xl items-center justify-center",style:{backgroundColor:'rgba(20, 168, 144, 0.1)'},children:(0,v.jsx)(f.AppIcon,{name:"compass",size:20,color:"#0d8775"})}),(0,v.jsx)(f.AppHeading,{level:3,children:"Create your first SOAP note"})]}),(0,v.jsx)(f.AppStack,{spacing:12,children:J.map((e,s)=>(0,v.jsxs)(f.AppRow,{spacing:12,align:"center",children:[(0,v.jsx)(l.default,{className:"w-7 h-7 rounded-full items-center justify-center",style:{backgroundColor:'#0d8775'},children:(0,v.jsx)(o.default,{style:{color:'#ffffff',fontSize:13,fontWeight:'700'},children:s+1})}),(0,v.jsx)(f.AppText,{size:"sm",style:{flex:1},children:e})]},s))}),(0,v.jsxs)(f.AppRow,{spacing:12,children:[(0,v.jsx)(p.Link,{href:x.ROUTES.RECORD,asChild:!0,children:(0,v.jsx)(f.AppButton,{children:(0,v.jsxs)(f.AppRow,{spacing:6,align:"center",children:[(0,v.jsx)(f.AppIcon,{name:"mic",size:16,color:"#ffffff"}),(0,v.jsx)(o.default,{style:{color:'#ffffff',fontWeight:'600',fontSize:14},children:"Record an Appointment"})]})})}),(0,v.jsx)(p.Link,{href:x.ROUTES.UPLOAD,asChild:!0,children:(0,v.jsx)(f.AppButton,{variant:"outline",children:(0,v.jsxs)(f.AppRow,{spacing:6,align:"center",children:[(0,v.jsx)(f.AppIcon,{name:"upload",size:16,color:"#0d8775"}),(0,v.jsx)(o.default,{style:{color:'#0f766e',fontWeight:'600',fontSize:14},children:"Upload Audio"})]})})})]})]})]})}),'support_staff'!==e?.role&&!k&&(0,v.jsx)(A.OnboardingChecklist,{isTrial:'trial'===D?.billing?.status}),L&&(0,v.jsx)(f.AppCard,{variant:"outlined",padding:"md",children:(0,v.jsxs)(f.AppRow,{justify:"between",align:"center",children:[(0,v.jsxs)(f.AppRow,{spacing:10,align:"center",style:{flex:1},children:[(0,v.jsx)(f.AppIcon,{name:"alert-circle",size:18,color:"#d97706"}),(0,v.jsx)(f.AppText,{variant:"muted",size:"sm",style:{flex:1},children:"Usage stats are unavailable right now \u2014 recordings and notes still work."})]}),(0,v.jsx)(f.AppButton,{variant:"outline",size:"sm",onPress:()=>P(),children:(0,v.jsx)(f.AppText,{weight:"semibold",size:"sm",children:"Retry"})})]})}),!L&&(0,v.jsxs)(l.default,{style:{display:'grid',gridTemplateColumns:'repeat(3, 1fr)',gap:20},className:'',children:[!O&&(0,v.jsxs)(f.AppCard,{variant:"glass",padding:"md",className:"flex-1 hover-lift",style:{gridColumn:'span 2',background:'linear-gradient(135deg, rgba(13, 135, 117, 0.03) 0%, rgba(14, 165, 233, 0.02) 100%)'},children:[(0,v.jsxs)(f.AppRow,{spacing:12,align:"center",children:[(0,v.jsx)(l.default,{className:"w-10 h-10 rounded-xl items-center justify-center",style:{backgroundColor:'rgba(20, 168, 144, 0.1)'},children:(0,v.jsx)(f.AppIcon,{name:"activity",size:20,color:"#0d8775"})}),(0,v.jsxs)(l.default,{style:{flex:1},children:[(0,v.jsx)(f.AppText,{variant:"muted",size:"sm",children:"Your Audio Transcribed (30 days)"}),(0,v.jsx)(f.AnimatedCounter,{value:U,formatFn:s.formatDuration,style:{fontWeight:'700',fontSize:18},className:'animate-count-up'})]})]}),W&&(0,v.jsx)(f.Sparkline,{data:M,className:"mt-3"}),(0,v.jsx)(l.default,{className:"mt-3",children:(0,v.jsx)(f.AnimatedProgressBar,{progress:B,height:8,colorClass:"bg-primary-500",glow:!1})}),(0,v.jsxs)(l.default,{className:"mt-3 flex-row justify-between",children:[(0,v.jsxs)(f.AppText,{variant:"muted",size:"sm",children:[D?.me?.recordingsCompleted??0," recordings"]}),(0,v.jsxs)(f.AppText,{variant:"muted",size:"sm",children:["avg ",(0,s.formatDuration)(D?.me?.averageDurationSeconds??0)]})]})]}),(0,v.jsxs)(f.AppCard,{variant:"glass",padding:"md",className:"flex-1 hover-lift",children:[(0,v.jsxs)(f.AppRow,{spacing:12,align:"center",children:[(0,v.jsx)(l.default,{className:"w-10 h-10 rounded-xl items-center justify-center",style:{backgroundColor:'rgba(245, 158, 11, 0.1)'},children:(0,v.jsx)(f.AppIcon,{name:"credit-card",size:20,color:"#d97706"})}),(0,v.jsxs)(l.default,{style:{flex:1},children:[(0,v.jsx)(f.AppText,{variant:"muted",size:"sm",children:"Plan"}),(0,v.jsxs)(f.AppRow,{spacing:8,align:"center",children:[(0,v.jsx)(f.AppText,{weight:"bold",size:"lg",className:'animate-count-up',children:V}),(()=>{const e=w[G];return e?(0,v.jsx)(l.default,{className:"px-2 py-0.5 rounded-full",style:{backgroundImage:e.gradient},children:(0,v.jsx)(o.default,{style:{color:'#fff',fontSize:11,fontWeight:'600'},children:e.label})}):null})()]})]})]}),'trial'===G&&null!==F&&(0,v.jsxs)(l.default,{className:"mt-3",children:[(0,v.jsx)(f.AnimatedProgressBar,{progress:H,height:6,colorClass:"bg-amber-500",glow:!1}),(0,v.jsxs)(f.AppText,{variant:"muted",size:"sm",className:"mt-2",children:[0===F?'Trial ends today':`${F} day${1===F?'':'s'} left in your trial`,D?.billing?.trialEndsAt?` \xb7 ends ${new Date(D.billing.trialEndsAt).toLocaleDateString()}`:'']}),q>0&&(0,v.jsxs)(f.AppText,{variant:"muted",size:"sm",children:[q," SOAP note",1===q?'':'s'," created during your trial"]})]})]}),!O&&(0,v.jsx)(f.AppCard,{variant:"glass",padding:"md",className:"flex-1 hover-lift",children:(0,v.jsxs)(f.AppRow,{spacing:12,align:"center",children:[(0,v.jsx)(l.default,{className:"w-10 h-10 rounded-xl items-center justify-center",style:{backgroundColor:'rgba(14, 165, 233, 0.1)'},children:(0,v.jsx)(f.AppIcon,{name:"file-text",size:20,color:"#0ea5e9"})}),(0,v.jsxs)(l.default,{style:{flex:1},children:[(0,v.jsx)(f.AppText,{variant:"muted",size:"sm",children:"Your SOAP Notes (30 days)"}),(0,v.jsx)(f.AnimatedCounter,{value:D?.me?.soapNotesGenerated??0,style:{fontWeight:'700',fontSize:18},className:'animate-count-up'}),0===(D?.me?.soapNotesGenerated??0)&&(0,v.jsx)(f.AppText,{variant:"muted",size:"sm",children:"Generated automatically from recordings"})]})]})})]}),K.length>0&&(0,v.jsx)(f.AppCard,{children:(0,v.jsxs)(f.AppStack,{spacing:12,children:[(0,v.jsxs)(f.AppRow,{spacing:10,align:"center",children:[(0,v.jsx)(l.default,{className:"w-10 h-10 rounded-xl items-center justify-center",style:{backgroundColor:'rgba(245, 158, 11, 0.1)'},children:(0,v.jsx)(f.AppIcon,{name:"alert-triangle",size:20,color:"#d97706"})}),(0,v.jsx)(f.AppHeading,{level:3,children:"Needs Attention"})]}),(0,v.jsx)(f.AppStack,{spacing:8,children:K.map(e=>(0,v.jsx)(p.Link,{href:e.href,asChild:!0,children:(0,v.jsx)(f.AppCard,{variant:"outlined",padding:"sm",onPress:()=>{},className:'hover-lift',children:(0,v.jsxs)(f.AppRow,{justify:"between",align:"center",children:[(0,v.jsxs)(f.AppRow,{spacing:12,align:"center",style:{flex:1},children:[(0,v.jsx)(f.AppIcon,{name:e.icon,size:18,color:e.color}),(0,v.jsx)(f.AppText,{size:"sm",style:{flex:1},children:e.label})]}),(0,v.jsxs)(f.AppRow,{spacing:8,align:"center",children:[(0,v.jsx)(f.AppBadge,{variant:e.variant,children:`${e.count}`}),(0,v.jsx)(f.AppIcon,{name:"chevron-right",size:16,color:"#a8a29e"})]})]})})},e.key))})]})}),D?.org&&D?.team&&(0,v.jsxs)(l.default,{style:{display:'grid',gridTemplateColumns:'repeat(2, 1fr)',gap:20},className:'',children:[(0,v.jsxs)(f.AppCard,{variant:"glass",padding:"md",className:"flex-1 hover-lift",children:[(0,v.jsxs)(f.AppRow,{spacing:12,align:"center",children:[(0,v.jsx)(l.default,{className:"w-10 h-10 rounded-xl items-center justify-center",style:{backgroundColor:'rgba(20, 168, 144, 0.1)'},children:(0,v.jsx)(f.AppIcon,{name:"building-2",size:20,color:"#0d8775"})}),(0,v.jsxs)(l.default,{style:{flex:1},children:[(0,v.jsx)(f.AppText,{variant:"muted",size:"sm",children:"Practice (30 days)"}),(0,v.jsx)(f.AnimatedCounter,{value:D.org.soapNotesGenerated,formatFn:e=>`${Math.round(e)} SOAP notes`,style:{fontWeight:'700',fontSize:18},className:'animate-count-up'})]})]}),D.org.daily.some(e=>e.recordings>0)&&(0,v.jsx)(f.Sparkline,{data:D.org.daily.map(e=>e.recordings),className:"mt-3"}),(0,v.jsxs)(l.default,{className:"mt-3",children:[(0,v.jsxs)(f.AppRow,{justify:"between",children:[(0,v.jsxs)(f.AppText,{variant:"muted",size:"sm",children:[(0,s.formatDuration)(D.org.totalTranscribedSeconds)," transcribed"]}),(0,v.jsxs)(f.AppText,{variant:"muted",size:"sm",children:["~",(0,s.formatDuration)(D.org.estimatedTimeSavedSeconds)," saved"]})]}),null!==D.org.exportRate&&(0,v.jsxs)(f.AppText,{variant:"muted",size:"sm",className:"mt-1",children:[Math.round(100*D.org.exportRate),"% of notes exported"]})]})]}),(0,v.jsxs)(f.AppCard,{variant:"glass",padding:"md",className:"flex-1 hover-lift",children:[(0,v.jsxs)(f.AppRow,{spacing:12,align:"center",children:[(0,v.jsx)(l.default,{className:"w-10 h-10 rounded-xl items-center justify-center",style:{backgroundColor:'rgba(99, 102, 241, 0.1)'},children:(0,v.jsx)(f.AppIcon,{name:"users",size:20,color:"#6366f1"})}),(0,v.jsxs)(l.default,{style:{flex:1},children:[(0,v.jsx)(f.AppText,{variant:"muted",size:"sm",children:"Team Activity (30 days)"}),(0,v.jsxs)(f.AppText,{weight:"bold",size:"lg",children:[D.team.activeMembers," member",1===D.team.activeMembers?'':'s']})]})]}),(0,v.jsx)(f.AppStack,{spacing:6,className:"mt-3",children:D.team.members.slice(0,5).map(e=>(0,v.jsxs)(f.AppRow,{justify:"between",align:"center",children:[(0,v.jsxs)(l.default,{style:{flex:1},children:[(0,v.jsx)(f.AppText,{weight:"semibold",size:"sm",children:e.fullName}),(0,v.jsx)(f.AppText,{variant:"muted",size:"sm",children:x.ROLE_LABELS[e.role]??e.role})]}),(0,v.jsxs)(l.default,{style:{alignItems:'flex-end'},children:[(0,v.jsxs)(f.AppText,{weight:"semibold",size:"sm",children:[e.notesLast30d," note",1===e.notesLast30d?'':'s']}),(0,v.jsx)(f.AppText,{variant:"muted",size:"sm",children:(0,s.formatLastActive)(e.lastRecordingAt)})]})]},e.id))}),D.team.pendingInvitations>0&&(0,v.jsx)(p.Link,{href:x.ROUTES.SETTINGS_ORGANIZATION,asChild:!0,children:(0,v.jsx)(c.default,{children:(0,v.jsxs)(f.AppRow,{spacing:6,align:"center",className:"mt-3",children:[(0,v.jsx)(f.AppIcon,{name:"mail",size:14,color:"#d97706"}),(0,v.jsxs)(f.AppText,{size:"sm",style:{color:'#d97706'},children:[D.team.pendingInvitations," invitation",1===D.team.pendingInvitations?'':'s'," pending"]})]})})})]})]}),(0,v.jsx)(f.AppCard,{children:(0,v.jsxs)(f.AppStack,{spacing:16,children:[(0,v.jsxs)(f.AppRow,{justify:"between",align:"center",children:[(0,v.jsx)(f.AppHeading,{level:3,children:"Recent Recordings"}),(0,v.jsx)(p.Link,{href:x.ROUTES.RECORDS,asChild:!0,children:(0,v.jsx)(f.AppButton,{variant:"ghost",size:"sm",children:(0,v.jsxs)(f.AppRow,{spacing:4,align:"center",className:'group',children:[(0,v.jsx)(f.AppText,{className:"text-primary-700",weight:"semibold",size:"sm",children:"View All"}),(0,v.jsx)(l.default,{style:{transition:'transform 0.2s ease'},children:(0,v.jsx)(f.AppIcon,{name:"chevron-right",size:14,color:"#0d8775"})})]})})})]}),0===_.length?(0,v.jsx)(f.EmptyState,{icon:"file-text",title:"No recordings yet",description:"Upload or record your first veterinary appointment to get started.",action:(0,v.jsx)(p.Link,{href:x.ROUTES.UPLOAD,asChild:!0,children:(0,v.jsx)(f.AppButton,{children:"Upload Recording"})})}):(0,v.jsx)(f.AppStack,{spacing:8,className:'stagger-children',children:_.map(e=>{const s={draft:'Draft',pending_metadata:'Awaiting Details',uploading:'Uploading',uploaded:'Processing',transcribing:'Transcribing',transcribed:'Generating',generating:'Generating',retry_scheduled:'Retrying soon',completed:'Ready',failed:'Failed'}[e.status]||e.status;return(0,v.jsx)(p.Link,{href:(0,x.buildRecordDetailUrl)(e.id),asChild:!0,children:(0,v.jsx)(f.AppCard,{variant:"outlined",padding:"sm",onPress:()=>{},className:'hover-lift',style:{borderLeftWidth:3,borderLeftColor:'transparent',transition:'border-left-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease'},children:(0,v.jsxs)(f.AppRow,{justify:"between",align:"center",children:[(0,v.jsxs)(f.AppRow,{spacing:12,align:"center",style:{flex:1},children:[(0,v.jsx)(l.default,{className:"w-9 h-9 rounded-lg items-center justify-center",style:{backgroundColor:'rgba(20, 168, 144, 0.08)'},children:(0,v.jsx)(f.AppIcon,{name:"file-text",size:18,color:"#0d8775"})}),(0,v.jsxs)(l.default,{style:{flex:1},children:[(0,v.jsx)(f.AppText,{weight:"semibold",children:(0,y.displayPatientName)(e.patientName)}),(0,v.jsxs)(f.AppText,{variant:"muted",size:"sm",children:[e.species," ",e.breed&&`\xb7 ${e.breed}`]})]})]}),(0,v.jsx)(f.AppBadge,{variant:'completed'===e.status?'success':'failed'===e.status?'error':'pending_metadata'===e.status?'warning':'info',children:s})]})})},e.id)})})]})}),D?.quality&&(0,v.jsx)(t.QualityAnalyticsPanel,{quality:D.quality})]})}},1760,[1761,1762,3,109,104,188,242,736,1074,1494,480,970,1686,1763,1764,1685,2]);
3__d(function(g,r,i,a,m,e,d){"use strict";
3Object.defineProperty(e,'__esModule',{value:!0}),e.formatDuration=function(t){if(0===t)return'0 min';const n=Math.floor(t/3600),o=Math.floor(t%3600/60);if(n>0)return`${n}h ${o}m`;const u=t%60;return 0===u?`${o} min`:`${o}m ${u}s`},e.formatLastActive=function(t){if(!t)return'No recordings';const n=Math.floor((Date.now()-new Date(t).getTime())/864e5);return n<=0?'Today':1===n?'Yesterday':`${n}d ago`},e.formatRate=function(t){return null===t?'n/a':`${Math.round(100*t)}%`}},1761,[]);
4__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.QualityAnalyticsPanel=function({quality:e}){const s=!!e.org&&p(e.org)||p(e.me)||(e.byProvider?.some(p)??!1);return(0,c.jsx)(l.AppCard,{children:(0,c.jsxs)(l.AppStack,{spacing:16,children:[(0,c.jsxs)(l.AppRow,{spacing:10,align:"center",children:[(0,c.jsx)(t.default,{className:"w-10 h-10 rounded-xl items-center justify-center",style:{backgroundColor:'rgba(13, 135, 117, 0.1)'},children:(0,c.jsx)(l.AppIcon,{name:"check-circle",size:20,color:"#0d8775"})}),(0,c.jsx)(l.AppHeading,{level:3,children:"Clinic Quality"})]}),s?(0,c.jsxs)(c.Fragment,{children:[e.org&&(0,c.jsx)(x,{title:"Practice",summary:e.org}),(0,c.jsx)(x,{title:"You",summary:e.me}),e.byProvider&&e.byProvider.length>0&&(0,c.jsxs)(l.AppStack,{spacing:8,children:[(0,c.jsx)(l.AppText,{variant:"muted",size:"sm",weight:"semibold",children:"Providers"}),e.byProvider.slice(0,6).map(e=>(0,c.jsx)(j,{provider:e},e.userId))]})]}):(0,c.jsx)(l.AppText,{variant:"muted",children:"No clinic quality data yet."})]})})};var e,s=r(d[0]),t=(e=s)&&e.__esModule?e:{default:e};r(d[1]);
4var l=r(d[2]),n=r(d[3]),o=r(d[4]),c=r(d[5]);function p(e){return e.completedRecordings>0||e.failedUploadAttempts>0||e.silentAudioEvents>0||e.reprocessCount>0||e.soapEditedCount>0||e.missingMetadataCount>0}function u({label:e,value:s}){return(0,c.jsxs)(l.AppRow,{justify:"between",align:"center",children:[(0,c.jsx)(l.AppText,{variant:"muted",size:"sm",style:{flex:1},children:e}),(0,c.jsx)(l.AppText,{weight:"semibold",size:"sm",children:s})]})}function x({title:e,summary:s}){return(0,c.jsxs)(t.default,{children:[(0,c.jsxs)(l.AppRow,{spacing:8,align:"center",className:"mb-2",children:[(0,c.jsx)(l.AppBadge,{variant:"info",children:e}),s.failedUploadAttempts+s.silentAudioEvents+s.missingMetadataCount>0&&(0,c.jsx)(l.AppBadge,{variant:"warning",children:"Needs review"})]}),(0,c.jsxs)(t.default,{style:{display:'grid',gridTemplateColumns:'repeat(auto-fit, minmax(min(100%, 240px), 1fr))',gap:8},className:'',children:[(0,c.jsx)(u,{label:"Completed",value:s.completedRecordings}),(0,c.jsx)(u,{label:"Avg length",value:(0,o.formatDuration)(s.averageRecordingLengthSeconds)}),(0,c.jsx)(u,{label:"Upload issues",value:s.failedUploadAttempts}),(0,c.jsx)(u,{label:"Silent audio",value:s.silentAudioEvents}),(0,c.jsx)(u,{label:"Reprocess rate",value:(0,o.formatRate)(s.reprocessRate)}),(0,c.jsx)(u,{label:"SOAP edit rate",value:(0,o.formatRate)(s.soapEditRate)}),(0,c.jsx)(u,{label:"Missing details",value:(0,o.formatRate)(s.missingMetadataRate)}),(0,c.jsx)(u,{label:"P90 processing",value:null===s.processingLatencyP90Seconds?'n/a':(0,o.formatDuration)(s.processingLatencyP90Seconds)})]})]})}function j({provider:e}){const s=e.failedUploadAttempts+e.silentAudioEvents+e.missingMetadataCount;return(0,c.jsxs)(l.AppRow,{justify:"between",align:"center",children:[(0,c.jsxs)(t.default,{style:{flex:1},children:[(0,c.jsx)(l.AppText,{weight:"semibold",size:"sm",children:e.fullName}),(0,c.jsxs)(l.AppText,{variant:"muted",size:"sm",children:[n.ROLE_LABELS[e.role]??e.role," \xb7",' ',(0,o.formatLastActive)(e.lastRecordingAt)]})]}),(0,c.jsxs)(t.default,{style:{alignItems:'flex-end'},children:[(0,c.jsxs)(l.AppText,{weight:"semibold",size:"sm",children:[e.completedRecordings," recording",1===e.completedRecordings?'':'s']}),(0,c.jsxs)(l.AppText,{variant:"muted",size:"sm",children:[s," issue",1===s?'':'s']})]})]})}},1762,[109,104,1494,480,1761,2]);
5__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.useOnboardingChecklistVisible=function(e){const n=(0,l.useApi)(),{data:s}=(0,o.useQuery)({queryKey:['user-preferences'],queryFn:()=>n.users.getPreferences(),enabled:e}),{data:t}=(0,o.useQuery)({queryKey:['organization','credential-status'],queryFn:()=>n.organizations.getCredentialStatus()}),c=s?.onboarding?.dismissed??!1;return!!t&&(!t.canProcessRecordings&&(!c||!e||0!==t.missingRequiredServices.length))},_e.OnboardingChecklist=function({isTrial:e}){const u=(0,l.useApi)(),h=(0,o.useQueryClient)(),{data:f}=(0,o.useQuery)({queryKey:['user-preferences'],queryFn:()=>u.users.getPreferences(),enabled:e}),y=f?.onboarding?.dismissed??!1,{data:x}=(0,o.useQuery)({queryKey:['organization','credential-status'],queryFn:()=>u.organizations.getCredentialStatus()}),{data:b}=(0,o.useQuery)({queryKey:['organization','contact'],queryFn:()=>u.organizations.getContact(),enabled:Boolean(x)&&!1===x?.canManageCredentials}),A=(0,o.useMutation)({mutationFn:()=>u.users.updatePreferences({onboarding:{dismissed:!0}}),onMutate:async()=>{await h.cancelQueries({queryKey:['user-preferences']});const e=h.getQueryData(['user-preferences']);return h.setQueryData(['user-preferences'],e=>({...e??{},onboarding:{...e?.onboarding??{},dismissed:!0}})),{previous:e}},onError:(e,n,s)=>{s?.previous&&h.setQueryData(['user-preferences'],s.previous)},onSettled:()=>{h.invalidateQueries({queryKey:['user-preferences']})}});if(!x)return null;if(x.canProcessRecordings)return null;if(y&&e&&0===x.missingRequiredServices.length)return null;const j='vmg-48'===x.cohort,v={deepgram:'Deepgram',gemini:'Gemini',openai:'OpenAI',anthropic:'Anthropic',z_ai:'Z.ai (GLM-5.2)',meta:'Meta (Muse Spark)'},k={deepgram:'mic',gemini:'sparkles',openai:'key',anthropic:'shield',z_ai:'sparkles',meta:'sparkles'},C={deepgram:'#0ea5e9',gemini:'#0d8775',openai:'#111827',anthropic:'#7c3aed',z_ai:'#2563eb',meta:'#1877f2'},z=x.requiredServices.length>0?x.requiredServices:x.platformFallbackServices,q=new Set([...x.missingRequiredServices,...x.missingPlatformFallbackServices]),S=b?`Ask ${b.ownerName} (${b.ownerEmail}) to add the required service credentials before recording or uploading.`:'Ask an owner or admin to add the required service credentials before recording or uploading.',w=e=>{const n=[];return e===x.transcriptionProvider&&n.push('Appointment transcription'),e===x.soapProvider&&n.push('SOAP generation'),n.join(' and ')||'Required AI processing provider'},M=[...z.map(e=>({id:e,title:q.has(e)?`Add your ${v[e]} credentials`:`${v[e]} credentials configured`,description:w(e),href:`/(app)/settings/api-keys?service=${e}`,done:!q.has(e),icon:k[e]??'key',iconColor:C[e]??'#0d8775'}))];return(0,p.jsx)(c.AppCard,{variant:"outlined",padding:"lg",style:{borderColor:'#0d8775',borderWidth:1},children:(0,p.jsxs)(n.default,{style:{position:'relative'},children:[e&&!j&&(0,p.jsx)(s.default,{onPress:()=>A.mutate(),disabled:A.isPending,style:{position:'absolute',top:-4,right:-4,padding:4,zIndex:1},accessibilityLabel:"Dismiss onboarding checklist",children:(0,p.jsx)(c.AppIcon,{name:"x",size:18,color:"#a8a29e"})}),(0,p.jsxs)(c.AppStack,{spacing:16,children:[(0,p.jsxs)(c.AppRow,{spacing:10,align:"center",children:[(0,p.jsx)(n.default,{className:"w-10 h-10 rounded-xl items-center justify-center",style:{backgroundColor:'rgba(20, 168, 144, 0.1)'},children:(0,p.jsx)(c.AppIcon,{name:"key",size:20,color:"#0d8775"})}),(0,p.jsxs)(n.default,{style:{flex:1},children:[(0,p.jsx)(c.AppHeading,{level:3,children:x.billingBlockReason?'Billing update required':j?'Free via VMG-48: add provider keys':'Add service credentials to start generating'}),(0,p.jsx)(c.AppText,{variant:"muted",size:"sm",children:x.billingBlockReason?'Update your payment method in Settings > Billing to continue processing recordings.':j?'Your CaptiVet subscription is free via VMG-48. Add your own keys for the selected transcription and SOAP providers before processing recordings. One Gemini key covers both when Gemini is selected for both. Need help? Contact [email protected].':x.canManageCredentials?'CaptiVet uses your own AI provider keys. Add credentials for the selected transcription and SOAP providers to start generating notes.':S})]})]}),(0,p.jsx)(c.AppStack,{spacing:10,children:M.map(e=>{const o=(0,p.jsxs)(c.AppRow,{spacing:12,align:"center",children:[(0,p.jsx)(n.default,{className:"w-9 h-9 rounded-lg items-center justify-center",style:{backgroundColor:e.done?'rgba(34, 197, 94, 0.1)':`${e.iconColor}1a`},children:(0,p.jsx)(c.AppIcon,{name:e.done?'check-circle':e.icon,size:18,color:e.done?'#22c55e':e.iconColor})}),(0,p.jsxs)(n.default,{style:{flex:1},children:[(0,p.jsx)(c.AppText,{weight:"semibold",size:"sm",style:e.done?{textDecorationLine:'line-through',color:'#a8a29e'}:void 0,children:e.title}),(0,p.jsx)(c.AppText,{variant:"muted",size:"sm",children:e.description})]}),!e.done&&(0,p.jsx)(c.AppIcon,{name:"chevron-right",size:16,color:"#a8a29e"})]});return x.canManageCredentials?(0,p.jsx)(t.Link,{href:e.href,asChild:!0,children:(0,p.jsx)(s.default,{children:o})},e.id):(0,p.jsx)(n.default,{children:o},e.id)})}),x.canManageCredentials&&!x.billingBlockReason&&(0,p.jsx)(t.Link,{href:"/(app)/settings/api-keys",asChild:!0,children:(0,p.jsx)(c.AppButton,{size:"sm",children:(0,p.jsxs)(c.AppRow,{spacing:6,align:"center",children:[(0,p.jsx)(c.AppIcon,{name:"key",size:14,color:"#ffffff"}),(0,p.jsx)(c.AppText,{style:{color:'#fff',fontWeight:'600',fontSize:14},children:"Manage Credentials"})]})})}),x.canManageCredentials&&x.billingBlockReason&&(0,p.jsx)(t.Link,{href:"/(app)/settings/billing",asChild:!0,children:(0,p.jsx)(c.AppButton,{size:"sm",children:(0,p.jsxs)(c.AppRow,{spacing:6,align:"center",children:[(0,p.jsx)(c.AppIcon,{name:"credit-card",size:14,color:"#ffffff"}),(0,p.jsx)(c.AppText,{style:{color:'#fff',fontWeight:'600',fontSize:14},children:"Update Billing"})]})})})]})]})})};
5var n=e(r(d[0])),s=e(r(d[1])),t=r(d[2]),o=r(d[3]),c=r(d[4]),l=r(d[5]),p=r(d[6])},1763,[109,242,736,1074,1494,1686,2]);
6__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.TodayScreen=function(){const e=(0,p.useApi)(),{user:n,organization:S}=(0,h.useAuth)(),{isWizardOpen:w}=(0,x.useOnboardingWizard)(),T=(0,o.useRouter)(),B=(0,o.useLocalSearchParams)(),P=u.TodayQuerySchema.safeParse({date:B.date,scope:B.scope,bucket:B.bucket,page:B.page,limit:B.limit}),R=P.success?P.data:u.TodayQuerySchema.parse({}),[C,O]=(0,t.useState)(!1),[I,L]=(0,t.useState)(!1),D=Boolean(n&&(0,u.hasPermission)(n.role,'recordings.create')),z='owner'===n?.role||'admin'===n?.role,_='support_staff'===n?.role,E=Boolean(n?.id&&S?.id),M=(0,l.useQuery)({queryKey:['recordings','today',S?.id,n?.id,n?.role,R],queryFn:async()=>{const t=await e.organizations.getToday(R);try{new Intl.DateTimeFormat('en',{timeZone:t.timeZone}).format(t.startsAt)}catch{throw new Error('Invalid clinic timezone')}if(R.date&&t.date!==R.date||t.scope!==R.scope||t.pagination.page!==R.page||t.pagination.limit!==R.limit)throw new Error('Today response does not match its request');return t},enabled:E&&P.success,refetchInterval:3e4,refetchOnMount:'always'}),N=(0,l.useQuery)({queryKey:['dashboard','stats',S?.id,n?.id,n?.role],queryFn:()=>e.organizations.getDashboardStats(),enabled:E}),W=P.success?M.data:void 0,Z=N.data,F=Boolean(W&&R.page>Math.max(1,W.pagination.totalPages));(0,t.useEffect)(()=>{F&&W&&T.setParams({page:String(Math.max(1,W.pagination.totalPages))})},[W,F,T]);const q=e=>T.setParams({...e,page:'1'}),U=()=>T.setParams({date:void 0,scope:void 0,bucket:void 0,page:void 0,limit:void 0}),G=(0,y.useOnboardingChecklistVisible)('trial'===Z?.billing.status),Y=D&&!w&&G,H=Boolean(Z&&!N.error&&0===Z.recentRecordings.length&&D&&!C),Q='vmg-48'===S?.settings?.cohort,V=W?new Date(W.date+'T12:00:00Z').toLocaleDateString(void 0,{timeZone:'UTC',weekday:'long',day:'numeric',month:'long',year:'numeric'}):'Clinic day';return(0,A.jsxs)(c.PageShell,{width:"full",children:[(0,A.jsxs)(c.AppSection,{children:[(0,A.jsx)(c.PageHeader,{title:k(W?.timeZone)+', '+(n?.fullName?.split(' ')[0]||'there'),eyebrow:"Today",description:V+' \xb7 '+(S?.name||'Your practice'),titleAccessory:Q?(0,A.jsx)(c.AppBadge,{variant:"info",children:"Free via VMG-48"}):void 0}),(0,A.jsxs)(s.default,{style:{flexDirection:'row',flexWrap:'wrap',alignItems:'center',gap:12},children:[(0,A.jsxs)("label",{style:{display:'flex',flexWrap:'wrap',alignItems:'center',gap:8,fontSize:14},children:["Clinic day",(0,A.jsx)("input",{type:"date","aria-label":"Clinic day",className:"cv-focus",value:R.date??W?.date??'',onChange:e=>q({date:e.target.value||void 0,scope:'day',bucket:'all'}),style:{minHeight:44,minWidth:0,maxWidth:'100%',padding:8,borderRadius:12,border:'1px solid #d5e1da',background:'white',color:'#1c1917',font:'inherit'}})]}),(0,A.jsx)(c.AppButton,{variant:"ghost",size:"sm",onPress:U,children:"Current clinic day"}),W&&(0,A.jsxs)(c.AppText,{size:"xs",variant:"muted",children:["Timezone: ",W.timeZone]})]}),!P.success&&(0,A.jsx)(c.AttentionBanner,{tone:"failure",title:"Invalid worklist filters",description:"Choose a valid calendar date and page to load this worklist.",action:(0,A.jsx)(c.AppButton,{variant:"outline",onPress:U,children:"Reset filters"})})]}),!_&&(0,A.jsx)(f.TodayMetrics,{me:W?.me,loading:P.success&&M.isLoading,selectedDate:Boolean(R.date)}),(0,A.jsxs)(c.AppSection,{label:"Clinic worklist",children:[P.success&&(0,A.jsxs)(A.Fragment,{children:[M.error&&W&&(0,A.jsx)(c.AttentionBanner,{announce:!0,tone:"failure",title:"Worklist could not be refreshed",description:"Showing the last loaded clinic worklist and daily totals. Refresh to check for changes.",action:(0,A.jsx)(c.AppButton,{variant:"outline",onPress:()=>{M.refetch()},children:"Try refresh again"})}),W&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(b.TodayAttention,{count:W.counts.needs_you,backlog:'backlog'===R.scope,onShow:()=>q({bucket:'needs_you'})}),'backlog'===R.scope?(0,A.jsx)(c.AttentionBanner,{title:'Older visits before '+W.date,description:"Only visits needing attention are included. Your personal tiles still show the selected clinic day.",action:(0,A.jsx)(c.AppButton,{variant:"outline",onPress:()=>q({scope:'day',bucket:'all'}),children:"Back to selected day"})}):W.backlogNeedsYou>0&&(0,A.jsxs)(c.AppButton,{variant:"outline",style:{alignSelf:'flex-start'},onPress:()=>q({scope:'backlog',bucket:'needs_you'}),children:[W.backlogNeedsYou," older",' ',1===W.backlogNeedsYou?'visit needs':'visits need'," attention"]})]}),(0,A.jsx)(j.TodayWorklist,{query:R,data:W,loading:M.isLoading,fetching:M.isFetching,failed:Boolean(M.error),outOfRange:F,canManage:D,canEditMetadata:e=>D&&(z||e.userId===n?.id)&&('pending_metadata'===e.status||Boolean(n?.capabilities?.includes('record_first'))),userId:n?.id,onFilter:e=>q({bucket:e}),onPage:e=>T.setParams({page:String(e)}),onRetry:()=>{M.refetch()}})]}),(0,A.jsx)(o.Link,{href:u.ROUTES.RECORDS,asChild:!0,children:(0,A.jsx)(c.AppButton,{variant:"outline",style:{alignSelf:'flex-start'},children:"Open all notes"})})]}),(Y||H)&&(0,A.jsxs)(c.AppSection,{label:"Getting started",children:[Y&&(0,A.jsx)(y.OnboardingChecklist,{isTrial:'trial'===Z?.billing.status}),H&&(0,A.jsx)(c.AppCard,{children:(0,A.jsxs)(s.default,{style:{gap:12},children:[(0,A.jsx)(c.AppHeading,{level:3,children:"Create your first SOAP note"}),(0,A.jsx)(c.AppText,{size:"sm",children:"Record or upload an appointment. CaptiVet transcribes the audio; you review, edit and export the SOAP note."}),z&&(0,A.jsx)(o.Link,{href:u.ROUTES.SETTINGS_ORGANIZATION,asChild:!0,children:(0,A.jsx)(c.AppButton,{variant:"ghost",children:"Invite your team from Settings"})}),(0,A.jsx)(c.AppText,{size:"sm",variant:"muted",children:"Install the mobile app or Chrome extension when ready."}),(0,A.jsxs)(s.default,{style:{flexDirection:'row',flexWrap:'wrap',gap:8},children:[(0,A.jsx)(o.Link,{href:u.ROUTES.RECORD,asChild:!0,children:(0,A.jsx)(c.AppButton,{children:"Record appointment"})}),(0,A.jsx)(o.Link,{href:u.ROUTES.UPLOAD,asChild:!0,children:(0,A.jsx)(c.AppButton,{variant:"outline",children:"Upload appointment"})}),(0,A.jsx)(c.AppButton,{variant:"ghost",onPress:()=>O(!0),children:"Dismiss getting started"})]})]})})]}),N.error&&(0,A.jsx)(c.AttentionBanner,{announce:!0,tone:"failure",title:"Billing and reports could not be loaded",description:Z?'Previously loaded billing and reports remain below. Refresh to check their current status.':'The clinic worklist is independent of these reports. No billing or activity totals are available.',action:(0,A.jsx)(c.AppButton,{variant:"outline",onPress:()=>{N.refetch()},children:"Retry reports"})}),N.isLoading&&(0,A.jsx)(c.LoadingState,{message:"Loading billing and reports\u2026"}),Z&&(0,A.jsx)(v.TodayBilling,{billing:Z.billing,canManage:z,timeZone:W?.timeZone}),(0,A.jsxs)(s.default,{style:{gap:16},children:[(0,A.jsxs)(c.AppButton,{variant:"outline","aria-expanded":I,"aria-controls":"today-reports",onPress:()=>L(e=>!e),children:[I?'Hide':'Show'," 30-day activity and clinic quality"]}),I&&(0,A.jsx)(s.default,{nativeID:"today-reports",role:"region",accessibilityLabel:"30-day activity and clinic quality",children:Z?(0,A.jsx)(v.TodayInsights,{stats:Z,isAdmin:z,isSupportStaff:_}):(0,A.jsx)(c.AppText,{size:"sm",children:N.isLoading?'Loading reports\u2026':'Reports are unavailable. Use Retry reports to load them.'})})]})]})};
6var e,t=r(d[0]),n=r(d[1]),s=(e=n)&&e.__esModule?e:{default:e},o=r(d[2]),l=r(d[3]),c=r(d[4]),u=r(d[5]),p=r(d[6]),h=r(d[7]),y=r(d[8]),x=r(d[9]),f=r(d[10]),b=r(d[11]),j=r(d[12]),v=r(d[13]),A=r(d[14]);function k(e){if(!e)return'Welcome';const t=Number(new Intl.DateTimeFormat('en',{timeZone:e,hour:'numeric',hourCycle:'h23'}).format(new Date));return t<12?'Good morning':t<17?'Good afternoon':'Good evening'}},1765,[3,109,736,1074,1494,480,1686,970,1763,1685,1766,1767,1768,1771,2]);
7__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.TodayMetrics=function({me:e,loading:t,selectedDate:u}){return(0,c.jsxs)(l.default,{style:{gap:s.clinicalTokens.space.compact},children:[(0,c.jsxs)(l.default,{style:{display:'grid',gridTemplateColumns:'repeat(auto-fit, minmax(min(100%, 150px), 1fr))',gap:12},children:[(0,c.jsx)(s.StatTile,{label:u?'My notes this day':'My notes today',value:e?.completedNotes??null,loading:t}),(0,c.jsx)(s.StatTile,{label:"Recorded for these notes",value:e?(0,n.formatDuration)(e.recordedSeconds):null,loading:t}),(0,c.jsx)(s.StatTile,{label:"My time saved",value:e?'~'+(0,n.formatDuration)(e.estimatedTimeSavedSeconds):null,loading:t})]}),(0,c.jsxs)(s.AppText,{size:"xs",variant:"muted",children:["Your completed notes for the selected clinic day. Time saved is estimated at",' ',o.TIME_SAVED_MINUTES_PER_NOTE," minutes per note."]})]})};var e,t=r(d[0]),l=(e=t)&&e.__esModule?e:{default:e}
7,s=r(d[1]),o=r(d[2]),n=r(d[3]),c=r(d[4])},1766,[109,1494,480,1761,2]);
8__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.TodayAttention=function({count:o,backlog:s,onShow:c}){return o?(0,t.jsx)(n.AttentionBanner,{title:o+(1===o?' recording needs':' recordings need')+' your clinic\u2019s attention',description:s?'These visits are from before the selected clinic day.':'Review patient details, clinical issues or processing failures before exporting.',action:(0,t.jsx)(n.AppButton,{variant:"accent",onPress:c,children:"Show them"})}):null};var n=r(d[0]),t=r(d[1])},1767,[1494,2]);
9__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.TodayWorklist=function({query:e,data:t,loading:p,fetching:u,failed:f,outOfRange:h,canManage:x,canEditMetadata:y,userId:b,onFilter:j,onPage:k,onRetry:v}){return(0,c.jsxs)(o.default,{style:{gap:16},children:[(0,c.jsxs)(o.default,{style:{flexDirection:'row',flexWrap:'wrap',alignItems:'center',justifyContent:'space-between',gap:8},children:[(0,c.jsx)(s.AppText,{weight:"semibold",children:'backlog'===e.scope?'Older clinic visits needing attention':'Clinic worklist'}),(0,c.jsx)(s.AppButton,{variant:"ghost",size:"sm",onPress:v,disabled:u,children:"Refresh worklist"})]}),(0,c.jsx)(o.default,{style:{flexDirection:'row',flexWrap:'wrap',gap:8},accessibilityLabel:"Recording filters",children:l.recordingWorklistFilters.map(([o,n])=>(0,c.jsx)(s.FilterChip,{label:n,selected:o===e.bucket,count:t?.counts[o]??null,onPress:()=>j(o)},o))}),h?(0,c.jsx)(s.LoadingState,{message:"Updating worklist page\u2026"}):(0,c.jsx)(s.AppCard,{padding:"none",style:{overflow:'hidden'},children:(0,c.jsx)(s.ResponsiveList,{label:"Clinic recordings",items:t?.data??[],keyExtractor:e=>e.id,loading:p,errorState:f&&!t?(0,c.jsx)(s.ErrorState,{title:"Worklist unavailable",message:"Your recordings are still saved. Try loading the clinic worklist again.",onRetry:v}):void 0,renderItem:(o,s)=>(0,c.jsx)(n.RecordingWorklistRow,{item:o,compact:s,canManage:x,canEditMetadata:y(o),userId:b,timeZone:t.timeZone,showDate:'backlog'===e.scope}),emptyState:(0,c.jsx)(s.EmptyState,{icon:"file-text",title:'backlog'===e.scope?'No older visits in this filter':'all'===e.bucket?'No visits for this clinic day':'No visits in this filter',description:"Choose another filter or clinic day, or open Notes to find other visits."})})}),t&&!h&&(0,c.jsx)(s.PaginationControls,{page:t.pagination.page,totalPages:t.pagination.totalPages,total:t.pagination.total,itemLabel:"recordings",busy:u,onPageChange:k})]})};var e,t=r(d[0]),o=(e=t)&&e.__esModule?e:{default:e},s=r(d[1]),n=r(d[2]),l=r(d[3]),c=r(d[4])},1768,[109,1494,1769,1770,2]);
10__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.TodayBilling=function({billing:e,canManage:t,timeZone:c}){return(0,u.jsx)(l.AppCard,{children:(0,u.jsxs)(s.default,{style:{gap:10},children:[(0,u.jsxs)(l.AppText,{weight:"semibold",children:["Plan \xb7 ",{trial:'Trial',active:'Active',past_due:'Past due',canceled:'Canceled'}[e.status]??e.status]}),'trial'===e.status&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(l.AppText,{size:"sm",children:[null===e.trialDaysRemaining?'Trial end date unavailable':0===e.trialDaysRemaining?'Trial ends today':e.trialDaysRemaining+' days left in your trial',e.trialEndsAt?' \xb7 ends '+e.trialEndsAt.toLocaleDateString(void 0,{timeZone:c}):'']}),null!==e.notesDuringTrial&&(0,u.jsxs)(l.AppText,{size:"sm",variant:"muted",children:[e.notesDuringTrial," SOAP notes created during your trial"]})]}),'past_due'===e.status&&(0,u.jsxs)(l.AppText,{size:"sm",children:["Payment needs attention.",' ',t?'Open billing to review your subscription.':'Ask your practice owner to review billing.']}),'canceled'===e.status&&(0,u.jsxs)(l.AppText,{size:"sm",children:["Your subscription is canceled.",' ',t?'Open billing to review your options.':'Contact your practice owner for help.']}),t&&(0,u.jsx)(n.Link,{href:o.ROUTES.SETTINGS_BILLING,asChild:!0,children:(0,u.jsx)(l.AppButton,{variant:"outline",style:{alignSelf:'flex-start'},children:"Manage billing"})})]})})},_e.TodayInsights=function({stats:e,isAdmin:t,isSupportStaff:h}){return(0,u.jsxs)(s.default,{style:{gap:16},children:[(0,u.jsx)(l.AppText,{size:"sm",variant:"muted",children:"Rolling 30-day reports, independent of the selected clinic day."}),!h&&(0,u.jsx)(x,{title:"Your activity (30 days)",data:e.me}),t&&e.org&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(x,{title:"Practice activity (30 days)",data:e.org}),(0,u.jsxs)(l.AppText,{size:"sm",children:["Practice notes exported: ",(0,p.formatRate)(e.org.exportRate)]})]}),t&&e.team&&(0,u.jsx)(l.AppCard,{children:(0,u.jsxs)(s.default,{style:{gap:12},children:[(0,u.jsx)(l.AppHeading,{level:3,children:"Team activity (30 days)"}),(0,u.jsxs)(l.AppText,{children:[e.team.activeMembers," active members \xb7 ",e.team.billableSeats," billable seats"]}),e.team.members.map(e=>(0,u.jsxs)(s.default,{style:{gap:4},children:[(0,u.jsx)(l.AppText,{weight:"semibold",children:e.fullName}),(0,u.jsxs)(l.AppText,{size:"sm",variant:"muted",children:[o.ROLE_LABELS[e.role]??e.role," \xb7",' ',e.notesLast30d," notes \xb7 ",(0,p.formatLastActive)(e.lastRecordingAt)]})]},e.id)),(0,u.jsx)(n.Link,{href:o.ROUTES.SETTINGS_ORGANIZATION,asChild:!0,children:(0,u.jsxs)(l.AppButton,{variant:"outline",children:[e.team.pendingInvitations," invitations pending \xb7 Manage team"]})})]})}),(0,u.jsx)(c.QualityAnalyticsPanel,{quality:{...e.quality,byProvider:t?e.quality.byProvider:null}}),(0,u.jsxs)(s.default,{style:{flexDirection:'row',flexWrap:'wrap',gap:8},children:[(0,u.jsxs)(l.AppBadge,{children:[e.attention.unexportedNotes," completed notes not exported"]}),(0,u.jsx)(n.Link,{href:o.ROUTES.RECORDS,asChild:!0,children:(0,u.jsx)(l.AppButton,{variant:"outline",children:"Open all notes"})}),(0,u.jsx)(n.Link,{href:o.ROUTES.TASKS,asChild:!0,children:(0,u.jsxs)(l.AppButton,{variant:"outline",children:[e.attention.openTasks," open tasks"]})})]})]})};
10var e,t=r(d[0]),s=(e=t)&&e.__esModule?e:{default:e},n=r(d[1]),l=r(d[2]),o=r(d[3]),c=r(d[4]),p=r(d[5]),u=r(d[6]);function x({title:e,data:t}){return(0,u.jsx)(l.AppCard,{children:(0,u.jsxs)(s.default,{style:{gap:12},children:[(0,u.jsx)(l.AppHeading,{level:3,children:e}),(0,u.jsxs)(l.AppText,{children:[t.soapNotesGenerated," SOAP notes \xb7 ",t.recordingsCompleted," completed recordings"]}),(0,u.jsxs)(l.AppText,{size:"sm",children:[(0,p.formatDuration)(t.totalTranscribedSeconds)," transcribed \xb7 Average",' ',(0,p.formatDuration)(t.averageDurationSeconds)]}),(0,u.jsxs)(l.AppText,{size:"sm",children:["~",(0,p.formatDuration)(t.estimatedTimeSavedSeconds)," saved \xb7 Estimated",' ',o.TIME_SAVED_MINUTES_PER_NOTE," minutes per note"]}),t.daily.some(e=>e.recordings>0)&&(0,u.jsx)(l.Sparkline,{data:t.daily.map(e=>e.recordings)}),(0,u.jsxs)("details",{children:[(0,u.jsx)("summary",{className:"cv-focus",style:{minHeight:44,cursor:'pointer',paddingTop:12},children:"Daily activity (UTC)"}),(0,u.jsx)(s.default,{style:{gap:8},children:t.daily.map(e=>(0,u.jsxs)(l.AppText,{size:"sm",children:[e.date," \xb7 ",e.recordings," recordings \xb7 ",e.notes," notes"]},e.date))})]})]})})}},1771,[109,736,1494,480,1762,1761,2]);
11//# sourceMappingURL=/_expo/static/js/web/index-2509be2b78ee0f0fdc01e496ca0a5988.js.map
12//# debugId=d07b3ef3-ddd5-42f9-9dd3-8195b32530b8

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.