chordia-ui 3.5.6 → 3.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/UpdatedInteractionDetails.cjs.js +4 -4
- package/dist/components/UpdatedInteractionDetails.cjs.js.map +1 -1
- package/dist/components/UpdatedInteractionDetails.es.js +477 -464
- package/dist/components/UpdatedInteractionDetails.es.js.map +1 -1
- package/package.json +1 -1
- package/src/components/UpdatedInteractionDetails/UpdatedGuidance.jsx +30 -9
- package/src/components/UpdatedInteractionDetails/UpdatedInteractionDetails.jsx +2 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),p=require("react"),y=require("lucide-react"),it=require("../UpdatedInteractionRecording.cjs.js"),M={strong:"var(--Grey-Strong, #2E3236)",muted:"var(--Grey-Muted, #808183)",absent:"var(--Grey-absent, #D9D9D9)",accent:"var(--rail-orange, #C98A5A)",itemText:"var(--text-item, #3F3F3F)",quoteLine:"var(--border-warm, #B2AEA8)",quoteText:"var(--text-subtle-warm, #767473)",iconBg:"var(--surface-hover, #F3F7F7)"},Nt={effective:"Effective",strong:"Strong",needs_improvement:"Needs Improvement",mixed:"Mixed"},Ze="updated-coaching-synthesis-keyframes";function qt(){if(typeof document>"u"||document.getElementById(Ze))return;const t=document.createElement("style");t.id=Ze,t.textContent=`
|
|
2
2
|
@keyframes updated-coaching-shimmer {
|
|
3
3
|
0% { background-position: -200% 0; }
|
|
4
4
|
100% { background-position: 200% 0; }
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
0%, 100% { opacity: 0.4; }
|
|
8
8
|
50% { opacity: 1; }
|
|
9
9
|
}
|
|
10
|
-
`,document.head.appendChild(t)}function Kt({overall:t}){const n=Nt[t]||(t?t.replace(/_/g," "):"");return e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flexShrink:0},children:[e.jsx("span",{style:{fontSize:13,fontWeight:400,color:
|
|
10
|
+
`,document.head.appendChild(t)}function Kt({overall:t}){const n=Nt[t]||(t?t.replace(/_/g," "):"");return e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flexShrink:0},children:[e.jsx("span",{style:{fontSize:13,fontWeight:400,color:M.strong,fontFamily:"var(--font-sans)",lineHeight:1.2},children:"Overall:"}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[e.jsx(y.ThumbsUp,{size:14,color:M.strong,strokeWidth:1.5}),e.jsx("span",{style:{fontSize:13,fontWeight:600,color:M.strong,fontFamily:"var(--font-sans)",lineHeight:1.2},children:n})]})]})}function Vt({item:t}){const n=typeof t=="string"?t:(t==null?void 0:t.text)||"",i=typeof t=="object"?t==null?void 0:t.quote:null;return e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:14},children:[e.jsx("div",{style:{fontSize:14,fontWeight:600,color:M.itemText,fontFamily:"var(--font-sans)",lineHeight:1.5},children:n}),i&&e.jsxs("div",{style:{display:"flex",gap:10},children:[e.jsx("div",{style:{width:1,flexShrink:0,alignSelf:"stretch",background:M.quoteLine}}),e.jsxs("div",{style:{fontSize:14,fontWeight:400,color:M.quoteText,fontFamily:"var(--font-sans)",lineHeight:1.5},children:["“",i,"”"]})]})]})}function Ue({icon:t,label:n,items:i}){return!i||i.length===0?null:e.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:16,borderRadius:12},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16},children:[e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,borderRadius:9999,background:M.iconBg,flexShrink:0},children:t}),e.jsx("span",{style:{fontSize:16,fontWeight:600,color:M.strong,fontFamily:"var(--font-sans)",lineHeight:"normal"},children:n})]}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:24},children:i.map((r,s)=>e.jsx(Vt,{item:r},s))})]})}const st=({data:t,loading:n,error:i})=>{var f,m;if(p.useEffect(()=>{qt()},[]),n)return e.jsxs(e.Fragment,{children:[e.jsx("style",{children:`
|
|
11
11
|
@keyframes coaching-spinner-spin {
|
|
12
12
|
from { transform: rotate(0deg); }
|
|
13
13
|
to { transform: rotate(360deg); }
|
|
14
14
|
}
|
|
15
|
-
`}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:12,padding:"48px 24px"},children:[e.jsxs("svg",{width:48,height:48,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{animation:"coaching-spinner-spin 1.2s linear infinite"},children:[e.jsx("path",{d:"M43 24C43 26.4951 42.5086 28.9658 41.5537 31.271C40.5989 33.5762 39.1993 35.6707 37.435 37.435C35.6707 39.1993 33.5762 40.5989 31.271 41.5537C28.9658 42.5086 26.4951 43 24 43C21.5049 43 19.0342 42.5086 16.729 41.5537C14.4238 40.5989 12.3293 39.1993 10.565 37.435C8.80066 35.6707 7.40113 33.5762 6.44629 31.271C5.49145 28.9658 5 26.4951 5 24",stroke:"#F3E7C7",strokeWidth:"4",strokeLinecap:"round"}),e.jsx("path",{d:"M12 24C12 22.4241 12.3104 20.8637 12.9134 19.4078C13.5165 17.9519 14.4004 16.629 15.5147 15.5147C16.629 14.4004 17.9519 13.5165 19.4078 12.9134C20.8637 12.3104 22.4241 12 24 12C25.5759 12 27.1363 12.3104 28.5922 12.9134C30.0481 13.5165 31.371 14.4004 32.4853 15.5147C33.5996 16.629 34.4835 17.9519 35.0866 19.4078C35.6896 20.8637 36 22.4241 36 24",stroke:"#00A66E",strokeWidth:"4",strokeLinecap:"round"}),e.jsx("path",{d:"M20 24C20 24.5253 20.1035 25.0454 20.3045 25.5307C20.5055 26.016 20.8001 26.457 21.1716 26.8284C21.543 27.1999 21.984 27.4945 22.4693 27.6955C22.9546 27.8965 23.4747 28 24 28C24.5253 28 25.0454 27.8965 25.5307 27.6955C26.016 27.4945 26.457 27.1999 26.8284 26.8284C27.1999 26.457 27.4945 26.016 27.6955 25.5307C27.8965 25.0454 28 24.5253 28 24",stroke:"#F3E7C7",strokeWidth:"4",strokeLinecap:"round"})]}),e.jsx("span",{style:{fontSize:14,color:_.muted,fontWeight:500,textAlign:"center"},children:"Synthesizing coaching summary..."})]})]});if(i)return e.jsx("div",{style:{fontSize:14,color:_.muted},children:"Unable to generate coaching summary."});if(!t)return null;const o=t.strengths||[],s=t.improvements||[],r=typeof t.one_liner=="string"?t.one_liner:((x=t.one_liner)==null?void 0:x.text)||"",g=typeof t.context=="string"?t.context:((m=t.context)==null?void 0:m.text)||"";return e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16,background:"#FFF"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx(u.ShieldCheck,{size:20,color:_.accent,strokeWidth:2}),e.jsx("span",{style:{fontSize:16,fontWeight:600,color:_.strong,fontFamily:"var(--font-sans)",lineHeight:1.2,textTransform:"uppercase"},children:"Coaching Summary"})]}),r&&e.jsx("div",{style:{fontSize:14,fontWeight:500,color:_.strong,fontFamily:"var(--font-sans)",lineHeight:1.5},children:r}),e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:16,justifyContent:"space-between"},children:[g&&e.jsx("div",{style:{fontSize:14,fontWeight:400,color:_.muted,fontFamily:"var(--font-sans)",lineHeight:1.5,flex:1},children:g}),t.overall&&e.jsx(Kt,{overall:t.overall})]}),(o.length>0||s.length>0)&&e.jsxs("div",{style:{display:"flex",gap:24,paddingTop:24,borderTop:`1px solid ${_.absent}`},children:[e.jsx(Ye,{icon:e.jsx(u.TrendingUp,{size:14,color:_.strong,strokeWidth:1.5}),label:"Key Strengths",items:o}),e.jsx(Ye,{icon:e.jsx(u.Lightbulb,{size:14,color:_.strong,strokeWidth:1.5}),label:"Improvements",items:s})]})]})};function Yt(t){const n=Math.floor(t/60),i=Math.round(t%60);return`${n}:${i.toString().padStart(2,"0")}`}const Zt={display:"flex",justifyContent:"space-between",padding:"8px 8px 12px 8px",alignItems:"center",gap:24,fontFamily:"var(--font-sans)",fontSize:13,fontWeight:400,lineHeight:"normal",borderBottom:"1px solid var(--Grey-absent, #D9D9D9)"},Ze={display:"flex",flexDirection:"column",flex:"1 0 0",gap:0,minWidth:0},it=({meta:t={},callPurpose:n={},classification:i={},dimensions:o=[],outcomeQuality:s="Neutral",onMoreDetails:r,moreDetails:g=[],resolutionOutcome:x,customerIntent:m})=>{const[w,b]=c.useState(!1),D=t.duration_seconds!=null?Yt(t.duration_seconds):null,h=t.message_count,C=n.interaction_driver,j=i.interaction_paradigm,v=d=>o.find(T=>(T.key||"").toLowerCase().includes(d)),S=v("resolution_outcome"),G=v("customer_intent"),W=v("outcome_quality"),F=d=>d?d.replace(/_/g," ").replace(/\b\w/g,T=>T.toUpperCase()):null,M=s!=="Neutral"?s:W?F(W.value):s,P=x??(S?F(S.value):null),H=m??(G?F(G.value):null),A=new Set(["resolution_outcome","customer_intent","outcome_quality"].map(d=>`dim.${d}`)),a=o.filter(d=>!A.has(d.key)),f=[],l=[[D!=null?{label:"Duration",value:D}:null,h!=null?{label:"Messages",value:h}:null],[C!=null?{label:"Driver",value:C}:null,j!=null?{label:"Paradigm",value:j}:null]];for(let d=0;d<a.length;d+=2){const T=a[d]?{label:a[d].display_name||a[d].label||a[d].key,value:F(a[d].value)}:null,q=a[d+1]?{label:a[d+1].display_name||a[d+1].label||a[d+1].key,value:F(a[d+1].value)}:null;l.push([T,q])}l.push([{label:"Outcome Quality",value:M},{isMoreDetails:!0}]),l.forEach(d=>f.push(d));const E=[P!=null&&{label:"Resolution Outcome",value:P},H!=null&&{label:"Customer Intent",value:H},...g||[]].filter(Boolean),O=d=>e.jsxs("div",{style:Zt,children:[e.jsx("span",{style:{color:"var(--Grey-Strong, #2E3236)",whiteSpace:"nowrap",flexShrink:0},children:d.label}),e.jsx("span",{style:{color:"var(--Grey-Muted, #808183)",textAlign:"right",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:d.value})]},d.label),Y=()=>e.jsxs("div",{onClick:()=>{b(d=>!d),r&&!w&&r()},style:{display:"flex",alignItems:"center",gap:6,padding:"8px 8px 12px 8px",cursor:"pointer",fontFamily:"var(--font-sans)",borderBottom:"1px solid var(--Grey-absent, #D9D9D9)"},children:[e.jsx("span",{style:{color:"var(--Grey-Strong, #2E3236)",fontSize:13,fontWeight:500,lineHeight:"normal"},children:"More Details"}),w?e.jsx(u.ChevronUp,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5}):e.jsx(u.ChevronDown,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5})]},"more-details");return e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignSelf:"stretch",gap:0,position:"relative",overflow:"visible"},children:[f.map((d,T)=>{var q;return e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:24,alignSelf:"stretch"},children:[e.jsx("div",{style:Ze,children:d[0]&&!d[0].isMoreDetails?O(d[0]):e.jsx("div",{style:{flex:1}})}),e.jsx("div",{style:Ze,children:d[1]&&!d[1].isMoreDetails?O(d[1]):(q=d[1])!=null&&q.isMoreDetails?Y():e.jsx("div",{style:{flex:1}})})]},T)}),w&&E.length>0&&e.jsxs("div",{style:{position:"absolute",top:"100%",right:0,marginTop:4,display:"flex",width:340,flexDirection:"column",alignItems:"flex-start",borderRadius:4,border:"1px solid var(--Grey-absent, #D9D9D9)",background:"var(--Grey-White, #FFF)",boxShadow:"-2px 2px 2px 0 rgba(0, 0, 0, 0.25)",overflow:"hidden",fontFamily:"var(--font-sans)",zIndex:50},children:[e.jsx("div",{style:{padding:"12px 16px",fontSize:13,fontWeight:600,color:"var(--Grey-Strong, #2E3236)",borderBottom:"1px solid var(--Grey-absent, #D9D9D9)",alignSelf:"stretch"},children:"More details"}),E.map(d=>e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"12px 16px",gap:24,fontSize:13,fontWeight:400,lineHeight:"normal",borderBottom:"1px solid var(--Grey-absent, #D9D9D9)",alignSelf:"stretch"},children:[e.jsx("span",{style:{color:"var(--Grey-Strong, #2E3236)",whiteSpace:"nowrap",flexShrink:0},children:d.label}),e.jsx("span",{style:{color:"var(--Grey-Muted, #808183)",fontSize:13,fontStyle:"normal",fontWeight:400,lineHeight:"120%",textAlign:"right"},children:d.value})]},d.label))]})]})},k={strong:"var(--Grey-Strong, #2E3236)",muted:"var(--Grey-Muted, #808183)",absent:"var(--Grey-absent, #D9D9D9)",white:"var(--Grey-White, #FFF)",cardBg:"var(--surface-warm-40, rgba(243, 241, 229, 0.40))"},R=1.2,Ue=3,Qe=t=>t!=null?Math.round(t*100)+"%":"—",Je=t=>{if(t==null)return"—";const n=(t*100).toFixed(1);return t>0?`+${n}pp`:`${n}pp`},st=({outcomeLift:t,driverLabels:n=[]})=>{var h;if(!t||t.lift==null)return null;const i=t.p_expected,o=t.p_full,s=t.lift_raw??(o!=null&&i!=null?o-i:null),r=t.lift,g=(h=t.interpretation)!=null&&h.lift_band?t.interpretation.lift_band.replace(/_/g," "):r>=0?"Positive":"Negative",x=g.charAt(0).toUpperCase()+g.slice(1),w=/negative/i.test(g)?u.ThumbsDown:u.ThumbsUp,b=n.slice(0,Ue),D=n.length-Ue;return e.jsxs("div",{style:{display:"flex",flexDirection:"column",padding:24,gap:24,borderRadius:8,border:`1px solid ${k.absent}`,background:k.cardBg,alignSelf:"stretch"},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:32},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:24,alignSelf:"stretch"},children:[e.jsx("span",{style:{fontSize:15,fontWeight:600,color:k.strong,fontFamily:"var(--font-sans)",lineHeight:R},children:"Agent Lift Analysis"}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--font-sans)"},children:[e.jsx("span",{style:{fontSize:13,fontWeight:400,color:k.strong,lineHeight:R},children:"vs. Average Agent:"}),e.jsx("span",{style:{fontSize:14,fontWeight:600,color:k.strong,lineHeight:R},children:Je(r)}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,paddingLeft:8,borderLeft:`1px solid ${k.absent}`},children:[e.jsx(w,{size:14,color:k.strong}),e.jsx("span",{style:{fontSize:13,fontWeight:600,color:k.strong,lineHeight:R},children:x})]})]})]}),e.jsxs("div",{style:{display:"flex",gap:24},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16,alignItems:"flex-start",flex:1,minWidth:0},children:[e.jsx("span",{style:{fontSize:28,fontWeight:400,color:k.muted,fontFamily:"var(--font-sans)",lineHeight:R},children:Qe(i)}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"flex-start",minHeight:48},children:[e.jsx("span",{style:{fontSize:13,fontWeight:400,color:k.strong,fontFamily:"var(--font-sans)",lineHeight:R,whiteSpace:"nowrap"},children:"Expected Outcome"}),e.jsx("span",{style:{fontSize:13,fontWeight:400,color:k.muted,fontFamily:"var(--font-sans)",lineHeight:R,textAlign:"left"},children:"Based on call type & difficulty"})]})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16,alignItems:"flex-start",paddingLeft:24,borderLeft:`1px solid ${k.absent}`,flex:1,minWidth:0},children:[e.jsx("span",{style:{fontSize:28,fontWeight:400,color:k.muted,fontFamily:"var(--font-sans)",lineHeight:R},children:Je(s)}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"flex-start",minHeight:48},children:[e.jsx("span",{style:{fontSize:13,fontWeight:400,color:k.strong,fontFamily:"var(--font-sans)",lineHeight:R,whiteSpace:"nowrap"},children:"Agent Impact"}),e.jsx("span",{style:{fontSize:13,fontWeight:400,color:k.muted,fontFamily:"var(--font-sans)",lineHeight:R,textAlign:"left"},children:"Behavior-driven change"})]})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16,alignItems:"flex-start",paddingLeft:24,borderLeft:`1px solid ${k.absent}`,flex:1,minWidth:0},children:[e.jsx("span",{style:{fontSize:28,fontWeight:400,color:k.strong,fontFamily:"var(--font-sans)",lineHeight:R},children:Qe(o)}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"flex-start",minHeight:48},children:[e.jsx("span",{style:{fontSize:13,fontWeight:600,color:k.strong,fontFamily:"var(--font-sans)",lineHeight:R,whiteSpace:"nowrap"},children:"Predicted Outcome"}),e.jsx("span",{style:{fontSize:13,fontWeight:400,color:k.muted,fontFamily:"var(--font-sans)",lineHeight:R,textAlign:"left"},children:"With agent behaviors"})]})]})]})]}),n.length>0&&e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,alignSelf:"stretch"},children:[e.jsx("span",{style:{fontSize:12,fontWeight:600,color:k.strong,fontFamily:"var(--font-sans)",lineHeight:R},children:"Key Drivers"}),e.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:[b.map((C,j)=>e.jsx("div",{style:{display:"flex",padding:8,alignItems:"center",justifyContent:"center",borderRadius:4,border:`1px solid ${k.absent}`,background:k.white},children:e.jsx("span",{style:{fontSize:12,fontWeight:400,color:k.strong,fontFamily:"var(--font-sans)",lineHeight:R,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:200},children:C})},j)),D>0&&e.jsx("div",{style:{display:"flex",padding:8,alignItems:"center",justifyContent:"center",borderRadius:4,border:`1px solid ${k.absent}`,background:k.white},children:e.jsxs("span",{style:{fontSize:12,fontWeight:400,color:k.strong,fontFamily:"var(--font-sans)",lineHeight:R,whiteSpace:"nowrap"},children:["+ ",D]})})]})]})]})},Xe=({children:t,size:n=28,onClick:i,title:o})=>{const[s,r]=c.useState(!1);return e.jsx("div",{title:o,onClick:i,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),style:{display:"flex",alignItems:"center",justifyContent:"center",width:n,height:n,borderRadius:9999,background:s?"var(--surface-hover, #F3F7F7)":"transparent",cursor:"pointer",flexShrink:0,transition:"background 0.15s"},children:t})},rt=({signals:t={signals:[],present_count:0,total_signals_evaluated:0},expandedSignals:n=new Set,toggleSignal:i=()=>{},playEvidence:o=()=>{},highlightTurns:s=()=>{},onShowInTranscript:r=()=>{},timelinePlaying:g=!1,currentTimeSeconds:x=0})=>{const m=(t==null?void 0:t.signals)??[],w=(t==null?void 0:t.present_count)??m.length,b=h=>{const C=Math.floor(h/6e4),j=Math.floor(h%6e4/1e3);return`${C.toString().padStart(2,"0")}:${j.toString().padStart(2,"0")}`},D=h=>g&&h.start_ms!=null&&x*1e3>=h.start_ms&&x*1e3<=(h.end_ms??h.start_ms+5e3);return e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",alignSelf:"stretch",width:"100%",gap:16},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,width:"100%"},children:[e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:34,height:34,borderRadius:9999,background:"var(--surface-hover, #F3F7F7)",flexShrink:0},children:e.jsx(u.FileSignal,{size:20,color:"#2E3236",strokeWidth:1.5})}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",flex:1},children:[e.jsx("span",{style:{fontSize:15,fontWeight:500,color:"var(--Grey-Strong, #2E3236)"},children:"Signals"}),e.jsxs("span",{style:{fontSize:14,fontWeight:500,color:"var(--Grey-Strong, #2E3236)"},children:[w," Signals Detected"]})]})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignSelf:"stretch",background:"var(--Grey-White, #FFF)",gap:8},children:[m.length===0&&e.jsx("div",{style:{padding:"8px 0",fontSize:14,color:"var(--Grey-Muted, #808183)"},children:"No signals detected."}),m.map((h,C)=>{var G,W,F;const j=h.key??h.id??C,v=n.has(j),S=((G=h.observations)==null?void 0:G.length)??0;return e.jsxs("div",{id:`signal-${j}`,style:{display:"flex",flexDirection:"column",width:"100%",gap:8},children:[e.jsxs("button",{onClick:()=>i(j),style:{display:"flex",padding:"8px 0",alignItems:"center",gap:12,alignSelf:"stretch",width:"100%",background:"none",border:"none",borderBottom:"1px solid var(--Grey-absent, #D9D9D9)",cursor:"pointer"},children:[e.jsxs("span",{style:{flex:1,textAlign:"left",fontSize:14,fontWeight:600,color:"var(--text-dark, #0B0A0A)",lineHeight:1.71},children:[h.display_name||((W=h.key)==null?void 0:W.replace(/_/g," ")),S>0&&e.jsxs("span",{style:{fontWeight:600,color:"var(--text-dark, #0B0A0A)",marginLeft:6},children:["(",S,")"]})]}),v?e.jsx(u.ChevronUp,{size:20,color:"#767473"}):e.jsx(u.ChevronDown,{size:20,color:"#767473"})]}),v&&((F=h.observations)==null?void 0:F.length)>0&&e.jsx("div",{style:{display:"flex",flexDirection:"column",alignSelf:"stretch",gap:0},children:h.observations.map((M,P)=>{var H,A,a;return e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignSelf:"stretch",gap:8},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,padding:"8px 0",justifyContent:"space-between"},children:[e.jsx("span",{style:{flex:1,fontSize:14,fontWeight:400,color:"var(--text-subtle-warm, #767473)",lineHeight:1.5},children:M.reason||M.explanation}),((A=(H=M.evidence)==null?void 0:H[0])==null?void 0:A.start_ms)!=null&&e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flexShrink:0},children:[e.jsx(Xe,{size:28,title:"Show in transcript",onClick:f=>{f.stopPropagation(),r(M.evidence[0].start_ms)},children:e.jsx(u.ScrollText,{size:16,color:"#808183",strokeWidth:1.5})}),e.jsx("span",{style:{fontSize:13,fontWeight:400,color:"var(--Grey-Muted, #808183)",lineHeight:1.2,whiteSpace:"nowrap"},children:b(M.evidence[0].start_ms)})]})]}),(a=M.evidence)==null?void 0:a.map((f,l)=>{const E=f.start_ms!=null&&f.end_ms!=null;return f.text&&e.jsxs("div",{onClick:O=>{O.stopPropagation(),E&&o(f)},onMouseEnter:()=>s(f.turn_ids??[]),onMouseLeave:()=>s([]),style:{display:"flex",alignItems:"center",gap:8,padding:"8px 0",cursor:E?"pointer":"default"},children:[E&&e.jsx(Xe,{size:28,children:D(f)?e.jsx(u.PauseCircle,{size:17,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5}):e.jsx(u.PlayCircle,{size:17,color:"var(--Grey-Muted, #808183)",strokeWidth:1})}),e.jsxs("span",{style:{fontSize:13,fontWeight:400,color:"var(--Grey-Strong, #2E3236)",lineHeight:1.2},children:["“",f.text,"”"]})]},l)})]},M.key??P)})})]},j)})]})]})},L={strong:"var(--Grey-Strong, #2E3236)",muted:"var(--Grey-Muted, #808183)",absent:"var(--Grey-absent, #D9D9D9)",white:"var(--Grey-White, #FFF)",accent:"var(--rail-orange, #C98A5A)",track:"var(--rail-surface-2, #E3E1D7)",infoIcon:"var(--color-input-border, #ACACAD)"},Ut=({score:t=4,maxScore:n=10})=>{const w=Math.min(Math.round(t/n*5),5),b=180/5,D=j=>{const v=j*Math.PI/180;return{x:121.5+85*Math.cos(v),y:123-85*Math.sin(v)}},h=(j,v)=>{const S=D(j),G=D(v),W=j-v>180?1:0;return`M ${S.x} ${S.y} A 85 85 0 ${W} 1 ${G.x} ${G.y}`},C=2;return e.jsx("svg",{width:"100%",viewBox:"0 0 243 130",fill:"none",style:{maxWidth:243},children:Array.from({length:5},(j,v)=>{const S=180-v*b-(v>0?C/2:0),G=180-(v+1)*b+(v<5-1?C/2:0),W=v<w;return e.jsx("path",{d:h(S,G),stroke:W?L.strong:L.track,strokeWidth:30,strokeLinecap:"butt",fill:"none"},v)})})},Qt=({value:t=0,maxValue:n=5})=>e.jsx("div",{style:{display:"flex",gap:2},children:Array.from({length:n},(i,o)=>e.jsx("div",{style:{width:22,height:6,borderRadius:1,background:o<t?L.strong:L.track}},o))}),Jt={CSAT:"Predicted Customer Satisfaction",Resolution:"Predicted Resolution: was the issue fully resolved?","Process Adherence":"Process Adherence: Did the agent follow procedures?",Communication:"Predicted Communication Quality: Clarity, Empathy, Professionalism"},Xt=({text:t,children:n})=>{const[i,o]=c.useState(!1),s=c.useRef(null),[r,g]=c.useState({top:0,left:0}),x=()=>{if(s.current){const m=s.current.getBoundingClientRect();g({top:m.top-8,left:m.left+m.width/2})}o(!0)};return e.jsxs("div",{ref:s,style:{position:"relative",display:"inline-flex"},onMouseEnter:x,onMouseLeave:()=>o(!1),children:[n,i&&e.jsx("div",{style:{position:"fixed",top:r.top,left:r.left,transform:"translate(-50%, -100%)",display:"flex",width:"max-content",maxWidth:300,padding:10,alignItems:"center",borderRadius:4,border:"1px solid var(--Grey-absent, #D9D9D9)",background:"var(--Grey-Strong, #2E3236)",zIndex:9999,pointerEvents:"none"},children:e.jsx("span",{style:{color:"#FFF",fontSize:12,fontWeight:400,lineHeight:"140%"},children:t})})]})},en=({label:t,value:n=0,maxValue:i=5})=>e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,padding:8,alignItems:"flex-start"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx("span",{style:{fontSize:12,fontWeight:400,color:L.strong,fontFamily:"var(--font-sans)",lineHeight:"normal"},children:t}),e.jsx(Xt,{text:Jt[t]||t,children:e.jsx(u.Info,{size:14,color:L.infoIcon,strokeWidth:1,style:{cursor:"pointer"}})})]}),e.jsx(Qt,{value:n,maxValue:i})]}),ot=({score:t=83,maxScore:n=100,predictedScore:i=4,predictedLabel:o="Predicted Objective",description:s="",legends:r=[{label:"CSAT",value:3},{label:"Resolution",value:4},{label:"Process Adherence",value:5},{label:"Communication",value:3}]})=>(String(i).padStart(2,"0"),e.jsxs("div",{style:{display:"flex",flexDirection:"column",padding:24,borderRadius:8,border:`1px solid ${L.absent}`,background:L.white,alignSelf:"stretch",flex:1,gap:24},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[e.jsx("span",{style:{fontSize:15,fontWeight:600,color:L.strong,fontFamily:"var(--font-sans)",lineHeight:1.2},children:"Compass Score"}),e.jsx("span",{style:{fontSize:14,fontWeight:400,color:L.muted,fontFamily:"var(--font-sans)",lineHeight:"normal"},children:s})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:24,flex:1,overflow:"hidden"},children:[e.jsxs("div",{style:{position:"relative",maxWidth:243,minWidth:160,flex:"0 1 243px",flexDirection:"column",alignItems:"center",display:"flex"},children:[e.jsx(Ut,{score:t,maxScore:n}),(()=>{const m=-(180-(n>0?Math.min(t/n,1):0)*180-45);return e.jsxs("svg",{width:"34",height:"35",viewBox:"0 0 34 35",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{marginTop:-24,transform:`rotate(${m}deg)`,transformOrigin:"center center"},children:[e.jsx("path",{d:"M16 25.2169C19.958 25.2169 23.1667 22.0083 23.1667 18.0503C23.1667 14.0922 19.958 10.8836 16 10.8836C12.042 10.8836 8.83334 14.0922 8.83334 18.0503C8.83334 22.0083 12.042 25.2169 16 25.2169Z",fill:"var(--rail-orange, #C98A5A)"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M30.4791 11.2328L33.4351 0L21.6888 3.09113C19.9212 2.41855 18.0036 2.05025 16 2.05025C7.16344 2.05025 0 9.2137 0 18.0503C0 26.8868 7.16344 34.0503 16 34.0503C24.8366 34.0503 32 26.8868 32 18.0503C32 15.6119 31.4546 13.301 30.4791 11.2328ZM16 30.5503C22.9036 30.5503 28.5 24.9538 28.5 18.0503C28.5 11.1467 22.9036 5.55025 16 5.55025C9.09644 5.55025 3.5 11.1467 3.5 18.0503C3.5 24.9538 9.09644 30.5503 16 30.5503Z",fill:"var(--rail-orange, #C98A5A)"})]})})(),e.jsx("div",{style:{fontSize:28,fontWeight:400,color:L.strong,fontFamily:"var(--font-sans)",lineHeight:1,textAlign:"center",marginTop:8},children:t})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"flex-start",justifyContent:"center",flex:1},children:[e.jsx("div",{style:{fontSize:15,fontWeight:500,color:L.strong,fontFamily:"var(--font-sans)",lineHeight:1.2,textAlign:"left"},children:"Interaction Quality Index"}),e.jsx("div",{style:{width:"100%",height:1,background:L.absent}}),r.map((g,x)=>e.jsx(en,{label:g.label,value:g.value},x))]})]})]})),Se=t=>{if(!t)return null;const n=String(t).toLowerCase();return n==="supervisor"?"var(--rail-compliance, #C98A5A)":n==="admin"||n==="administrator"?"var(--rail-discovery, #5E88B0)":n==="agent"?"var(--rail-outcome, #6B7C93)":null},de=t=>(t||"").split(" ").map(n=>n[0]).join("").toUpperCase()||"U",tn=t=>{if(!t||t==="Just now")return!0;if(/^\d{4}-\d{2}-\d{2}T/.test(t))try{const i=/Z$|[+-]\d{2}:\d{2}$/.test(t)?t:t+"Z",o=new Date(i);return Number.isNaN(o.getTime())?!1:Date.now()-o.getTime()<15*60*1e3}catch{return!1}const n=t.match(/^(\d+)\s*min/);return n?parseInt(n[1],10)<15:!(/\d+\s*h/.test(t)||/\d+\s*day/.test(t))},nn=t=>{if(!t)return"";if(!/^\d{4}-\d{2}-\d{2}T/.test(t))return t;try{const n=/Z$|[+-]\d{2}:\d{2}$/.test(t)?t:t+"Z",i=new Date(n);if(Number.isNaN(i.getTime()))return t;const s=new Date().getTime()-i.getTime(),r=Math.floor(s/6e4),g=Math.floor(s/36e5);if(r<1)return"Just now";if(r<60)return`${r} min`;if(g<24)return`${g} h`;const x=Math.floor(g/24);return x===1?"1 day":`${x} days`}catch{return t}},lt=({name:t,initials:n,color:i,avatar:o,size:s=36})=>o?e.jsx("img",{src:o,alt:t,style:{width:s,height:s,borderRadius:"50%",objectFit:"cover",flexShrink:0}}):e.jsx("div",{style:{width:s,height:s,borderRadius:"50%",background:i||"#6B7C93",color:"#FFF",display:"flex",alignItems:"center",justifyContent:"center",fontSize:s<=32?"10px":"11px",fontWeight:650,flexShrink:0,fontFamily:"var(--default-font-family)",letterSpacing:"0.02em"},title:t,children:n||de(t)}),sn=({comment:t,isReply:n=!1,isConsecutive:i=!1,onReply:o,onSendReply:s,onEdit:r,onDelete:g,onMenuClick:x,showReply:m=!0})=>{var fe,ie;const[w,b]=c.useState(!1),[D,h]=c.useState(!1),[C,j]=c.useState(!1),[v,S]=c.useState(""),[G,W]=c.useState(!1),[F,M]=c.useState(""),[P,H]=c.useState(!1),A=c.useRef(null),a=c.useRef(null),f=t.author||{},l=f.name||t.author_name||"Unknown",E=f.initials||de(l),O=f.role||t.author_role,Y=f.color||Se(O)||"#6B7C93",d=f.avatar||t.avatar,T=t.timestamp||t.created_at,q=nn(T),K=tn(T),ce=Array.isArray(t.content)?t.content:[t.content||t.text||""];return c.useEffect(()=>{if(!D)return;const p=Q=>{A.current&&!A.current.contains(Q.target)&&h(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[D]),e.jsxs("div",{onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),style:{display:"flex",paddingLeft:n?48:0,alignItems:"flex-start",gap:16,paddingTop:i?0:8,paddingBottom:8},children:[i?e.jsx("div",{style:{width:36,flexShrink:0}}):e.jsx(lt,{name:l,initials:E,color:Y,avatar:d}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:i?"flex-end":"space-between",marginBottom:i?0:6},children:[!i&&e.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:8},children:[e.jsx("span",{style:{fontSize:13,fontWeight:650,color:"var(--text-ink, #1E2125)",lineHeight:"150%",fontFamily:"var(--default-font-family)"},children:l}),e.jsx("span",{style:{fontSize:12,fontWeight:400,color:"var(--Grey-Muted, #808183)",lineHeight:"150%",fontFamily:"var(--default-font-family)"},children:q}),(t.isEdited||t.is_edited)&&e.jsx("span",{style:{fontSize:12,fontWeight:400,color:"var(--Grey-Muted, #808183)",lineHeight:"150%",fontFamily:"var(--default-font-family)"},children:"(Edited)"})]}),e.jsxs("div",{style:{position:"relative"},ref:A,children:[e.jsx("button",{type:"button",onClick:()=>h(p=>!p),style:{padding:2,border:"none",background:"transparent",cursor:"pointer",borderRadius:4,display:"flex",alignItems:"center",justifyContent:"center",opacity:w||D?1:0,transition:"opacity 0.15s",flexShrink:0},children:e.jsx(u.Ellipsis,{size:24,color:"var(--Grey-Muted, #808183)"})}),D&&e.jsxs("div",{style:{position:"absolute",top:"100%",right:0,marginTop:4,display:"flex",width:99,flexDirection:"column",alignItems:"flex-start",borderRadius:4,border:"1px solid var(--Grey-absent, #D9D9D9)",background:"var(--Grey-White, #FFF)",boxShadow:"-2px 2px 2px 0 rgba(0, 0, 0, 0.25)",zIndex:50,overflow:"hidden"},children:[o&&e.jsx("button",{type:"button",onClick:()=>{h(!1),W(!1),j(!0)},style:{display:"flex",width:"100%",padding:"10px 16px",alignItems:"center",border:"none",background:"transparent",cursor:"pointer",fontSize:13,fontWeight:400,color:"var(--Grey-Strong, #2E3236)",fontFamily:"var(--default-font-family)",lineHeight:"150%",textAlign:"left"},onMouseEnter:p=>{p.currentTarget.style.background="var(--surface-hover, #F3F7F7)"},onMouseLeave:p=>{p.currentTarget.style.background="transparent"},children:"Reply"}),r&&e.jsx("button",{type:"button",disabled:!K,onClick:()=>{if(!K)return;h(!1);const p=Array.isArray(t.content)?t.content.join(`
|
|
16
|
-
`):t.content||t.text||"";M(p),W(!0),j(!1)},style:{display:"flex",width:"100%",padding:"10px 16px",alignItems:"center",border:"none",background:"transparent",cursor:K?"pointer":"not-allowed",fontSize:13,fontWeight:400,color:K?"var(--Grey-Strong, #2E3236)":"var(--Grey-Muted, #808183)",fontFamily:"var(--default-font-family)",lineHeight:"150%",textAlign:"left",opacity:K?1:.5},onMouseEnter:p=>{K&&(p.currentTarget.style.background="var(--surface-hover, #F3F7F7)")},onMouseLeave:p=>{p.currentTarget.style.background="transparent"},children:"Edit"}),g&&e.jsx("button",{type:"button",onClick:()=>{h(!1),H(!0)},style:{display:"flex",width:"100%",padding:"10px 16px",alignItems:"center",border:"none",background:"transparent",cursor:"pointer",fontSize:13,fontWeight:400,color:"var(--Grey-Strong, #2E3236)",fontFamily:"var(--default-font-family)",lineHeight:"150%",textAlign:"left"},onMouseEnter:p=>{p.currentTarget.style.background="var(--surface-hover, #F3F7F7)"},onMouseLeave:p=>{p.currentTarget.style.background="transparent"},children:"Delete"})]})]})]}),G?e.jsxs("div",{style:{display:"flex",width:662,maxWidth:"100%",padding:"8px 12px 12px 12px",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:24,borderRadius:8,border:"1px solid var(--Grey-absent, #D9D9D9)",background:"var(--Grey-White, #FFF)",boxSizing:"border-box",marginTop:4},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},children:[e.jsxs("span",{style:{fontSize:13,fontWeight:600,color:"var(--Grey-Muted, #808183)",fontFamily:"var(--default-font-family)",lineHeight:"normal"},children:["“"," ",((fe=t.author)==null?void 0:fe.name)||"Unknown"]}),e.jsx("button",{type:"button",onClick:()=>W(!1),style:{display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",cursor:"pointer",padding:0},children:e.jsx(u.X,{size:20,color:"var(--Grey-Muted, #808183)"})})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,width:"100%"},children:[e.jsx("input",{value:F,onChange:p=>M(p.target.value),onKeyDown:p=>{p.key==="Enter"&&!p.shiftKey&&(p.preventDefault(),F.trim()&&(r==null||r({...t,content:F.trim(),isEdited:!0}),W(!1))),p.key==="Escape"&&W(!1)},autoFocus:!0,style:{flex:1,padding:"10px 12px",fontSize:13,fontWeight:400,color:"var(--text-ink, #1E2125)",fontFamily:"var(--default-font-family)",lineHeight:"160%",border:"none",background:"transparent",outline:"none",boxSizing:"border-box"}}),e.jsx("button",{type:"button",onClick:()=>{F.trim()&&(r==null||r({...t,content:F.trim(),isEdited:!0}),W(!1))},disabled:!F.trim(),style:{display:"flex",padding:"6px 16px",justifyContent:"center",alignItems:"center",fontSize:13,fontWeight:600,color:F.trim()?"var(--Grey-White, #FFF)":"var(--Grey-Muted, #808183)",background:F.trim()?"var(--Grey-Strong, #2E3236)":"var(--grey-light, #e9e8e8a1)",border:"none",borderRadius:6,cursor:F.trim()?"pointer":"not-allowed",fontFamily:"var(--default-font-family)",flexShrink:0,transition:"all 0.15s",lineHeight:"150%"},children:"Save"})]})]}):e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:4,alignItems:"flex-start"},children:ce.map((p,Q)=>e.jsx("div",{style:{fontSize:13,fontWeight:400,color:"var(--text-ink, #1E2125)",lineHeight:"160%",fontFamily:"var(--default-font-family)",padding:"8px 12px",background:n?"var(--surface-hover, #F3F7F7)":"var(--surface-warm-40, rgba(243, 241, 229, 0.40))",borderRadius:8,wordBreak:"break-word"},children:p},Q))}),P&&e.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:8,marginTop:8,fontSize:13,fontFamily:"var(--default-font-family)"},children:[e.jsx("span",{style:{color:"var(--Grey-Muted, #808183)",fontWeight:400},children:"Confirm: delete this comment?"}),e.jsx("button",{type:"button",onClick:()=>{H(!1),g==null||g(t)},style:{background:"var(--grey-light, #e9e8e8a1)",border:"none",cursor:"pointer",fontSize:13,fontWeight:600,color:"var(--text-ink, #1E2125)",fontFamily:"var(--default-font-family)",padding:"4px 10px",borderRadius:6,transition:"background 0.15s"},onMouseEnter:p=>{p.currentTarget.style.background="var(--Grey-absent, #D9D9D9)"},onMouseLeave:p=>{p.currentTarget.style.background="var(--grey-light, #e9e8e8a1)"},children:"Delete"}),e.jsx("button",{type:"button",onClick:()=>H(!1),style:{background:"none",border:"none",cursor:"pointer",fontSize:13,fontWeight:400,color:"var(--Grey-Muted, #808183)",fontFamily:"var(--default-font-family)",padding:"4px 10px",borderRadius:6,transition:"background 0.15s"},onMouseEnter:p=>{p.currentTarget.style.background="var(--grey-light, #e9e8e8a1)"},onMouseLeave:p=>{p.currentTarget.style.background="none"},children:"Cancel"})]}),m&&o&&!C&&!P&&e.jsxs("button",{type:"button",onClick:()=>{W(!1),j(!0)},style:{display:"flex",alignItems:"center",gap:6,marginTop:8,padding:0,border:"none",background:"transparent",cursor:"pointer",fontSize:13,fontWeight:400,color:"var(--Grey-Muted, #808183)",fontFamily:"var(--default-font-family)",transition:"color 0.15s"},children:[e.jsx(u.CornerDownRight,{size:20,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5}),"Reply"]}),C&&e.jsxs("div",{style:{display:"flex",width:662,maxWidth:"100%",padding:"8px 12px 12px 12px",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:24,borderRadius:8,border:"1px solid var(--Grey-absent, #D9D9D9)",background:"var(--Grey-White, #FFF)",boxSizing:"border-box",marginTop:12},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,width:"100%"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},children:[e.jsxs("span",{style:{fontSize:13,fontWeight:600,color:"var(--Grey-Muted, #808183)",fontFamily:"var(--default-font-family)",lineHeight:"normal"},children:["“"," ",((ie=t.author)==null?void 0:ie.name)||"Unknown"]}),e.jsx("button",{type:"button",onClick:()=>{S(""),j(!1)},style:{display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",cursor:"pointer",padding:0},children:e.jsx(u.X,{size:20,color:"var(--Grey-Muted, #808183)"})})]}),e.jsx("div",{style:{display:"flex",height:36,padding:16,alignItems:"center",gap:5,borderRadius:"0 8px 8px 8px",background:"var(--Grey-Strong, #2E3236)",boxSizing:"border-box",width:"100%"},children:e.jsx("span",{style:{color:"var(--Grey-White, #FFF)",fontSize:13,fontWeight:400,fontFamily:"var(--default-font-family)",lineHeight:"normal",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:Array.isArray(t.content)?t.content[0]:t.content})})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,width:"100%"},children:[e.jsx("input",{ref:a,value:v,onChange:p=>S(p.target.value),onKeyDown:p=>{p.key==="Enter"&&!p.shiftKey&&(p.preventDefault(),v.trim()&&(s==null||s({content:v.trim(),parentId:t.id}),S(""),j(!1))),p.key==="Escape"&&(S(""),j(!1))},autoFocus:!0,placeholder:"Add a reply",style:{flex:1,padding:"10px 12px",fontSize:13,fontWeight:400,color:"var(--text-ink, #1E2125)",fontFamily:"var(--default-font-family)",lineHeight:"160%",border:"none",background:"transparent",outline:"none",boxSizing:"border-box"}}),e.jsx("button",{type:"button",onClick:()=>{v.trim()&&(s==null||s({content:v.trim(),parentId:t.id}),S(""),j(!1))},disabled:!v.trim(),style:{display:"flex",height:28,padding:"8px 12px",justifyContent:"center",alignItems:"center",gap:8,fontSize:13,fontWeight:600,color:v.trim()?"var(--Grey-White, #FFF)":"var(--Grey-Muted, #808183)",background:v.trim()?"var(--Neutral-850, #272727)":"var(--grey-light, #e9e8e8a1)",border:"none",borderRadius:10,cursor:v.trim()?"pointer":"not-allowed",fontFamily:"var(--default-font-family)",lineHeight:"150%"},children:"Post"})]})]})]})]})},rn=({currentUser:t,onSubmit:n})=>{const[i,o]=c.useState(""),[s,r]=c.useState(!1),g=c.useRef(null),x=()=>{const h=i.trim();h&&(n==null||n(h),o(""))},m=h=>{h.key==="Enter"&&!h.shiftKey&&(h.preventDefault(),x())},w=(t==null?void 0:t.initials)||de(t==null?void 0:t.name),b=(t==null?void 0:t.color)||Se(t==null?void 0:t.role)||"#6B7C93",D=t==null?void 0:t.avatar;return e.jsxs("div",{style:{display:"flex",gap:16,alignItems:"flex-start"},children:[e.jsx(lt,{name:t==null?void 0:t.name,initials:w,color:b,avatar:D}),e.jsx("div",{style:{flex:1,padding:12,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:24,borderRadius:8,border:s?"1px solid var(--Grey-Strong, #2E3236)":"1px solid var(--Grey-absent, #D9D9D9)",background:"var(--Grey-White, #FFF)",transition:"border-color 0.15s"},children:e.jsxs("div",{style:{display:"flex",alignItems:"flex-end",gap:8,width:"100%"},children:[e.jsx("textarea",{ref:g,value:i,onChange:h=>o(h.target.value),onFocus:()=>r(!0),onBlur:()=>r(!1),onKeyDown:m,placeholder:"Add feedback",rows:1,style:{flex:1,border:"none",outline:"none",resize:"none",fontSize:13,fontWeight:400,color:"var(--text-ink, #1E2125)",fontFamily:"var(--default-font-family)",lineHeight:"160%",background:"transparent",padding:0,minHeight:24}}),e.jsx("button",{type:"button",onClick:x,disabled:!i.trim(),style:{display:"flex",padding:"6px 16px",justifyContent:"center",alignItems:"center",fontSize:13,fontWeight:600,color:i.trim()?"var(--Grey-White, #FFF)":"var(--Grey-Muted, #808183)",background:i.trim()?"var(--Grey-Strong, #2E3236)":"var(--grey-light, #e9e8e8a1)",border:"none",borderRadius:6,cursor:i.trim()?"pointer":"not-allowed",fontFamily:"var(--default-font-family)",transition:"all 0.15s",flexShrink:0,lineHeight:"150%"},children:"Post"})]})})]})},at=({comment:t,depth:n=0,isConsecutive:i=!1,onReply:o,onSendReply:s,onEdit:r,onDelete:g,onMenuClick:x})=>{const m=t.replies&&t.replies.length>0,w=!m;return e.jsxs(c.Fragment,{children:[e.jsx("div",{style:{paddingLeft:n>0?Math.min(n*32,128):0},children:e.jsx(sn,{comment:t,isReply:n>0,isConsecutive:i,onReply:o,onSendReply:s,onEdit:r,onDelete:g,onMenuClick:x,showReply:w})}),m&&t.replies.map(b=>e.jsx(at,{comment:b,depth:n+1,onReply:o,onSendReply:s,onEdit:r,onDelete:g,onMenuClick:x},b.id))]})},dt=({comments:t=[],totalComments:n,children:i,onSendComment:o,onReply:s,onSendReply:r,onEdit:g,onDelete:x,onMenuClick:m,onMarkResolved:w,currentUser:b,isResolved:D=!1})=>{const[h,C]=c.useState([]),[j,v]=c.useState(!1),S=c.useMemo(()=>{const a=new Set(t.map(l=>l.id)),f=h.filter(l=>!a.has(l.id));return[...t,...f]},[t,h]);c.useEffect(()=>{const a=new Set(t.map(f=>f.id));C(f=>f.filter(l=>!a.has(l.id)))},[t]);const G=c.useMemo(()=>{if(!b)return{name:"You",initials:"YO",color:"#6B7C93"};const a=b.name||"You",f=b.initials||de(a),l=b.role&&String(b.role).toLowerCase(),E=b.color||Se(l)||"#6B7C93";return{...b,name:a,initials:f,color:E}},[b]),W=async({content:a,parentId:f})=>{if(r){v(!0);try{await r({content:a,parentId:f})}finally{v(!1)}}else{const l={id:`temp-${Date.now()}`,author:G,content:a,timestamp:"Just now",parentId:f,isOptimistic:!0};C(E=>[...E,l])}},F=async a=>{if(o){v(!0);try{await o(a)}finally{v(!1)}}else{const f={id:`temp-${Date.now()}`,author:G,content:a,timestamp:"Just now",isOptimistic:!0};C(l=>[...l,f])}},M=a=>{C(f=>f.map(l=>l.id===a.id?{...l,content:a.content,isEdited:!0}:l)),g==null||g(a)},P=a=>{C(f=>f.filter(l=>l.id!==a.id)),x==null||x(a)},H=c.useMemo(()=>{const a={};S.forEach(l=>{l.parentId&&(a[l.parentId]||(a[l.parentId]=[]),a[l.parentId].push(l))});const f=l=>({...l,replies:(a[l.id]||[]).map(f)});return S.filter(l=>!l.parentId).map(f)},[S]),A=n??S.length;return e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",background:"var(--Grey-White, #FFF)",width:"100%",fontFamily:"var(--default-font-family)"},children:[e.jsxs("div",{style:{display:"flex",height:40,paddingBottom:8,alignItems:"center",gap:8,alignSelf:"stretch"},children:[e.jsx(u.MessagesSquare,{size:24,color:"var(--rail-orange, #C98A5A)",strokeWidth:1.5}),e.jsx("span",{style:{fontSize:16,fontWeight:600,color:"var(--Grey-Strong, #2E3236)",textTransform:"uppercase",lineHeight:1.2},children:"Feedback & Guidance"})]}),e.jsx("div",{style:{width:"100%",height:1,background:"var(--Grey-absent, #D9D9D9)"}}),e.jsxs("div",{style:{display:"flex",gap:24,alignSelf:"stretch"},children:[e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,paddingTop:16,paddingBottom:8},children:[e.jsx("div",{style:{width:34,height:34,borderRadius:9999,background:"var(--surface-hover, #F3F7F7)",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:e.jsx(u.MessagesSquare,{style:{width:20,height:20,flexShrink:0},color:"var(--Grey-Strong, #2E3236)",strokeWidth:1.5})}),e.jsx("span",{style:{fontSize:15,fontWeight:500,color:"var(--Grey-Strong, #2E3236)"},children:"Feedback"}),e.jsxs("span",{style:{fontSize:13,fontWeight:400,color:"var(--Grey-Muted, #808183)",fontFamily:"var(--default-font-family)",lineHeight:"150%",marginLeft:"auto"},children:[A," Comment",A!==1?"s":""]}),D?e.jsxs("div",{style:{display:"inline-flex",height:32,padding:"12px 16px 12px 12px",justifyContent:"center",alignItems:"center",gap:8,borderRadius:10,background:"var(--Rail-Surface-2, #E3E1D7)",flexShrink:0},children:[e.jsx(u.Check,{size:16,color:"var(--Grey-Strong, #2E3236)",strokeWidth:2}),e.jsx("span",{style:{fontSize:13,fontWeight:500,color:"var(--Grey-Strong, #2E3236)",fontFamily:"var(--default-font-family)",lineHeight:"150%"},children:"Resolved"})]}):w?e.jsxs("button",{type:"button",onClick:w,style:{display:"flex",alignItems:"center",gap:8,padding:"8px 16px",fontSize:13,fontWeight:500,color:"var(--Grey-Strong, #2E3236)",background:"var(--Grey-White, #FFF)",border:"1px solid var(--Grey-absent, #D9D9D9)",borderRadius:20,cursor:"pointer",fontFamily:"var(--default-font-family)",transition:"background 0.15s",lineHeight:"150%",flexShrink:0},children:[e.jsx(u.CircleCheck,{size:16,color:"var(--Grey-Strong, #2E3236)",strokeWidth:1.5}),"Mark as Resolved"]}):null]}),S.length>0&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:0,marginBottom:24,maxHeight:600,overflowY:S.length>6?"auto":"visible"},children:H.map((a,f)=>{var d,T;const l=f>0?H[f-1]:null,E=((d=l==null?void 0:l.author)==null?void 0:d.name)||(l==null?void 0:l.author_name),O=((T=a.author)==null?void 0:T.name)||a.author_name,Y=l&&E===O&&(!l.replies||l.replies.length===0);return e.jsx(at,{comment:a,depth:0,isConsecutive:!!Y,onReply:s,onSendReply:W,onEdit:M,onDelete:P,onMenuClick:m},a.id)})}),S.length>0&&e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:16,marginLeft:48},children:[e.jsx(u.Info,{size:16,color:"var(--Grey-Muted, #808183)"}),e.jsx("span",{style:{color:"var(--Grey-Muted, #808183)",fontSize:13,fontStyle:"normal",fontWeight:400,lineHeight:"normal"},children:"Comments can be edited within 15 minutes."})]}),j&&e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 0"},children:[e.jsx("div",{style:{width:16,height:16,border:"2px solid var(--Grey-absent, #D9D9D9)",borderTopColor:"var(--Grey-Strong, #2E3236)",borderRadius:"50%",animation:"spin 0.8s linear infinite"}}),e.jsx("span",{style:{fontSize:13,color:"var(--Grey-Muted, #808183)",fontFamily:"var(--default-font-family)"},children:"Sending..."}),e.jsx("style",{children:"@keyframes spin { to { transform: rotate(360deg); } }"})]}),e.jsx(rn,{currentUser:G,onSubmit:F})]}),e.jsx("div",{style:{flex:1,minWidth:0},children:i})]})]})},et=({children:t,size:n=28,onClick:i,title:o})=>{const[s,r]=c.useState(!1);return e.jsx("div",{title:o,onClick:i,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),style:{display:"flex",alignItems:"center",justifyContent:"center",width:n,height:n,borderRadius:9999,background:s?"var(--surface-hover, #F3F7F7)":"transparent",cursor:"pointer",flexShrink:0,transition:"background 0.15s"},children:t})},on=t=>{const n=Math.floor(t/6e4),i=Math.floor(t%6e4/1e3);return`${n.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}`},ln=({item:t,isLast:n,onPlayEvidence:i,onShowInTranscript:o})=>{var x;const s=(x=t.signal_refs)==null?void 0:x.map(m=>{const w=m.display_name||m.signal_key||"",b=m.confidence!=null?` (${Math.round(m.confidence*100)}%)`:"";return w+b}).join(", "),r=t.start_ms??t.startMs,g=r!=null;return e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,padding:"12px 0",borderBottom:n?"none":"1px solid var(--Grey-absent, #D9D9D9)"},children:[e.jsx("span",{style:{alignSelf:"stretch",fontSize:14,fontWeight:400,color:"var(--Grey-Strong, #2E3236)",lineHeight:"150%"},children:t.title||t.detail||""}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[s&&e.jsx("span",{style:{fontSize:14,fontWeight:400,color:"var(--Grey-Muted, #808183)",fontFamily:"var(--default-font-family)",lineHeight:"150%",flex:1,minWidth:0},children:s}),g&&e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flexShrink:0},children:[e.jsx(et,{size:28,title:"Play evidence",onClick:()=>i==null?void 0:i({start_ms:r,end_ms:t.end_ms??t.endMs}),children:e.jsx(u.PlayCircle,{size:17,color:"var(--Grey-Muted, #808183)",strokeWidth:1})}),e.jsx(et,{size:28,title:"Show in transcript",onClick:()=>o==null?void 0:o(r),children:e.jsx(u.ScrollText,{size:16,color:"#808183",strokeWidth:1.5})}),e.jsx("span",{style:{fontSize:13,fontWeight:400,color:"var(--Grey-Muted, #808183)",lineHeight:1.2,whiteSpace:"nowrap"},children:on(r)})]})]})]})},ct=({items:t=[],guidanceCount:n,loading:i=!1,onPlayEvidence:o,onShowInTranscript:s})=>{const r=n??t.length;return e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch",width:"100%"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,paddingTop:16,paddingBottom:8},children:[e.jsx("div",{style:{width:34,height:34,borderRadius:9999,background:"var(--surface-hover, #F3F7F7)",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:e.jsx(u.Lightbulb,{style:{width:20,height:20,flexShrink:0},color:"var(--Grey-Strong, #2E3236)",strokeWidth:1.5})}),e.jsx("span",{style:{fontSize:15,fontWeight:500,color:"var(--Grey-Strong, #2E3236)"},children:"Guidance"}),e.jsxs("span",{style:{fontSize:13,fontWeight:400,color:"var(--Grey-Muted, #808183)",fontFamily:"var(--default-font-family)",lineHeight:"150%",marginLeft:"auto"},children:[r," Item",r!==1?"s":""]})]}),t.map((g,x)=>e.jsx(ln,{item:g,isLast:x===t.length-1,onPlayEvidence:o,onShowInTranscript:s},x))]})},ne=({text:t,children:n})=>{const[i,o]=c.useState(!1),s=c.useRef(null),[r,g]=c.useState({top:0,left:0});if(!t)return n;const x=()=>{if(s.current){const m=s.current.getBoundingClientRect();g({top:m.top-2,left:m.left+m.width/2})}o(!0)};return e.jsxs("div",{ref:s,style:{position:"relative",display:"inline-flex"},onMouseEnter:x,onMouseLeave:()=>o(!1),children:[n,i&&e.jsx("div",{style:{position:"fixed",top:r.top,left:r.left,transform:"translate(-50%, -100%)",display:"flex",padding:10,alignItems:"center",borderRadius:4,border:"1px solid var(--Grey-absent, #D9D9D9)",background:"var(--Grey-Strong, #2E3236)",zIndex:9999,pointerEvents:"none",whiteSpace:"nowrap"},children:e.jsx("span",{style:{color:"#FFF",fontSize:12,fontWeight:400,lineHeight:"normal"},children:t})})]})},an=[{key:"overview",label:"Overview"},{key:"coaching",label:"Coaching Summary"},{key:"signals",label:"Signals & Recording"},{key:"comments",label:"Feedback"}],dn=({title:t="Wheel Stud Replacement Enquiry",onBack:n,data:i,coachingData:o,coachingLoading:s=!1,audioUrl:r,audioRef:g,currentTimeSeconds:x,timelinePlaying:m,playbackRate:w,timelineSegments:b,onSeek:D,onTogglePlay:h,onSeekBack:C,onSeekForward:j,onSetPlaybackRate:v,agentName:S,agentFullName:G,customerName:W,customerFullName:F,transcript:M,activeTurnIndex:P,turnObservations:H,highlightedTurns:A,onTurnPlayPause:a,onPlayEvidence:f,onHighlightTurns:l,callPurpose:E,classification:O,outcomeQuality:Y,resolutionOutcome:d,customerIntent:T,interactionId:q,moreDetails:K,compassScore:ce,compassMaxScore:fe=10,predictedCsat:ie,predictedLabel:p="Predicted Objective",compassLegends:Q,customerSessions:ft,customerSessionCount:pt,onSessionClick:ke,onViewAllSessions:we,prevSessionDesc:gt,prevSessionDisabled:se=!1,nextSessionDesc:ht,nextSessionDisabled:re=!1,onPreviousSession:Ce,onNextSession:Fe,comments:De=[],guidance:We=[],currentUser:ut,onSendComment:yt,onSendReply:xt,onReply:mt,onEdit:vt,onDelete:bt,onMenuClick:jt,onMarkResolved:St,commentsResolved:kt})=>{var Ne,qe;const[pe,Ie]=c.useState("overview"),[wt,ze]=c.useState(new Set),[Ge,ge]=c.useState(!1),[_e,Me]=c.useState(null),[Ct,Ee]=c.useState(!1),[Ft,Dt]=c.useState(0),J=c.useRef(null),he=c.useRef(null),ue=c.useRef(null),ye=c.useRef(null),xe=c.useRef(null),Wt={overview:he,coaching:ue,signals:ye,comments:xe},me=c.useRef(null),ve=c.useRef(!1);c.useEffect(()=>{const y=me.current;if(!y)return;const I=["overview","coaching","signals","comments"],z=[he,ue,ye,xe],B=(U=>{let N=U.parentElement;for(;N;){const{overflow:ae,overflowY:Ke}=window.getComputedStyle(N);if(/(auto|scroll)/.test(ae+Ke))return N;N=N.parentElement}return null})(y),Z=()=>{if(ve.current)return;let U=I[0];for(let N=z.length-1;N>=0;N--){const ae=z[N].current;if(!ae)continue;if(ae.getBoundingClientRect().top<=150){U=I[N];break}}Ie(U)};return y.addEventListener("scroll",Z,{passive:!0}),B&&B!==y&&B.addEventListener("scroll",Z,{passive:!0}),window.addEventListener("scroll",Z,{passive:!0,capture:!0}),()=>{y.removeEventListener("scroll",Z),B&&B!==y&&B.removeEventListener("scroll",Z),window.removeEventListener("scroll",Z,{capture:!0})}},[]);const Re=c.useRef(null),It=y=>{var z;Ie(y),ve.current=!0,Re.current=y;const I=(z=Wt[y])==null?void 0:z.current;if(I){const V=me.current;if(V&&V.scrollHeight>V.clientHeight){const B=V.getBoundingClientRect().top,U=I.getBoundingClientRect().top-B+V.scrollTop-16;V.scrollTo({top:U,behavior:"smooth"})}else{const B=I.getBoundingClientRect().top+window.scrollY-120;window.scrollTo({top:B,behavior:"smooth"})}}setTimeout(()=>{ve.current=!1,Re.current=null},1200)},Te=ft||[],He=y=>{var z;const I=y/1e3;(z=J.current)!=null&&z.scrollToTranscript&&J.current.scrollToTranscript(I)},Ae=y=>{var I;if(f)f(y);else{const z=y.start_ms??y.startMs;if(z!=null&&((I=J.current)!=null&&I.seekTo)){J.current.seekTo(z/1e3),Ee(!0),Dt(z/1e3);const B=(y.end_ms??y.endMs??z+5e3)-z;setTimeout(()=>Ee(!1),B)}}},zt=y=>{l&&l(y)},Gt=y=>{ze(I=>{const z=new Set(I);return z.has(y)?z.delete(y):z.add(y),z})},_t=(i==null?void 0:i.blocks)||[],X=y=>{var I;return((I=_t.find(z=>z.block_id===y))==null?void 0:I.payload)||{}},$=X("interaction-metadata"),ee=X("interaction-context"),oe=X("interaction-signals"),Le=X("interaction-outcome-lift"),Mt=X("interaction-dimensions").dimensions||[],Et=ee.call_purpose||{},Rt=ee.classification||{},Be={duration_seconds:156,message_count:25,...$},Pe={interaction_driver:"General Information",interaction_direction:"inbound",...Et},Tt={interaction_paradigm:"Informational",...Rt},Ht={p_expected:.94,p_full:.83,lift_raw:-.11,lift:.043,interpretation:{lift_band:"positive"},...Le},At=((Ne=Le.driver_signal_keys)==null?void 0:Ne.map(y=>y.replace(/^sig\./,"").replace(/_/g," ")))||["customer needs fully addressed","call flow expectations set","Opening expectations set","Active listening demonstrated","Resolution confirmed"],Lt=o||{one_liner:"David provided the customer with information on wheel stud replacement and pricing, but did not secure an appointment.",context:"The customer was seeking information on wheel stud replacement for a 2013 Chevy Bolt and was unsure about doing the repair themselves.",strengths:[{text:"Anthony effectively scheduled the appointment and confirmed the details clearly.",quote:"Alright. That is all set up for Saturday, the twenty eighth, at 12:00."},{text:"Handled customer objections well by explaining the need for a separate appointment for alignment.",quote:"I don't have the alignment changeover the weekend. So I would have to set up a separate appointment for the alignment."},{text:"Demonstrated courtesy and professionalism throughout the call.",quote:"Have a great day."}],improvements:[{text:"Close the loop by restating the plan and confirming next steps to ensure customer certainty.",quote:"Alright. That is all set up for Saturday, the twenty eighth, at 12:00."},{text:"Frame solutions positively by leading with what can be done rather than limitations.",quote:"I don't have the alignment changeover the weekend."}],overall:"effective"},Bt=(qe=oe==null?void 0:oe.signals)!=null&&qe.length?oe:{present_count:9,total_signals_evaluated:146,signals:[{key:"price_estimate_provided",display_name:"Price Estimate Provided",observations:[{key:"obs1",reason:"Evidence shows a price estimate or quote was provided.",evidence:[{start_ms:92e3,end_ms:97e3,text:"From Casper, you're probably looking at, like, a half hour labor plus a stud, so you'd probably be somewhere around $90 or something.",turn_ids:[8]}]}]},{key:"fee_or_cost_discussed",display_name:"Fee or Cost Discussed",observations:[{key:"obs2",reason:"Agent discussed pricing details with the customer."}]},{key:"engagement_budget",display_name:"Engagement Budget Discussed",observations:[{key:"obs3a",reason:"Budget expectations were set."},{key:"obs3b",reason:"Customer confirmed budget range."}]},{key:"projected_revenue",display_name:"Projected Revenue Discussed",observations:[{key:"obs4a",reason:"Revenue projection shared."},{key:"obs4b",reason:"Timeline for revenue discussed."},{key:"obs4c",reason:"Quarterly targets mentioned."}]},{key:"market_analysis",display_name:"Market Analysis Completed",observations:[{key:"obs5a",reason:"Market analysis referenced."},{key:"obs5b",reason:"Competitive landscape discussed."},{key:"obs5c",reason:"Market trends mentioned."},{key:"obs5d",reason:"Regional analysis provided."}]},{key:"target_audience",display_name:"Target Audience Defined",observations:[{key:"obs6a",reason:"Target audience identified."},{key:"obs6b",reason:"Demographics discussed."},{key:"obs6c",reason:"Audience segmentation reviewed."},{key:"obs6d",reason:"Persona mapping completed."},{key:"obs6e",reason:"Channel preferences noted."}]},{key:"concept_approval",display_name:"Concept Approval Received",observations:[{key:"obs7a",reason:"Concept approved by stakeholder."},{key:"obs7b",reason:"Feedback incorporated."},{key:"obs7c",reason:"Sign-off confirmed."},{key:"obs7d",reason:"Revisions requested."},{key:"obs7e",reason:"Final version accepted."},{key:"obs7f",reason:"Timeline approved."}]},{key:"prototype_developed",display_name:"Prototype Developed",observations:[{key:"obs8a",reason:"Prototype shared."},{key:"obs8b",reason:"Testing initiated."},{key:"obs8c",reason:"Feedback collected."},{key:"obs8d",reason:"Iterations completed."},{key:"obs8e",reason:"Usability tested."},{key:"obs8f",reason:"Design finalized."},{key:"obs8g",reason:"Stakeholder demo done."}]},{key:"user_testing",display_name:"User Testing Scheduled",observations:[{key:"obs9a",reason:"Testing sessions planned."},{key:"obs9b",reason:"Participants recruited."},{key:"obs9c",reason:"Test scripts prepared."},{key:"obs9d",reason:"Environment set up."},{key:"obs9e",reason:"Accessibility testing included."},{key:"obs9f",reason:"Results framework defined."},{key:"obs9g",reason:"Timeline confirmed."},{key:"obs9h",reason:"Backup plan discussed."}]}]},$e=We.length?We:[{title:"Close the loop: Restate the plan and confirm what happens next so the customer leaves with certainty",signal_refs:[{display_name:"Next Step Unclear",confidence:.5}],start_ms:18e3,end_ms:23e3},{title:"Close the call properly: Summarize what was done and offer additional help",signal_refs:[{display_name:"Call Closing Stated",confidence:.55}],start_ms:89e3,end_ms:94e3},{title:"Frame solutions positively: Lead with what you can do rather than what you can't",signal_refs:[{display_name:"Positive Framing or Solution Orientation",confidence:.5}],start_ms:107e3,end_ms:112e3},{title:"Show expertise: Explain relevant products, policies or options with confidence rather than transfer",signal_refs:[{display_name:"Product Knowledge Demonstrated",confidence:.5}],start_ms:116e3,end_ms:121e3}],be=S||$.agent_name||$.agent||ee.agent_name||"Agent",Pt=G||$.agent_full_name||$.agent_name||be,te=W||$.customer_name||$.customer||ee.customer_name||"Customer",Oe=F||$.customer_full_name||$.customer_name||te,je=pt??Te.length,le=$.created_dt||(i==null?void 0:i.created_dt)||ee.created_dt||"",$t=le?new Date(/Z$|[+-]\d{2}:\d{2}$/.test(le)?le:le+"Z").toLocaleString():"",Ot=Pe.interaction_direction==="inbound"?"Inbound":"Outbound";return e.jsxs("div",{style:{display:"flex",flexDirection:"column",width:"100%",height:"100%",background:"var(--Grey-White, #FFF)"},children:[e.jsxs("div",{style:{position:"sticky",top:0,zIndex:20,background:"var(--Grey-White, #FFF)"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,padding:"24px 24px 0"},children:[e.jsx("button",{onClick:n,style:{display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",cursor:"pointer",padding:0,flexShrink:0},children:e.jsx(u.ArrowLeft,{size:24,color:"var(--Grey-Strong, #2E3236)"})}),e.jsx("div",{style:{width:1,height:28,background:"var(--Base-absent, #D9D9D9)"}}),e.jsx("h1",{style:{color:"var(--Grey-Strong, #2E3236)",fontSize:24,fontStyle:"normal",fontWeight:400,lineHeight:"normal",margin:0,flex:1},children:t}),(Ce||Fe)&&e.jsxs("div",{style:{display:"flex",alignItems:"center",flexShrink:0},children:[e.jsx(ne,{text:gt,children:e.jsxs("button",{onClick:se?void 0:Ce,disabled:se,style:{display:"flex",alignItems:"center",gap:6,padding:"4px 12px",background:"none",border:"none",cursor:se?"default":"pointer",opacity:se?.4:1},children:[e.jsx(u.ArrowLeft,{size:16,color:"var(--Neutral-800, #323232)",strokeWidth:1.5}),e.jsx("span",{style:{color:"var(--Neutral-800, #323232)",fontSize:13,fontWeight:400,lineHeight:"24px",fontFamily:"var(--default-font-family)",whiteSpace:"nowrap"},children:"Previous Session"})]})}),e.jsx("div",{style:{width:1,height:20,background:"var(--Grey-absent, #D9D9D9)",flexShrink:0}}),e.jsx(ne,{text:ht,children:e.jsxs("button",{onClick:re?void 0:Fe,disabled:re,style:{display:"flex",alignItems:"center",gap:6,padding:"4px 12px",background:"none",border:"none",cursor:re?"default":"pointer",opacity:re?.4:1},children:[e.jsx("span",{style:{color:"var(--Neutral-800, #323232)",fontSize:13,fontWeight:400,lineHeight:"24px",fontFamily:"var(--default-font-family)",whiteSpace:"nowrap"},children:"Next Session"}),e.jsx(u.ArrowRight,{size:16,color:"var(--Neutral-800, #323232)",strokeWidth:1.5})]})})]})]}),e.jsx("div",{style:{display:"flex",alignItems:"flex-start",background:"var(--Grey-White, #FFF)",borderBottom:"1px solid var(--Grey-Faint, #ACADAD)",padding:"0 24px",marginTop:8},children:an.map(y=>e.jsx("button",{onClick:()=>It(y.key),style:{display:"flex",padding:16,alignItems:"center",gap:10,background:"none",border:"none",borderBottom:pe===y.key?"3px solid var(--Grey-Strong, #2E3236)":"3px solid transparent",cursor:"pointer",fontSize:15,fontWeight:pe===y.key?500:400,color:pe===y.key?"var(--Grey-Strong, #2E3236)":"var(--Grey-Muted, #808183)",whiteSpace:"nowrap",transition:"border-color 0.2s ease, color 0.2s ease"},children:y.label},y.key))})]}),e.jsxs("div",{ref:me,style:{padding:24,flex:1,overflowY:"auto"},children:[e.jsxs("div",{ref:he,style:{display:"flex",flexDirection:"column",justifyContent:"flex-end",alignItems:"flex-start",gap:24,alignSelf:"stretch"},children:[e.jsxs("div",{style:{display:"flex",height:40,alignItems:"center",gap:16,alignSelf:"stretch"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flex:1},children:[e.jsx(u.ClipboardList,{size:24,color:"var(--rail-orange, #C98A5A)",strokeWidth:2}),e.jsx("span",{style:{fontSize:16,fontWeight:600,color:"var(--Grey-Strong, #2E3236)",lineHeight:1.2,textTransform:"uppercase"},children:"Overview"})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,flexShrink:0},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"8px 0"},children:[e.jsx(u.CalendarDays,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5}),e.jsx("span",{style:{fontSize:13,fontWeight:400,color:"var(--Grey-Strong, #2E3236)",fontFamily:"var(--font-sans)",lineHeight:1.2},children:$t})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"8px 0"},children:[e.jsx(u.PhoneIncoming,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5}),e.jsx("span",{style:{fontSize:13,fontWeight:400,color:"var(--Grey-Strong, #2E3236)",fontFamily:"var(--font-sans)",lineHeight:1.2},children:Ot})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,paddingLeft:16,borderLeft:"1px solid var(--Grey-absent, #D9D9D9)"},children:[e.jsx(ne,{text:Pt,children:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"8px 0",cursor:"pointer"},children:[e.jsx(u.Headset,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5}),e.jsx("span",{style:{fontSize:13,fontWeight:400,color:"var(--Grey-Strong, #2E3236)",fontFamily:"var(--font-sans)",lineHeight:1.2},children:be})]})}),e.jsx(u.Repeat,{size:16,color:"var(--color-input-border, #ACACAD)",strokeWidth:1.5}),je>1?e.jsxs("div",{style:{position:"relative"},children:[e.jsx(ne,{text:Oe,children:e.jsxs("button",{onClick:()=>ge(y=>!y),style:{display:"flex",alignItems:"center",gap:4,padding:"8px 0",background:"none",border:"none",cursor:"pointer"},children:[e.jsx(u.CircleUser,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5}),e.jsxs("span",{style:{fontSize:13,fontWeight:400,color:"var(--Grey-Strong, #2E3236)",lineHeight:1.2},children:[te," (",je," Sessions)"]}),Ge?e.jsx(u.ChevronUp,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5}):e.jsx(u.ChevronDown,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5})]})}),Ge&&e.jsxs("div",{style:{position:"absolute",top:"100%",right:0,marginTop:4,width:264,background:"var(--Grey-White, #FFF)",borderRadius:4,border:"1px solid var(--Grey-absent, #D9D9D9)",boxShadow:"0 4px 16px rgba(0,0,0,0.12)",zIndex:50,overflow:"hidden"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:8,padding:16},children:[e.jsx(u.CircleUser,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5,style:{marginTop:2,flexShrink:0}}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[e.jsx("span",{style:{fontSize:16,fontWeight:600,color:"var(--Grey-Strong, #2E3236)",lineHeight:1},children:te}),e.jsxs("span",{style:{fontSize:13,fontWeight:400,color:"var(--Grey-Muted, #808183)",lineHeight:1},children:[je," Sessions in past"]})]})]}),Te.slice(0,5).map((y,I)=>e.jsxs("div",{onClick:()=>{ke&&ke(y),ge(!1)},onMouseEnter:()=>Me(I),onMouseLeave:()=>Me(null),style:{display:"flex",width:264,padding:"12px 16px",justifyContent:"space-between",alignItems:"center",background:_e===I?"var(--surface-hover, #F3F7F7)":"var(--Grey-White, #FFF)",borderTop:"1px solid var(--Grey-absent, #D9D9D9)",cursor:"pointer",boxSizing:"border-box",transition:"background 0.15s"},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[e.jsx("span",{style:{fontSize:13,fontWeight:400,color:"var(--Grey-Strong, #2E3236)",lineHeight:1},children:y.title}),e.jsx("span",{style:{fontSize:12,fontWeight:400,color:"var(--Grey-Muted, #808183)",lineHeight:1},children:y.date})]}),_e===I&&e.jsx(u.ExternalLink,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1,style:{flexShrink:0}})]},y.id||I)),e.jsx("div",{style:{padding:16,borderTop:"1px solid var(--Grey-absent, #D9D9D9)",display:"flex",justifyContent:"center"},children:e.jsxs("button",{onClick:()=>{we&&we(),ge(!1)},style:{display:"flex",height:32,padding:"16px 16px 16px 12px",justifyContent:"center",alignItems:"center",gap:6,background:"var(--Grey-White, #FFF)",border:"1px solid var(--Grey-absent, #D9D9D9)",borderRadius:10,cursor:"pointer"},children:[e.jsx(u.History,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5}),e.jsx("span",{style:{fontSize:14,fontWeight:600,color:"var(--Grey-Strong, #2E3236)"},children:"View All Sessions"})]})})]})]}):e.jsx(ne,{text:Oe,children:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4,padding:"8px 0",cursor:"pointer"},children:[e.jsx(u.CircleUser,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5}),e.jsx("span",{style:{fontSize:13,fontWeight:400,color:"var(--Grey-Strong, #2E3236)",lineHeight:1.2},children:te})]})})]})]})]}),e.jsxs("div",{style:{display:"flex",alignItems:"stretch",gap:24,alignSelf:"stretch"},children:[e.jsx("div",{style:{flex:1,minWidth:0,display:"flex"},children:e.jsx(ot,{score:ce??0,maxScore:5,predictedScore:ie??0,predictedLabel:p,legends:Q})}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch",justifyContent:"flex-end",gap:24,flex:1,minWidth:0},children:[e.jsx(it,{meta:Be,callPurpose:E||Pe,classification:O||Tt,outcomeQuality:Y||"Neutral",dimensions:Mt,resolutionOutcome:d,customerIntent:T,interactionId:q??$.interaction_id,moreDetails:K}),e.jsx(st,{outcomeLift:Ht,driverLabels:At})]})]})]}),e.jsx("div",{ref:ue,style:{paddingTop:24},children:e.jsx(nt,{data:s?null:Lt,loading:s})}),e.jsxs("div",{ref:ye,style:{display:"flex",flexDirection:"column",gap:16,alignSelf:"stretch",paddingTop:24},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx(u.FileSignal,{size:24,color:"#C98A5A",strokeWidth:2}),e.jsx("span",{style:{fontSize:16,fontWeight:600,color:"var(--Grey-Strong, #2E3236)",lineHeight:1.2,textTransform:"uppercase"},children:"Signals & Recording"})]}),e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:24,alignSelf:"stretch",paddingTop:16,borderTop:"1px solid #D9D9D9"},children:[e.jsx("div",{style:{flex:1,minWidth:0},children:e.jsx(rt,{signals:Bt,expandedSignals:wt,toggleSignal:Gt,playEvidence:Ae,highlightTurns:zt,onShowInTranscript:He,timelinePlaying:m||Ct,currentTimeSeconds:x??Ft})}),e.jsx("div",{style:{flex:1,minWidth:0},children:e.jsx(tt.UpdatedInteractionRecording,{ref:J,audioUrl:r,durationSeconds:Be.duration_seconds,audioRef:g,agentName:be,customerName:te,currentTimeSeconds:x,timelinePlaying:m,playbackRate:w,timelineSegments:b,onSeek:D,onTogglePlay:h,onSeekBack:C,onSeekForward:j,onSetPlaybackRate:v,transcript:M,activeTurnIndex:P,turnObservations:H,highlightedTurns:A,onTurnPlayPause:a,setExpandedSignals:ze})})]})]}),e.jsx("div",{ref:xe,style:{paddingTop:24},children:e.jsx(dt,{comments:De,totalComments:De.length,currentUser:ut,onSendComment:yt||(()=>{}),onSendReply:xt||(()=>{}),onReply:mt||(()=>{}),onEdit:vt||(()=>{}),onDelete:bt||(()=>{}),onMenuClick:jt||(()=>{}),onMarkResolved:St||(()=>{}),isResolved:kt,children:e.jsx(ct,{items:$e,guidanceCount:$e.length,onPlayEvidence:Ae,onShowInTranscript:He})})})]})]})};exports.UpdatedInteractionRecording=tt.UpdatedInteractionRecording;exports.UpdatedCoachingSynthesisCard=nt;exports.UpdatedCompassScore=ot;exports.UpdatedGuidance=ct;exports.UpdatedInteractionContext=it;exports.UpdatedInteractionDetails=dn;exports.UpdatedInteractionScores=st;exports.UpdatedInteractionSignals=rt;exports.UpdatedThreads=dt;
|
|
15
|
+
`}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:12,padding:"48px 24px"},children:[e.jsxs("svg",{width:48,height:48,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{animation:"coaching-spinner-spin 1.2s linear infinite"},children:[e.jsx("path",{d:"M43 24C43 26.4951 42.5086 28.9658 41.5537 31.271C40.5989 33.5762 39.1993 35.6707 37.435 37.435C35.6707 39.1993 33.5762 40.5989 31.271 41.5537C28.9658 42.5086 26.4951 43 24 43C21.5049 43 19.0342 42.5086 16.729 41.5537C14.4238 40.5989 12.3293 39.1993 10.565 37.435C8.80066 35.6707 7.40113 33.5762 6.44629 31.271C5.49145 28.9658 5 26.4951 5 24",stroke:"#F3E7C7",strokeWidth:"4",strokeLinecap:"round"}),e.jsx("path",{d:"M12 24C12 22.4241 12.3104 20.8637 12.9134 19.4078C13.5165 17.9519 14.4004 16.629 15.5147 15.5147C16.629 14.4004 17.9519 13.5165 19.4078 12.9134C20.8637 12.3104 22.4241 12 24 12C25.5759 12 27.1363 12.3104 28.5922 12.9134C30.0481 13.5165 31.371 14.4004 32.4853 15.5147C33.5996 16.629 34.4835 17.9519 35.0866 19.4078C35.6896 20.8637 36 22.4241 36 24",stroke:"#00A66E",strokeWidth:"4",strokeLinecap:"round"}),e.jsx("path",{d:"M20 24C20 24.5253 20.1035 25.0454 20.3045 25.5307C20.5055 26.016 20.8001 26.457 21.1716 26.8284C21.543 27.1999 21.984 27.4945 22.4693 27.6955C22.9546 27.8965 23.4747 28 24 28C24.5253 28 25.0454 27.8965 25.5307 27.6955C26.016 27.4945 26.457 27.1999 26.8284 26.8284C27.1999 26.457 27.4945 26.016 27.6955 25.5307C27.8965 25.0454 28 24.5253 28 24",stroke:"#F3E7C7",strokeWidth:"4",strokeLinecap:"round"})]}),e.jsx("span",{style:{fontSize:14,color:M.muted,fontWeight:500,textAlign:"center"},children:"Synthesizing coaching summary..."})]})]});if(i)return e.jsx("div",{style:{fontSize:14,color:M.muted},children:"Unable to generate coaching summary."});if(!t)return null;const r=t.strengths||[],s=t.improvements||[],o=typeof t.one_liner=="string"?t.one_liner:((f=t.one_liner)==null?void 0:f.text)||"",g=typeof t.context=="string"?t.context:((m=t.context)==null?void 0:m.text)||"";return e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16,background:"#FFF"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx(y.ShieldCheck,{size:20,color:M.accent,strokeWidth:2}),e.jsx("span",{style:{fontSize:16,fontWeight:600,color:M.strong,fontFamily:"var(--font-sans)",lineHeight:1.2,textTransform:"uppercase"},children:"Coaching Summary"})]}),o&&e.jsx("div",{style:{fontSize:14,fontWeight:500,color:M.strong,fontFamily:"var(--font-sans)",lineHeight:1.5},children:o}),e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:16,justifyContent:"space-between"},children:[g&&e.jsx("div",{style:{fontSize:14,fontWeight:400,color:M.muted,fontFamily:"var(--font-sans)",lineHeight:1.5,flex:1},children:g}),t.overall&&e.jsx(Kt,{overall:t.overall})]}),(r.length>0||s.length>0)&&e.jsxs("div",{style:{display:"flex",gap:24,paddingTop:24,borderTop:`1px solid ${M.absent}`},children:[e.jsx(Ue,{icon:e.jsx(y.TrendingUp,{size:14,color:M.strong,strokeWidth:1.5}),label:"Key Strengths",items:r}),e.jsx(Ue,{icon:e.jsx(y.Lightbulb,{size:14,color:M.strong,strokeWidth:1.5}),label:"Improvements",items:s})]})]})};function Yt(t){const n=Math.floor(t/60),i=Math.round(t%60);return`${n}:${i.toString().padStart(2,"0")}`}const Zt={display:"flex",justifyContent:"space-between",padding:"8px 8px 12px 8px",alignItems:"center",gap:24,fontFamily:"var(--font-sans)",fontSize:13,fontWeight:400,lineHeight:"normal",borderBottom:"1px solid var(--Grey-absent, #D9D9D9)"},Qe={display:"flex",flexDirection:"column",flex:"1 0 0",gap:0,minWidth:0},rt=({meta:t={},callPurpose:n={},classification:i={},dimensions:r=[],outcomeQuality:s="Neutral",onMoreDetails:o,moreDetails:g=[],resolutionOutcome:f,customerIntent:m})=>{const[k,j]=p.useState(!1),F=t.duration_seconds!=null?Yt(t.duration_seconds):null,c=t.message_count,S=n.interaction_driver,b=i.interaction_paradigm,v=d=>r.find(T=>(T.key||"").toLowerCase().includes(d)),w=v("resolution_outcome"),G=v("customer_intent"),W=v("outcome_quality"),D=d=>d?d.replace(/_/g," ").replace(/\b\w/g,T=>T.toUpperCase()):null,_=s!=="Neutral"?s:W?D(W.value):s,P=f??(w?D(w.value):null),H=m??(G?D(G.value):null),A=new Set(["resolution_outcome","customer_intent","outcome_quality"].map(d=>`dim.${d}`)),a=r.filter(d=>!A.has(d.key)),h=[],l=[[F!=null?{label:"Duration",value:F}:null,c!=null?{label:"Messages",value:c}:null],[S!=null?{label:"Driver",value:S}:null,b!=null?{label:"Paradigm",value:b}:null]];for(let d=0;d<a.length;d+=2){const T=a[d]?{label:a[d].display_name||a[d].label||a[d].key,value:D(a[d].value)}:null,q=a[d+1]?{label:a[d+1].display_name||a[d+1].label||a[d+1].key,value:D(a[d+1].value)}:null;l.push([T,q])}l.push([{label:"Outcome Quality",value:_},{isMoreDetails:!0}]),l.forEach(d=>h.push(d));const E=[P!=null&&{label:"Resolution Outcome",value:P},H!=null&&{label:"Customer Intent",value:H},...g||[]].filter(Boolean),O=d=>e.jsxs("div",{style:Zt,children:[e.jsx("span",{style:{color:"var(--Grey-Strong, #2E3236)",whiteSpace:"nowrap",flexShrink:0},children:d.label}),e.jsx("span",{style:{color:"var(--Grey-Muted, #808183)",textAlign:"right",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:d.value})]},d.label),Y=()=>e.jsxs("div",{onClick:()=>{j(d=>!d),o&&!k&&o()},style:{display:"flex",alignItems:"center",gap:6,padding:"8px 8px 12px 8px",cursor:"pointer",fontFamily:"var(--font-sans)",borderBottom:"1px solid var(--Grey-absent, #D9D9D9)"},children:[e.jsx("span",{style:{color:"var(--Grey-Strong, #2E3236)",fontSize:13,fontWeight:500,lineHeight:"normal"},children:"More Details"}),k?e.jsx(y.ChevronUp,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5}):e.jsx(y.ChevronDown,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5})]},"more-details");return e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignSelf:"stretch",gap:0,position:"relative",overflow:"visible"},children:[h.map((d,T)=>{var q;return e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:24,alignSelf:"stretch"},children:[e.jsx("div",{style:Qe,children:d[0]&&!d[0].isMoreDetails?O(d[0]):e.jsx("div",{style:{flex:1}})}),e.jsx("div",{style:Qe,children:d[1]&&!d[1].isMoreDetails?O(d[1]):(q=d[1])!=null&&q.isMoreDetails?Y():e.jsx("div",{style:{flex:1}})})]},T)}),k&&E.length>0&&e.jsxs("div",{style:{position:"absolute",top:"100%",right:0,marginTop:4,display:"flex",width:340,flexDirection:"column",alignItems:"flex-start",borderRadius:4,border:"1px solid var(--Grey-absent, #D9D9D9)",background:"var(--Grey-White, #FFF)",boxShadow:"-2px 2px 2px 0 rgba(0, 0, 0, 0.25)",overflow:"hidden",fontFamily:"var(--font-sans)",zIndex:50},children:[e.jsx("div",{style:{padding:"12px 16px",fontSize:13,fontWeight:600,color:"var(--Grey-Strong, #2E3236)",borderBottom:"1px solid var(--Grey-absent, #D9D9D9)",alignSelf:"stretch"},children:"More details"}),E.map(d=>e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"12px 16px",gap:24,fontSize:13,fontWeight:400,lineHeight:"normal",borderBottom:"1px solid var(--Grey-absent, #D9D9D9)",alignSelf:"stretch"},children:[e.jsx("span",{style:{color:"var(--Grey-Strong, #2E3236)",whiteSpace:"nowrap",flexShrink:0},children:d.label}),e.jsx("span",{style:{color:"var(--Grey-Muted, #808183)",fontSize:13,fontStyle:"normal",fontWeight:400,lineHeight:"120%",textAlign:"right"},children:d.value})]},d.label))]})]})},C={strong:"var(--Grey-Strong, #2E3236)",muted:"var(--Grey-Muted, #808183)",absent:"var(--Grey-absent, #D9D9D9)",white:"var(--Grey-White, #FFF)",cardBg:"var(--surface-warm-40, rgba(243, 241, 229, 0.40))"},R=1.2,Je=3,Xe=t=>t!=null?Math.round(t*100)+"%":"—",et=t=>{if(t==null)return"—";const n=(t*100).toFixed(1);return t>0?`+${n}pp`:`${n}pp`},ot=({outcomeLift:t,driverLabels:n=[]})=>{var c;if(!t||t.lift==null)return null;const i=t.p_expected,r=t.p_full,s=t.lift_raw??(r!=null&&i!=null?r-i:null),o=t.lift,g=(c=t.interpretation)!=null&&c.lift_band?t.interpretation.lift_band.replace(/_/g," "):o>=0?"Positive":"Negative",f=g.charAt(0).toUpperCase()+g.slice(1),k=/negative/i.test(g)?y.ThumbsDown:y.ThumbsUp,j=n.slice(0,Je),F=n.length-Je;return e.jsxs("div",{style:{display:"flex",flexDirection:"column",padding:24,gap:24,borderRadius:8,border:`1px solid ${C.absent}`,background:C.cardBg,alignSelf:"stretch"},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:32},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:24,alignSelf:"stretch"},children:[e.jsx("span",{style:{fontSize:15,fontWeight:600,color:C.strong,fontFamily:"var(--font-sans)",lineHeight:R},children:"Agent Lift Analysis"}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--font-sans)"},children:[e.jsx("span",{style:{fontSize:13,fontWeight:400,color:C.strong,lineHeight:R},children:"vs. Average Agent:"}),e.jsx("span",{style:{fontSize:14,fontWeight:600,color:C.strong,lineHeight:R},children:et(o)}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,paddingLeft:8,borderLeft:`1px solid ${C.absent}`},children:[e.jsx(k,{size:14,color:C.strong}),e.jsx("span",{style:{fontSize:13,fontWeight:600,color:C.strong,lineHeight:R},children:f})]})]})]}),e.jsxs("div",{style:{display:"flex",gap:24},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16,alignItems:"flex-start",flex:1,minWidth:0},children:[e.jsx("span",{style:{fontSize:28,fontWeight:400,color:C.muted,fontFamily:"var(--font-sans)",lineHeight:R},children:Xe(i)}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"flex-start",minHeight:48},children:[e.jsx("span",{style:{fontSize:13,fontWeight:400,color:C.strong,fontFamily:"var(--font-sans)",lineHeight:R,whiteSpace:"nowrap"},children:"Expected Outcome"}),e.jsx("span",{style:{fontSize:13,fontWeight:400,color:C.muted,fontFamily:"var(--font-sans)",lineHeight:R,textAlign:"left"},children:"Based on call type & difficulty"})]})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16,alignItems:"flex-start",paddingLeft:24,borderLeft:`1px solid ${C.absent}`,flex:1,minWidth:0},children:[e.jsx("span",{style:{fontSize:28,fontWeight:400,color:C.muted,fontFamily:"var(--font-sans)",lineHeight:R},children:et(s)}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"flex-start",minHeight:48},children:[e.jsx("span",{style:{fontSize:13,fontWeight:400,color:C.strong,fontFamily:"var(--font-sans)",lineHeight:R,whiteSpace:"nowrap"},children:"Agent Impact"}),e.jsx("span",{style:{fontSize:13,fontWeight:400,color:C.muted,fontFamily:"var(--font-sans)",lineHeight:R,textAlign:"left"},children:"Behavior-driven change"})]})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16,alignItems:"flex-start",paddingLeft:24,borderLeft:`1px solid ${C.absent}`,flex:1,minWidth:0},children:[e.jsx("span",{style:{fontSize:28,fontWeight:400,color:C.strong,fontFamily:"var(--font-sans)",lineHeight:R},children:Xe(r)}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"flex-start",minHeight:48},children:[e.jsx("span",{style:{fontSize:13,fontWeight:600,color:C.strong,fontFamily:"var(--font-sans)",lineHeight:R,whiteSpace:"nowrap"},children:"Predicted Outcome"}),e.jsx("span",{style:{fontSize:13,fontWeight:400,color:C.muted,fontFamily:"var(--font-sans)",lineHeight:R,textAlign:"left"},children:"With agent behaviors"})]})]})]})]}),n.length>0&&e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,alignSelf:"stretch"},children:[e.jsx("span",{style:{fontSize:12,fontWeight:600,color:C.strong,fontFamily:"var(--font-sans)",lineHeight:R},children:"Key Drivers"}),e.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:[j.map((S,b)=>e.jsx("div",{style:{display:"flex",padding:8,alignItems:"center",justifyContent:"center",borderRadius:4,border:`1px solid ${C.absent}`,background:C.white},children:e.jsx("span",{style:{fontSize:12,fontWeight:400,color:C.strong,fontFamily:"var(--font-sans)",lineHeight:R,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:200},children:S})},b)),F>0&&e.jsx("div",{style:{display:"flex",padding:8,alignItems:"center",justifyContent:"center",borderRadius:4,border:`1px solid ${C.absent}`,background:C.white},children:e.jsxs("span",{style:{fontSize:12,fontWeight:400,color:C.strong,fontFamily:"var(--font-sans)",lineHeight:R,whiteSpace:"nowrap"},children:["+ ",F]})})]})]})]})},tt=({children:t,size:n=28,onClick:i,title:r})=>{const[s,o]=p.useState(!1);return e.jsx("div",{title:r,onClick:i,onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),style:{display:"flex",alignItems:"center",justifyContent:"center",width:n,height:n,borderRadius:9999,background:s?"var(--surface-hover, #F3F7F7)":"transparent",cursor:"pointer",flexShrink:0,transition:"background 0.15s"},children:t})},lt=({signals:t={signals:[],present_count:0,total_signals_evaluated:0},expandedSignals:n=new Set,toggleSignal:i=()=>{},playEvidence:r=()=>{},highlightTurns:s=()=>{},onShowInTranscript:o=()=>{},timelinePlaying:g=!1,currentTimeSeconds:f=0})=>{const m=(t==null?void 0:t.signals)??[],k=(t==null?void 0:t.present_count)??m.length,j=c=>{const S=Math.floor(c/6e4),b=Math.floor(c%6e4/1e3);return`${S.toString().padStart(2,"0")}:${b.toString().padStart(2,"0")}`},F=c=>g&&c.start_ms!=null&&f*1e3>=c.start_ms&&f*1e3<=(c.end_ms??c.start_ms+5e3);return e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",alignSelf:"stretch",width:"100%",gap:16},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,width:"100%"},children:[e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:34,height:34,borderRadius:9999,background:"var(--surface-hover, #F3F7F7)",flexShrink:0},children:e.jsx(y.FileSignal,{size:20,color:"#2E3236",strokeWidth:1.5})}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",flex:1},children:[e.jsx("span",{style:{fontSize:15,fontWeight:500,color:"var(--Grey-Strong, #2E3236)"},children:"Signals"}),e.jsxs("span",{style:{fontSize:14,fontWeight:500,color:"var(--Grey-Strong, #2E3236)"},children:[k," Signals Detected"]})]})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignSelf:"stretch",background:"var(--Grey-White, #FFF)",gap:8},children:[m.length===0&&e.jsx("div",{style:{padding:"8px 0",fontSize:14,color:"var(--Grey-Muted, #808183)"},children:"No signals detected."}),m.map((c,S)=>{var G,W,D;const b=c.key??c.id??S,v=n.has(b),w=((G=c.observations)==null?void 0:G.length)??0;return e.jsxs("div",{id:`signal-${b}`,style:{display:"flex",flexDirection:"column",width:"100%",gap:8},children:[e.jsxs("button",{onClick:()=>i(b),style:{display:"flex",padding:"8px 0",alignItems:"center",gap:12,alignSelf:"stretch",width:"100%",background:"none",border:"none",borderBottom:"1px solid var(--Grey-absent, #D9D9D9)",cursor:"pointer"},children:[e.jsxs("span",{style:{flex:1,textAlign:"left",fontSize:14,fontWeight:600,color:"var(--text-dark, #0B0A0A)",lineHeight:1.71},children:[c.display_name||((W=c.key)==null?void 0:W.replace(/_/g," ")),w>0&&e.jsxs("span",{style:{fontWeight:600,color:"var(--text-dark, #0B0A0A)",marginLeft:6},children:["(",w,")"]})]}),v?e.jsx(y.ChevronUp,{size:20,color:"#767473"}):e.jsx(y.ChevronDown,{size:20,color:"#767473"})]}),v&&((D=c.observations)==null?void 0:D.length)>0&&e.jsx("div",{style:{display:"flex",flexDirection:"column",alignSelf:"stretch",gap:0},children:c.observations.map((_,P)=>{var H,A,a;return e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignSelf:"stretch",gap:8},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,padding:"8px 0",justifyContent:"space-between"},children:[e.jsx("span",{style:{flex:1,fontSize:14,fontWeight:400,color:"var(--text-subtle-warm, #767473)",lineHeight:1.5},children:_.reason||_.explanation}),((A=(H=_.evidence)==null?void 0:H[0])==null?void 0:A.start_ms)!=null&&e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flexShrink:0},children:[e.jsx(tt,{size:28,title:"Show in transcript",onClick:h=>{h.stopPropagation(),o(_.evidence[0].start_ms)},children:e.jsx(y.ScrollText,{size:16,color:"#808183",strokeWidth:1.5})}),e.jsx("span",{style:{fontSize:13,fontWeight:400,color:"var(--Grey-Muted, #808183)",lineHeight:1.2,whiteSpace:"nowrap"},children:j(_.evidence[0].start_ms)})]})]}),(a=_.evidence)==null?void 0:a.map((h,l)=>{const E=h.start_ms!=null&&h.end_ms!=null;return h.text&&e.jsxs("div",{onClick:O=>{O.stopPropagation(),E&&r(h)},onMouseEnter:()=>s(h.turn_ids??[]),onMouseLeave:()=>s([]),style:{display:"flex",alignItems:"center",gap:8,padding:"8px 0",cursor:E?"pointer":"default"},children:[E&&e.jsx(tt,{size:28,children:F(h)?e.jsx(y.PauseCircle,{size:17,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5}):e.jsx(y.PlayCircle,{size:17,color:"var(--Grey-Muted, #808183)",strokeWidth:1})}),e.jsxs("span",{style:{fontSize:13,fontWeight:400,color:"var(--Grey-Strong, #2E3236)",lineHeight:1.2},children:["“",h.text,"”"]})]},l)})]},_.key??P)})})]},b)})]})]})},L={strong:"var(--Grey-Strong, #2E3236)",muted:"var(--Grey-Muted, #808183)",absent:"var(--Grey-absent, #D9D9D9)",white:"var(--Grey-White, #FFF)",accent:"var(--rail-orange, #C98A5A)",track:"var(--rail-surface-2, #E3E1D7)",infoIcon:"var(--color-input-border, #ACACAD)"},Ut=({score:t=4,maxScore:n=10})=>{const k=Math.min(Math.round(t/n*5),5),j=180/5,F=b=>{const v=b*Math.PI/180;return{x:121.5+85*Math.cos(v),y:123-85*Math.sin(v)}},c=(b,v)=>{const w=F(b),G=F(v),W=b-v>180?1:0;return`M ${w.x} ${w.y} A 85 85 0 ${W} 1 ${G.x} ${G.y}`},S=2;return e.jsx("svg",{width:"100%",viewBox:"0 0 243 130",fill:"none",style:{maxWidth:243},children:Array.from({length:5},(b,v)=>{const w=180-v*j-(v>0?S/2:0),G=180-(v+1)*j+(v<5-1?S/2:0),W=v<k;return e.jsx("path",{d:c(w,G),stroke:W?L.strong:L.track,strokeWidth:30,strokeLinecap:"butt",fill:"none"},v)})})},Qt=({value:t=0,maxValue:n=5})=>e.jsx("div",{style:{display:"flex",gap:2},children:Array.from({length:n},(i,r)=>e.jsx("div",{style:{width:22,height:6,borderRadius:1,background:r<t?L.strong:L.track}},r))}),Jt={CSAT:"Predicted Customer Satisfaction",Resolution:"Predicted Resolution: was the issue fully resolved?","Process Adherence":"Process Adherence: Did the agent follow procedures?",Communication:"Predicted Communication Quality: Clarity, Empathy, Professionalism"},Xt=({text:t,children:n})=>{const[i,r]=p.useState(!1),s=p.useRef(null),[o,g]=p.useState({top:0,left:0}),f=()=>{if(s.current){const m=s.current.getBoundingClientRect();g({top:m.top-8,left:m.left+m.width/2})}r(!0)};return e.jsxs("div",{ref:s,style:{position:"relative",display:"inline-flex"},onMouseEnter:f,onMouseLeave:()=>r(!1),children:[n,i&&e.jsx("div",{style:{position:"fixed",top:o.top,left:o.left,transform:"translate(-50%, -100%)",display:"flex",width:"max-content",maxWidth:300,padding:10,alignItems:"center",borderRadius:4,border:"1px solid var(--Grey-absent, #D9D9D9)",background:"var(--Grey-Strong, #2E3236)",zIndex:9999,pointerEvents:"none"},children:e.jsx("span",{style:{color:"#FFF",fontSize:12,fontWeight:400,lineHeight:"140%"},children:t})})]})},en=({label:t,value:n=0,maxValue:i=5})=>e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,padding:8,alignItems:"flex-start"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx("span",{style:{fontSize:12,fontWeight:400,color:L.strong,fontFamily:"var(--font-sans)",lineHeight:"normal"},children:t}),e.jsx(Xt,{text:Jt[t]||t,children:e.jsx(y.Info,{size:14,color:L.infoIcon,strokeWidth:1,style:{cursor:"pointer"}})})]}),e.jsx(Qt,{value:n,maxValue:i})]}),at=({score:t=83,maxScore:n=100,predictedScore:i=4,predictedLabel:r="Predicted Objective",description:s="",legends:o=[{label:"CSAT",value:3},{label:"Resolution",value:4},{label:"Process Adherence",value:5},{label:"Communication",value:3}]})=>(String(i).padStart(2,"0"),e.jsxs("div",{style:{display:"flex",flexDirection:"column",padding:24,borderRadius:8,border:`1px solid ${L.absent}`,background:L.white,alignSelf:"stretch",flex:1,gap:24},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[e.jsx("span",{style:{fontSize:15,fontWeight:600,color:L.strong,fontFamily:"var(--font-sans)",lineHeight:1.2},children:"Compass Score"}),e.jsx("span",{style:{fontSize:14,fontWeight:400,color:L.muted,fontFamily:"var(--font-sans)",lineHeight:"normal"},children:s})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:24,flex:1,overflow:"hidden"},children:[e.jsxs("div",{style:{position:"relative",maxWidth:243,minWidth:160,flex:"0 1 243px",flexDirection:"column",alignItems:"center",display:"flex"},children:[e.jsx(Ut,{score:t,maxScore:n}),(()=>{const m=-(180-(n>0?Math.min(t/n,1):0)*180-45);return e.jsxs("svg",{width:"34",height:"35",viewBox:"0 0 34 35",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{marginTop:-24,transform:`rotate(${m}deg)`,transformOrigin:"center center"},children:[e.jsx("path",{d:"M16 25.2169C19.958 25.2169 23.1667 22.0083 23.1667 18.0503C23.1667 14.0922 19.958 10.8836 16 10.8836C12.042 10.8836 8.83334 14.0922 8.83334 18.0503C8.83334 22.0083 12.042 25.2169 16 25.2169Z",fill:"var(--rail-orange, #C98A5A)"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M30.4791 11.2328L33.4351 0L21.6888 3.09113C19.9212 2.41855 18.0036 2.05025 16 2.05025C7.16344 2.05025 0 9.2137 0 18.0503C0 26.8868 7.16344 34.0503 16 34.0503C24.8366 34.0503 32 26.8868 32 18.0503C32 15.6119 31.4546 13.301 30.4791 11.2328ZM16 30.5503C22.9036 30.5503 28.5 24.9538 28.5 18.0503C28.5 11.1467 22.9036 5.55025 16 5.55025C9.09644 5.55025 3.5 11.1467 3.5 18.0503C3.5 24.9538 9.09644 30.5503 16 30.5503Z",fill:"var(--rail-orange, #C98A5A)"})]})})(),e.jsx("div",{style:{fontSize:28,fontWeight:400,color:L.strong,fontFamily:"var(--font-sans)",lineHeight:1,textAlign:"center",marginTop:8},children:t})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"flex-start",justifyContent:"center",flex:1},children:[e.jsx("div",{style:{fontSize:15,fontWeight:500,color:L.strong,fontFamily:"var(--font-sans)",lineHeight:1.2,textAlign:"left"},children:"Interaction Quality Index"}),e.jsx("div",{style:{width:"100%",height:1,background:L.absent}}),o.map((g,f)=>e.jsx(en,{label:g.label,value:g.value},f))]})]})]})),Se=t=>{if(!t)return null;const n=String(t).toLowerCase();return n==="supervisor"?"var(--rail-compliance, #C98A5A)":n==="admin"||n==="administrator"?"var(--rail-discovery, #5E88B0)":n==="agent"?"var(--rail-outcome, #6B7C93)":null},de=t=>(t||"").split(" ").map(n=>n[0]).join("").toUpperCase()||"U",tn=t=>{if(!t||t==="Just now")return!0;if(/^\d{4}-\d{2}-\d{2}T/.test(t))try{const i=/Z$|[+-]\d{2}:\d{2}$/.test(t)?t:t+"Z",r=new Date(i);return Number.isNaN(r.getTime())?!1:Date.now()-r.getTime()<15*60*1e3}catch{return!1}const n=t.match(/^(\d+)\s*min/);return n?parseInt(n[1],10)<15:!(/\d+\s*h/.test(t)||/\d+\s*day/.test(t))},nn=t=>{if(!t)return"";if(!/^\d{4}-\d{2}-\d{2}T/.test(t))return t;try{const n=/Z$|[+-]\d{2}:\d{2}$/.test(t)?t:t+"Z",i=new Date(n);if(Number.isNaN(i.getTime()))return t;const s=new Date().getTime()-i.getTime(),o=Math.floor(s/6e4),g=Math.floor(s/36e5);if(o<1)return"Just now";if(o<60)return`${o} min`;if(g<24)return`${g} h`;const f=Math.floor(g/24);return f===1?"1 day":`${f} days`}catch{return t}},dt=({name:t,initials:n,color:i,avatar:r,size:s=36})=>r?e.jsx("img",{src:r,alt:t,style:{width:s,height:s,borderRadius:"50%",objectFit:"cover",flexShrink:0}}):e.jsx("div",{style:{width:s,height:s,borderRadius:"50%",background:i||"#6B7C93",color:"#FFF",display:"flex",alignItems:"center",justifyContent:"center",fontSize:s<=32?"10px":"11px",fontWeight:650,flexShrink:0,fontFamily:"var(--default-font-family)",letterSpacing:"0.02em"},title:t,children:n||de(t)}),sn=({comment:t,isReply:n=!1,isConsecutive:i=!1,onReply:r,onSendReply:s,onEdit:o,onDelete:g,onMenuClick:f,showReply:m=!0})=>{var fe,ie;const[k,j]=p.useState(!1),[F,c]=p.useState(!1),[S,b]=p.useState(!1),[v,w]=p.useState(""),[G,W]=p.useState(!1),[D,_]=p.useState(""),[P,H]=p.useState(!1),A=p.useRef(null),a=p.useRef(null),h=t.author||{},l=h.name||t.author_name||"Unknown",E=h.initials||de(l),O=h.role||t.author_role,Y=h.color||Se(O)||"#6B7C93",d=h.avatar||t.avatar,T=t.timestamp||t.created_at,q=nn(T),K=tn(T),ce=Array.isArray(t.content)?t.content:[t.content||t.text||""];return p.useEffect(()=>{if(!F)return;const u=Q=>{A.current&&!A.current.contains(Q.target)&&c(!1)};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[F]),e.jsxs("div",{onMouseEnter:()=>j(!0),onMouseLeave:()=>j(!1),style:{display:"flex",paddingLeft:n?48:0,alignItems:"flex-start",gap:16,paddingTop:i?0:8,paddingBottom:8},children:[i?e.jsx("div",{style:{width:36,flexShrink:0}}):e.jsx(dt,{name:l,initials:E,color:Y,avatar:d}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:i?"flex-end":"space-between",marginBottom:i?0:6},children:[!i&&e.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:8},children:[e.jsx("span",{style:{fontSize:13,fontWeight:650,color:"var(--text-ink, #1E2125)",lineHeight:"150%",fontFamily:"var(--default-font-family)"},children:l}),e.jsx("span",{style:{fontSize:12,fontWeight:400,color:"var(--Grey-Muted, #808183)",lineHeight:"150%",fontFamily:"var(--default-font-family)"},children:q}),(t.isEdited||t.is_edited)&&e.jsx("span",{style:{fontSize:12,fontWeight:400,color:"var(--Grey-Muted, #808183)",lineHeight:"150%",fontFamily:"var(--default-font-family)"},children:"(Edited)"})]}),e.jsxs("div",{style:{position:"relative"},ref:A,children:[e.jsx("button",{type:"button",onClick:()=>c(u=>!u),style:{padding:2,border:"none",background:"transparent",cursor:"pointer",borderRadius:4,display:"flex",alignItems:"center",justifyContent:"center",opacity:k||F?1:0,transition:"opacity 0.15s",flexShrink:0},children:e.jsx(y.Ellipsis,{size:24,color:"var(--Grey-Muted, #808183)"})}),F&&e.jsxs("div",{style:{position:"absolute",top:"100%",right:0,marginTop:4,display:"flex",width:99,flexDirection:"column",alignItems:"flex-start",borderRadius:4,border:"1px solid var(--Grey-absent, #D9D9D9)",background:"var(--Grey-White, #FFF)",boxShadow:"-2px 2px 2px 0 rgba(0, 0, 0, 0.25)",zIndex:50,overflow:"hidden"},children:[r&&e.jsx("button",{type:"button",onClick:()=>{c(!1),W(!1),b(!0)},style:{display:"flex",width:"100%",padding:"10px 16px",alignItems:"center",border:"none",background:"transparent",cursor:"pointer",fontSize:13,fontWeight:400,color:"var(--Grey-Strong, #2E3236)",fontFamily:"var(--default-font-family)",lineHeight:"150%",textAlign:"left"},onMouseEnter:u=>{u.currentTarget.style.background="var(--surface-hover, #F3F7F7)"},onMouseLeave:u=>{u.currentTarget.style.background="transparent"},children:"Reply"}),o&&e.jsx("button",{type:"button",disabled:!K,onClick:()=>{if(!K)return;c(!1);const u=Array.isArray(t.content)?t.content.join(`
|
|
16
|
+
`):t.content||t.text||"";_(u),W(!0),b(!1)},style:{display:"flex",width:"100%",padding:"10px 16px",alignItems:"center",border:"none",background:"transparent",cursor:K?"pointer":"not-allowed",fontSize:13,fontWeight:400,color:K?"var(--Grey-Strong, #2E3236)":"var(--Grey-Muted, #808183)",fontFamily:"var(--default-font-family)",lineHeight:"150%",textAlign:"left",opacity:K?1:.5},onMouseEnter:u=>{K&&(u.currentTarget.style.background="var(--surface-hover, #F3F7F7)")},onMouseLeave:u=>{u.currentTarget.style.background="transparent"},children:"Edit"}),g&&e.jsx("button",{type:"button",onClick:()=>{c(!1),H(!0)},style:{display:"flex",width:"100%",padding:"10px 16px",alignItems:"center",border:"none",background:"transparent",cursor:"pointer",fontSize:13,fontWeight:400,color:"var(--Grey-Strong, #2E3236)",fontFamily:"var(--default-font-family)",lineHeight:"150%",textAlign:"left"},onMouseEnter:u=>{u.currentTarget.style.background="var(--surface-hover, #F3F7F7)"},onMouseLeave:u=>{u.currentTarget.style.background="transparent"},children:"Delete"})]})]})]}),G?e.jsxs("div",{style:{display:"flex",width:662,maxWidth:"100%",padding:"8px 12px 12px 12px",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:24,borderRadius:8,border:"1px solid var(--Grey-absent, #D9D9D9)",background:"var(--Grey-White, #FFF)",boxSizing:"border-box",marginTop:4},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},children:[e.jsxs("span",{style:{fontSize:13,fontWeight:600,color:"var(--Grey-Muted, #808183)",fontFamily:"var(--default-font-family)",lineHeight:"normal"},children:["“"," ",((fe=t.author)==null?void 0:fe.name)||"Unknown"]}),e.jsx("button",{type:"button",onClick:()=>W(!1),style:{display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",cursor:"pointer",padding:0},children:e.jsx(y.X,{size:20,color:"var(--Grey-Muted, #808183)"})})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,width:"100%"},children:[e.jsx("input",{value:D,onChange:u=>_(u.target.value),onKeyDown:u=>{u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),D.trim()&&(o==null||o({...t,content:D.trim(),isEdited:!0}),W(!1))),u.key==="Escape"&&W(!1)},autoFocus:!0,style:{flex:1,padding:"10px 12px",fontSize:13,fontWeight:400,color:"var(--text-ink, #1E2125)",fontFamily:"var(--default-font-family)",lineHeight:"160%",border:"none",background:"transparent",outline:"none",boxSizing:"border-box"}}),e.jsx("button",{type:"button",onClick:()=>{D.trim()&&(o==null||o({...t,content:D.trim(),isEdited:!0}),W(!1))},disabled:!D.trim(),style:{display:"flex",padding:"6px 16px",justifyContent:"center",alignItems:"center",fontSize:13,fontWeight:600,color:D.trim()?"var(--Grey-White, #FFF)":"var(--Grey-Muted, #808183)",background:D.trim()?"var(--Grey-Strong, #2E3236)":"var(--grey-light, #e9e8e8a1)",border:"none",borderRadius:6,cursor:D.trim()?"pointer":"not-allowed",fontFamily:"var(--default-font-family)",flexShrink:0,transition:"all 0.15s",lineHeight:"150%"},children:"Save"})]})]}):e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:4,alignItems:"flex-start"},children:ce.map((u,Q)=>e.jsx("div",{style:{fontSize:13,fontWeight:400,color:"var(--text-ink, #1E2125)",lineHeight:"160%",fontFamily:"var(--default-font-family)",padding:"8px 12px",background:n?"var(--surface-hover, #F3F7F7)":"var(--surface-warm-40, rgba(243, 241, 229, 0.40))",borderRadius:8,wordBreak:"break-word"},children:u},Q))}),P&&e.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:8,marginTop:8,fontSize:13,fontFamily:"var(--default-font-family)"},children:[e.jsx("span",{style:{color:"var(--Grey-Muted, #808183)",fontWeight:400},children:"Confirm: delete this comment?"}),e.jsx("button",{type:"button",onClick:()=>{H(!1),g==null||g(t)},style:{background:"var(--grey-light, #e9e8e8a1)",border:"none",cursor:"pointer",fontSize:13,fontWeight:600,color:"var(--text-ink, #1E2125)",fontFamily:"var(--default-font-family)",padding:"4px 10px",borderRadius:6,transition:"background 0.15s"},onMouseEnter:u=>{u.currentTarget.style.background="var(--Grey-absent, #D9D9D9)"},onMouseLeave:u=>{u.currentTarget.style.background="var(--grey-light, #e9e8e8a1)"},children:"Delete"}),e.jsx("button",{type:"button",onClick:()=>H(!1),style:{background:"none",border:"none",cursor:"pointer",fontSize:13,fontWeight:400,color:"var(--Grey-Muted, #808183)",fontFamily:"var(--default-font-family)",padding:"4px 10px",borderRadius:6,transition:"background 0.15s"},onMouseEnter:u=>{u.currentTarget.style.background="var(--grey-light, #e9e8e8a1)"},onMouseLeave:u=>{u.currentTarget.style.background="none"},children:"Cancel"})]}),m&&r&&!S&&!P&&e.jsxs("button",{type:"button",onClick:()=>{W(!1),b(!0)},style:{display:"flex",alignItems:"center",gap:6,marginTop:8,padding:0,border:"none",background:"transparent",cursor:"pointer",fontSize:13,fontWeight:400,color:"var(--Grey-Muted, #808183)",fontFamily:"var(--default-font-family)",transition:"color 0.15s"},children:[e.jsx(y.CornerDownRight,{size:20,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5}),"Reply"]}),S&&e.jsxs("div",{style:{display:"flex",width:662,maxWidth:"100%",padding:"8px 12px 12px 12px",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:24,borderRadius:8,border:"1px solid var(--Grey-absent, #D9D9D9)",background:"var(--Grey-White, #FFF)",boxSizing:"border-box",marginTop:12},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,width:"100%"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},children:[e.jsxs("span",{style:{fontSize:13,fontWeight:600,color:"var(--Grey-Muted, #808183)",fontFamily:"var(--default-font-family)",lineHeight:"normal"},children:["“"," ",((ie=t.author)==null?void 0:ie.name)||"Unknown"]}),e.jsx("button",{type:"button",onClick:()=>{w(""),b(!1)},style:{display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",cursor:"pointer",padding:0},children:e.jsx(y.X,{size:20,color:"var(--Grey-Muted, #808183)"})})]}),e.jsx("div",{style:{display:"flex",height:36,padding:16,alignItems:"center",gap:5,borderRadius:"0 8px 8px 8px",background:"var(--Grey-Strong, #2E3236)",boxSizing:"border-box",width:"100%"},children:e.jsx("span",{style:{color:"var(--Grey-White, #FFF)",fontSize:13,fontWeight:400,fontFamily:"var(--default-font-family)",lineHeight:"normal",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:Array.isArray(t.content)?t.content[0]:t.content})})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,width:"100%"},children:[e.jsx("input",{ref:a,value:v,onChange:u=>w(u.target.value),onKeyDown:u=>{u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),v.trim()&&(s==null||s({content:v.trim(),parentId:t.id}),w(""),b(!1))),u.key==="Escape"&&(w(""),b(!1))},autoFocus:!0,placeholder:"Add a reply",style:{flex:1,padding:"10px 12px",fontSize:13,fontWeight:400,color:"var(--text-ink, #1E2125)",fontFamily:"var(--default-font-family)",lineHeight:"160%",border:"none",background:"transparent",outline:"none",boxSizing:"border-box"}}),e.jsx("button",{type:"button",onClick:()=>{v.trim()&&(s==null||s({content:v.trim(),parentId:t.id}),w(""),b(!1))},disabled:!v.trim(),style:{display:"flex",height:28,padding:"8px 12px",justifyContent:"center",alignItems:"center",gap:8,fontSize:13,fontWeight:600,color:v.trim()?"var(--Grey-White, #FFF)":"var(--Grey-Muted, #808183)",background:v.trim()?"var(--Neutral-850, #272727)":"var(--grey-light, #e9e8e8a1)",border:"none",borderRadius:10,cursor:v.trim()?"pointer":"not-allowed",fontFamily:"var(--default-font-family)",lineHeight:"150%"},children:"Post"})]})]})]})]})},rn=({currentUser:t,onSubmit:n})=>{const[i,r]=p.useState(""),[s,o]=p.useState(!1),g=p.useRef(null),f=()=>{const c=i.trim();c&&(n==null||n(c),r(""))},m=c=>{c.key==="Enter"&&!c.shiftKey&&(c.preventDefault(),f())},k=(t==null?void 0:t.initials)||de(t==null?void 0:t.name),j=(t==null?void 0:t.color)||Se(t==null?void 0:t.role)||"#6B7C93",F=t==null?void 0:t.avatar;return e.jsxs("div",{style:{display:"flex",gap:16,alignItems:"flex-start"},children:[e.jsx(dt,{name:t==null?void 0:t.name,initials:k,color:j,avatar:F}),e.jsx("div",{style:{flex:1,padding:12,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:24,borderRadius:8,border:s?"1px solid var(--Grey-Strong, #2E3236)":"1px solid var(--Grey-absent, #D9D9D9)",background:"var(--Grey-White, #FFF)",transition:"border-color 0.15s"},children:e.jsxs("div",{style:{display:"flex",alignItems:"flex-end",gap:8,width:"100%"},children:[e.jsx("textarea",{ref:g,value:i,onChange:c=>r(c.target.value),onFocus:()=>o(!0),onBlur:()=>o(!1),onKeyDown:m,placeholder:"Add feedback",rows:1,style:{flex:1,border:"none",outline:"none",resize:"none",fontSize:13,fontWeight:400,color:"var(--text-ink, #1E2125)",fontFamily:"var(--default-font-family)",lineHeight:"160%",background:"transparent",padding:0,minHeight:24}}),e.jsx("button",{type:"button",onClick:f,disabled:!i.trim(),style:{display:"flex",padding:"6px 16px",justifyContent:"center",alignItems:"center",fontSize:13,fontWeight:600,color:i.trim()?"var(--Grey-White, #FFF)":"var(--Grey-Muted, #808183)",background:i.trim()?"var(--Grey-Strong, #2E3236)":"var(--grey-light, #e9e8e8a1)",border:"none",borderRadius:6,cursor:i.trim()?"pointer":"not-allowed",fontFamily:"var(--default-font-family)",transition:"all 0.15s",flexShrink:0,lineHeight:"150%"},children:"Post"})]})})]})},ct=({comment:t,depth:n=0,isConsecutive:i=!1,onReply:r,onSendReply:s,onEdit:o,onDelete:g,onMenuClick:f})=>{const m=t.replies&&t.replies.length>0,k=!m;return e.jsxs(p.Fragment,{children:[e.jsx("div",{style:{paddingLeft:n>0?Math.min(n*32,128):0},children:e.jsx(sn,{comment:t,isReply:n>0,isConsecutive:i,onReply:r,onSendReply:s,onEdit:o,onDelete:g,onMenuClick:f,showReply:k})}),m&&t.replies.map(j=>e.jsx(ct,{comment:j,depth:n+1,onReply:r,onSendReply:s,onEdit:o,onDelete:g,onMenuClick:f},j.id))]})},ft=({comments:t=[],totalComments:n,children:i,onSendComment:r,onReply:s,onSendReply:o,onEdit:g,onDelete:f,onMenuClick:m,onMarkResolved:k,currentUser:j,isResolved:F=!1})=>{const[c,S]=p.useState([]),[b,v]=p.useState(!1),w=p.useMemo(()=>{const a=new Set(t.map(l=>l.id)),h=c.filter(l=>!a.has(l.id));return[...t,...h]},[t,c]);p.useEffect(()=>{const a=new Set(t.map(h=>h.id));S(h=>h.filter(l=>!a.has(l.id)))},[t]);const G=p.useMemo(()=>{if(!j)return{name:"You",initials:"YO",color:"#6B7C93"};const a=j.name||"You",h=j.initials||de(a),l=j.role&&String(j.role).toLowerCase(),E=j.color||Se(l)||"#6B7C93";return{...j,name:a,initials:h,color:E}},[j]),W=async({content:a,parentId:h})=>{if(o){v(!0);try{await o({content:a,parentId:h})}finally{v(!1)}}else{const l={id:`temp-${Date.now()}`,author:G,content:a,timestamp:"Just now",parentId:h,isOptimistic:!0};S(E=>[...E,l])}},D=async a=>{if(r){v(!0);try{await r(a)}finally{v(!1)}}else{const h={id:`temp-${Date.now()}`,author:G,content:a,timestamp:"Just now",isOptimistic:!0};S(l=>[...l,h])}},_=a=>{S(h=>h.map(l=>l.id===a.id?{...l,content:a.content,isEdited:!0}:l)),g==null||g(a)},P=a=>{S(h=>h.filter(l=>l.id!==a.id)),f==null||f(a)},H=p.useMemo(()=>{const a={};w.forEach(l=>{l.parentId&&(a[l.parentId]||(a[l.parentId]=[]),a[l.parentId].push(l))});const h=l=>({...l,replies:(a[l.id]||[]).map(h)});return w.filter(l=>!l.parentId).map(h)},[w]),A=n??w.length;return e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",background:"var(--Grey-White, #FFF)",width:"100%",fontFamily:"var(--default-font-family)"},children:[e.jsxs("div",{style:{display:"flex",height:40,paddingBottom:8,alignItems:"center",gap:8,alignSelf:"stretch"},children:[e.jsx(y.MessagesSquare,{size:24,color:"var(--rail-orange, #C98A5A)",strokeWidth:1.5}),e.jsx("span",{style:{fontSize:16,fontWeight:600,color:"var(--Grey-Strong, #2E3236)",textTransform:"uppercase",lineHeight:1.2},children:"Feedback & Guidance"})]}),e.jsx("div",{style:{width:"100%",height:1,background:"var(--Grey-absent, #D9D9D9)"}}),e.jsxs("div",{style:{display:"flex",gap:24,alignSelf:"stretch"},children:[e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,paddingTop:16,paddingBottom:8},children:[e.jsx("div",{style:{width:34,height:34,borderRadius:9999,background:"var(--surface-hover, #F3F7F7)",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:e.jsx(y.MessagesSquare,{style:{width:20,height:20,flexShrink:0},color:"var(--Grey-Strong, #2E3236)",strokeWidth:1.5})}),e.jsx("span",{style:{fontSize:15,fontWeight:500,color:"var(--Grey-Strong, #2E3236)"},children:"Feedback"}),e.jsxs("span",{style:{fontSize:13,fontWeight:400,color:"var(--Grey-Muted, #808183)",fontFamily:"var(--default-font-family)",lineHeight:"150%",marginLeft:"auto"},children:[A," Comment",A!==1?"s":""]}),F?e.jsxs("div",{style:{display:"inline-flex",height:32,padding:"12px 16px 12px 12px",justifyContent:"center",alignItems:"center",gap:8,borderRadius:10,background:"var(--Rail-Surface-2, #E3E1D7)",flexShrink:0},children:[e.jsx(y.Check,{size:16,color:"var(--Grey-Strong, #2E3236)",strokeWidth:2}),e.jsx("span",{style:{fontSize:13,fontWeight:500,color:"var(--Grey-Strong, #2E3236)",fontFamily:"var(--default-font-family)",lineHeight:"150%"},children:"Resolved"})]}):k?e.jsxs("button",{type:"button",onClick:k,style:{display:"flex",alignItems:"center",gap:8,padding:"8px 16px",fontSize:13,fontWeight:500,color:"var(--Grey-Strong, #2E3236)",background:"var(--Grey-White, #FFF)",border:"1px solid var(--Grey-absent, #D9D9D9)",borderRadius:20,cursor:"pointer",fontFamily:"var(--default-font-family)",transition:"background 0.15s",lineHeight:"150%",flexShrink:0},children:[e.jsx(y.CircleCheck,{size:16,color:"var(--Grey-Strong, #2E3236)",strokeWidth:1.5}),"Mark as Resolved"]}):null]}),w.length>0&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:0,marginBottom:24,maxHeight:600,overflowY:w.length>6?"auto":"visible"},children:H.map((a,h)=>{var d,T;const l=h>0?H[h-1]:null,E=((d=l==null?void 0:l.author)==null?void 0:d.name)||(l==null?void 0:l.author_name),O=((T=a.author)==null?void 0:T.name)||a.author_name,Y=l&&E===O&&(!l.replies||l.replies.length===0);return e.jsx(ct,{comment:a,depth:0,isConsecutive:!!Y,onReply:s,onSendReply:W,onEdit:_,onDelete:P,onMenuClick:m},a.id)})}),w.length>0&&e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:16,marginLeft:48},children:[e.jsx(y.Info,{size:16,color:"var(--Grey-Muted, #808183)"}),e.jsx("span",{style:{color:"var(--Grey-Muted, #808183)",fontSize:13,fontStyle:"normal",fontWeight:400,lineHeight:"normal"},children:"Comments can be edited within 15 minutes."})]}),b&&e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 0"},children:[e.jsx("div",{style:{width:16,height:16,border:"2px solid var(--Grey-absent, #D9D9D9)",borderTopColor:"var(--Grey-Strong, #2E3236)",borderRadius:"50%",animation:"spin 0.8s linear infinite"}}),e.jsx("span",{style:{fontSize:13,color:"var(--Grey-Muted, #808183)",fontFamily:"var(--default-font-family)"},children:"Sending..."}),e.jsx("style",{children:"@keyframes spin { to { transform: rotate(360deg); } }"})]}),e.jsx(rn,{currentUser:G,onSubmit:D})]}),e.jsx("div",{style:{flex:1,minWidth:0},children:i})]})]})},nt=({children:t,size:n=28,onClick:i,title:r})=>{const[s,o]=p.useState(!1);return e.jsx("div",{title:r,onClick:i,onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),style:{display:"flex",alignItems:"center",justifyContent:"center",width:n,height:n,borderRadius:9999,background:s?"var(--surface-hover, #F3F7F7)":"transparent",cursor:"pointer",flexShrink:0,transition:"background 0.15s"},children:t})},on=t=>{const n=Math.floor(t/6e4),i=Math.floor(t%6e4/1e3);return`${n.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}`},ln=({item:t,isLast:n,onPlayEvidence:i,onShowInTranscript:r,timelinePlaying:s,currentTimeSeconds:o})=>{var c;const g=(c=t.signal_refs)==null?void 0:c.map(S=>{const b=S.display_name||S.signal_key||"",v=S.confidence!=null?` (${Math.round(S.confidence*100)}%)`:"";return b+v}).join(", "),f=t.start_ms??t.startMs,m=t.end_ms??t.endMs,k=f!=null,j=(o??0)*1e3,F=s&&k&&j>=f&&j<=(m??f+5e3);return e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,padding:"12px 0",borderBottom:n?"none":"1px solid var(--Grey-absent, #D9D9D9)"},children:[e.jsx("span",{style:{alignSelf:"stretch",fontSize:14,fontWeight:400,color:"var(--Grey-Strong, #2E3236)",lineHeight:"150%"},children:t.title||t.detail||""}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[g&&e.jsx("span",{style:{fontSize:14,fontWeight:400,color:"var(--Grey-Muted, #808183)",fontFamily:"var(--default-font-family)",lineHeight:"150%",flex:1,minWidth:0},children:g}),k&&e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flexShrink:0},children:[e.jsx(nt,{size:28,title:F?"Pause":"Play evidence",onClick:()=>i==null?void 0:i({start_ms:f,end_ms:m}),children:F?e.jsx(y.PauseCircle,{size:17,color:"var(--Grey-Strong, #2E3236)",strokeWidth:1}):e.jsx(y.PlayCircle,{size:17,color:"var(--Grey-Muted, #808183)",strokeWidth:1})}),e.jsx(nt,{size:28,title:"Show in transcript",onClick:()=>r==null?void 0:r(f),children:e.jsx(y.ScrollText,{size:16,color:"#808183",strokeWidth:1.5})}),e.jsx("span",{style:{fontSize:13,fontWeight:400,color:"var(--Grey-Muted, #808183)",lineHeight:1.2,whiteSpace:"nowrap"},children:on(f)})]})]})]})},pt=({items:t=[],guidanceCount:n,loading:i=!1,onPlayEvidence:r,onShowInTranscript:s,timelinePlaying:o=!1,currentTimeSeconds:g=0})=>{const f=n??t.length;return e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch",width:"100%"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,paddingTop:16,paddingBottom:8},children:[e.jsx("div",{style:{width:34,height:34,borderRadius:9999,background:"var(--surface-hover, #F3F7F7)",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:e.jsx(y.Lightbulb,{style:{width:20,height:20,flexShrink:0},color:"var(--Grey-Strong, #2E3236)",strokeWidth:1.5})}),e.jsx("span",{style:{fontSize:15,fontWeight:500,color:"var(--Grey-Strong, #2E3236)"},children:"Guidance"}),e.jsxs("span",{style:{fontSize:13,fontWeight:400,color:"var(--Grey-Muted, #808183)",fontFamily:"var(--default-font-family)",lineHeight:"150%",marginLeft:"auto"},children:[f," Item",f!==1?"s":""]})]}),t.map((m,k)=>e.jsx(ln,{item:m,isLast:k===t.length-1,onPlayEvidence:r,onShowInTranscript:s,timelinePlaying:o,currentTimeSeconds:g},k))]})},ne=({text:t,children:n})=>{const[i,r]=p.useState(!1),s=p.useRef(null),[o,g]=p.useState({top:0,left:0});if(!t)return n;const f=()=>{if(s.current){const m=s.current.getBoundingClientRect();g({top:m.top-2,left:m.left+m.width/2})}r(!0)};return e.jsxs("div",{ref:s,style:{position:"relative",display:"inline-flex"},onMouseEnter:f,onMouseLeave:()=>r(!1),children:[n,i&&e.jsx("div",{style:{position:"fixed",top:o.top,left:o.left,transform:"translate(-50%, -100%)",display:"flex",padding:10,alignItems:"center",borderRadius:4,border:"1px solid var(--Grey-absent, #D9D9D9)",background:"var(--Grey-Strong, #2E3236)",zIndex:9999,pointerEvents:"none",whiteSpace:"nowrap"},children:e.jsx("span",{style:{color:"#FFF",fontSize:12,fontWeight:400,lineHeight:"normal"},children:t})})]})},an=[{key:"overview",label:"Overview"},{key:"coaching",label:"Coaching Summary"},{key:"signals",label:"Signals & Recording"},{key:"comments",label:"Feedback"}],dn=({title:t="Wheel Stud Replacement Enquiry",onBack:n,data:i,coachingData:r,coachingLoading:s=!1,audioUrl:o,audioRef:g,currentTimeSeconds:f,timelinePlaying:m,playbackRate:k,timelineSegments:j,onSeek:F,onTogglePlay:c,onSeekBack:S,onSeekForward:b,onSetPlaybackRate:v,agentName:w,agentFullName:G,customerName:W,customerFullName:D,transcript:_,activeTurnIndex:P,turnObservations:H,highlightedTurns:A,onTurnPlayPause:a,onPlayEvidence:h,onHighlightTurns:l,callPurpose:E,classification:O,outcomeQuality:Y,resolutionOutcome:d,customerIntent:T,interactionId:q,moreDetails:K,compassScore:ce,compassMaxScore:fe=10,predictedCsat:ie,predictedLabel:u="Predicted Objective",compassLegends:Q,customerSessions:gt,customerSessionCount:ht,onSessionClick:ke,onViewAllSessions:we,prevSessionDesc:ut,prevSessionDisabled:se=!1,nextSessionDesc:yt,nextSessionDisabled:re=!1,onPreviousSession:Ce,onNextSession:Fe,comments:De=[],guidance:We=[],currentUser:xt,onSendComment:mt,onSendReply:vt,onReply:bt,onEdit:jt,onDelete:St,onMenuClick:kt,onMarkResolved:wt,commentsResolved:Ct})=>{var Ke,Ve;const[pe,Ie]=p.useState("overview"),[Ft,ze]=p.useState(new Set),[Ge,ge]=p.useState(!1),[Me,_e]=p.useState(null),[Ee,Re]=p.useState(!1),[Te,Dt]=p.useState(0),J=p.useRef(null),he=p.useRef(null),ue=p.useRef(null),ye=p.useRef(null),xe=p.useRef(null),Wt={overview:he,coaching:ue,signals:ye,comments:xe},me=p.useRef(null),ve=p.useRef(!1);p.useEffect(()=>{const x=me.current;if(!x)return;const I=["overview","coaching","signals","comments"],z=[he,ue,ye,xe],B=(U=>{let N=U.parentElement;for(;N;){const{overflow:ae,overflowY:Ye}=window.getComputedStyle(N);if(/(auto|scroll)/.test(ae+Ye))return N;N=N.parentElement}return null})(x),Z=()=>{if(ve.current)return;let U=I[0];for(let N=z.length-1;N>=0;N--){const ae=z[N].current;if(!ae)continue;if(ae.getBoundingClientRect().top<=150){U=I[N];break}}Ie(U)};return x.addEventListener("scroll",Z,{passive:!0}),B&&B!==x&&B.addEventListener("scroll",Z,{passive:!0}),window.addEventListener("scroll",Z,{passive:!0,capture:!0}),()=>{x.removeEventListener("scroll",Z),B&&B!==x&&B.removeEventListener("scroll",Z),window.removeEventListener("scroll",Z,{capture:!0})}},[]);const He=p.useRef(null),It=x=>{var z;Ie(x),ve.current=!0,He.current=x;const I=(z=Wt[x])==null?void 0:z.current;if(I){const V=me.current;if(V&&V.scrollHeight>V.clientHeight){const B=V.getBoundingClientRect().top,U=I.getBoundingClientRect().top-B+V.scrollTop-16;V.scrollTo({top:U,behavior:"smooth"})}else{const B=I.getBoundingClientRect().top+window.scrollY-120;window.scrollTo({top:B,behavior:"smooth"})}}setTimeout(()=>{ve.current=!1,He.current=null},1200)},Ae=gt||[],Le=x=>{var z;const I=x/1e3;(z=J.current)!=null&&z.scrollToTranscript&&J.current.scrollToTranscript(I)},Be=x=>{var I;if(h)h(x);else{const z=x.start_ms??x.startMs;if(z!=null&&((I=J.current)!=null&&I.seekTo)){J.current.seekTo(z/1e3),Re(!0),Dt(z/1e3);const B=(x.end_ms??x.endMs??z+5e3)-z;setTimeout(()=>Re(!1),B)}}},zt=x=>{l&&l(x)},Gt=x=>{ze(I=>{const z=new Set(I);return z.has(x)?z.delete(x):z.add(x),z})},Mt=(i==null?void 0:i.blocks)||[],X=x=>{var I;return((I=Mt.find(z=>z.block_id===x))==null?void 0:I.payload)||{}},$=X("interaction-metadata"),ee=X("interaction-context"),oe=X("interaction-signals"),Pe=X("interaction-outcome-lift"),_t=X("interaction-dimensions").dimensions||[],Et=ee.call_purpose||{},Rt=ee.classification||{},$e={duration_seconds:156,message_count:25,...$},Oe={interaction_driver:"General Information",interaction_direction:"inbound",...Et},Tt={interaction_paradigm:"Informational",...Rt},Ht={p_expected:.94,p_full:.83,lift_raw:-.11,lift:.043,interpretation:{lift_band:"positive"},...Pe},At=((Ke=Pe.driver_signal_keys)==null?void 0:Ke.map(x=>x.replace(/^sig\./,"").replace(/_/g," ")))||["customer needs fully addressed","call flow expectations set","Opening expectations set","Active listening demonstrated","Resolution confirmed"],Lt=r||{one_liner:"David provided the customer with information on wheel stud replacement and pricing, but did not secure an appointment.",context:"The customer was seeking information on wheel stud replacement for a 2013 Chevy Bolt and was unsure about doing the repair themselves.",strengths:[{text:"Anthony effectively scheduled the appointment and confirmed the details clearly.",quote:"Alright. That is all set up for Saturday, the twenty eighth, at 12:00."},{text:"Handled customer objections well by explaining the need for a separate appointment for alignment.",quote:"I don't have the alignment changeover the weekend. So I would have to set up a separate appointment for the alignment."},{text:"Demonstrated courtesy and professionalism throughout the call.",quote:"Have a great day."}],improvements:[{text:"Close the loop by restating the plan and confirming next steps to ensure customer certainty.",quote:"Alright. That is all set up for Saturday, the twenty eighth, at 12:00."},{text:"Frame solutions positively by leading with what can be done rather than limitations.",quote:"I don't have the alignment changeover the weekend."}],overall:"effective"},Bt=(Ve=oe==null?void 0:oe.signals)!=null&&Ve.length?oe:{present_count:9,total_signals_evaluated:146,signals:[{key:"price_estimate_provided",display_name:"Price Estimate Provided",observations:[{key:"obs1",reason:"Evidence shows a price estimate or quote was provided.",evidence:[{start_ms:92e3,end_ms:97e3,text:"From Casper, you're probably looking at, like, a half hour labor plus a stud, so you'd probably be somewhere around $90 or something.",turn_ids:[8]}]}]},{key:"fee_or_cost_discussed",display_name:"Fee or Cost Discussed",observations:[{key:"obs2",reason:"Agent discussed pricing details with the customer."}]},{key:"engagement_budget",display_name:"Engagement Budget Discussed",observations:[{key:"obs3a",reason:"Budget expectations were set."},{key:"obs3b",reason:"Customer confirmed budget range."}]},{key:"projected_revenue",display_name:"Projected Revenue Discussed",observations:[{key:"obs4a",reason:"Revenue projection shared."},{key:"obs4b",reason:"Timeline for revenue discussed."},{key:"obs4c",reason:"Quarterly targets mentioned."}]},{key:"market_analysis",display_name:"Market Analysis Completed",observations:[{key:"obs5a",reason:"Market analysis referenced."},{key:"obs5b",reason:"Competitive landscape discussed."},{key:"obs5c",reason:"Market trends mentioned."},{key:"obs5d",reason:"Regional analysis provided."}]},{key:"target_audience",display_name:"Target Audience Defined",observations:[{key:"obs6a",reason:"Target audience identified."},{key:"obs6b",reason:"Demographics discussed."},{key:"obs6c",reason:"Audience segmentation reviewed."},{key:"obs6d",reason:"Persona mapping completed."},{key:"obs6e",reason:"Channel preferences noted."}]},{key:"concept_approval",display_name:"Concept Approval Received",observations:[{key:"obs7a",reason:"Concept approved by stakeholder."},{key:"obs7b",reason:"Feedback incorporated."},{key:"obs7c",reason:"Sign-off confirmed."},{key:"obs7d",reason:"Revisions requested."},{key:"obs7e",reason:"Final version accepted."},{key:"obs7f",reason:"Timeline approved."}]},{key:"prototype_developed",display_name:"Prototype Developed",observations:[{key:"obs8a",reason:"Prototype shared."},{key:"obs8b",reason:"Testing initiated."},{key:"obs8c",reason:"Feedback collected."},{key:"obs8d",reason:"Iterations completed."},{key:"obs8e",reason:"Usability tested."},{key:"obs8f",reason:"Design finalized."},{key:"obs8g",reason:"Stakeholder demo done."}]},{key:"user_testing",display_name:"User Testing Scheduled",observations:[{key:"obs9a",reason:"Testing sessions planned."},{key:"obs9b",reason:"Participants recruited."},{key:"obs9c",reason:"Test scripts prepared."},{key:"obs9d",reason:"Environment set up."},{key:"obs9e",reason:"Accessibility testing included."},{key:"obs9f",reason:"Results framework defined."},{key:"obs9g",reason:"Timeline confirmed."},{key:"obs9h",reason:"Backup plan discussed."}]}]},Ne=We.length?We:[{title:"Close the loop: Restate the plan and confirm what happens next so the customer leaves with certainty",signal_refs:[{display_name:"Next Step Unclear",confidence:.5}],start_ms:18e3,end_ms:23e3},{title:"Close the call properly: Summarize what was done and offer additional help",signal_refs:[{display_name:"Call Closing Stated",confidence:.55}],start_ms:89e3,end_ms:94e3},{title:"Frame solutions positively: Lead with what you can do rather than what you can't",signal_refs:[{display_name:"Positive Framing or Solution Orientation",confidence:.5}],start_ms:107e3,end_ms:112e3},{title:"Show expertise: Explain relevant products, policies or options with confidence rather than transfer",signal_refs:[{display_name:"Product Knowledge Demonstrated",confidence:.5}],start_ms:116e3,end_ms:121e3}],be=w||$.agent_name||$.agent||ee.agent_name||"Agent",Pt=G||$.agent_full_name||$.agent_name||be,te=W||$.customer_name||$.customer||ee.customer_name||"Customer",qe=D||$.customer_full_name||$.customer_name||te,je=ht??Ae.length,le=$.created_dt||(i==null?void 0:i.created_dt)||ee.created_dt||"",$t=le?new Date(/Z$|[+-]\d{2}:\d{2}$/.test(le)?le:le+"Z").toLocaleString():"",Ot=Oe.interaction_direction==="inbound"?"Inbound":"Outbound";return e.jsxs("div",{style:{display:"flex",flexDirection:"column",width:"100%",height:"100%",background:"var(--Grey-White, #FFF)"},children:[e.jsxs("div",{style:{position:"sticky",top:0,zIndex:20,background:"var(--Grey-White, #FFF)"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,padding:"24px 24px 0"},children:[e.jsx("button",{onClick:n,style:{display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",cursor:"pointer",padding:0,flexShrink:0},children:e.jsx(y.ArrowLeft,{size:24,color:"var(--Grey-Strong, #2E3236)"})}),e.jsx("div",{style:{width:1,height:28,background:"var(--Base-absent, #D9D9D9)"}}),e.jsx("h1",{style:{color:"var(--Grey-Strong, #2E3236)",fontSize:24,fontStyle:"normal",fontWeight:400,lineHeight:"normal",margin:0,flex:1},children:t}),(Ce||Fe)&&e.jsxs("div",{style:{display:"flex",alignItems:"center",flexShrink:0},children:[e.jsx(ne,{text:ut,children:e.jsxs("button",{onClick:se?void 0:Ce,disabled:se,style:{display:"flex",alignItems:"center",gap:6,padding:"4px 12px",background:"none",border:"none",cursor:se?"default":"pointer",opacity:se?.4:1},children:[e.jsx(y.ArrowLeft,{size:16,color:"var(--Neutral-800, #323232)",strokeWidth:1.5}),e.jsx("span",{style:{color:"var(--Neutral-800, #323232)",fontSize:13,fontWeight:400,lineHeight:"24px",fontFamily:"var(--default-font-family)",whiteSpace:"nowrap"},children:"Previous Session"})]})}),e.jsx("div",{style:{width:1,height:20,background:"var(--Grey-absent, #D9D9D9)",flexShrink:0}}),e.jsx(ne,{text:yt,children:e.jsxs("button",{onClick:re?void 0:Fe,disabled:re,style:{display:"flex",alignItems:"center",gap:6,padding:"4px 12px",background:"none",border:"none",cursor:re?"default":"pointer",opacity:re?.4:1},children:[e.jsx("span",{style:{color:"var(--Neutral-800, #323232)",fontSize:13,fontWeight:400,lineHeight:"24px",fontFamily:"var(--default-font-family)",whiteSpace:"nowrap"},children:"Next Session"}),e.jsx(y.ArrowRight,{size:16,color:"var(--Neutral-800, #323232)",strokeWidth:1.5})]})})]})]}),e.jsx("div",{style:{display:"flex",alignItems:"flex-start",background:"var(--Grey-White, #FFF)",borderBottom:"1px solid var(--Grey-Faint, #ACADAD)",padding:"0 24px",marginTop:8},children:an.map(x=>e.jsx("button",{onClick:()=>It(x.key),style:{display:"flex",padding:16,alignItems:"center",gap:10,background:"none",border:"none",borderBottom:pe===x.key?"3px solid var(--Grey-Strong, #2E3236)":"3px solid transparent",cursor:"pointer",fontSize:15,fontWeight:pe===x.key?500:400,color:pe===x.key?"var(--Grey-Strong, #2E3236)":"var(--Grey-Muted, #808183)",whiteSpace:"nowrap",transition:"border-color 0.2s ease, color 0.2s ease"},children:x.label},x.key))})]}),e.jsxs("div",{ref:me,style:{padding:24,flex:1,overflowY:"auto"},children:[e.jsxs("div",{ref:he,style:{display:"flex",flexDirection:"column",justifyContent:"flex-end",alignItems:"flex-start",gap:24,alignSelf:"stretch"},children:[e.jsxs("div",{style:{display:"flex",height:40,alignItems:"center",gap:16,alignSelf:"stretch"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flex:1},children:[e.jsx(y.ClipboardList,{size:24,color:"var(--rail-orange, #C98A5A)",strokeWidth:2}),e.jsx("span",{style:{fontSize:16,fontWeight:600,color:"var(--Grey-Strong, #2E3236)",lineHeight:1.2,textTransform:"uppercase"},children:"Overview"})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,flexShrink:0},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"8px 0"},children:[e.jsx(y.CalendarDays,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5}),e.jsx("span",{style:{fontSize:13,fontWeight:400,color:"var(--Grey-Strong, #2E3236)",fontFamily:"var(--font-sans)",lineHeight:1.2},children:$t})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"8px 0"},children:[e.jsx(y.PhoneIncoming,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5}),e.jsx("span",{style:{fontSize:13,fontWeight:400,color:"var(--Grey-Strong, #2E3236)",fontFamily:"var(--font-sans)",lineHeight:1.2},children:Ot})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,paddingLeft:16,borderLeft:"1px solid var(--Grey-absent, #D9D9D9)"},children:[e.jsx(ne,{text:Pt,children:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"8px 0",cursor:"pointer"},children:[e.jsx(y.Headset,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5}),e.jsx("span",{style:{fontSize:13,fontWeight:400,color:"var(--Grey-Strong, #2E3236)",fontFamily:"var(--font-sans)",lineHeight:1.2},children:be})]})}),e.jsx(y.Repeat,{size:16,color:"var(--color-input-border, #ACACAD)",strokeWidth:1.5}),je>1?e.jsxs("div",{style:{position:"relative"},children:[e.jsx(ne,{text:qe,children:e.jsxs("button",{onClick:()=>ge(x=>!x),style:{display:"flex",alignItems:"center",gap:4,padding:"8px 0",background:"none",border:"none",cursor:"pointer"},children:[e.jsx(y.CircleUser,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5}),e.jsxs("span",{style:{fontSize:13,fontWeight:400,color:"var(--Grey-Strong, #2E3236)",lineHeight:1.2},children:[te," (",je," Sessions)"]}),Ge?e.jsx(y.ChevronUp,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5}):e.jsx(y.ChevronDown,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5})]})}),Ge&&e.jsxs("div",{style:{position:"absolute",top:"100%",right:0,marginTop:4,width:264,background:"var(--Grey-White, #FFF)",borderRadius:4,border:"1px solid var(--Grey-absent, #D9D9D9)",boxShadow:"0 4px 16px rgba(0,0,0,0.12)",zIndex:50,overflow:"hidden"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:8,padding:16},children:[e.jsx(y.CircleUser,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5,style:{marginTop:2,flexShrink:0}}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[e.jsx("span",{style:{fontSize:16,fontWeight:600,color:"var(--Grey-Strong, #2E3236)",lineHeight:1},children:te}),e.jsxs("span",{style:{fontSize:13,fontWeight:400,color:"var(--Grey-Muted, #808183)",lineHeight:1},children:[je," Sessions in past"]})]})]}),Ae.slice(0,5).map((x,I)=>e.jsxs("div",{onClick:()=>{ke&&ke(x),ge(!1)},onMouseEnter:()=>_e(I),onMouseLeave:()=>_e(null),style:{display:"flex",width:264,padding:"12px 16px",justifyContent:"space-between",alignItems:"center",background:Me===I?"var(--surface-hover, #F3F7F7)":"var(--Grey-White, #FFF)",borderTop:"1px solid var(--Grey-absent, #D9D9D9)",cursor:"pointer",boxSizing:"border-box",transition:"background 0.15s"},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[e.jsx("span",{style:{fontSize:13,fontWeight:400,color:"var(--Grey-Strong, #2E3236)",lineHeight:1},children:x.title}),e.jsx("span",{style:{fontSize:12,fontWeight:400,color:"var(--Grey-Muted, #808183)",lineHeight:1},children:x.date})]}),Me===I&&e.jsx(y.ExternalLink,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1,style:{flexShrink:0}})]},x.id||I)),e.jsx("div",{style:{padding:16,borderTop:"1px solid var(--Grey-absent, #D9D9D9)",display:"flex",justifyContent:"center"},children:e.jsxs("button",{onClick:()=>{we&&we(),ge(!1)},style:{display:"flex",height:32,padding:"16px 16px 16px 12px",justifyContent:"center",alignItems:"center",gap:6,background:"var(--Grey-White, #FFF)",border:"1px solid var(--Grey-absent, #D9D9D9)",borderRadius:10,cursor:"pointer"},children:[e.jsx(y.History,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5}),e.jsx("span",{style:{fontSize:14,fontWeight:600,color:"var(--Grey-Strong, #2E3236)"},children:"View All Sessions"})]})})]})]}):e.jsx(ne,{text:qe,children:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4,padding:"8px 0",cursor:"pointer"},children:[e.jsx(y.CircleUser,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5}),e.jsx("span",{style:{fontSize:13,fontWeight:400,color:"var(--Grey-Strong, #2E3236)",lineHeight:1.2},children:te})]})})]})]})]}),e.jsxs("div",{style:{display:"flex",alignItems:"stretch",gap:24,alignSelf:"stretch"},children:[e.jsx("div",{style:{flex:1,minWidth:0,display:"flex"},children:e.jsx(at,{score:ce??0,maxScore:5,predictedScore:ie??0,predictedLabel:u,legends:Q})}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch",justifyContent:"flex-end",gap:24,flex:1,minWidth:0},children:[e.jsx(rt,{meta:$e,callPurpose:E||Oe,classification:O||Tt,outcomeQuality:Y||"Neutral",dimensions:_t,resolutionOutcome:d,customerIntent:T,interactionId:q??$.interaction_id,moreDetails:K}),e.jsx(ot,{outcomeLift:Ht,driverLabels:At})]})]})]}),e.jsx("div",{ref:ue,style:{paddingTop:24},children:e.jsx(st,{data:s?null:Lt,loading:s})}),e.jsxs("div",{ref:ye,style:{display:"flex",flexDirection:"column",gap:16,alignSelf:"stretch",paddingTop:24},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx(y.FileSignal,{size:24,color:"#C98A5A",strokeWidth:2}),e.jsx("span",{style:{fontSize:16,fontWeight:600,color:"var(--Grey-Strong, #2E3236)",lineHeight:1.2,textTransform:"uppercase"},children:"Signals & Recording"})]}),e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:24,alignSelf:"stretch",paddingTop:16,borderTop:"1px solid #D9D9D9"},children:[e.jsx("div",{style:{flex:1,minWidth:0},children:e.jsx(lt,{signals:Bt,expandedSignals:Ft,toggleSignal:Gt,playEvidence:Be,highlightTurns:zt,onShowInTranscript:Le,timelinePlaying:m||Ee,currentTimeSeconds:f??Te})}),e.jsx("div",{style:{flex:1,minWidth:0},children:e.jsx(it.UpdatedInteractionRecording,{ref:J,audioUrl:o,durationSeconds:$e.duration_seconds,audioRef:g,agentName:be,customerName:te,currentTimeSeconds:f,timelinePlaying:m,playbackRate:k,timelineSegments:j,onSeek:F,onTogglePlay:c,onSeekBack:S,onSeekForward:b,onSetPlaybackRate:v,transcript:_,activeTurnIndex:P,turnObservations:H,highlightedTurns:A,onTurnPlayPause:a,setExpandedSignals:ze})})]})]}),e.jsx("div",{ref:xe,style:{paddingTop:24},children:e.jsx(ft,{comments:De,totalComments:De.length,currentUser:xt,onSendComment:mt||(()=>{}),onSendReply:vt||(()=>{}),onReply:bt||(()=>{}),onEdit:jt||(()=>{}),onDelete:St||(()=>{}),onMenuClick:kt||(()=>{}),onMarkResolved:wt||(()=>{}),isResolved:Ct,children:e.jsx(pt,{items:Ne,guidanceCount:Ne.length,onPlayEvidence:Be,onShowInTranscript:Le,timelinePlaying:m||Ee,currentTimeSeconds:f??Te})})})]})]})};exports.UpdatedInteractionRecording=it.UpdatedInteractionRecording;exports.UpdatedCoachingSynthesisCard=st;exports.UpdatedCompassScore=at;exports.UpdatedGuidance=pt;exports.UpdatedInteractionContext=rt;exports.UpdatedInteractionDetails=dn;exports.UpdatedInteractionScores=ot;exports.UpdatedInteractionSignals=lt;exports.UpdatedThreads=ft;
|
|
17
17
|
//# sourceMappingURL=UpdatedInteractionDetails.cjs.js.map
|