1import{ab as ke,al as ue,r as m,ad as q,am as J,j as e,a1 as te,as as P,at as F,au as R,av as K,aw as j,a6 as le,Q as b,$ as S,P as he,m as $,ap as de,C as pe,B as C,bJ as Ee,a7 as Te,aL as ge,aO as je,aP as fe,aQ as ye,a0 as se,b3 as Ae,K as u,an as V,y as De,aq as Me,aM as Oe,bP as $e,V as k,Y as E,q as Ie,T as ce,U as Le}from"./index-B01jGDSO.js";import{T as Ue,a as qe,b as Pe,c as Fe}from"./tabs-DXmrEda4.js";import{U as Re}from"./user-check-LFi4Rd55.js";import{T as Ke}from"./TodayRouteStatusBadge-RcAwTK7P.js";import{T as Ve}from"./trending-down-DKoC_PXO.js";const ie={SICK:"Sick",PERSONAL:"Personal",FAMILY_EMERGENCY:"Family Emergency",CAR_TROUBLE:"Car Trouble",WEATHER:"Weather",INJURY:"Injury",OTHER:"Other"},He={RECEIVED:"bg-blue-100 text-blue-700",MATCHED:"bg-green-100 text-green-700",UNMATCHED:"bg-amber-100 text-amber-700",PROCESSED:"bg-muted text-muted-foreground"};function Qe(){const{orgId:h}=ke(),x=ue(),[g,c]=m.useState(null),[T,i]=m.useState("all"),[A,N]=m.useState("all"),[w,W]=m.useState(""),[v,_]=m.useState(null),[D,I]=m.useState(""),{data:L=[],isLoading:M}=q({queryKey:["call-in-records",h],queryFn:async()=>{const{data:s,error:r}=await u.from("call_in_records").select("*").eq("tenant_id",h).order("created_at",{ascending:!1}).limit(200);if(r)throw r;return s},enabled:!!h}),{data:O=[]}=q({queryKey:["profiles-for-match"],queryFn:async()=>{const{data:s,error:r}=await u.from("profiles").select("id, full_name").order("full_name");if(r)throw r;return s}}),p=m.useMemo(()=>L.filter(s=>!(T!=="all"&&s.status!==T||A!=="all"&&s.reason_category!==A||w&&!s.created_at.startsWith(w))),[L,T,A,w]),y=J({mutationFn:async({recordId:s,employeeId:r})=>{const{error:f}=await u.from("call_in_records").update({employee_user_id:r,status:"MATCHED"}).eq("id",s);if(f)throw f},onSuccess:()=>{x.invalidateQueries({queryKey:["call-in-records"]}),_(null),I(""),V.success("Employee matched to call-in record")},onError:s=>V.error(s.message)}),H=s=>{var r;return s?((r=O.find(f=>f.id===s))==null?void 0:r.full_name)||"Unknown":null};return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-wrap gap-3",children:[e.jsx(te,{type:"date",value:w,onChange:s=>W(s.target.value),className:"w-auto",placeholder:"Filter by date"}),e.jsxs(P,{value:T,onValueChange:i,children:[e.jsx(F,{className:"w-[140px]",children:e.jsx(R,{placeholder:"Status"})}),e.jsxs(K,{children:[e.jsx(j,{value:"all",children:"All Status"}),e.jsx(j,{value:"RECEIVED",children:"Received"}),e.jsx(j,{value:"MATCHED",children:"Matched"}),e.jsx(j,{value:"UNMATCHED",children:"Unmatched"}),e.jsx(j,{value:"PROCESSED",children:"Processed"})]})]}),e.jsxs(P,{value:A,onValueChange:N,children:[e.jsx(F,{className:"w-[160px]",children:e.jsx(R,{placeholder:"Category"})}),e.jsxs(K,{children:[e.jsx(j,{value:"all",children:"All Categories"}),Object.entries(ie).map(([s,r])=>e.jsx(j,{value:s,children:r},s))]})]})]}),M?e.jsx("div",{className:"flex justify-center py-12",children:e.jsx(le,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):p.length===0?e.jsx(b,{children:e.jsxs(S,{className:"py-12 text-center",children:[e.jsx(he,{className:"h-10 w-10 text-muted-foreground/40 mx-auto mb-3"}),e.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"No call-in records found"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Call-in records will appear here when employees call the AI line."})]})}):e.jsx("div",{className:"space-y-2",children:p.map(s=>{const r=g===s.id,f=H(s.employee_user_id)||s.employee_name_spoken||"Unknown";return e.jsxs(b,{className:"overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-3 p-4 cursor-pointer hover:bg-muted/30 transition-colors",onClick:()=>c(r?null:s.id),children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"font-medium text-sm",children:f}),e.jsx($,{variant:"outline",className:`text-xs ${He[s.status]||""}`,children:s.status}),e.jsx($,{variant:"outline",className:"text-xs",children:ie[s.reason_category]||s.reason_category})]}),e.jsxs("div",{className:"flex items-center gap-3 mt-1 text-xs text-muted-foreground",children:[e.jsx("span",{children:de(new Date(s.created_at),"MMM d, yyyy · h:mm a")}),s.call_duration_seconds&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(pe,{className:"h-3 w-3"}),Math.floor(s.call_duration_seconds/60),":",String(s.call_duration_seconds%60).padStart(2,"0")]}),s.reason&&e.jsx("span",{className:"truncate max-w-[200px]",children:s.reason})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[s.status==="UNMATCHED"&&e.jsxs(C,{variant:"outline",size:"sm",onClick:Q=>{Q.stopPropagation(),_(s)},children:[e.jsx(Re,{className:"h-3.5 w-3.5 mr-1"})," Match"]}),r?e.jsx(Ee,{className:"h-4 w-4 text-muted-foreground"}):e.jsx(Te,{className:"h-4 w-4 text-muted-foreground"})]})]}),r&&e.jsxs("div",{className:"border-t px-4 py-3 space-y-3 bg-muted/20",children:[s.ai_summary&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase mb-1",children:"AI Summary"}),e.jsx("p",{className:"text-sm",children:s.ai_summary})]}),s.transcript&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase mb-1",children:"Full Transcript"}),e.jsx("p",{className:"text-sm whitespace-pre-wrap bg-background rounded-md p-3 border",children:s.transcript})]}),e.jsxs("div",{className:"grid gap-2 grid-cols-2 sm:grid-cols-4 text-xs",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Phone:"}),e.jsx("p",{className:"font-medium",children:s.phone_number||"â"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Expected Return:"}),e.jsx("p",{className:"font-medium",children:s.expected_return_date?de(new Date(s.expected_return_date),"MMM d, yyyy"):"â"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Call SID:"}),e.jsx("p",{className:"font-medium font-mono truncate",children:s.twilio_call_sid||"â"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Matched Employee:"}),e.jsx("p",{className:"font-medium",children:H(s.employee_user_id
1)||"Not matched"})]})]})]})]},s.id)})}),e.jsx(ge,{open:!!v,onOpenChange:()=>_(null),children:e.jsxs(je,{children:[e.jsx(fe,{children:e.jsx(ye,{children:"Match Call-In to Employee"})}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Spoken name: ",e.jsx("strong",{children:(v==null?void 0:v.employee_name_spoken)||"Unknown"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(se,{children:"Select Employee"}),e.jsxs(P,{value:D,onValueChange:I,children:[e.jsx(F,{children:e.jsx(R,{placeholder:"Choose employee..."})}),e.jsx(K,{children:O.map(s=>e.jsx(j,{value:s.id,children:s.full_name||"Unnamed"},s.id))})]})]})]}),e.jsxs(Ae,{children:[e.jsx(C,{variant:"outline",onClick:()=>_(null),children:"Cancel"}),e.jsxs(C,{disabled:!D||y.isPending,onClick:()=>y.mutate({recordId:v.id,employeeId:D}),children:[y.isPending&&e.jsx(le,{className:"mr-2 h-4 w-4 animate-spin"}),"Confirm Match"]})]})]})})]})}const Y=["January","February","March","April","May","June","July","August","September","October","November","December"],X=["","P","A","S","N","R","O","E","L"],Z={P:"Present",A:"Call In",S:"Sick Leave",N:"No Work",R:"Rain Days",O:"Approved",E:"Early Out",L:"Late"},ee={P:"bg-emerald-100 text-emerald-800 dark:bg-emerald-900/40 dark:text-emerald-300",A:"bg-red-100 text-red-800 dark:bg-red-900/40 dark:text-red-300",S:"bg-amber-100 text-amber-800 dark:bg-amber-900/40 dark:text-amber-300",N:"bg-muted text-muted-foreground",R:"bg-blue-100 text-blue-800 dark:bg-blue-900/40 dark:text-blue-300",O:"bg-purple-100 text-purple-800 dark:bg-purple-900/40 dark:text-purple-300",E:"bg-orange-100 text-orange-800 dark:bg-orange-900/40 dark:text-orange-300",L:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/40 dark:text-yellow-300"},oe=new Set(["P","E","L"]),me=new Set(["A","S"]);function ze(h,x){return new Date(h,x+1,0).getDate()}function Be(h,x,g){return new Date(h,x,g).toLocaleDateString("en-US",{weekday:"short"})}function xe(h,x,g){const c=new Date(h,x,g).getDay();return c===0||c===6}function Ze(){const{role:h}=De(),x=ue(),g=new Date,[c,T]=m.useState(g.getFullYear()),[i,A]=m.useState(g.getMonth()),[N,w]=m.useState("today"),[W,v]=m.useState(!1),[_,D]=m.useState(""),[I,L]=m.useState(""),M=h==="admin"||h==="manager",O=J({mutationFn:async()=>{const{error:t}=await u.from("profiles").insert({full_name:_.trim(),phone:I.trim()||null,user_id:crypto.randomUUID()});if(t)throw t},onSuccess:()=>{x.invalidateQueries({queryKey:["profiles"]}),v(!1),D(""),L(""),V.success("Employee added")},onError:t=>V.error("Failed to add employee: "+t.message)}),{data:p=[]}=q({queryKey:["profiles"],queryFn:async()=>{const{data:t,error:a}=await u.from("profiles").select("id, full_name, user_id").order("full_name");if(a)throw a;return t}}),y=ze(c,i),H=`${c}-${String(i+1).padStart(2,"0")}-01`,s=`${c}-${String(i+1).padStart(2,"0")}-${String(y).padStart(2,"0")}`,{data:r=[]}=q({queryKey:["attendance",c,i],queryFn:async()=>{const{data:t,error:a}=await u.from("attendance_records").select("*").gte("attendance_date",H).lte("attendance_date",s);if(a)throw a;return t}}),f=`${g.getFullYear()}-${String(g.getMonth()+1).padStart(2,"0")}-${String(g.getDate()).padStart(2,"0")}`,{data:Q=[]}=q({queryKey:["attendance-today",f],queryFn:async()=>{const{data:t,error:a}=await u.from("attendance_records").select("*").eq("attendance_date",f);if(a)throw a;return t}}),U=new Map(Q.map(t=>[t.employee_id,t.status_code])),z=new Map,ae=new Map;r.forEach(t=>{const a=new Date(t.attendance_date).getDate(),n=`${t.employee_id}-${a}`;z.set(n,t.status_code),ae.set(n,t.id)});const be=J({mutationFn:async({employeeId:t,day:a,statusCode:n})=>{const l=`${c}-${String(i+1).padStart(2,"0")}-${String(a).padStart(2,"0")}`,o=ae.get(`${t}-${a}`);if(o)if(n===""){const{error:d}=await u.from("attendance_records").delete().eq("id",o);if(d)throw d}else{const{error:d}=await u.from("attendance_records").update({status_code:n}).eq("id",o);if(d)throw d}else if(n!==""){const{error:d}=await u.from("attendance_records").insert({employee_id:t,attendance_date:l,status_code:n});if(d)throw d}},onSuccess:()=>{x.invalidateQueries({queryKey:["attendance"]}),x.invalidateQueries({queryKey:["attendance-today"]})},onError:t=>V.error("Failed to update: "+t.message)}),Ne=J({mutationFn:async({employeeId:t,statusCode:a})=>{const n=Q.find(l=>l.employee_id===t);n?a===""?await u.from("attendance_records").delete().eq("id",n.id):await u.from("attendance_records").update({status_code:a}).eq("id",n.id):a!==""&&await u.from("attendance_records").insert({employee_id:t,attendance_date:f,status_code:a})},onSuccess:()=>{x.invalidateQueries({queryKey:["attendance-today"]}),x.invalidateQueries({queryKey:["attendance"]})}}),we=(t,a)=>{if(!M)return;const n=`${t}-${a}`,l=z.get(n)||"",o=X.indexOf(l),d=X[(o+1)%X.length];be.mutate({employeeId:t,day:a,statusCode:d})},ne=t=>{let a=0,n=0,l=0,o=0;for(let d=1;d<=y;d++){const B=z.get(`${t}-${d}`)||"";oe.has(B)&&a++,me.has(B)&&n++,B==="L"&&l++,B==="E"&&o++}return{totalIn:a,totalOut:n,late:l,earlyOut:o}},ve=p.filter(t=>oe.has(U.get(t.id)||"")).length,_e=p.filter(t=>me.has(U.get(t.id)||"")).length,Se=p.filter(t=>!U.has(t.id)).length,Ce=p.filter(t=>U.get(t.id)==="L").length,G=m.useMemo(()=>p.map(t=>{const a=ne(t.id);return{...t,...a}}).filter(t=>t.totalOut>=3||t.late>=3).sort((t,a)=>a.totalOut+a.late-(t.totalOut+t.late)),[p,r]),re=Array.from({length:y},(t,a)=>a+1);return e.jsx(Me,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Employee Attendance Tracker"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Track daily attendance for all employees"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[M&&e.jsxs(ge,{open:W,onOpenChange:v,children:[e.jsx(Oe,{asChild:!0,children:e.jsxs(C,{size:"sm",className:"gap-1.5",children:[e.jsx($e,{className:"h-4 w-4"}),"Add Employee"]})}),e.jsxs(je,{children:[e.jsx(fe,{children:e.jsx(ye,{children:"Add Employee"})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(se,{children:"Full Name *"}
1),e.jsx(te,{value:_,onChange:t=>D(t.target.value),placeholder:"e.g., John Smith"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(se,{children:"Phone"}),e.jsx(te,{value:I,onChange:t=>L(t.target.value),placeholder:"Optional"})]}),e.jsx(C,{className:"w-full",onClick:()=>O.mutate(),disabled:!_.trim()||O.isPending,children:O.isPending?"Adding...":"Add Employee"})]})]})]}),e.jsxs(P,{value:String(c),onValueChange:t=>T(Number(t)),children:[e.jsx(F,{className:"w-[100px]",children:e.jsx(R,{})}),e.jsx(K,{children:Array.from({length:21},(t,a)=>2020+a).map(t=>e.jsx(j,{value:String(t),children:t},t))})]})]})]}),e.jsx(Ke,{}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-5",children:[e.jsxs(b,{children:[e.jsxs(k,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(E,{className:"text-sm font-medium",children:"Present Today"}),e.jsx(Ie,{className:"h-4 w-4 text-green-600"})]}),e.jsx(S,{children:e.jsx("div",{className:"text-2xl font-bold text-green-600",children:ve})})]}),e.jsxs(b,{children:[e.jsxs(k,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(E,{className:"text-sm font-medium",children:"Absent"}),e.jsx(ce,{className:"h-4 w-4 text-red-600"})]}),e.jsx(S,{children:e.jsx("div",{className:"text-2xl font-bold text-red-600",children:_e})})]}),e.jsxs(b,{children:[e.jsxs(k,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(E,{className:"text-sm font-medium",children:"Late"}),e.jsx(pe,{className:"h-4 w-4 text-amber-600"})]}),e.jsx(S,{children:e.jsx("div",{className:"text-2xl font-bold text-amber-600",children:Ce})})]}),e.jsxs(b,{children:[e.jsxs(k,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(E,{className:"text-sm font-medium",children:"Unmarked"}),e.jsx(Le,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsx(S,{children:e.jsx("div",{className:"text-2xl font-bold",children:Se})})]}),e.jsxs(b,{children:[e.jsxs(k,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(E,{className:"text-sm font-medium",children:"Alerts"}),e.jsx(Ve,{className:"h-4 w-4 text-orange-600"})]}),e.jsx(S,{children:e.jsx("div",{className:"text-2xl font-bold text-orange-600",children:G.length})})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(C,{variant:N==="today"?"secondary":"ghost",size:"sm",onClick:()=>
1w("today"),children:"Today's Board"}),e.jsx(C,{variant:N==="grid"?"secondary":"ghost",size:"sm",onClick:()=>w("grid"),children:"Monthly Grid"}),e.jsxs(C,{variant:N==="callins"?"secondary":"ghost",size:"sm",onClick:()=>w("callins"),className:"gap-1.5",children:[e.jsx(he,{className:"h-3.5 w-3.5"}),"Call-Ins"]})]}),N==="today"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs(b,{children:[e.jsx(k,{children:e.jsxs(E,{className:"text-lg",children:["Live Attendance Board â ",new Date().toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric"})]})}),e.jsx(S,{children:e.jsx("div",{className:"grid gap-2 sm:grid-cols-2 lg:grid-cols-3",children:p.map(t=>{const a=U.get(t.id)||"";return e.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${a?ee[a]:"bg-muted/30"}`,children:[e.jsx("span",{className:"font-medium text-sm",children:t.full_name||"Unnamed"}),e.jsxs("div",{className:"flex items-center gap-2",children:[a&&e.jsx($,{variant:"outline",className:"text-xs font-bold",children:a}),M&&e.jsxs(P,{value:a||"__clear__",onValueChange:n=>Ne.mutate({employeeId:t.id,statusCode:n==="__clear__"?"":n}),children:[e.jsx(F,{className:"w-[80px] h-7 text-xs",children:e.jsx(R,{placeholder:"Mark"})}),e.jsxs(K,{children:[e.jsx(j,{value:"__clear__",children:"Clear"}),Object.entries(Z).map(([n,l])=>e.jsxs(j,{value:n,children:[n," â ",l]},n))]})]})]})]},t.id)})})})]}),G.length>0&&e.jsxs(b,{children:[e.jsx(k,{children:e.jsxs(E,{className:"text-lg flex items-center gap-2",children:[e.jsx(ce,{className:"h-5 w-5 text-orange-600"}),"Attendance Alerts â ",Y[i]]})}),e.jsx(S,{children:e.jsx("div",{className:"space-y-2",children:G.map(t=>e.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg border border-orange-200 bg-orange-50 dark:bg-orange-950/20 dark:border-orange-800",children:[e.jsx("span",{className:"font-medium text-sm",children:t.full_name}),e.jsxs("div",{className:"flex gap-3 text-xs",children:[t.totalOut>=3&&e.jsxs($,{variant:"outline",className:"text-red-600 border-red-200",children:[t.totalOut," absences"]}),t.late>=3&&e.jsxs($,{variant:"outline",className:"text-amber-600 border-amber-200",children:[t.late,"Ã late"]})]})]},t.id))})})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(Z).map(([t,a])=>e.jsxs($,{variant:"outline",className:`text-xs ${ee[t]}`,children:[t," = ",a]},t))})]}),N==="grid"&&e.jsxs(Ue,{value:String(i),onValueChange:t=>A(Number(t)),children:[e.jsx(qe,{className:"flex flex-wrap h-auto gap-1",children:Y.map((t,a)=>e.jsx(Pe,{value:String(a),className:"text-xs px-2 py-1",children:t.substring(0,3)},a))}),e.jsxs(Fe,{value:String(i),className:"mt-3",children:[e.jsx("div",{className:"rounded-md border overflow-auto max-h-[calc(100vh-400px)]",children:e.jsxs("table",{className:"w-full text-xs border-collapse",children:[e.jsx("thead",{className:"sticky top-0 z-10 bg-muted",children:e.jsxs("tr",{children:[e.jsx("th",{className:"sticky left-0 z-20 bg-muted px-3 py-2 text-left font-semibold min-w-[160px] border-b border-r",children:"Employee"}),re.map(t=>e.jsxs("th",{className:`px-1 py-1 text-center font-medium border-b min-w-[36px] ${xe(c,i,t)?"bg-muted-foreground/10":""}`,children:[e.jsx("div",{children:t}),e.jsx("div",{className:"text-[10px] text-muted-foreground font-normal",children:Be(c,i,t)})]},t)),e.jsx("th",{className:"px-2 py-2 text-center font-semibold border-b border-l bg-emerald-50 dark:bg-emerald-950/30 min-w-[50px]",children:"In"}),e.jsx("th",{className:"px-2 py-2 text-center font-semibold border-b bg-red-50 dark:bg-red-950/30 min-w-[50px]",children:"Out"}),e.jsx("th",{className:"px-2 py-2 text-center font-semibold border-b bg-yellow-50 dark:bg-yellow-950/30 min-w-[50px]",children:"Late"}),e.jsx("th",{className:"px-2 py-2 text-center font-semibold border-b bg-orange-50 dark:bg-orange-950/30 min-w-[60px]",children:"Early"})]})}),e.jsx("tbody",{children:p.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:y+5,className:"text-center py-8 text-muted-foreground",children:"No employees found."})}):p.map(t=>{var n;const a=ne(t.id);return e.jsxs("tr",{className:"border-b hover:bg-muted/30",children:[e.jsx("td",{className:"sticky left-0 z-10 bg-background px-3 py-1.5 font-medium border-r whitespace-nowrap",children:t.full_name||((n=t.user_id)==null?void 0:n.substring(0,8))||"Unnamed"}),re.map(l=>{const o=z.get(`${t.id}-${l}`)||"",d=xe(c,i,l);return e.jsx("td",{className:`px-0 py-0 text-center border-r cursor-pointer transition-colors ${d?"bg-muted-foreground
1/5":""} ${o?ee[o]:"hover:bg-accent"}`,onClick:()=>we(t.id,l),title:`${t.full_name} - ${Y[i]} ${l}: ${o?Z[o]||o:"Click to set"}`,children:e.jsx("span",{className:"font-semibold text-[11px]",children:o})},l)}),e.jsx("td",{className:"px-2 py-1 text-center font-bold border-l bg-emerald-50/50 dark:bg-emerald-950/20",children:a.totalIn}),e.jsx("td",{className:"px-2 py-1 text-center font-bold bg-red-50/50 dark:bg-red-950/20",children:a.totalOut}),e.jsx("td",{className:"px-2 py-1 text-center font-bold bg-yellow-50/50 dark:bg-yellow-950/20",children:a.late}),e.jsx("td",{className:"px-2 py-1 text-center font-bold bg-orange-50/50 dark:bg-orange-950/20",children:a.earlyOut})]},t.id)})})]})}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-2",children:[M?"Click any cell to cycle through status codes. ":"",Y[i]," ",c," · ",y," days"]})]})]}),N==="callins"&&e.jsx(Qe,{})]})})}export{Ze 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.