chordia-ui 3.4.2 → 3.4.4
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/Timeline.cjs.js +6 -1
- package/dist/Timeline.cjs.js.map +1 -1
- package/dist/Timeline.es.js +597 -129
- package/dist/Timeline.es.js.map +1 -1
- package/dist/UpdatedInteractionRecording.cjs.js +1 -1
- package/dist/UpdatedInteractionRecording.cjs.js.map +1 -1
- package/dist/UpdatedInteractionRecording.es.js +233 -241
- package/dist/UpdatedInteractionRecording.es.js.map +1 -1
- package/dist/components/UpdatedInteractionDetails.cjs.js +2 -2
- package/dist/components/UpdatedInteractionDetails.cjs.js.map +1 -1
- package/dist/components/UpdatedInteractionDetails.es.js +451 -360
- package/dist/components/UpdatedInteractionDetails.es.js.map +1 -1
- package/dist/components/media.cjs.js +1 -1
- package/dist/components/media.cjs.js.map +1 -1
- package/dist/components/media.es.js +8 -9
- package/dist/components/media.es.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs2.js +1 -1
- package/dist/index.cjs2.js.map +1 -1
- package/dist/index.es.js +52 -53
- package/dist/index.es.js.map +1 -1
- package/dist/index.es2.js +596 -587
- package/dist/index.es2.js.map +1 -1
- package/dist/pages/interactionDetails.cjs.js +2 -2
- package/dist/pages/interactionDetails.cjs.js.map +1 -1
- package/dist/pages/interactionDetails.es.js +16 -17
- package/dist/pages/interactionDetails.es.js.map +1 -1
- package/package.json +1 -1
- package/src/components/UpdatedInteractionDetails/UpdatedCompassScore.jsx +54 -2
- package/src/components/UpdatedInteractionDetails/UpdatedInteractionDetails.jsx +58 -14
- package/src/components/UpdatedInteractionDetails/UpdatedInteractionRecording.jsx +132 -126
- package/src/components/UpdatedInteractionDetails/UpdatedInteractionSignals.jsx +14 -6
- package/src/components/login/LoginPage.jsx +18 -3
- package/dist/TranscriptCard.cjs.js +0 -7
- package/dist/TranscriptCard.cjs.js.map +0 -1
- package/dist/TranscriptCard.es.js +0 -474
- package/dist/TranscriptCard.es.js.map +0 -1
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { FileSignal as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return `${l}:${D.toString().padStart(2, "0")}`;
|
|
1
|
+
import { jsxs as i, jsx as o, Fragment as Ee } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Ge, useRef as P, useState as f, useCallback as te, useEffect as ne, useImperativeHandle as We } from "react";
|
|
3
|
+
import { FileSignal as Me, RotateCcw as ze, Pause as He, Play as Ae, RotateCw as Pe, ChevronDown as $e, AudioLines as oe, PauseCircle as Be, PlayCircle as je } from "lucide-react";
|
|
4
|
+
function re(g) {
|
|
5
|
+
const d = Math.floor(g / 60), p = Math.round(g % 60);
|
|
6
|
+
return `${d}:${p.toString().padStart(2, "0")}`;
|
|
8
7
|
}
|
|
9
8
|
const Le = {
|
|
10
9
|
Agent: [
|
|
@@ -23,177 +22,179 @@ const Le = {
|
|
|
23
22
|
{ start: 0.6, end: 0.66 },
|
|
24
23
|
{ start: 0.74, end: 0.8 }
|
|
25
24
|
]
|
|
26
|
-
},
|
|
25
|
+
}, D = [
|
|
27
26
|
{ speaker: "Agent", type: "agent", time: "00:04", text: "Thanks for calling Miles Point S Pensau. This is Steve. How can I help you?" },
|
|
28
27
|
{ speaker: "Customer", type: "customer", time: "00:12", text: "Hi, Steve. This is Sandra with Botai Catering." },
|
|
29
28
|
{ speaker: "Agent", type: "agent", time: "00:18", text: "Hello. How are you?" },
|
|
30
29
|
{ speaker: "Customer", type: "customer", time: "00:20", text: "I'm doing really good. Hey. I brought my vans in last week, and I call it a beeping van, the one that beeps when you back up. Makes the crunchy noise. So I just took it on Saturday after, I think I had the, the Miles. I picked it up on Saturday morning, and I went to an event. So So I don't know if it's the tire or something, but makes it a little crunchy noise. Sometimes when I do the brake, but only if I turn the wheel too." },
|
|
31
30
|
{ speaker: "Agent", type: "agent", time: "00:21", text: "Oh, interesting. Okay. Can you swing by with it one of these days?" }
|
|
32
31
|
], _e = [1, 1.25, 1.5, 2];
|
|
33
|
-
function
|
|
34
|
-
if (!
|
|
32
|
+
function ie(g) {
|
|
33
|
+
if (!g)
|
|
35
34
|
return 0;
|
|
36
|
-
const
|
|
37
|
-
return (
|
|
35
|
+
const d = g.split(":").map(Number);
|
|
36
|
+
return (d[0] || 0) * 60 + (d[1] || 0);
|
|
38
37
|
}
|
|
39
|
-
const Ke =
|
|
40
|
-
audioUrl:
|
|
41
|
-
timelineSegments:
|
|
42
|
-
durationSeconds:
|
|
38
|
+
const Ke = Ge(function({
|
|
39
|
+
audioUrl: d,
|
|
40
|
+
timelineSegments: p = [],
|
|
41
|
+
durationSeconds: R = 0,
|
|
43
42
|
// Parent-managed audio props (optional — if not provided, component manages its own audio)
|
|
44
|
-
currentTimeSeconds:
|
|
45
|
-
timelinePlaying:
|
|
46
|
-
playbackRate:
|
|
47
|
-
onSeek:
|
|
48
|
-
onTogglePlay:
|
|
43
|
+
currentTimeSeconds: ae,
|
|
44
|
+
timelinePlaying: $,
|
|
45
|
+
playbackRate: se,
|
|
46
|
+
onSeek: B,
|
|
47
|
+
onTogglePlay: S,
|
|
49
48
|
onSeekBack: j,
|
|
50
49
|
onSeekForward: L,
|
|
51
50
|
onSetPlaybackRate: _,
|
|
52
51
|
audioRef: X,
|
|
53
52
|
// Speaker names
|
|
54
|
-
agentName:
|
|
55
|
-
customerName:
|
|
53
|
+
agentName: T = "Agent",
|
|
54
|
+
customerName: E = "Customer",
|
|
56
55
|
// Transcript props
|
|
57
|
-
transcript:
|
|
58
|
-
highlightedTurns:
|
|
59
|
-
activeTurnIndex:
|
|
60
|
-
activeDemoIndex:
|
|
61
|
-
turnObservations:
|
|
62
|
-
setExpandedSignals:
|
|
63
|
-
onTurnPlayPause:
|
|
64
|
-
},
|
|
65
|
-
var
|
|
66
|
-
const
|
|
56
|
+
transcript: y,
|
|
57
|
+
highlightedTurns: le = /* @__PURE__ */ new Set(),
|
|
58
|
+
activeTurnIndex: Y,
|
|
59
|
+
activeDemoIndex: ce = 1,
|
|
60
|
+
turnObservations: de = {},
|
|
61
|
+
setExpandedSignals: G,
|
|
62
|
+
onTurnPlayPause: q
|
|
63
|
+
}, ue) {
|
|
64
|
+
var ee;
|
|
65
|
+
const K = P(null), u = P(null), k = P(null), [V, m] = f(!1), [W, Z] = f(0), [he, fe] = f(0), [ge, pe] = f(1), [w, ye] = f(null), [me, ve] = f(1), [be, I] = f(!1), [ke, J] = f(!1), [N, M] = f(ce), s = !!X, x = !d, l = d && !s, F = x ? be : s ? $ ?? !1 : V, xe = x ? w ?? 0 : s ? ae ?? 0 : W, z = x ? me : s ? se ?? 1 : ge, H = x ? R || 156 : s ? R : he || R || 0, A = te(() => {
|
|
67
66
|
const e = () => {
|
|
68
|
-
const
|
|
69
|
-
|
|
67
|
+
const t = u.current;
|
|
68
|
+
t && Z(t.currentTime), k.current = requestAnimationFrame(e);
|
|
70
69
|
};
|
|
71
|
-
|
|
72
|
-
}, []),
|
|
73
|
-
|
|
70
|
+
k.current = requestAnimationFrame(e);
|
|
71
|
+
}, []), v = te(() => {
|
|
72
|
+
k.current && (cancelAnimationFrame(k.current), k.current = null);
|
|
74
73
|
}, []);
|
|
75
|
-
|
|
76
|
-
if (!
|
|
74
|
+
ne(() => () => v(), [v]), ne(() => {
|
|
75
|
+
if (!l)
|
|
77
76
|
return;
|
|
78
|
-
const e =
|
|
77
|
+
const e = u.current;
|
|
79
78
|
if (!e)
|
|
80
79
|
return;
|
|
81
|
-
const
|
|
82
|
-
|
|
80
|
+
const t = () => fe(e.duration || 0), n = () => {
|
|
81
|
+
m(!1), v();
|
|
83
82
|
};
|
|
84
|
-
return e.addEventListener("loadedmetadata",
|
|
85
|
-
e.removeEventListener("loadedmetadata",
|
|
83
|
+
return e.addEventListener("loadedmetadata", t), e.addEventListener("ended", n), () => {
|
|
84
|
+
e.removeEventListener("loadedmetadata", t), e.removeEventListener("ended", n);
|
|
86
85
|
};
|
|
87
|
-
}, [
|
|
88
|
-
const
|
|
89
|
-
for (let
|
|
90
|
-
const
|
|
91
|
-
if (e >=
|
|
92
|
-
return
|
|
86
|
+
}, [l, v]);
|
|
87
|
+
const Q = (e) => {
|
|
88
|
+
for (let t = D.length - 1; t >= 0; t--) {
|
|
89
|
+
const n = ie(D[t].time);
|
|
90
|
+
if (e >= n)
|
|
91
|
+
return t;
|
|
93
92
|
}
|
|
94
93
|
return 0;
|
|
95
|
-
},
|
|
96
|
-
const
|
|
97
|
-
if (
|
|
98
|
-
const
|
|
99
|
-
|
|
94
|
+
}, b = (e) => {
|
|
95
|
+
const n = Math.max(0, Math.min(e, H || 156));
|
|
96
|
+
if (l) {
|
|
97
|
+
const r = u.current;
|
|
98
|
+
r && (r.currentTime = n), Z(n);
|
|
100
99
|
} else
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
},
|
|
104
|
-
if (
|
|
105
|
-
const e =
|
|
100
|
+
s && B && B(n);
|
|
101
|
+
ye(n), M(Q(n));
|
|
102
|
+
}, Fe = () => {
|
|
103
|
+
if (l) {
|
|
104
|
+
const e = u.current;
|
|
106
105
|
if (!e)
|
|
107
106
|
return;
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
V ? (e.pause(), v(), m(!1)) : e.play().then(() => {
|
|
108
|
+
m(!0), A();
|
|
110
109
|
}).catch(() => {
|
|
111
110
|
});
|
|
112
111
|
} else
|
|
113
|
-
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
},
|
|
119
|
-
if (
|
|
120
|
-
const
|
|
121
|
-
|
|
112
|
+
s && S ? S() : I((e) => !e);
|
|
113
|
+
}, Se = () => {
|
|
114
|
+
s && j ? j() : b(Math.max(0, (l ? W : w ?? 0) - 10));
|
|
115
|
+
}, we = () => {
|
|
116
|
+
s && L ? L() : b(Math.min(H || 156, (l ? W : w ?? 0) + 10));
|
|
117
|
+
}, Ie = (e) => {
|
|
118
|
+
if (l) {
|
|
119
|
+
const t = u.current;
|
|
120
|
+
t && (t.playbackRate = e), pe(e);
|
|
122
121
|
} else
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
s && _ && _(e);
|
|
123
|
+
ve(e), J(!1);
|
|
125
124
|
};
|
|
126
|
-
|
|
125
|
+
We(ue, () => ({
|
|
127
126
|
seekTo: (e) => {
|
|
128
|
-
if (
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
127
|
+
if (b(e), s)
|
|
128
|
+
!$ && S && S();
|
|
129
|
+
else if (l) {
|
|
130
|
+
const n = u.current;
|
|
131
|
+
n && n.play().then(() => {
|
|
132
|
+
m(!0), A();
|
|
132
133
|
}).catch(() => {
|
|
133
134
|
});
|
|
134
135
|
} else
|
|
135
|
-
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
var
|
|
139
|
-
const
|
|
140
|
-
|
|
136
|
+
I(!0);
|
|
137
|
+
const t = Q(e);
|
|
138
|
+
M(t), setTimeout(() => {
|
|
139
|
+
var r;
|
|
140
|
+
const n = (r = K.current) == null ? void 0 : r.children;
|
|
141
|
+
n != null && n[t] && n[t].scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
141
142
|
}, 50);
|
|
142
143
|
}
|
|
143
144
|
}));
|
|
144
|
-
const
|
|
145
|
-
var
|
|
146
|
-
if (
|
|
147
|
-
if (
|
|
148
|
-
const
|
|
149
|
-
|
|
145
|
+
const Ce = (e) => {
|
|
146
|
+
var t;
|
|
147
|
+
if (N === e && F) {
|
|
148
|
+
if (l) {
|
|
149
|
+
const n = u.current;
|
|
150
|
+
n && n.pause(), v(), m(!1);
|
|
150
151
|
}
|
|
151
|
-
|
|
152
|
+
I(!1);
|
|
152
153
|
} else {
|
|
153
|
-
const
|
|
154
|
-
if (
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
|
|
154
|
+
const n = ie((t = D[e]) == null ? void 0 : t.time);
|
|
155
|
+
if (M(e), b(n), l) {
|
|
156
|
+
const r = u.current;
|
|
157
|
+
r && (r.currentTime = n, r.play().then(() => {
|
|
158
|
+
m(!0), A();
|
|
158
159
|
}).catch(() => {
|
|
159
160
|
}));
|
|
160
161
|
}
|
|
161
|
-
|
|
162
|
+
I(!0);
|
|
162
163
|
}
|
|
163
|
-
},
|
|
164
|
+
}, De = (e, t) => {
|
|
164
165
|
if (e == null)
|
|
165
166
|
return;
|
|
166
|
-
const
|
|
167
|
-
const
|
|
168
|
-
return `${
|
|
167
|
+
const n = (r) => {
|
|
168
|
+
const a = Math.floor(r / 6e4), c = Math.floor(r % 6e4 / 1e3);
|
|
169
|
+
return `${a.toString().padStart(2, "0")}:${c.toString().padStart(2, "0")}`;
|
|
169
170
|
};
|
|
170
|
-
return `${
|
|
171
|
-
},
|
|
172
|
-
var
|
|
171
|
+
return `${n(e)}–${t != null ? n(t) : n(e)}`;
|
|
172
|
+
}, O = (ee = y == null ? void 0 : y.messages) != null && ee.length ? y.messages.map((e, t) => {
|
|
173
|
+
var n, r;
|
|
173
174
|
return {
|
|
174
|
-
actor: e.actor === "agent" ? ((
|
|
175
|
+
actor: e.actor === "agent" ? ((n = y.actor_map) == null ? void 0 : n.agent) || "Agent" : ((r = y.actor_map) == null ? void 0 : r.customer) || "Customer",
|
|
175
176
|
actorType: e.actor === "agent" ? "agent" : "customer",
|
|
176
177
|
text: e.text || "",
|
|
177
|
-
timeRange:
|
|
178
|
-
isHighlighted:
|
|
179
|
-
highlightColor:
|
|
180
|
-
observations: (
|
|
181
|
-
...
|
|
178
|
+
timeRange: De(e.start ?? e.start_ms, e.end ?? e.end_ms),
|
|
179
|
+
isHighlighted: le.has(t),
|
|
180
|
+
highlightColor: F && Y === t ? e.actor === "agent" ? "var(--rail-outcome)" : "var(--rail-discovery)" : void 0,
|
|
181
|
+
observations: (de[t] || []).map((a) => ({
|
|
182
|
+
...a,
|
|
182
183
|
onClick: () => {
|
|
183
|
-
|
|
184
|
-
const
|
|
185
|
-
|
|
184
|
+
G == null || G((c) => /* @__PURE__ */ new Set([...c, a.signalKey])), setTimeout(() => {
|
|
185
|
+
const c = document.getElementById(`signal-${a.signalKey}`);
|
|
186
|
+
c && c.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
186
187
|
}, 100);
|
|
187
188
|
}
|
|
188
189
|
}))
|
|
189
190
|
};
|
|
190
|
-
}) : null, U =
|
|
191
|
-
return /* @__PURE__ */
|
|
191
|
+
}) : null, U = x ? w ?? 0 : xe, h = H || 156, C = h > 0 ? U / h * 100 : 0, Re = Math.round(U);
|
|
192
|
+
return /* @__PURE__ */ i("div", { style: {
|
|
192
193
|
display: "flex",
|
|
193
194
|
flexDirection: "column",
|
|
194
195
|
gap: 16
|
|
195
196
|
}, children: [
|
|
196
|
-
/* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ i("div", { style: {
|
|
197
198
|
display: "flex",
|
|
198
199
|
alignItems: "center",
|
|
199
200
|
gap: 16,
|
|
@@ -208,14 +209,14 @@ const Ke = Ee(function({
|
|
|
208
209
|
borderRadius: 9999,
|
|
209
210
|
background: "var(--surface-hover, #F3F7F7)",
|
|
210
211
|
flexShrink: 0
|
|
211
|
-
}, children: /* @__PURE__ */ o(
|
|
212
|
+
}, children: /* @__PURE__ */ o(Me, { size: 20, color: "#2E3236", strokeWidth: 1.5 }) }),
|
|
212
213
|
/* @__PURE__ */ o("span", { style: {
|
|
213
214
|
fontSize: 15,
|
|
214
215
|
fontWeight: 500,
|
|
215
216
|
color: "var(--Grey-Strong, #2E3236)"
|
|
216
217
|
}, children: "Recording" })
|
|
217
218
|
] }),
|
|
218
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ i("div", { style: {
|
|
219
220
|
display: "flex",
|
|
220
221
|
padding: 24,
|
|
221
222
|
flexDirection: "column",
|
|
@@ -225,22 +226,22 @@ const Ke = Ee(function({
|
|
|
225
226
|
border: "1px solid var(--Grey-absent, #D9D9D9)",
|
|
226
227
|
background: "var(--Grey-White, #FFF)"
|
|
227
228
|
}, children: [
|
|
228
|
-
/* @__PURE__ */
|
|
229
|
-
/* @__PURE__ */
|
|
230
|
-
/* @__PURE__ */
|
|
229
|
+
/* @__PURE__ */ i("div", { style: { width: "100%", display: "flex", flexDirection: "column", gap: 16 }, children: [
|
|
230
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 24 }, children: [
|
|
231
|
+
/* @__PURE__ */ i("span", { style: {
|
|
231
232
|
fontSize: 14,
|
|
232
233
|
fontWeight: 500,
|
|
233
234
|
color: "var(--Grey-Strong, #2E3236)",
|
|
234
235
|
lineHeight: 1.2
|
|
235
236
|
}, children: [
|
|
236
|
-
|
|
237
|
+
T,
|
|
237
238
|
" / ",
|
|
238
|
-
|
|
239
|
+
E
|
|
239
240
|
] }),
|
|
240
|
-
/* @__PURE__ */
|
|
241
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 12 }, children: [
|
|
241
242
|
/* @__PURE__ */ o("span", { style: { fontSize: 13, fontWeight: 400, color: "var(--Grey-Muted, #808183)", lineHeight: 1.2 }, children: "10" }),
|
|
242
|
-
/* @__PURE__ */ o("button", { onClick:
|
|
243
|
-
/* @__PURE__ */ o("button", { onClick:
|
|
243
|
+
/* @__PURE__ */ o("button", { onClick: Se, style: { background: "none", border: "none", cursor: "pointer", padding: 0, display: "flex", alignItems: "center" }, children: /* @__PURE__ */ o(ze, { size: 20, color: "#808183", strokeWidth: 1.5 }) }),
|
|
244
|
+
/* @__PURE__ */ o("button", { onClick: Fe, style: {
|
|
244
245
|
background: "var(--Grey-Strong, #2E3236)",
|
|
245
246
|
border: "none",
|
|
246
247
|
cursor: "pointer",
|
|
@@ -251,15 +252,15 @@ const Ke = Ee(function({
|
|
|
251
252
|
display: "flex",
|
|
252
253
|
alignItems: "center",
|
|
253
254
|
justifyContent: "center"
|
|
254
|
-
}, children:
|
|
255
|
-
/* @__PURE__ */ o("button", { onClick:
|
|
255
|
+
}, children: F ? /* @__PURE__ */ o(He, { size: 14, color: "#FFF", fill: "#FFF" }) : /* @__PURE__ */ o(Ae, { size: 14, color: "#FFF", fill: "#FFF", strokeWidth: 1.5, style: { marginLeft: 2 } }) }),
|
|
256
|
+
/* @__PURE__ */ o("button", { onClick: we, style: { background: "none", border: "none", cursor: "pointer", padding: 0, display: "flex", alignItems: "center" }, children: /* @__PURE__ */ o(Pe, { size: 20, color: "#808183", strokeWidth: 1.5 }) }),
|
|
256
257
|
/* @__PURE__ */ o("span", { style: { fontSize: 13, fontWeight: 400, color: "var(--Grey-Muted, #808183)", lineHeight: 1.2 }, children: "10" })
|
|
257
258
|
] }),
|
|
258
|
-
/* @__PURE__ */
|
|
259
|
-
/* @__PURE__ */
|
|
259
|
+
/* @__PURE__ */ i("div", { style: { position: "relative" }, children: [
|
|
260
|
+
/* @__PURE__ */ i(
|
|
260
261
|
"button",
|
|
261
262
|
{
|
|
262
|
-
onClick: () =>
|
|
263
|
+
onClick: () => J((e) => !e),
|
|
263
264
|
style: {
|
|
264
265
|
background: "var(--Grey-White, #FFF)",
|
|
265
266
|
border: "1px solid var(--Grey-absent, #D9D9D9)",
|
|
@@ -279,13 +280,13 @@ const Ke = Ee(function({
|
|
|
279
280
|
gap: 4
|
|
280
281
|
},
|
|
281
282
|
children: [
|
|
282
|
-
|
|
283
|
+
z,
|
|
283
284
|
"x",
|
|
284
|
-
/* @__PURE__ */ o(
|
|
285
|
+
/* @__PURE__ */ o($e, { size: 12, color: "#808183" })
|
|
285
286
|
]
|
|
286
287
|
}
|
|
287
288
|
),
|
|
288
|
-
|
|
289
|
+
ke && /* @__PURE__ */ o("div", { style: {
|
|
289
290
|
position: "absolute",
|
|
290
291
|
top: "100%",
|
|
291
292
|
right: 0,
|
|
@@ -297,19 +298,19 @@ const Ke = Ee(function({
|
|
|
297
298
|
zIndex: 10,
|
|
298
299
|
overflow: "hidden",
|
|
299
300
|
minWidth: 80
|
|
300
|
-
}, children: _e.map((e) => /* @__PURE__ */
|
|
301
|
+
}, children: _e.map((e) => /* @__PURE__ */ i(
|
|
301
302
|
"button",
|
|
302
303
|
{
|
|
303
|
-
onClick: () =>
|
|
304
|
+
onClick: () => Ie(e),
|
|
304
305
|
style: {
|
|
305
306
|
display: "block",
|
|
306
307
|
width: "100%",
|
|
307
308
|
padding: "8px 12px",
|
|
308
309
|
border: "none",
|
|
309
|
-
background:
|
|
310
|
+
background: z === e ? "var(--surface-hover, #F3F7F7)" : "var(--Grey-White, #FFF)",
|
|
310
311
|
cursor: "pointer",
|
|
311
312
|
fontSize: 13,
|
|
312
|
-
fontWeight:
|
|
313
|
+
fontWeight: z === e ? 600 : 400,
|
|
313
314
|
color: "var(--Grey-Strong, #2E3236)",
|
|
314
315
|
fontFamily: "var(--font-sans)",
|
|
315
316
|
textAlign: "left"
|
|
@@ -323,37 +324,22 @@ const Ke = Ee(function({
|
|
|
323
324
|
)) })
|
|
324
325
|
] })
|
|
325
326
|
] }),
|
|
326
|
-
|
|
327
|
-
/* @__PURE__ */
|
|
328
|
-
je,
|
|
329
|
-
{
|
|
330
|
-
segments: D,
|
|
331
|
-
durationSeconds: S,
|
|
332
|
-
currentTimeSeconds: P,
|
|
333
|
-
onSeek: T,
|
|
334
|
-
showControls: !1,
|
|
335
|
-
hasRecording: !0,
|
|
336
|
-
timelinePlaying: A,
|
|
337
|
-
playbackRate: $
|
|
338
|
-
}
|
|
339
|
-
),
|
|
340
|
-
/* @__PURE__ */ o("audio", { ref: X, preload: "none", style: { display: "none" }, children: /* @__PURE__ */ o("source", { src: l, type: "audio/mpeg" }) })
|
|
341
|
-
] }) : /* @__PURE__ */ r("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [
|
|
342
|
-
/* @__PURE__ */ r("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
327
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [
|
|
328
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
343
329
|
/* @__PURE__ */ o("span", { style: {
|
|
344
330
|
fontSize: 13,
|
|
345
|
-
fontWeight:
|
|
346
|
-
color:
|
|
331
|
+
fontWeight: 500,
|
|
332
|
+
color: "var(--Grey-Strong, #2E3236)",
|
|
347
333
|
fontFamily: "var(--font-sans)",
|
|
348
334
|
lineHeight: 1.2,
|
|
349
335
|
minWidth: 60
|
|
350
|
-
}, children:
|
|
351
|
-
/* @__PURE__ */
|
|
336
|
+
}, children: re(h) }),
|
|
337
|
+
/* @__PURE__ */ i(
|
|
352
338
|
"div",
|
|
353
339
|
{
|
|
354
340
|
onClick: (e) => {
|
|
355
|
-
const
|
|
356
|
-
|
|
341
|
+
const t = e.currentTarget.getBoundingClientRect(), n = e.clientX - t.left, r = Math.max(0, Math.min(1, n / t.width));
|
|
342
|
+
b(r * h);
|
|
357
343
|
},
|
|
358
344
|
style: {
|
|
359
345
|
flex: 1,
|
|
@@ -378,7 +364,7 @@ const Ke = Ee(function({
|
|
|
378
364
|
left: 0,
|
|
379
365
|
top: "50%",
|
|
380
366
|
transform: "translateY(-50%)",
|
|
381
|
-
width: `${
|
|
367
|
+
width: `${C}%`,
|
|
382
368
|
height: 4,
|
|
383
369
|
borderRadius: 2,
|
|
384
370
|
background: "var(--Green-Primary, #00925F)",
|
|
@@ -394,7 +380,7 @@ const Ke = Ee(function({
|
|
|
394
380
|
xmlns: "http://www.w3.org/2000/svg",
|
|
395
381
|
style: {
|
|
396
382
|
position: "absolute",
|
|
397
|
-
left: `${
|
|
383
|
+
left: `${C}%`,
|
|
398
384
|
top: "50%",
|
|
399
385
|
transform: "translate(-50%, -50%)",
|
|
400
386
|
pointerEvents: "none"
|
|
@@ -414,61 +400,67 @@ const Ke = Ee(function({
|
|
|
414
400
|
}
|
|
415
401
|
)
|
|
416
402
|
] }),
|
|
417
|
-
/* @__PURE__ */
|
|
418
|
-
[
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
position: "absolute",
|
|
450
|
-
left: 0,
|
|
451
|
-
right: 0,
|
|
452
|
-
top: "50%",
|
|
453
|
-
transform: "translateY(-50%)",
|
|
454
|
-
height: 4,
|
|
455
|
-
borderRadius: 2,
|
|
456
|
-
background: "var(--rail-surface-2, #E3E1D7)"
|
|
457
|
-
} }),
|
|
458
|
-
Le[e].map((t, i) => /* @__PURE__ */ o("div", { style: {
|
|
459
|
-
position: "absolute",
|
|
460
|
-
left: `${t.start * 100}%`,
|
|
461
|
-
width: `${(t.end - t.start) * 100}%`,
|
|
462
|
-
top: 0,
|
|
463
|
-
bottom: 0,
|
|
403
|
+
/* @__PURE__ */ i("div", { style: { position: "relative", paddingBottom: 30, cursor: "pointer" }, children: [
|
|
404
|
+
[T, E].map((e, t) => {
|
|
405
|
+
const n = t === 0, r = p != null && p.length ? p.filter((a) => n ? a.actor === T : a.actor === E).map((a) => ({
|
|
406
|
+
start: h > 0 ? a.startTime / h : 0,
|
|
407
|
+
end: h > 0 ? a.endTime / h : 0
|
|
408
|
+
})) : Le[n ? "Agent" : "Customer"] || [];
|
|
409
|
+
return /* @__PURE__ */ i("div", { style: {
|
|
410
|
+
display: "flex",
|
|
411
|
+
alignItems: "center",
|
|
412
|
+
gap: 8,
|
|
413
|
+
height: 20,
|
|
414
|
+
marginBottom: t === 0 ? 4 : 0
|
|
415
|
+
}, children: [
|
|
416
|
+
/* @__PURE__ */ o("span", { style: {
|
|
417
|
+
fontSize: 13,
|
|
418
|
+
fontWeight: 400,
|
|
419
|
+
color: "var(--Grey-Muted, #808183)",
|
|
420
|
+
fontFamily: "var(--font-sans)",
|
|
421
|
+
lineHeight: 1.2,
|
|
422
|
+
minWidth: 60
|
|
423
|
+
}, children: e }),
|
|
424
|
+
/* @__PURE__ */ i(
|
|
425
|
+
"div",
|
|
426
|
+
{
|
|
427
|
+
onClick: (a) => {
|
|
428
|
+
const c = a.currentTarget.getBoundingClientRect(), Te = Math.max(0, Math.min(1, (a.clientX - c.left) / c.width));
|
|
429
|
+
b(Te * h);
|
|
430
|
+
},
|
|
431
|
+
style: {
|
|
432
|
+
flex: 1,
|
|
433
|
+
height: 6,
|
|
434
|
+
position: "relative",
|
|
464
435
|
borderRadius: 3,
|
|
465
|
-
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
436
|
+
cursor: "pointer"
|
|
437
|
+
},
|
|
438
|
+
children: [
|
|
439
|
+
/* @__PURE__ */ o("div", { style: {
|
|
440
|
+
position: "absolute",
|
|
441
|
+
left: 0,
|
|
442
|
+
right: 0,
|
|
443
|
+
top: "50%",
|
|
444
|
+
transform: "translateY(-50%)",
|
|
445
|
+
height: 4,
|
|
446
|
+
borderRadius: 2,
|
|
447
|
+
background: "var(--rail-surface-2, #E3E1D7)"
|
|
448
|
+
} }),
|
|
449
|
+
r.map((a, c) => /* @__PURE__ */ o("div", { style: {
|
|
450
|
+
position: "absolute",
|
|
451
|
+
left: `${a.start * 100}%`,
|
|
452
|
+
width: `${(a.end - a.start) * 100}%`,
|
|
453
|
+
top: 0,
|
|
454
|
+
bottom: 0,
|
|
455
|
+
borderRadius: 3,
|
|
456
|
+
background: n ? "var(--Grey-Strong, #2E3236)" : "var(--Grey-Muted, #808183)"
|
|
457
|
+
} }, c))
|
|
458
|
+
]
|
|
459
|
+
}
|
|
460
|
+
)
|
|
461
|
+
] }, e);
|
|
462
|
+
}),
|
|
463
|
+
/* @__PURE__ */ i("div", { style: {
|
|
472
464
|
position: "absolute",
|
|
473
465
|
left: 68,
|
|
474
466
|
/* 60 label + 8 gap */
|
|
@@ -479,17 +471,16 @@ const Ke = Ee(function({
|
|
|
479
471
|
}, children: [
|
|
480
472
|
/* @__PURE__ */ o("div", { style: {
|
|
481
473
|
position: "absolute",
|
|
482
|
-
left: `${
|
|
474
|
+
left: `${C}%`,
|
|
483
475
|
top: 0,
|
|
484
476
|
height: 44,
|
|
485
|
-
/* spans both rows */
|
|
486
477
|
transform: "translateX(-50%)",
|
|
487
478
|
borderLeft: "1.5px dashed var(--Grey-Muted, #808183)",
|
|
488
479
|
opacity: 0.5
|
|
489
480
|
} }),
|
|
490
481
|
/* @__PURE__ */ o("div", { style: {
|
|
491
482
|
position: "absolute",
|
|
492
|
-
left: `${
|
|
483
|
+
left: `${C}%`,
|
|
493
484
|
bottom: 0,
|
|
494
485
|
transform: "translateX(-50%)",
|
|
495
486
|
background: "var(--Grey-Strong, #2E3236)",
|
|
@@ -500,13 +491,14 @@ const Ke = Ee(function({
|
|
|
500
491
|
padding: "4px 6px",
|
|
501
492
|
borderRadius: 4,
|
|
502
493
|
whiteSpace: "nowrap"
|
|
503
|
-
}, children:
|
|
494
|
+
}, children: re(Re) })
|
|
504
495
|
] })
|
|
505
496
|
] }),
|
|
506
|
-
|
|
497
|
+
l && /* @__PURE__ */ o("audio", { ref: u, preload: "auto", style: { display: "none" }, children: /* @__PURE__ */ o("source", { src: d, type: "audio/mpeg" }) }),
|
|
498
|
+
s && d && /* @__PURE__ */ o("audio", { ref: X, preload: "auto", style: { display: "none" }, children: /* @__PURE__ */ o("source", { src: d, type: "audio/mpeg" }) })
|
|
507
499
|
] })
|
|
508
500
|
] }),
|
|
509
|
-
/* @__PURE__ */
|
|
501
|
+
/* @__PURE__ */ i("div", { style: {
|
|
510
502
|
width: "100%",
|
|
511
503
|
display: "flex",
|
|
512
504
|
flexDirection: "column",
|
|
@@ -521,29 +513,29 @@ const Ke = Ee(function({
|
|
|
521
513
|
color: "var(--Grey-Strong, #2E3236)",
|
|
522
514
|
lineHeight: 1.2
|
|
523
515
|
}, children: "Transcript" }) }),
|
|
524
|
-
/* @__PURE__ */ o("div", { id: "transcript-container", ref:
|
|
516
|
+
/* @__PURE__ */ o("div", { id: "transcript-container", ref: K, style: {
|
|
525
517
|
display: "flex",
|
|
526
518
|
flexDirection: "column",
|
|
527
519
|
maxHeight: 600,
|
|
528
520
|
overflowY: "auto"
|
|
529
|
-
}, children: (
|
|
521
|
+
}, children: (O || D.map((e) => ({
|
|
530
522
|
actor: e.speaker,
|
|
531
523
|
actorType: e.type,
|
|
532
524
|
text: e.text,
|
|
533
525
|
timeRange: e.time
|
|
534
|
-
}))).map((e,
|
|
535
|
-
const
|
|
536
|
-
return /* @__PURE__ */
|
|
526
|
+
}))).map((e, t) => {
|
|
527
|
+
const n = !!O, r = n ? F && Y === t : t === N && F, a = (e.actorType || e.type) === "customer";
|
|
528
|
+
return /* @__PURE__ */ i("div", { style: {
|
|
537
529
|
display: "flex",
|
|
538
530
|
padding: 16,
|
|
539
531
|
flexDirection: "column",
|
|
540
532
|
alignItems: "flex-start",
|
|
541
533
|
gap: 16,
|
|
542
534
|
alignSelf: "stretch",
|
|
543
|
-
borderTop:
|
|
544
|
-
background:
|
|
535
|
+
borderTop: t > 0 ? "1px solid var(--Grey-absent, #D9D9D9)" : "none",
|
|
536
|
+
background: r ? "var(--surface-hover, #F3F7F7)" : "var(--Grey-White, #FFF)"
|
|
545
537
|
}, children: [
|
|
546
|
-
/* @__PURE__ */
|
|
538
|
+
/* @__PURE__ */ i("div", { style: {
|
|
547
539
|
display: "flex",
|
|
548
540
|
alignItems: "center",
|
|
549
541
|
justifyContent: "space-between",
|
|
@@ -554,12 +546,12 @@ const Ke = Ee(function({
|
|
|
554
546
|
fontSize: 14,
|
|
555
547
|
fontWeight: 600,
|
|
556
548
|
lineHeight: 1.2,
|
|
557
|
-
color:
|
|
549
|
+
color: a ? "var(--Grey-Strong, #2E3236)" : "var(--Grey-Muted, #808183)"
|
|
558
550
|
}, children: e.actor }),
|
|
559
|
-
/* @__PURE__ */
|
|
560
|
-
|
|
561
|
-
/* @__PURE__ */ o(
|
|
562
|
-
/* @__PURE__ */ o(
|
|
551
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
552
|
+
r && /* @__PURE__ */ i(Ee, { children: [
|
|
553
|
+
/* @__PURE__ */ o(oe, { size: 12, color: "#2E3236" }),
|
|
554
|
+
/* @__PURE__ */ o(oe, { size: 12, color: "#2E3236" })
|
|
563
555
|
] }),
|
|
564
556
|
/* @__PURE__ */ o("span", { style: {
|
|
565
557
|
fontSize: 13,
|
|
@@ -569,12 +561,12 @@ const Ke = Ee(function({
|
|
|
569
561
|
}, children: e.timeRange })
|
|
570
562
|
] })
|
|
571
563
|
] }),
|
|
572
|
-
/* @__PURE__ */
|
|
564
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "flex-start", gap: 8, width: "100%" }, children: [
|
|
573
565
|
/* @__PURE__ */ o(
|
|
574
566
|
"button",
|
|
575
567
|
{
|
|
576
568
|
onClick: () => {
|
|
577
|
-
|
|
569
|
+
n && q ? q(e, t) : Ce(t);
|
|
578
570
|
},
|
|
579
571
|
style: {
|
|
580
572
|
background: "none",
|
|
@@ -584,7 +576,7 @@ const Ke = Ee(function({
|
|
|
584
576
|
flexShrink: 0,
|
|
585
577
|
display: "flex"
|
|
586
578
|
},
|
|
587
|
-
children:
|
|
579
|
+
children: r ? /* @__PURE__ */ o(Be, { size: 17, color: "#2E3236", strokeWidth: 1.5 }) : /* @__PURE__ */ o(je, { size: 17, color: "#808183", strokeWidth: 1 })
|
|
588
580
|
}
|
|
589
581
|
),
|
|
590
582
|
/* @__PURE__ */ o("p", { style: {
|
|
@@ -596,7 +588,7 @@ const Ke = Ee(function({
|
|
|
596
588
|
flex: 1
|
|
597
589
|
}, children: e.text })
|
|
598
590
|
] })
|
|
599
|
-
] },
|
|
591
|
+
] }, t);
|
|
600
592
|
}) })
|
|
601
593
|
] })
|
|
602
594
|
] })
|