chordia-ui 3.4.3 → 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/UpdatedInteractionRecording.cjs.js +1 -1
- package/dist/UpdatedInteractionRecording.cjs.js.map +1 -1
- package/dist/UpdatedInteractionRecording.es.js +136 -146
- 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 +312 -248
- package/dist/components/UpdatedInteractionDetails.es.js.map +1 -1
- package/dist/index.cjs2.js +1 -1
- package/dist/index.cjs2.js.map +1 -1
- package/dist/index.es2.js +596 -587
- package/dist/index.es2.js.map +1 -1
- package/package.json +1 -1
- package/src/components/UpdatedInteractionDetails/UpdatedCompassScore.jsx +54 -2
- package/src/components/UpdatedInteractionDetails/UpdatedInteractionDetails.jsx +23 -13
- package/src/components/UpdatedInteractionDetails/UpdatedInteractionRecording.jsx +3 -15
- package/src/components/login/LoginPage.jsx +18 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as i, jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { FileSignal as Me, RotateCcw as ze, Pause as He, Play as Ae, RotateCw as Pe, ChevronDown as $e, AudioLines as
|
|
4
|
-
function
|
|
5
|
-
const d = Math.floor(
|
|
6
|
-
return `${d}:${
|
|
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")}`;
|
|
7
7
|
}
|
|
8
8
|
const Le = {
|
|
9
9
|
Agent: [
|
|
@@ -29,64 +29,64 @@ const Le = {
|
|
|
29
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." },
|
|
30
30
|
{ speaker: "Agent", type: "agent", time: "00:21", text: "Oh, interesting. Okay. Can you swing by with it one of these days?" }
|
|
31
31
|
], _e = [1, 1.25, 1.5, 2];
|
|
32
|
-
function
|
|
33
|
-
if (!
|
|
32
|
+
function ie(g) {
|
|
33
|
+
if (!g)
|
|
34
34
|
return 0;
|
|
35
|
-
const d =
|
|
35
|
+
const d = g.split(":").map(Number);
|
|
36
36
|
return (d[0] || 0) * 60 + (d[1] || 0);
|
|
37
37
|
}
|
|
38
|
-
const Ke =
|
|
38
|
+
const Ke = Ge(function({
|
|
39
39
|
audioUrl: d,
|
|
40
|
-
timelineSegments:
|
|
40
|
+
timelineSegments: p = [],
|
|
41
41
|
durationSeconds: R = 0,
|
|
42
42
|
// Parent-managed audio props (optional — if not provided, component manages its own audio)
|
|
43
|
-
currentTimeSeconds:
|
|
44
|
-
timelinePlaying:
|
|
45
|
-
playbackRate:
|
|
46
|
-
onSeek:
|
|
47
|
-
onTogglePlay:
|
|
48
|
-
onSeekBack:
|
|
49
|
-
onSeekForward:
|
|
50
|
-
onSetPlaybackRate:
|
|
51
|
-
audioRef:
|
|
43
|
+
currentTimeSeconds: ae,
|
|
44
|
+
timelinePlaying: $,
|
|
45
|
+
playbackRate: se,
|
|
46
|
+
onSeek: B,
|
|
47
|
+
onTogglePlay: S,
|
|
48
|
+
onSeekBack: j,
|
|
49
|
+
onSeekForward: L,
|
|
50
|
+
onSetPlaybackRate: _,
|
|
51
|
+
audioRef: X,
|
|
52
52
|
// Speaker names
|
|
53
53
|
agentName: T = "Agent",
|
|
54
|
-
customerName:
|
|
54
|
+
customerName: E = "Customer",
|
|
55
55
|
// Transcript props
|
|
56
56
|
transcript: y,
|
|
57
|
-
highlightedTurns:
|
|
58
|
-
activeTurnIndex:
|
|
59
|
-
activeDemoIndex:
|
|
60
|
-
turnObservations:
|
|
61
|
-
setExpandedSignals:
|
|
62
|
-
onTurnPlayPause:
|
|
57
|
+
highlightedTurns: le = /* @__PURE__ */ new Set(),
|
|
58
|
+
activeTurnIndex: Y,
|
|
59
|
+
activeDemoIndex: ce = 1,
|
|
60
|
+
turnObservations: de = {},
|
|
61
|
+
setExpandedSignals: G,
|
|
62
|
+
onTurnPlayPause: q
|
|
63
63
|
}, ue) {
|
|
64
|
-
var
|
|
65
|
-
const
|
|
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(() => {
|
|
66
66
|
const e = () => {
|
|
67
|
-
const t =
|
|
68
|
-
t &&
|
|
67
|
+
const t = u.current;
|
|
68
|
+
t && Z(t.currentTime), k.current = requestAnimationFrame(e);
|
|
69
69
|
};
|
|
70
70
|
k.current = requestAnimationFrame(e);
|
|
71
|
-
}, []), v =
|
|
71
|
+
}, []), v = te(() => {
|
|
72
72
|
k.current && (cancelAnimationFrame(k.current), k.current = null);
|
|
73
73
|
}, []);
|
|
74
|
-
|
|
74
|
+
ne(() => () => v(), [v]), ne(() => {
|
|
75
75
|
if (!l)
|
|
76
76
|
return;
|
|
77
|
-
const e =
|
|
77
|
+
const e = u.current;
|
|
78
78
|
if (!e)
|
|
79
79
|
return;
|
|
80
|
-
const t = () =>
|
|
80
|
+
const t = () => fe(e.duration || 0), n = () => {
|
|
81
81
|
m(!1), v();
|
|
82
82
|
};
|
|
83
83
|
return e.addEventListener("loadedmetadata", t), e.addEventListener("ended", n), () => {
|
|
84
84
|
e.removeEventListener("loadedmetadata", t), e.removeEventListener("ended", n);
|
|
85
85
|
};
|
|
86
86
|
}, [l, v]);
|
|
87
|
-
const
|
|
87
|
+
const Q = (e) => {
|
|
88
88
|
for (let t = D.length - 1; t >= 0; t--) {
|
|
89
|
-
const n =
|
|
89
|
+
const n = ie(D[t].time);
|
|
90
90
|
if (e >= n)
|
|
91
91
|
return t;
|
|
92
92
|
}
|
|
@@ -94,101 +94,101 @@ const Ke = Ee(function({
|
|
|
94
94
|
}, b = (e) => {
|
|
95
95
|
const n = Math.max(0, Math.min(e, H || 156));
|
|
96
96
|
if (l) {
|
|
97
|
-
const
|
|
98
|
-
|
|
97
|
+
const r = u.current;
|
|
98
|
+
r && (r.currentTime = n), Z(n);
|
|
99
99
|
} else
|
|
100
|
-
s &&
|
|
101
|
-
|
|
102
|
-
},
|
|
100
|
+
s && B && B(n);
|
|
101
|
+
ye(n), M(Q(n));
|
|
102
|
+
}, Fe = () => {
|
|
103
103
|
if (l) {
|
|
104
|
-
const e =
|
|
104
|
+
const e = u.current;
|
|
105
105
|
if (!e)
|
|
106
106
|
return;
|
|
107
|
-
|
|
107
|
+
V ? (e.pause(), v(), m(!1)) : e.play().then(() => {
|
|
108
108
|
m(!0), A();
|
|
109
109
|
}).catch(() => {
|
|
110
110
|
});
|
|
111
111
|
} else
|
|
112
|
-
s &&
|
|
112
|
+
s && S ? S() : I((e) => !e);
|
|
113
|
+
}, Se = () => {
|
|
114
|
+
s && j ? j() : b(Math.max(0, (l ? W : w ?? 0) - 10));
|
|
113
115
|
}, we = () => {
|
|
114
|
-
s && L ? L() : b(Math.
|
|
115
|
-
}, Ie = () => {
|
|
116
|
-
s && _ ? _() : b(Math.min(H || 156, (l ? W : I ?? 0) + 10));
|
|
117
|
-
}, Ce = (e) => {
|
|
116
|
+
s && L ? L() : b(Math.min(H || 156, (l ? W : w ?? 0) + 10));
|
|
117
|
+
}, Ie = (e) => {
|
|
118
118
|
if (l) {
|
|
119
|
-
const t =
|
|
120
|
-
t && (t.playbackRate = e),
|
|
119
|
+
const t = u.current;
|
|
120
|
+
t && (t.playbackRate = e), pe(e);
|
|
121
121
|
} else
|
|
122
|
-
s &&
|
|
123
|
-
|
|
122
|
+
s && _ && _(e);
|
|
123
|
+
ve(e), J(!1);
|
|
124
124
|
};
|
|
125
125
|
We(ue, () => ({
|
|
126
126
|
seekTo: (e) => {
|
|
127
127
|
if (b(e), s)
|
|
128
|
-
|
|
128
|
+
!$ && S && S();
|
|
129
129
|
else if (l) {
|
|
130
|
-
const n =
|
|
130
|
+
const n = u.current;
|
|
131
131
|
n && n.play().then(() => {
|
|
132
132
|
m(!0), A();
|
|
133
133
|
}).catch(() => {
|
|
134
134
|
});
|
|
135
135
|
} else
|
|
136
|
-
|
|
137
|
-
const t =
|
|
136
|
+
I(!0);
|
|
137
|
+
const t = Q(e);
|
|
138
138
|
M(t), setTimeout(() => {
|
|
139
|
-
var
|
|
140
|
-
const n = (
|
|
139
|
+
var r;
|
|
140
|
+
const n = (r = K.current) == null ? void 0 : r.children;
|
|
141
141
|
n != null && n[t] && n[t].scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
142
142
|
}, 50);
|
|
143
143
|
}
|
|
144
144
|
}));
|
|
145
|
-
const
|
|
145
|
+
const Ce = (e) => {
|
|
146
146
|
var t;
|
|
147
|
-
if (
|
|
147
|
+
if (N === e && F) {
|
|
148
148
|
if (l) {
|
|
149
|
-
const n =
|
|
149
|
+
const n = u.current;
|
|
150
150
|
n && n.pause(), v(), m(!1);
|
|
151
151
|
}
|
|
152
|
-
|
|
152
|
+
I(!1);
|
|
153
153
|
} else {
|
|
154
|
-
const n =
|
|
154
|
+
const n = ie((t = D[e]) == null ? void 0 : t.time);
|
|
155
155
|
if (M(e), b(n), l) {
|
|
156
|
-
const
|
|
157
|
-
|
|
156
|
+
const r = u.current;
|
|
157
|
+
r && (r.currentTime = n, r.play().then(() => {
|
|
158
158
|
m(!0), A();
|
|
159
159
|
}).catch(() => {
|
|
160
160
|
}));
|
|
161
161
|
}
|
|
162
|
-
|
|
162
|
+
I(!0);
|
|
163
163
|
}
|
|
164
|
-
},
|
|
164
|
+
}, De = (e, t) => {
|
|
165
165
|
if (e == null)
|
|
166
166
|
return;
|
|
167
|
-
const n = (
|
|
168
|
-
const a = Math.floor(
|
|
167
|
+
const n = (r) => {
|
|
168
|
+
const a = Math.floor(r / 6e4), c = Math.floor(r % 6e4 / 1e3);
|
|
169
169
|
return `${a.toString().padStart(2, "0")}:${c.toString().padStart(2, "0")}`;
|
|
170
170
|
};
|
|
171
171
|
return `${n(e)}–${t != null ? n(t) : n(e)}`;
|
|
172
|
-
},
|
|
173
|
-
var n,
|
|
172
|
+
}, O = (ee = y == null ? void 0 : y.messages) != null && ee.length ? y.messages.map((e, t) => {
|
|
173
|
+
var n, r;
|
|
174
174
|
return {
|
|
175
|
-
actor: e.actor === "agent" ? ((n = y.actor_map) == null ? void 0 : n.agent) || "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",
|
|
176
176
|
actorType: e.actor === "agent" ? "agent" : "customer",
|
|
177
177
|
text: e.text || "",
|
|
178
|
-
timeRange:
|
|
179
|
-
isHighlighted:
|
|
180
|
-
highlightColor: F &&
|
|
181
|
-
observations: (
|
|
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
182
|
...a,
|
|
183
183
|
onClick: () => {
|
|
184
|
-
|
|
184
|
+
G == null || G((c) => /* @__PURE__ */ new Set([...c, a.signalKey])), setTimeout(() => {
|
|
185
185
|
const c = document.getElementById(`signal-${a.signalKey}`);
|
|
186
186
|
c && c.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
187
187
|
}, 100);
|
|
188
188
|
}
|
|
189
189
|
}))
|
|
190
190
|
};
|
|
191
|
-
}) : null,
|
|
191
|
+
}) : null, U = x ? w ?? 0 : xe, h = H || 156, C = h > 0 ? U / h * 100 : 0, Re = Math.round(U);
|
|
192
192
|
return /* @__PURE__ */ i("div", { style: {
|
|
193
193
|
display: "flex",
|
|
194
194
|
flexDirection: "column",
|
|
@@ -200,7 +200,7 @@ const Ke = Ee(function({
|
|
|
200
200
|
gap: 16,
|
|
201
201
|
width: "100%"
|
|
202
202
|
}, children: [
|
|
203
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ o("div", { style: {
|
|
204
204
|
display: "flex",
|
|
205
205
|
alignItems: "center",
|
|
206
206
|
justifyContent: "center",
|
|
@@ -209,8 +209,8 @@ const Ke = Ee(function({
|
|
|
209
209
|
borderRadius: 9999,
|
|
210
210
|
background: "var(--surface-hover, #F3F7F7)",
|
|
211
211
|
flexShrink: 0
|
|
212
|
-
}, children: /* @__PURE__ */
|
|
213
|
-
/* @__PURE__ */
|
|
212
|
+
}, children: /* @__PURE__ */ o(Me, { size: 20, color: "#2E3236", strokeWidth: 1.5 }) }),
|
|
213
|
+
/* @__PURE__ */ o("span", { style: {
|
|
214
214
|
fontSize: 15,
|
|
215
215
|
fontWeight: 500,
|
|
216
216
|
color: "var(--Grey-Strong, #2E3236)"
|
|
@@ -236,12 +236,12 @@ const Ke = Ee(function({
|
|
|
236
236
|
}, children: [
|
|
237
237
|
T,
|
|
238
238
|
" / ",
|
|
239
|
-
|
|
239
|
+
E
|
|
240
240
|
] }),
|
|
241
241
|
/* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 12 }, children: [
|
|
242
|
-
/* @__PURE__ */
|
|
243
|
-
/* @__PURE__ */
|
|
244
|
-
/* @__PURE__ */
|
|
242
|
+
/* @__PURE__ */ o("span", { style: { fontSize: 13, fontWeight: 400, color: "var(--Grey-Muted, #808183)", lineHeight: 1.2 }, children: "10" }),
|
|
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: {
|
|
245
245
|
background: "var(--Grey-Strong, #2E3236)",
|
|
246
246
|
border: "none",
|
|
247
247
|
cursor: "pointer",
|
|
@@ -252,15 +252,15 @@ const Ke = Ee(function({
|
|
|
252
252
|
display: "flex",
|
|
253
253
|
alignItems: "center",
|
|
254
254
|
justifyContent: "center"
|
|
255
|
-
}, children: F ? /* @__PURE__ */
|
|
256
|
-
/* @__PURE__ */
|
|
257
|
-
/* @__PURE__ */
|
|
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 }) }),
|
|
257
|
+
/* @__PURE__ */ o("span", { style: { fontSize: 13, fontWeight: 400, color: "var(--Grey-Muted, #808183)", lineHeight: 1.2 }, children: "10" })
|
|
258
258
|
] }),
|
|
259
259
|
/* @__PURE__ */ i("div", { style: { position: "relative" }, children: [
|
|
260
260
|
/* @__PURE__ */ i(
|
|
261
261
|
"button",
|
|
262
262
|
{
|
|
263
|
-
onClick: () =>
|
|
263
|
+
onClick: () => J((e) => !e),
|
|
264
264
|
style: {
|
|
265
265
|
background: "var(--Grey-White, #FFF)",
|
|
266
266
|
border: "1px solid var(--Grey-absent, #D9D9D9)",
|
|
@@ -282,11 +282,11 @@ const Ke = Ee(function({
|
|
|
282
282
|
children: [
|
|
283
283
|
z,
|
|
284
284
|
"x",
|
|
285
|
-
/* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ o($e, { size: 12, color: "#808183" })
|
|
286
286
|
]
|
|
287
287
|
}
|
|
288
288
|
),
|
|
289
|
-
|
|
289
|
+
ke && /* @__PURE__ */ o("div", { style: {
|
|
290
290
|
position: "absolute",
|
|
291
291
|
top: "100%",
|
|
292
292
|
right: 0,
|
|
@@ -301,7 +301,7 @@ const Ke = Ee(function({
|
|
|
301
301
|
}, children: _e.map((e) => /* @__PURE__ */ i(
|
|
302
302
|
"button",
|
|
303
303
|
{
|
|
304
|
-
onClick: () =>
|
|
304
|
+
onClick: () => Ie(e),
|
|
305
305
|
style: {
|
|
306
306
|
display: "block",
|
|
307
307
|
width: "100%",
|
|
@@ -326,20 +326,20 @@ const Ke = Ee(function({
|
|
|
326
326
|
] }),
|
|
327
327
|
/* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [
|
|
328
328
|
/* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
329
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ o("span", { style: {
|
|
330
330
|
fontSize: 13,
|
|
331
|
-
fontWeight:
|
|
332
|
-
color:
|
|
331
|
+
fontWeight: 500,
|
|
332
|
+
color: "var(--Grey-Strong, #2E3236)",
|
|
333
333
|
fontFamily: "var(--font-sans)",
|
|
334
334
|
lineHeight: 1.2,
|
|
335
335
|
minWidth: 60
|
|
336
|
-
}, children:
|
|
336
|
+
}, children: re(h) }),
|
|
337
337
|
/* @__PURE__ */ i(
|
|
338
338
|
"div",
|
|
339
339
|
{
|
|
340
340
|
onClick: (e) => {
|
|
341
|
-
const t = e.currentTarget.getBoundingClientRect(), n = e.clientX - t.left,
|
|
342
|
-
b(
|
|
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);
|
|
343
343
|
},
|
|
344
344
|
style: {
|
|
345
345
|
flex: 1,
|
|
@@ -350,7 +350,7 @@ const Ke = Ee(function({
|
|
|
350
350
|
cursor: "pointer"
|
|
351
351
|
},
|
|
352
352
|
children: [
|
|
353
|
-
/* @__PURE__ */
|
|
353
|
+
/* @__PURE__ */ o("div", { style: {
|
|
354
354
|
position: "absolute",
|
|
355
355
|
left: 0,
|
|
356
356
|
right: 0,
|
|
@@ -359,18 +359,18 @@ const Ke = Ee(function({
|
|
|
359
359
|
background: "var(--rail-surface-2, #E3E1D7)",
|
|
360
360
|
pointerEvents: "none"
|
|
361
361
|
} }),
|
|
362
|
-
/* @__PURE__ */
|
|
362
|
+
/* @__PURE__ */ o("div", { style: {
|
|
363
363
|
position: "absolute",
|
|
364
364
|
left: 0,
|
|
365
365
|
top: "50%",
|
|
366
366
|
transform: "translateY(-50%)",
|
|
367
|
-
width: `${
|
|
367
|
+
width: `${C}%`,
|
|
368
368
|
height: 4,
|
|
369
369
|
borderRadius: 2,
|
|
370
370
|
background: "var(--Green-Primary, #00925F)",
|
|
371
371
|
pointerEvents: "none"
|
|
372
372
|
} }),
|
|
373
|
-
/* @__PURE__ */
|
|
373
|
+
/* @__PURE__ */ o(
|
|
374
374
|
"svg",
|
|
375
375
|
{
|
|
376
376
|
width: "16",
|
|
@@ -380,12 +380,12 @@ const Ke = Ee(function({
|
|
|
380
380
|
xmlns: "http://www.w3.org/2000/svg",
|
|
381
381
|
style: {
|
|
382
382
|
position: "absolute",
|
|
383
|
-
left: `${
|
|
383
|
+
left: `${C}%`,
|
|
384
384
|
top: "50%",
|
|
385
385
|
transform: "translate(-50%, -50%)",
|
|
386
386
|
pointerEvents: "none"
|
|
387
387
|
},
|
|
388
|
-
children: /* @__PURE__ */
|
|
388
|
+
children: /* @__PURE__ */ o(
|
|
389
389
|
"path",
|
|
390
390
|
{
|
|
391
391
|
d: "M7.875 1C11.6572 1 14.75 4.1191 14.75 8C14.75 11.8809 11.6572 15 7.875 15C4.09284 15 1 11.8809 1 8C1 4.1191 4.09284 1 7.875 1Z",
|
|
@@ -395,26 +395,16 @@ const Ke = Ee(function({
|
|
|
395
395
|
}
|
|
396
396
|
)
|
|
397
397
|
}
|
|
398
|
-
)
|
|
399
|
-
/* @__PURE__ */ r("span", { style: {
|
|
400
|
-
position: "absolute",
|
|
401
|
-
right: -48,
|
|
402
|
-
fontSize: 13,
|
|
403
|
-
fontWeight: 400,
|
|
404
|
-
color: "var(--Grey-Muted, #808183)",
|
|
405
|
-
fontFamily: "var(--font-sans)",
|
|
406
|
-
lineHeight: 1.2,
|
|
407
|
-
whiteSpace: "nowrap"
|
|
408
|
-
}, children: $(u) })
|
|
398
|
+
)
|
|
409
399
|
]
|
|
410
400
|
}
|
|
411
401
|
)
|
|
412
402
|
] }),
|
|
413
403
|
/* @__PURE__ */ i("div", { style: { position: "relative", paddingBottom: 30, cursor: "pointer" }, children: [
|
|
414
|
-
[T,
|
|
415
|
-
const n = t === 0,
|
|
416
|
-
start:
|
|
417
|
-
end:
|
|
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
|
|
418
408
|
})) : Le[n ? "Agent" : "Customer"] || [];
|
|
419
409
|
return /* @__PURE__ */ i("div", { style: {
|
|
420
410
|
display: "flex",
|
|
@@ -423,7 +413,7 @@ const Ke = Ee(function({
|
|
|
423
413
|
height: 20,
|
|
424
414
|
marginBottom: t === 0 ? 4 : 0
|
|
425
415
|
}, children: [
|
|
426
|
-
/* @__PURE__ */
|
|
416
|
+
/* @__PURE__ */ o("span", { style: {
|
|
427
417
|
fontSize: 13,
|
|
428
418
|
fontWeight: 400,
|
|
429
419
|
color: "var(--Grey-Muted, #808183)",
|
|
@@ -436,7 +426,7 @@ const Ke = Ee(function({
|
|
|
436
426
|
{
|
|
437
427
|
onClick: (a) => {
|
|
438
428
|
const c = a.currentTarget.getBoundingClientRect(), Te = Math.max(0, Math.min(1, (a.clientX - c.left) / c.width));
|
|
439
|
-
b(Te *
|
|
429
|
+
b(Te * h);
|
|
440
430
|
},
|
|
441
431
|
style: {
|
|
442
432
|
flex: 1,
|
|
@@ -446,7 +436,7 @@ const Ke = Ee(function({
|
|
|
446
436
|
cursor: "pointer"
|
|
447
437
|
},
|
|
448
438
|
children: [
|
|
449
|
-
/* @__PURE__ */
|
|
439
|
+
/* @__PURE__ */ o("div", { style: {
|
|
450
440
|
position: "absolute",
|
|
451
441
|
left: 0,
|
|
452
442
|
right: 0,
|
|
@@ -456,7 +446,7 @@ const Ke = Ee(function({
|
|
|
456
446
|
borderRadius: 2,
|
|
457
447
|
background: "var(--rail-surface-2, #E3E1D7)"
|
|
458
448
|
} }),
|
|
459
|
-
|
|
449
|
+
r.map((a, c) => /* @__PURE__ */ o("div", { style: {
|
|
460
450
|
position: "absolute",
|
|
461
451
|
left: `${a.start * 100}%`,
|
|
462
452
|
width: `${(a.end - a.start) * 100}%`,
|
|
@@ -479,18 +469,18 @@ const Ke = Ee(function({
|
|
|
479
469
|
bottom: 0,
|
|
480
470
|
pointerEvents: "none"
|
|
481
471
|
}, children: [
|
|
482
|
-
/* @__PURE__ */
|
|
472
|
+
/* @__PURE__ */ o("div", { style: {
|
|
483
473
|
position: "absolute",
|
|
484
|
-
left: `${
|
|
474
|
+
left: `${C}%`,
|
|
485
475
|
top: 0,
|
|
486
476
|
height: 44,
|
|
487
477
|
transform: "translateX(-50%)",
|
|
488
478
|
borderLeft: "1.5px dashed var(--Grey-Muted, #808183)",
|
|
489
479
|
opacity: 0.5
|
|
490
480
|
} }),
|
|
491
|
-
/* @__PURE__ */
|
|
481
|
+
/* @__PURE__ */ o("div", { style: {
|
|
492
482
|
position: "absolute",
|
|
493
|
-
left: `${
|
|
483
|
+
left: `${C}%`,
|
|
494
484
|
bottom: 0,
|
|
495
485
|
transform: "translateX(-50%)",
|
|
496
486
|
background: "var(--Grey-Strong, #2E3236)",
|
|
@@ -501,11 +491,11 @@ const Ke = Ee(function({
|
|
|
501
491
|
padding: "4px 6px",
|
|
502
492
|
borderRadius: 4,
|
|
503
493
|
whiteSpace: "nowrap"
|
|
504
|
-
}, children:
|
|
494
|
+
}, children: re(Re) })
|
|
505
495
|
] })
|
|
506
496
|
] }),
|
|
507
|
-
l && /* @__PURE__ */
|
|
508
|
-
s && d && /* @__PURE__ */
|
|
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" }) })
|
|
509
499
|
] })
|
|
510
500
|
] }),
|
|
511
501
|
/* @__PURE__ */ i("div", { style: {
|
|
@@ -514,27 +504,27 @@ const Ke = Ee(function({
|
|
|
514
504
|
flexDirection: "column",
|
|
515
505
|
gap: 16
|
|
516
506
|
}, children: [
|
|
517
|
-
/* @__PURE__ */
|
|
507
|
+
/* @__PURE__ */ o("div", { style: {
|
|
518
508
|
borderBottom: "1px solid var(--Grey-absent, #D9D9D9)",
|
|
519
509
|
paddingBottom: 16
|
|
520
|
-
}, children: /* @__PURE__ */
|
|
510
|
+
}, children: /* @__PURE__ */ o("span", { style: {
|
|
521
511
|
fontSize: 14,
|
|
522
512
|
fontWeight: 400,
|
|
523
513
|
color: "var(--Grey-Strong, #2E3236)",
|
|
524
514
|
lineHeight: 1.2
|
|
525
515
|
}, children: "Transcript" }) }),
|
|
526
|
-
/* @__PURE__ */
|
|
516
|
+
/* @__PURE__ */ o("div", { id: "transcript-container", ref: K, style: {
|
|
527
517
|
display: "flex",
|
|
528
518
|
flexDirection: "column",
|
|
529
519
|
maxHeight: 600,
|
|
530
520
|
overflowY: "auto"
|
|
531
|
-
}, children: (
|
|
521
|
+
}, children: (O || D.map((e) => ({
|
|
532
522
|
actor: e.speaker,
|
|
533
523
|
actorType: e.type,
|
|
534
524
|
text: e.text,
|
|
535
525
|
timeRange: e.time
|
|
536
526
|
}))).map((e, t) => {
|
|
537
|
-
const n = !!
|
|
527
|
+
const n = !!O, r = n ? F && Y === t : t === N && F, a = (e.actorType || e.type) === "customer";
|
|
538
528
|
return /* @__PURE__ */ i("div", { style: {
|
|
539
529
|
display: "flex",
|
|
540
530
|
padding: 16,
|
|
@@ -543,7 +533,7 @@ const Ke = Ee(function({
|
|
|
543
533
|
gap: 16,
|
|
544
534
|
alignSelf: "stretch",
|
|
545
535
|
borderTop: t > 0 ? "1px solid var(--Grey-absent, #D9D9D9)" : "none",
|
|
546
|
-
background:
|
|
536
|
+
background: r ? "var(--surface-hover, #F3F7F7)" : "var(--Grey-White, #FFF)"
|
|
547
537
|
}, children: [
|
|
548
538
|
/* @__PURE__ */ i("div", { style: {
|
|
549
539
|
display: "flex",
|
|
@@ -552,18 +542,18 @@ const Ke = Ee(function({
|
|
|
552
542
|
width: "100%",
|
|
553
543
|
gap: 8
|
|
554
544
|
}, children: [
|
|
555
|
-
/* @__PURE__ */
|
|
545
|
+
/* @__PURE__ */ o("span", { style: {
|
|
556
546
|
fontSize: 14,
|
|
557
547
|
fontWeight: 600,
|
|
558
548
|
lineHeight: 1.2,
|
|
559
549
|
color: a ? "var(--Grey-Strong, #2E3236)" : "var(--Grey-Muted, #808183)"
|
|
560
550
|
}, children: e.actor }),
|
|
561
551
|
/* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
562
|
-
|
|
563
|
-
/* @__PURE__ */
|
|
564
|
-
/* @__PURE__ */
|
|
552
|
+
r && /* @__PURE__ */ i(Ee, { children: [
|
|
553
|
+
/* @__PURE__ */ o(oe, { size: 12, color: "#2E3236" }),
|
|
554
|
+
/* @__PURE__ */ o(oe, { size: 12, color: "#2E3236" })
|
|
565
555
|
] }),
|
|
566
|
-
/* @__PURE__ */
|
|
556
|
+
/* @__PURE__ */ o("span", { style: {
|
|
567
557
|
fontSize: 13,
|
|
568
558
|
fontWeight: 400,
|
|
569
559
|
lineHeight: 1.2,
|
|
@@ -572,11 +562,11 @@ const Ke = Ee(function({
|
|
|
572
562
|
] })
|
|
573
563
|
] }),
|
|
574
564
|
/* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "flex-start", gap: 8, width: "100%" }, children: [
|
|
575
|
-
/* @__PURE__ */
|
|
565
|
+
/* @__PURE__ */ o(
|
|
576
566
|
"button",
|
|
577
567
|
{
|
|
578
568
|
onClick: () => {
|
|
579
|
-
n &&
|
|
569
|
+
n && q ? q(e, t) : Ce(t);
|
|
580
570
|
},
|
|
581
571
|
style: {
|
|
582
572
|
background: "none",
|
|
@@ -586,10 +576,10 @@ const Ke = Ee(function({
|
|
|
586
576
|
flexShrink: 0,
|
|
587
577
|
display: "flex"
|
|
588
578
|
},
|
|
589
|
-
children:
|
|
579
|
+
children: r ? /* @__PURE__ */ o(Be, { size: 17, color: "#2E3236", strokeWidth: 1.5 }) : /* @__PURE__ */ o(je, { size: 17, color: "#808183", strokeWidth: 1 })
|
|
590
580
|
}
|
|
591
581
|
),
|
|
592
|
-
/* @__PURE__ */
|
|
582
|
+
/* @__PURE__ */ o("p", { style: {
|
|
593
583
|
fontSize: 13,
|
|
594
584
|
fontWeight: 400,
|
|
595
585
|
color: "var(--Grey-Strong, #2E3236)",
|