chordia-ui 3.4.7 → 3.4.8
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 +7 -2
- package/dist/components/UpdatedInteractionDetails.cjs.js.map +1 -1
- package/dist/components/UpdatedInteractionDetails.es.js +1282 -541
- package/dist/components/UpdatedInteractionDetails.es.js.map +1 -1
- package/package.json +1 -1
- package/src/components/UpdatedInteractionDetails/UpdatedCoachingSynthesisCard.jsx +41 -30
- package/src/components/UpdatedInteractionDetails/UpdatedInteractionContext.jsx +192 -77
- package/src/components/UpdatedInteractionDetails/UpdatedInteractionDetails.jsx +180 -125
- package/src/components/UpdatedInteractionDetails/UpdatedInteractionScores.jsx +21 -34
- package/src/components/UpdatedInteractionDetails/UpdatedThreads.jsx +739 -0
- package/src/components/UpdatedInteractionDetails/index.js +1 -0
- package/src/fonts/.DS_Store +0 -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"),f=require("react"),r=require("lucide-react"),_e=require("../UpdatedInteractionRecording.cjs.js"),I={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)"},kt={effective:"Effective",strong:"Strong",needs_improvement:"Needs Improvement",mixed:"Mixed"},we="updated-coaching-synthesis-keyframes";function Ct(){if(typeof document>"u"||document.getElementById(we))return;const t=document.createElement("style");t.id=we,t.textContent=`
|
|
2
2
|
@keyframes updated-coaching-shimmer {
|
|
3
3
|
0% { background-position: -200% 0; }
|
|
4
4
|
100% { background-position: 200% 0; }
|
|
@@ -7,5 +7,10 @@
|
|
|
7
7
|
0%, 100% { opacity: 0.4; }
|
|
8
8
|
50% { opacity: 1; }
|
|
9
9
|
}
|
|
10
|
-
`,document.head.appendChild(t)}function at({overall:t}){const n=rt[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:c.strong,fontFamily:"var(--font-sans)",lineHeight:1.2},children:"Overall:"}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[e.jsx(r.ThumbsUp,{size:14,color:c.strong,strokeWidth:1.5}),e.jsx("span",{style:{fontSize:13,fontWeight:600,color:c.strong,fontFamily:"var(--font-sans)",lineHeight:1.2},children:n})]})]})}function dt({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:c.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:c.quoteLine}}),e.jsxs("div",{style:{fontSize:14,fontWeight:400,color:c.quoteText,fontFamily:"var(--font-sans)",lineHeight:1.5},children:["“",i,"”"]})]})]})}function ye({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:c.iconBg,flexShrink:0},children:t}),e.jsx("span",{style:{fontSize:16,fontWeight:600,color:c.strong,fontFamily:"var(--font-sans)",lineHeight:"normal"},children:n})]}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:24},children:i.map((l,p)=>e.jsx(dt,{item:l},p))})]})}const Se=({data:t,loading:n,error:i})=>{var f,x;if(k.useEffect(()=>{lt()},[]),n)return e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx("div",{style:{width:6,height:6,borderRadius:"50%",background:c.accent,animation:"updated-coaching-pulse 1.5s ease-in-out infinite"}}),e.jsx("span",{style:{fontSize:14,color:c.muted,fontWeight:500},children:"Synthesizing coaching summary..."})]}),[180,260,220].map((j,S)=>e.jsx("div",{style:{height:10,width:j,maxWidth:"100%",borderRadius:4,background:`linear-gradient(90deg, ${c.absent} 25%, var(--shimmer-mid, #ECECEC) 50%, ${c.absent} 75%)`,backgroundSize:"200% 100%",animation:"updated-coaching-shimmer 1.8s ease-in-out infinite",animationDelay:`${S*.2}s`}},S))]});if(i)return e.jsx("div",{style:{fontSize:14,color:c.muted},children:"Unable to generate coaching summary."});if(!t)return null;const l=t.strengths||[],p=t.improvements||[],y=typeof t.one_liner=="string"?t.one_liner:((f=t.one_liner)==null?void 0:f.text)||"",v=typeof t.context=="string"?t.context:((x=t.context)==null?void 0:x.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(r.ShieldCheck,{size:20,color:c.accent,strokeWidth:2}),e.jsx("span",{style:{fontSize:16,fontWeight:600,color:c.strong,fontFamily:"var(--font-sans)",lineHeight:1.2,textTransform:"uppercase"},children:"Coaching Summary"})]}),y&&e.jsx("div",{style:{fontSize:14,fontWeight:500,color:c.strong,fontFamily:"var(--font-sans)",lineHeight:1.5},children:y}),e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:16,justifyContent:"space-between"},children:[v&&e.jsx("div",{style:{fontSize:14,fontWeight:400,color:c.muted,fontFamily:"var(--font-sans)",lineHeight:1.5,flex:1},children:v}),t.overall&&e.jsx(at,{overall:t.overall})]}),(l.length>0||p.length>0)&&e.jsxs("div",{style:{display:"flex",gap:24,paddingTop:24,borderTop:`1px solid ${c.absent}`},children:[e.jsx(ye,{icon:e.jsx(r.TrendingUp,{size:14,color:c.strong,strokeWidth:1.5}),label:"Key Strengths",items:l}),e.jsx(ye,{icon:e.jsx(r.Lightbulb,{size:14,color:c.strong,strokeWidth:1.5}),label:"Improvements",items:p})]})]})};function ct(t){const n=Math.floor(t/60),i=Math.round(t%60);return`${n}:${i.toString().padStart(2,"0")}`}const gt={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)"},xe={display:"flex",flexDirection:"column",flex:"1 0 0",gap:12,minWidth:0},ke=({meta:t={},callPurpose:n={},classification:i={},dimensions:l=[],outcomeQuality:p="Neutral",onMoreDetails:y})=>{const v=t.duration_seconds!=null?ct(t.duration_seconds):null,f=t.message_count,x=n.interaction_driver,j=i.interaction_paradigm,S=[v!=null&&{label:"Duration",value:v},x!=null&&{label:"Driver",value:x},...l.filter((o,h)=>h%2===0).map(o=>({label:o.label||o.key,value:o.value})),{label:"Outcome Quality",value:p}].filter(Boolean),W=[f!=null&&{label:"Messages",value:f},j!=null&&{label:"Paradigm",value:j},...l.filter((o,h)=>h%2===1).map(o=>({label:o.label||o.key,value:o.value}))].filter(Boolean),d=o=>o.isLink?e.jsxs("div",{onClick:y,style:{display:"flex",alignItems:"center",gap:6,padding:"8px 0 8px 0",cursor:"pointer",fontFamily:"var(--font-sans)"},children:[e.jsx(r.ExternalLink,{size:16,color:"#808183",strokeWidth:1.5}),e.jsx("span",{style:{color:"var(--Grey-Strong, #2E3236)",fontSize:13,fontWeight:400},children:o.label})]},o.label):e.jsxs("div",{style:gt,children:[e.jsx("span",{style:{color:"var(--Grey-Strong, #2E3236)",whiteSpace:"nowrap",flexShrink:0},children:o.label}),e.jsx("span",{style:{color:"var(--Grey-Muted, #808183)",textAlign:"right"},children:o.value})]},o.label);return e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:24,alignSelf:"stretch"},children:[e.jsx("div",{style:xe,children:S.map(o=>d(o))}),e.jsx("div",{style:xe,children:W.map(o=>d(o))})]})},a={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))"},m=1.2,ue=3,ve=t=>t!=null?Math.round(t*100)+"%":"—",me=t=>{if(t==null)return"—";const n=(t*100).toFixed(1);return t>0?`+${n}pp`:`${n}pp`},Ce=({outcomeLift:t,driverLabels:n=[]})=>{var S;if(!t||t.lift==null)return null;const i=t.p_expected,l=t.p_full,p=t.lift_raw??(l!=null&&i!=null?l-i:null),y=t.lift,v=(S=t.interpretation)!=null&&S.lift_band?t.interpretation.lift_band.replace(/_/g," "):y>=0?"Positive":"Negative",f=v.charAt(0).toUpperCase()+v.slice(1),x=n.slice(0,ue),j=n.length-ue;return e.jsxs("div",{style:{display:"flex",flexDirection:"column",padding:24,gap:24,borderRadius:8,border:`1px solid ${a.absent}`,background:a.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:a.strong,fontFamily:"var(--font-sans)",lineHeight:m},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:a.strong,lineHeight:m},children:"vs. Average Agent:"}),e.jsx("span",{style:{fontSize:14,fontWeight:600,color:a.strong,lineHeight:m},children:me(y)}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,paddingLeft:8,borderLeft:`1px solid ${a.absent}`},children:[e.jsx(r.ThumbsUp,{size:14,color:a.strong}),e.jsx("span",{style:{fontSize:13,fontWeight:600,color:a.strong,lineHeight:m},children:f})]})]})]}),e.jsxs("div",{style:{display:"flex",alignItems:"flex-end",gap:24},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16,alignItems:"center"},children:[e.jsx("span",{style:{fontSize:28,fontWeight:400,color:a.muted,fontFamily:"var(--font-sans)",lineHeight:m},children:ve(i)}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[e.jsx("span",{style:{fontSize:13,fontWeight:400,color:a.strong,fontFamily:"var(--font-sans)",lineHeight:m},children:"Expected Outcome"}),e.jsx("span",{style:{fontSize:13,fontWeight:400,color:a.muted,fontFamily:"var(--font-sans)",lineHeight:m},children:"Based on call type & difficulty"})]})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16,alignItems:"center",paddingLeft:24,borderLeft:`1px solid ${a.absent}`},children:[e.jsx("span",{style:{fontSize:28,fontWeight:400,color:a.muted,fontFamily:"var(--font-sans)",lineHeight:m},children:me(p)}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[e.jsx("span",{style:{fontSize:13,fontWeight:400,color:a.strong,fontFamily:"var(--font-sans)",lineHeight:m},children:"Agent Impact"}),e.jsx("span",{style:{fontSize:13,fontWeight:400,color:a.muted,fontFamily:"var(--font-sans)",lineHeight:m},children:"Behavior-driven change"})]})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16,alignItems:"center",paddingLeft:24,borderLeft:`1px solid ${a.absent}`},children:[e.jsx("span",{style:{fontSize:28,fontWeight:400,color:a.strong,fontFamily:"var(--font-sans)",lineHeight:m},children:ve(l)}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[e.jsx("span",{style:{fontSize:13,fontWeight:600,color:a.strong,fontFamily:"var(--font-sans)",lineHeight:m},children:"Predicted Outcome"}),e.jsx("span",{style:{fontSize:13,fontWeight:400,color:a.muted,fontFamily:"var(--font-sans)",lineHeight:m},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:a.strong,fontFamily:"var(--font-sans)",lineHeight:m},children:"Key Drivers"}),e.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:[x.map((W,d)=>e.jsx("div",{style:{display:"flex",padding:8,alignItems:"center",justifyContent:"center",borderRadius:4,border:`1px solid ${a.absent}`,background:a.white},children:e.jsx("span",{style:{fontSize:12,fontWeight:400,color:a.strong,fontFamily:"var(--font-sans)",lineHeight:m,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:200},children:W})},d)),j>0&&e.jsx("div",{style:{display:"flex",padding:8,alignItems:"center",justifyContent:"center",borderRadius:4,border:`1px solid ${a.absent}`,background:a.white},children:e.jsxs("span",{style:{fontSize:12,fontWeight:400,color:a.strong,fontFamily:"var(--font-sans)",lineHeight:m,whiteSpace:"nowrap"},children:["+ ",j]})})]})]})]})},je=({children:t,size:n=28,onClick:i,title:l})=>{const[p,y]=k.useState(!1);return e.jsx("div",{title:l,onClick:i,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),style:{display:"flex",alignItems:"center",justifyContent:"center",width:n,height:n,borderRadius:9999,background:p?"var(--surface-hover, #F3F7F7)":"transparent",cursor:"pointer",flexShrink:0,transition:"background 0.15s"},children:t})},we=({signals:t={signals:[],present_count:0,total_signals_evaluated:0},expandedSignals:n=new Set,toggleSignal:i=()=>{},playEvidence:l=()=>{},highlightTurns:p=()=>{},onShowInTranscript:y=()=>{},timelinePlaying:v=!1,currentTimeSeconds:f=0})=>{const x=(t==null?void 0:t.signals)??[],j=(t==null?void 0:t.present_count)??x.length,S=d=>{const o=Math.floor(d/6e4),h=Math.floor(d%6e4/1e3);return`${o.toString().padStart(2,"0")}:${h.toString().padStart(2,"0")}`},W=d=>v&&d.start_ms!=null&&f*1e3>=d.start_ms&&f*1e3<=(d.end_ms??d.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(r.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:[j," Signals Detected"]})]})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignSelf:"stretch",background:"var(--Grey-White, #FFF)",gap:8},children:[x.length===0&&e.jsx("div",{style:{padding:"8px 0",fontSize:14,color:"var(--Grey-Muted, #808183)"},children:"No signals detected."}),x.map((d,o)=>{var D,z,E;const h=d.key??d.id??o,u=n.has(h),I=((D=d.observations)==null?void 0:D.length)??0;return e.jsxs("div",{id:`signal-${h}`,style:{display:"flex",flexDirection:"column",width:"100%",gap:8},children:[e.jsxs("button",{onClick:()=>i(h),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:[d.display_name||((z=d.key)==null?void 0:z.replace(/_/g," ")),I>0&&e.jsxs("span",{style:{fontWeight:600,color:"var(--text-dark, #0B0A0A)",marginLeft:6},children:["(",I,")"]})]}),u?e.jsx(r.ChevronUp,{size:20,color:"#767473"}):e.jsx(r.ChevronDown,{size:20,color:"#767473"})]}),u&&((E=d.observations)==null?void 0:E.length)>0&&e.jsx("div",{style:{display:"flex",flexDirection:"column",alignSelf:"stretch",gap:0},children:d.observations.map((F,B)=>{var M,H,T;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:F.reason||F.explanation}),((H=(M=F.evidence)==null?void 0:M[0])==null?void 0:H.start_ms)!=null&&e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flexShrink:0},children:[e.jsx(je,{size:28,title:"Show in transcript",onClick:w=>{w.stopPropagation(),y(F.evidence[0].start_ms)},children:e.jsx(r.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:S(F.evidence[0].start_ms)})]})]}),(T=F.evidence)==null?void 0:T.map((w,$)=>{const _=w.start_ms!=null&&w.end_ms!=null;return w.text&&e.jsxs("div",{onClick:Q=>{Q.stopPropagation(),_&&l(w)},onMouseEnter:()=>p(w.turn_ids??[]),onMouseLeave:()=>p([]),style:{display:"flex",alignItems:"center",gap:8,padding:"8px 0",cursor:_?"pointer":"default"},children:[_&&e.jsx(je,{size:28,children:W(w)?e.jsx(r.PauseCircle,{size:17,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5}):e.jsx(r.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:["“",w.text,"”"]})]},$)})]},F.key??B)})})]},h)})]})]})},C={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)"},pt=({score:t=4,maxScore:n=10})=>{const j=Math.min(Math.round(t/n*5),5),S=180/5,W=h=>{const u=h*Math.PI/180;return{x:121.5+85*Math.cos(u),y:123-85*Math.sin(u)}},d=(h,u)=>{const I=W(h),D=W(u),z=h-u>180?1:0;return`M ${I.x} ${I.y} A 85 85 0 ${z} 1 ${D.x} ${D.y}`},o=2;return e.jsx("svg",{width:"100%",viewBox:"0 0 243 130",fill:"none",style:{maxWidth:243},children:Array.from({length:5},(h,u)=>{const I=180-u*S-(u>0?o/2:0),D=180-(u+1)*S+(u<5-1?o/2:0),z=u<j;return e.jsx("path",{d:d(I,D),stroke:z?C.strong:C.track,strokeWidth:30,strokeLinecap:"butt",fill:"none"},u)})})},ft=({value:t=0,maxValue:n=5})=>e.jsx("div",{style:{display:"flex",gap:2},children:Array.from({length:n},(i,l)=>e.jsx("div",{style:{width:22,height:6,borderRadius:1,background:l<t?C.strong:C.track}},l))}),ht={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"},yt=({text:t,children:n})=>{const[i,l]=k.useState(!1);return e.jsxs("div",{style:{position:"relative",display:"inline-flex"},onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[n,i&&e.jsx("div",{style:{position:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:6,display:"flex",width:160,padding:10,alignItems:"center",gap:10,borderRadius:4,border:"1px solid var(--Grey-absent, #D9D9D9)",background:"var(--Grey-Strong, #2E3236)",zIndex:20,pointerEvents:"none"},children:e.jsx("span",{style:{width:140,flexShrink:0,color:"#FFF",fontSize:12,fontWeight:400,lineHeight:"normal"},children:t})})]})},xt=({label:t,value:n=0,maxValue:i=5})=>e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,padding:8,alignItems:"center"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx("span",{style:{fontSize:12,fontWeight:400,color:C.strong,fontFamily:"var(--font-sans)",lineHeight:"normal"},children:t}),e.jsx(yt,{text:ht[t]||t,children:e.jsx(r.Info,{size:14,color:C.infoIcon,strokeWidth:1,style:{cursor:"pointer"}})})]}),e.jsx(ft,{value:n,maxValue:i})]}),We=({score:t=83,maxScore:n=100,predictedScore:i=4,predictedLabel:l="Predicted Objective",description:p="",legends:y=[{label:"CSAT",value:3},{label:"Resolution",value:4},{label:"Process Adherence",value:5},{label:"Communication",value:3}]})=>{const v=String(i).padStart(2,"0");return e.jsxs("div",{style:{display:"flex",flexDirection:"column",padding:24,borderRadius:8,border:`1px solid ${C.absent}`,background:C.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:C.strong,fontFamily:"var(--font-sans)",lineHeight:1.2},children:"Compass Score"}),e.jsx("span",{style:{fontSize:14,fontWeight:400,color:C.muted,fontFamily:"var(--font-sans)",lineHeight:"normal"},children:p})]}),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(pt,{score:t,maxScore:n}),(()=>{const j=-(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(${j}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:C.strong,fontFamily:"var(--font-sans)",lineHeight:1,textAlign:"center",marginTop:8},children:t})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"center",justifyContent:"center",flex:1},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[e.jsx("div",{style:{fontSize:28,fontWeight:400,color:C.strong,fontFamily:"var(--font-sans)",lineHeight:1,textAlign:"center"},children:v}),e.jsx("div",{style:{fontSize:14,fontWeight:400,color:C.muted,fontFamily:"var(--font-sans)",lineHeight:1.43,textAlign:"center"},children:l})]}),e.jsx("div",{style:{width:"100%",height:1,background:C.absent}}),y.map((f,x)=>e.jsx(xt,{label:f.label,value:f.value},x))]})]})]})},ut=[{key:"overview",label:"Overview"},{key:"coaching",label:"Coaching Summary"},{key:"signals",label:"Signals & Recording"},{key:"comments",label:"Comments"}],vt=({title:t="Wheel Stud Replacement Enquiry",onBack:n,data:i,coachingData:l,audioUrl:p,audioRef:y,currentTimeSeconds:v,timelinePlaying:f,playbackRate:x,timelineSegments:j,onSeek:S,onTogglePlay:W,onSeekBack:d,onSeekForward:o,onSetPlaybackRate:h,agentName:u,customerName:I,transcript:D,activeTurnIndex:z,turnObservations:E,highlightedTurns:F,onTurnPlayPause:B,onPlayEvidence:M,onHighlightTurns:H,callPurpose:T,classification:w,outcomeQuality:$,compassScore:_,compassMaxScore:Q=10,predictedCsat:Ie,predictedLabel:De="Predicted Objective",compassLegends:Fe,customerSessions:ze,customerSessionCount:_e,onSessionClick:Y,onViewAllSessions:V,prevSessionTitle:Ae,prevSessionDesc:Ge,prevSessionDisabled:A=!1,nextSessionTitle:Me,nextSessionDesc:He,nextSessionDisabled:G=!1,onPreviousSession:Re,onNextSession:Ee})=>{var pe,fe;const[U,Te]=k.useState("overview"),[Le,K]=k.useState(new Set),[X,O]=k.useState(!1),[Z,J]=k.useState(null),[Pe,ee]=k.useState(!1),[Be,$e]=k.useState(0),R=k.useRef(null),te=k.useRef(null),ne=k.useRef(null),se=k.useRef(null),ie=k.useRef(null),Ue={overview:te,coaching:ne,signals:se,comments:ie},Oe=s=>{Te(s);const g=Ue[s];g!=null&&g.current&&g.current.scrollIntoView({behavior:"smooth",block:"start"})},oe=ze||[],qe=s=>{var b;const g=s/1e3;(b=R.current)!=null&&b.seekTo&&R.current.seekTo(g)},Ne=s=>{var g;if(M)M(s);else{const b=s.start_ms??s.startMs;if(b!=null&&((g=R.current)!=null&&g.seekTo)){R.current.seekTo(b/1e3),ee(!0),$e(b/1e3);const ot=(s.end_ms??s.endMs??b+5e3)-b;setTimeout(()=>ee(!1),ot)}}},Qe=s=>{H&&H(s)},Ye=s=>{K(g=>{const b=new Set(g);return b.has(s)?b.delete(s):b.add(s),b})},Ve=(i==null?void 0:i.blocks)||[],L=s=>{var g;return((g=Ve.find(b=>b.block_id===s))==null?void 0:g.payload)||{}},q=L("interaction-metadata"),re=L("interaction-context"),P=L("interaction-signals"),le=L("interaction-outcome-lift"),Ke=re.call_purpose||{},Xe=re.classification||{},ae={duration_seconds:156,message_count:25,...q},de={interaction_driver:"General Information",interaction_direction:"inbound",...Ke},Ze={interaction_paradigm:"Informational",...Xe},Je={p_expected:.94,p_full:.83,lift_raw:-.11,lift:.043,interpretation:{lift_band:"positive"},...le},et=((pe=le.driver_signal_keys)==null?void 0:pe.map(s=>s.replace(/^sig\./,"").replace(/_/g," ")))||["customer needs fully addressed","call flow expectations set","Opening expectations set","Active listening demonstrated","Resolution confirmed"],tt=l||{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"},nt=(fe=P==null?void 0:P.signals)!=null&&fe.length?P:{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."}]}]},ce=u||"Agent",N=I||"Customer",ge=_e??oe.length,st=q.evaluated_dt?new Date(q.evaluated_dt).toLocaleString():"3/29/2026, 8:30:00 AM",it=de.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(r.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},children:t})]}),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:ut.map(s=>e.jsx("button",{onClick:()=>Oe(s.key),style:{display:"flex",padding:16,alignItems:"center",gap:10,background:"none",border:"none",borderBottom:U===s.key?"3px solid var(--Grey-Strong, #2E3236)":"3px solid transparent",cursor:"pointer",fontSize:15,fontWeight:U===s.key?500:400,color:U===s.key?"var(--Grey-Strong, #2E3236)":"var(--Grey-Muted, #808183)",whiteSpace:"nowrap",transition:"border-color 0.2s ease, color 0.2s ease"},children:s.label},s.key))})]}),e.jsxs("div",{style:{padding:24,flex:1,overflowY:"auto"},children:[e.jsxs("div",{ref:te,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(r.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(r.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:st})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"8px 0"},children:[e.jsx(r.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:it})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,paddingLeft:16,borderLeft:"1px solid var(--Grey-absent, #D9D9D9)"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"8px 0"},children:[e.jsx(r.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:ce})]}),e.jsx(r.Repeat,{size:16,color:"var(--color-input-border, #ACACAD)",strokeWidth:1.5}),e.jsxs("div",{style:{position:"relative"},children:[e.jsxs("button",{onClick:()=>O(s=>!s),style:{display:"flex",alignItems:"center",gap:4,padding:"8px 0",background:"none",border:"none",cursor:"pointer"},children:[e.jsx(r.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:[N," (",ge," Sessions)"]}),X?e.jsx(r.ChevronUp,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5}):e.jsx(r.ChevronDown,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5})]}),X&&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(r.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:N}),e.jsxs("span",{style:{fontSize:13,fontWeight:400,color:"var(--Grey-Muted, #808183)",lineHeight:1},children:[ge," Sessions in past"]})]})]}),oe.slice(0,5).map((s,g)=>e.jsxs("div",{onClick:()=>{Y&&Y(s),O(!1)},onMouseEnter:()=>J(g),onMouseLeave:()=>J(null),style:{display:"flex",width:264,padding:"12px 16px",justifyContent:"space-between",alignItems:"center",background:Z===g?"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:s.title}),e.jsx("span",{style:{fontSize:12,fontWeight:400,color:"var(--Grey-Muted, #808183)",lineHeight:1},children:s.date})]}),Z===g&&e.jsx(r.ExternalLink,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1,style:{flexShrink:0}})]},s.id||g)),e.jsx("div",{style:{padding:16,borderTop:"1px solid var(--Grey-absent, #D9D9D9)",display:"flex",justifyContent:"center"},children:e.jsxs("button",{onClick:()=>{V&&V(),O(!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(r.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.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(We,{score:_!=null?Math.round(_*100):0,maxScore:100,predictedScore:Ie??0,predictedLabel:De,legends:Fe})}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch",justifyContent:"flex-end",gap:24,flex:1,minWidth:0},children:[e.jsx(ke,{meta:ae,callPurpose:T||de,classification:w||Ze,outcomeQuality:$||"Neutral"}),e.jsx(Ce,{outcomeLift:Je,driverLabels:et})]})]})]}),e.jsx("div",{ref:ne,style:{paddingTop:24},children:e.jsx(Se,{data:tt})}),e.jsxs("div",{ref:se,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(r.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(we,{signals:nt,expandedSignals:Le,toggleSignal:Ye,playEvidence:Ne,highlightTurns:Qe,onShowInTranscript:qe,timelinePlaying:f||Pe,currentTimeSeconds:v??Be})}),e.jsx("div",{style:{flex:1,minWidth:0},children:e.jsx(be.UpdatedInteractionRecording,{ref:R,audioUrl:p,durationSeconds:ae.duration_seconds,audioRef:y,agentName:ce,customerName:N.split(" ")[0],currentTimeSeconds:v,timelinePlaying:f,playbackRate:x,timelineSegments:j,onSeek:S,onTogglePlay:W,onSeekBack:d,onSeekForward:o,onSetPlaybackRate:h,transcript:D,activeTurnIndex:z,turnObservations:E,highlightedTurns:F,onTurnPlayPause:B,setExpandedSignals:K})})]})]}),e.jsx("div",{ref:ie,style:{paddingTop:24},children:e.jsx("div",{style:{fontSize:14,color:"var(--Grey-Muted, #808183)",fontFamily:"var(--font-sans)"},children:"No comments yet."})})]}),e.jsxs("div",{style:{display:"flex",position:"sticky",bottom:0,zIndex:10},children:[e.jsxs("button",{onClick:A?void 0:Re,disabled:A,style:{display:"flex",alignItems:"center",gap:30,padding:"12px 28px",flex:1,background:"var(--Grey-White, #FFF)",border:"1px solid var(--Grey-absent, #D9D9D9)",cursor:A?"default":"pointer",pointerEvents:A?"none":"auto"},children:[e.jsx(r.ArrowLeft,{size:24,color:"var(--Grey-Muted, #808183)",strokeWidth:2,style:{opacity:A?.4:1}}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:10,opacity:A?.4:1},children:[e.jsx("span",{style:{fontSize:14,fontWeight:400,color:"#000",lineHeight:1.2,textAlign:"left"},children:Ae||"Previous Session Title"}),e.jsx("span",{style:{fontSize:13,fontWeight:400,color:"#000",lineHeight:1.2,opacity:.5,textAlign:"left"},children:Ge||"Short description of the session"})]})]}),e.jsxs("button",{onClick:G?void 0:Ee,disabled:G,style:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:30,padding:"12px 28px",flex:1,background:"var(--Grey-White, #FFF)",border:"1px solid var(--Grey-absent, #D9D9D9)",cursor:G?"default":"pointer",pointerEvents:G?"none":"auto"},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:10,opacity:G?.4:1},children:[e.jsx("span",{style:{fontSize:14,fontWeight:400,color:"#000",lineHeight:1.2,textAlign:"left"},children:Me||"Next Session Title"}),e.jsx("span",{style:{fontSize:13,fontWeight:400,color:"#000",lineHeight:1.2,opacity:.5,textAlign:"left"},children:He||"Short description of the session"})]}),e.jsx(r.ArrowRight,{size:24,color:"var(--Grey-Muted, #808183)",strokeWidth:2,style:{opacity:G?.4:1}})]})]})]})};exports.UpdatedInteractionRecording=be.UpdatedInteractionRecording;exports.UpdatedCoachingSynthesisCard=Se;exports.UpdatedCompassScore=We;exports.UpdatedInteractionContext=ke;exports.UpdatedInteractionDetails=vt;exports.UpdatedInteractionScores=Ce;exports.UpdatedInteractionSignals=we;
|
|
10
|
+
`,document.head.appendChild(t)}function wt({overall:t}){const n=kt[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:I.strong,fontFamily:"var(--font-sans)",lineHeight:1.2},children:"Overall:"}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[e.jsx(r.ThumbsUp,{size:14,color:I.strong,strokeWidth:1.5}),e.jsx("span",{style:{fontSize:13,fontWeight:600,color:I.strong,fontFamily:"var(--font-sans)",lineHeight:1.2},children:n})]})]})}function Ft({item:t}){const n=typeof t=="string"?t:(t==null?void 0:t.text)||"",s=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:I.itemText,fontFamily:"var(--font-sans)",lineHeight:1.5},children:n}),s&&e.jsxs("div",{style:{display:"flex",gap:10},children:[e.jsx("div",{style:{width:1,flexShrink:0,alignSelf:"stretch",background:I.quoteLine}}),e.jsxs("div",{style:{fontSize:14,fontWeight:400,color:I.quoteText,fontFamily:"var(--font-sans)",lineHeight:1.5},children:["“",s,"”"]})]})]})}function Fe({icon:t,label:n,items:s}){return!s||s.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:I.iconBg,flexShrink:0},children:t}),e.jsx("span",{style:{fontSize:16,fontWeight:600,color:I.strong,fontFamily:"var(--font-sans)",lineHeight:"normal"},children:n})]}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:24},children:s.map((i,a)=>e.jsx(Ft,{item:i},a))})]})}const Ee=({data:t,loading:n,error:s})=>{var c,y;if(f.useEffect(()=>{Ct()},[]),n)return e.jsxs(e.Fragment,{children:[e.jsx("style",{children:`
|
|
11
|
+
@keyframes coaching-spinner-spin {
|
|
12
|
+
from { transform: rotate(0deg); }
|
|
13
|
+
to { transform: rotate(360deg); }
|
|
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:I.muted,fontWeight:500,textAlign:"center"},children:"Synthesizing coaching summary..."})]})]});if(s)return e.jsx("div",{style:{fontSize:14,color:I.muted},children:"Unable to generate coaching summary."});if(!t)return null;const i=t.strengths||[],a=t.improvements||[],d=typeof t.one_liner=="string"?t.one_liner:((c=t.one_liner)==null?void 0:c.text)||"",h=typeof t.context=="string"?t.context:((y=t.context)==null?void 0:y.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(r.ShieldCheck,{size:20,color:I.accent,strokeWidth:2}),e.jsx("span",{style:{fontSize:16,fontWeight:600,color:I.strong,fontFamily:"var(--font-sans)",lineHeight:1.2,textTransform:"uppercase"},children:"Coaching Summary"})]}),d&&e.jsx("div",{style:{fontSize:14,fontWeight:500,color:I.strong,fontFamily:"var(--font-sans)",lineHeight:1.5},children:d}),e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:16,justifyContent:"space-between"},children:[h&&e.jsx("div",{style:{fontSize:14,fontWeight:400,color:I.muted,fontFamily:"var(--font-sans)",lineHeight:1.5,flex:1},children:h}),t.overall&&e.jsx(wt,{overall:t.overall})]}),(i.length>0||a.length>0)&&e.jsxs("div",{style:{display:"flex",gap:24,paddingTop:24,borderTop:`1px solid ${I.absent}`},children:[e.jsx(Fe,{icon:e.jsx(r.TrendingUp,{size:14,color:I.strong,strokeWidth:1.5}),label:"Key Strengths",items:i}),e.jsx(Fe,{icon:e.jsx(r.Lightbulb,{size:14,color:I.strong,strokeWidth:1.5}),label:"Improvements",items:a})]})]})};function Wt(t){const n=Math.floor(t/60),s=Math.round(t%60);return`${n}:${s.toString().padStart(2,"0")}`}const Dt={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)"},We={display:"flex",flexDirection:"column",flex:"1 0 0",gap:0,minWidth:0},Ae=({meta:t={},callPurpose:n={},classification:s={},dimensions:i=[],outcomeQuality:a="Neutral",onMoreDetails:d,moreDetails:h=[],resolutionOutcome:c,customerIntent:y,interactionId:u})=>{const[F,b]=f.useState(!1),p=t.duration_seconds!=null?Wt(t.duration_seconds):null,k=t.message_count,v=n.interaction_driver,m=s.interaction_paradigm,G=[],W=[[p!=null?{label:"Duration",value:p}:null,k!=null?{label:"Messages",value:k}:null],[v!=null?{label:"Driver",value:v}:null,m!=null?{label:"Paradigm",value:m}:null]];for(let l=0;l<i.length;l+=2){const R=i[l]?{label:i[l].label||i[l].key,value:i[l].value}:null,E=i[l+1]?{label:i[l+1].label||i[l+1].key,value:i[l+1].value}:null;W.push([R,E])}W.push([{label:"Outcome Quality",value:a},{isMoreDetails:!0}]),W.forEach(l=>G.push(l));const D=[c!=null&&{label:"Resolution Outcome",value:c},y!=null&&{label:"Customer Intent",value:y},u!=null&&{label:"Number",value:u},...h||[]].filter(Boolean),A=l=>e.jsxs("div",{style:Dt,children:[e.jsx("span",{style:{color:"var(--Grey-Strong, #2E3236)",whiteSpace:"nowrap",flexShrink:0},children:l.label}),e.jsx("span",{style:{color:"var(--Grey-Muted, #808183)",textAlign:"right",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:l.value})]},l.label),_=()=>e.jsxs("div",{onClick:()=>{b(l=>!l),d&&!F&&d()},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"}),F?e.jsx(r.ChevronUp,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5}):e.jsx(r.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:[G.map((l,R)=>{var E;return e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:24,alignSelf:"stretch"},children:[e.jsx("div",{style:We,children:l[0]&&!l[0].isMoreDetails?A(l[0]):e.jsx("div",{style:{flex:1}})}),e.jsx("div",{style:We,children:l[1]&&!l[1].isMoreDetails?A(l[1]):(E=l[1])!=null&&E.isMoreDetails?_():e.jsx("div",{style:{flex:1}})})]},R)}),F&&D.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"}),D.map(l=>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:l.label}),e.jsx("span",{style:{color:"var(--Grey-Muted, #808183)",fontSize:13,fontStyle:"normal",fontWeight:400,lineHeight:"120%",textAlign:"right"},children:l.value})]},l.label))]})]})},x={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))"},z=1.2,De=3,Ie=t=>t!=null?Math.round(t*100)+"%":"—",ze=t=>{if(t==null)return"—";const n=(t*100).toFixed(1);return t>0?`+${n}pp`:`${n}pp`},Re=({outcomeLift:t,driverLabels:n=[]})=>{var p;if(!t||t.lift==null)return null;const s=t.p_expected,i=t.p_full,a=t.lift_raw??(i!=null&&s!=null?i-s:null),d=t.lift,h=(p=t.interpretation)!=null&&p.lift_band?t.interpretation.lift_band.replace(/_/g," "):d>=0?"Positive":"Negative",c=h.charAt(0).toUpperCase()+h.slice(1),u=/negative/i.test(h)?r.ThumbsDown:r.ThumbsUp,F=n.slice(0,De),b=n.length-De;return e.jsxs("div",{style:{display:"flex",flexDirection:"column",padding:24,gap:24,borderRadius:8,border:`1px solid ${x.absent}`,background:x.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:x.strong,fontFamily:"var(--font-sans)",lineHeight:z},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:x.strong,lineHeight:z},children:"vs. Average Agent:"}),e.jsx("span",{style:{fontSize:14,fontWeight:600,color:x.strong,lineHeight:z},children:ze(d)}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,paddingLeft:8,borderLeft:`1px solid ${x.absent}`},children:[e.jsx(u,{size:14,color:x.strong}),e.jsx("span",{style:{fontSize:13,fontWeight:600,color:x.strong,lineHeight:z},children:c})]})]})]}),e.jsxs("div",{style:{display:"flex",alignItems:"flex-end",gap:24},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16,alignItems:"center",flex:1,minWidth:0},children:[e.jsx("span",{style:{fontSize:28,fontWeight:400,color:x.muted,fontFamily:"var(--font-sans)",lineHeight:z},children:Ie(s)}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"center"},children:[e.jsx("span",{style:{fontSize:13,fontWeight:400,color:x.strong,fontFamily:"var(--font-sans)",lineHeight:z,whiteSpace:"nowrap"},children:"Expected Outcome"}),e.jsx("span",{style:{fontSize:13,fontWeight:400,color:x.muted,fontFamily:"var(--font-sans)",lineHeight:z,textAlign:"center"},children:"Based on call type & difficulty"})]})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16,alignItems:"center",paddingLeft:24,borderLeft:`1px solid ${x.absent}`,flex:1,minWidth:0},children:[e.jsx("span",{style:{fontSize:28,fontWeight:400,color:x.muted,fontFamily:"var(--font-sans)",lineHeight:z},children:ze(a)}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"center"},children:[e.jsx("span",{style:{fontSize:13,fontWeight:400,color:x.strong,fontFamily:"var(--font-sans)",lineHeight:z,whiteSpace:"nowrap"},children:"Agent Impact"}),e.jsx("span",{style:{fontSize:13,fontWeight:400,color:x.muted,fontFamily:"var(--font-sans)",lineHeight:z,textAlign:"center"},children:"Behavior-driven change"})]})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16,alignItems:"center",paddingLeft:24,borderLeft:`1px solid ${x.absent}`,flex:1,minWidth:0},children:[e.jsx("span",{style:{fontSize:28,fontWeight:400,color:x.strong,fontFamily:"var(--font-sans)",lineHeight:z},children:Ie(i)}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"center"},children:[e.jsx("span",{style:{fontSize:13,fontWeight:600,color:x.strong,fontFamily:"var(--font-sans)",lineHeight:z,whiteSpace:"nowrap"},children:"Predicted Outcome"}),e.jsx("span",{style:{fontSize:13,fontWeight:400,color:x.muted,fontFamily:"var(--font-sans)",lineHeight:z,textAlign:"center"},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:x.strong,fontFamily:"var(--font-sans)",lineHeight:z},children:"Key Drivers"}),e.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:[F.map((k,v)=>e.jsx("div",{style:{display:"flex",padding:8,alignItems:"center",justifyContent:"center",borderRadius:4,border:`1px solid ${x.absent}`,background:x.white},children:e.jsx("span",{style:{fontSize:12,fontWeight:400,color:x.strong,fontFamily:"var(--font-sans)",lineHeight:z,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:200},children:k})},v)),b>0&&e.jsx("div",{style:{display:"flex",padding:8,alignItems:"center",justifyContent:"center",borderRadius:4,border:`1px solid ${x.absent}`,background:x.white},children:e.jsxs("span",{style:{fontSize:12,fontWeight:400,color:x.strong,fontFamily:"var(--font-sans)",lineHeight:z,whiteSpace:"nowrap"},children:["+ ",b]})})]})]})]})},Ge=({children:t,size:n=28,onClick:s,title:i})=>{const[a,d]=f.useState(!1);return e.jsx("div",{title:i,onClick:s,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),style:{display:"flex",alignItems:"center",justifyContent:"center",width:n,height:n,borderRadius:9999,background:a?"var(--surface-hover, #F3F7F7)":"transparent",cursor:"pointer",flexShrink:0,transition:"background 0.15s"},children:t})},He=({signals:t={signals:[],present_count:0,total_signals_evaluated:0},expandedSignals:n=new Set,toggleSignal:s=()=>{},playEvidence:i=()=>{},highlightTurns:a=()=>{},onShowInTranscript:d=()=>{},timelinePlaying:h=!1,currentTimeSeconds:c=0})=>{const y=(t==null?void 0:t.signals)??[],u=(t==null?void 0:t.present_count)??y.length,F=p=>{const k=Math.floor(p/6e4),v=Math.floor(p%6e4/1e3);return`${k.toString().padStart(2,"0")}:${v.toString().padStart(2,"0")}`},b=p=>h&&p.start_ms!=null&&c*1e3>=p.start_ms&&c*1e3<=(p.end_ms??p.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(r.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:[u," Signals Detected"]})]})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignSelf:"stretch",background:"var(--Grey-White, #FFF)",gap:8},children:[y.length===0&&e.jsx("div",{style:{padding:"8px 0",fontSize:14,color:"var(--Grey-Muted, #808183)"},children:"No signals detected."}),y.map((p,k)=>{var W,D,A;const v=p.key??p.id??k,m=n.has(v),G=((W=p.observations)==null?void 0:W.length)??0;return e.jsxs("div",{id:`signal-${v}`,style:{display:"flex",flexDirection:"column",width:"100%",gap:8},children:[e.jsxs("button",{onClick:()=>s(v),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:[p.display_name||((D=p.key)==null?void 0:D.replace(/_/g," ")),G>0&&e.jsxs("span",{style:{fontWeight:600,color:"var(--text-dark, #0B0A0A)",marginLeft:6},children:["(",G,")"]})]}),m?e.jsx(r.ChevronUp,{size:20,color:"#767473"}):e.jsx(r.ChevronDown,{size:20,color:"#767473"})]}),m&&((A=p.observations)==null?void 0:A.length)>0&&e.jsx("div",{style:{display:"flex",flexDirection:"column",alignSelf:"stretch",gap:0},children:p.observations.map((_,l)=>{var R,E,g;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}),((E=(R=_.evidence)==null?void 0:R[0])==null?void 0:E.start_ms)!=null&&e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flexShrink:0},children:[e.jsx(Ge,{size:28,title:"Show in transcript",onClick:j=>{j.stopPropagation(),d(_.evidence[0].start_ms)},children:e.jsx(r.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:F(_.evidence[0].start_ms)})]})]}),(g=_.evidence)==null?void 0:g.map((j,C)=>{const H=j.start_ms!=null&&j.end_ms!=null;return j.text&&e.jsxs("div",{onClick:Y=>{Y.stopPropagation(),H&&i(j)},onMouseEnter:()=>a(j.turn_ids??[]),onMouseLeave:()=>a([]),style:{display:"flex",alignItems:"center",gap:8,padding:"8px 0",cursor:H?"pointer":"default"},children:[H&&e.jsx(Ge,{size:28,children:b(j)?e.jsx(r.PauseCircle,{size:17,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5}):e.jsx(r.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:["“",j.text,"”"]})]},C)})]},_.key??l)})})]},v)})]})]})},M={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)"},It=({score:t=4,maxScore:n=10})=>{const u=Math.min(Math.round(t/n*5),5),F=180/5,b=v=>{const m=v*Math.PI/180;return{x:121.5+85*Math.cos(m),y:123-85*Math.sin(m)}},p=(v,m)=>{const G=b(v),W=b(m),D=v-m>180?1:0;return`M ${G.x} ${G.y} A 85 85 0 ${D} 1 ${W.x} ${W.y}`},k=2;return e.jsx("svg",{width:"100%",viewBox:"0 0 243 130",fill:"none",style:{maxWidth:243},children:Array.from({length:5},(v,m)=>{const G=180-m*F-(m>0?k/2:0),W=180-(m+1)*F+(m<5-1?k/2:0),D=m<u;return e.jsx("path",{d:p(G,W),stroke:D?M.strong:M.track,strokeWidth:30,strokeLinecap:"butt",fill:"none"},m)})})},zt=({value:t=0,maxValue:n=5})=>e.jsx("div",{style:{display:"flex",gap:2},children:Array.from({length:n},(s,i)=>e.jsx("div",{style:{width:22,height:6,borderRadius:1,background:i<t?M.strong:M.track}},i))}),Gt={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"},Mt=({text:t,children:n})=>{const[s,i]=f.useState(!1);return e.jsxs("div",{style:{position:"relative",display:"inline-flex"},onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:[n,s&&e.jsx("div",{style:{position:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:6,display:"flex",width:160,padding:10,alignItems:"center",gap:10,borderRadius:4,border:"1px solid var(--Grey-absent, #D9D9D9)",background:"var(--Grey-Strong, #2E3236)",zIndex:20,pointerEvents:"none"},children:e.jsx("span",{style:{width:140,flexShrink:0,color:"#FFF",fontSize:12,fontWeight:400,lineHeight:"normal"},children:t})})]})},_t=({label:t,value:n=0,maxValue:s=5})=>e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,padding:8,alignItems:"center"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx("span",{style:{fontSize:12,fontWeight:400,color:M.strong,fontFamily:"var(--font-sans)",lineHeight:"normal"},children:t}),e.jsx(Mt,{text:Gt[t]||t,children:e.jsx(r.Info,{size:14,color:M.infoIcon,strokeWidth:1,style:{cursor:"pointer"}})})]}),e.jsx(zt,{value:n,maxValue:s})]}),Te=({score:t=83,maxScore:n=100,predictedScore:s=4,predictedLabel:i="Predicted Objective",description:a="",legends:d=[{label:"CSAT",value:3},{label:"Resolution",value:4},{label:"Process Adherence",value:5},{label:"Communication",value:3}]})=>{const h=String(s).padStart(2,"0");return e.jsxs("div",{style:{display:"flex",flexDirection:"column",padding:24,borderRadius:8,border:`1px solid ${M.absent}`,background:M.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:M.strong,fontFamily:"var(--font-sans)",lineHeight:1.2},children:"Compass Score"}),e.jsx("span",{style:{fontSize:14,fontWeight:400,color:M.muted,fontFamily:"var(--font-sans)",lineHeight:"normal"},children:a})]}),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(It,{score:t,maxScore:n}),(()=>{const u=-(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(${u}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:M.strong,fontFamily:"var(--font-sans)",lineHeight:1,textAlign:"center",marginTop:8},children:t})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"center",justifyContent:"center",flex:1},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[e.jsx("div",{style:{fontSize:28,fontWeight:400,color:M.strong,fontFamily:"var(--font-sans)",lineHeight:1,textAlign:"center"},children:h}),e.jsx("div",{style:{fontSize:14,fontWeight:400,color:M.muted,fontFamily:"var(--font-sans)",lineHeight:1.43,textAlign:"center"},children:i})]}),e.jsx("div",{style:{width:"100%",height:1,background:M.absent}}),d.map((c,y)=>e.jsx(_t,{label:c.label,value:c.value},y))]})]})]})},oe=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},U=t=>(t||"").split(" ").map(n=>n[0]).join("").toUpperCase()||"U",Et=t=>{if(!t)return"";if(!/^\d{4}-\d{2}-\d{2}T/.test(t))return t;try{const n=new Date(t);if(Number.isNaN(n.getTime()))return t;const i=new Date().getTime()-n.getTime(),a=Math.floor(i/6e4),d=Math.floor(i/36e5);return a<1?"Just now":a<60?`${a} min`:d<24?`${d} h`:`${Math.floor(d/24)} d`}catch{return t}},Be=({name:t,initials:n,color:s,size:i=36})=>e.jsx("div",{style:{width:i,height:i,borderRadius:"50%",background:s||"#6B7C93",color:"#FFF",display:"flex",alignItems:"center",justifyContent:"center",fontSize:i<=32?"10px":"11px",fontWeight:650,flexShrink:0,fontFamily:"var(--default-font-family)",letterSpacing:"0.02em"},title:t,children:n||U(t)}),At=({thread:t,isActive:n,onClick:s})=>{var c;const[i,a]=f.useState(!1),d=t.status==="resolved",h=((c=t.comments)==null?void 0:c.length)||t.commentCount||0;return e.jsxs("div",{onClick:s,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),style:{display:"flex",width:264,padding:"12px 12px",flexDirection:n?"column":"row",justifyContent:n?"center":"flex-start",alignItems:n?"flex-start":"center",gap:n?6:8,borderBottom:n?"3px solid var(--Grey-Strong, #2E3236)":"1px solid var(--Grey-absent, #D9D9D9)",background:n?"var(--Grey-Hover, #F3F7F7)":i?"var(--surface-hover, #F3F7F7)":"var(--Grey-White, #FFF)",cursor:"pointer",flexShrink:0,transition:"all 0.15s ease",boxSizing:"border-box"},children:[e.jsxs("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:4},children:[e.jsx("span",{style:{fontSize:13,fontWeight:500,color:"var(--Grey-Strong, #2E3236)",lineHeight:"150%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontFamily:"var(--default-font-family)"},children:t.title||"Untitled Thread"}),e.jsxs("span",{style:{fontSize:12,fontWeight:400,color:"var(--Grey-Muted, #808183)",lineHeight:"150%",fontFamily:"var(--default-font-family)"},children:[h," Comment",h!==1?"s":""]})]}),e.jsx("div",{style:{width:0,height:32,borderLeft:"1px solid var(--Grey-absent, #D9D9D9)",flexShrink:0}}),e.jsx("div",{style:{display:"flex",alignItems:"center",gap:4,flexShrink:0},children:d?e.jsxs(e.Fragment,{children:[e.jsx(r.CircleCheck,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5}),e.jsx("span",{style:{fontSize:12,fontWeight:500,color:"var(--Grey-Muted, #808183)",fontFamily:"var(--default-font-family)"},children:"Resolved"})]}):e.jsxs(e.Fragment,{children:[e.jsx(r.MessageSquareMore,{size:16,color:"var(--Grey-Strong, #2E3236)",strokeWidth:1.5}),e.jsx("span",{style:{fontSize:12,fontWeight:500,color:"var(--Grey-Strong, #2E3236)",fontFamily:"var(--default-font-family)"},children:"Open"})]})})]})},Me=({comment:t,isReply:n=!1,onReply:s,onMenuClick:i,showReply:a=!0})=>{const[d,h]=f.useState(!1),c=t.author||{},y=c.name||t.author_name||"Unknown",u=c.initials||U(y),F=c.role||t.author_role,b=c.color||oe(F)||"#6B7C93",p=Et(t.timestamp||t.created_at),k=Array.isArray(t.content)?t.content:[t.content||t.text||""];return e.jsxs("div",{onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),style:{display:"flex",gap:12,alignItems:"flex-start",marginLeft:n?48:0,position:"relative"},children:[e.jsx(Be,{name:y,initials:u,color:b}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:6},children:[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:y}),e.jsx("span",{style:{fontSize:12,fontWeight:400,color:"var(--Grey-Muted, #808183)",lineHeight:"150%",fontFamily:"var(--default-font-family)"},children:p})]}),e.jsx("button",{type:"button",onClick:()=>i==null?void 0:i(t),style:{padding:2,border:"none",background:"transparent",cursor:"pointer",borderRadius:4,display:"flex",alignItems:"center",justifyContent:"center",opacity:d?1:0,transition:"opacity 0.15s",flexShrink:0},children:e.jsx(r.Ellipsis,{size:24,color:"var(--Grey-Muted, #808183)"})})]}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:4},children:k.map((v,m)=>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:v},m))}),a&&s&&e.jsxs("button",{type:"button",onClick:()=>s(t),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(r.CornerDownRight,{size:20,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5}),"Reply"]})]})]})},Rt=({currentUser:t,onSubmit:n})=>{const[s,i]=f.useState(""),[a,d]=f.useState(!1),h=f.useRef(null),c=()=>{const b=s.trim();b&&(n==null||n(b),i(""))},y=b=>{b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),c())},u=(t==null?void 0:t.initials)||U(t==null?void 0:t.name),F=(t==null?void 0:t.color)||oe(t==null?void 0:t.role)||"#6B7C93";return e.jsxs("div",{style:{display:"flex",gap:12,alignItems:"flex-start",width:"100%"},children:[e.jsx(Be,{name:t==null?void 0:t.name,initials:u,color:F}),e.jsx("div",{style:{flex:1,border:a?"1px solid var(--Grey-Strong, #2E3236)":"1px solid var(--Grey-absent, #D9D9D9)",borderRadius:8,background:"var(--Grey-White, #FFF)",transition:"border-color 0.15s",overflow:"hidden"},children:e.jsxs("div",{style:{display:"flex",alignItems:"flex-end",padding:"10px 12px",gap:8},children:[e.jsx("textarea",{ref:h,value:s,onChange:b=>i(b.target.value),onFocus:()=>d(!0),onBlur:()=>d(!1),onKeyDown:y,placeholder:"Add a comment",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:c,disabled:!s.trim(),style:{display:"flex",padding:"6px 16px",justifyContent:"center",alignItems:"center",fontSize:13,fontWeight:600,color:s.trim()?"var(--Grey-White, #FFF)":"var(--Grey-Muted, #808183)",background:s.trim()?"var(--Grey-Strong, #2E3236)":"var(--grey-light, #e9e8e8a1)",border:"none",borderRadius:6,cursor:s.trim()?"pointer":"not-allowed",fontFamily:"var(--default-font-family)",transition:"all 0.15s",flexShrink:0,lineHeight:"150%"},children:"Post"})]})})]})},Le=({threads:t=[],activeThreadId:n,onThreadSelect:s,onNewThread:i,onSendComment:a,onReply:d,onMenuClick:h,onMarkResolved:c,onViewPreviousComments:y,currentUser:u,filterValue:F="all",onFilterChange:b})=>{var E;const[p,k]=f.useState(n||((E=t[0])==null?void 0:E.id)||null),[v,m]=f.useState(!1),G=f.useRef(null),W=n??p,D=f.useMemo(()=>t.find(g=>g.id===W)||t[0],[t,W]),A=(D==null?void 0:D.comments)||[],_=f.useMemo(()=>{const g=A.filter(C=>!C.parentId),j={};return A.forEach(C=>{C.parentId&&(j[C.parentId]||(j[C.parentId]=[]),j[C.parentId].push(C))}),g.map(C=>({...C,replies:j[C.id]||[]}))},[A]);f.useEffect(()=>{n&&k(n)},[n]),f.useEffect(()=>{if(!v)return;const g=j=>{G.current&&!G.current.contains(j.target)&&m(!1)};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[v]);const l=g=>{k(g),s==null||s(g)},R=f.useMemo(()=>{if(!u)return{name:"You",initials:"YO",color:"#6B7C93"};const g=u.name||"You",j=u.initials||U(g),C=u.role&&String(u.role).toLowerCase(),H=u.color||oe(C)||"#6B7C93";return{...u,name:g,initials:j,color:H}},[u]);return e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:24,background:"var(--Grey-White, #FFF)",width:"100%",fontFamily:"var(--default-font-family)"},children:[e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},children:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx(r.MessagesSquare,{size:24,color:"var(--rail-orange, #C98A5A)",strokeWidth:1.5}),e.jsx("span",{style:{fontSize:14,fontWeight:650,color:"var(--Grey-Strong, #2E3236)",letterSpacing:"0.08em",textTransform:"uppercase",lineHeight:"150%"},children:"COMMENTS"})]})}),t.length>0&&e.jsx("div",{style:{display:"flex",gap:0,width:"100%",overflowX:"auto"},className:"custom-thin-scrollbar-library",children:t.map(g=>e.jsx(At,{thread:g,isActive:g.id===W,onClick:()=>l(g.id)},g.id))}),y&&e.jsx("button",{type:"button",onClick:y,style:{display:"flex",alignItems:"center",gap:6,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:8,cursor:"pointer",fontFamily:"var(--default-font-family)",transition:"background 0.15s",lineHeight:"150%"},children:"View Previous Comments"}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:20,width:"100%"},children:_.map(g=>e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:20},children:[e.jsx(Me,{comment:g,isReply:!1,onReply:d,onMenuClick:h,showReply:g.replies.length===0}),g.replies.map((j,C)=>e.jsx(Me,{comment:j,isReply:!0,onReply:d,onMenuClick:h,showReply:C===g.replies.length-1},j.id))]},g.id))}),e.jsx(Rt,{currentUser:R,onSubmit:a}),c&&D&&D.status!=="resolved"&&e.jsxs("button",{type:"button",onClick:c,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%"},children:[e.jsx(r.CircleCheck,{size:16,color:"var(--Grey-Strong, #2E3236)",strokeWidth:1.5}),"Mark as Resolved"]})]})},Ht=[{key:"overview",label:"Overview"},{key:"coaching",label:"Coaching Summary"},{key:"signals",label:"Signals & Recording"},{key:"comments",label:"Comments"}],Tt=({title:t="Wheel Stud Replacement Enquiry",onBack:n,data:s,coachingData:i,coachingLoading:a=!1,audioUrl:d,audioRef:h,currentTimeSeconds:c,timelinePlaying:y,playbackRate:u,timelineSegments:F,onSeek:b,onTogglePlay:p,onSeekBack:k,onSeekForward:v,onSetPlaybackRate:m,agentName:G,customerName:W,transcript:D,activeTurnIndex:A,turnObservations:_,highlightedTurns:l,onTurnPlayPause:R,onPlayEvidence:E,onHighlightTurns:g,callPurpose:j,classification:C,outcomeQuality:H,resolutionOutcome:Y,customerIntent:Pe,interactionId:Oe,moreDetails:$e,compassScore:Ne,compassMaxScore:Bt=10,predictedCsat:qe,predictedLabel:Ke="Predicted Objective",compassLegends:Ue,customerSessions:Ye,customerSessionCount:Ve,onSessionClick:re,onViewAllSessions:le,prevSessionTitle:Qe,prevSessionDesc:Xe,prevSessionDisabled:T=!1,nextSessionTitle:Ze,nextSessionDesc:Je,nextSessionDisabled:B=!1,onPreviousSession:et,onNextSession:tt})=>{var je,Se;const[V,ae]=f.useState("overview"),[nt,de]=f.useState(new Set),[ce,Q]=f.useState(!1),[fe,pe]=f.useState(null),[st,ge]=f.useState(!1),[it,ot]=f.useState(0),P=f.useRef(null),X=f.useRef(null),Z=f.useRef(null),J=f.useRef(null),ee=f.useRef(null),rt={overview:X,coaching:Z,signals:J,comments:ee},he=f.useRef(null),te=f.useRef(!1);f.useEffect(()=>{const o=he.current;if(!o)return;const S=["overview","coaching","signals","comments"],w=[X,Z,J,ee],se=new IntersectionObserver(L=>{if(te.current)return;let ie=null,ke=0;for(const K of L)if(K.isIntersecting&&K.intersectionRatio>ke){const Ce=w.findIndex(St=>St.current===K.target);Ce!==-1&&(ie=S[Ce],ke=K.intersectionRatio)}ie&&ae(ie)},{root:o,threshold:[0,.1,.25,.5,.75,1]});return w.forEach(L=>{L.current&&se.observe(L.current)}),()=>se.disconnect()},[]);const lt=o=>{ae(o),te.current=!0;const S=rt[o];S!=null&&S.current&&S.current.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout(()=>{te.current=!1},800)},ye=Ye||[],at=o=>{var w;const S=o/1e3;(w=P.current)!=null&&w.seekTo&&P.current.seekTo(S)},dt=o=>{var S;if(E)E(o);else{const w=o.start_ms??o.startMs;if(w!=null&&((S=P.current)!=null&&S.seekTo)){P.current.seekTo(w/1e3),ge(!0),ot(w/1e3);const L=(o.end_ms??o.endMs??w+5e3)-w;setTimeout(()=>ge(!1),L)}}},ct=o=>{g&&g(o)},ft=o=>{de(S=>{const w=new Set(S);return w.has(o)?w.delete(o):w.add(o),w})},pt=(s==null?void 0:s.blocks)||[],O=o=>{var S;return((S=pt.find(w=>w.block_id===o))==null?void 0:S.payload)||{}},$=O("interaction-metadata"),xe=O("interaction-context"),N=O("interaction-signals"),ue=O("interaction-outcome-lift"),gt=xe.call_purpose||{},ht=xe.classification||{},ve={duration_seconds:156,message_count:25,...$},me={interaction_driver:"General Information",interaction_direction:"inbound",...gt},yt={interaction_paradigm:"Informational",...ht},xt={p_expected:.94,p_full:.83,lift_raw:-.11,lift:.043,interpretation:{lift_band:"positive"},...ue},ut=((je=ue.driver_signal_keys)==null?void 0:je.map(o=>o.replace(/^sig\./,"").replace(/_/g," ")))||["customer needs fully addressed","call flow expectations set","Opening expectations set","Active listening demonstrated","Resolution confirmed"],vt=i||{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"},mt=(Se=N==null?void 0:N.signals)!=null&&Se.length?N:{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."}]}]},be=G||"Agent",q=W||"Customer",ne=Ve??ye.length,bt=$.evaluated_dt?new Date($.evaluated_dt).toLocaleString():"3/29/2026, 8:30:00 AM",jt=me.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(r.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},children:t})]}),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:Ht.map(o=>e.jsx("button",{onClick:()=>lt(o.key),style:{display:"flex",padding:16,alignItems:"center",gap:10,background:"none",border:"none",borderBottom:V===o.key?"3px solid var(--Grey-Strong, #2E3236)":"3px solid transparent",cursor:"pointer",fontSize:15,fontWeight:V===o.key?500:400,color:V===o.key?"var(--Grey-Strong, #2E3236)":"var(--Grey-Muted, #808183)",whiteSpace:"nowrap",transition:"border-color 0.2s ease, color 0.2s ease"},children:o.label},o.key))})]}),e.jsxs("div",{ref:he,style:{padding:24,flex:1,overflowY:"auto"},children:[e.jsxs("div",{ref:X,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(r.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(r.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:bt})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"8px 0"},children:[e.jsx(r.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:jt})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,paddingLeft:16,borderLeft:"1px solid var(--Grey-absent, #D9D9D9)"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"8px 0"},children:[e.jsx(r.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(r.Repeat,{size:16,color:"var(--color-input-border, #ACACAD)",strokeWidth:1.5}),ne>1?e.jsxs("div",{style:{position:"relative"},children:[e.jsxs("button",{onClick:()=>Q(o=>!o),style:{display:"flex",alignItems:"center",gap:4,padding:"8px 0",background:"none",border:"none",cursor:"pointer"},children:[e.jsx(r.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:[q," (",ne," Sessions)"]}),ce?e.jsx(r.ChevronUp,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5}):e.jsx(r.ChevronDown,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1.5})]}),ce&&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(r.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:q}),e.jsxs("span",{style:{fontSize:13,fontWeight:400,color:"var(--Grey-Muted, #808183)",lineHeight:1},children:[ne," Sessions in past"]})]})]}),ye.slice(0,5).map((o,S)=>e.jsxs("div",{onClick:()=>{re&&re(o),Q(!1)},onMouseEnter:()=>pe(S),onMouseLeave:()=>pe(null),style:{display:"flex",width:264,padding:"12px 16px",justifyContent:"space-between",alignItems:"center",background:fe===S?"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:o.title}),e.jsx("span",{style:{fontSize:12,fontWeight:400,color:"var(--Grey-Muted, #808183)",lineHeight:1},children:o.date})]}),fe===S&&e.jsx(r.ExternalLink,{size:16,color:"var(--Grey-Muted, #808183)",strokeWidth:1,style:{flexShrink:0}})]},o.id||S)),e.jsx("div",{style:{padding:16,borderTop:"1px solid var(--Grey-absent, #D9D9D9)",display:"flex",justifyContent:"center"},children:e.jsxs("button",{onClick:()=>{le&&le(),Q(!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(r.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.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4,padding:"8px 0"},children:[e.jsx(r.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:q})]})]})]})]}),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(Te,{score:Ne??0,maxScore:5,predictedScore:qe??0,predictedLabel:Ke,legends:Ue})}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch",justifyContent:"flex-end",gap:24,flex:1,minWidth:0},children:[e.jsx(Ae,{meta:ve,callPurpose:j||me,classification:C||yt,outcomeQuality:H||"Neutral",resolutionOutcome:Y??"Unknown",customerIntent:Pe??"Get Information",interactionId:Oe??$.interaction_id??"1a369e01-5924-4d10-bfc7-d1321be71b2b",moreDetails:$e}),e.jsx(Re,{outcomeLift:xt,driverLabels:ut})]})]})]}),e.jsx("div",{ref:Z,style:{paddingTop:24},children:e.jsx(Ee,{data:a?null:vt,loading:a})}),e.jsxs("div",{ref:J,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(r.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(He,{signals:mt,expandedSignals:nt,toggleSignal:ft,playEvidence:dt,highlightTurns:ct,onShowInTranscript:at,timelinePlaying:y||st,currentTimeSeconds:c??it})}),e.jsx("div",{style:{flex:1,minWidth:0},children:e.jsx(_e.UpdatedInteractionRecording,{ref:P,audioUrl:d,durationSeconds:ve.duration_seconds,audioRef:h,agentName:be,customerName:q.split(" ")[0],currentTimeSeconds:c,timelinePlaying:y,playbackRate:u,timelineSegments:F,onSeek:b,onTogglePlay:p,onSeekBack:k,onSeekForward:v,onSetPlaybackRate:m,transcript:D,activeTurnIndex:A,turnObservations:_,highlightedTurns:l,onTurnPlayPause:R,setExpandedSignals:de})})]})]}),e.jsx("div",{ref:ee,style:{paddingTop:24},children:e.jsx(Le,{})})]}),e.jsxs("div",{style:{display:"flex",position:"sticky",bottom:0,zIndex:10},children:[e.jsxs("button",{onClick:T?void 0:et,disabled:T,style:{display:"flex",alignItems:"center",gap:30,padding:"12px 28px",flex:1,background:"var(--Grey-White, #FFF)",border:"1px solid var(--Grey-absent, #D9D9D9)",cursor:T?"default":"pointer",pointerEvents:T?"none":"auto"},children:[e.jsx(r.ArrowLeft,{size:24,color:"var(--Grey-Muted, #808183)",strokeWidth:2,style:{opacity:T?.4:1}}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:10,opacity:T?.4:1},children:[e.jsx("span",{style:{fontSize:14,fontWeight:400,color:"#000",lineHeight:1.2,textAlign:"left"},children:Qe||"Previous Session Title"}),e.jsx("span",{style:{fontSize:13,fontWeight:400,color:"#000",lineHeight:1.2,opacity:.5,textAlign:"left"},children:Xe||"Short description of the session"})]})]}),e.jsxs("button",{onClick:B?void 0:tt,disabled:B,style:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:30,padding:"12px 28px",flex:1,background:"var(--Grey-White, #FFF)",border:"1px solid var(--Grey-absent, #D9D9D9)",cursor:B?"default":"pointer",pointerEvents:B?"none":"auto"},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:10,opacity:B?.4:1},children:[e.jsx("span",{style:{fontSize:14,fontWeight:400,color:"#000",lineHeight:1.2,textAlign:"left"},children:Ze||"Next Session Title"}),e.jsx("span",{style:{fontSize:13,fontWeight:400,color:"#000",lineHeight:1.2,opacity:.5,textAlign:"left"},children:Je||"Short description of the session"})]}),e.jsx(r.ArrowRight,{size:24,color:"var(--Grey-Muted, #808183)",strokeWidth:2,style:{opacity:B?.4:1}})]})]})]})};exports.UpdatedInteractionRecording=_e.UpdatedInteractionRecording;exports.UpdatedCoachingSynthesisCard=Ee;exports.UpdatedCompassScore=Te;exports.UpdatedInteractionContext=Ae;exports.UpdatedInteractionDetails=Tt;exports.UpdatedInteractionScores=Re;exports.UpdatedInteractionSignals=He;exports.UpdatedThreads=Le;
|
|
11
16
|
//# sourceMappingURL=UpdatedInteractionDetails.cjs.js.map
|