@livelayer/react 0.17.1 → 0.18.1
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/index.js +3 -3
- package/dist/index.mjs +711 -707
- package/dist/styles.css +10 -22
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as x, jsx as n, Fragment as ze } from "react/jsx-runtime";
|
|
3
|
-
import { Component as
|
|
3
|
+
import { Component as Yn, useState as N, useRef as M, useEffect as T, useCallback as E, useMemo as Qe, useLayoutEffect as Ln, forwardRef as Pt, useImperativeHandle as Gn, createElement as Kn } from "react";
|
|
4
4
|
import { createPortal as $t } from "react-dom";
|
|
5
|
-
import { LiveKitSession as
|
|
6
|
-
import { clearFieldRegistry as
|
|
7
|
-
import { createLocalAudioTrack as
|
|
8
|
-
class
|
|
5
|
+
import { LiveKitSession as Jn, registerFields as Xn } from "@livelayer/sdk";
|
|
6
|
+
import { clearFieldRegistry as Wo, getRegisteredFields as qo, registerFields as Uo, setFieldValue as jo } from "@livelayer/sdk";
|
|
7
|
+
import { createLocalAudioTrack as Zn, Track as kn, createLocalVideoTrack as Qn } from "livekit-client";
|
|
8
|
+
class er extends Yn {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments), this.state = { hasError: !1, error: null }, this.reset = () => {
|
|
11
11
|
this.setState({ hasError: !1, error: null });
|
|
@@ -35,26 +35,26 @@ class Qn extends Vn {
|
|
|
35
35
|
] }) : this.props.children;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
const [t, r] = N("idle"), [o, a] = N("idle"), [i, s] = N([]), [l, c] = N(null), [p, w] = N(null), [m, f] = N(null), [R, _] = N(!1), [
|
|
38
|
+
function tr(e) {
|
|
39
|
+
const [t, r] = N("idle"), [o, a] = N("idle"), [i, s] = N([]), [l, c] = N(null), [p, w] = N(null), [m, f] = N(null), [R, _] = N(!1), [g, u] = N(null), h = M(null), L = M(e.onDataMessage);
|
|
40
40
|
L.current = e.onDataMessage, T(() => {
|
|
41
41
|
const b = {
|
|
42
|
-
onConnectionStateChange: (
|
|
43
|
-
r(
|
|
42
|
+
onConnectionStateChange: (B) => {
|
|
43
|
+
r(B), B === "connected" && u(null);
|
|
44
44
|
},
|
|
45
45
|
onAgentStateChange: a,
|
|
46
|
-
onTranscript: (
|
|
46
|
+
onTranscript: (B) => s([...B]),
|
|
47
47
|
onAgentConfig: c,
|
|
48
|
-
onAudioTrack: (
|
|
49
|
-
onVideoTrack: (
|
|
48
|
+
onAudioTrack: (B) => f(B),
|
|
49
|
+
onVideoTrack: (B) => w(B),
|
|
50
50
|
onVideoTrackRemoved: () => w(null),
|
|
51
|
-
onError: (
|
|
52
|
-
onDataMessage: (
|
|
51
|
+
onError: (B) => u(B),
|
|
52
|
+
onDataMessage: (B) => {
|
|
53
53
|
var q;
|
|
54
|
-
(q = L.current) == null || q.call(L,
|
|
54
|
+
(q = L.current) == null || q.call(L, B);
|
|
55
55
|
},
|
|
56
56
|
onResumabilityChange: _
|
|
57
|
-
}, P = new
|
|
57
|
+
}, P = new Jn(
|
|
58
58
|
{
|
|
59
59
|
agentId: e.agentId,
|
|
60
60
|
baseUrl: e.baseUrl,
|
|
@@ -65,8 +65,8 @@ function er(e) {
|
|
|
65
65
|
b
|
|
66
66
|
);
|
|
67
67
|
return h.current = P, r("idle"), a("idle"), s([]), c(null), w(null), f(null), _(!1), u(null), () => {
|
|
68
|
-
var
|
|
69
|
-
(
|
|
68
|
+
var B;
|
|
69
|
+
(B = P.destroy) == null || B.call(P), h.current = null;
|
|
70
70
|
};
|
|
71
71
|
}, [
|
|
72
72
|
e.agentId,
|
|
@@ -98,31 +98,31 @@ function er(e) {
|
|
|
98
98
|
videoElement: p,
|
|
99
99
|
audioElement: m,
|
|
100
100
|
canResume: R,
|
|
101
|
-
error:
|
|
101
|
+
error: g,
|
|
102
102
|
connect: A,
|
|
103
103
|
disconnect: I,
|
|
104
104
|
getRoom: U,
|
|
105
105
|
session: h.current
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function nr() {
|
|
109
109
|
const e = M(null), t = M(/* @__PURE__ */ new Map()), r = M(null), o = M(/* @__PURE__ */ new Set()), a = E(() => {
|
|
110
110
|
const _ = t.current;
|
|
111
111
|
if (_.size === 0) {
|
|
112
112
|
r.current = null;
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
115
|
-
let
|
|
115
|
+
let g = 0;
|
|
116
116
|
for (const { analyser: u, buffer: h } of _.values()) {
|
|
117
117
|
u.getByteFrequencyData(h);
|
|
118
118
|
let L = 0;
|
|
119
119
|
for (let I = 0; I < h.length; I++) L += h[I];
|
|
120
120
|
const A = L / h.length / 255;
|
|
121
|
-
A >
|
|
121
|
+
A > g && (g = A);
|
|
122
122
|
}
|
|
123
123
|
for (const u of o.current)
|
|
124
124
|
try {
|
|
125
|
-
u(
|
|
125
|
+
u(g);
|
|
126
126
|
} catch (h) {
|
|
127
127
|
console.error("[useAudioLevel] subscriber threw:", h);
|
|
128
128
|
}
|
|
@@ -130,24 +130,24 @@ function tr() {
|
|
|
130
130
|
}, []), i = E(() => e.current ? e.current : typeof window > "u" || typeof AudioContext > "u" ? null : (e.current = new AudioContext(), e.current), []), s = E(() => {
|
|
131
131
|
r.current === null && t.current.size > 0 && (r.current = requestAnimationFrame(a));
|
|
132
132
|
}, [a]), l = E((_) => {
|
|
133
|
-
const
|
|
134
|
-
if (
|
|
133
|
+
const g = t.current.get(_);
|
|
134
|
+
if (g) {
|
|
135
135
|
try {
|
|
136
|
-
|
|
136
|
+
g.node.disconnect();
|
|
137
137
|
} catch {
|
|
138
138
|
}
|
|
139
139
|
try {
|
|
140
|
-
|
|
140
|
+
g.analyser.disconnect();
|
|
141
141
|
} catch {
|
|
142
142
|
}
|
|
143
143
|
t.current.delete(_);
|
|
144
144
|
}
|
|
145
145
|
}, []), c = E(
|
|
146
|
-
(_,
|
|
146
|
+
(_, g) => {
|
|
147
147
|
const u = i();
|
|
148
148
|
if (!u) return;
|
|
149
149
|
l(_);
|
|
150
|
-
const h =
|
|
150
|
+
const h = g(u);
|
|
151
151
|
if (!h) return;
|
|
152
152
|
const L = u.createAnalyser();
|
|
153
153
|
L.fftSize = 64;
|
|
@@ -165,14 +165,14 @@ function tr() {
|
|
|
165
165
|
},
|
|
166
166
|
[l, i, s]
|
|
167
167
|
), p = E(
|
|
168
|
-
(_,
|
|
169
|
-
c(
|
|
168
|
+
(_, g = "agent") => {
|
|
169
|
+
c(g, (u) => {
|
|
170
170
|
try {
|
|
171
171
|
return u.createMediaElementSource(_);
|
|
172
172
|
} catch (h) {
|
|
173
173
|
return console.warn(
|
|
174
174
|
"[useAudioLevel] createMediaElementSource failed for slot",
|
|
175
|
-
|
|
175
|
+
g,
|
|
176
176
|
h
|
|
177
177
|
), null;
|
|
178
178
|
}
|
|
@@ -180,14 +180,14 @@ function tr() {
|
|
|
180
180
|
},
|
|
181
181
|
[c]
|
|
182
182
|
), w = E(
|
|
183
|
-
(_,
|
|
184
|
-
c(
|
|
183
|
+
(_, g = "mic") => {
|
|
184
|
+
c(g, (u) => {
|
|
185
185
|
try {
|
|
186
186
|
return u.createMediaStreamSource(_);
|
|
187
187
|
} catch (h) {
|
|
188
188
|
return console.warn(
|
|
189
189
|
"[useAudioLevel] createMediaStreamSource failed for slot",
|
|
190
|
-
|
|
190
|
+
g,
|
|
191
191
|
h
|
|
192
192
|
), null;
|
|
193
193
|
}
|
|
@@ -217,12 +217,12 @@ function tr() {
|
|
|
217
217
|
o.current.clear();
|
|
218
218
|
}, [f]), { attach: p, attachStream: w, detach: f, detachSlot: m, subscribe: R };
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function rr(e) {
|
|
221
221
|
const t = e == null ? void 0 : e.mediaStreamTrack;
|
|
222
222
|
return t ? new MediaStream([t]) : null;
|
|
223
223
|
}
|
|
224
|
-
function
|
|
225
|
-
const [e, t] = N(!1), [r, o] = N(""), [a, i] = N(null), s = M(null), l = M(null), c = E(async (
|
|
224
|
+
function or() {
|
|
225
|
+
const [e, t] = N(!1), [r, o] = N(""), [a, i] = N(null), s = M(null), l = M(null), c = E(async (g) => {
|
|
226
226
|
var u, h;
|
|
227
227
|
if (s.current && l.current) {
|
|
228
228
|
try {
|
|
@@ -231,48 +231,48 @@ function rr() {
|
|
|
231
231
|
}
|
|
232
232
|
s.current.stop(), s.current = null;
|
|
233
233
|
}
|
|
234
|
-
l.current =
|
|
234
|
+
l.current = g, i(null);
|
|
235
235
|
try {
|
|
236
|
-
const L = await
|
|
236
|
+
const L = await Zn({
|
|
237
237
|
echoCancellation: !0,
|
|
238
238
|
noiseSuppression: !0
|
|
239
239
|
});
|
|
240
|
-
await
|
|
240
|
+
await g.localParticipant.publishTrack(L), s.current = L, t(L.isMuted);
|
|
241
241
|
const A = (h = (u = L.mediaStreamTrack) == null ? void 0 : u.getSettings) == null ? void 0 : h.call(u);
|
|
242
242
|
A != null && A.deviceId && o(A.deviceId);
|
|
243
243
|
} catch (L) {
|
|
244
244
|
const A = L instanceof Error && L.name === "NotAllowedError" ? "Enable your microphone to talk with the agent." : "Microphone unavailable. Check browser permissions and try again.";
|
|
245
245
|
throw i(A), L;
|
|
246
246
|
}
|
|
247
|
-
}, []), p = E((
|
|
248
|
-
l.current =
|
|
249
|
-
}, []), w = E(async (
|
|
247
|
+
}, []), p = E((g) => {
|
|
248
|
+
l.current = g;
|
|
249
|
+
}, []), w = E(async (g) => {
|
|
250
250
|
const u = l.current;
|
|
251
251
|
if (u)
|
|
252
252
|
try {
|
|
253
|
-
await u.switchActiveDevice("audioinput",
|
|
253
|
+
await u.switchActiveDevice("audioinput", g), o(g);
|
|
254
254
|
} catch (h) {
|
|
255
255
|
console.warn("[useMicrophoneState] switchDevice failed:", h);
|
|
256
256
|
}
|
|
257
257
|
}, []), m = E(async () => {
|
|
258
|
-
const
|
|
259
|
-
if (t(u), !!
|
|
258
|
+
const g = l.current, u = !e;
|
|
259
|
+
if (t(u), !!g)
|
|
260
260
|
try {
|
|
261
|
-
await
|
|
261
|
+
await g.localParticipant.setMicrophoneEnabled(!u);
|
|
262
262
|
} catch (h) {
|
|
263
263
|
console.warn("[useMicrophoneState] setMicrophoneEnabled failed:", h), t(!u);
|
|
264
264
|
}
|
|
265
265
|
}, [e]), f = E(() => {
|
|
266
|
-
const
|
|
267
|
-
if (
|
|
266
|
+
const g = s.current, u = l.current;
|
|
267
|
+
if (g && u) {
|
|
268
268
|
try {
|
|
269
|
-
u.localParticipant.unpublishTrack(
|
|
269
|
+
u.localParticipant.unpublishTrack(g);
|
|
270
270
|
} catch {
|
|
271
271
|
}
|
|
272
|
-
|
|
272
|
+
g.stop();
|
|
273
273
|
}
|
|
274
274
|
s.current = null, l.current = null, t(!1), o("");
|
|
275
|
-
}, []), R = E(() => i(null), []), _ = E(() =>
|
|
275
|
+
}, []), R = E(() => i(null), []), _ = E(() => rr(s.current), []);
|
|
276
276
|
return {
|
|
277
277
|
isMuted: e,
|
|
278
278
|
activeDeviceId: r,
|
|
@@ -286,8 +286,8 @@ function rr() {
|
|
|
286
286
|
getMicStream: _
|
|
287
287
|
};
|
|
288
288
|
}
|
|
289
|
-
const
|
|
290
|
-
function
|
|
289
|
+
const ir = { resolution: { width: 640, height: 480, frameRate: 24 } };
|
|
290
|
+
function lr() {
|
|
291
291
|
const [e, t] = N(!1), [r, o] = N(null), [a, i] = N(null), [s, l] = N(""), c = M(null), p = M(null), w = E((h) => {
|
|
292
292
|
c.current = h;
|
|
293
293
|
}, []), m = E(() => {
|
|
@@ -310,9 +310,9 @@ function ir() {
|
|
|
310
310
|
if (L) {
|
|
311
311
|
o(null);
|
|
312
312
|
try {
|
|
313
|
-
const A = { ...
|
|
313
|
+
const A = { ...ir };
|
|
314
314
|
h && (A.deviceId = h);
|
|
315
|
-
const I = await
|
|
315
|
+
const I = await Qn(A);
|
|
316
316
|
await L.localParticipant.publishTrack(I), p.current = I;
|
|
317
317
|
const U = I.attach();
|
|
318
318
|
i(U), t(!0), h && l(h);
|
|
@@ -332,7 +332,7 @@ function ir() {
|
|
|
332
332
|
e ? m() : await f(s || void 0);
|
|
333
333
|
}, [e, s, m, f]), _ = E(async (h) => {
|
|
334
334
|
m(), await f(h);
|
|
335
|
-
}, [m, f]),
|
|
335
|
+
}, [m, f]), g = E(() => {
|
|
336
336
|
m(), c.current = null, o(null), l("");
|
|
337
337
|
}, [m]), u = E(() => o(null), []);
|
|
338
338
|
return T(() => () => {
|
|
@@ -345,11 +345,11 @@ function ir() {
|
|
|
345
345
|
toggle: R,
|
|
346
346
|
switchDevice: _,
|
|
347
347
|
attachRoom: w,
|
|
348
|
-
teardown:
|
|
348
|
+
teardown: g,
|
|
349
349
|
clearError: u
|
|
350
350
|
};
|
|
351
351
|
}
|
|
352
|
-
function
|
|
352
|
+
function ar() {
|
|
353
353
|
const [e, t] = N(!1), [r, o] = N(null), [a, i] = N(null), s = M(null), l = E((f) => {
|
|
354
354
|
s.current = f;
|
|
355
355
|
}, []), c = E(() => i(null), []), p = E(async () => {
|
|
@@ -368,9 +368,9 @@ function lr() {
|
|
|
368
368
|
await f.localParticipant.setScreenShareEnabled(!0);
|
|
369
369
|
let R = 0;
|
|
370
370
|
const _ = () => {
|
|
371
|
-
const
|
|
372
|
-
if (
|
|
373
|
-
const u =
|
|
371
|
+
const g = f.localParticipant.getTrackPublication(kn.Source.ScreenShare);
|
|
372
|
+
if (g != null && g.track) {
|
|
373
|
+
const u = g.track.attach();
|
|
374
374
|
i(u), t(!0);
|
|
375
375
|
try {
|
|
376
376
|
f.localParticipant.publishData(
|
|
@@ -400,7 +400,7 @@ function lr() {
|
|
|
400
400
|
}, [e, c]), m = E(() => o(null), []);
|
|
401
401
|
return { isEnabled: e, error: r, previewEl: a, toggle: p, attachRoom: l, teardown: w, clearError: m };
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function sr() {
|
|
404
404
|
const [e, t] = N([]), [r, o] = N([]), a = E(async () => {
|
|
405
405
|
if (!(typeof navigator > "u" || !navigator.mediaDevices))
|
|
406
406
|
try {
|
|
@@ -415,7 +415,7 @@ function ar() {
|
|
|
415
415
|
return navigator.mediaDevices.addEventListener("devicechange", i), () => navigator.mediaDevices.removeEventListener("devicechange", i);
|
|
416
416
|
}, [a]), { mics: e, cameras: r, refresh: a };
|
|
417
417
|
}
|
|
418
|
-
function
|
|
418
|
+
function cr(e, t, r = !1) {
|
|
419
419
|
const [o, a] = N(null), [i, s] = N(null), [l, c] = N(!r && !!e);
|
|
420
420
|
return T(() => {
|
|
421
421
|
if (r || !e) {
|
|
@@ -438,7 +438,7 @@ function sr(e, t, r = !1) {
|
|
|
438
438
|
}), () => p.abort();
|
|
439
439
|
}, [e, t, r]), { info: o, error: i, loading: l };
|
|
440
440
|
}
|
|
441
|
-
function
|
|
441
|
+
function dr(e) {
|
|
442
442
|
if (typeof window > "u") return null;
|
|
443
443
|
try {
|
|
444
444
|
return window.localStorage.getItem(e);
|
|
@@ -446,14 +446,14 @@ function cr(e) {
|
|
|
446
446
|
return null;
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function ur(e, t) {
|
|
450
450
|
if (!(typeof window > "u"))
|
|
451
451
|
try {
|
|
452
452
|
window.localStorage.setItem(e, t);
|
|
453
453
|
} catch {
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
|
-
function
|
|
456
|
+
function fr({
|
|
457
457
|
value: e,
|
|
458
458
|
defaultValue: t = "expanded",
|
|
459
459
|
onChange: r
|
|
@@ -466,32 +466,32 @@ function ur({
|
|
|
466
466
|
);
|
|
467
467
|
return [s, l];
|
|
468
468
|
}
|
|
469
|
-
const
|
|
470
|
-
function
|
|
471
|
-
return e &&
|
|
469
|
+
const pr = ["hidden", "minimized", "expanded"];
|
|
470
|
+
function hr(e) {
|
|
471
|
+
return e && pr.includes(e) ? e : null;
|
|
472
472
|
}
|
|
473
|
-
function
|
|
473
|
+
function mr({
|
|
474
474
|
value: e,
|
|
475
475
|
defaultValue: t = "expanded",
|
|
476
476
|
onChange: r,
|
|
477
477
|
persistKey: o = "ll-widget",
|
|
478
478
|
disablePersistence: a = !1
|
|
479
479
|
} = {}) {
|
|
480
|
-
const i = `${o}:display-mode`, s = M(!1), [l, c] =
|
|
480
|
+
const i = `${o}:display-mode`, s = M(!1), [l, c] = fr({
|
|
481
481
|
value: e,
|
|
482
482
|
defaultValue: t,
|
|
483
483
|
onChange: (p) => {
|
|
484
|
-
e === void 0 && !a &&
|
|
484
|
+
e === void 0 && !a && ur(i, p), r == null || r(p);
|
|
485
485
|
}
|
|
486
486
|
});
|
|
487
487
|
return T(() => {
|
|
488
488
|
if (s.current || (s.current = !0, a || e !== void 0)) return;
|
|
489
|
-
const p =
|
|
489
|
+
const p = hr(dr(i));
|
|
490
490
|
p && p !== l && c(p);
|
|
491
491
|
}, []), [l, c];
|
|
492
492
|
}
|
|
493
|
-
const
|
|
494
|
-
function
|
|
493
|
+
const gr = 640;
|
|
494
|
+
function yr(e = gr) {
|
|
495
495
|
const [t, r] = N(!1);
|
|
496
496
|
return T(() => {
|
|
497
497
|
if (e === !1) {
|
|
@@ -506,75 +506,75 @@ function gr(e = mr) {
|
|
|
506
506
|
});
|
|
507
507
|
}, [e]), t;
|
|
508
508
|
}
|
|
509
|
-
const tn = "__llHistoryPatched",
|
|
510
|
-
function
|
|
509
|
+
const tn = "__llHistoryPatched", _t = "ll:pathname";
|
|
510
|
+
function vr() {
|
|
511
511
|
if (typeof window > "u" || window.history[tn]) return;
|
|
512
512
|
const e = window.history.pushState, t = window.history.replaceState;
|
|
513
513
|
window.history.pushState = function(...r) {
|
|
514
514
|
const o = e.apply(this, r);
|
|
515
|
-
return window.dispatchEvent(new Event(
|
|
515
|
+
return window.dispatchEvent(new Event(_t)), o;
|
|
516
516
|
}, window.history.replaceState = function(...r) {
|
|
517
517
|
const o = t.apply(this, r);
|
|
518
|
-
return window.dispatchEvent(new Event(
|
|
518
|
+
return window.dispatchEvent(new Event(_t)), o;
|
|
519
519
|
}, window.history[tn] = !0;
|
|
520
520
|
}
|
|
521
521
|
function nn() {
|
|
522
522
|
return typeof window > "u" ? "/" : window.location.pathname || "/";
|
|
523
523
|
}
|
|
524
|
-
function
|
|
524
|
+
function br(e) {
|
|
525
525
|
const [t, r] = N(
|
|
526
526
|
() => e ?? nn()
|
|
527
527
|
);
|
|
528
528
|
return T(() => {
|
|
529
529
|
if (e !== void 0) return;
|
|
530
|
-
|
|
530
|
+
vr();
|
|
531
531
|
const o = () => r(nn());
|
|
532
|
-
return o(), window.addEventListener("popstate", o), window.addEventListener(
|
|
533
|
-
window.removeEventListener("popstate", o), window.removeEventListener(
|
|
532
|
+
return o(), window.addEventListener("popstate", o), window.addEventListener(_t, o), () => {
|
|
533
|
+
window.removeEventListener("popstate", o), window.removeEventListener(_t, o);
|
|
534
534
|
};
|
|
535
535
|
}, [e]), e ?? t;
|
|
536
536
|
}
|
|
537
|
-
const rn = /* @__PURE__ */ new Map(),
|
|
538
|
-
function wr(e) {
|
|
539
|
-
return e.replace(br, "\\$&");
|
|
540
|
-
}
|
|
537
|
+
const rn = /* @__PURE__ */ new Map(), wr = /[\\^$+?.()|{}[\]]/g;
|
|
541
538
|
function _r(e) {
|
|
539
|
+
return e.replace(wr, "\\$&");
|
|
540
|
+
}
|
|
541
|
+
function xr(e) {
|
|
542
542
|
const t = rn.get(e);
|
|
543
543
|
if (t) return t;
|
|
544
|
-
const r = e.length > 1 && e.endsWith("/") ? e.slice(0, -1) : e, o = "", a = "", i = r.replace(/\*\*/g, o).replace(/\*/g, a), l =
|
|
544
|
+
const r = e.length > 1 && e.endsWith("/") ? e.slice(0, -1) : e, o = "", a = "", i = r.replace(/\*\*/g, o).replace(/\*/g, a), l = _r(i).replace(new RegExp(`\\/${o}`, "g"), "(?:\\/.*)?").replace(new RegExp(o, "g"), ".*").replace(new RegExp(a, "g"), "[^/]+"), c = new RegExp(`^${l}\\/?$`);
|
|
545
545
|
return rn.set(e, c), c;
|
|
546
546
|
}
|
|
547
|
-
function
|
|
547
|
+
function Lr(e, t) {
|
|
548
548
|
const r = t.length > 1 && t.endsWith("/") ? t.slice(0, -1) : t;
|
|
549
|
-
return
|
|
549
|
+
return xr(e).test(r);
|
|
550
550
|
}
|
|
551
|
-
function
|
|
552
|
-
return typeof e == "function" ? e(t) : e instanceof RegExp ? e.test(t) :
|
|
551
|
+
function kr(e, t) {
|
|
552
|
+
return typeof e == "function" ? e(t) : e instanceof RegExp ? e.test(t) : Lr(e, t);
|
|
553
553
|
}
|
|
554
554
|
function on(e, t) {
|
|
555
555
|
if (!e || e.length === 0) return !1;
|
|
556
556
|
for (const r of e)
|
|
557
|
-
if (
|
|
557
|
+
if (kr(r, t)) return !0;
|
|
558
558
|
return !1;
|
|
559
559
|
}
|
|
560
|
-
function
|
|
560
|
+
function Cr(e, t, r) {
|
|
561
561
|
return e === void 0 ? !0 : on(r, e) ? !1 : t && t.length > 0 ? on(t, e) : !0;
|
|
562
562
|
}
|
|
563
|
-
function
|
|
563
|
+
function Er(e, t, r) {
|
|
564
564
|
return Qe(
|
|
565
|
-
() =>
|
|
565
|
+
() => Cr(e, t, r),
|
|
566
566
|
[e, t, r]
|
|
567
567
|
);
|
|
568
568
|
}
|
|
569
|
-
function
|
|
569
|
+
function Sr(e) {
|
|
570
570
|
return e === !1 ? { navigate: !1, thinking: !1, action: !1 } : e === void 0 || e === !0 ? { navigate: !0, thinking: !0, action: !0 } : {
|
|
571
571
|
navigate: e.navigate !== !1,
|
|
572
572
|
thinking: e.thinking !== !1,
|
|
573
573
|
action: e.action !== !1
|
|
574
574
|
};
|
|
575
575
|
}
|
|
576
|
-
function
|
|
577
|
-
const t = Qe(() =>
|
|
576
|
+
function Nr(e) {
|
|
577
|
+
const t = Qe(() => Sr(e.config), [e.config]), r = e.baseUrl.replace(/\/+$/, ""), o = M(null), a = E(
|
|
578
578
|
(c) => {
|
|
579
579
|
try {
|
|
580
580
|
new Audio(`${r}${c}`).play().catch(() => {
|
|
@@ -695,7 +695,7 @@ const ln = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ x(
|
|
|
695
695
|
}
|
|
696
696
|
)
|
|
697
697
|
}
|
|
698
|
-
),
|
|
698
|
+
), Ar = ({ className: e }) => /* @__PURE__ */ n(
|
|
699
699
|
"svg",
|
|
700
700
|
{
|
|
701
701
|
className: e,
|
|
@@ -706,7 +706,7 @@ const ln = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ x(
|
|
|
706
706
|
"aria-hidden": "true",
|
|
707
707
|
children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
|
|
708
708
|
}
|
|
709
|
-
),
|
|
709
|
+
), Ir = {
|
|
710
710
|
left: 180,
|
|
711
711
|
right: 0,
|
|
712
712
|
up: -90,
|
|
@@ -719,16 +719,16 @@ const ln = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ x(
|
|
|
719
719
|
viewBox: "0 0 24 24",
|
|
720
720
|
stroke: "currentColor",
|
|
721
721
|
strokeWidth: 2,
|
|
722
|
-
style: { transform: `rotate(${
|
|
722
|
+
style: { transform: `rotate(${Ir[e]}deg)` },
|
|
723
723
|
"aria-hidden": "true",
|
|
724
724
|
children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 6l6 6-6 6" })
|
|
725
725
|
}
|
|
726
726
|
);
|
|
727
|
-
function
|
|
727
|
+
function Mr(e) {
|
|
728
728
|
return e === "top-left" || e === "bottom-left" ? "left" : "right";
|
|
729
729
|
}
|
|
730
|
-
const Cn = "ll-hidden-tab-center-y",
|
|
731
|
-
function
|
|
730
|
+
const Cn = "ll-hidden-tab-center-y", Rr = 5, cn = 16;
|
|
731
|
+
function Tr() {
|
|
732
732
|
if (typeof window > "u") return null;
|
|
733
733
|
try {
|
|
734
734
|
const e = window.localStorage.getItem(Cn);
|
|
@@ -746,7 +746,7 @@ function dn(e) {
|
|
|
746
746
|
} catch {
|
|
747
747
|
}
|
|
748
748
|
}
|
|
749
|
-
const
|
|
749
|
+
const Dr = ({
|
|
750
750
|
position: e,
|
|
751
751
|
isMobile: t,
|
|
752
752
|
isSpeaking: r,
|
|
@@ -756,11 +756,11 @@ const Tr = ({
|
|
|
756
756
|
agentName: s,
|
|
757
757
|
containerEl: l
|
|
758
758
|
}) => {
|
|
759
|
-
const c =
|
|
760
|
-
(
|
|
761
|
-
if (typeof window > "u") return
|
|
762
|
-
const j = w / 2, S = cn + j,
|
|
763
|
-
return
|
|
759
|
+
const c = Mr(e), p = c === "right" ? "left" : "right", w = t ? 80 : 72, m = !!i, f = !!l, [R, _] = N(null), [g, u] = N(!1), h = M(null), L = M(!1), A = E(
|
|
760
|
+
(F) => {
|
|
761
|
+
if (typeof window > "u") return F;
|
|
762
|
+
const j = w / 2, S = cn + j, ee = window.innerHeight - cn - j;
|
|
763
|
+
return ee < S ? Math.max(S, F) : Math.max(S, Math.min(ee, F));
|
|
764
764
|
},
|
|
765
765
|
[w]
|
|
766
766
|
);
|
|
@@ -769,22 +769,22 @@ const Tr = ({
|
|
|
769
769
|
_(null);
|
|
770
770
|
return;
|
|
771
771
|
}
|
|
772
|
-
const
|
|
773
|
-
_(A(
|
|
772
|
+
const F = Tr();
|
|
773
|
+
_(A(F ?? window.innerHeight / 2));
|
|
774
774
|
const j = () => {
|
|
775
775
|
_((S) => S === null ? null : A(S));
|
|
776
776
|
};
|
|
777
777
|
return window.addEventListener("resize", j), () => window.removeEventListener("resize", j);
|
|
778
778
|
}, [A, f]);
|
|
779
779
|
const I = E(
|
|
780
|
-
(
|
|
781
|
-
if (!f && !(
|
|
780
|
+
(F) => {
|
|
781
|
+
if (!f && !(F.pointerType === "mouse" && F.button !== 0) && R !== null) {
|
|
782
782
|
try {
|
|
783
|
-
|
|
783
|
+
F.currentTarget.setPointerCapture(F.pointerId);
|
|
784
784
|
} catch {
|
|
785
785
|
}
|
|
786
786
|
h.current = {
|
|
787
|
-
startClientY:
|
|
787
|
+
startClientY: F.clientY,
|
|
788
788
|
startCenterY: R,
|
|
789
789
|
moved: !1
|
|
790
790
|
};
|
|
@@ -792,19 +792,19 @@ const Tr = ({
|
|
|
792
792
|
},
|
|
793
793
|
[R, f]
|
|
794
794
|
), U = E(
|
|
795
|
-
(
|
|
795
|
+
(F) => {
|
|
796
796
|
const j = h.current;
|
|
797
797
|
if (!j) return;
|
|
798
|
-
const S =
|
|
799
|
-
!j.moved && Math.abs(S) >
|
|
798
|
+
const S = F.clientY - j.startClientY;
|
|
799
|
+
!j.moved && Math.abs(S) > Rr && (j.moved = !0, u(!0)), j.moved && _(A(j.startCenterY + S));
|
|
800
800
|
},
|
|
801
801
|
[A]
|
|
802
802
|
), b = E(
|
|
803
|
-
(
|
|
803
|
+
(F) => {
|
|
804
804
|
const j = h.current;
|
|
805
805
|
if (j) {
|
|
806
806
|
try {
|
|
807
|
-
|
|
807
|
+
F.currentTarget.releasePointerCapture(F.pointerId);
|
|
808
808
|
} catch {
|
|
809
809
|
}
|
|
810
810
|
h.current = null, j.moved && (u(!1), L.current = !0, _((S) => (S !== null && dn(S), S)));
|
|
@@ -817,15 +817,15 @@ const Tr = ({
|
|
|
817
817
|
return;
|
|
818
818
|
}
|
|
819
819
|
o();
|
|
820
|
-
}, [o]),
|
|
821
|
-
(
|
|
822
|
-
if (
|
|
823
|
-
|
|
824
|
-
const j =
|
|
820
|
+
}, [o]), B = E(
|
|
821
|
+
(F) => {
|
|
822
|
+
if (F.key === "ArrowUp" || F.key === "ArrowDown") {
|
|
823
|
+
F.preventDefault();
|
|
824
|
+
const j = F.key === "ArrowUp" ? -8 : 8;
|
|
825
825
|
_((S) => {
|
|
826
826
|
if (S === null) return S;
|
|
827
|
-
const
|
|
828
|
-
return dn(
|
|
827
|
+
const ee = A(S + j);
|
|
828
|
+
return dn(ee), ee;
|
|
829
829
|
});
|
|
830
830
|
}
|
|
831
831
|
},
|
|
@@ -835,10 +835,10 @@ const Tr = ({
|
|
|
835
835
|
`ll-hidden--${c}`,
|
|
836
836
|
t ? "ll-hidden--mobile" : "ll-hidden--desktop",
|
|
837
837
|
r ? "ll-hidden--speaking" : null,
|
|
838
|
-
|
|
838
|
+
g ? "is-dragging" : null,
|
|
839
839
|
m ? "ll-hidden--with-avatar" : null,
|
|
840
840
|
f ? "ll-hidden--scoped" : null
|
|
841
|
-
].filter(Boolean).join(" "),
|
|
841
|
+
].filter(Boolean).join(" "), re = R === null ? void 0 : { top: `${R - w / 2}px`, transform: "none" };
|
|
842
842
|
return /* @__PURE__ */ n(
|
|
843
843
|
"button",
|
|
844
844
|
{
|
|
@@ -849,10 +849,10 @@ const Tr = ({
|
|
|
849
849
|
onPointerUp: b,
|
|
850
850
|
onPointerCancel: b,
|
|
851
851
|
onClick: P,
|
|
852
|
-
onKeyDown:
|
|
852
|
+
onKeyDown: B,
|
|
853
853
|
"aria-label": a,
|
|
854
854
|
"data-position": e,
|
|
855
|
-
style:
|
|
855
|
+
style: re,
|
|
856
856
|
children: m ? (
|
|
857
857
|
// Layout: tiny chevron flush against the inward edge (peeks out
|
|
858
858
|
// as the click affordance), then the circular avatar photo
|
|
@@ -885,7 +885,7 @@ const Tr = ({
|
|
|
885
885
|
)
|
|
886
886
|
}
|
|
887
887
|
);
|
|
888
|
-
},
|
|
888
|
+
}, Pr = ({
|
|
889
889
|
audioLevel: e,
|
|
890
890
|
bars: t = 20,
|
|
891
891
|
maxHeight: r = 20,
|
|
@@ -917,7 +917,7 @@ const Tr = ({
|
|
|
917
917
|
},
|
|
918
918
|
m
|
|
919
919
|
)) });
|
|
920
|
-
},
|
|
920
|
+
}, $r = ({
|
|
921
921
|
position: e,
|
|
922
922
|
isMobile: t,
|
|
923
923
|
agentName: r,
|
|
@@ -954,7 +954,7 @@ const Tr = ({
|
|
|
954
954
|
)
|
|
955
955
|
) : /* @__PURE__ */ n("div", { className: "ll-minimized__avatar ll-minimized__avatar--placeholder" }),
|
|
956
956
|
/* @__PURE__ */ n(
|
|
957
|
-
|
|
957
|
+
Pr,
|
|
958
958
|
{
|
|
959
959
|
audioLevel: s,
|
|
960
960
|
bars: 16,
|
|
@@ -1037,13 +1037,13 @@ const Tr = ({
|
|
|
1037
1037
|
className: "ll-minimized__btn ll-minimized__btn--close",
|
|
1038
1038
|
onClick: p,
|
|
1039
1039
|
"aria-label": "Close widget",
|
|
1040
|
-
children: /* @__PURE__ */ n(
|
|
1040
|
+
children: /* @__PURE__ */ n(Ar, { className: "ll-minimized__icon" })
|
|
1041
1041
|
}
|
|
1042
1042
|
)
|
|
1043
1043
|
] })
|
|
1044
1044
|
] })
|
|
1045
1045
|
}
|
|
1046
|
-
),
|
|
1046
|
+
), zr = ({
|
|
1047
1047
|
src: e,
|
|
1048
1048
|
alt: t,
|
|
1049
1049
|
preCannedPlaying: r = !1,
|
|
@@ -1081,11 +1081,11 @@ const Tr = ({
|
|
|
1081
1081
|
}
|
|
1082
1082
|
)
|
|
1083
1083
|
);
|
|
1084
|
-
},
|
|
1085
|
-
function
|
|
1084
|
+
}, Hr = "#E06540";
|
|
1085
|
+
function Or({
|
|
1086
1086
|
size: e = 14,
|
|
1087
1087
|
className: t,
|
|
1088
|
-
fill: r =
|
|
1088
|
+
fill: r = Hr
|
|
1089
1089
|
}) {
|
|
1090
1090
|
return /* @__PURE__ */ x(
|
|
1091
1091
|
"svg",
|
|
@@ -1123,7 +1123,7 @@ function Hr({
|
|
|
1123
1123
|
}
|
|
1124
1124
|
);
|
|
1125
1125
|
}
|
|
1126
|
-
const
|
|
1126
|
+
const Br = 8, un = 8, Fr = ({
|
|
1127
1127
|
open: e,
|
|
1128
1128
|
onClose: t,
|
|
1129
1129
|
anchorRef: r,
|
|
@@ -1139,7 +1139,7 @@ const Or = 8, un = 8, Br = ({
|
|
|
1139
1139
|
if (!l) return;
|
|
1140
1140
|
const c = () => {
|
|
1141
1141
|
const p = l.getBoundingClientRect(), w = {
|
|
1142
|
-
top: p.top -
|
|
1142
|
+
top: p.top - Br,
|
|
1143
1143
|
left: p.left + p.width / 2
|
|
1144
1144
|
}, m = un + 90, f = window.innerWidth - un - 90;
|
|
1145
1145
|
w.left < m && (w.left = m), w.left > f && (w.left = f), s(w);
|
|
@@ -1178,7 +1178,7 @@ const Or = 8, un = 8, Br = ({
|
|
|
1178
1178
|
),
|
|
1179
1179
|
document.body
|
|
1180
1180
|
);
|
|
1181
|
-
},
|
|
1181
|
+
}, Wr = ({
|
|
1182
1182
|
isMuted: e,
|
|
1183
1183
|
onToggleMute: t,
|
|
1184
1184
|
isCameraEnabled: r,
|
|
@@ -1194,7 +1194,7 @@ const Or = 8, un = 8, Br = ({
|
|
|
1194
1194
|
onToggleTyping: f,
|
|
1195
1195
|
onDisconnect: R
|
|
1196
1196
|
}) => {
|
|
1197
|
-
const [_,
|
|
1197
|
+
const [_, g] = N(!1), u = M(null);
|
|
1198
1198
|
return /* @__PURE__ */ x(ze, { children: [
|
|
1199
1199
|
/* @__PURE__ */ x(
|
|
1200
1200
|
"div",
|
|
@@ -1219,11 +1219,11 @@ const Or = 8, un = 8, Br = ({
|
|
|
1219
1219
|
ref: u,
|
|
1220
1220
|
type: "button",
|
|
1221
1221
|
className: `ll-tool ${_ ? "is-on" : ""}`,
|
|
1222
|
-
onClick: () =>
|
|
1222
|
+
onClick: () => g((h) => !h),
|
|
1223
1223
|
"aria-label": "More controls",
|
|
1224
1224
|
"aria-haspopup": "menu",
|
|
1225
1225
|
"aria-expanded": _,
|
|
1226
|
-
children: /* @__PURE__ */ n(
|
|
1226
|
+
children: /* @__PURE__ */ n(qr, {})
|
|
1227
1227
|
}
|
|
1228
1228
|
),
|
|
1229
1229
|
/* @__PURE__ */ n(
|
|
@@ -1240,10 +1240,10 @@ const Or = 8, un = 8, Br = ({
|
|
|
1240
1240
|
}
|
|
1241
1241
|
),
|
|
1242
1242
|
/* @__PURE__ */ x(
|
|
1243
|
-
|
|
1243
|
+
Fr,
|
|
1244
1244
|
{
|
|
1245
1245
|
open: _,
|
|
1246
|
-
onClose: () =>
|
|
1246
|
+
onClose: () => g(!1),
|
|
1247
1247
|
anchorRef: u,
|
|
1248
1248
|
children: [
|
|
1249
1249
|
a && /* @__PURE__ */ x(
|
|
@@ -1252,7 +1252,7 @@ const Or = 8, un = 8, Br = ({
|
|
|
1252
1252
|
type: "button",
|
|
1253
1253
|
className: `ll-overflow-popover__item ${r ? "is-on" : ""}`,
|
|
1254
1254
|
onClick: () => {
|
|
1255
|
-
o(),
|
|
1255
|
+
o(), g(!1);
|
|
1256
1256
|
},
|
|
1257
1257
|
children: [
|
|
1258
1258
|
/* @__PURE__ */ n(Sn, {}),
|
|
@@ -1266,7 +1266,7 @@ const Or = 8, un = 8, Br = ({
|
|
|
1266
1266
|
type: "button",
|
|
1267
1267
|
className: `ll-overflow-popover__item ${i ? "is-on" : ""}`,
|
|
1268
1268
|
onClick: () => {
|
|
1269
|
-
s(),
|
|
1269
|
+
s(), g(!1);
|
|
1270
1270
|
},
|
|
1271
1271
|
children: [
|
|
1272
1272
|
/* @__PURE__ */ n(En, {}),
|
|
@@ -1280,7 +1280,7 @@ const Or = 8, un = 8, Br = ({
|
|
|
1280
1280
|
type: "button",
|
|
1281
1281
|
className: `ll-overflow-popover__item ${c ? "is-on" : ""}`,
|
|
1282
1282
|
onClick: () => {
|
|
1283
|
-
p(),
|
|
1283
|
+
p(), g(!1);
|
|
1284
1284
|
},
|
|
1285
1285
|
children: [
|
|
1286
1286
|
/* @__PURE__ */ n(An, { muted: c }),
|
|
@@ -1294,10 +1294,10 @@ const Or = 8, un = 8, Br = ({
|
|
|
1294
1294
|
type: "button",
|
|
1295
1295
|
className: `ll-overflow-popover__item ${m ? "is-on" : ""}`,
|
|
1296
1296
|
onClick: () => {
|
|
1297
|
-
f(),
|
|
1297
|
+
f(), g(!1);
|
|
1298
1298
|
},
|
|
1299
1299
|
children: [
|
|
1300
|
-
/* @__PURE__ */ n(
|
|
1300
|
+
/* @__PURE__ */ n(Ur, {}),
|
|
1301
1301
|
/* @__PURE__ */ n("span", { children: m ? "Hide typing" : "Type a message" })
|
|
1302
1302
|
]
|
|
1303
1303
|
}
|
|
@@ -1320,7 +1320,7 @@ const Or = 8, un = 8, Br = ({
|
|
|
1320
1320
|
)
|
|
1321
1321
|
] });
|
|
1322
1322
|
};
|
|
1323
|
-
function
|
|
1323
|
+
function qr() {
|
|
1324
1324
|
return /* @__PURE__ */ x(
|
|
1325
1325
|
"svg",
|
|
1326
1326
|
{
|
|
@@ -1337,7 +1337,7 @@ function Wr() {
|
|
|
1337
1337
|
}
|
|
1338
1338
|
);
|
|
1339
1339
|
}
|
|
1340
|
-
function
|
|
1340
|
+
function Ur() {
|
|
1341
1341
|
return /* @__PURE__ */ n(
|
|
1342
1342
|
"svg",
|
|
1343
1343
|
{
|
|
@@ -1354,7 +1354,7 @@ function qr() {
|
|
|
1354
1354
|
}
|
|
1355
1355
|
);
|
|
1356
1356
|
}
|
|
1357
|
-
const
|
|
1357
|
+
const jr = ({
|
|
1358
1358
|
position: e,
|
|
1359
1359
|
isMobile: t,
|
|
1360
1360
|
agentName: r,
|
|
@@ -1370,7 +1370,7 @@ const Ur = ({
|
|
|
1370
1370
|
onSelectTeamMember: f,
|
|
1371
1371
|
languageMenuOpen: R,
|
|
1372
1372
|
onToggleLanguageMenu: _,
|
|
1373
|
-
connectionState:
|
|
1373
|
+
connectionState: g,
|
|
1374
1374
|
agentState: u,
|
|
1375
1375
|
transcript: h,
|
|
1376
1376
|
canResume: L,
|
|
@@ -1379,42 +1379,42 @@ const Ur = ({
|
|
|
1379
1379
|
isMuted: U,
|
|
1380
1380
|
micError: b,
|
|
1381
1381
|
micDevices: P,
|
|
1382
|
-
activeMicId:
|
|
1382
|
+
activeMicId: B,
|
|
1383
1383
|
isCameraEnabled: q,
|
|
1384
|
-
cameraPreviewEl:
|
|
1385
|
-
cameraDevices:
|
|
1384
|
+
cameraPreviewEl: re,
|
|
1385
|
+
cameraDevices: F,
|
|
1386
1386
|
activeCameraId: j,
|
|
1387
1387
|
isScreenShareEnabled: S,
|
|
1388
|
-
screenPreviewEl:
|
|
1389
|
-
isSpeakerMuted:
|
|
1388
|
+
screenPreviewEl: ee,
|
|
1389
|
+
isSpeakerMuted: xe,
|
|
1390
1390
|
allowCamera: de,
|
|
1391
1391
|
allowScreenShare: He,
|
|
1392
1392
|
allowTyping: Oe,
|
|
1393
|
-
showMinimize:
|
|
1394
|
-
showClose:
|
|
1395
|
-
chromeless:
|
|
1396
|
-
compactControls:
|
|
1397
|
-
transforming:
|
|
1393
|
+
showMinimize: Z = !0,
|
|
1394
|
+
showClose: Ee = !0,
|
|
1395
|
+
chromeless: Le = !1,
|
|
1396
|
+
compactControls: H = !1,
|
|
1397
|
+
transforming: le,
|
|
1398
1398
|
transformingLabel: Y,
|
|
1399
|
-
avatarVideoContainerRef:
|
|
1399
|
+
avatarVideoContainerRef: pe,
|
|
1400
1400
|
agentVideoEl: K,
|
|
1401
1401
|
onConnect: et,
|
|
1402
1402
|
onDisconnect: tt,
|
|
1403
1403
|
onRetry: ft,
|
|
1404
1404
|
onResumeAudio: nt,
|
|
1405
|
-
onToggleMute:
|
|
1405
|
+
onToggleMute: Se,
|
|
1406
1406
|
onSwitchMicDevice: Be,
|
|
1407
|
-
onToggleCamera:
|
|
1407
|
+
onToggleCamera: Ne,
|
|
1408
1408
|
onSwitchCameraDevice: Fe,
|
|
1409
|
-
onToggleScreenShare:
|
|
1410
|
-
onToggleSpeaker:
|
|
1411
|
-
onSendMessage:
|
|
1412
|
-
onMinimize:
|
|
1409
|
+
onToggleScreenShare: Ae,
|
|
1410
|
+
onToggleSpeaker: Ie,
|
|
1411
|
+
onSendMessage: Me,
|
|
1412
|
+
onMinimize: Re,
|
|
1413
1413
|
onClose: $,
|
|
1414
|
-
onClearMicError:
|
|
1414
|
+
onClearMicError: xt
|
|
1415
1415
|
}) => {
|
|
1416
|
-
var
|
|
1417
|
-
const
|
|
1416
|
+
var mt;
|
|
1417
|
+
const Te = ((l == null ? void 0 : l.length) ?? 0) > 1, We = g === "connecting" || g === "connected", he = g === "connected", rt = g === "idle" || g === "disconnected" || g === "error", [De, qe] = N(!1);
|
|
1418
1418
|
T(() => {
|
|
1419
1419
|
if (!K) {
|
|
1420
1420
|
qe(!1);
|
|
@@ -1425,80 +1425,80 @@ const Ur = ({
|
|
|
1425
1425
|
return;
|
|
1426
1426
|
}
|
|
1427
1427
|
qe(!1);
|
|
1428
|
-
const
|
|
1429
|
-
return K.addEventListener("playing",
|
|
1430
|
-
K.removeEventListener("playing",
|
|
1428
|
+
const y = () => qe(!0);
|
|
1429
|
+
return K.addEventListener("playing", y), K.addEventListener("loadeddata", y), () => {
|
|
1430
|
+
K.removeEventListener("playing", y), K.removeEventListener("loadeddata", y);
|
|
1431
1431
|
};
|
|
1432
1432
|
}, [K]);
|
|
1433
|
-
const [
|
|
1433
|
+
const [Lt, Ce] = N(!1);
|
|
1434
1434
|
T(() => {
|
|
1435
|
-
if (!
|
|
1435
|
+
if (!he) {
|
|
1436
1436
|
Ce(!1);
|
|
1437
1437
|
return;
|
|
1438
1438
|
}
|
|
1439
|
-
if (
|
|
1440
|
-
const
|
|
1441
|
-
return () => clearTimeout(
|
|
1442
|
-
}, [
|
|
1443
|
-
const
|
|
1439
|
+
if (De) return;
|
|
1440
|
+
const y = setTimeout(() => Ce(!0), 8e3);
|
|
1441
|
+
return () => clearTimeout(y);
|
|
1442
|
+
}, [he, De]);
|
|
1443
|
+
const ae = g === "connecting" || he && !!o && !De && !Lt, ot = M(null), ue = M(null);
|
|
1444
1444
|
T(() => {
|
|
1445
|
-
const
|
|
1446
|
-
|
|
1447
|
-
}, [
|
|
1448
|
-
const
|
|
1449
|
-
|
|
1450
|
-
}, [
|
|
1451
|
-
const [
|
|
1445
|
+
const y = ot.current;
|
|
1446
|
+
y && (y.innerHTML = "", re && (re.style.width = "100%", re.style.height = "100%", re.style.objectFit = "cover", re.style.transform = "scaleX(-1)", y.appendChild(re)));
|
|
1447
|
+
}, [re]), T(() => {
|
|
1448
|
+
const y = ue.current;
|
|
1449
|
+
y && (y.innerHTML = "", ee && (ee.style.width = "100%", ee.style.height = "100%", ee.style.objectFit = "contain", y.appendChild(ee)));
|
|
1450
|
+
}, [ee]);
|
|
1451
|
+
const [fe, Ue] = N(!1), [je, se] = N(!1), me = M(null), pt = M(null);
|
|
1452
1452
|
T(() => {
|
|
1453
|
-
if (!
|
|
1454
|
-
const
|
|
1455
|
-
Ue(!1),
|
|
1453
|
+
if (!fe && !je && !R && !w) return;
|
|
1454
|
+
const y = () => {
|
|
1455
|
+
Ue(!1), se(!1), R && _(), w && m();
|
|
1456
1456
|
};
|
|
1457
|
-
return document.addEventListener("click",
|
|
1457
|
+
return document.addEventListener("click", y), () => document.removeEventListener("click", y);
|
|
1458
1458
|
}, [
|
|
1459
|
-
|
|
1459
|
+
fe,
|
|
1460
1460
|
je,
|
|
1461
1461
|
R,
|
|
1462
1462
|
w,
|
|
1463
1463
|
_,
|
|
1464
1464
|
m
|
|
1465
1465
|
]);
|
|
1466
|
-
const [ht,
|
|
1467
|
-
(
|
|
1468
|
-
|
|
1469
|
-
const
|
|
1470
|
-
|
|
1466
|
+
const [ht, kt] = N(!1), Pe = E(() => kt((y) => !y), []), [Q, ge] = N(""), $e = E(
|
|
1467
|
+
(y) => {
|
|
1468
|
+
y.preventDefault();
|
|
1469
|
+
const J = Q.trim();
|
|
1470
|
+
J && (Me(J), ge(""));
|
|
1471
1471
|
},
|
|
1472
|
-
[
|
|
1473
|
-
),
|
|
1474
|
-
let ye = null,
|
|
1475
|
-
for (let
|
|
1476
|
-
const
|
|
1477
|
-
if (!ye &&
|
|
1472
|
+
[Q, Me]
|
|
1473
|
+
), Ve = s.productName || "Live Layer", Ct = !s.productName;
|
|
1474
|
+
let ye = null, ve = null;
|
|
1475
|
+
for (let y = h.length - 1; y >= 0; y--) {
|
|
1476
|
+
const J = h[y];
|
|
1477
|
+
if (!ye && J.role === "agent" ? ye = J : !ve && J.role === "user" && (ve = J), ye && ve) break;
|
|
1478
1478
|
}
|
|
1479
|
-
const
|
|
1479
|
+
const it = he ? (ye == null ? void 0 : ye.text) || null : i || null, Ye = he && (ve == null ? void 0 : ve.text) || null, lt = [
|
|
1480
1480
|
"ll-expanded",
|
|
1481
1481
|
t ? "ll-expanded--mobile" : "ll-expanded--desktop"
|
|
1482
1482
|
].join(" ");
|
|
1483
1483
|
return /* @__PURE__ */ x(
|
|
1484
1484
|
"div",
|
|
1485
1485
|
{
|
|
1486
|
-
className:
|
|
1486
|
+
className: lt,
|
|
1487
1487
|
"data-position": e,
|
|
1488
|
-
"data-state":
|
|
1488
|
+
"data-state": he ? "connected" : We ? "connecting" : "idle",
|
|
1489
1489
|
role: "dialog",
|
|
1490
1490
|
"aria-label": `${r} widget`,
|
|
1491
1491
|
children: [
|
|
1492
1492
|
/* @__PURE__ */ x("div", { className: "ll-expanded__bg", children: [
|
|
1493
1493
|
o ? /* @__PURE__ */ n(
|
|
1494
|
-
|
|
1494
|
+
zr,
|
|
1495
1495
|
{
|
|
1496
1496
|
src: o,
|
|
1497
1497
|
alt: r,
|
|
1498
1498
|
className: "ll-expanded__bg-img"
|
|
1499
1499
|
}
|
|
1500
|
-
) : /* @__PURE__ */ n("div", { className: "ll-expanded__bg-fallback", children: /* @__PURE__ */ n("span", { className: "ll-expanded__bg-initial", children: ((
|
|
1501
|
-
a && !
|
|
1500
|
+
) : /* @__PURE__ */ n("div", { className: "ll-expanded__bg-fallback", children: /* @__PURE__ */ n("span", { className: "ll-expanded__bg-initial", children: ((mt = r == null ? void 0 : r.charAt(0)) == null ? void 0 : mt.toUpperCase()) || "A" }) }),
|
|
1501
|
+
a && !he && /* @__PURE__ */ n(
|
|
1502
1502
|
"video",
|
|
1503
1503
|
{
|
|
1504
1504
|
className: "ll-expanded__bg-idle",
|
|
@@ -1510,12 +1510,12 @@ const Ur = ({
|
|
|
1510
1510
|
}
|
|
1511
1511
|
)
|
|
1512
1512
|
] }),
|
|
1513
|
-
/* @__PURE__ */ n("div", { ref:
|
|
1514
|
-
|
|
1513
|
+
/* @__PURE__ */ n("div", { ref: pe, className: "ll-expanded__video" }),
|
|
1514
|
+
ae && /* @__PURE__ */ x("div", { className: "ll-expanded__overlay ll-expanded__overlay--connecting", children: [
|
|
1515
1515
|
/* @__PURE__ */ n("div", { className: "ll-expanded__spinner" }),
|
|
1516
1516
|
/* @__PURE__ */ n("p", { className: "ll-expanded__overlay-text", children: p ? "Switching..." : "Connecting..." })
|
|
1517
1517
|
] }),
|
|
1518
|
-
A &&
|
|
1518
|
+
A && he && /* @__PURE__ */ x(
|
|
1519
1519
|
"button",
|
|
1520
1520
|
{
|
|
1521
1521
|
type: "button",
|
|
@@ -1527,7 +1527,7 @@ const Ur = ({
|
|
|
1527
1527
|
]
|
|
1528
1528
|
}
|
|
1529
1529
|
),
|
|
1530
|
-
|
|
1530
|
+
le && /* @__PURE__ */ x(
|
|
1531
1531
|
"div",
|
|
1532
1532
|
{
|
|
1533
1533
|
className: "ll-expanded__overlay ll-expanded__overlay--transforming",
|
|
@@ -1541,53 +1541,53 @@ const Ur = ({
|
|
|
1541
1541
|
}
|
|
1542
1542
|
),
|
|
1543
1543
|
We ? /* @__PURE__ */ x(ze, { children: [
|
|
1544
|
-
!
|
|
1545
|
-
!
|
|
1544
|
+
!H && /* @__PURE__ */ x("div", { className: "ll-expanded__topbar", children: [
|
|
1545
|
+
!Le && /* @__PURE__ */ x("div", { className: "ll-expanded__topbar-left", children: [
|
|
1546
1546
|
/* @__PURE__ */ x("div", { className: "ll-expanded__pill-wrap", children: [
|
|
1547
1547
|
/* @__PURE__ */ x(
|
|
1548
1548
|
"button",
|
|
1549
1549
|
{
|
|
1550
1550
|
type: "button",
|
|
1551
1551
|
className: "ll-hpill",
|
|
1552
|
-
onClick: (
|
|
1553
|
-
|
|
1552
|
+
onClick: (y) => {
|
|
1553
|
+
Te && (y.stopPropagation(), m());
|
|
1554
1554
|
},
|
|
1555
|
-
"aria-haspopup":
|
|
1556
|
-
"aria-expanded":
|
|
1555
|
+
"aria-haspopup": Te ? "listbox" : void 0,
|
|
1556
|
+
"aria-expanded": Te ? w : void 0,
|
|
1557
1557
|
children: [
|
|
1558
1558
|
/* @__PURE__ */ n("span", { className: "ll-hpill__label", children: r }),
|
|
1559
|
-
|
|
1559
|
+
Te && /* @__PURE__ */ n(bt, {})
|
|
1560
1560
|
]
|
|
1561
1561
|
}
|
|
1562
1562
|
),
|
|
1563
|
-
|
|
1563
|
+
Te && w && /* @__PURE__ */ n(
|
|
1564
1564
|
"div",
|
|
1565
1565
|
{
|
|
1566
1566
|
className: "ll-hmenu",
|
|
1567
|
-
onClick: (
|
|
1567
|
+
onClick: (y) => y.stopPropagation(),
|
|
1568
1568
|
role: "listbox",
|
|
1569
|
-
children: l == null ? void 0 : l.map((
|
|
1569
|
+
children: l == null ? void 0 : l.map((y) => /* @__PURE__ */ x(
|
|
1570
1570
|
"button",
|
|
1571
1571
|
{
|
|
1572
1572
|
type: "button",
|
|
1573
|
-
className: `ll-hmenu__item ${
|
|
1574
|
-
onClick: () => f(
|
|
1573
|
+
className: `ll-hmenu__item ${y.id === c ? "is-active" : ""}`,
|
|
1574
|
+
onClick: () => f(y.id),
|
|
1575
1575
|
role: "option",
|
|
1576
|
-
"aria-selected":
|
|
1576
|
+
"aria-selected": y.id === c,
|
|
1577
1577
|
children: [
|
|
1578
|
-
|
|
1578
|
+
y.avatarImageUrl && /* @__PURE__ */ n(
|
|
1579
1579
|
"img",
|
|
1580
1580
|
{
|
|
1581
|
-
src:
|
|
1581
|
+
src: y.avatarImageUrl,
|
|
1582
1582
|
alt: "",
|
|
1583
1583
|
className: "ll-hmenu__avatar"
|
|
1584
1584
|
}
|
|
1585
1585
|
),
|
|
1586
|
-
/* @__PURE__ */ n("span", { className: "ll-hmenu__name", children:
|
|
1587
|
-
|
|
1586
|
+
/* @__PURE__ */ n("span", { className: "ll-hmenu__name", children: y.name }),
|
|
1587
|
+
y.role && /* @__PURE__ */ n("span", { className: "ll-hmenu__role", children: y.role })
|
|
1588
1588
|
]
|
|
1589
1589
|
},
|
|
1590
|
-
|
|
1590
|
+
y.id
|
|
1591
1591
|
))
|
|
1592
1592
|
}
|
|
1593
1593
|
)
|
|
@@ -1598,8 +1598,8 @@ const Ur = ({
|
|
|
1598
1598
|
{
|
|
1599
1599
|
type: "button",
|
|
1600
1600
|
className: "ll-hpill ll-hpill--compact",
|
|
1601
|
-
onClick: (
|
|
1602
|
-
|
|
1601
|
+
onClick: (y) => {
|
|
1602
|
+
y.stopPropagation(), _();
|
|
1603
1603
|
},
|
|
1604
1604
|
"aria-haspopup": "listbox",
|
|
1605
1605
|
"aria-expanded": R,
|
|
@@ -1607,7 +1607,7 @@ const Ur = ({
|
|
|
1607
1607
|
title: "Language: English",
|
|
1608
1608
|
children: [
|
|
1609
1609
|
/* @__PURE__ */ n("span", { className: "ll-hpill__label", children: "EN" }),
|
|
1610
|
-
/* @__PURE__ */ n(
|
|
1610
|
+
/* @__PURE__ */ n(bt, {})
|
|
1611
1611
|
]
|
|
1612
1612
|
}
|
|
1613
1613
|
),
|
|
@@ -1615,7 +1615,7 @@ const Ur = ({
|
|
|
1615
1615
|
"div",
|
|
1616
1616
|
{
|
|
1617
1617
|
className: "ll-hmenu",
|
|
1618
|
-
onClick: (
|
|
1618
|
+
onClick: (y) => y.stopPropagation(),
|
|
1619
1619
|
role: "listbox",
|
|
1620
1620
|
children: /* @__PURE__ */ n(
|
|
1621
1621
|
"button",
|
|
@@ -1639,18 +1639,18 @@ const Ur = ({
|
|
|
1639
1639
|
)
|
|
1640
1640
|
] }),
|
|
1641
1641
|
/* @__PURE__ */ x("div", { className: "ll-expanded__header-actions", children: [
|
|
1642
|
-
|
|
1642
|
+
Z !== !1 && /* @__PURE__ */ n(
|
|
1643
1643
|
"button",
|
|
1644
1644
|
{
|
|
1645
1645
|
type: "button",
|
|
1646
1646
|
className: "ll-hbtn",
|
|
1647
|
-
onClick:
|
|
1647
|
+
onClick: Re,
|
|
1648
1648
|
"aria-label": "Minimize widget",
|
|
1649
1649
|
title: "Minimize",
|
|
1650
1650
|
children: /* @__PURE__ */ n(pn, {})
|
|
1651
1651
|
}
|
|
1652
1652
|
),
|
|
1653
|
-
|
|
1653
|
+
Ee !== !1 && /* @__PURE__ */ n(
|
|
1654
1654
|
"button",
|
|
1655
1655
|
{
|
|
1656
1656
|
type: "button",
|
|
@@ -1663,17 +1663,21 @@ const Ur = ({
|
|
|
1663
1663
|
)
|
|
1664
1664
|
] })
|
|
1665
1665
|
] }),
|
|
1666
|
-
|
|
1666
|
+
H && /* @__PURE__ */ x("div", { className: "ll-compact-status", "data-state": u, children: [
|
|
1667
1667
|
/* @__PURE__ */ n("span", { className: "ll-compact-status__dot", "aria-hidden": !0 }),
|
|
1668
1668
|
/* @__PURE__ */ n("span", { className: "ll-compact-status__label", children: u })
|
|
1669
1669
|
] })
|
|
1670
1670
|
] }) : (
|
|
1671
|
-
// Idle-state header
|
|
1672
|
-
//
|
|
1673
|
-
// and
|
|
1674
|
-
//
|
|
1675
|
-
|
|
1676
|
-
|
|
1671
|
+
// Idle-state header. In compactControls mode (mobile WIDGET +
|
|
1672
|
+
// every EMBEDDED card) we keep the header mounted but strip the
|
|
1673
|
+
// brand pill and the minimize button — the surface is too small
|
|
1674
|
+
// for either, AND there's nothing meaningful to minimize FROM
|
|
1675
|
+
// before a session starts. The X close button stays so visitors
|
|
1676
|
+
// can always dismiss; making the whole header disappear (the
|
|
1677
|
+
// pre-0.18.0 behavior) left users no way out short of scrolling
|
|
1678
|
+
// the page itself.
|
|
1679
|
+
/* @__PURE__ */ x("div", { className: "ll-expanded__header ll-expanded__header--idle", children: [
|
|
1680
|
+
!H && (Ct ? /* @__PURE__ */ x(
|
|
1677
1681
|
"a",
|
|
1678
1682
|
{
|
|
1679
1683
|
className: "ll-expanded__brand ll-expanded__brand--link",
|
|
@@ -1683,23 +1687,23 @@ const Ur = ({
|
|
|
1683
1687
|
"aria-label": "Powered by LiveLayer — opens livelayer.studio in a new tab",
|
|
1684
1688
|
title: "Powered by LiveLayer — visit livelayer.studio",
|
|
1685
1689
|
children: [
|
|
1686
|
-
/* @__PURE__ */ n(
|
|
1687
|
-
/* @__PURE__ */ n("span", { children:
|
|
1690
|
+
/* @__PURE__ */ n(Or, { size: 14, className: "ll-expanded__brand-mark" }),
|
|
1691
|
+
/* @__PURE__ */ n("span", { children: Ve })
|
|
1688
1692
|
]
|
|
1689
1693
|
}
|
|
1690
|
-
) : /* @__PURE__ */ n("span", { className: "ll-expanded__brand", children:
|
|
1694
|
+
) : /* @__PURE__ */ n("span", { className: "ll-expanded__brand", children: Ve })),
|
|
1691
1695
|
/* @__PURE__ */ x("div", { className: "ll-expanded__header-actions", children: [
|
|
1692
|
-
|
|
1696
|
+
!H && Z !== !1 && /* @__PURE__ */ n(
|
|
1693
1697
|
"button",
|
|
1694
1698
|
{
|
|
1695
1699
|
type: "button",
|
|
1696
1700
|
className: "ll-hbtn ll-hbtn--ghost",
|
|
1697
|
-
onClick:
|
|
1701
|
+
onClick: Re,
|
|
1698
1702
|
"aria-label": "Minimize widget",
|
|
1699
1703
|
children: /* @__PURE__ */ n(pn, {})
|
|
1700
1704
|
}
|
|
1701
1705
|
),
|
|
1702
|
-
|
|
1706
|
+
Ee !== !1 && /* @__PURE__ */ n(
|
|
1703
1707
|
"button",
|
|
1704
1708
|
{
|
|
1705
1709
|
type: "button",
|
|
@@ -1713,7 +1717,7 @@ const Ur = ({
|
|
|
1713
1717
|
] })
|
|
1714
1718
|
),
|
|
1715
1719
|
rt && /* @__PURE__ */ (() => {
|
|
1716
|
-
const
|
|
1720
|
+
const y = L ? "Resume session" : g === "disconnected" ? "Reconnect to agent" : "Start video call";
|
|
1717
1721
|
return /* @__PURE__ */ x(ze, { children: [
|
|
1718
1722
|
!I && /* @__PURE__ */ x(
|
|
1719
1723
|
"button",
|
|
@@ -1721,14 +1725,14 @@ const Ur = ({
|
|
|
1721
1725
|
type: "button",
|
|
1722
1726
|
className: "ll-expanded__play",
|
|
1723
1727
|
onClick: et,
|
|
1724
|
-
"aria-label":
|
|
1728
|
+
"aria-label": y,
|
|
1725
1729
|
children: [
|
|
1726
1730
|
/* @__PURE__ */ n("div", { className: "ll-expanded__play-circle", children: /* @__PURE__ */ n("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": !0, children: /* @__PURE__ */ n("polygon", { points: "6 3 20 12 6 21 6 3" }) }) }),
|
|
1727
|
-
|
|
1731
|
+
H && /* @__PURE__ */ n("span", { className: "ll-expanded__play-label", children: y })
|
|
1728
1732
|
]
|
|
1729
1733
|
}
|
|
1730
1734
|
),
|
|
1731
|
-
!
|
|
1735
|
+
!H && /* @__PURE__ */ x("div", { className: "ll-expanded__bottom ll-expanded__bottom--idle", children: [
|
|
1732
1736
|
i && /* @__PURE__ */ n("div", { className: "ll-expanded__transcript", children: /* @__PURE__ */ n("p", { className: "ll-expanded__transcript-text", children: i }) }),
|
|
1733
1737
|
/* @__PURE__ */ n(
|
|
1734
1738
|
"button",
|
|
@@ -1736,8 +1740,8 @@ const Ur = ({
|
|
|
1736
1740
|
type: "button",
|
|
1737
1741
|
className: "ll-expanded__cta",
|
|
1738
1742
|
onClick: et,
|
|
1739
|
-
"aria-label":
|
|
1740
|
-
children:
|
|
1743
|
+
"aria-label": y,
|
|
1744
|
+
children: y
|
|
1741
1745
|
}
|
|
1742
1746
|
)
|
|
1743
1747
|
] })
|
|
@@ -1751,7 +1755,7 @@ const Ur = ({
|
|
|
1751
1755
|
/* @__PURE__ */ n(
|
|
1752
1756
|
"div",
|
|
1753
1757
|
{
|
|
1754
|
-
ref:
|
|
1758
|
+
ref: ue,
|
|
1755
1759
|
className: S ? "ll-expanded__pip-host" : "ll-expanded__pip-host is-hidden"
|
|
1756
1760
|
}
|
|
1757
1761
|
),
|
|
@@ -1766,15 +1770,15 @@ const Ur = ({
|
|
|
1766
1770
|
}
|
|
1767
1771
|
),
|
|
1768
1772
|
We ? /* @__PURE__ */ x("div", { className: "ll-expanded__bottom", children: [
|
|
1769
|
-
!
|
|
1773
|
+
!H && it && /* @__PURE__ */ n(
|
|
1770
1774
|
"div",
|
|
1771
1775
|
{
|
|
1772
1776
|
className: "ll-expanded__transcript ll-expanded__transcript--agent",
|
|
1773
1777
|
"data-role": "agent",
|
|
1774
|
-
children: /* @__PURE__ */ n("p", { className: "ll-expanded__transcript-text", children:
|
|
1778
|
+
children: /* @__PURE__ */ n("p", { className: "ll-expanded__transcript-text", children: it })
|
|
1775
1779
|
}
|
|
1776
1780
|
),
|
|
1777
|
-
!
|
|
1781
|
+
!H && Ye && /* @__PURE__ */ n(
|
|
1778
1782
|
"div",
|
|
1779
1783
|
{
|
|
1780
1784
|
className: "ll-expanded__transcript ll-expanded__transcript--user",
|
|
@@ -1782,13 +1786,13 @@ const Ur = ({
|
|
|
1782
1786
|
children: /* @__PURE__ */ n("p", { className: "ll-expanded__transcript-text", children: Ye })
|
|
1783
1787
|
}
|
|
1784
1788
|
),
|
|
1785
|
-
!
|
|
1789
|
+
!Le && !H && /* @__PURE__ */ x("div", { className: "ll-toolbar", onClick: (y) => y.stopPropagation(), children: [
|
|
1786
1790
|
He && /* @__PURE__ */ n(
|
|
1787
1791
|
"button",
|
|
1788
1792
|
{
|
|
1789
1793
|
type: "button",
|
|
1790
1794
|
className: `ll-tool ${S ? "is-on" : ""}`,
|
|
1791
|
-
onClick:
|
|
1795
|
+
onClick: Ae,
|
|
1792
1796
|
"aria-label": S ? "Stop sharing screen" : "Share screen",
|
|
1793
1797
|
title: S ? "Stop sharing" : "Share screen",
|
|
1794
1798
|
children: /* @__PURE__ */ n(En, {})
|
|
@@ -1800,7 +1804,7 @@ const Ur = ({
|
|
|
1800
1804
|
{
|
|
1801
1805
|
type: "button",
|
|
1802
1806
|
className: `ll-tool ll-tool--left ${q ? "is-on" : ""}`,
|
|
1803
|
-
onClick:
|
|
1807
|
+
onClick: Ne,
|
|
1804
1808
|
"aria-label": q ? "Turn off camera" : "Turn on camera",
|
|
1805
1809
|
title: q ? "Stop camera" : "Start camera",
|
|
1806
1810
|
children: /* @__PURE__ */ n(Sn, {})
|
|
@@ -1812,24 +1816,24 @@ const Ur = ({
|
|
|
1812
1816
|
ref: pt,
|
|
1813
1817
|
type: "button",
|
|
1814
1818
|
className: `ll-tool ll-tool--right ${q ? "is-on" : ""}`,
|
|
1815
|
-
onClick: (
|
|
1816
|
-
|
|
1819
|
+
onClick: (y) => {
|
|
1820
|
+
y.stopPropagation(), se((J) => !J), Ue(!1);
|
|
1817
1821
|
},
|
|
1818
1822
|
"aria-label": "Camera devices",
|
|
1819
1823
|
"aria-haspopup": "listbox",
|
|
1820
1824
|
"aria-expanded": je,
|
|
1821
|
-
children: /* @__PURE__ */ n(
|
|
1825
|
+
children: /* @__PURE__ */ n(bt, {})
|
|
1822
1826
|
}
|
|
1823
1827
|
),
|
|
1824
|
-
je &&
|
|
1828
|
+
je && F.length > 0 && /* @__PURE__ */ n(
|
|
1825
1829
|
hn,
|
|
1826
1830
|
{
|
|
1827
1831
|
label: "Camera",
|
|
1828
|
-
devices:
|
|
1832
|
+
devices: F,
|
|
1829
1833
|
activeId: j,
|
|
1830
1834
|
anchorRef: pt,
|
|
1831
|
-
onPick: (
|
|
1832
|
-
|
|
1835
|
+
onPick: (y) => {
|
|
1836
|
+
se(!1), Fe(y);
|
|
1833
1837
|
}
|
|
1834
1838
|
}
|
|
1835
1839
|
)
|
|
@@ -1840,7 +1844,7 @@ const Ur = ({
|
|
|
1840
1844
|
{
|
|
1841
1845
|
type: "button",
|
|
1842
1846
|
className: `ll-tool ll-tool--left ${U ? "is-muted" : ""}`,
|
|
1843
|
-
onClick:
|
|
1847
|
+
onClick: Se,
|
|
1844
1848
|
"aria-label": U ? "Unmute microphone" : "Mute microphone",
|
|
1845
1849
|
title: U ? "Unmute" : "Mute",
|
|
1846
1850
|
children: /* @__PURE__ */ n(Nn, { muted: U })
|
|
@@ -1849,27 +1853,27 @@ const Ur = ({
|
|
|
1849
1853
|
/* @__PURE__ */ n(
|
|
1850
1854
|
"button",
|
|
1851
1855
|
{
|
|
1852
|
-
ref:
|
|
1856
|
+
ref: me,
|
|
1853
1857
|
type: "button",
|
|
1854
1858
|
className: `ll-tool ll-tool--right ${U ? "is-muted" : ""}`,
|
|
1855
|
-
onClick: (
|
|
1856
|
-
|
|
1859
|
+
onClick: (y) => {
|
|
1860
|
+
y.stopPropagation(), Ue((J) => !J), se(!1);
|
|
1857
1861
|
},
|
|
1858
1862
|
"aria-label": "Microphone devices",
|
|
1859
1863
|
"aria-haspopup": "listbox",
|
|
1860
|
-
"aria-expanded":
|
|
1861
|
-
children: /* @__PURE__ */ n(
|
|
1864
|
+
"aria-expanded": fe,
|
|
1865
|
+
children: /* @__PURE__ */ n(bt, {})
|
|
1862
1866
|
}
|
|
1863
1867
|
),
|
|
1864
|
-
|
|
1868
|
+
fe && P.length > 0 && /* @__PURE__ */ n(
|
|
1865
1869
|
hn,
|
|
1866
1870
|
{
|
|
1867
1871
|
label: "Microphone",
|
|
1868
1872
|
devices: P,
|
|
1869
|
-
activeId:
|
|
1870
|
-
anchorRef:
|
|
1871
|
-
onPick: (
|
|
1872
|
-
Ue(!1), Be(
|
|
1873
|
+
activeId: B,
|
|
1874
|
+
anchorRef: me,
|
|
1875
|
+
onPick: (y) => {
|
|
1876
|
+
Ue(!1), Be(y);
|
|
1873
1877
|
}
|
|
1874
1878
|
}
|
|
1875
1879
|
)
|
|
@@ -1878,11 +1882,11 @@ const Ur = ({
|
|
|
1878
1882
|
"button",
|
|
1879
1883
|
{
|
|
1880
1884
|
type: "button",
|
|
1881
|
-
className: `ll-tool ${
|
|
1882
|
-
onClick:
|
|
1883
|
-
"aria-label":
|
|
1884
|
-
title:
|
|
1885
|
-
children: /* @__PURE__ */ n(An, { muted:
|
|
1885
|
+
className: `ll-tool ${xe ? "is-muted" : ""}`,
|
|
1886
|
+
onClick: Ie,
|
|
1887
|
+
"aria-label": xe ? "Unmute speaker" : "Mute speaker",
|
|
1888
|
+
title: xe ? "Unmute speaker" : "Mute speaker",
|
|
1889
|
+
children: /* @__PURE__ */ n(An, { muted: xe })
|
|
1886
1890
|
}
|
|
1887
1891
|
),
|
|
1888
1892
|
/* @__PURE__ */ n(
|
|
@@ -1897,50 +1901,50 @@ const Ur = ({
|
|
|
1897
1901
|
}
|
|
1898
1902
|
)
|
|
1899
1903
|
] }),
|
|
1900
|
-
!
|
|
1901
|
-
|
|
1904
|
+
!Le && H && /* @__PURE__ */ n(
|
|
1905
|
+
Wr,
|
|
1902
1906
|
{
|
|
1903
1907
|
isMuted: U,
|
|
1904
|
-
onToggleMute:
|
|
1908
|
+
onToggleMute: Se,
|
|
1905
1909
|
isCameraEnabled: q,
|
|
1906
|
-
onToggleCamera:
|
|
1910
|
+
onToggleCamera: Ne,
|
|
1907
1911
|
allowCamera: de,
|
|
1908
1912
|
isScreenShareEnabled: S,
|
|
1909
|
-
onToggleScreenShare:
|
|
1913
|
+
onToggleScreenShare: Ae,
|
|
1910
1914
|
allowScreenShare: He,
|
|
1911
|
-
isSpeakerMuted:
|
|
1912
|
-
onToggleSpeaker:
|
|
1915
|
+
isSpeakerMuted: xe,
|
|
1916
|
+
onToggleSpeaker: Ie,
|
|
1913
1917
|
allowTyping: Oe,
|
|
1914
1918
|
isTypingOpen: ht,
|
|
1915
|
-
onToggleTyping:
|
|
1919
|
+
onToggleTyping: Pe,
|
|
1916
1920
|
onDisconnect: tt
|
|
1917
1921
|
}
|
|
1918
1922
|
),
|
|
1919
|
-
!
|
|
1923
|
+
!Le && Oe && (H ? ht : !0) && /* @__PURE__ */ x("form", { className: "ll-message-input", onSubmit: $e, children: [
|
|
1920
1924
|
/* @__PURE__ */ n(
|
|
1921
1925
|
"input",
|
|
1922
1926
|
{
|
|
1923
1927
|
type: "text",
|
|
1924
1928
|
className: "ll-message-input__field",
|
|
1925
1929
|
placeholder: "Message...",
|
|
1926
|
-
value:
|
|
1927
|
-
onChange: (
|
|
1930
|
+
value: Q,
|
|
1931
|
+
onChange: (y) => ge(y.target.value),
|
|
1928
1932
|
"aria-label": "Message the agent"
|
|
1929
1933
|
}
|
|
1930
1934
|
),
|
|
1931
|
-
|
|
1935
|
+
Q.trim() && /* @__PURE__ */ n(
|
|
1932
1936
|
"button",
|
|
1933
1937
|
{
|
|
1934
1938
|
type: "submit",
|
|
1935
1939
|
className: "ll-message-input__send",
|
|
1936
1940
|
"aria-label": "Send message",
|
|
1937
|
-
children: /* @__PURE__ */ n(
|
|
1941
|
+
children: /* @__PURE__ */ n(Vr, {})
|
|
1938
1942
|
}
|
|
1939
1943
|
)
|
|
1940
1944
|
] })
|
|
1941
1945
|
] }) : null,
|
|
1942
1946
|
(() => {
|
|
1943
|
-
if (b &&
|
|
1947
|
+
if (b && g !== "error")
|
|
1944
1948
|
return /* @__PURE__ */ x("div", { className: "ll-expanded__banner", role: "alert", children: [
|
|
1945
1949
|
/* @__PURE__ */ n("span", { children: b }),
|
|
1946
1950
|
/* @__PURE__ */ n(
|
|
@@ -1948,23 +1952,23 @@ const Ur = ({
|
|
|
1948
1952
|
{
|
|
1949
1953
|
type: "button",
|
|
1950
1954
|
className: "ll-expanded__banner-x",
|
|
1951
|
-
onClick:
|
|
1955
|
+
onClick: xt,
|
|
1952
1956
|
"aria-label": "Dismiss",
|
|
1953
1957
|
children: "×"
|
|
1954
1958
|
}
|
|
1955
1959
|
)
|
|
1956
1960
|
] });
|
|
1957
|
-
if (!I ||
|
|
1958
|
-
let
|
|
1959
|
-
return I === "MIC_PERMISSION_DENIED" ?
|
|
1960
|
-
/* @__PURE__ */ n("span", { children:
|
|
1961
|
+
if (!I || g !== "error") return null;
|
|
1962
|
+
let y = "Failed to connect", J = "Try again";
|
|
1963
|
+
return I === "MIC_PERMISSION_DENIED" ? y = "Microphone blocked. Allow access to talk." : I === "MIC_NOT_FOUND" ? y = "No microphone found. Plug one in + retry." : I === "MIC_UNAVAILABLE" ? y = "Mic unavailable. Check other apps using it." : I === "AGENT_TIMEOUT" ? y = "Agent didn't pick up. Try again." : I === "CONNECT_FAILED" ? y = "Connection failed. Check your network." : I.length < 80 && (y = I), /* @__PURE__ */ x("div", { className: "ll-expanded__banner ll-expanded__banner--error", role: "alert", children: [
|
|
1964
|
+
/* @__PURE__ */ n("span", { children: y }),
|
|
1961
1965
|
/* @__PURE__ */ n(
|
|
1962
1966
|
"button",
|
|
1963
1967
|
{
|
|
1964
1968
|
type: "button",
|
|
1965
1969
|
className: "ll-expanded__banner-retry",
|
|
1966
1970
|
onClick: ft,
|
|
1967
|
-
children:
|
|
1971
|
+
children: J
|
|
1968
1972
|
}
|
|
1969
1973
|
)
|
|
1970
1974
|
] });
|
|
@@ -1973,7 +1977,7 @@ const Ur = ({
|
|
|
1973
1977
|
}
|
|
1974
1978
|
);
|
|
1975
1979
|
};
|
|
1976
|
-
function
|
|
1980
|
+
function bt() {
|
|
1977
1981
|
return /* @__PURE__ */ n("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": !0, children: /* @__PURE__ */ n("polyline", { points: "6 9 12 15 18 9" }) });
|
|
1978
1982
|
}
|
|
1979
1983
|
function fn() {
|
|
@@ -2015,7 +2019,7 @@ function An({ muted: e }) {
|
|
|
2015
2019
|
] })
|
|
2016
2020
|
] });
|
|
2017
2021
|
}
|
|
2018
|
-
function
|
|
2022
|
+
function Vr() {
|
|
2019
2023
|
return /* @__PURE__ */ x("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: [
|
|
2020
2024
|
/* @__PURE__ */ n("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
|
|
2021
2025
|
/* @__PURE__ */ n("polyline", { points: "12 5 19 12 12 19" })
|
|
@@ -2090,7 +2094,7 @@ const hn = ({
|
|
|
2090
2094
|
),
|
|
2091
2095
|
document.body
|
|
2092
2096
|
);
|
|
2093
|
-
},
|
|
2097
|
+
}, Yr = [
|
|
2094
2098
|
// Accept any value (or empty) — `<input data-ll-private />` and
|
|
2095
2099
|
// `<input data-ll-private="true" />` both opt out. The bare attribute
|
|
2096
2100
|
// is the recommended spelling; "true" is preserved for back-compat.
|
|
@@ -2101,7 +2105,7 @@ const hn = ({
|
|
|
2101
2105
|
function zt(e) {
|
|
2102
2106
|
let t = e;
|
|
2103
2107
|
for (; t; ) {
|
|
2104
|
-
for (const r of
|
|
2108
|
+
for (const r of Yr)
|
|
2105
2109
|
if (t.matches(r)) return !0;
|
|
2106
2110
|
t = t.parentElement;
|
|
2107
2111
|
}
|
|
@@ -2116,7 +2120,7 @@ function Dt(e) {
|
|
|
2116
2120
|
}
|
|
2117
2121
|
return !0;
|
|
2118
2122
|
}
|
|
2119
|
-
const
|
|
2123
|
+
const wt = 4096, Gr = 20, Kr = 20, Jr = 10, Xr = 10, Zr = 30, Qr = 20, mn = 500, eo = [
|
|
2120
2124
|
'[data-ll-private="true"]',
|
|
2121
2125
|
".ll-widget",
|
|
2122
2126
|
"script",
|
|
@@ -2128,7 +2132,7 @@ function dt(e) {
|
|
|
2128
2132
|
if (e.getAttribute("aria-hidden") === "true" || e.hasAttribute("hidden")) return !0;
|
|
2129
2133
|
let t = e;
|
|
2130
2134
|
for (; t; ) {
|
|
2131
|
-
for (const r of
|
|
2135
|
+
for (const r of eo)
|
|
2132
2136
|
if (t.matches(r)) return !0;
|
|
2133
2137
|
t = t.parentElement;
|
|
2134
2138
|
}
|
|
@@ -2168,13 +2172,13 @@ function gn(e) {
|
|
|
2168
2172
|
const a = e.getAttribute("placeholder");
|
|
2169
2173
|
return a ? a.trim() : "";
|
|
2170
2174
|
}
|
|
2171
|
-
function
|
|
2175
|
+
function ie(e, t) {
|
|
2172
2176
|
return e.length <= t ? e : e.slice(0, t - 1) + "…";
|
|
2173
2177
|
}
|
|
2174
|
-
function
|
|
2178
|
+
function to(e) {
|
|
2175
2179
|
return e && e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 60) || null;
|
|
2176
2180
|
}
|
|
2177
|
-
function
|
|
2181
|
+
function no(e) {
|
|
2178
2182
|
const t = e.getAttribute("aria-label");
|
|
2179
2183
|
if (t) return t.trim().slice(0, 80);
|
|
2180
2184
|
const r = e.getAttribute("aria-labelledby");
|
|
@@ -2203,7 +2207,7 @@ function to(e) {
|
|
|
2203
2207
|
function Je(e) {
|
|
2204
2208
|
return e.length;
|
|
2205
2209
|
}
|
|
2206
|
-
function
|
|
2210
|
+
function ro(e, t = {}) {
|
|
2207
2211
|
const r = t.doc ?? (typeof document < "u" ? document : null);
|
|
2208
2212
|
if (!r)
|
|
2209
2213
|
return {
|
|
@@ -2221,13 +2225,13 @@ function no(e, t = {}) {
|
|
|
2221
2225
|
r.querySelectorAll("[data-ll-region]")
|
|
2222
2226
|
), l = [];
|
|
2223
2227
|
for (const b of s) {
|
|
2224
|
-
if (l.length >=
|
|
2228
|
+
if (l.length >= Jr) break;
|
|
2225
2229
|
if (dt(b) || !ut(b)) continue;
|
|
2226
|
-
const P = b.getAttribute("data-ll-region") ?? "",
|
|
2230
|
+
const P = b.getAttribute("data-ll-region") ?? "", B = b.getAttribute("data-ll-intent") ?? void 0, q = ie(
|
|
2227
2231
|
(b.innerText || b.textContent || "").trim(),
|
|
2228
2232
|
mn * 2
|
|
2229
2233
|
);
|
|
2230
|
-
!P || !q || l.push({ id: P, intent:
|
|
2234
|
+
!P || !q || l.push({ id: P, intent: B, text: q });
|
|
2231
2235
|
}
|
|
2232
2236
|
const c = [], p = ["H1", "H2", "H3", "H4", "H5", "H6"], w = Array.from(
|
|
2233
2237
|
r.querySelectorAll("h1, h2, h3, h4, h5, h6")
|
|
@@ -2235,100 +2239,100 @@ function no(e, t = {}) {
|
|
|
2235
2239
|
for (const b of w) {
|
|
2236
2240
|
if (dt(b) || !ut(b)) continue;
|
|
2237
2241
|
const P = (b.textContent || "").trim();
|
|
2238
|
-
P && c.push(`${b.tagName}: ${
|
|
2242
|
+
P && c.push(`${b.tagName}: ${ie(P, 200)}`);
|
|
2239
2243
|
}
|
|
2240
2244
|
const m = Array.from(r.querySelectorAll("p, li"));
|
|
2241
2245
|
for (const b of m) {
|
|
2242
2246
|
if (dt(b) || !ut(b) || p.includes(b.tagName)) continue;
|
|
2243
2247
|
const P = (b.textContent || "").trim();
|
|
2244
|
-
P.length > 10 && c.push(
|
|
2248
|
+
P.length > 10 && c.push(ie(P, mn));
|
|
2245
2249
|
}
|
|
2246
2250
|
const f = c.join(`
|
|
2247
2251
|
`), R = [], _ = Array.from(r.querySelectorAll("a[href]"));
|
|
2248
2252
|
for (const b of _) {
|
|
2249
|
-
if (R.length >=
|
|
2253
|
+
if (R.length >= Gr) break;
|
|
2250
2254
|
if (dt(b) || !ut(b)) continue;
|
|
2251
|
-
const P = b.getAttribute("href") || "",
|
|
2252
|
-
!P || !
|
|
2255
|
+
const P = b.getAttribute("href") || "", B = (b.textContent || "").trim();
|
|
2256
|
+
!P || !B || R.push({ href: P, text: ie(B, 100) });
|
|
2253
2257
|
}
|
|
2254
|
-
const
|
|
2258
|
+
const g = [], u = Array.from(
|
|
2255
2259
|
r.querySelectorAll(
|
|
2256
2260
|
"input, textarea, select"
|
|
2257
2261
|
)
|
|
2258
2262
|
);
|
|
2259
2263
|
for (const b of u) {
|
|
2260
|
-
if (
|
|
2264
|
+
if (g.length >= Kr) break;
|
|
2261
2265
|
if (dt(b) || !Dt(b) || !ut(b)) continue;
|
|
2262
|
-
const P = gn(b),
|
|
2263
|
-
P &&
|
|
2266
|
+
const P = gn(b), B = b instanceof HTMLInputElement ? b.type : b.tagName.toLowerCase();
|
|
2267
|
+
P && g.push({ label: ie(P, 100), type: B });
|
|
2264
2268
|
}
|
|
2265
2269
|
const h = Array.from(r.querySelectorAll("form")), L = [];
|
|
2266
2270
|
let A = 0;
|
|
2267
2271
|
for (const b of h) {
|
|
2268
|
-
if (L.length >=
|
|
2272
|
+
if (L.length >= Xr) break;
|
|
2269
2273
|
if (zt(b) || b.matches(".ll-widget *, .ll-widget")) continue;
|
|
2270
|
-
const P = b.getAttribute("id") || b.getAttribute("name") ||
|
|
2274
|
+
const P = b.getAttribute("id") || b.getAttribute("name") || to(b.getAttribute("data-ll-intent")) || `form_${A++}`, B = b.getAttribute("data-ll-intent") || no(b) || void 0, q = Array.from(
|
|
2271
2275
|
b.querySelectorAll(
|
|
2272
2276
|
"input, textarea, select"
|
|
2273
2277
|
)
|
|
2274
|
-
),
|
|
2275
|
-
let
|
|
2278
|
+
), re = [];
|
|
2279
|
+
let F = 0;
|
|
2276
2280
|
const j = /* @__PURE__ */ new Set();
|
|
2277
2281
|
for (const S of q) {
|
|
2278
|
-
if (
|
|
2282
|
+
if (re.length >= Zr) break;
|
|
2279
2283
|
if (!Dt(S)) continue;
|
|
2280
2284
|
if (S instanceof HTMLInputElement) {
|
|
2281
|
-
const
|
|
2282
|
-
if (
|
|
2285
|
+
const H = S.type;
|
|
2286
|
+
if (H === "submit" || H === "button" || H === "reset" || H === "hidden" || H === "image" || H === "file") continue;
|
|
2283
2287
|
}
|
|
2284
|
-
const
|
|
2285
|
-
let de =
|
|
2286
|
-
j.has(de) && (de = `${de}__${
|
|
2287
|
-
const He = gn(S) || de, Oe = S instanceof HTMLInputElement ? S.type : S.tagName.toLowerCase(),
|
|
2288
|
+
const ee = S.getAttribute("name") || "", xe = S.getAttribute("id") || "";
|
|
2289
|
+
let de = ee || xe || `field_${F}`;
|
|
2290
|
+
j.has(de) && (de = `${de}__${F}`), j.add(de), F++;
|
|
2291
|
+
const He = gn(S) || de, Oe = S instanceof HTMLInputElement ? S.type : S.tagName.toLowerCase(), Z = {
|
|
2288
2292
|
name: de,
|
|
2289
|
-
label:
|
|
2293
|
+
label: ie(He, 100),
|
|
2290
2294
|
type: Oe
|
|
2291
2295
|
};
|
|
2292
|
-
S.required === !0 && (
|
|
2293
|
-
const
|
|
2294
|
-
if (
|
|
2295
|
-
const
|
|
2296
|
-
if (
|
|
2297
|
-
const Y = parseInt(
|
|
2298
|
-
!Number.isNaN(Y) && Y >= 0 && (
|
|
2296
|
+
S.required === !0 && (Z.required = !0);
|
|
2297
|
+
const Ee = S.getAttribute("placeholder");
|
|
2298
|
+
if (Ee && (Z.placeholder = ie(Ee.trim(), 100)), S instanceof HTMLInputElement || S instanceof HTMLTextAreaElement) {
|
|
2299
|
+
const H = S.getAttribute("minlength");
|
|
2300
|
+
if (H !== null) {
|
|
2301
|
+
const Y = parseInt(H, 10);
|
|
2302
|
+
!Number.isNaN(Y) && Y >= 0 && (Z.minLength = Y);
|
|
2299
2303
|
}
|
|
2300
|
-
const
|
|
2301
|
-
if (
|
|
2302
|
-
const Y = parseInt(
|
|
2303
|
-
!Number.isNaN(Y) && Y >= 0 && (
|
|
2304
|
+
const le = S.getAttribute("maxlength");
|
|
2305
|
+
if (le !== null) {
|
|
2306
|
+
const Y = parseInt(le, 10);
|
|
2307
|
+
!Number.isNaN(Y) && Y >= 0 && (Z.maxLength = Y);
|
|
2304
2308
|
}
|
|
2305
2309
|
}
|
|
2306
2310
|
if (S instanceof HTMLInputElement) {
|
|
2307
|
-
const
|
|
2308
|
-
|
|
2309
|
-
const
|
|
2310
|
-
|
|
2311
|
+
const H = S.getAttribute("min");
|
|
2312
|
+
H !== null && (Z.min = ie(H, 50));
|
|
2313
|
+
const le = S.getAttribute("max");
|
|
2314
|
+
le !== null && (Z.max = ie(le, 50));
|
|
2311
2315
|
const Y = S.getAttribute("step");
|
|
2312
|
-
Y !== null && (
|
|
2313
|
-
const
|
|
2314
|
-
|
|
2316
|
+
Y !== null && (Z.step = ie(Y, 20));
|
|
2317
|
+
const pe = S.getAttribute("pattern");
|
|
2318
|
+
pe !== null && (Z.pattern = ie(pe, 200));
|
|
2315
2319
|
const K = (S.getAttribute("autocomplete") || "").toLowerCase();
|
|
2316
|
-
K && K !== "off" && !K.startsWith("cc-") && (
|
|
2320
|
+
K && K !== "off" && !K.startsWith("cc-") && (Z.autocomplete = ie(K, 50));
|
|
2317
2321
|
}
|
|
2318
2322
|
if (S instanceof HTMLSelectElement) {
|
|
2319
|
-
const
|
|
2320
|
-
for (let
|
|
2321
|
-
const Y = S.options[
|
|
2323
|
+
const H = [];
|
|
2324
|
+
for (let le = 0; le < S.options.length && !(H.length >= Qr); le++) {
|
|
2325
|
+
const Y = S.options[le];
|
|
2322
2326
|
if (!Y || Y.disabled) continue;
|
|
2323
|
-
const
|
|
2324
|
-
!
|
|
2327
|
+
const pe = Y.value || "", K = (Y.textContent || "").trim() || pe;
|
|
2328
|
+
!pe && !K || H.push({ value: pe, label: ie(K, 60) });
|
|
2325
2329
|
}
|
|
2326
|
-
|
|
2330
|
+
H.length > 0 && (Z.options = H);
|
|
2327
2331
|
}
|
|
2328
|
-
const
|
|
2329
|
-
|
|
2332
|
+
const Le = typeof S.validationMessage == "string" ? S.validationMessage : "";
|
|
2333
|
+
Le && (Z.validationMessage = ie(Le, 200)), re.push(Z);
|
|
2330
2334
|
}
|
|
2331
|
-
L.push({ id: P, intent:
|
|
2335
|
+
L.push({ id: P, intent: B, fields: re });
|
|
2332
2336
|
}
|
|
2333
2337
|
const I = {
|
|
2334
2338
|
url: o,
|
|
@@ -2337,30 +2341,30 @@ function no(e, t = {}) {
|
|
|
2337
2341
|
regions: l,
|
|
2338
2342
|
visibleText: f,
|
|
2339
2343
|
visibleLinks: R,
|
|
2340
|
-
visibleFields:
|
|
2344
|
+
visibleFields: g,
|
|
2341
2345
|
forms: L,
|
|
2342
2346
|
extras: e
|
|
2343
2347
|
};
|
|
2344
2348
|
let U = Je(JSON.stringify(I.regions)) + Je(I.visibleText) + Je(JSON.stringify(I.visibleLinks)) + Je(JSON.stringify(I.visibleFields));
|
|
2345
|
-
for (; U >
|
|
2349
|
+
for (; U > wt && I.visibleFields.length > 0; )
|
|
2346
2350
|
I.visibleFields.pop(), U = Je(JSON.stringify(I.visibleFields));
|
|
2347
|
-
for (; U >
|
|
2351
|
+
for (; U > wt && I.visibleLinks.length > 0; )
|
|
2348
2352
|
I.visibleLinks.pop(), U -= 80;
|
|
2349
|
-
return Je(I.visibleText) >
|
|
2353
|
+
return Je(I.visibleText) > wt && (I.visibleText = ie(I.visibleText, wt - 100)), I;
|
|
2350
2354
|
}
|
|
2351
2355
|
let Xe = null;
|
|
2352
2356
|
function yn(e, t = {}) {
|
|
2353
2357
|
const r = Date.now(), a = `${typeof window < "u" && window.location.pathname || "/"}::${typeof window < "u" ? window.scrollY : 0}`;
|
|
2354
2358
|
if (Xe && Xe.key === a && r - Xe.at < 1e3)
|
|
2355
2359
|
return Xe.ctx;
|
|
2356
|
-
const i =
|
|
2360
|
+
const i = ro(e, t);
|
|
2357
2361
|
return Xe = { key: a, at: r, ctx: i }, i;
|
|
2358
2362
|
}
|
|
2359
|
-
function
|
|
2363
|
+
function oo() {
|
|
2360
2364
|
Xe = null;
|
|
2361
2365
|
}
|
|
2362
|
-
const
|
|
2363
|
-
function
|
|
2366
|
+
const io = 200;
|
|
2367
|
+
function lo(e) {
|
|
2364
2368
|
const t = String(e.href || "");
|
|
2365
2369
|
return {
|
|
2366
2370
|
href: t,
|
|
@@ -2370,18 +2374,18 @@ function io(e) {
|
|
|
2370
2374
|
description: e.description
|
|
2371
2375
|
};
|
|
2372
2376
|
}
|
|
2373
|
-
function
|
|
2377
|
+
function ao(e) {
|
|
2374
2378
|
return !(!e || e.startsWith("#") || e.startsWith("javascript:") || e.startsWith("mailto:") || e.startsWith("tel:"));
|
|
2375
2379
|
}
|
|
2376
|
-
function
|
|
2380
|
+
function so(e) {
|
|
2377
2381
|
const t = e ?? (typeof document < "u" ? document : null);
|
|
2378
2382
|
if (!t) return [];
|
|
2379
2383
|
const r = typeof window < "u" && window.location.origin || "", o = /* @__PURE__ */ new Set(), a = [], i = Array.from(t.querySelectorAll("a[href]"));
|
|
2380
2384
|
for (const s of i) {
|
|
2381
|
-
if (a.length >=
|
|
2385
|
+
if (a.length >= io) break;
|
|
2382
2386
|
if (zt(s)) continue;
|
|
2383
2387
|
const l = s.getAttribute("href") || "";
|
|
2384
|
-
if (!
|
|
2388
|
+
if (!ao(l)) continue;
|
|
2385
2389
|
let c = l, p = !0;
|
|
2386
2390
|
try {
|
|
2387
2391
|
if (typeof window < "u") {
|
|
@@ -2399,15 +2403,15 @@ function ao(e) {
|
|
|
2399
2403
|
return a;
|
|
2400
2404
|
}
|
|
2401
2405
|
let Ze = null;
|
|
2402
|
-
const
|
|
2406
|
+
const co = 5e3;
|
|
2403
2407
|
function Rt() {
|
|
2404
2408
|
const e = Date.now(), t = typeof window < "u" && window.location.pathname || "/";
|
|
2405
|
-
if (Ze && Ze.pathname === t && e - Ze.at <
|
|
2409
|
+
if (Ze && Ze.pathname === t && e - Ze.at < co)
|
|
2406
2410
|
return Ze.routes;
|
|
2407
|
-
const r =
|
|
2411
|
+
const r = so();
|
|
2408
2412
|
return Ze = { at: e, pathname: t, routes: r }, r;
|
|
2409
2413
|
}
|
|
2410
|
-
function
|
|
2414
|
+
function uo() {
|
|
2411
2415
|
Ze = null;
|
|
2412
2416
|
}
|
|
2413
2417
|
function vn(e) {
|
|
@@ -2418,10 +2422,10 @@ function vn(e) {
|
|
|
2418
2422
|
}
|
|
2419
2423
|
return !0;
|
|
2420
2424
|
}
|
|
2421
|
-
function
|
|
2425
|
+
function fo(e, t) {
|
|
2422
2426
|
return e.getAttribute("name") || e.getAttribute("id") || `field_${t}`;
|
|
2423
2427
|
}
|
|
2424
|
-
function
|
|
2428
|
+
function po(e, t) {
|
|
2425
2429
|
if (!t) return null;
|
|
2426
2430
|
try {
|
|
2427
2431
|
const i = e.querySelector(
|
|
@@ -2437,7 +2441,7 @@ function fo(e, t) {
|
|
|
2437
2441
|
const a = /* @__PURE__ */ new Map();
|
|
2438
2442
|
for (const i of r) {
|
|
2439
2443
|
if (!vn(i)) continue;
|
|
2440
|
-
const s =
|
|
2444
|
+
const s = fo(i, o);
|
|
2441
2445
|
let l = s;
|
|
2442
2446
|
if (a.has(s) && (l = `${s}__${o}`), l === t) return i;
|
|
2443
2447
|
a.set(s, i), o++;
|
|
@@ -2445,14 +2449,14 @@ function fo(e, t) {
|
|
|
2445
2449
|
return null;
|
|
2446
2450
|
}
|
|
2447
2451
|
function bn(e, t) {
|
|
2448
|
-
const r =
|
|
2452
|
+
const r = po(e, t);
|
|
2449
2453
|
return r ? Dt(r) ? { el: r } : { el: null, reason: "private" } : { el: null, reason: "not_found" };
|
|
2450
2454
|
}
|
|
2451
|
-
function
|
|
2455
|
+
function ho(e, t) {
|
|
2452
2456
|
const r = e instanceof HTMLInputElement ? HTMLInputElement.prototype : e instanceof HTMLTextAreaElement ? HTMLTextAreaElement.prototype : HTMLSelectElement.prototype, o = Object.getOwnPropertyDescriptor(r, "value"), a = o == null ? void 0 : o.set;
|
|
2453
2457
|
a ? a.call(e, t) : e.value = t;
|
|
2454
2458
|
}
|
|
2455
|
-
function
|
|
2459
|
+
function mo(e, t, r = {}) {
|
|
2456
2460
|
const o = r.triggerInput ?? !0, a = r.triggerChange ?? !0;
|
|
2457
2461
|
if (e instanceof HTMLInputElement && (e.type === "checkbox" || e.type === "radio")) {
|
|
2458
2462
|
const i = Object.getOwnPropertyDescriptor(
|
|
@@ -2462,7 +2466,7 @@ function ho(e, t, r = {}) {
|
|
|
2462
2466
|
s ? s.call(e, l) : e.checked = l, o && e.dispatchEvent(new Event("input", { bubbles: !0 })), a && e.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
2463
2467
|
return;
|
|
2464
2468
|
}
|
|
2465
|
-
|
|
2469
|
+
ho(e, t), o && e.dispatchEvent(new Event("input", { bubbles: !0 })), a && e.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
2466
2470
|
}
|
|
2467
2471
|
function wn(e, t) {
|
|
2468
2472
|
if (!t) return null;
|
|
@@ -2485,7 +2489,7 @@ function wn(e, t) {
|
|
|
2485
2489
|
const i = Array.from(e.querySelectorAll("form"));
|
|
2486
2490
|
for (const s of i) {
|
|
2487
2491
|
const l = s.getAttribute("data-ll-intent");
|
|
2488
|
-
if (l &&
|
|
2492
|
+
if (l && go(l) === t) return s;
|
|
2489
2493
|
}
|
|
2490
2494
|
if (/^form_\d+$/.test(t)) {
|
|
2491
2495
|
const s = parseInt(t.slice(5), 10);
|
|
@@ -2498,10 +2502,10 @@ function wn(e, t) {
|
|
|
2498
2502
|
}
|
|
2499
2503
|
return null;
|
|
2500
2504
|
}
|
|
2501
|
-
function
|
|
2505
|
+
function go(e) {
|
|
2502
2506
|
return e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 60) || null;
|
|
2503
2507
|
}
|
|
2504
|
-
function
|
|
2508
|
+
function yo() {
|
|
2505
2509
|
if (typeof window > "u" || typeof document > "u")
|
|
2506
2510
|
return !1;
|
|
2507
2511
|
const e = document.scrollingElement || document.documentElement;
|
|
@@ -2509,19 +2513,19 @@ function go() {
|
|
|
2509
2513
|
const t = window.getComputedStyle(e);
|
|
2510
2514
|
return !(t.overflowY === "hidden" || t.overflowY === "clip");
|
|
2511
2515
|
}
|
|
2512
|
-
function
|
|
2516
|
+
function vo(e) {
|
|
2513
2517
|
if (!(e instanceof HTMLElement)) return !1;
|
|
2514
2518
|
const r = window.getComputedStyle(e).overflowY;
|
|
2515
2519
|
return !(r !== "auto" && r !== "scroll" || e.scrollHeight <= e.clientHeight + 2);
|
|
2516
2520
|
}
|
|
2517
|
-
function
|
|
2521
|
+
function bo() {
|
|
2518
2522
|
if (typeof document > "u") return null;
|
|
2519
2523
|
const e = Array.from(
|
|
2520
2524
|
document.querySelectorAll("body, body *")
|
|
2521
2525
|
);
|
|
2522
2526
|
let t = null, r = 0;
|
|
2523
2527
|
for (const o of e) {
|
|
2524
|
-
if (!
|
|
2528
|
+
if (!vo(o)) continue;
|
|
2525
2529
|
const a = o.getBoundingClientRect();
|
|
2526
2530
|
if (a.bottom <= 0 || a.top >= window.innerHeight || a.right <= 0 || a.left >= window.innerWidth || a.width <= 0 || a.height <= 0 || o.closest(".ll-widget")) continue;
|
|
2527
2531
|
const i = a.width * a.height;
|
|
@@ -2529,24 +2533,24 @@ function vo() {
|
|
|
2529
2533
|
}
|
|
2530
2534
|
return t;
|
|
2531
2535
|
}
|
|
2532
|
-
function
|
|
2536
|
+
function wo() {
|
|
2533
2537
|
if (typeof window > "u")
|
|
2534
2538
|
return null;
|
|
2535
|
-
if (
|
|
2536
|
-
const e =
|
|
2539
|
+
if (yo()) return window;
|
|
2540
|
+
const e = bo();
|
|
2537
2541
|
return e || window;
|
|
2538
2542
|
}
|
|
2539
2543
|
function _n(e) {
|
|
2540
2544
|
return e instanceof Window ? e.innerHeight || 0 : e.clientHeight || 0;
|
|
2541
2545
|
}
|
|
2542
|
-
function
|
|
2546
|
+
function _o(e) {
|
|
2543
2547
|
var t, r;
|
|
2544
2548
|
return e instanceof Window ? typeof document > "u" ? 0 : Math.max(
|
|
2545
2549
|
((t = document.body) == null ? void 0 : t.scrollHeight) ?? 0,
|
|
2546
2550
|
((r = document.documentElement) == null ? void 0 : r.scrollHeight) ?? 0
|
|
2547
2551
|
) : e.scrollHeight - e.clientHeight;
|
|
2548
2552
|
}
|
|
2549
|
-
const
|
|
2553
|
+
const xo = /* @__PURE__ */ new Set([
|
|
2550
2554
|
"agent_state",
|
|
2551
2555
|
"avatar_stream_ready",
|
|
2552
2556
|
"avatar_active",
|
|
@@ -2599,7 +2603,7 @@ const _o = /* @__PURE__ */ new Set([
|
|
|
2599
2603
|
defaultDisplayMode: f = "expanded",
|
|
2600
2604
|
onDisplayModeChange: R,
|
|
2601
2605
|
position: _ = "bottom-right",
|
|
2602
|
-
mobileBreakpoint:
|
|
2606
|
+
mobileBreakpoint: g = 640,
|
|
2603
2607
|
persistKey: u = "ll-widget",
|
|
2604
2608
|
disablePersistence: h = !1,
|
|
2605
2609
|
teamMembers: L,
|
|
@@ -2608,79 +2612,79 @@ const _o = /* @__PURE__ */ new Set([
|
|
|
2608
2612
|
idleLoopUrl: U,
|
|
2609
2613
|
greeting: b,
|
|
2610
2614
|
avatarImageUrl: P,
|
|
2611
|
-
agentName:
|
|
2615
|
+
agentName: B,
|
|
2612
2616
|
branding: q = {},
|
|
2613
|
-
allowCamera:
|
|
2614
|
-
allowScreenShare:
|
|
2617
|
+
allowCamera: re = !0,
|
|
2618
|
+
allowScreenShare: F = !0,
|
|
2615
2619
|
allowTyping: j = !0,
|
|
2616
2620
|
showMinimize: S,
|
|
2617
|
-
showClose:
|
|
2618
|
-
chromeless:
|
|
2621
|
+
showClose: ee,
|
|
2622
|
+
chromeless: xe = !1,
|
|
2619
2623
|
floatingChromeContainer: de = null,
|
|
2620
2624
|
compactControls: He = !1,
|
|
2621
2625
|
transforming: Oe = !1,
|
|
2622
|
-
transformingLabel:
|
|
2623
|
-
showOn:
|
|
2624
|
-
hideOn:
|
|
2625
|
-
pathname:
|
|
2626
|
-
onNavigate:
|
|
2626
|
+
transformingLabel: Z = "Transforming…",
|
|
2627
|
+
showOn: Ee,
|
|
2628
|
+
hideOn: Le,
|
|
2629
|
+
pathname: H,
|
|
2630
|
+
onNavigate: le,
|
|
2627
2631
|
onScrollToSelector: Y,
|
|
2628
|
-
getPageContext:
|
|
2632
|
+
getPageContext: pe,
|
|
2629
2633
|
pageContextExtras: K,
|
|
2630
2634
|
getRoutes: et,
|
|
2631
2635
|
onScrollPage: tt,
|
|
2632
2636
|
onClick: ft,
|
|
2633
2637
|
capabilities: nt,
|
|
2634
|
-
onConnect:
|
|
2638
|
+
onConnect: Se,
|
|
2635
2639
|
onDisconnect: Be,
|
|
2636
|
-
onTranscript:
|
|
2640
|
+
onTranscript: Ne,
|
|
2637
2641
|
onAgentState: Fe,
|
|
2638
|
-
onConnectionStateChange:
|
|
2639
|
-
onAgentEvent:
|
|
2640
|
-
onAgentCommand:
|
|
2641
|
-
onCollect:
|
|
2642
|
+
onConnectionStateChange: Ae,
|
|
2643
|
+
onAgentEvent: Ie,
|
|
2644
|
+
onAgentCommand: Me,
|
|
2645
|
+
onCollect: Re,
|
|
2642
2646
|
controlledSession: $,
|
|
2643
|
-
className:
|
|
2644
|
-
style:
|
|
2647
|
+
className: xt,
|
|
2648
|
+
style: Te,
|
|
2645
2649
|
zIndex: We = 2147483647
|
|
2646
|
-
} = t,
|
|
2650
|
+
} = t, he = br(H), rt = Er(he, Ee, Le);
|
|
2647
2651
|
T(() => {
|
|
2648
|
-
|
|
2649
|
-
}, [
|
|
2650
|
-
const
|
|
2652
|
+
oo(), uo();
|
|
2653
|
+
}, [he]);
|
|
2654
|
+
const De = A !== void 0, [qe, Lt] = N(() => {
|
|
2651
2655
|
var v;
|
|
2652
2656
|
return A ?? ((v = L == null ? void 0 : L[0]) == null ? void 0 : v.id);
|
|
2653
|
-
}), Ce =
|
|
2657
|
+
}), Ce = De ? A : qe, ae = Qe(
|
|
2654
2658
|
() => (L == null ? void 0 : L.find((v) => v.id === Ce)) ?? null,
|
|
2655
2659
|
[L, Ce]
|
|
2656
|
-
), ot = (
|
|
2660
|
+
), ot = (ae == null ? void 0 : ae.agentId) ?? o, ue = p === "EMBEDDED", fe = yr(g), [Ue, je] = mr({
|
|
2657
2661
|
value: m,
|
|
2658
2662
|
defaultValue: f,
|
|
2659
2663
|
onChange: R,
|
|
2660
2664
|
persistKey: u,
|
|
2661
|
-
disablePersistence:
|
|
2662
|
-
}),
|
|
2663
|
-
} : je, pt = S ?? !
|
|
2664
|
-
|
|
2665
|
-
const Et = M(
|
|
2666
|
-
Et.current =
|
|
2667
|
-
function
|
|
2665
|
+
disablePersistence: ue || h
|
|
2666
|
+
}), se = ue ? "expanded" : Ue, me = ue ? () => {
|
|
2667
|
+
} : je, pt = S ?? !ue, ht = ee ?? !ue, kt = He || !ue && fe, Pe = nr(), Q = or(), ge = lr(), $e = ar(), Ve = sr(), [Ct, ye] = N(!1), [ve, it] = N(!1), [Ye, lt] = N(!1), [mt, y] = N(!1), [J, Rn] = N(!1), gt = Nr({ baseUrl: i, config: c }), yt = M(gt);
|
|
2668
|
+
yt.current = gt;
|
|
2669
|
+
const Et = M(le), St = M(Y), Nt = M(tt), At = M(ft), Ht = M(pe), Ot = M(K), Bt = M(et), It = M(nt), be = M(null);
|
|
2670
|
+
Et.current = le, St.current = Y, Nt.current = tt, At.current = ft, Ht.current = pe, Ot.current = K, Bt.current = et, It.current = nt;
|
|
2671
|
+
function we(v) {
|
|
2668
2672
|
const d = It.current;
|
|
2669
2673
|
return d ? d.includes(v) : !0;
|
|
2670
2674
|
}
|
|
2671
|
-
function
|
|
2675
|
+
function _e(v, d) {
|
|
2672
2676
|
console.warn(
|
|
2673
2677
|
`[LiveLayer] Agent command "${v}" blocked — capability "${d}" not in allowlist. See https://livelayer.studio/docs/react/capabilities`
|
|
2674
2678
|
);
|
|
2675
2679
|
}
|
|
2676
2680
|
const at = E(
|
|
2677
2681
|
(v) => {
|
|
2678
|
-
var
|
|
2682
|
+
var X, oe, ke, ct;
|
|
2679
2683
|
const d = v;
|
|
2680
2684
|
if (!(!d.type || typeof d.type != "string")) {
|
|
2681
|
-
if (
|
|
2682
|
-
if (!
|
|
2683
|
-
|
|
2685
|
+
if (Ie == null || Ie({ eventName: d.type, data: v }), d.type === "navigate") {
|
|
2686
|
+
if (!we("navigate")) {
|
|
2687
|
+
_e("navigate", "navigate");
|
|
2684
2688
|
return;
|
|
2685
2689
|
}
|
|
2686
2690
|
const k = typeof d.href == "string" ? d.href : null;
|
|
@@ -2690,7 +2694,7 @@ const _o = /* @__PURE__ */ new Set([
|
|
|
2690
2694
|
);
|
|
2691
2695
|
return;
|
|
2692
2696
|
}
|
|
2693
|
-
if (
|
|
2697
|
+
if (yt.current.playPageChange(), Et.current) {
|
|
2694
2698
|
try {
|
|
2695
2699
|
Et.current(k);
|
|
2696
2700
|
} catch (D) {
|
|
@@ -2722,8 +2726,8 @@ const _o = /* @__PURE__ */ new Set([
|
|
|
2722
2726
|
return;
|
|
2723
2727
|
}
|
|
2724
2728
|
if (d.type === "scroll_to") {
|
|
2725
|
-
if (!
|
|
2726
|
-
|
|
2729
|
+
if (!we("scroll")) {
|
|
2730
|
+
_e("scroll_to", "scroll");
|
|
2727
2731
|
return;
|
|
2728
2732
|
}
|
|
2729
2733
|
const k = typeof d.selector == "string" ? d.selector : null;
|
|
@@ -2764,23 +2768,23 @@ const _o = /* @__PURE__ */ new Set([
|
|
|
2764
2768
|
return;
|
|
2765
2769
|
}
|
|
2766
2770
|
if (d.type === "request_page_context") {
|
|
2767
|
-
if (!
|
|
2768
|
-
|
|
2771
|
+
if (!we("read_page")) {
|
|
2772
|
+
_e("request_page_context", "read_page");
|
|
2769
2773
|
return;
|
|
2770
2774
|
}
|
|
2771
|
-
const k = typeof d.requestId == "string" ? d.requestId : void 0, D = (
|
|
2772
|
-
const z = D,
|
|
2773
|
-
if (
|
|
2775
|
+
const k = typeof d.requestId == "string" ? d.requestId : void 0, D = (X = be.current) == null ? void 0 : X.call(be), W = (G) => {
|
|
2776
|
+
const z = D, ne = z == null ? void 0 : z.localParticipant;
|
|
2777
|
+
if (ne != null && ne.publishData)
|
|
2774
2778
|
try {
|
|
2775
2779
|
const ce = k ? { ...G, requestId: k } : G, Ke = new TextEncoder().encode(JSON.stringify(ce));
|
|
2776
|
-
|
|
2780
|
+
ne.publishData(Ke, { reliable: !0 });
|
|
2777
2781
|
} catch (ce) {
|
|
2778
2782
|
console.warn("[LiveLayer] publishData failed.", ce);
|
|
2779
2783
|
}
|
|
2780
|
-
},
|
|
2784
|
+
}, O = Ot.current, V = Ht.current;
|
|
2781
2785
|
try {
|
|
2782
2786
|
if (V) {
|
|
2783
|
-
const G = V(
|
|
2787
|
+
const G = V(O);
|
|
2784
2788
|
if (G instanceof Promise) {
|
|
2785
2789
|
W({ type: "page_context_pending" }), G.then((z) => W({ type: "page_context", context: z })).catch((z) => {
|
|
2786
2790
|
console.warn(
|
|
@@ -2788,7 +2792,7 @@ const _o = /* @__PURE__ */ new Set([
|
|
|
2788
2792
|
z
|
|
2789
2793
|
), W({
|
|
2790
2794
|
type: "page_context",
|
|
2791
|
-
context: yn(
|
|
2795
|
+
context: yn(O)
|
|
2792
2796
|
});
|
|
2793
2797
|
});
|
|
2794
2798
|
return;
|
|
@@ -2798,7 +2802,7 @@ const _o = /* @__PURE__ */ new Set([
|
|
|
2798
2802
|
}
|
|
2799
2803
|
W({
|
|
2800
2804
|
type: "page_context",
|
|
2801
|
-
context: yn(
|
|
2805
|
+
context: yn(O)
|
|
2802
2806
|
});
|
|
2803
2807
|
} catch (G) {
|
|
2804
2808
|
console.warn(
|
|
@@ -2806,14 +2810,14 @@ const _o = /* @__PURE__ */ new Set([
|
|
|
2806
2810
|
G
|
|
2807
2811
|
), W({
|
|
2808
2812
|
type: "page_context",
|
|
2809
|
-
context: { url: "", title: "", pathname: "/", regions: [], visibleText: "", visibleLinks: [], visibleFields: [], forms: [], extras:
|
|
2813
|
+
context: { url: "", title: "", pathname: "/", regions: [], visibleText: "", visibleLinks: [], visibleFields: [], forms: [], extras: O }
|
|
2810
2814
|
});
|
|
2811
2815
|
}
|
|
2812
2816
|
return;
|
|
2813
2817
|
}
|
|
2814
2818
|
if (d.type === "scroll_page") {
|
|
2815
|
-
if (!
|
|
2816
|
-
|
|
2819
|
+
if (!we("scroll")) {
|
|
2820
|
+
_e("scroll_page", "scroll");
|
|
2817
2821
|
return;
|
|
2818
2822
|
}
|
|
2819
2823
|
const k = d.direction;
|
|
@@ -2836,17 +2840,17 @@ const _o = /* @__PURE__ */ new Set([
|
|
|
2836
2840
|
return;
|
|
2837
2841
|
}
|
|
2838
2842
|
if (typeof window > "u") return;
|
|
2839
|
-
const W = { behavior: D },
|
|
2840
|
-
|
|
2843
|
+
const W = { behavior: D }, O = wo(), V = (z) => {
|
|
2844
|
+
O instanceof Window ? O.scrollBy({ top: z, ...W }) : O.scrollBy({ top: z, ...W });
|
|
2841
2845
|
}, G = (z) => {
|
|
2842
|
-
|
|
2846
|
+
O instanceof Window ? O.scrollTo({ top: z, ...W }) : O.scrollTo({ top: z, ...W });
|
|
2843
2847
|
};
|
|
2844
|
-
k === "up" ? V(-_n(
|
|
2848
|
+
k === "up" ? V(-_n(O)) : k === "down" ? V(_n(O)) : G(k === "top" ? 0 : _o(O));
|
|
2845
2849
|
return;
|
|
2846
2850
|
}
|
|
2847
2851
|
if (d.type === "click") {
|
|
2848
|
-
if (!
|
|
2849
|
-
|
|
2852
|
+
if (!we("click")) {
|
|
2853
|
+
_e("click", "click");
|
|
2850
2854
|
return;
|
|
2851
2855
|
}
|
|
2852
2856
|
const k = typeof d.selector == "string" ? d.selector : null;
|
|
@@ -2884,16 +2888,16 @@ const _o = /* @__PURE__ */ new Set([
|
|
|
2884
2888
|
);
|
|
2885
2889
|
return;
|
|
2886
2890
|
}
|
|
2887
|
-
(
|
|
2891
|
+
(oe = D.click) == null || oe.call(D);
|
|
2888
2892
|
return;
|
|
2889
2893
|
}
|
|
2890
2894
|
if (d.type === "fill_form" || d.type === "focus_field") {
|
|
2891
|
-
if (!
|
|
2892
|
-
|
|
2895
|
+
if (!we("fill_forms")) {
|
|
2896
|
+
_e(d.type, "fill_forms");
|
|
2893
2897
|
return;
|
|
2894
2898
|
}
|
|
2895
2899
|
if (typeof document > "u") return;
|
|
2896
|
-
d.type === "fill_form" &&
|
|
2900
|
+
d.type === "fill_form" && yt.current.playConfirmation();
|
|
2897
2901
|
const k = typeof d.formId == "string" ? d.formId : null;
|
|
2898
2902
|
if (!k) {
|
|
2899
2903
|
console.warn(`[LiveLayer] ${d.type}: missing formId.`);
|
|
@@ -2913,17 +2917,17 @@ const _o = /* @__PURE__ */ new Set([
|
|
|
2913
2917
|
return;
|
|
2914
2918
|
}
|
|
2915
2919
|
if (d.type === "focus_field") {
|
|
2916
|
-
const
|
|
2917
|
-
if (!
|
|
2920
|
+
const O = typeof d.fieldName == "string" ? d.fieldName : null;
|
|
2921
|
+
if (!O) {
|
|
2918
2922
|
console.warn("[LiveLayer] focus_field: missing fieldName.");
|
|
2919
2923
|
return;
|
|
2920
2924
|
}
|
|
2921
|
-
const V = bn(D,
|
|
2925
|
+
const V = bn(D, O);
|
|
2922
2926
|
if (V.el === null) {
|
|
2923
2927
|
V.reason === "private" ? console.warn(
|
|
2924
|
-
`[LiveLayer] focus_field: field "${
|
|
2928
|
+
`[LiveLayer] focus_field: field "${O}" is privacy-protected and not focusable.`
|
|
2925
2929
|
) : console.warn(
|
|
2926
|
-
`[LiveLayer] focus_field: no input matching key="${
|
|
2930
|
+
`[LiveLayer] focus_field: no input matching key="${O}" in form "${k}". The agent should use the field.name it observed in PageContext.forms[].fields[].`
|
|
2927
2931
|
);
|
|
2928
2932
|
return;
|
|
2929
2933
|
}
|
|
@@ -2935,22 +2939,22 @@ const _o = /* @__PURE__ */ new Set([
|
|
|
2935
2939
|
console.warn("[LiveLayer] fill_form: missing or invalid values.");
|
|
2936
2940
|
return;
|
|
2937
2941
|
}
|
|
2938
|
-
for (const [
|
|
2942
|
+
for (const [O, V] of Object.entries(W)) {
|
|
2939
2943
|
if (typeof V != "string") continue;
|
|
2940
|
-
const G = bn(D,
|
|
2944
|
+
const G = bn(D, O);
|
|
2941
2945
|
if (G.el === null) {
|
|
2942
2946
|
G.reason === "private" ? console.warn(
|
|
2943
|
-
`[LiveLayer] fill_form: field "${
|
|
2947
|
+
`[LiveLayer] fill_form: field "${O}" is privacy-protected (password / cc-* / data-ll-private). Skipping.`
|
|
2944
2948
|
) : console.warn(
|
|
2945
|
-
`[LiveLayer] fill_form: no input matching key="${
|
|
2949
|
+
`[LiveLayer] fill_form: no input matching key="${O}" in form "${k}". The agent should use the field.name it observed in PageContext.forms[].fields[]. Skipping.`
|
|
2946
2950
|
);
|
|
2947
2951
|
continue;
|
|
2948
2952
|
}
|
|
2949
2953
|
try {
|
|
2950
|
-
|
|
2954
|
+
mo(G.el, V);
|
|
2951
2955
|
} catch (z) {
|
|
2952
2956
|
console.warn(
|
|
2953
|
-
`[LiveLayer] fill_form: failed to set "${
|
|
2957
|
+
`[LiveLayer] fill_form: failed to set "${O}".`,
|
|
2954
2958
|
z
|
|
2955
2959
|
);
|
|
2956
2960
|
}
|
|
@@ -2958,8 +2962,8 @@ const _o = /* @__PURE__ */ new Set([
|
|
|
2958
2962
|
return;
|
|
2959
2963
|
}
|
|
2960
2964
|
if (d.type === "submit_form") {
|
|
2961
|
-
if (!
|
|
2962
|
-
|
|
2965
|
+
if (!we("submit_forms")) {
|
|
2966
|
+
_e("submit_form", "submit_forms");
|
|
2963
2967
|
return;
|
|
2964
2968
|
}
|
|
2965
2969
|
if (typeof document > "u") return;
|
|
@@ -2968,7 +2972,7 @@ const _o = /* @__PURE__ */ new Set([
|
|
|
2968
2972
|
console.warn("[LiveLayer] submit_form: missing formId.");
|
|
2969
2973
|
return;
|
|
2970
2974
|
}
|
|
2971
|
-
|
|
2975
|
+
yt.current.playConfirmation();
|
|
2972
2976
|
const D = wn(document, k);
|
|
2973
2977
|
if (!D) {
|
|
2974
2978
|
console.warn(
|
|
@@ -2982,12 +2986,12 @@ const _o = /* @__PURE__ */ new Set([
|
|
|
2982
2986
|
);
|
|
2983
2987
|
return;
|
|
2984
2988
|
}
|
|
2985
|
-
const W = typeof d.requestId == "string" ? d.requestId : void 0,
|
|
2986
|
-
const ce =
|
|
2989
|
+
const W = typeof d.requestId == "string" ? d.requestId : void 0, O = (ke = be.current) == null ? void 0 : ke.call(be), V = (ne) => {
|
|
2990
|
+
const ce = O, Ke = ce == null ? void 0 : ce.localParticipant;
|
|
2987
2991
|
if (Ke != null && Ke.publishData)
|
|
2988
2992
|
try {
|
|
2989
|
-
const
|
|
2990
|
-
Ke.publishData(
|
|
2993
|
+
const jn = W ? { ...ne, requestId: W } : ne, Vn = new TextEncoder().encode(JSON.stringify(jn));
|
|
2994
|
+
Ke.publishData(Vn, { reliable: !0 });
|
|
2991
2995
|
} catch {
|
|
2992
2996
|
}
|
|
2993
2997
|
};
|
|
@@ -2998,8 +3002,8 @@ const _o = /* @__PURE__ */ new Set([
|
|
|
2998
3002
|
D.addEventListener("submit", z, { once: !0 });
|
|
2999
3003
|
try {
|
|
3000
3004
|
typeof D.requestSubmit == "function" ? D.requestSubmit() : D.submit();
|
|
3001
|
-
} catch (
|
|
3002
|
-
console.warn("[LiveLayer] submit_form: requestSubmit threw.",
|
|
3005
|
+
} catch (ne) {
|
|
3006
|
+
console.warn("[LiveLayer] submit_form: requestSubmit threw.", ne), D.removeEventListener("submit", z), V({
|
|
3003
3007
|
type: "form_submit_blocked",
|
|
3004
3008
|
formId: k,
|
|
3005
3009
|
reason: "exception"
|
|
@@ -3016,35 +3020,35 @@ const _o = /* @__PURE__ */ new Set([
|
|
|
3016
3020
|
return;
|
|
3017
3021
|
}
|
|
3018
3022
|
if (d.type === "request_routes") {
|
|
3019
|
-
if (!
|
|
3020
|
-
|
|
3023
|
+
if (!we("read_page")) {
|
|
3024
|
+
_e("request_routes", "read_page");
|
|
3021
3025
|
return;
|
|
3022
3026
|
}
|
|
3023
|
-
const k = typeof d.requestId == "string" ? d.requestId : void 0, W = (ct =
|
|
3024
|
-
if (!(
|
|
3027
|
+
const k = typeof d.requestId == "string" ? d.requestId : void 0, W = (ct = be.current) == null ? void 0 : ct.call(be), O = W == null ? void 0 : W.localParticipant;
|
|
3028
|
+
if (!(O != null && O.publishData)) return;
|
|
3025
3029
|
const V = (z) => {
|
|
3026
3030
|
try {
|
|
3027
|
-
const
|
|
3028
|
-
|
|
3029
|
-
} catch (
|
|
3030
|
-
console.warn("[LiveLayer] request_routes: publishData failed.",
|
|
3031
|
+
const ne = k ? { type: "routes", routes: z, requestId: k } : { type: "routes", routes: z }, ce = new TextEncoder().encode(JSON.stringify(ne));
|
|
3032
|
+
O.publishData(ce, { reliable: !0 });
|
|
3033
|
+
} catch (ne) {
|
|
3034
|
+
console.warn("[LiveLayer] request_routes: publishData failed.", ne);
|
|
3031
3035
|
}
|
|
3032
3036
|
}, G = Bt.current;
|
|
3033
3037
|
if (G) {
|
|
3034
3038
|
try {
|
|
3035
|
-
const z = G(),
|
|
3039
|
+
const z = G(), ne = (ce) => {
|
|
3036
3040
|
if (!Array.isArray(ce)) {
|
|
3037
3041
|
V([]);
|
|
3038
3042
|
return;
|
|
3039
3043
|
}
|
|
3040
|
-
V(ce.map(
|
|
3044
|
+
V(ce.map(lo).slice(0, 200));
|
|
3041
3045
|
};
|
|
3042
|
-
z instanceof Promise ? z.then(
|
|
3046
|
+
z instanceof Promise ? z.then(ne).catch((ce) => {
|
|
3043
3047
|
console.warn(
|
|
3044
3048
|
"[LiveLayer] getRoutes rejected; falling back to DOM walker.",
|
|
3045
3049
|
ce
|
|
3046
3050
|
), V(Rt());
|
|
3047
|
-
}) :
|
|
3051
|
+
}) : ne(z);
|
|
3048
3052
|
} catch (z) {
|
|
3049
3053
|
console.warn(
|
|
3050
3054
|
"[LiveLayer] getRoutes threw; falling back to DOM walker.",
|
|
@@ -3061,8 +3065,8 @@ const _o = /* @__PURE__ */ new Set([
|
|
|
3061
3065
|
return;
|
|
3062
3066
|
}
|
|
3063
3067
|
if (d.type === "task_field_updated") {
|
|
3064
|
-
if (!
|
|
3065
|
-
|
|
3068
|
+
if (!we("collect_data")) {
|
|
3069
|
+
_e("task_field_updated", "collect_data");
|
|
3066
3070
|
return;
|
|
3067
3071
|
}
|
|
3068
3072
|
const k = {
|
|
@@ -3085,8 +3089,8 @@ const _o = /* @__PURE__ */ new Set([
|
|
|
3085
3089
|
return;
|
|
3086
3090
|
}
|
|
3087
3091
|
if (d.type === "task_completed") {
|
|
3088
|
-
if (!
|
|
3089
|
-
|
|
3092
|
+
if (!we("collect_data")) {
|
|
3093
|
+
_e("task_completed", "collect_data");
|
|
3090
3094
|
return;
|
|
3091
3095
|
}
|
|
3092
3096
|
const k = d.result;
|
|
@@ -3106,7 +3110,7 @@ const _o = /* @__PURE__ */ new Set([
|
|
|
3106
3110
|
} catch {
|
|
3107
3111
|
}
|
|
3108
3112
|
try {
|
|
3109
|
-
|
|
3113
|
+
Re == null || Re(
|
|
3110
3114
|
k
|
|
3111
3115
|
);
|
|
3112
3116
|
} catch (D) {
|
|
@@ -3114,11 +3118,11 @@ const _o = /* @__PURE__ */ new Set([
|
|
|
3114
3118
|
}
|
|
3115
3119
|
return;
|
|
3116
3120
|
}
|
|
3117
|
-
|
|
3121
|
+
xo.has(d.type) || Me == null || Me(d);
|
|
3118
3122
|
}
|
|
3119
3123
|
},
|
|
3120
|
-
[
|
|
3121
|
-
),
|
|
3124
|
+
[Me, Ie, Re]
|
|
3125
|
+
), te = tr({
|
|
3122
3126
|
agentId: $ ? "__controlled__" : ot,
|
|
3123
3127
|
baseUrl: i,
|
|
3124
3128
|
apiKey: a,
|
|
@@ -3129,17 +3133,17 @@ const _o = /* @__PURE__ */ new Set([
|
|
|
3129
3133
|
T(() => {
|
|
3130
3134
|
if ($ != null && $.subscribeToDataMessages)
|
|
3131
3135
|
return $.subscribeToDataMessages(at);
|
|
3132
|
-
}, [$, at]),
|
|
3136
|
+
}, [$, at]), be.current = () => {
|
|
3133
3137
|
var v;
|
|
3134
|
-
return (v =
|
|
3138
|
+
return (v = te.getRoom) == null ? void 0 : v.call(te);
|
|
3135
3139
|
}, T(() => {
|
|
3136
|
-
var
|
|
3140
|
+
var X;
|
|
3137
3141
|
if (typeof window > "u") return;
|
|
3138
|
-
const v = ((
|
|
3142
|
+
const v = ((X = window.location) == null ? void 0 : X.hostname) || "";
|
|
3139
3143
|
if (v === "localhost" || v === "127.0.0.1" || v === "0.0.0.0" || v.endsWith(".local") || v.endsWith(".test"))
|
|
3140
|
-
return window.__livelayerSimulateCommand = (
|
|
3144
|
+
return window.__livelayerSimulateCommand = (oe) => {
|
|
3141
3145
|
try {
|
|
3142
|
-
at(
|
|
3146
|
+
at(oe);
|
|
3143
3147
|
} catch (ke) {
|
|
3144
3148
|
console.warn("[LiveLayer] simulate-command threw:", ke);
|
|
3145
3149
|
}
|
|
@@ -3163,25 +3167,25 @@ const _o = /* @__PURE__ */ new Set([
|
|
|
3163
3167
|
// Dummy getRoom for shape compatibility — controlled consumers own the Room.
|
|
3164
3168
|
// Internal session's getRoom returns null when no real connect has happened,
|
|
3165
3169
|
// so we reuse its reference for type consistency.
|
|
3166
|
-
getRoom:
|
|
3170
|
+
getRoom: te.getRoom,
|
|
3167
3171
|
isControlled: !0
|
|
3168
3172
|
} : {
|
|
3169
|
-
connectionState:
|
|
3170
|
-
agentState:
|
|
3171
|
-
transcript:
|
|
3172
|
-
videoElement:
|
|
3173
|
-
audioElement:
|
|
3174
|
-
canResume:
|
|
3175
|
-
error:
|
|
3176
|
-
agentConfig:
|
|
3177
|
-
connect:
|
|
3178
|
-
disconnect:
|
|
3179
|
-
getRoom:
|
|
3173
|
+
connectionState: te.connectionState,
|
|
3174
|
+
agentState: te.agentState,
|
|
3175
|
+
transcript: te.transcript,
|
|
3176
|
+
videoElement: te.videoElement,
|
|
3177
|
+
audioElement: te.audioElement,
|
|
3178
|
+
canResume: te.canResume,
|
|
3179
|
+
error: te.error,
|
|
3180
|
+
agentConfig: te.agentConfig,
|
|
3181
|
+
connect: te.connect,
|
|
3182
|
+
disconnect: te.disconnect,
|
|
3183
|
+
getRoom: te.getRoom,
|
|
3180
3184
|
isControlled: !1
|
|
3181
|
-
}, [$,
|
|
3185
|
+
}, [$, te]), Ft = M(C);
|
|
3182
3186
|
Ft.current = C;
|
|
3183
3187
|
const Wt = M($);
|
|
3184
|
-
Wt.current = $,
|
|
3188
|
+
Wt.current = $, Gn(
|
|
3185
3189
|
r,
|
|
3186
3190
|
() => ({
|
|
3187
3191
|
sendData: async (v) => {
|
|
@@ -3195,11 +3199,11 @@ const _o = /* @__PURE__ */ new Set([
|
|
|
3195
3199
|
}
|
|
3196
3200
|
return;
|
|
3197
3201
|
}
|
|
3198
|
-
const
|
|
3199
|
-
if (
|
|
3202
|
+
const X = (ct = (ke = Ft.current) == null ? void 0 : ke.getRoom) == null ? void 0 : ct.call(ke), oe = X == null ? void 0 : X.localParticipant;
|
|
3203
|
+
if (oe != null && oe.publishData)
|
|
3200
3204
|
try {
|
|
3201
3205
|
const k = new TextEncoder().encode(JSON.stringify(v));
|
|
3202
|
-
await
|
|
3206
|
+
await oe.publishData(k, { reliable: !0 });
|
|
3203
3207
|
} catch (k) {
|
|
3204
3208
|
console.warn("[AvatarWidget] sendData failed:", k);
|
|
3205
3209
|
}
|
|
@@ -3218,37 +3222,37 @@ const _o = /* @__PURE__ */ new Set([
|
|
|
3218
3222
|
const v = C.audioElement;
|
|
3219
3223
|
if (!v) return;
|
|
3220
3224
|
const d = document.createElement("div");
|
|
3221
|
-
d.className = "ll-audio-sink", d.setAttribute("aria-hidden", "true"), d.style.cssText = "position:absolute;width:0;height:0;overflow:hidden;clip:rect(0 0 0 0);pointer-events:none;", d.appendChild(v), document.body.appendChild(d),
|
|
3222
|
-
const
|
|
3223
|
-
return
|
|
3224
|
-
(
|
|
3225
|
+
d.className = "ll-audio-sink", d.setAttribute("aria-hidden", "true"), d.style.cssText = "position:absolute;width:0;height:0;overflow:hidden;clip:rect(0 0 0 0);pointer-events:none;", d.appendChild(v), document.body.appendChild(d), Pe.attach(v);
|
|
3226
|
+
const X = v.play();
|
|
3227
|
+
return X && typeof X.catch == "function" && X.catch((oe) => {
|
|
3228
|
+
(oe == null ? void 0 : oe.name) === "NotAllowedError" && ye(!0);
|
|
3225
3229
|
}), () => {
|
|
3226
|
-
|
|
3230
|
+
Pe.detach(), v.parentNode === d && d.removeChild(v), d.parentNode === document.body && document.body.removeChild(d);
|
|
3227
3231
|
};
|
|
3228
3232
|
}, [C.audioElement]), T(() => {
|
|
3229
3233
|
if (C.isControlled || C.connectionState !== "connected") return;
|
|
3230
3234
|
const v = C.getRoom();
|
|
3231
3235
|
if (v)
|
|
3232
|
-
return
|
|
3233
|
-
const d =
|
|
3234
|
-
d &&
|
|
3236
|
+
return Q.setupMic(v).then(() => {
|
|
3237
|
+
const d = Q.getMicStream();
|
|
3238
|
+
d && Pe.attachStream(d, "mic");
|
|
3235
3239
|
}).catch(() => {
|
|
3236
3240
|
}), () => {
|
|
3237
|
-
|
|
3241
|
+
Pe.detachSlot("mic"), Q.teardownMic();
|
|
3238
3242
|
};
|
|
3239
3243
|
}, [C.isControlled, C.connectionState]), T(() => {
|
|
3240
3244
|
var d;
|
|
3241
3245
|
if (C.connectionState !== "connected") return;
|
|
3242
3246
|
const v = C.isControlled ? (d = $ == null ? void 0 : $.getRoom) == null ? void 0 : d.call($) : C.getRoom();
|
|
3243
3247
|
if (v)
|
|
3244
|
-
return
|
|
3245
|
-
|
|
3248
|
+
return ge.attachRoom(v), $e.attachRoom(v), C.isControlled && Q.attachRoom(v), Ve.refresh(), () => {
|
|
3249
|
+
ge.teardown(), $e.teardown();
|
|
3246
3250
|
};
|
|
3247
3251
|
}, [C.isControlled, C.connectionState, $]), T(() => {
|
|
3248
3252
|
const v = C.audioElement;
|
|
3249
|
-
v && (v.muted =
|
|
3250
|
-
}, [C.audioElement,
|
|
3251
|
-
const
|
|
3253
|
+
v && (v.muted = J);
|
|
3254
|
+
}, [C.audioElement, J]);
|
|
3255
|
+
const Tn = E((v) => {
|
|
3252
3256
|
const d = { type: "user_message", text: v };
|
|
3253
3257
|
if ($ != null && $.publishData) {
|
|
3254
3258
|
try {
|
|
@@ -3257,185 +3261,185 @@ const _o = /* @__PURE__ */ new Set([
|
|
|
3257
3261
|
}
|
|
3258
3262
|
return;
|
|
3259
3263
|
}
|
|
3260
|
-
const
|
|
3261
|
-
if (
|
|
3264
|
+
const X = C.getRoom();
|
|
3265
|
+
if (X)
|
|
3262
3266
|
try {
|
|
3263
|
-
const
|
|
3264
|
-
|
|
3267
|
+
const oe = new TextEncoder().encode(JSON.stringify(d));
|
|
3268
|
+
X.localParticipant.publishData(oe, { reliable: !0 });
|
|
3265
3269
|
} catch {
|
|
3266
3270
|
}
|
|
3267
|
-
}, [C, $]),
|
|
3268
|
-
|
|
3271
|
+
}, [C, $]), Dn = E(() => {
|
|
3272
|
+
Rn((v) => !v);
|
|
3269
3273
|
}, []);
|
|
3270
3274
|
T(() => {
|
|
3271
|
-
|
|
3272
|
-
}, [C.connectionState,
|
|
3273
|
-
|
|
3274
|
-
}, [C.transcript,
|
|
3275
|
+
Ae == null || Ae(C.connectionState), C.connectionState === "connected" ? Se == null || Se() : C.connectionState === "disconnected" && (Be == null || Be());
|
|
3276
|
+
}, [C.connectionState, Se, Be, Ae]), T(() => {
|
|
3277
|
+
Ne == null || Ne(C.transcript);
|
|
3278
|
+
}, [C.transcript, Ne]), T(() => {
|
|
3275
3279
|
Fe == null || Fe(C.agentState);
|
|
3276
3280
|
}, [C.agentState, Fe]), T(() => {
|
|
3277
|
-
|
|
3278
|
-
}, [C.agentState,
|
|
3281
|
+
gt.setThinking(C.agentState === "thinking");
|
|
3282
|
+
}, [C.agentState, gt]);
|
|
3279
3283
|
const Ut = M(!1);
|
|
3280
3284
|
T(() => {
|
|
3281
3285
|
!w || Ut.current || rt && C.connectionState === "idle" && (Ut.current = !0, C.connect());
|
|
3282
3286
|
}, [w, C.connectionState, C, rt]);
|
|
3283
|
-
const
|
|
3287
|
+
const Pn = E(
|
|
3284
3288
|
(v) => {
|
|
3285
|
-
const d = L == null ? void 0 : L.find((
|
|
3286
|
-
d && (
|
|
3289
|
+
const d = L == null ? void 0 : L.find((X) => X.id === v);
|
|
3290
|
+
d && (lt(!1), v !== Ce && (it(!0), C.disconnect(), De || Lt(v), I == null || I(d)));
|
|
3287
3291
|
},
|
|
3288
3292
|
[
|
|
3289
3293
|
L,
|
|
3290
3294
|
Ce,
|
|
3291
3295
|
C,
|
|
3292
|
-
|
|
3296
|
+
De,
|
|
3293
3297
|
I
|
|
3294
3298
|
]
|
|
3295
3299
|
);
|
|
3296
3300
|
T(() => {
|
|
3297
|
-
|
|
3298
|
-
}, [C.connectionState,
|
|
3299
|
-
if (!
|
|
3301
|
+
ve && C.connectionState === "connected" && it(!1);
|
|
3302
|
+
}, [C.connectionState, ve]), T(() => {
|
|
3303
|
+
if (!Ye) return;
|
|
3300
3304
|
const v = (d) => {
|
|
3301
|
-
d.key === "Escape" &&
|
|
3305
|
+
d.key === "Escape" && lt(!1);
|
|
3302
3306
|
};
|
|
3303
3307
|
return window.addEventListener("keydown", v), () => window.removeEventListener("keydown", v);
|
|
3304
|
-
}, [
|
|
3305
|
-
const
|
|
3308
|
+
}, [Ye]);
|
|
3309
|
+
const $n = !!P || !!(ae != null && ae.avatarImageUrl) || C.isControlled, st = cr(ot, i, $n);
|
|
3306
3310
|
nt === void 0 && ((Gt = st.info) != null && Gt.capabilities) && (It.current = st.info.capabilities);
|
|
3307
|
-
const
|
|
3308
|
-
() =>
|
|
3309
|
-
[
|
|
3311
|
+
const vt = (ae == null ? void 0 : ae.name) ?? B ?? ((Kt = C.agentConfig) == null ? void 0 : Kt.name) ?? ((Jt = st.info) == null ? void 0 : Jt.name) ?? "Live Layer", Mt = (ae == null ? void 0 : ae.avatarImageUrl) ?? P ?? ((Xt = C.agentConfig) == null ? void 0 : Xt.avatarImageUrl) ?? ((Zt = st.info) == null ? void 0 : Zt.avatarImageUrl) ?? null, zn = U ?? ((Qt = C.agentConfig) == null ? void 0 : Qt.idleLoopUrl) ?? ((en = st.info) == null ? void 0 : en.idleLoopUrl) ?? null, Hn = b ?? null, On = E(() => me("expanded"), [me]), Bn = E(
|
|
3312
|
+
() => me("minimized"),
|
|
3313
|
+
[me]
|
|
3310
3314
|
), jt = E(() => {
|
|
3311
|
-
C.disconnect(),
|
|
3312
|
-
}, [C,
|
|
3315
|
+
C.disconnect(), me("hidden");
|
|
3316
|
+
}, [C, me]), Fn = E(() => {
|
|
3313
3317
|
const v = C.audioElement;
|
|
3314
|
-
v && v.play().then(() =>
|
|
3318
|
+
v && v.play().then(() => ye(!1)).catch(() => {
|
|
3315
3319
|
});
|
|
3316
|
-
}, [C.audioElement]),
|
|
3317
|
-
|
|
3320
|
+
}, [C.audioElement]), Wn = E(() => {
|
|
3321
|
+
ye(!1), C.connect();
|
|
3318
3322
|
}, [C]), Ge = {
|
|
3319
|
-
...
|
|
3320
|
-
...
|
|
3323
|
+
...Te,
|
|
3324
|
+
...ue ? {} : { zIndex: We }
|
|
3321
3325
|
};
|
|
3322
3326
|
q.primaryColor && (Ge["--ll-color-primary"] = q.primaryColor), q.accentColor && (Ge["--ll-color-accent"] = q.accentColor), q.backgroundColor && (Ge["--ll-color-bg"] = q.backgroundColor), q.textColor && (Ge["--ll-color-fg"] = q.textColor);
|
|
3323
|
-
const
|
|
3327
|
+
const qn = [
|
|
3324
3328
|
"ll-widget",
|
|
3325
|
-
`ll-widget--${
|
|
3326
|
-
`ll-widget--${
|
|
3327
|
-
|
|
3329
|
+
`ll-widget--${se}`,
|
|
3330
|
+
`ll-widget--${fe ? "mobile" : "desktop"}`,
|
|
3331
|
+
xt
|
|
3328
3332
|
].filter(Boolean).join(" ");
|
|
3329
3333
|
if (!rt) return null;
|
|
3330
|
-
const
|
|
3334
|
+
const Un = /* @__PURE__ */ n(
|
|
3331
3335
|
"div",
|
|
3332
3336
|
{
|
|
3333
|
-
className:
|
|
3337
|
+
className: qn,
|
|
3334
3338
|
style: Ge,
|
|
3335
|
-
"data-display-mode":
|
|
3339
|
+
"data-display-mode": se,
|
|
3336
3340
|
"data-position": _,
|
|
3337
3341
|
"data-experience-mode": p === "EMBEDDED" ? "embedded" : "widget",
|
|
3338
|
-
children:
|
|
3339
|
-
|
|
3342
|
+
children: se === "expanded" && /* @__PURE__ */ n(
|
|
3343
|
+
jr,
|
|
3340
3344
|
{
|
|
3341
3345
|
position: _,
|
|
3342
|
-
isMobile:
|
|
3343
|
-
agentName:
|
|
3346
|
+
isMobile: fe,
|
|
3347
|
+
agentName: vt,
|
|
3344
3348
|
avatarImageUrl: Mt,
|
|
3345
|
-
idleLoopUrl:
|
|
3346
|
-
greeting:
|
|
3349
|
+
idleLoopUrl: zn,
|
|
3350
|
+
greeting: Hn,
|
|
3347
3351
|
branding: q,
|
|
3348
3352
|
teamMembers: L,
|
|
3349
3353
|
currentTeamMemberId: Ce,
|
|
3350
|
-
isSwitchingTeamMember:
|
|
3351
|
-
teamSwitcherOpen:
|
|
3352
|
-
onToggleTeamSwitcher: () =>
|
|
3353
|
-
onSelectTeamMember:
|
|
3354
|
+
isSwitchingTeamMember: ve,
|
|
3355
|
+
teamSwitcherOpen: Ye,
|
|
3356
|
+
onToggleTeamSwitcher: () => lt((v) => !v),
|
|
3357
|
+
onSelectTeamMember: Pn,
|
|
3354
3358
|
connectionState: C.connectionState,
|
|
3355
3359
|
agentState: C.agentState,
|
|
3356
3360
|
transcript: C.transcript,
|
|
3357
|
-
isMuted:
|
|
3358
|
-
micDevices:
|
|
3359
|
-
activeMicId:
|
|
3360
|
-
isCameraEnabled:
|
|
3361
|
-
cameraPreviewEl:
|
|
3362
|
-
cameraDevices:
|
|
3363
|
-
activeCameraId:
|
|
3364
|
-
isScreenShareEnabled:
|
|
3365
|
-
screenPreviewEl:
|
|
3366
|
-
isSpeakerMuted:
|
|
3367
|
-
allowCamera:
|
|
3368
|
-
allowScreenShare:
|
|
3361
|
+
isMuted: Q.isMuted,
|
|
3362
|
+
micDevices: Ve.mics,
|
|
3363
|
+
activeMicId: Q.activeDeviceId,
|
|
3364
|
+
isCameraEnabled: ge.isEnabled,
|
|
3365
|
+
cameraPreviewEl: ge.previewEl,
|
|
3366
|
+
cameraDevices: Ve.cameras,
|
|
3367
|
+
activeCameraId: ge.activeDeviceId,
|
|
3368
|
+
isScreenShareEnabled: $e.isEnabled,
|
|
3369
|
+
screenPreviewEl: $e.previewEl,
|
|
3370
|
+
isSpeakerMuted: J,
|
|
3371
|
+
allowCamera: re,
|
|
3372
|
+
allowScreenShare: F,
|
|
3369
3373
|
allowTyping: j,
|
|
3370
|
-
showMinimize: pt,
|
|
3374
|
+
showMinimize: fe && !ue ? !1 : pt,
|
|
3371
3375
|
showClose: ht,
|
|
3372
|
-
chromeless:
|
|
3373
|
-
compactControls:
|
|
3376
|
+
chromeless: xe,
|
|
3377
|
+
compactControls: kt,
|
|
3374
3378
|
transforming: Oe,
|
|
3375
|
-
transformingLabel:
|
|
3376
|
-
languageMenuOpen:
|
|
3377
|
-
onToggleLanguageMenu: () =>
|
|
3378
|
-
needsUserGesture:
|
|
3379
|
+
transformingLabel: Z,
|
|
3380
|
+
languageMenuOpen: mt,
|
|
3381
|
+
onToggleLanguageMenu: () => y((v) => !v),
|
|
3382
|
+
needsUserGesture: Ct,
|
|
3379
3383
|
canResume: C.canResume,
|
|
3380
|
-
micError:
|
|
3384
|
+
micError: Q.micError,
|
|
3381
3385
|
error: C.error,
|
|
3382
3386
|
avatarVideoContainerRef: qt,
|
|
3383
3387
|
agentVideoEl: C.videoElement,
|
|
3384
3388
|
onConnect: () => void C.connect(),
|
|
3385
3389
|
onDisconnect: () => C.disconnect(),
|
|
3386
|
-
onRetry:
|
|
3387
|
-
onResumeAudio:
|
|
3388
|
-
onToggleMute:
|
|
3389
|
-
onSwitchMicDevice: (v) => void
|
|
3390
|
-
onToggleCamera: () => void
|
|
3391
|
-
onSwitchCameraDevice: (v) => void
|
|
3392
|
-
onToggleScreenShare: () => void
|
|
3393
|
-
onToggleSpeaker:
|
|
3394
|
-
onSendMessage:
|
|
3395
|
-
onMinimize:
|
|
3390
|
+
onRetry: Wn,
|
|
3391
|
+
onResumeAudio: Fn,
|
|
3392
|
+
onToggleMute: Q.toggleMute,
|
|
3393
|
+
onSwitchMicDevice: (v) => void Q.switchDevice(v),
|
|
3394
|
+
onToggleCamera: () => void ge.toggle(),
|
|
3395
|
+
onSwitchCameraDevice: (v) => void ge.switchDevice(v),
|
|
3396
|
+
onToggleScreenShare: () => void $e.toggle(),
|
|
3397
|
+
onToggleSpeaker: Dn,
|
|
3398
|
+
onSendMessage: Tn,
|
|
3399
|
+
onMinimize: Bn,
|
|
3396
3400
|
onClose: jt,
|
|
3397
|
-
onClearMicError:
|
|
3401
|
+
onClearMicError: Q.clearError
|
|
3398
3402
|
}
|
|
3399
3403
|
)
|
|
3400
3404
|
}
|
|
3401
|
-
), Vt = !
|
|
3405
|
+
), Vt = !ue && (se === "hidden" || se === "minimized") ? /* @__PURE__ */ x(
|
|
3402
3406
|
"div",
|
|
3403
3407
|
{
|
|
3404
3408
|
className: [
|
|
3405
3409
|
"ll-widget",
|
|
3406
3410
|
"ll-widget--floating",
|
|
3407
|
-
`ll-widget--${
|
|
3408
|
-
`ll-widget--${
|
|
3411
|
+
`ll-widget--${se}`,
|
|
3412
|
+
`ll-widget--${fe ? "mobile" : "desktop"}`
|
|
3409
3413
|
].join(" "),
|
|
3410
3414
|
style: Ge,
|
|
3411
|
-
"data-display-mode":
|
|
3415
|
+
"data-display-mode": se,
|
|
3412
3416
|
"data-position": _,
|
|
3413
3417
|
children: [
|
|
3414
|
-
|
|
3415
|
-
|
|
3418
|
+
se === "hidden" && /* @__PURE__ */ n(
|
|
3419
|
+
Dr,
|
|
3416
3420
|
{
|
|
3417
3421
|
position: _,
|
|
3418
|
-
isMobile:
|
|
3422
|
+
isMobile: fe,
|
|
3419
3423
|
isSpeaking: C.agentState === "speaking",
|
|
3420
|
-
onExpand: () =>
|
|
3421
|
-
label: `Open ${
|
|
3424
|
+
onExpand: () => me("expanded"),
|
|
3425
|
+
label: `Open ${vt} widget`,
|
|
3422
3426
|
avatarImageUrl: Mt,
|
|
3423
|
-
agentName:
|
|
3427
|
+
agentName: vt,
|
|
3424
3428
|
containerEl: de
|
|
3425
3429
|
}
|
|
3426
3430
|
),
|
|
3427
|
-
|
|
3428
|
-
|
|
3431
|
+
se === "minimized" && /* @__PURE__ */ n(
|
|
3432
|
+
$r,
|
|
3429
3433
|
{
|
|
3430
3434
|
position: _,
|
|
3431
|
-
isMobile:
|
|
3432
|
-
agentName:
|
|
3435
|
+
isMobile: fe,
|
|
3436
|
+
agentName: vt,
|
|
3433
3437
|
avatarImageUrl: Mt,
|
|
3434
3438
|
agentState: C.agentState,
|
|
3435
|
-
isMuted:
|
|
3436
|
-
audioLevel:
|
|
3437
|
-
onExpand:
|
|
3438
|
-
onToggleMute:
|
|
3439
|
+
isMuted: Q.isMuted,
|
|
3440
|
+
audioLevel: Pe,
|
|
3441
|
+
onExpand: On,
|
|
3442
|
+
onToggleMute: Q.toggleMute,
|
|
3439
3443
|
onClose: jt
|
|
3440
3444
|
}
|
|
3441
3445
|
)
|
|
@@ -3443,19 +3447,19 @@ const _o = /* @__PURE__ */ new Set([
|
|
|
3443
3447
|
}
|
|
3444
3448
|
) : null, Yt = de ?? (typeof document < "u" ? document.body : null);
|
|
3445
3449
|
return /* @__PURE__ */ x(ze, { children: [
|
|
3446
|
-
|
|
3450
|
+
Un,
|
|
3447
3451
|
Vt && Yt && $t(Vt, Yt)
|
|
3448
3452
|
] });
|
|
3449
3453
|
}
|
|
3450
3454
|
);
|
|
3451
3455
|
Mn.displayName = "AvatarWidgetInner";
|
|
3452
|
-
const
|
|
3456
|
+
const Lo = Pt(
|
|
3453
3457
|
function(t, r) {
|
|
3454
|
-
return /* @__PURE__ */ n(
|
|
3458
|
+
return /* @__PURE__ */ n(er, { children: /* @__PURE__ */ n(Mn, { ...t, ref: r }) });
|
|
3455
3459
|
}
|
|
3456
3460
|
);
|
|
3457
|
-
|
|
3458
|
-
const
|
|
3461
|
+
Lo.displayName = "AvatarWidget";
|
|
3462
|
+
const Do = ({
|
|
3459
3463
|
agentId: e,
|
|
3460
3464
|
baseUrl: t,
|
|
3461
3465
|
apiKey: r,
|
|
@@ -3481,9 +3485,9 @@ const To = ({
|
|
|
3481
3485
|
}, [e]), T(() => {
|
|
3482
3486
|
c.current && (o ? c.current.setAttribute("mode", o) : c.current.removeAttribute("mode"));
|
|
3483
3487
|
}, [o]), /* @__PURE__ */ n("div", { ref: l, className: i, style: s });
|
|
3484
|
-
},
|
|
3488
|
+
}, Po = Pt(
|
|
3485
3489
|
function({ id: t, intent: r, as: o = "div", className: a, style: i, children: s }, l) {
|
|
3486
|
-
return
|
|
3490
|
+
return Kn(
|
|
3487
3491
|
o,
|
|
3488
3492
|
{
|
|
3489
3493
|
ref: l,
|
|
@@ -3496,7 +3500,7 @@ const To = ({
|
|
|
3496
3500
|
);
|
|
3497
3501
|
}
|
|
3498
3502
|
);
|
|
3499
|
-
function
|
|
3503
|
+
function $o(e = {}) {
|
|
3500
3504
|
const { onFieldUpdate: t, onComplete: r, source: o = "all" } = e, [a, i] = N({}), [s, l] = N(!1), [c, p] = N(null), w = M(t), m = M(r), f = M(o);
|
|
3501
3505
|
T(() => {
|
|
3502
3506
|
w.current = t, m.current = r, f.current = o;
|
|
@@ -3506,9 +3510,9 @@ function Po(e = {}) {
|
|
|
3506
3510
|
}, []);
|
|
3507
3511
|
return T(() => {
|
|
3508
3512
|
if (typeof window > "u") return;
|
|
3509
|
-
const _ = (
|
|
3513
|
+
const _ = (g) => {
|
|
3510
3514
|
var h, L;
|
|
3511
|
-
const u =
|
|
3515
|
+
const u = g.detail;
|
|
3512
3516
|
if (u) {
|
|
3513
3517
|
if (u.phase === "field") {
|
|
3514
3518
|
if (f.current !== "all" && u.source !== f.current)
|
|
@@ -3540,7 +3544,7 @@ function Po(e = {}) {
|
|
|
3540
3544
|
}, []), { fields: a, isCollecting: s, lastResult: c, reset: R };
|
|
3541
3545
|
}
|
|
3542
3546
|
let xn = 1;
|
|
3543
|
-
function
|
|
3547
|
+
function zo({
|
|
3544
3548
|
onMount: e,
|
|
3545
3549
|
defaultOpen: t = !1,
|
|
3546
3550
|
storageKey: r = "ll-debug-open"
|
|
@@ -3592,7 +3596,7 @@ function $o({
|
|
|
3592
3596
|
ts: Date.now(),
|
|
3593
3597
|
kind: A,
|
|
3594
3598
|
type: b.slice(0, 120),
|
|
3595
|
-
data: { args: U.slice(1).map((P) =>
|
|
3599
|
+
data: { args: U.slice(1).map((P) => Co(P)) }
|
|
3596
3600
|
});
|
|
3597
3601
|
} catch {
|
|
3598
3602
|
}
|
|
@@ -3628,7 +3632,7 @@ function $o({
|
|
|
3628
3632
|
children: "🛰 LL debug"
|
|
3629
3633
|
}
|
|
3630
3634
|
);
|
|
3631
|
-
const
|
|
3635
|
+
const g = i.filter((u) => {
|
|
3632
3636
|
if (!l) return !0;
|
|
3633
3637
|
const h = l.toLowerCase();
|
|
3634
3638
|
return u.type.toLowerCase().includes(h) || JSON.stringify(u.data || {}).toLowerCase().includes(h);
|
|
@@ -3737,7 +3741,7 @@ function $o({
|
|
|
3737
3741
|
overflowY: "auto",
|
|
3738
3742
|
padding: "0 8px 8px"
|
|
3739
3743
|
},
|
|
3740
|
-
children:
|
|
3744
|
+
children: g.length === 0 ? /* @__PURE__ */ x(
|
|
3741
3745
|
"div",
|
|
3742
3746
|
{
|
|
3743
3747
|
style: {
|
|
@@ -3767,8 +3771,8 @@ function $o({
|
|
|
3767
3771
|
)
|
|
3768
3772
|
]
|
|
3769
3773
|
}
|
|
3770
|
-
) :
|
|
3771
|
-
|
|
3774
|
+
) : g.map((u) => /* @__PURE__ */ n(
|
|
3775
|
+
ko,
|
|
3772
3776
|
{
|
|
3773
3777
|
entry: u,
|
|
3774
3778
|
expanded: m.current.has(u.id),
|
|
@@ -3784,7 +3788,7 @@ function $o({
|
|
|
3784
3788
|
}
|
|
3785
3789
|
);
|
|
3786
3790
|
}
|
|
3787
|
-
function
|
|
3791
|
+
function ko({
|
|
3788
3792
|
entry: e,
|
|
3789
3793
|
expanded: t,
|
|
3790
3794
|
onToggle: r
|
|
@@ -3865,21 +3869,21 @@ function Tt(e) {
|
|
|
3865
3869
|
cursor: "pointer"
|
|
3866
3870
|
};
|
|
3867
3871
|
}
|
|
3868
|
-
function
|
|
3872
|
+
function Co(e) {
|
|
3869
3873
|
try {
|
|
3870
3874
|
return e instanceof Error ? { message: e.message, stack: e.stack } : (JSON.stringify(e), e);
|
|
3871
3875
|
} catch {
|
|
3872
3876
|
return String(e);
|
|
3873
3877
|
}
|
|
3874
3878
|
}
|
|
3875
|
-
function
|
|
3879
|
+
function Eo(e) {
|
|
3876
3880
|
const t = JSON.stringify(e);
|
|
3877
|
-
T(() =>
|
|
3881
|
+
T(() => Xn(e), [t]);
|
|
3878
3882
|
}
|
|
3879
|
-
function
|
|
3880
|
-
return
|
|
3883
|
+
function Ho({ fields: e, children: t }) {
|
|
3884
|
+
return Eo(e), /* @__PURE__ */ n(ze, { children: t });
|
|
3881
3885
|
}
|
|
3882
|
-
function
|
|
3886
|
+
function Oo() {
|
|
3883
3887
|
const [e, t] = N([]), r = E((a) => {
|
|
3884
3888
|
t((i) => {
|
|
3885
3889
|
const s = i.findIndex((l) => l.id === a.id);
|
|
@@ -3898,38 +3902,38 @@ function Ho() {
|
|
|
3898
3902
|
};
|
|
3899
3903
|
}
|
|
3900
3904
|
export {
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3905
|
+
Lo as AvatarWidget,
|
|
3906
|
+
er as ErrorBoundary,
|
|
3907
|
+
Ho as FieldProvider,
|
|
3908
|
+
zo as LiveLayerDebugPanel,
|
|
3909
|
+
Po as LiveLayerRegion,
|
|
3910
|
+
Do as LiveLayerWidget,
|
|
3911
|
+
Wo as clearFieldRegistry,
|
|
3912
|
+
oo as clearPageContextCache,
|
|
3913
|
+
uo as clearRoutesCache,
|
|
3914
|
+
ro as extractPageContext,
|
|
3915
|
+
so as extractRoutes,
|
|
3912
3916
|
yn as getCachedPageContext,
|
|
3913
3917
|
Rt as getCachedRoutes,
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3918
|
+
qo as getRegisteredFields,
|
|
3919
|
+
kr as matchesPattern,
|
|
3920
|
+
lo as normalizeRouteInput,
|
|
3921
|
+
Uo as registerFields,
|
|
3922
|
+
jo as setFieldValue,
|
|
3923
|
+
Cr as shouldRenderAtPath,
|
|
3924
|
+
cr as useAgentInfo,
|
|
3925
|
+
nr as useAudioLevel,
|
|
3926
|
+
lr as useCameraState,
|
|
3927
|
+
$o as useCollect,
|
|
3928
|
+
fr as useDisplayMode,
|
|
3929
|
+
mr as useDisplayModePersistence,
|
|
3930
|
+
yr as useIsMobile,
|
|
3931
|
+
tr as useLiveKitSession,
|
|
3932
|
+
sr as useMediaDevices,
|
|
3933
|
+
or as useMicrophoneState,
|
|
3934
|
+
br as usePathname,
|
|
3935
|
+
Eo as useRegisterFields,
|
|
3936
|
+
Er as useRouteMatch,
|
|
3937
|
+
ar as useScreenShareState,
|
|
3938
|
+
Oo as useTranscript
|
|
3935
3939
|
};
|