@livelayer/react 0.21.1 → 0.21.3
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 +686 -679
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as k, jsx as
|
|
2
|
+
import { jsxs as k, jsx as r, Fragment as Fe } from "react/jsx-runtime";
|
|
3
3
|
import { Component as sr, useState as M, useRef as I, useEffect as T, useCallback as C, useMemo as et, useLayoutEffect as Tn, forwardRef as jt, useImperativeHandle as cr, createElement as ur } from "react";
|
|
4
4
|
import { createPortal as Vt } from "react-dom";
|
|
5
5
|
import { LiveKitSession as dr, registerFields as fr } from "@livelayer/sdk";
|
|
6
|
-
import { clearFieldRegistry as
|
|
6
|
+
import { clearFieldRegistry as so, getRegisteredFields as co, registerFields as uo, setFieldValue as fo } from "@livelayer/sdk";
|
|
7
7
|
import { createLocalAudioTrack as pr, Track as Pn, createLocalVideoTrack as hr } from "livekit-client";
|
|
8
8
|
class mr extends sr {
|
|
9
9
|
constructor() {
|
|
@@ -14,16 +14,16 @@ class mr extends sr {
|
|
|
14
14
|
static getDerivedStateFromError(t) {
|
|
15
15
|
return { hasError: !0, error: t };
|
|
16
16
|
}
|
|
17
|
-
componentDidCatch(t,
|
|
17
|
+
componentDidCatch(t, n) {
|
|
18
18
|
var i, a;
|
|
19
|
-
(a = (i = this.props).onError) == null || a.call(i, t,
|
|
19
|
+
(a = (i = this.props).onError) == null || a.call(i, t, n);
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
22
|
var t;
|
|
23
23
|
return this.state.hasError ? this.props.fallback ? this.props.fallback : /* @__PURE__ */ k("div", { className: "ll-error-boundary", role: "alert", children: [
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */
|
|
24
|
+
/* @__PURE__ */ r("p", { className: "ll-error-boundary__title", children: "Widget crashed" }),
|
|
25
|
+
/* @__PURE__ */ r("p", { className: "ll-error-boundary__message", children: ((t = this.state.error) == null ? void 0 : t.message) || "Something went wrong." }),
|
|
26
|
+
/* @__PURE__ */ r(
|
|
27
27
|
"button",
|
|
28
28
|
{
|
|
29
29
|
type: "button",
|
|
@@ -36,15 +36,15 @@ class mr extends sr {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
function gr(e) {
|
|
39
|
-
const [t,
|
|
39
|
+
const [t, n] = M("idle"), [i, a] = M("idle"), [l, s] = M([]), [o, c] = M(null), [u, b] = M(null), [p, h] = M(null), [P, x] = M(!1), [E, g] = M(null), w = I(null), R = I(e.onDataMessage);
|
|
40
40
|
R.current = e.onDataMessage, T(() => {
|
|
41
41
|
const m = {
|
|
42
42
|
onConnectionStateChange: (W) => {
|
|
43
|
-
|
|
43
|
+
n(W), W === "connected" && g(null);
|
|
44
44
|
},
|
|
45
45
|
onAgentStateChange: a,
|
|
46
|
-
onTranscript: (W) =>
|
|
47
|
-
onAgentConfig:
|
|
46
|
+
onTranscript: (W) => s([...W]),
|
|
47
|
+
onAgentConfig: c,
|
|
48
48
|
onAudioTrack: (W) => h(W),
|
|
49
49
|
onVideoTrack: (W) => b(W),
|
|
50
50
|
onVideoTrackRemoved: () => b(null),
|
|
@@ -64,7 +64,7 @@ function gr(e) {
|
|
|
64
64
|
},
|
|
65
65
|
m
|
|
66
66
|
);
|
|
67
|
-
return w.current = D,
|
|
67
|
+
return w.current = D, n("idle"), a("idle"), s([]), c(null), b(null), h(null), x(!1), g(null), () => {
|
|
68
68
|
var W;
|
|
69
69
|
(W = D.destroy) == null || W.call(D), w.current = null;
|
|
70
70
|
};
|
|
@@ -93,8 +93,8 @@ function gr(e) {
|
|
|
93
93
|
return {
|
|
94
94
|
connectionState: t,
|
|
95
95
|
agentState: i,
|
|
96
|
-
transcript:
|
|
97
|
-
agentConfig:
|
|
96
|
+
transcript: l,
|
|
97
|
+
agentConfig: o,
|
|
98
98
|
videoElement: u,
|
|
99
99
|
audioElement: p,
|
|
100
100
|
canResume: P,
|
|
@@ -106,10 +106,10 @@ function gr(e) {
|
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
function yr() {
|
|
109
|
-
const e = I(null), t = I(/* @__PURE__ */ new Map()),
|
|
109
|
+
const e = I(null), t = I(/* @__PURE__ */ new Map()), n = I(null), i = I(/* @__PURE__ */ new Set()), a = C(() => {
|
|
110
110
|
const x = t.current;
|
|
111
111
|
if (x.size === 0) {
|
|
112
|
-
|
|
112
|
+
n.current = null;
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
115
115
|
let E = 0;
|
|
@@ -126,10 +126,10 @@ function yr() {
|
|
|
126
126
|
} catch (w) {
|
|
127
127
|
console.error("[useAudioLevel] subscriber threw:", w);
|
|
128
128
|
}
|
|
129
|
-
|
|
130
|
-
}, []),
|
|
131
|
-
|
|
132
|
-
}, [a]),
|
|
129
|
+
n.current = requestAnimationFrame(a);
|
|
130
|
+
}, []), l = C(() => e.current ? e.current : typeof window > "u" || typeof AudioContext > "u" ? null : (e.current = new AudioContext(), e.current), []), s = C(() => {
|
|
131
|
+
n.current === null && t.current.size > 0 && (n.current = requestAnimationFrame(a));
|
|
132
|
+
}, [a]), o = C((x) => {
|
|
133
133
|
const E = t.current.get(x);
|
|
134
134
|
if (E) {
|
|
135
135
|
try {
|
|
@@ -142,11 +142,11 @@ function yr() {
|
|
|
142
142
|
}
|
|
143
143
|
t.current.delete(x);
|
|
144
144
|
}
|
|
145
|
-
}, []),
|
|
145
|
+
}, []), c = C(
|
|
146
146
|
(x, E) => {
|
|
147
|
-
const g =
|
|
147
|
+
const g = l();
|
|
148
148
|
if (!g) return;
|
|
149
|
-
|
|
149
|
+
o(x);
|
|
150
150
|
const w = E(g);
|
|
151
151
|
if (!w) return;
|
|
152
152
|
const R = g.createAnalyser();
|
|
@@ -161,12 +161,12 @@ function yr() {
|
|
|
161
161
|
analyser: R,
|
|
162
162
|
node: w,
|
|
163
163
|
buffer: new Uint8Array(new ArrayBuffer(R.frequencyBinCount))
|
|
164
|
-
}),
|
|
164
|
+
}), s();
|
|
165
165
|
},
|
|
166
|
-
[
|
|
166
|
+
[o, l, s]
|
|
167
167
|
), u = C(
|
|
168
168
|
(x, E = "agent") => {
|
|
169
|
-
|
|
169
|
+
c(E, (g) => {
|
|
170
170
|
try {
|
|
171
171
|
return g.createMediaElementSource(x);
|
|
172
172
|
} catch (w) {
|
|
@@ -178,10 +178,10 @@ function yr() {
|
|
|
178
178
|
}
|
|
179
179
|
});
|
|
180
180
|
},
|
|
181
|
-
[
|
|
181
|
+
[c]
|
|
182
182
|
), b = C(
|
|
183
183
|
(x, E = "mic") => {
|
|
184
|
-
|
|
184
|
+
c(E, (g) => {
|
|
185
185
|
try {
|
|
186
186
|
return g.createMediaStreamSource(x);
|
|
187
187
|
} catch (w) {
|
|
@@ -193,17 +193,17 @@ function yr() {
|
|
|
193
193
|
}
|
|
194
194
|
});
|
|
195
195
|
},
|
|
196
|
-
[
|
|
196
|
+
[c]
|
|
197
197
|
), p = C(
|
|
198
198
|
(x) => {
|
|
199
|
-
|
|
199
|
+
o(x), t.current.size === 0 && n.current !== null && (cancelAnimationFrame(n.current), n.current = null);
|
|
200
200
|
},
|
|
201
|
-
[
|
|
201
|
+
[o]
|
|
202
202
|
), h = C(() => {
|
|
203
|
-
|
|
203
|
+
n.current !== null && (cancelAnimationFrame(n.current), n.current = null);
|
|
204
204
|
for (const x of Array.from(t.current.keys()))
|
|
205
|
-
|
|
206
|
-
}, [
|
|
205
|
+
o(x);
|
|
206
|
+
}, [o]), P = C((x) => (i.current.add(x), () => {
|
|
207
207
|
i.current.delete(x);
|
|
208
208
|
}), []);
|
|
209
209
|
return T(() => () => {
|
|
@@ -222,7 +222,7 @@ function vr(e) {
|
|
|
222
222
|
return t ? new MediaStream([t]) : null;
|
|
223
223
|
}
|
|
224
224
|
function br(e = {}) {
|
|
225
|
-
const t = e.gateUntilAgentReady ?? !1,
|
|
225
|
+
const t = e.gateUntilAgentReady ?? !1, n = e.agentState ?? null, [i, a] = M(t), [l, s] = M(""), [o, c] = M(null), u = I(null), b = I(null), p = I({
|
|
226
226
|
active: t,
|
|
227
227
|
lastAutoIntent: null
|
|
228
228
|
}), h = C(async (S) => {
|
|
@@ -234,7 +234,7 @@ function br(e = {}) {
|
|
|
234
234
|
}
|
|
235
235
|
u.current.stop(), u.current = null;
|
|
236
236
|
}
|
|
237
|
-
b.current = S,
|
|
237
|
+
b.current = S, c(null);
|
|
238
238
|
try {
|
|
239
239
|
const m = await pr({
|
|
240
240
|
echoCancellation: !0,
|
|
@@ -242,10 +242,10 @@ function br(e = {}) {
|
|
|
242
242
|
});
|
|
243
243
|
await S.localParticipant.publishTrack(m), u.current = m, p.current.active ? (await S.localParticipant.setMicrophoneEnabled(!1), p.current.lastAutoIntent = !1, a(!0)) : a(m.isMuted);
|
|
244
244
|
const D = (O = (y = m.mediaStreamTrack) == null ? void 0 : y.getSettings) == null ? void 0 : O.call(y);
|
|
245
|
-
D != null && D.deviceId &&
|
|
245
|
+
D != null && D.deviceId && s(D.deviceId);
|
|
246
246
|
} catch (m) {
|
|
247
247
|
const D = m instanceof Error && m.name === "NotAllowedError" ? "Enable your microphone to talk with the agent." : "Microphone unavailable. Check browser permissions and try again.";
|
|
248
|
-
throw
|
|
248
|
+
throw c(D), m;
|
|
249
249
|
}
|
|
250
250
|
}, []), P = C((S) => {
|
|
251
251
|
b.current = S;
|
|
@@ -253,7 +253,7 @@ function br(e = {}) {
|
|
|
253
253
|
const y = b.current;
|
|
254
254
|
if (y)
|
|
255
255
|
try {
|
|
256
|
-
await y.switchActiveDevice("audioinput", S),
|
|
256
|
+
await y.switchActiveDevice("audioinput", S), s(S);
|
|
257
257
|
} catch (O) {
|
|
258
258
|
console.warn("[useMicrophoneState] switchDevice failed:", O);
|
|
259
259
|
}
|
|
@@ -267,14 +267,14 @@ function br(e = {}) {
|
|
|
267
267
|
}
|
|
268
268
|
}, [i]);
|
|
269
269
|
T(() => {
|
|
270
|
-
if (!p.current.active ||
|
|
270
|
+
if (!p.current.active || n !== "listening") return;
|
|
271
271
|
const S = b.current, y = S == null ? void 0 : S.localParticipant;
|
|
272
272
|
if (!y) {
|
|
273
273
|
p.current.active = !1;
|
|
274
274
|
return;
|
|
275
275
|
}
|
|
276
276
|
y.isMicrophoneEnabled === p.current.lastAutoIntent && (y.setMicrophoneEnabled(!0), p.current.lastAutoIntent = !0, a(!1)), p.current.active = !1;
|
|
277
|
-
}, [
|
|
277
|
+
}, [n]);
|
|
278
278
|
const g = C(() => {
|
|
279
279
|
const S = u.current, y = b.current;
|
|
280
280
|
if (S && y) {
|
|
@@ -284,12 +284,12 @@ function br(e = {}) {
|
|
|
284
284
|
}
|
|
285
285
|
S.stop();
|
|
286
286
|
}
|
|
287
|
-
u.current = null, b.current = null, p.current = { active: t, lastAutoIntent: null }, a(t),
|
|
288
|
-
}, [t]), w = C(() =>
|
|
287
|
+
u.current = null, b.current = null, p.current = { active: t, lastAutoIntent: null }, a(t), s("");
|
|
288
|
+
}, [t]), w = C(() => c(null), []), R = C(() => vr(u.current), []);
|
|
289
289
|
return {
|
|
290
290
|
isMuted: i,
|
|
291
|
-
activeDeviceId:
|
|
292
|
-
micError:
|
|
291
|
+
activeDeviceId: l,
|
|
292
|
+
micError: o,
|
|
293
293
|
toggleMute: E,
|
|
294
294
|
setupMic: h,
|
|
295
295
|
attachRoom: P,
|
|
@@ -301,11 +301,11 @@ function br(e = {}) {
|
|
|
301
301
|
}
|
|
302
302
|
const wr = { resolution: { width: 640, height: 480, frameRate: 24 } };
|
|
303
303
|
function _r() {
|
|
304
|
-
const [e, t] = M(!1), [
|
|
305
|
-
|
|
304
|
+
const [e, t] = M(!1), [n, i] = M(null), [a, l] = M(null), [s, o] = M(""), c = I(null), u = I(null), b = C((w) => {
|
|
305
|
+
c.current = w;
|
|
306
306
|
}, []), p = C(() => {
|
|
307
307
|
var S;
|
|
308
|
-
const w =
|
|
308
|
+
const w = c.current, R = u.current;
|
|
309
309
|
if (R && w) {
|
|
310
310
|
const y = w.localParticipant.getTrackPublication(Pn.Source.Camera), m = (y == null ? void 0 : y.track) ?? R;
|
|
311
311
|
try {
|
|
@@ -317,9 +317,9 @@ function _r() {
|
|
|
317
317
|
} catch {
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
|
-
u.current = null,
|
|
320
|
+
u.current = null, l(null), t(!1);
|
|
321
321
|
}, []), h = C(async (w) => {
|
|
322
|
-
const R =
|
|
322
|
+
const R = c.current;
|
|
323
323
|
if (R) {
|
|
324
324
|
i(null);
|
|
325
325
|
try {
|
|
@@ -328,7 +328,7 @@ function _r() {
|
|
|
328
328
|
const y = await hr(S);
|
|
329
329
|
await R.localParticipant.publishTrack(y), u.current = y;
|
|
330
330
|
const O = y.attach();
|
|
331
|
-
|
|
331
|
+
l(O), t(!0), w && o(w);
|
|
332
332
|
try {
|
|
333
333
|
R.localParticipant.publishData(
|
|
334
334
|
new TextEncoder().encode(JSON.stringify({ type: "user_camera_on" })),
|
|
@@ -342,19 +342,19 @@ function _r() {
|
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
344
|
}, []), P = C(async () => {
|
|
345
|
-
e ? p() : await h(
|
|
346
|
-
}, [e,
|
|
345
|
+
e ? p() : await h(s || void 0);
|
|
346
|
+
}, [e, s, p, h]), x = C(async (w) => {
|
|
347
347
|
p(), await h(w);
|
|
348
348
|
}, [p, h]), E = C(() => {
|
|
349
|
-
p(),
|
|
349
|
+
p(), c.current = null, i(null), o("");
|
|
350
350
|
}, [p]), g = C(() => i(null), []);
|
|
351
351
|
return T(() => () => {
|
|
352
352
|
u.current && u.current.stop();
|
|
353
353
|
}, []), {
|
|
354
354
|
isEnabled: e,
|
|
355
|
-
error:
|
|
355
|
+
error: n,
|
|
356
356
|
previewEl: a,
|
|
357
|
-
activeDeviceId:
|
|
357
|
+
activeDeviceId: s,
|
|
358
358
|
toggle: P,
|
|
359
359
|
switchDevice: x,
|
|
360
360
|
attachRoom: b,
|
|
@@ -363,17 +363,17 @@ function _r() {
|
|
|
363
363
|
};
|
|
364
364
|
}
|
|
365
365
|
function xr() {
|
|
366
|
-
const [e, t] = M(!1), [
|
|
367
|
-
|
|
368
|
-
}, []),
|
|
369
|
-
const h =
|
|
366
|
+
const [e, t] = M(!1), [n, i] = M(null), [a, l] = M(null), s = I(null), o = C((h) => {
|
|
367
|
+
s.current = h;
|
|
368
|
+
}, []), c = C(() => l(null), []), u = C(async () => {
|
|
369
|
+
const h = s.current;
|
|
370
370
|
if (h) {
|
|
371
371
|
if (e) {
|
|
372
372
|
try {
|
|
373
373
|
await h.localParticipant.setScreenShareEnabled(!1);
|
|
374
374
|
} catch {
|
|
375
375
|
}
|
|
376
|
-
|
|
376
|
+
c(), t(!1);
|
|
377
377
|
return;
|
|
378
378
|
}
|
|
379
379
|
i(null);
|
|
@@ -384,7 +384,7 @@ function xr() {
|
|
|
384
384
|
const E = h.localParticipant.getTrackPublication(Pn.Source.ScreenShare);
|
|
385
385
|
if (E != null && E.track) {
|
|
386
386
|
const g = E.track.attach();
|
|
387
|
-
|
|
387
|
+
l(g), t(!0);
|
|
388
388
|
try {
|
|
389
389
|
h.localParticipant.publishData(
|
|
390
390
|
new TextEncoder().encode(JSON.stringify({ type: "user_screen_share_on" })),
|
|
@@ -402,41 +402,41 @@ function xr() {
|
|
|
402
402
|
x !== "NotAllowedError" && x !== "AbortError" && i("Screen share unavailable. Try again."), t(!1);
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
|
-
}, [e,
|
|
406
|
-
const h =
|
|
405
|
+
}, [e, c]), b = C(() => {
|
|
406
|
+
const h = s.current;
|
|
407
407
|
if (h && e)
|
|
408
408
|
try {
|
|
409
409
|
h.localParticipant.setScreenShareEnabled(!1);
|
|
410
410
|
} catch {
|
|
411
411
|
}
|
|
412
|
-
|
|
413
|
-
}, [e,
|
|
414
|
-
return { isEnabled: e, error:
|
|
412
|
+
c(), t(!1), i(null), s.current = null;
|
|
413
|
+
}, [e, c]), p = C(() => i(null), []);
|
|
414
|
+
return { isEnabled: e, error: n, previewEl: a, toggle: u, attachRoom: o, teardown: b, clearError: p };
|
|
415
415
|
}
|
|
416
416
|
function Lr() {
|
|
417
|
-
const [e, t] = M([]), [
|
|
417
|
+
const [e, t] = M([]), [n, i] = M([]), a = C(async () => {
|
|
418
418
|
if (!(typeof navigator > "u" || !navigator.mediaDevices))
|
|
419
419
|
try {
|
|
420
|
-
const
|
|
421
|
-
t(
|
|
420
|
+
const l = await navigator.mediaDevices.enumerateDevices();
|
|
421
|
+
t(l.filter((s) => s.kind === "audioinput")), i(l.filter((s) => s.kind === "videoinput"));
|
|
422
422
|
} catch {
|
|
423
423
|
}
|
|
424
424
|
}, []);
|
|
425
425
|
return T(() => {
|
|
426
426
|
if (a(), typeof navigator > "u" || !navigator.mediaDevices) return;
|
|
427
|
-
const
|
|
428
|
-
return navigator.mediaDevices.addEventListener("devicechange",
|
|
429
|
-
}, [a]), { mics: e, cameras:
|
|
427
|
+
const l = () => void a();
|
|
428
|
+
return navigator.mediaDevices.addEventListener("devicechange", l), () => navigator.mediaDevices.removeEventListener("devicechange", l);
|
|
429
|
+
}, [a]), { mics: e, cameras: n, refresh: a };
|
|
430
430
|
}
|
|
431
|
-
function Cr(e, t,
|
|
432
|
-
const [i, a] = M(null), [
|
|
431
|
+
function Cr(e, t, n = !1) {
|
|
432
|
+
const [i, a] = M(null), [l, s] = M(null), [o, c] = M(!n && !!e);
|
|
433
433
|
return T(() => {
|
|
434
|
-
if (
|
|
435
|
-
|
|
434
|
+
if (n || !e) {
|
|
435
|
+
c(!1);
|
|
436
436
|
return;
|
|
437
437
|
}
|
|
438
438
|
const u = new AbortController(), b = t || "https://app.livelayer.studio";
|
|
439
|
-
return
|
|
439
|
+
return c(!0), s(null), fetch(`${b}/api/widget/agent/${encodeURIComponent(e)}`, {
|
|
440
440
|
signal: u.signal
|
|
441
441
|
}).then(async (p) => {
|
|
442
442
|
if (!p.ok) {
|
|
@@ -445,11 +445,11 @@ function Cr(e, t, r = !1) {
|
|
|
445
445
|
}
|
|
446
446
|
return p.json();
|
|
447
447
|
}).then((p) => {
|
|
448
|
-
u.signal.aborted || (a(p),
|
|
448
|
+
u.signal.aborted || (a(p), c(!1));
|
|
449
449
|
}).catch((p) => {
|
|
450
|
-
u.signal.aborted || (
|
|
450
|
+
u.signal.aborted || (s(p instanceof Error ? p.message : "Agent lookup failed"), c(!1));
|
|
451
451
|
}), () => u.abort();
|
|
452
|
-
}, [e, t,
|
|
452
|
+
}, [e, t, n]), { info: i, error: l, loading: o };
|
|
453
453
|
}
|
|
454
454
|
function Dn(e) {
|
|
455
455
|
if (typeof window > "u") return null;
|
|
@@ -476,15 +476,15 @@ function kr(e) {
|
|
|
476
476
|
function Sr({
|
|
477
477
|
value: e,
|
|
478
478
|
defaultValue: t = "expanded",
|
|
479
|
-
onChange:
|
|
479
|
+
onChange: n
|
|
480
480
|
} = {}) {
|
|
481
|
-
const i = e !== void 0, [a,
|
|
482
|
-
(
|
|
483
|
-
|
|
481
|
+
const i = e !== void 0, [a, l] = M(t), s = i ? e : a, o = C(
|
|
482
|
+
(c) => {
|
|
483
|
+
c !== s && (i || l(c), n == null || n(c));
|
|
484
484
|
},
|
|
485
|
-
[
|
|
485
|
+
[s, i, n]
|
|
486
486
|
);
|
|
487
|
-
return [
|
|
487
|
+
return [s, o];
|
|
488
488
|
}
|
|
489
489
|
const Er = ["hidden", "minimized", "expanded"];
|
|
490
490
|
function Nr(e) {
|
|
@@ -493,36 +493,36 @@ function Nr(e) {
|
|
|
493
493
|
function Ar({
|
|
494
494
|
value: e,
|
|
495
495
|
defaultValue: t = "expanded",
|
|
496
|
-
onChange:
|
|
496
|
+
onChange: n,
|
|
497
497
|
persistKey: i = "ll-widget",
|
|
498
498
|
disablePersistence: a = !1
|
|
499
499
|
} = {}) {
|
|
500
|
-
const
|
|
500
|
+
const l = `${i}:display-mode`, s = I(!1), [o, c] = Sr({
|
|
501
501
|
value: e,
|
|
502
502
|
defaultValue: t,
|
|
503
503
|
onChange: (u) => {
|
|
504
|
-
e === void 0 && !a && zn(
|
|
504
|
+
e === void 0 && !a && zn(l, u), n == null || n(u);
|
|
505
505
|
}
|
|
506
506
|
});
|
|
507
507
|
return T(() => {
|
|
508
|
-
if (
|
|
509
|
-
const u = Nr(Dn(
|
|
510
|
-
u && u !==
|
|
511
|
-
}, []), [
|
|
508
|
+
if (s.current || (s.current = !0, a || e !== void 0)) return;
|
|
509
|
+
const u = Nr(Dn(l));
|
|
510
|
+
u && u !== o && c(u);
|
|
511
|
+
}, []), [o, c];
|
|
512
512
|
}
|
|
513
513
|
const Mr = 640;
|
|
514
514
|
function Ir(e = Mr) {
|
|
515
|
-
const [t,
|
|
515
|
+
const [t, n] = M(!1);
|
|
516
516
|
return T(() => {
|
|
517
517
|
if (e === !1) {
|
|
518
|
-
|
|
518
|
+
n(!1);
|
|
519
519
|
return;
|
|
520
520
|
}
|
|
521
521
|
if (typeof window > "u" || typeof window.matchMedia > "u")
|
|
522
522
|
return;
|
|
523
|
-
const i = `(max-width: ${e - 1}px)`, a = window.matchMedia(i),
|
|
524
|
-
return
|
|
525
|
-
a.removeListener(
|
|
523
|
+
const i = `(max-width: ${e - 1}px)`, a = window.matchMedia(i), l = () => n(a.matches);
|
|
524
|
+
return l(), typeof a.addEventListener == "function" ? (a.addEventListener("change", l), () => a.removeEventListener("change", l)) : (a.addListener(l), () => {
|
|
525
|
+
a.removeListener(l);
|
|
526
526
|
});
|
|
527
527
|
}, [e]), t;
|
|
528
528
|
}
|
|
@@ -539,37 +539,37 @@ function zr(e) {
|
|
|
539
539
|
return null;
|
|
540
540
|
}
|
|
541
541
|
if (typeof t != "object" || t === null) return null;
|
|
542
|
-
const
|
|
543
|
-
return typeof i != "number" || typeof a != "number" || typeof
|
|
542
|
+
const n = t, { top: i, left: a, width: l, height: s } = n;
|
|
543
|
+
return typeof i != "number" || typeof a != "number" || typeof l != "number" || typeof s != "number" || !Number.isFinite(i) || !Number.isFinite(a) || !Number.isFinite(l) || !Number.isFinite(s) ? null : { top: i, left: a, width: l, height: s };
|
|
544
544
|
}
|
|
545
545
|
function Ct() {
|
|
546
546
|
return typeof window > "u" ? { vw: 0, vh: 0 } : { vw: window.innerWidth, vh: window.innerHeight };
|
|
547
547
|
}
|
|
548
|
-
function Ft(e, t,
|
|
549
|
-
const { minWidth: i, minHeight: a, edgeMargin:
|
|
548
|
+
function Ft(e, t, n) {
|
|
549
|
+
const { minWidth: i, minHeight: a, edgeMargin: l, vw: s, vh: o } = n, c = Math.max(i, s - l * 2), u = Math.max(a, o - l * 2);
|
|
550
550
|
return {
|
|
551
|
-
width: Math.max(i, Math.min(
|
|
551
|
+
width: Math.max(i, Math.min(c, e)),
|
|
552
552
|
height: Math.max(a, Math.min(u, t))
|
|
553
553
|
};
|
|
554
554
|
}
|
|
555
|
-
function Wt(e, t,
|
|
556
|
-
const { edgeMargin:
|
|
555
|
+
function Wt(e, t, n, i, a) {
|
|
556
|
+
const { edgeMargin: l, vw: s, vh: o } = a, c = l, u = l, b = Math.max(c, s - n - l), p = Math.max(u, o - i - l);
|
|
557
557
|
return {
|
|
558
558
|
top: Math.max(u, Math.min(p, e)),
|
|
559
|
-
left: Math.max(
|
|
559
|
+
left: Math.max(c, Math.min(b, t))
|
|
560
560
|
};
|
|
561
561
|
}
|
|
562
562
|
function $r(e) {
|
|
563
563
|
const {
|
|
564
564
|
draggable: t,
|
|
565
|
-
resizable:
|
|
565
|
+
resizable: n,
|
|
566
566
|
persistKey: i,
|
|
567
567
|
disablePersistence: a,
|
|
568
|
-
minWidth:
|
|
569
|
-
minHeight:
|
|
570
|
-
edgeMargin:
|
|
571
|
-
} = e, [
|
|
572
|
-
w.current =
|
|
568
|
+
minWidth: l = Rr,
|
|
569
|
+
minHeight: s = Tr,
|
|
570
|
+
edgeMargin: o = Pr
|
|
571
|
+
} = e, [c, u] = M(null), [b, p] = M(!1), [h, P] = M(!1), x = I(null), E = I(null), g = I(!1), w = I(null);
|
|
572
|
+
w.current = c;
|
|
573
573
|
const R = C(
|
|
574
574
|
(f) => {
|
|
575
575
|
a || (f === null ? kr(Ot(i)) : zn(Ot(i), JSON.stringify(f)));
|
|
@@ -581,13 +581,13 @@ function $r(e) {
|
|
|
581
581
|
const f = zr(Dn(Ot(i)));
|
|
582
582
|
if (!f) return;
|
|
583
583
|
const { vw: N, vh: z } = Ct(), q = Ft(f.width, f.height, {
|
|
584
|
-
minWidth:
|
|
585
|
-
minHeight:
|
|
586
|
-
edgeMargin:
|
|
584
|
+
minWidth: l,
|
|
585
|
+
minHeight: s,
|
|
586
|
+
edgeMargin: o,
|
|
587
587
|
vw: N,
|
|
588
588
|
vh: z
|
|
589
589
|
}), X = Wt(f.top, f.left, q.width, q.height, {
|
|
590
|
-
edgeMargin:
|
|
590
|
+
edgeMargin: o,
|
|
591
591
|
vw: N,
|
|
592
592
|
vh: z
|
|
593
593
|
});
|
|
@@ -598,21 +598,21 @@ function $r(e) {
|
|
|
598
598
|
u((N) => {
|
|
599
599
|
if (N === null) return null;
|
|
600
600
|
const { vw: z, vh: q } = Ct(), X = Ft(N.width, N.height, {
|
|
601
|
-
minWidth:
|
|
602
|
-
minHeight:
|
|
603
|
-
edgeMargin:
|
|
601
|
+
minWidth: l,
|
|
602
|
+
minHeight: s,
|
|
603
|
+
edgeMargin: o,
|
|
604
604
|
vw: z,
|
|
605
605
|
vh: q
|
|
606
606
|
});
|
|
607
607
|
return { ...Wt(N.top, N.left, X.width, X.height, {
|
|
608
|
-
edgeMargin:
|
|
608
|
+
edgeMargin: o,
|
|
609
609
|
vw: z,
|
|
610
610
|
vh: q
|
|
611
611
|
}), ...X };
|
|
612
612
|
});
|
|
613
613
|
};
|
|
614
614
|
return window.addEventListener("resize", f), () => window.removeEventListener("resize", f);
|
|
615
|
-
}, [
|
|
615
|
+
}, [l, s, o]);
|
|
616
616
|
const S = C(
|
|
617
617
|
(f) => {
|
|
618
618
|
if (!t || f.pointerType === "mouse" && f.button !== 0) return;
|
|
@@ -654,11 +654,11 @@ function $r(e) {
|
|
|
654
654
|
N.startLeft + z,
|
|
655
655
|
N.width,
|
|
656
656
|
N.height,
|
|
657
|
-
{ edgeMargin:
|
|
657
|
+
{ edgeMargin: o, vw: X, vh: ee }
|
|
658
658
|
);
|
|
659
659
|
u({ ...V, width: N.width, height: N.height });
|
|
660
660
|
},
|
|
661
|
-
[
|
|
661
|
+
[o]
|
|
662
662
|
), O = C(
|
|
663
663
|
(f) => {
|
|
664
664
|
const N = x.current;
|
|
@@ -675,7 +675,7 @@ function $r(e) {
|
|
|
675
675
|
x.current = null, E.current = null, p(!1), P(!1), u(null), R(null);
|
|
676
676
|
}, [R]), D = C(
|
|
677
677
|
(f) => {
|
|
678
|
-
if (!
|
|
678
|
+
if (!n || f.pointerType === "mouse" && f.button !== 0) return;
|
|
679
679
|
f.stopPropagation();
|
|
680
680
|
let N, z, q, X;
|
|
681
681
|
const ee = w.current;
|
|
@@ -699,23 +699,23 @@ function $r(e) {
|
|
|
699
699
|
left: z
|
|
700
700
|
}, P(!0);
|
|
701
701
|
},
|
|
702
|
-
[
|
|
702
|
+
[n]
|
|
703
703
|
), W = C(
|
|
704
704
|
(f) => {
|
|
705
705
|
const N = E.current;
|
|
706
706
|
if (!N) return;
|
|
707
|
-
const z = f.clientX - N.startClientX, q = f.clientY - N.startClientY, { vw: X, vh: ee } = Ct(), V = X - N.left -
|
|
708
|
-
minWidth:
|
|
709
|
-
minHeight:
|
|
710
|
-
edgeMargin:
|
|
707
|
+
const z = f.clientX - N.startClientX, q = f.clientY - N.startClientY, { vw: X, vh: ee } = Ct(), V = X - N.left - o, te = ee - N.top - o, oe = Ft(N.startWidth + z, N.startHeight + q, {
|
|
708
|
+
minWidth: l,
|
|
709
|
+
minHeight: s,
|
|
710
|
+
edgeMargin: o,
|
|
711
711
|
// Clamp the available viewport to the room from the anchored corner
|
|
712
712
|
// so the widget can't grow past the bottom/right edge.
|
|
713
|
-
vw: Math.min(X, N.left + V +
|
|
714
|
-
vh: Math.min(ee, N.top + te +
|
|
713
|
+
vw: Math.min(X, N.left + V + o),
|
|
714
|
+
vh: Math.min(ee, N.top + te + o)
|
|
715
715
|
});
|
|
716
716
|
u({ top: N.top, left: N.left, ...oe });
|
|
717
717
|
},
|
|
718
|
-
[
|
|
718
|
+
[o, l, s]
|
|
719
719
|
), K = C(
|
|
720
720
|
(f) => {
|
|
721
721
|
if (E.current) {
|
|
@@ -729,16 +729,16 @@ function $r(e) {
|
|
|
729
729
|
[R]
|
|
730
730
|
);
|
|
731
731
|
return {
|
|
732
|
-
style:
|
|
732
|
+
style: c === null ? {} : {
|
|
733
733
|
position: "fixed",
|
|
734
|
-
top: `${
|
|
735
|
-
left: `${
|
|
734
|
+
top: `${c.top}px`,
|
|
735
|
+
left: `${c.left}px`,
|
|
736
736
|
right: "auto",
|
|
737
737
|
bottom: "auto",
|
|
738
|
-
width: `${
|
|
739
|
-
height: `${
|
|
738
|
+
width: `${c.width}px`,
|
|
739
|
+
height: `${c.height}px`
|
|
740
740
|
},
|
|
741
|
-
hasGeometry:
|
|
741
|
+
hasGeometry: c !== null,
|
|
742
742
|
isDragging: b,
|
|
743
743
|
isResizing: h,
|
|
744
744
|
dragHandleProps: {
|
|
@@ -754,7 +754,7 @@ function $r(e) {
|
|
|
754
754
|
onPointerMove: W,
|
|
755
755
|
onPointerUp: K,
|
|
756
756
|
onPointerCancel: K,
|
|
757
|
-
"data-ll-resize-handle":
|
|
757
|
+
"data-ll-resize-handle": n ? "" : void 0
|
|
758
758
|
},
|
|
759
759
|
reset: m
|
|
760
760
|
};
|
|
@@ -763,11 +763,11 @@ const fn = "__llHistoryPatched", Et = "ll:pathname";
|
|
|
763
763
|
function Hr() {
|
|
764
764
|
if (typeof window > "u" || window.history[fn]) return;
|
|
765
765
|
const e = window.history.pushState, t = window.history.replaceState;
|
|
766
|
-
window.history.pushState = function(...
|
|
767
|
-
const i = e.apply(this,
|
|
766
|
+
window.history.pushState = function(...n) {
|
|
767
|
+
const i = e.apply(this, n);
|
|
768
768
|
return window.dispatchEvent(new Event(Et)), i;
|
|
769
|
-
}, window.history.replaceState = function(...
|
|
770
|
-
const i = t.apply(this,
|
|
769
|
+
}, window.history.replaceState = function(...n) {
|
|
770
|
+
const i = t.apply(this, n);
|
|
771
771
|
return window.dispatchEvent(new Event(Et)), i;
|
|
772
772
|
}, window.history[fn] = !0;
|
|
773
773
|
}
|
|
@@ -775,13 +775,13 @@ function pn() {
|
|
|
775
775
|
return typeof window > "u" ? "/" : window.location.pathname || "/";
|
|
776
776
|
}
|
|
777
777
|
function Or(e) {
|
|
778
|
-
const [t,
|
|
778
|
+
const [t, n] = M(
|
|
779
779
|
() => e ?? pn()
|
|
780
780
|
);
|
|
781
781
|
return T(() => {
|
|
782
782
|
if (e !== void 0) return;
|
|
783
783
|
Hr();
|
|
784
|
-
const i = () =>
|
|
784
|
+
const i = () => n(pn());
|
|
785
785
|
return i(), window.addEventListener("popstate", i), window.addEventListener(Et, i), () => {
|
|
786
786
|
window.removeEventListener("popstate", i), window.removeEventListener(Et, i);
|
|
787
787
|
};
|
|
@@ -794,29 +794,29 @@ function Wr(e) {
|
|
|
794
794
|
function Br(e) {
|
|
795
795
|
const t = hn.get(e);
|
|
796
796
|
if (t) return t;
|
|
797
|
-
const
|
|
798
|
-
return hn.set(e,
|
|
797
|
+
const n = e.length > 1 && e.endsWith("/") ? e.slice(0, -1) : e, i = "", a = "", l = n.replace(/\*\*/g, i).replace(/\*/g, a), o = Wr(l).replace(new RegExp(`\\/${i}`, "g"), "(?:\\/.*)?").replace(new RegExp(i, "g"), ".*").replace(new RegExp(a, "g"), "[^/]+"), c = new RegExp(`^${o}\\/?$`);
|
|
798
|
+
return hn.set(e, c), c;
|
|
799
799
|
}
|
|
800
800
|
function qr(e, t) {
|
|
801
|
-
const
|
|
802
|
-
return Br(e).test(
|
|
801
|
+
const n = t.length > 1 && t.endsWith("/") ? t.slice(0, -1) : t;
|
|
802
|
+
return Br(e).test(n);
|
|
803
803
|
}
|
|
804
804
|
function Ur(e, t) {
|
|
805
805
|
return typeof e == "function" ? e(t) : e instanceof RegExp ? e.test(t) : qr(e, t);
|
|
806
806
|
}
|
|
807
807
|
function mn(e, t) {
|
|
808
808
|
if (!e || e.length === 0) return !1;
|
|
809
|
-
for (const
|
|
810
|
-
if (Ur(
|
|
809
|
+
for (const n of e)
|
|
810
|
+
if (Ur(n, t)) return !0;
|
|
811
811
|
return !1;
|
|
812
812
|
}
|
|
813
|
-
function jr(e, t,
|
|
814
|
-
return e === void 0 ? !0 : mn(
|
|
813
|
+
function jr(e, t, n) {
|
|
814
|
+
return e === void 0 ? !0 : mn(n, e) ? !1 : t && t.length > 0 ? mn(t, e) : !0;
|
|
815
815
|
}
|
|
816
|
-
function Vr(e, t,
|
|
816
|
+
function Vr(e, t, n) {
|
|
817
817
|
return et(
|
|
818
|
-
() => jr(e, t,
|
|
819
|
-
[e, t,
|
|
818
|
+
() => jr(e, t, n),
|
|
819
|
+
[e, t, n]
|
|
820
820
|
);
|
|
821
821
|
}
|
|
822
822
|
function Yr(e) {
|
|
@@ -827,21 +827,21 @@ function Yr(e) {
|
|
|
827
827
|
};
|
|
828
828
|
}
|
|
829
829
|
function Gr(e) {
|
|
830
|
-
const t = et(() => Yr(e.config), [e.config]),
|
|
831
|
-
(
|
|
830
|
+
const t = et(() => Yr(e.config), [e.config]), n = e.baseUrl.replace(/\/+$/, ""), i = I(null), a = C(
|
|
831
|
+
(c) => {
|
|
832
832
|
try {
|
|
833
|
-
new Audio(`${
|
|
833
|
+
new Audio(`${n}${c}`).play().catch(() => {
|
|
834
834
|
});
|
|
835
835
|
} catch {
|
|
836
836
|
}
|
|
837
837
|
},
|
|
838
|
-
[
|
|
839
|
-
),
|
|
838
|
+
[n]
|
|
839
|
+
), l = C(() => {
|
|
840
840
|
t.navigate && a("/audio/page-change-sound.mp3");
|
|
841
|
-
}, [t.navigate, a]),
|
|
841
|
+
}, [t.navigate, a]), s = C(() => {
|
|
842
842
|
t.action && a("/audio/confirmation-sound.mp3");
|
|
843
|
-
}, [t.action, a]),
|
|
844
|
-
(
|
|
843
|
+
}, [t.action, a]), o = C(
|
|
844
|
+
(c) => {
|
|
845
845
|
if (!t.thinking) {
|
|
846
846
|
if (i.current) {
|
|
847
847
|
try {
|
|
@@ -852,10 +852,10 @@ function Gr(e) {
|
|
|
852
852
|
}
|
|
853
853
|
return;
|
|
854
854
|
}
|
|
855
|
-
if (
|
|
855
|
+
if (c) {
|
|
856
856
|
if (i.current) return;
|
|
857
857
|
try {
|
|
858
|
-
const u = new Audio(`${
|
|
858
|
+
const u = new Audio(`${n}/audio/thinking-sound.mp3`);
|
|
859
859
|
u.loop = !0, u.volume = 0.3, u.play().catch(() => {
|
|
860
860
|
i.current = null;
|
|
861
861
|
}), i.current = u;
|
|
@@ -869,7 +869,7 @@ function Gr(e) {
|
|
|
869
869
|
i.current = null;
|
|
870
870
|
}
|
|
871
871
|
},
|
|
872
|
-
[
|
|
872
|
+
[n, t.thinking]
|
|
873
873
|
);
|
|
874
874
|
return T(() => () => {
|
|
875
875
|
if (i.current) {
|
|
@@ -880,8 +880,8 @@ function Gr(e) {
|
|
|
880
880
|
i.current = null;
|
|
881
881
|
}
|
|
882
882
|
}, []), et(
|
|
883
|
-
() => ({ playPageChange:
|
|
884
|
-
[
|
|
883
|
+
() => ({ playPageChange: l, playConfirmation: s, setThinking: o }),
|
|
884
|
+
[l, s, o]
|
|
885
885
|
);
|
|
886
886
|
}
|
|
887
887
|
const gn = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ k(
|
|
@@ -894,7 +894,7 @@ const gn = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ k(
|
|
|
894
894
|
strokeWidth: 2,
|
|
895
895
|
"aria-hidden": "true",
|
|
896
896
|
children: [
|
|
897
|
-
/* @__PURE__ */
|
|
897
|
+
/* @__PURE__ */ r(
|
|
898
898
|
"path",
|
|
899
899
|
{
|
|
900
900
|
strokeLinecap: "round",
|
|
@@ -902,7 +902,7 @@ const gn = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ k(
|
|
|
902
902
|
d: "M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z"
|
|
903
903
|
}
|
|
904
904
|
),
|
|
905
|
-
/* @__PURE__ */
|
|
905
|
+
/* @__PURE__ */ r(
|
|
906
906
|
"path",
|
|
907
907
|
{
|
|
908
908
|
strokeLinecap: "round",
|
|
@@ -912,7 +912,7 @@ const gn = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ k(
|
|
|
912
912
|
)
|
|
913
913
|
]
|
|
914
914
|
}
|
|
915
|
-
) : /* @__PURE__ */
|
|
915
|
+
) : /* @__PURE__ */ r(
|
|
916
916
|
"svg",
|
|
917
917
|
{
|
|
918
918
|
className: t,
|
|
@@ -921,7 +921,7 @@ const gn = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ k(
|
|
|
921
921
|
stroke: "currentColor",
|
|
922
922
|
strokeWidth: 2,
|
|
923
923
|
"aria-hidden": "true",
|
|
924
|
-
children: /* @__PURE__ */
|
|
924
|
+
children: /* @__PURE__ */ r(
|
|
925
925
|
"path",
|
|
926
926
|
{
|
|
927
927
|
strokeLinecap: "round",
|
|
@@ -930,7 +930,7 @@ const gn = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ k(
|
|
|
930
930
|
}
|
|
931
931
|
)
|
|
932
932
|
}
|
|
933
|
-
), yn = ({ className: e }) => /* @__PURE__ */
|
|
933
|
+
), yn = ({ className: e }) => /* @__PURE__ */ r(
|
|
934
934
|
"svg",
|
|
935
935
|
{
|
|
936
936
|
className: e,
|
|
@@ -939,7 +939,7 @@ const gn = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ k(
|
|
|
939
939
|
stroke: "currentColor",
|
|
940
940
|
strokeWidth: 2,
|
|
941
941
|
"aria-hidden": "true",
|
|
942
|
-
children: /* @__PURE__ */
|
|
942
|
+
children: /* @__PURE__ */ r(
|
|
943
943
|
"path",
|
|
944
944
|
{
|
|
945
945
|
strokeLinecap: "round",
|
|
@@ -948,7 +948,7 @@ const gn = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ k(
|
|
|
948
948
|
}
|
|
949
949
|
)
|
|
950
950
|
}
|
|
951
|
-
), Xr = ({ className: e }) => /* @__PURE__ */
|
|
951
|
+
), Xr = ({ className: e }) => /* @__PURE__ */ r(
|
|
952
952
|
"svg",
|
|
953
953
|
{
|
|
954
954
|
className: e,
|
|
@@ -957,14 +957,14 @@ const gn = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ k(
|
|
|
957
957
|
stroke: "currentColor",
|
|
958
958
|
strokeWidth: 2,
|
|
959
959
|
"aria-hidden": "true",
|
|
960
|
-
children: /* @__PURE__ */
|
|
960
|
+
children: /* @__PURE__ */ r("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
|
|
961
961
|
}
|
|
962
962
|
), Kr = {
|
|
963
963
|
left: 180,
|
|
964
964
|
right: 0,
|
|
965
965
|
up: -90,
|
|
966
966
|
down: 90
|
|
967
|
-
}, vn = ({ direction: e = "right", className: t }) => /* @__PURE__ */
|
|
967
|
+
}, vn = ({ direction: e = "right", className: t }) => /* @__PURE__ */ r(
|
|
968
968
|
"svg",
|
|
969
969
|
{
|
|
970
970
|
className: t,
|
|
@@ -974,7 +974,7 @@ const gn = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ k(
|
|
|
974
974
|
strokeWidth: 2,
|
|
975
975
|
style: { transform: `rotate(${Kr[e]}deg)` },
|
|
976
976
|
"aria-hidden": "true",
|
|
977
|
-
children: /* @__PURE__ */
|
|
977
|
+
children: /* @__PURE__ */ r("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 6l6 6-6 6" })
|
|
978
978
|
}
|
|
979
979
|
);
|
|
980
980
|
function Jr(e) {
|
|
@@ -1002,14 +1002,14 @@ function wn(e) {
|
|
|
1002
1002
|
const ei = ({
|
|
1003
1003
|
position: e,
|
|
1004
1004
|
isMobile: t,
|
|
1005
|
-
isSpeaking:
|
|
1005
|
+
isSpeaking: n,
|
|
1006
1006
|
onExpand: i,
|
|
1007
1007
|
label: a = "Open widget",
|
|
1008
|
-
avatarImageUrl:
|
|
1009
|
-
agentName:
|
|
1010
|
-
containerEl:
|
|
1008
|
+
avatarImageUrl: l,
|
|
1009
|
+
agentName: s,
|
|
1010
|
+
containerEl: o
|
|
1011
1011
|
}) => {
|
|
1012
|
-
const
|
|
1012
|
+
const c = Jr(e), u = c === "right" ? "left" : "right", b = t ? 80 : 72, p = !!l, h = !!o, [P, x] = M(null), [E, g] = M(!1), w = I(null), R = I(!1), S = C(
|
|
1013
1013
|
($) => {
|
|
1014
1014
|
if (typeof window > "u") return $;
|
|
1015
1015
|
const G = b / 2, f = bn + G, N = window.innerHeight - bn - G;
|
|
@@ -1085,14 +1085,14 @@ const ei = ({
|
|
|
1085
1085
|
[S]
|
|
1086
1086
|
), K = [
|
|
1087
1087
|
"ll-hidden",
|
|
1088
|
-
`ll-hidden--${
|
|
1088
|
+
`ll-hidden--${c}`,
|
|
1089
1089
|
t ? "ll-hidden--mobile" : "ll-hidden--desktop",
|
|
1090
|
-
|
|
1090
|
+
n ? "ll-hidden--speaking" : null,
|
|
1091
1091
|
E ? "is-dragging" : null,
|
|
1092
1092
|
p ? "ll-hidden--with-avatar" : null,
|
|
1093
1093
|
h ? "ll-hidden--scoped" : null
|
|
1094
1094
|
].filter(Boolean).join(" "), ae = P === null ? void 0 : { top: `${P - b / 2}px`, transform: "none" };
|
|
1095
|
-
return /* @__PURE__ */
|
|
1095
|
+
return /* @__PURE__ */ r(
|
|
1096
1096
|
"button",
|
|
1097
1097
|
{
|
|
1098
1098
|
type: "button",
|
|
@@ -1112,24 +1112,24 @@ const ei = ({
|
|
|
1112
1112
|
// taking the rest of the tab. Reinforces "this is an
|
|
1113
1113
|
// avatar-based experience" even when collapsed.
|
|
1114
1114
|
/* @__PURE__ */ k(Fe, { children: [
|
|
1115
|
-
/* @__PURE__ */
|
|
1115
|
+
/* @__PURE__ */ r(
|
|
1116
1116
|
vn,
|
|
1117
1117
|
{
|
|
1118
1118
|
direction: u,
|
|
1119
1119
|
className: "ll-hidden__chevron ll-hidden__chevron--mini"
|
|
1120
1120
|
}
|
|
1121
1121
|
),
|
|
1122
|
-
/* @__PURE__ */
|
|
1122
|
+
/* @__PURE__ */ r(
|
|
1123
1123
|
"img",
|
|
1124
1124
|
{
|
|
1125
|
-
src:
|
|
1126
|
-
alt:
|
|
1125
|
+
src: l,
|
|
1126
|
+
alt: s ? `${s} avatar` : "Agent avatar",
|
|
1127
1127
|
className: "ll-hidden__avatar",
|
|
1128
1128
|
draggable: !1
|
|
1129
1129
|
}
|
|
1130
1130
|
)
|
|
1131
1131
|
] })
|
|
1132
|
-
) : /* @__PURE__ */
|
|
1132
|
+
) : /* @__PURE__ */ r(
|
|
1133
1133
|
vn,
|
|
1134
1134
|
{
|
|
1135
1135
|
direction: u,
|
|
@@ -1141,31 +1141,31 @@ const ei = ({
|
|
|
1141
1141
|
}, ti = ({
|
|
1142
1142
|
audioLevel: e,
|
|
1143
1143
|
bars: t = 20,
|
|
1144
|
-
maxHeight:
|
|
1144
|
+
maxHeight: n = 20,
|
|
1145
1145
|
minHeight: i = 4,
|
|
1146
1146
|
className: a,
|
|
1147
|
-
barClassName:
|
|
1147
|
+
barClassName: l
|
|
1148
1148
|
}) => {
|
|
1149
|
-
const
|
|
1149
|
+
const s = I(null), o = I([]), c = et(() => {
|
|
1150
1150
|
const b = (Math.sqrt(5) - 1) / 2;
|
|
1151
1151
|
return Array.from({ length: t }, (p, h) => 0.5 + h * b % 1 * 0.5);
|
|
1152
1152
|
}, [t]);
|
|
1153
1153
|
T(() => e.subscribe((p) => {
|
|
1154
1154
|
for (let h = 0; h < t; h++) {
|
|
1155
|
-
const P =
|
|
1155
|
+
const P = o.current[h];
|
|
1156
1156
|
if (!P) continue;
|
|
1157
|
-
const x = Math.max(i, p *
|
|
1157
|
+
const x = Math.max(i, p * n * c[h]);
|
|
1158
1158
|
P.style.height = `${x}px`;
|
|
1159
1159
|
}
|
|
1160
|
-
}), [e, t,
|
|
1160
|
+
}), [e, t, n, i, c]);
|
|
1161
1161
|
const u = ["ll-waveform", a].filter(Boolean).join(" ");
|
|
1162
|
-
return /* @__PURE__ */
|
|
1162
|
+
return /* @__PURE__ */ r("div", { ref: s, className: u, "aria-hidden": "true", children: Array.from({ length: t }, (b, p) => /* @__PURE__ */ r(
|
|
1163
1163
|
"div",
|
|
1164
1164
|
{
|
|
1165
1165
|
ref: (h) => {
|
|
1166
|
-
|
|
1166
|
+
o.current[p] = h;
|
|
1167
1167
|
},
|
|
1168
|
-
className: ["ll-waveform__bar",
|
|
1168
|
+
className: ["ll-waveform__bar", l].filter(Boolean).join(" "),
|
|
1169
1169
|
style: { height: `${i}px` }
|
|
1170
1170
|
},
|
|
1171
1171
|
p
|
|
@@ -1173,124 +1173,124 @@ const ei = ({
|
|
|
1173
1173
|
}, ni = ({
|
|
1174
1174
|
position: e,
|
|
1175
1175
|
isMobile: t,
|
|
1176
|
-
agentName:
|
|
1176
|
+
agentName: n,
|
|
1177
1177
|
avatarImageUrl: i,
|
|
1178
1178
|
agentState: a,
|
|
1179
|
-
isMuted:
|
|
1180
|
-
audioLevel:
|
|
1181
|
-
onExpand:
|
|
1182
|
-
onToggleMute:
|
|
1179
|
+
isMuted: l,
|
|
1180
|
+
audioLevel: s,
|
|
1181
|
+
onExpand: o,
|
|
1182
|
+
onToggleMute: c,
|
|
1183
1183
|
onClose: u
|
|
1184
|
-
}) => t ? /* @__PURE__ */
|
|
1184
|
+
}) => t ? /* @__PURE__ */ r(
|
|
1185
1185
|
"div",
|
|
1186
1186
|
{
|
|
1187
1187
|
className: "ll-minimized ll-minimized--mobile",
|
|
1188
1188
|
role: "region",
|
|
1189
|
-
"aria-label": `${
|
|
1189
|
+
"aria-label": `${n} widget`,
|
|
1190
1190
|
children: /* @__PURE__ */ k(
|
|
1191
1191
|
"button",
|
|
1192
1192
|
{
|
|
1193
1193
|
type: "button",
|
|
1194
1194
|
className: "ll-minimized__surface",
|
|
1195
|
-
onClick:
|
|
1196
|
-
"aria-label": `Expand ${
|
|
1195
|
+
onClick: o,
|
|
1196
|
+
"aria-label": `Expand ${n} widget`,
|
|
1197
1197
|
children: [
|
|
1198
1198
|
i ? (
|
|
1199
1199
|
// eslint-disable-next-line @next/next/no-img-element
|
|
1200
|
-
/* @__PURE__ */
|
|
1200
|
+
/* @__PURE__ */ r(
|
|
1201
1201
|
"img",
|
|
1202
1202
|
{
|
|
1203
1203
|
src: i,
|
|
1204
|
-
alt:
|
|
1204
|
+
alt: n,
|
|
1205
1205
|
className: "ll-minimized__avatar"
|
|
1206
1206
|
}
|
|
1207
1207
|
)
|
|
1208
|
-
) : /* @__PURE__ */
|
|
1209
|
-
/* @__PURE__ */
|
|
1208
|
+
) : /* @__PURE__ */ r("div", { className: "ll-minimized__avatar ll-minimized__avatar--placeholder" }),
|
|
1209
|
+
/* @__PURE__ */ r(
|
|
1210
1210
|
ti,
|
|
1211
1211
|
{
|
|
1212
|
-
audioLevel:
|
|
1212
|
+
audioLevel: s,
|
|
1213
1213
|
bars: 16,
|
|
1214
1214
|
maxHeight: 18,
|
|
1215
1215
|
className: "ll-minimized__waveform"
|
|
1216
1216
|
}
|
|
1217
1217
|
),
|
|
1218
|
-
/* @__PURE__ */
|
|
1218
|
+
/* @__PURE__ */ r("span", { className: "ll-minimized__name", children: n }),
|
|
1219
1219
|
/* @__PURE__ */ k("div", { className: "ll-minimized__controls", children: [
|
|
1220
|
-
/* @__PURE__ */
|
|
1220
|
+
/* @__PURE__ */ r(
|
|
1221
1221
|
"span",
|
|
1222
1222
|
{
|
|
1223
1223
|
className: "ll-minimized__btn",
|
|
1224
1224
|
role: "button",
|
|
1225
1225
|
tabIndex: 0,
|
|
1226
1226
|
onClick: (b) => {
|
|
1227
|
-
b.stopPropagation(),
|
|
1227
|
+
b.stopPropagation(), c();
|
|
1228
1228
|
},
|
|
1229
1229
|
onKeyDown: (b) => {
|
|
1230
|
-
(b.key === "Enter" || b.key === " ") && (b.stopPropagation(), b.preventDefault(),
|
|
1230
|
+
(b.key === "Enter" || b.key === " ") && (b.stopPropagation(), b.preventDefault(), c());
|
|
1231
1231
|
},
|
|
1232
|
-
"aria-label":
|
|
1233
|
-
children: /* @__PURE__ */
|
|
1232
|
+
"aria-label": l ? "Unmute microphone" : "Mute microphone",
|
|
1233
|
+
children: /* @__PURE__ */ r(gn, { muted: l, className: "ll-minimized__icon" })
|
|
1234
1234
|
}
|
|
1235
1235
|
),
|
|
1236
|
-
/* @__PURE__ */
|
|
1236
|
+
/* @__PURE__ */ r(yn, { className: "ll-minimized__icon ll-minimized__icon--expand" })
|
|
1237
1237
|
] })
|
|
1238
1238
|
]
|
|
1239
1239
|
}
|
|
1240
1240
|
)
|
|
1241
1241
|
}
|
|
1242
|
-
) : /* @__PURE__ */
|
|
1242
|
+
) : /* @__PURE__ */ r(
|
|
1243
1243
|
"div",
|
|
1244
1244
|
{
|
|
1245
1245
|
className: "ll-minimized ll-minimized--desktop",
|
|
1246
1246
|
"data-position": e,
|
|
1247
1247
|
role: "region",
|
|
1248
|
-
"aria-label": `${
|
|
1248
|
+
"aria-label": `${n} widget`,
|
|
1249
1249
|
children: /* @__PURE__ */ k("div", { className: "ll-minimized__surface", children: [
|
|
1250
1250
|
i ? (
|
|
1251
1251
|
// eslint-disable-next-line @next/next/no-img-element
|
|
1252
|
-
/* @__PURE__ */
|
|
1252
|
+
/* @__PURE__ */ r(
|
|
1253
1253
|
"img",
|
|
1254
1254
|
{
|
|
1255
1255
|
src: i,
|
|
1256
|
-
alt:
|
|
1256
|
+
alt: n,
|
|
1257
1257
|
className: "ll-minimized__avatar"
|
|
1258
1258
|
}
|
|
1259
1259
|
)
|
|
1260
|
-
) : /* @__PURE__ */
|
|
1260
|
+
) : /* @__PURE__ */ r("div", { className: "ll-minimized__avatar ll-minimized__avatar--placeholder" }),
|
|
1261
1261
|
/* @__PURE__ */ k("div", { className: "ll-minimized__meta", children: [
|
|
1262
|
-
/* @__PURE__ */
|
|
1263
|
-
/* @__PURE__ */
|
|
1262
|
+
/* @__PURE__ */ r("span", { className: "ll-minimized__name", children: n }),
|
|
1263
|
+
/* @__PURE__ */ r("span", { className: "ll-minimized__state", children: a === "speaking" ? "Speaking" : a === "thinking" ? "Thinking" : "Listening" })
|
|
1264
1264
|
] }),
|
|
1265
1265
|
/* @__PURE__ */ k("div", { className: "ll-minimized__controls", children: [
|
|
1266
|
-
/* @__PURE__ */
|
|
1266
|
+
/* @__PURE__ */ r(
|
|
1267
1267
|
"button",
|
|
1268
1268
|
{
|
|
1269
1269
|
type: "button",
|
|
1270
1270
|
className: "ll-minimized__btn",
|
|
1271
|
-
onClick:
|
|
1272
|
-
"aria-label":
|
|
1273
|
-
children: /* @__PURE__ */
|
|
1271
|
+
onClick: c,
|
|
1272
|
+
"aria-label": l ? "Unmute microphone" : "Mute microphone",
|
|
1273
|
+
children: /* @__PURE__ */ r(gn, { muted: l, className: "ll-minimized__icon" })
|
|
1274
1274
|
}
|
|
1275
1275
|
),
|
|
1276
|
-
/* @__PURE__ */
|
|
1276
|
+
/* @__PURE__ */ r(
|
|
1277
1277
|
"button",
|
|
1278
1278
|
{
|
|
1279
1279
|
type: "button",
|
|
1280
1280
|
className: "ll-minimized__btn",
|
|
1281
|
-
onClick:
|
|
1282
|
-
"aria-label": `Expand ${
|
|
1283
|
-
children: /* @__PURE__ */
|
|
1281
|
+
onClick: o,
|
|
1282
|
+
"aria-label": `Expand ${n} widget`,
|
|
1283
|
+
children: /* @__PURE__ */ r(yn, { className: "ll-minimized__icon" })
|
|
1284
1284
|
}
|
|
1285
1285
|
),
|
|
1286
|
-
/* @__PURE__ */
|
|
1286
|
+
/* @__PURE__ */ r(
|
|
1287
1287
|
"button",
|
|
1288
1288
|
{
|
|
1289
1289
|
type: "button",
|
|
1290
1290
|
className: "ll-minimized__btn ll-minimized__btn--close",
|
|
1291
1291
|
onClick: u,
|
|
1292
1292
|
"aria-label": "Close widget",
|
|
1293
|
-
children: /* @__PURE__ */
|
|
1293
|
+
children: /* @__PURE__ */ r(Xr, { className: "ll-minimized__icon" })
|
|
1294
1294
|
}
|
|
1295
1295
|
)
|
|
1296
1296
|
] })
|
|
@@ -1299,15 +1299,15 @@ const ei = ({
|
|
|
1299
1299
|
), ri = ({
|
|
1300
1300
|
src: e,
|
|
1301
1301
|
alt: t,
|
|
1302
|
-
preCannedPlaying:
|
|
1302
|
+
preCannedPlaying: n = !1,
|
|
1303
1303
|
className: i,
|
|
1304
1304
|
style: a
|
|
1305
1305
|
}) => {
|
|
1306
|
-
const [
|
|
1306
|
+
const [l, s] = M(!1), o = I(e);
|
|
1307
1307
|
if (T(() => {
|
|
1308
|
-
|
|
1308
|
+
o.current !== e && (o.current = e, s(!1));
|
|
1309
1309
|
}, [e]), !e) return null;
|
|
1310
|
-
const
|
|
1310
|
+
const c = {
|
|
1311
1311
|
position: "absolute",
|
|
1312
1312
|
inset: 0,
|
|
1313
1313
|
width: "100%",
|
|
@@ -1315,22 +1315,22 @@ const ei = ({
|
|
|
1315
1315
|
objectFit: "cover",
|
|
1316
1316
|
objectPosition: "top",
|
|
1317
1317
|
transition: "opacity 500ms ease, transform 500ms ease",
|
|
1318
|
-
transform:
|
|
1319
|
-
opacity:
|
|
1318
|
+
transform: n ? "scale(1.02)" : "scale(1)",
|
|
1319
|
+
opacity: l ? 1 : 0,
|
|
1320
1320
|
...a
|
|
1321
1321
|
};
|
|
1322
1322
|
return (
|
|
1323
1323
|
// eslint-disable-next-line @next/next/no-img-element
|
|
1324
|
-
/* @__PURE__ */
|
|
1324
|
+
/* @__PURE__ */ r(
|
|
1325
1325
|
"img",
|
|
1326
1326
|
{
|
|
1327
1327
|
src: e,
|
|
1328
1328
|
alt: t,
|
|
1329
1329
|
className: i,
|
|
1330
|
-
style:
|
|
1330
|
+
style: c,
|
|
1331
1331
|
loading: "eager",
|
|
1332
1332
|
fetchPriority: "high",
|
|
1333
|
-
onLoad: () =>
|
|
1333
|
+
onLoad: () => s(!0)
|
|
1334
1334
|
}
|
|
1335
1335
|
)
|
|
1336
1336
|
);
|
|
@@ -1338,7 +1338,7 @@ const ei = ({
|
|
|
1338
1338
|
function oi({
|
|
1339
1339
|
size: e = 14,
|
|
1340
1340
|
className: t,
|
|
1341
|
-
fill:
|
|
1341
|
+
fill: n = ii
|
|
1342
1342
|
}) {
|
|
1343
1343
|
return /* @__PURE__ */ k(
|
|
1344
1344
|
"svg",
|
|
@@ -1351,25 +1351,25 @@ function oi({
|
|
|
1351
1351
|
className: t,
|
|
1352
1352
|
"aria-hidden": !0,
|
|
1353
1353
|
children: [
|
|
1354
|
-
/* @__PURE__ */
|
|
1354
|
+
/* @__PURE__ */ r(
|
|
1355
1355
|
"path",
|
|
1356
1356
|
{
|
|
1357
1357
|
d: "M44.5714 26C44.5714 23.5612 44.0908 21.146 43.1575 18.8928C42.2242 16.6397 40.8565 14.5924 39.132 12.868C37.4076 11.1435 35.3603 9.77577 33.1072 8.84247C30.854 7.90917 28.4388 7.42857 26 7.42857C23.5612 7.42857 21.146 7.90916 18.8928 8.84247C16.6397 9.77577 14.5924 11.1435 12.868 12.868C11.1435 14.5924 9.77577 16.6397 8.84247 18.8928C7.90917 21.146 7.42857 23.5612 7.42857 26C7.42857 28.4388 7.90916 30.854 8.84247 33.1072C9.77577 35.3603 11.1435 37.4076 12.868 39.132C14.5924 40.8565 16.6397 42.2242 18.8928 43.1575C21.146 44.0908 23.5612 44.5714 26 44.5714H48.2857C50.3371 44.5714 52 46.2344 52 48.2857C52 50.3371 50.3371 52 48.2857 52H26C22.5857 52 19.2049 51.3275 16.0505 50.021C12.896 48.7144 10.0293 46.7993 7.61501 44.385C5.20069 41.9707 3.28564 39.104 1.97902 35.9495C0.67247 32.7951 -3.54212e-07 29.4143 0 26C-1.68163e-07 22.5857 0.672469 19.2049 1.97902 16.0505C3.28564 12.896 5.20069 10.0293 7.61501 7.61501C10.0293 5.20069 12.896 3.28564 16.0505 1.97902C19.2049 0.67247 22.5857 0 26 0C29.4143 1.86048e-07 32.7951 0.67247 35.9495 1.97902C39.104 3.28564 41.9707 5.20069 44.385 7.61501C46.7993 10.0293 48.7144 12.896 50.021 16.0505C51.3275 19.2049 52 22.5857 52 26C52 28.0513 50.3371 29.7143 48.2857 29.7143C46.2344 29.7143 44.5714 28.0513 44.5714 26Z",
|
|
1358
|
-
fill:
|
|
1358
|
+
fill: n
|
|
1359
1359
|
}
|
|
1360
1360
|
),
|
|
1361
|
-
/* @__PURE__ */
|
|
1361
|
+
/* @__PURE__ */ r(
|
|
1362
1362
|
"path",
|
|
1363
1363
|
{
|
|
1364
1364
|
d: "M28.9717 23.7714C28.9717 21.3098 30.9672 19.3143 33.4288 19.3143C35.8904 19.3143 37.886 21.3098 37.886 23.7714C37.886 26.233 35.8904 28.2286 33.4288 28.2286C30.9672 28.2286 28.9717 26.233 28.9717 23.7714Z",
|
|
1365
|
-
fill:
|
|
1365
|
+
fill: n
|
|
1366
1366
|
}
|
|
1367
1367
|
),
|
|
1368
|
-
/* @__PURE__ */
|
|
1368
|
+
/* @__PURE__ */ r(
|
|
1369
1369
|
"path",
|
|
1370
1370
|
{
|
|
1371
1371
|
d: "M18.5714 19.3143C16.1098 19.3143 14.1143 21.3098 14.1143 23.7714C14.1143 26.233 16.1098 28.2286 18.5714 28.2286C21.033 28.2286 23.0285 26.233 23.0285 23.7714C23.0285 21.3098 21.033 19.3143 18.5714 19.3143Z",
|
|
1372
|
-
fill:
|
|
1372
|
+
fill: n
|
|
1373
1373
|
}
|
|
1374
1374
|
)
|
|
1375
1375
|
]
|
|
@@ -1379,40 +1379,40 @@ function oi({
|
|
|
1379
1379
|
const li = 8, _n = 8, ai = ({
|
|
1380
1380
|
open: e,
|
|
1381
1381
|
onClose: t,
|
|
1382
|
-
anchorRef:
|
|
1382
|
+
anchorRef: n,
|
|
1383
1383
|
children: i
|
|
1384
1384
|
}) => {
|
|
1385
|
-
const a = I(null), [
|
|
1385
|
+
const a = I(null), [l, s] = M(null);
|
|
1386
1386
|
return Tn(() => {
|
|
1387
1387
|
if (!e) {
|
|
1388
|
-
|
|
1388
|
+
s(null);
|
|
1389
1389
|
return;
|
|
1390
1390
|
}
|
|
1391
|
-
const
|
|
1392
|
-
if (!
|
|
1393
|
-
const
|
|
1394
|
-
const u =
|
|
1391
|
+
const o = n.current;
|
|
1392
|
+
if (!o) return;
|
|
1393
|
+
const c = () => {
|
|
1394
|
+
const u = o.getBoundingClientRect(), b = {
|
|
1395
1395
|
top: u.top - li,
|
|
1396
1396
|
left: u.left + u.width / 2
|
|
1397
1397
|
}, p = _n + 90, h = window.innerWidth - _n - 90;
|
|
1398
|
-
b.left < p && (b.left = p), b.left > h && (b.left = h),
|
|
1398
|
+
b.left < p && (b.left = p), b.left > h && (b.left = h), s(b);
|
|
1399
1399
|
};
|
|
1400
|
-
return
|
|
1401
|
-
window.removeEventListener("scroll",
|
|
1400
|
+
return c(), window.addEventListener("scroll", c, !0), window.addEventListener("resize", c), () => {
|
|
1401
|
+
window.removeEventListener("scroll", c, !0), window.removeEventListener("resize", c);
|
|
1402
1402
|
};
|
|
1403
|
-
}, [e,
|
|
1403
|
+
}, [e, n]), T(() => {
|
|
1404
1404
|
if (!e) return;
|
|
1405
|
-
const
|
|
1406
|
-
const b = u.target, p = a.current, h =
|
|
1405
|
+
const o = (u) => {
|
|
1406
|
+
const b = u.target, p = a.current, h = n.current;
|
|
1407
1407
|
p && p.contains(b) || h && h.contains(b) || t();
|
|
1408
|
-
},
|
|
1408
|
+
}, c = (u) => {
|
|
1409
1409
|
u.key === "Escape" && (u.stopPropagation(), t());
|
|
1410
1410
|
};
|
|
1411
|
-
return document.addEventListener("mousedown",
|
|
1412
|
-
document.removeEventListener("mousedown",
|
|
1411
|
+
return document.addEventListener("mousedown", o), document.addEventListener("keydown", c), () => {
|
|
1412
|
+
document.removeEventListener("mousedown", o), document.removeEventListener("keydown", c);
|
|
1413
1413
|
};
|
|
1414
|
-
}, [e, t,
|
|
1415
|
-
/* @__PURE__ */
|
|
1414
|
+
}, [e, t, n]), !e || l === null || typeof document > "u" ? null : Vt(
|
|
1415
|
+
/* @__PURE__ */ r(
|
|
1416
1416
|
"div",
|
|
1417
1417
|
{
|
|
1418
1418
|
ref: a,
|
|
@@ -1422,8 +1422,8 @@ const li = 8, _n = 8, ai = ({
|
|
|
1422
1422
|
position: "fixed",
|
|
1423
1423
|
// Lift the popover above the anchor via translateY(-100%).
|
|
1424
1424
|
// top points to (anchorTop - GAP); transform pulls bottom up to there.
|
|
1425
|
-
top:
|
|
1426
|
-
left:
|
|
1425
|
+
top: l.top,
|
|
1426
|
+
left: l.left,
|
|
1427
1427
|
transform: "translate(-50%, -100%)"
|
|
1428
1428
|
},
|
|
1429
1429
|
children: i
|
|
@@ -1434,13 +1434,13 @@ const li = 8, _n = 8, ai = ({
|
|
|
1434
1434
|
}, si = ({
|
|
1435
1435
|
isMuted: e,
|
|
1436
1436
|
onToggleMute: t,
|
|
1437
|
-
isCameraEnabled:
|
|
1437
|
+
isCameraEnabled: n,
|
|
1438
1438
|
onToggleCamera: i,
|
|
1439
1439
|
allowCamera: a,
|
|
1440
|
-
isScreenShareEnabled:
|
|
1441
|
-
onToggleScreenShare:
|
|
1442
|
-
allowScreenShare:
|
|
1443
|
-
isSpeakerMuted:
|
|
1440
|
+
isScreenShareEnabled: l,
|
|
1441
|
+
onToggleScreenShare: s,
|
|
1442
|
+
allowScreenShare: o,
|
|
1443
|
+
isSpeakerMuted: c,
|
|
1444
1444
|
onToggleSpeaker: u,
|
|
1445
1445
|
allowTyping: b,
|
|
1446
1446
|
isTypingOpen: p,
|
|
@@ -1456,17 +1456,17 @@ const li = 8, _n = 8, ai = ({
|
|
|
1456
1456
|
"data-testid": "compact-toolbar",
|
|
1457
1457
|
onClick: (w) => w.stopPropagation(),
|
|
1458
1458
|
children: [
|
|
1459
|
-
/* @__PURE__ */
|
|
1459
|
+
/* @__PURE__ */ r(
|
|
1460
1460
|
"button",
|
|
1461
1461
|
{
|
|
1462
1462
|
type: "button",
|
|
1463
1463
|
className: `ll-tool ${e ? "is-muted" : ""}`,
|
|
1464
1464
|
onClick: t,
|
|
1465
1465
|
"aria-label": e ? "Unmute microphone" : "Mute microphone",
|
|
1466
|
-
children: /* @__PURE__ */
|
|
1466
|
+
children: /* @__PURE__ */ r(Fn, { muted: e })
|
|
1467
1467
|
}
|
|
1468
1468
|
),
|
|
1469
|
-
/* @__PURE__ */
|
|
1469
|
+
/* @__PURE__ */ r(
|
|
1470
1470
|
"button",
|
|
1471
1471
|
{
|
|
1472
1472
|
ref: g,
|
|
@@ -1476,17 +1476,17 @@ const li = 8, _n = 8, ai = ({
|
|
|
1476
1476
|
"aria-label": "More controls",
|
|
1477
1477
|
"aria-haspopup": "menu",
|
|
1478
1478
|
"aria-expanded": x,
|
|
1479
|
-
children: /* @__PURE__ */
|
|
1479
|
+
children: /* @__PURE__ */ r(ci, {})
|
|
1480
1480
|
}
|
|
1481
1481
|
),
|
|
1482
|
-
/* @__PURE__ */
|
|
1482
|
+
/* @__PURE__ */ r(
|
|
1483
1483
|
"button",
|
|
1484
1484
|
{
|
|
1485
1485
|
type: "button",
|
|
1486
1486
|
className: "ll-tool ll-tool--danger",
|
|
1487
1487
|
onClick: P,
|
|
1488
1488
|
"aria-label": "End conversation",
|
|
1489
|
-
children: /* @__PURE__ */
|
|
1489
|
+
children: /* @__PURE__ */ r(Bn, {})
|
|
1490
1490
|
}
|
|
1491
1491
|
)
|
|
1492
1492
|
]
|
|
@@ -1503,27 +1503,27 @@ const li = 8, _n = 8, ai = ({
|
|
|
1503
1503
|
"button",
|
|
1504
1504
|
{
|
|
1505
1505
|
type: "button",
|
|
1506
|
-
className: `ll-overflow-popover__item ${
|
|
1506
|
+
className: `ll-overflow-popover__item ${n ? "is-on" : ""}`,
|
|
1507
1507
|
onClick: () => {
|
|
1508
1508
|
i(), E(!1);
|
|
1509
1509
|
},
|
|
1510
1510
|
children: [
|
|
1511
|
-
/* @__PURE__ */
|
|
1512
|
-
/* @__PURE__ */
|
|
1511
|
+
/* @__PURE__ */ r(On, {}),
|
|
1512
|
+
/* @__PURE__ */ r("span", { children: n ? "Stop camera" : "Start camera" })
|
|
1513
1513
|
]
|
|
1514
1514
|
}
|
|
1515
1515
|
),
|
|
1516
|
-
|
|
1516
|
+
o && /* @__PURE__ */ k(
|
|
1517
1517
|
"button",
|
|
1518
1518
|
{
|
|
1519
1519
|
type: "button",
|
|
1520
|
-
className: `ll-overflow-popover__item ${
|
|
1520
|
+
className: `ll-overflow-popover__item ${l ? "is-on" : ""}`,
|
|
1521
1521
|
onClick: () => {
|
|
1522
|
-
|
|
1522
|
+
s(), E(!1);
|
|
1523
1523
|
},
|
|
1524
1524
|
children: [
|
|
1525
|
-
/* @__PURE__ */
|
|
1526
|
-
/* @__PURE__ */
|
|
1525
|
+
/* @__PURE__ */ r(Hn, {}),
|
|
1526
|
+
/* @__PURE__ */ r("span", { children: l ? "Stop sharing" : "Share screen" })
|
|
1527
1527
|
]
|
|
1528
1528
|
}
|
|
1529
1529
|
),
|
|
@@ -1531,13 +1531,13 @@ const li = 8, _n = 8, ai = ({
|
|
|
1531
1531
|
"button",
|
|
1532
1532
|
{
|
|
1533
1533
|
type: "button",
|
|
1534
|
-
className: `ll-overflow-popover__item ${
|
|
1534
|
+
className: `ll-overflow-popover__item ${c ? "is-on" : ""}`,
|
|
1535
1535
|
onClick: () => {
|
|
1536
1536
|
u(), E(!1);
|
|
1537
1537
|
},
|
|
1538
1538
|
children: [
|
|
1539
|
-
/* @__PURE__ */
|
|
1540
|
-
/* @__PURE__ */
|
|
1539
|
+
/* @__PURE__ */ r(Wn, { muted: c }),
|
|
1540
|
+
/* @__PURE__ */ r("span", { children: c ? "Unmute speaker" : "Mute speaker" })
|
|
1541
1541
|
]
|
|
1542
1542
|
}
|
|
1543
1543
|
),
|
|
@@ -1550,8 +1550,8 @@ const li = 8, _n = 8, ai = ({
|
|
|
1550
1550
|
h(), E(!1);
|
|
1551
1551
|
},
|
|
1552
1552
|
children: [
|
|
1553
|
-
/* @__PURE__ */
|
|
1554
|
-
/* @__PURE__ */
|
|
1553
|
+
/* @__PURE__ */ r(ui, {}),
|
|
1554
|
+
/* @__PURE__ */ r("span", { children: p ? "Hide typing" : "Type a message" })
|
|
1555
1555
|
]
|
|
1556
1556
|
}
|
|
1557
1557
|
),
|
|
@@ -1563,8 +1563,8 @@ const li = 8, _n = 8, ai = ({
|
|
|
1563
1563
|
disabled: !0,
|
|
1564
1564
|
"aria-current": "true",
|
|
1565
1565
|
children: [
|
|
1566
|
-
/* @__PURE__ */
|
|
1567
|
-
/* @__PURE__ */
|
|
1566
|
+
/* @__PURE__ */ r("span", { className: "ll-overflow-popover__lang-code", children: "EN" }),
|
|
1567
|
+
/* @__PURE__ */ r("span", { children: "English" })
|
|
1568
1568
|
]
|
|
1569
1569
|
}
|
|
1570
1570
|
)
|
|
@@ -1583,15 +1583,15 @@ function ci() {
|
|
|
1583
1583
|
fill: "currentColor",
|
|
1584
1584
|
"aria-hidden": !0,
|
|
1585
1585
|
children: [
|
|
1586
|
-
/* @__PURE__ */
|
|
1587
|
-
/* @__PURE__ */
|
|
1588
|
-
/* @__PURE__ */
|
|
1586
|
+
/* @__PURE__ */ r("circle", { cx: "6", cy: "12", r: "1.5" }),
|
|
1587
|
+
/* @__PURE__ */ r("circle", { cx: "12", cy: "12", r: "1.5" }),
|
|
1588
|
+
/* @__PURE__ */ r("circle", { cx: "18", cy: "12", r: "1.5" })
|
|
1589
1589
|
]
|
|
1590
1590
|
}
|
|
1591
1591
|
);
|
|
1592
1592
|
}
|
|
1593
1593
|
function ui() {
|
|
1594
|
-
return /* @__PURE__ */
|
|
1594
|
+
return /* @__PURE__ */ r(
|
|
1595
1595
|
"svg",
|
|
1596
1596
|
{
|
|
1597
1597
|
width: "16",
|
|
@@ -1603,20 +1603,20 @@ function ui() {
|
|
|
1603
1603
|
strokeLinecap: "round",
|
|
1604
1604
|
strokeLinejoin: "round",
|
|
1605
1605
|
"aria-hidden": !0,
|
|
1606
|
-
children: /* @__PURE__ */
|
|
1606
|
+
children: /* @__PURE__ */ r("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
|
|
1607
1607
|
}
|
|
1608
1608
|
);
|
|
1609
1609
|
}
|
|
1610
1610
|
const di = ({
|
|
1611
1611
|
position: e,
|
|
1612
1612
|
isMobile: t,
|
|
1613
|
-
agentName:
|
|
1613
|
+
agentName: n,
|
|
1614
1614
|
avatarImageUrl: i,
|
|
1615
1615
|
idleLoopUrl: a,
|
|
1616
|
-
greeting:
|
|
1617
|
-
branding:
|
|
1618
|
-
teamMembers:
|
|
1619
|
-
currentTeamMemberId:
|
|
1616
|
+
greeting: l,
|
|
1617
|
+
branding: s,
|
|
1618
|
+
teamMembers: o,
|
|
1619
|
+
currentTeamMemberId: c,
|
|
1620
1620
|
isSwitchingTeamMember: u,
|
|
1621
1621
|
teamSwitcherOpen: b,
|
|
1622
1622
|
onToggleTeamSwitcher: p,
|
|
@@ -1669,7 +1669,7 @@ const di = ({
|
|
|
1669
1669
|
resizeHandleProps: F
|
|
1670
1670
|
}) => {
|
|
1671
1671
|
var at;
|
|
1672
|
-
const $e = ((
|
|
1672
|
+
const $e = ((o == null ? void 0 : o.length) ?? 0) > 1, Ue = E === "connecting" || E === "connected", we = E === "connected", gt = E === "idle" || E === "disconnected" || E === "error", [He, Ne] = M(!1);
|
|
1673
1673
|
T(() => {
|
|
1674
1674
|
if (!ne) {
|
|
1675
1675
|
Ne(!1);
|
|
@@ -1725,13 +1725,13 @@ const di = ({
|
|
|
1725
1725
|
re && (Te(re), It(""));
|
|
1726
1726
|
},
|
|
1727
1727
|
[ot, Te]
|
|
1728
|
-
), Me =
|
|
1728
|
+
), Me = s.productName || "Live Layer", Se = !s.productName;
|
|
1729
1729
|
let ye = null, xe = null;
|
|
1730
1730
|
for (let _ = w.length - 1; _ >= 0; _--) {
|
|
1731
1731
|
const re = w[_];
|
|
1732
1732
|
if (!ye && re.role === "agent" ? ye = re : !xe && re.role === "user" && (xe = re), ye && xe) break;
|
|
1733
1733
|
}
|
|
1734
|
-
const bt = we ? (ye == null ? void 0 : ye.text) || null :
|
|
1734
|
+
const bt = we ? (ye == null ? void 0 : ye.text) || null : l || null, Ye = we && (xe == null ? void 0 : xe.text) || null, lt = [
|
|
1735
1735
|
"ll-expanded",
|
|
1736
1736
|
t ? "ll-expanded--mobile" : "ll-expanded--desktop"
|
|
1737
1737
|
].join(" ");
|
|
@@ -1742,18 +1742,18 @@ const di = ({
|
|
|
1742
1742
|
"data-position": e,
|
|
1743
1743
|
"data-state": we ? "connected" : Ue ? "connecting" : "idle",
|
|
1744
1744
|
role: "dialog",
|
|
1745
|
-
"aria-label": `${
|
|
1745
|
+
"aria-label": `${n} widget`,
|
|
1746
1746
|
children: [
|
|
1747
1747
|
/* @__PURE__ */ k("div", { className: "ll-expanded__bg", children: [
|
|
1748
|
-
i ? /* @__PURE__ */
|
|
1748
|
+
i ? /* @__PURE__ */ r(
|
|
1749
1749
|
ri,
|
|
1750
1750
|
{
|
|
1751
1751
|
src: i,
|
|
1752
|
-
alt:
|
|
1752
|
+
alt: n,
|
|
1753
1753
|
className: "ll-expanded__bg-img"
|
|
1754
1754
|
}
|
|
1755
|
-
) : /* @__PURE__ */
|
|
1756
|
-
a && !we && /* @__PURE__ */
|
|
1755
|
+
) : /* @__PURE__ */ r("div", { className: "ll-expanded__bg-fallback", children: /* @__PURE__ */ r("span", { className: "ll-expanded__bg-initial", children: ((at = n == null ? void 0 : n.charAt(0)) == null ? void 0 : at.toUpperCase()) || "A" }) }),
|
|
1756
|
+
a && !we && /* @__PURE__ */ r(
|
|
1757
1757
|
"video",
|
|
1758
1758
|
{
|
|
1759
1759
|
className: "ll-expanded__bg-idle",
|
|
@@ -1765,10 +1765,10 @@ const di = ({
|
|
|
1765
1765
|
}
|
|
1766
1766
|
)
|
|
1767
1767
|
] }),
|
|
1768
|
-
/* @__PURE__ */
|
|
1768
|
+
/* @__PURE__ */ r("div", { ref: be, className: "ll-expanded__video" }),
|
|
1769
1769
|
Oe && /* @__PURE__ */ k("div", { className: "ll-expanded__overlay ll-expanded__overlay--connecting", children: [
|
|
1770
|
-
/* @__PURE__ */
|
|
1771
|
-
/* @__PURE__ */
|
|
1770
|
+
/* @__PURE__ */ r("div", { className: "ll-expanded__spinner" }),
|
|
1771
|
+
/* @__PURE__ */ r("p", { className: "ll-expanded__overlay-text", children: u ? "Switching..." : "Connecting..." })
|
|
1772
1772
|
] }),
|
|
1773
1773
|
S && we && /* @__PURE__ */ k(
|
|
1774
1774
|
"button",
|
|
@@ -1777,8 +1777,8 @@ const di = ({
|
|
|
1777
1777
|
className: "ll-expanded__overlay ll-expanded__overlay--gesture",
|
|
1778
1778
|
onClick: ht,
|
|
1779
1779
|
children: [
|
|
1780
|
-
/* @__PURE__ */
|
|
1781
|
-
/* @__PURE__ */
|
|
1780
|
+
/* @__PURE__ */ r("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": !0, children: /* @__PURE__ */ r("path", { d: "M3 9v6h4l5 5V4L7 9H3zm13.54.12a5 5 0 0 1 0 5.76l-1.41-1.41a3 3 0 0 0 0-2.94L16.54 9.12z" }) }),
|
|
1781
|
+
/* @__PURE__ */ r("p", { className: "ll-expanded__overlay-text", children: "Tap to enable audio" })
|
|
1782
1782
|
]
|
|
1783
1783
|
}
|
|
1784
1784
|
),
|
|
@@ -1790,8 +1790,8 @@ const di = ({
|
|
|
1790
1790
|
"aria-live": "polite",
|
|
1791
1791
|
"aria-label": Q,
|
|
1792
1792
|
children: [
|
|
1793
|
-
/* @__PURE__ */
|
|
1794
|
-
/* @__PURE__ */
|
|
1793
|
+
/* @__PURE__ */ r("div", { className: "ll-expanded__spinner" }),
|
|
1794
|
+
/* @__PURE__ */ r("p", { className: "ll-expanded__overlay-text", children: Q })
|
|
1795
1795
|
]
|
|
1796
1796
|
}
|
|
1797
1797
|
),
|
|
@@ -1810,27 +1810,27 @@ const di = ({
|
|
|
1810
1810
|
"aria-haspopup": $e ? "listbox" : void 0,
|
|
1811
1811
|
"aria-expanded": $e ? b : void 0,
|
|
1812
1812
|
children: [
|
|
1813
|
-
/* @__PURE__ */
|
|
1814
|
-
$e && /* @__PURE__ */
|
|
1813
|
+
/* @__PURE__ */ r("span", { className: "ll-hpill__label", children: n }),
|
|
1814
|
+
$e && /* @__PURE__ */ r(kt, {})
|
|
1815
1815
|
]
|
|
1816
1816
|
}
|
|
1817
1817
|
),
|
|
1818
|
-
$e && b && /* @__PURE__ */
|
|
1818
|
+
$e && b && /* @__PURE__ */ r(
|
|
1819
1819
|
"div",
|
|
1820
1820
|
{
|
|
1821
1821
|
className: "ll-hmenu",
|
|
1822
1822
|
onClick: (_) => _.stopPropagation(),
|
|
1823
1823
|
role: "listbox",
|
|
1824
|
-
children:
|
|
1824
|
+
children: o == null ? void 0 : o.map((_) => /* @__PURE__ */ k(
|
|
1825
1825
|
"button",
|
|
1826
1826
|
{
|
|
1827
1827
|
type: "button",
|
|
1828
|
-
className: `ll-hmenu__item ${_.id ===
|
|
1828
|
+
className: `ll-hmenu__item ${_.id === c ? "is-active" : ""}`,
|
|
1829
1829
|
onClick: () => h(_.id),
|
|
1830
1830
|
role: "option",
|
|
1831
|
-
"aria-selected": _.id ===
|
|
1831
|
+
"aria-selected": _.id === c,
|
|
1832
1832
|
children: [
|
|
1833
|
-
_.avatarImageUrl && /* @__PURE__ */
|
|
1833
|
+
_.avatarImageUrl && /* @__PURE__ */ r(
|
|
1834
1834
|
"img",
|
|
1835
1835
|
{
|
|
1836
1836
|
src: _.avatarImageUrl,
|
|
@@ -1838,8 +1838,8 @@ const di = ({
|
|
|
1838
1838
|
className: "ll-hmenu__avatar"
|
|
1839
1839
|
}
|
|
1840
1840
|
),
|
|
1841
|
-
/* @__PURE__ */
|
|
1842
|
-
_.role && /* @__PURE__ */
|
|
1841
|
+
/* @__PURE__ */ r("span", { className: "ll-hmenu__name", children: _.name }),
|
|
1842
|
+
_.role && /* @__PURE__ */ r("span", { className: "ll-hmenu__role", children: _.role })
|
|
1843
1843
|
]
|
|
1844
1844
|
},
|
|
1845
1845
|
_.id
|
|
@@ -1861,31 +1861,31 @@ const di = ({
|
|
|
1861
1861
|
"aria-label": "Language: English",
|
|
1862
1862
|
title: "Language: English",
|
|
1863
1863
|
children: [
|
|
1864
|
-
/* @__PURE__ */
|
|
1865
|
-
/* @__PURE__ */
|
|
1864
|
+
/* @__PURE__ */ r("span", { className: "ll-hpill__label", children: "EN" }),
|
|
1865
|
+
/* @__PURE__ */ r(kt, {})
|
|
1866
1866
|
]
|
|
1867
1867
|
}
|
|
1868
1868
|
),
|
|
1869
|
-
P && /* @__PURE__ */
|
|
1869
|
+
P && /* @__PURE__ */ r(
|
|
1870
1870
|
"div",
|
|
1871
1871
|
{
|
|
1872
1872
|
className: "ll-hmenu",
|
|
1873
1873
|
onClick: (_) => _.stopPropagation(),
|
|
1874
1874
|
role: "listbox",
|
|
1875
|
-
children: /* @__PURE__ */
|
|
1875
|
+
children: /* @__PURE__ */ r(
|
|
1876
1876
|
"button",
|
|
1877
1877
|
{
|
|
1878
1878
|
type: "button",
|
|
1879
1879
|
className: "ll-hmenu__item is-active",
|
|
1880
1880
|
role: "option",
|
|
1881
1881
|
"aria-selected": !0,
|
|
1882
|
-
children: /* @__PURE__ */
|
|
1882
|
+
children: /* @__PURE__ */ r("span", { className: "ll-hmenu__name", children: "English" })
|
|
1883
1883
|
}
|
|
1884
1884
|
)
|
|
1885
1885
|
}
|
|
1886
1886
|
)
|
|
1887
1887
|
] }),
|
|
1888
|
-
/* @__PURE__ */
|
|
1888
|
+
/* @__PURE__ */ r(
|
|
1889
1889
|
"span",
|
|
1890
1890
|
{
|
|
1891
1891
|
className: `ll-expanded__state ll-expanded__state--${g}`,
|
|
@@ -1894,7 +1894,7 @@ const di = ({
|
|
|
1894
1894
|
)
|
|
1895
1895
|
] }),
|
|
1896
1896
|
/* @__PURE__ */ k("div", { className: "ll-expanded__header-actions", children: [
|
|
1897
|
-
V !== !1 && /* @__PURE__ */
|
|
1897
|
+
V !== !1 && /* @__PURE__ */ r(
|
|
1898
1898
|
"button",
|
|
1899
1899
|
{
|
|
1900
1900
|
type: "button",
|
|
@@ -1902,10 +1902,10 @@ const di = ({
|
|
|
1902
1902
|
onClick: Pe,
|
|
1903
1903
|
"aria-label": "Minimize widget",
|
|
1904
1904
|
title: "Minimize",
|
|
1905
|
-
children: /* @__PURE__ */
|
|
1905
|
+
children: /* @__PURE__ */ r(Ln, {})
|
|
1906
1906
|
}
|
|
1907
1907
|
),
|
|
1908
|
-
te !== !1 && /* @__PURE__ */
|
|
1908
|
+
te !== !1 && /* @__PURE__ */ r(
|
|
1909
1909
|
"button",
|
|
1910
1910
|
{
|
|
1911
1911
|
type: "button",
|
|
@@ -1913,14 +1913,14 @@ const di = ({
|
|
|
1913
1913
|
onClick: De,
|
|
1914
1914
|
"aria-label": "End call",
|
|
1915
1915
|
title: "End call",
|
|
1916
|
-
children: /* @__PURE__ */
|
|
1916
|
+
children: /* @__PURE__ */ r(xn, {})
|
|
1917
1917
|
}
|
|
1918
1918
|
)
|
|
1919
1919
|
] })
|
|
1920
1920
|
] }),
|
|
1921
1921
|
U && /* @__PURE__ */ k("div", { className: "ll-compact-status", "data-state": g, children: [
|
|
1922
|
-
/* @__PURE__ */
|
|
1923
|
-
/* @__PURE__ */
|
|
1922
|
+
/* @__PURE__ */ r("span", { className: "ll-compact-status__dot", "aria-hidden": !0 }),
|
|
1923
|
+
/* @__PURE__ */ r("span", { className: "ll-compact-status__label", children: g })
|
|
1924
1924
|
] })
|
|
1925
1925
|
] }) : (
|
|
1926
1926
|
// Idle-state header. In compactControls mode (mobile WIDGET +
|
|
@@ -1942,30 +1942,30 @@ const di = ({
|
|
|
1942
1942
|
"aria-label": "Powered by LiveLayer — opens livelayer.studio in a new tab",
|
|
1943
1943
|
title: "Powered by LiveLayer — visit livelayer.studio",
|
|
1944
1944
|
children: [
|
|
1945
|
-
/* @__PURE__ */
|
|
1946
|
-
/* @__PURE__ */
|
|
1945
|
+
/* @__PURE__ */ r(oi, { size: 14, className: "ll-expanded__brand-mark" }),
|
|
1946
|
+
/* @__PURE__ */ r("span", { children: Me })
|
|
1947
1947
|
]
|
|
1948
1948
|
}
|
|
1949
|
-
) : /* @__PURE__ */
|
|
1949
|
+
) : /* @__PURE__ */ r("span", { className: "ll-expanded__brand", children: Me })),
|
|
1950
1950
|
/* @__PURE__ */ k("div", { className: "ll-expanded__header-actions", children: [
|
|
1951
|
-
!U && V !== !1 && /* @__PURE__ */
|
|
1951
|
+
!U && V !== !1 && /* @__PURE__ */ r(
|
|
1952
1952
|
"button",
|
|
1953
1953
|
{
|
|
1954
1954
|
type: "button",
|
|
1955
1955
|
className: "ll-hbtn ll-hbtn--ghost",
|
|
1956
1956
|
onClick: Pe,
|
|
1957
1957
|
"aria-label": "Minimize widget",
|
|
1958
|
-
children: /* @__PURE__ */
|
|
1958
|
+
children: /* @__PURE__ */ r(Ln, {})
|
|
1959
1959
|
}
|
|
1960
1960
|
),
|
|
1961
|
-
te !== !1 && /* @__PURE__ */
|
|
1961
|
+
te !== !1 && /* @__PURE__ */ r(
|
|
1962
1962
|
"button",
|
|
1963
1963
|
{
|
|
1964
1964
|
type: "button",
|
|
1965
1965
|
className: "ll-hbtn ll-hbtn--danger",
|
|
1966
1966
|
onClick: De,
|
|
1967
1967
|
"aria-label": "Close widget",
|
|
1968
|
-
children: /* @__PURE__ */
|
|
1968
|
+
children: /* @__PURE__ */ r(xn, {})
|
|
1969
1969
|
}
|
|
1970
1970
|
)
|
|
1971
1971
|
] })
|
|
@@ -1982,14 +1982,14 @@ const di = ({
|
|
|
1982
1982
|
onClick: tt,
|
|
1983
1983
|
"aria-label": _,
|
|
1984
1984
|
children: [
|
|
1985
|
-
/* @__PURE__ */
|
|
1986
|
-
U && /* @__PURE__ */
|
|
1985
|
+
/* @__PURE__ */ r("div", { className: "ll-expanded__play-circle", children: /* @__PURE__ */ r("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": !0, children: /* @__PURE__ */ r("polygon", { points: "6 3 20 12 6 21 6 3" }) }) }),
|
|
1986
|
+
U && /* @__PURE__ */ r("span", { className: "ll-expanded__play-label", children: _ })
|
|
1987
1987
|
]
|
|
1988
1988
|
}
|
|
1989
1989
|
),
|
|
1990
1990
|
!U && /* @__PURE__ */ k("div", { className: "ll-expanded__bottom ll-expanded__bottom--idle", children: [
|
|
1991
|
-
|
|
1992
|
-
/* @__PURE__ */
|
|
1991
|
+
l && /* @__PURE__ */ r("div", { className: "ll-expanded__transcript", children: /* @__PURE__ */ r("p", { className: "ll-expanded__transcript-text", children: l }) }),
|
|
1992
|
+
/* @__PURE__ */ r(
|
|
1993
1993
|
"button",
|
|
1994
1994
|
{
|
|
1995
1995
|
type: "button",
|
|
@@ -2007,14 +2007,14 @@ const di = ({
|
|
|
2007
2007
|
{
|
|
2008
2008
|
className: `ll-expanded__pip ${Ue && (K || f) ? "is-visible" : ""}`,
|
|
2009
2009
|
children: [
|
|
2010
|
-
/* @__PURE__ */
|
|
2010
|
+
/* @__PURE__ */ r(
|
|
2011
2011
|
"div",
|
|
2012
2012
|
{
|
|
2013
2013
|
ref: it,
|
|
2014
2014
|
className: f ? "ll-expanded__pip-host" : "ll-expanded__pip-host is-hidden"
|
|
2015
2015
|
}
|
|
2016
2016
|
),
|
|
2017
|
-
/* @__PURE__ */
|
|
2017
|
+
/* @__PURE__ */ r(
|
|
2018
2018
|
"div",
|
|
2019
2019
|
{
|
|
2020
2020
|
ref: ue,
|
|
@@ -2025,24 +2025,24 @@ const di = ({
|
|
|
2025
2025
|
}
|
|
2026
2026
|
),
|
|
2027
2027
|
Ue ? /* @__PURE__ */ k("div", { className: "ll-expanded__bottom", children: [
|
|
2028
|
-
!U && bt && /* @__PURE__ */
|
|
2028
|
+
!U && bt && /* @__PURE__ */ r(
|
|
2029
2029
|
"div",
|
|
2030
2030
|
{
|
|
2031
2031
|
className: "ll-expanded__transcript ll-expanded__transcript--agent",
|
|
2032
2032
|
"data-role": "agent",
|
|
2033
|
-
children: /* @__PURE__ */
|
|
2033
|
+
children: /* @__PURE__ */ r("p", { className: "ll-expanded__transcript-text", children: bt })
|
|
2034
2034
|
}
|
|
2035
2035
|
),
|
|
2036
|
-
!U && Ye && /* @__PURE__ */
|
|
2036
|
+
!U && Ye && /* @__PURE__ */ r(
|
|
2037
2037
|
"div",
|
|
2038
2038
|
{
|
|
2039
2039
|
className: "ll-expanded__transcript ll-expanded__transcript--user",
|
|
2040
2040
|
"data-role": "user",
|
|
2041
|
-
children: /* @__PURE__ */
|
|
2041
|
+
children: /* @__PURE__ */ r("p", { className: "ll-expanded__transcript-text", children: Ye })
|
|
2042
2042
|
}
|
|
2043
2043
|
),
|
|
2044
2044
|
!oe && !U && /* @__PURE__ */ k("div", { className: "ll-toolbar", onClick: (_) => _.stopPropagation(), children: [
|
|
2045
|
-
X && /* @__PURE__ */
|
|
2045
|
+
X && /* @__PURE__ */ r(
|
|
2046
2046
|
"button",
|
|
2047
2047
|
{
|
|
2048
2048
|
type: "button",
|
|
@@ -2050,11 +2050,11 @@ const di = ({
|
|
|
2050
2050
|
onClick: Ie,
|
|
2051
2051
|
"aria-label": f ? "Stop sharing screen" : "Share screen",
|
|
2052
2052
|
title: f ? "Stop sharing" : "Share screen",
|
|
2053
|
-
children: /* @__PURE__ */
|
|
2053
|
+
children: /* @__PURE__ */ r(Hn, {})
|
|
2054
2054
|
}
|
|
2055
2055
|
),
|
|
2056
2056
|
q && /* @__PURE__ */ k("div", { className: "ll-tool-split", children: [
|
|
2057
|
-
/* @__PURE__ */
|
|
2057
|
+
/* @__PURE__ */ r(
|
|
2058
2058
|
"button",
|
|
2059
2059
|
{
|
|
2060
2060
|
type: "button",
|
|
@@ -2062,10 +2062,10 @@ const di = ({
|
|
|
2062
2062
|
onClick: We,
|
|
2063
2063
|
"aria-label": K ? "Turn off camera" : "Turn on camera",
|
|
2064
2064
|
title: K ? "Stop camera" : "Start camera",
|
|
2065
|
-
children: /* @__PURE__ */
|
|
2065
|
+
children: /* @__PURE__ */ r(On, {})
|
|
2066
2066
|
}
|
|
2067
2067
|
),
|
|
2068
|
-
/* @__PURE__ */
|
|
2068
|
+
/* @__PURE__ */ r(
|
|
2069
2069
|
"button",
|
|
2070
2070
|
{
|
|
2071
2071
|
ref: _e,
|
|
@@ -2077,10 +2077,10 @@ const di = ({
|
|
|
2077
2077
|
"aria-label": "Camera devices",
|
|
2078
2078
|
"aria-haspopup": "listbox",
|
|
2079
2079
|
"aria-expanded": je,
|
|
2080
|
-
children: /* @__PURE__ */
|
|
2080
|
+
children: /* @__PURE__ */ r(kt, {})
|
|
2081
2081
|
}
|
|
2082
2082
|
),
|
|
2083
|
-
je && $.length > 0 && /* @__PURE__ */
|
|
2083
|
+
je && $.length > 0 && /* @__PURE__ */ r(
|
|
2084
2084
|
Cn,
|
|
2085
2085
|
{
|
|
2086
2086
|
label: "Camera",
|
|
@@ -2094,7 +2094,7 @@ const di = ({
|
|
|
2094
2094
|
)
|
|
2095
2095
|
] }),
|
|
2096
2096
|
/* @__PURE__ */ k("div", { className: "ll-tool-split", children: [
|
|
2097
|
-
/* @__PURE__ */
|
|
2097
|
+
/* @__PURE__ */ r(
|
|
2098
2098
|
"button",
|
|
2099
2099
|
{
|
|
2100
2100
|
type: "button",
|
|
@@ -2102,10 +2102,10 @@ const di = ({
|
|
|
2102
2102
|
onClick: rt,
|
|
2103
2103
|
"aria-label": O ? "Unmute microphone" : "Mute microphone",
|
|
2104
2104
|
title: O ? "Unmute" : "Mute",
|
|
2105
|
-
children: /* @__PURE__ */
|
|
2105
|
+
children: /* @__PURE__ */ r(Fn, { muted: O })
|
|
2106
2106
|
}
|
|
2107
2107
|
),
|
|
2108
|
-
/* @__PURE__ */
|
|
2108
|
+
/* @__PURE__ */ r(
|
|
2109
2109
|
"button",
|
|
2110
2110
|
{
|
|
2111
2111
|
ref: ge,
|
|
@@ -2117,10 +2117,10 @@ const di = ({
|
|
|
2117
2117
|
"aria-label": "Microphone devices",
|
|
2118
2118
|
"aria-haspopup": "listbox",
|
|
2119
2119
|
"aria-expanded": le,
|
|
2120
|
-
children: /* @__PURE__ */
|
|
2120
|
+
children: /* @__PURE__ */ r(kt, {})
|
|
2121
2121
|
}
|
|
2122
2122
|
),
|
|
2123
|
-
le && D.length > 0 && /* @__PURE__ */
|
|
2123
|
+
le && D.length > 0 && /* @__PURE__ */ r(
|
|
2124
2124
|
Cn,
|
|
2125
2125
|
{
|
|
2126
2126
|
label: "Microphone",
|
|
@@ -2133,7 +2133,7 @@ const di = ({
|
|
|
2133
2133
|
}
|
|
2134
2134
|
)
|
|
2135
2135
|
] }),
|
|
2136
|
-
/* @__PURE__ */
|
|
2136
|
+
/* @__PURE__ */ r(
|
|
2137
2137
|
"button",
|
|
2138
2138
|
{
|
|
2139
2139
|
type: "button",
|
|
@@ -2141,10 +2141,10 @@ const di = ({
|
|
|
2141
2141
|
onClick: Re,
|
|
2142
2142
|
"aria-label": z ? "Unmute speaker" : "Mute speaker",
|
|
2143
2143
|
title: z ? "Unmute speaker" : "Mute speaker",
|
|
2144
|
-
children: /* @__PURE__ */
|
|
2144
|
+
children: /* @__PURE__ */ r(Wn, { muted: z })
|
|
2145
2145
|
}
|
|
2146
2146
|
),
|
|
2147
|
-
/* @__PURE__ */
|
|
2147
|
+
/* @__PURE__ */ r(
|
|
2148
2148
|
"button",
|
|
2149
2149
|
{
|
|
2150
2150
|
type: "button",
|
|
@@ -2152,11 +2152,11 @@ const di = ({
|
|
|
2152
2152
|
onClick: nt,
|
|
2153
2153
|
"aria-label": "End conversation",
|
|
2154
2154
|
title: "End conversation",
|
|
2155
|
-
children: /* @__PURE__ */
|
|
2155
|
+
children: /* @__PURE__ */ r(Bn, {})
|
|
2156
2156
|
}
|
|
2157
2157
|
)
|
|
2158
2158
|
] }),
|
|
2159
|
-
!oe && U && /* @__PURE__ */
|
|
2159
|
+
!oe && U && /* @__PURE__ */ r(
|
|
2160
2160
|
si,
|
|
2161
2161
|
{
|
|
2162
2162
|
isMuted: O,
|
|
@@ -2176,7 +2176,7 @@ const di = ({
|
|
|
2176
2176
|
}
|
|
2177
2177
|
),
|
|
2178
2178
|
!oe && ee && (U ? vt : !0) && /* @__PURE__ */ k("form", { className: "ll-message-input", onSubmit: Ae, children: [
|
|
2179
|
-
/* @__PURE__ */
|
|
2179
|
+
/* @__PURE__ */ r(
|
|
2180
2180
|
"input",
|
|
2181
2181
|
{
|
|
2182
2182
|
type: "text",
|
|
@@ -2187,13 +2187,13 @@ const di = ({
|
|
|
2187
2187
|
"aria-label": "Message the agent"
|
|
2188
2188
|
}
|
|
2189
2189
|
),
|
|
2190
|
-
ot.trim() && /* @__PURE__ */
|
|
2190
|
+
ot.trim() && /* @__PURE__ */ r(
|
|
2191
2191
|
"button",
|
|
2192
2192
|
{
|
|
2193
2193
|
type: "submit",
|
|
2194
2194
|
className: "ll-message-input__send",
|
|
2195
2195
|
"aria-label": "Send message",
|
|
2196
|
-
children: /* @__PURE__ */
|
|
2196
|
+
children: /* @__PURE__ */ r(fi, {})
|
|
2197
2197
|
}
|
|
2198
2198
|
)
|
|
2199
2199
|
] })
|
|
@@ -2201,8 +2201,8 @@ const di = ({
|
|
|
2201
2201
|
(() => {
|
|
2202
2202
|
if (m && E !== "error")
|
|
2203
2203
|
return /* @__PURE__ */ k("div", { className: "ll-expanded__banner", role: "alert", children: [
|
|
2204
|
-
/* @__PURE__ */
|
|
2205
|
-
/* @__PURE__ */
|
|
2204
|
+
/* @__PURE__ */ r("span", { children: m }),
|
|
2205
|
+
/* @__PURE__ */ r(
|
|
2206
2206
|
"button",
|
|
2207
2207
|
{
|
|
2208
2208
|
type: "button",
|
|
@@ -2216,8 +2216,8 @@ const di = ({
|
|
|
2216
2216
|
if (!y || E !== "error") return null;
|
|
2217
2217
|
let _ = "Failed to connect", re = "Try again";
|
|
2218
2218
|
return y === "MIC_PERMISSION_DENIED" ? _ = "Microphone blocked. Allow access to talk." : y === "MIC_NOT_FOUND" ? _ = "No microphone found. Plug one in + retry." : y === "MIC_UNAVAILABLE" ? _ = "Mic unavailable. Check other apps using it." : y === "AGENT_TIMEOUT" ? _ = "Agent didn't pick up. Try again." : y === "CONNECT_FAILED" ? _ = "Connection failed. Check your network." : y.length < 80 && (_ = y), /* @__PURE__ */ k("div", { className: "ll-expanded__banner ll-expanded__banner--error", role: "alert", children: [
|
|
2219
|
-
/* @__PURE__ */
|
|
2220
|
-
/* @__PURE__ */
|
|
2219
|
+
/* @__PURE__ */ r("span", { children: _ }),
|
|
2220
|
+
/* @__PURE__ */ r(
|
|
2221
2221
|
"button",
|
|
2222
2222
|
{
|
|
2223
2223
|
type: "button",
|
|
@@ -2228,15 +2228,15 @@ const di = ({
|
|
|
2228
2228
|
)
|
|
2229
2229
|
] });
|
|
2230
2230
|
})(),
|
|
2231
|
-
(F == null ? void 0 : F["data-ll-resize-handle"]) !== void 0 && /* @__PURE__ */
|
|
2231
|
+
(F == null ? void 0 : F["data-ll-resize-handle"]) !== void 0 && /* @__PURE__ */ r(
|
|
2232
2232
|
"div",
|
|
2233
2233
|
{
|
|
2234
2234
|
className: "ll-expanded__resize-grip",
|
|
2235
2235
|
...F,
|
|
2236
2236
|
"aria-hidden": !0,
|
|
2237
2237
|
children: /* @__PURE__ */ k("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", children: [
|
|
2238
|
-
/* @__PURE__ */
|
|
2239
|
-
/* @__PURE__ */
|
|
2238
|
+
/* @__PURE__ */ r("line", { x1: "11", y1: "4", x2: "4", y2: "11" }),
|
|
2239
|
+
/* @__PURE__ */ r("line", { x1: "11", y1: "8", x2: "8", y2: "11" })
|
|
2240
2240
|
] })
|
|
2241
2241
|
}
|
|
2242
2242
|
)
|
|
@@ -2245,55 +2245,55 @@ const di = ({
|
|
|
2245
2245
|
);
|
|
2246
2246
|
};
|
|
2247
2247
|
function kt() {
|
|
2248
|
-
return /* @__PURE__ */
|
|
2248
|
+
return /* @__PURE__ */ r("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": !0, children: /* @__PURE__ */ r("polyline", { points: "6 9 12 15 18 9" }) });
|
|
2249
2249
|
}
|
|
2250
2250
|
function xn() {
|
|
2251
2251
|
return /* @__PURE__ */ k("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", "aria-hidden": !0, children: [
|
|
2252
|
-
/* @__PURE__ */
|
|
2253
|
-
/* @__PURE__ */
|
|
2252
|
+
/* @__PURE__ */ r("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
2253
|
+
/* @__PURE__ */ r("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
2254
2254
|
] });
|
|
2255
2255
|
}
|
|
2256
2256
|
function Ln() {
|
|
2257
|
-
return /* @__PURE__ */
|
|
2257
|
+
return /* @__PURE__ */ r("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", "aria-hidden": !0, children: /* @__PURE__ */ r("line", { x1: "5", y1: "12", x2: "19", y2: "12" }) });
|
|
2258
2258
|
}
|
|
2259
2259
|
function Hn() {
|
|
2260
2260
|
return /* @__PURE__ */ k("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: [
|
|
2261
|
-
/* @__PURE__ */
|
|
2262
|
-
/* @__PURE__ */
|
|
2263
|
-
/* @__PURE__ */
|
|
2261
|
+
/* @__PURE__ */ r("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2" }),
|
|
2262
|
+
/* @__PURE__ */ r("line", { x1: "8", y1: "21", x2: "16", y2: "21" }),
|
|
2263
|
+
/* @__PURE__ */ r("line", { x1: "12", y1: "17", x2: "12", y2: "21" })
|
|
2264
2264
|
] });
|
|
2265
2265
|
}
|
|
2266
2266
|
function On() {
|
|
2267
2267
|
return /* @__PURE__ */ k("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: [
|
|
2268
|
-
/* @__PURE__ */
|
|
2269
|
-
/* @__PURE__ */
|
|
2268
|
+
/* @__PURE__ */ r("path", { d: "M23 7l-7 5 7 5V7z" }),
|
|
2269
|
+
/* @__PURE__ */ r("rect", { x: "1", y: "5", width: "15", height: "14", rx: "2" })
|
|
2270
2270
|
] });
|
|
2271
2271
|
}
|
|
2272
2272
|
function Fn({ muted: e }) {
|
|
2273
2273
|
return /* @__PURE__ */ k("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: [
|
|
2274
|
-
/* @__PURE__ */
|
|
2275
|
-
/* @__PURE__ */
|
|
2276
|
-
/* @__PURE__ */
|
|
2277
|
-
e && /* @__PURE__ */
|
|
2274
|
+
/* @__PURE__ */ r("path", { d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" }),
|
|
2275
|
+
/* @__PURE__ */ r("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }),
|
|
2276
|
+
/* @__PURE__ */ r("line", { x1: "12", y1: "19", x2: "12", y2: "23" }),
|
|
2277
|
+
e && /* @__PURE__ */ r("line", { x1: "1", y1: "1", x2: "23", y2: "23" })
|
|
2278
2278
|
] });
|
|
2279
2279
|
}
|
|
2280
2280
|
function Wn({ muted: e }) {
|
|
2281
2281
|
return /* @__PURE__ */ k("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: [
|
|
2282
|
-
/* @__PURE__ */
|
|
2283
|
-
e ? /* @__PURE__ */
|
|
2284
|
-
/* @__PURE__ */
|
|
2285
|
-
/* @__PURE__ */
|
|
2282
|
+
/* @__PURE__ */ r("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
|
|
2283
|
+
e ? /* @__PURE__ */ r("line", { x1: "23", y1: "9", x2: "17", y2: "15" }) : /* @__PURE__ */ k(Fe, { children: [
|
|
2284
|
+
/* @__PURE__ */ r("path", { d: "M19.07 4.93a10 10 0 0 1 0 14.14" }),
|
|
2285
|
+
/* @__PURE__ */ r("path", { d: "M15.54 8.46a5 5 0 0 1 0 7.07" })
|
|
2286
2286
|
] })
|
|
2287
2287
|
] });
|
|
2288
2288
|
}
|
|
2289
2289
|
function fi() {
|
|
2290
2290
|
return /* @__PURE__ */ k("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: [
|
|
2291
|
-
/* @__PURE__ */
|
|
2292
|
-
/* @__PURE__ */
|
|
2291
|
+
/* @__PURE__ */ r("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
|
|
2292
|
+
/* @__PURE__ */ r("polyline", { points: "12 5 19 12 12 19" })
|
|
2293
2293
|
] });
|
|
2294
2294
|
}
|
|
2295
2295
|
function Bn() {
|
|
2296
|
-
return /* @__PURE__ */
|
|
2296
|
+
return /* @__PURE__ */ r("svg", { width: "16", height: "16", viewBox: "-4 -4 32 32", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: /* @__PURE__ */ r(
|
|
2297
2297
|
"path",
|
|
2298
2298
|
{
|
|
2299
2299
|
d: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.93.37 1.84.71 2.7a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.38-1.38a2 2 0 0 1 2.11-.45c.86.34 1.77.58 2.7.71A2 2 0 0 1 22 16.92z",
|
|
@@ -2304,56 +2304,56 @@ function Bn() {
|
|
|
2304
2304
|
const Cn = ({
|
|
2305
2305
|
label: e,
|
|
2306
2306
|
devices: t,
|
|
2307
|
-
activeId:
|
|
2307
|
+
activeId: n,
|
|
2308
2308
|
onPick: i,
|
|
2309
2309
|
anchorRef: a
|
|
2310
2310
|
}) => {
|
|
2311
|
-
const [
|
|
2311
|
+
const [l, s] = M(null);
|
|
2312
2312
|
return Tn(() => {
|
|
2313
|
-
const
|
|
2314
|
-
const
|
|
2315
|
-
if (!
|
|
2316
|
-
const u =
|
|
2317
|
-
|
|
2313
|
+
const o = () => {
|
|
2314
|
+
const c = a.current;
|
|
2315
|
+
if (!c) return;
|
|
2316
|
+
const u = c.getBoundingClientRect(), b = 126, p = window.innerWidth - 16 - 110, h = u.left + u.width / 2;
|
|
2317
|
+
s({
|
|
2318
2318
|
top: u.top - 8,
|
|
2319
2319
|
left: Math.max(b, Math.min(p, h))
|
|
2320
2320
|
});
|
|
2321
2321
|
};
|
|
2322
|
-
return
|
|
2323
|
-
window.removeEventListener("scroll",
|
|
2322
|
+
return o(), window.addEventListener("scroll", o, !0), window.addEventListener("resize", o), () => {
|
|
2323
|
+
window.removeEventListener("scroll", o, !0), window.removeEventListener("resize", o);
|
|
2324
2324
|
};
|
|
2325
|
-
}, [a]),
|
|
2325
|
+
}, [a]), l === null || typeof document > "u" ? null : Vt(
|
|
2326
2326
|
/* @__PURE__ */ k(
|
|
2327
2327
|
"div",
|
|
2328
2328
|
{
|
|
2329
2329
|
className: "ll-device-menu ll-device-menu--floating",
|
|
2330
|
-
onClick: (
|
|
2330
|
+
onClick: (o) => o.stopPropagation(),
|
|
2331
2331
|
role: "listbox",
|
|
2332
2332
|
style: {
|
|
2333
2333
|
position: "fixed",
|
|
2334
|
-
top:
|
|
2335
|
-
left:
|
|
2334
|
+
top: l.top,
|
|
2335
|
+
left: l.left,
|
|
2336
2336
|
// translate up by 100% so its BOTTOM edge sits at pos.top.
|
|
2337
2337
|
transform: "translate(-50%, -100%)"
|
|
2338
2338
|
},
|
|
2339
2339
|
children: [
|
|
2340
|
-
/* @__PURE__ */
|
|
2341
|
-
t.map((
|
|
2342
|
-
const u =
|
|
2340
|
+
/* @__PURE__ */ r("p", { className: "ll-device-menu__label", children: e }),
|
|
2341
|
+
t.map((o, c) => {
|
|
2342
|
+
const u = n === o.deviceId;
|
|
2343
2343
|
return /* @__PURE__ */ k(
|
|
2344
2344
|
"button",
|
|
2345
2345
|
{
|
|
2346
2346
|
type: "button",
|
|
2347
2347
|
className: `ll-device-menu__item ${u ? "is-active" : ""}`,
|
|
2348
|
-
onClick: () => i(
|
|
2348
|
+
onClick: () => i(o.deviceId),
|
|
2349
2349
|
role: "option",
|
|
2350
2350
|
"aria-selected": u,
|
|
2351
2351
|
children: [
|
|
2352
|
-
u && /* @__PURE__ */
|
|
2353
|
-
/* @__PURE__ */
|
|
2352
|
+
u && /* @__PURE__ */ r("span", { className: "ll-device-menu__dot", children: "●" }),
|
|
2353
|
+
/* @__PURE__ */ r("span", { className: "ll-device-menu__name", children: o.label || `${e} ${c + 1}` })
|
|
2354
2354
|
]
|
|
2355
2355
|
},
|
|
2356
|
-
|
|
2356
|
+
o.deviceId || c
|
|
2357
2357
|
);
|
|
2358
2358
|
})
|
|
2359
2359
|
]
|
|
@@ -2372,8 +2372,8 @@ const Cn = ({
|
|
|
2372
2372
|
function Yt(e) {
|
|
2373
2373
|
let t = e;
|
|
2374
2374
|
for (; t; ) {
|
|
2375
|
-
for (const
|
|
2376
|
-
if (t.matches(
|
|
2375
|
+
for (const n of pi)
|
|
2376
|
+
if (t.matches(n)) return !0;
|
|
2377
2377
|
t = t.parentElement;
|
|
2378
2378
|
}
|
|
2379
2379
|
return !1;
|
|
@@ -2399,8 +2399,8 @@ function dt(e) {
|
|
|
2399
2399
|
if (e.getAttribute("aria-hidden") === "true" || e.hasAttribute("hidden")) return !0;
|
|
2400
2400
|
let t = e;
|
|
2401
2401
|
for (; t; ) {
|
|
2402
|
-
for (const
|
|
2403
|
-
if (t.matches(
|
|
2402
|
+
for (const n of wi)
|
|
2403
|
+
if (t.matches(n)) return !0;
|
|
2404
2404
|
t = t.parentElement;
|
|
2405
2405
|
}
|
|
2406
2406
|
return !1;
|
|
@@ -2409,32 +2409,32 @@ function ft(e) {
|
|
|
2409
2409
|
if (typeof window > "u") return !0;
|
|
2410
2410
|
const t = e.getBoundingClientRect();
|
|
2411
2411
|
if (t.width <= 0 || t.height <= 0) return !1;
|
|
2412
|
-
const
|
|
2413
|
-
return t.bottom > 0 && t.right > 0 && t.top <
|
|
2412
|
+
const n = window.innerHeight || document.documentElement.clientHeight, i = window.innerWidth || document.documentElement.clientWidth;
|
|
2413
|
+
return t.bottom > 0 && t.right > 0 && t.top < n && t.left < i;
|
|
2414
2414
|
}
|
|
2415
2415
|
function Sn(e) {
|
|
2416
2416
|
const t = e.getAttribute("id");
|
|
2417
2417
|
if (t) {
|
|
2418
|
-
const
|
|
2419
|
-
if (
|
|
2418
|
+
const l = typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(t) : t.replace(/"/g, '\\"'), s = document.querySelector(`label[for="${l}"]`);
|
|
2419
|
+
if (s != null && s.textContent) return s.textContent.trim();
|
|
2420
2420
|
}
|
|
2421
|
-
const
|
|
2422
|
-
if (
|
|
2421
|
+
const n = e.getAttribute("aria-label");
|
|
2422
|
+
if (n) return n.trim();
|
|
2423
2423
|
const i = e.closest("label");
|
|
2424
2424
|
if (i) {
|
|
2425
|
-
const
|
|
2426
|
-
for (const
|
|
2427
|
-
if (
|
|
2428
|
-
const
|
|
2429
|
-
|
|
2430
|
-
} else if (
|
|
2431
|
-
if (
|
|
2425
|
+
const l = [];
|
|
2426
|
+
for (const o of Array.from(i.childNodes))
|
|
2427
|
+
if (o.nodeType === Node.TEXT_NODE) {
|
|
2428
|
+
const c = (o.textContent || "").trim();
|
|
2429
|
+
c && l.push(c);
|
|
2430
|
+
} else if (o instanceof HTMLElement) {
|
|
2431
|
+
if (o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || o instanceof HTMLSelectElement || o instanceof HTMLButtonElement)
|
|
2432
2432
|
continue;
|
|
2433
|
-
const
|
|
2434
|
-
|
|
2433
|
+
const c = (o.textContent || "").trim();
|
|
2434
|
+
c && l.push(c);
|
|
2435
2435
|
}
|
|
2436
|
-
const
|
|
2437
|
-
if (
|
|
2436
|
+
const s = l.join(" ").trim();
|
|
2437
|
+
if (s) return s;
|
|
2438
2438
|
}
|
|
2439
2439
|
const a = e.getAttribute("placeholder");
|
|
2440
2440
|
return a ? a.trim() : "";
|
|
@@ -2448,25 +2448,25 @@ function _i(e) {
|
|
|
2448
2448
|
function xi(e) {
|
|
2449
2449
|
const t = e.getAttribute("aria-label");
|
|
2450
2450
|
if (t) return t.trim().slice(0, 80);
|
|
2451
|
-
const
|
|
2452
|
-
if (
|
|
2453
|
-
const
|
|
2454
|
-
if (
|
|
2451
|
+
const n = e.getAttribute("aria-labelledby");
|
|
2452
|
+
if (n) {
|
|
2453
|
+
const l = document.getElementById(n);
|
|
2454
|
+
if (l != null && l.textContent) return l.textContent.trim().slice(0, 80);
|
|
2455
2455
|
}
|
|
2456
2456
|
const i = e.querySelector(
|
|
2457
2457
|
'button[type="submit"], input[type="submit"], button:not([type])'
|
|
2458
2458
|
);
|
|
2459
2459
|
if (i) {
|
|
2460
|
-
const
|
|
2461
|
-
if (
|
|
2462
|
-
return
|
|
2460
|
+
const l = i instanceof HTMLInputElement ? i.value : (i.textContent ?? "").trim();
|
|
2461
|
+
if (l && l.length < 60 && !/^(submit|ok|continue)$/i.test(l))
|
|
2462
|
+
return l;
|
|
2463
2463
|
}
|
|
2464
2464
|
let a = e.parentElement;
|
|
2465
|
-
for (let
|
|
2466
|
-
const
|
|
2467
|
-
if (
|
|
2468
|
-
const
|
|
2469
|
-
if (
|
|
2465
|
+
for (let l = 0; a && l < 4; l++, a = a.parentElement) {
|
|
2466
|
+
const s = a.querySelector("h1, h2, h3, h4");
|
|
2467
|
+
if (s != null && s.textContent) {
|
|
2468
|
+
const o = s.textContent.trim();
|
|
2469
|
+
if (o && o.length < 80) return o;
|
|
2470
2470
|
}
|
|
2471
2471
|
}
|
|
2472
2472
|
return null;
|
|
@@ -2475,8 +2475,8 @@ function Je(e) {
|
|
|
2475
2475
|
return e.length;
|
|
2476
2476
|
}
|
|
2477
2477
|
function Li(e, t = {}) {
|
|
2478
|
-
const
|
|
2479
|
-
if (!
|
|
2478
|
+
const n = t.doc ?? (typeof document < "u" ? document : null);
|
|
2479
|
+
if (!n)
|
|
2480
2480
|
return {
|
|
2481
2481
|
url: "",
|
|
2482
2482
|
title: "",
|
|
@@ -2488,34 +2488,34 @@ function Li(e, t = {}) {
|
|
|
2488
2488
|
forms: [],
|
|
2489
2489
|
extras: e
|
|
2490
2490
|
};
|
|
2491
|
-
const i = typeof window < "u" && window.location.href || "", a = typeof window < "u" && window.location.pathname || "/",
|
|
2492
|
-
|
|
2493
|
-
),
|
|
2494
|
-
for (const m of
|
|
2495
|
-
if (
|
|
2491
|
+
const i = typeof window < "u" && window.location.href || "", a = typeof window < "u" && window.location.pathname || "/", l = n.title || "", s = Array.from(
|
|
2492
|
+
n.querySelectorAll("[data-ll-region]")
|
|
2493
|
+
), o = [];
|
|
2494
|
+
for (const m of s) {
|
|
2495
|
+
if (o.length >= gi) break;
|
|
2496
2496
|
if (dt(m) || !ft(m)) continue;
|
|
2497
2497
|
const D = m.getAttribute("data-ll-region") ?? "", W = m.getAttribute("data-ll-intent") ?? void 0, K = fe(
|
|
2498
2498
|
(m.innerText || m.textContent || "").trim(),
|
|
2499
2499
|
kn * 2
|
|
2500
2500
|
);
|
|
2501
|
-
!D || !K ||
|
|
2501
|
+
!D || !K || o.push({ id: D, intent: W, text: K });
|
|
2502
2502
|
}
|
|
2503
|
-
const
|
|
2504
|
-
|
|
2503
|
+
const c = [], u = ["H1", "H2", "H3", "H4", "H5", "H6"], b = Array.from(
|
|
2504
|
+
n.querySelectorAll("h1, h2, h3, h4, h5, h6")
|
|
2505
2505
|
);
|
|
2506
2506
|
for (const m of b) {
|
|
2507
2507
|
if (dt(m) || !ft(m)) continue;
|
|
2508
2508
|
const D = (m.textContent || "").trim();
|
|
2509
|
-
D &&
|
|
2509
|
+
D && c.push(`${m.tagName}: ${fe(D, 200)}`);
|
|
2510
2510
|
}
|
|
2511
|
-
const p = Array.from(
|
|
2511
|
+
const p = Array.from(n.querySelectorAll("p, li"));
|
|
2512
2512
|
for (const m of p) {
|
|
2513
2513
|
if (dt(m) || !ft(m) || u.includes(m.tagName)) continue;
|
|
2514
2514
|
const D = (m.textContent || "").trim();
|
|
2515
|
-
D.length > 10 &&
|
|
2515
|
+
D.length > 10 && c.push(fe(D, kn));
|
|
2516
2516
|
}
|
|
2517
|
-
const h =
|
|
2518
|
-
`), P = [], x = Array.from(
|
|
2517
|
+
const h = c.join(`
|
|
2518
|
+
`), P = [], x = Array.from(n.querySelectorAll("a[href]"));
|
|
2519
2519
|
for (const m of x) {
|
|
2520
2520
|
if (P.length >= hi) break;
|
|
2521
2521
|
if (dt(m) || !ft(m)) continue;
|
|
@@ -2523,7 +2523,7 @@ function Li(e, t = {}) {
|
|
|
2523
2523
|
!D || !W || P.push({ href: D, text: fe(W, 100) });
|
|
2524
2524
|
}
|
|
2525
2525
|
const E = [], g = Array.from(
|
|
2526
|
-
|
|
2526
|
+
n.querySelectorAll(
|
|
2527
2527
|
"input, textarea, select"
|
|
2528
2528
|
)
|
|
2529
2529
|
);
|
|
@@ -2533,7 +2533,7 @@ function Li(e, t = {}) {
|
|
|
2533
2533
|
const D = Sn(m), W = m instanceof HTMLInputElement ? m.type : m.tagName.toLowerCase();
|
|
2534
2534
|
D && E.push({ label: fe(D, 100), type: W });
|
|
2535
2535
|
}
|
|
2536
|
-
const w = Array.from(
|
|
2536
|
+
const w = Array.from(n.querySelectorAll("form")), R = [];
|
|
2537
2537
|
let S = 0;
|
|
2538
2538
|
for (const m of w) {
|
|
2539
2539
|
if (R.length >= yi) break;
|
|
@@ -2603,9 +2603,9 @@ function Li(e, t = {}) {
|
|
|
2603
2603
|
}
|
|
2604
2604
|
const y = {
|
|
2605
2605
|
url: i,
|
|
2606
|
-
title:
|
|
2606
|
+
title: l,
|
|
2607
2607
|
pathname: a,
|
|
2608
|
-
regions:
|
|
2608
|
+
regions: o,
|
|
2609
2609
|
visibleText: h,
|
|
2610
2610
|
visibleLinks: P,
|
|
2611
2611
|
visibleFields: E,
|
|
@@ -2620,18 +2620,25 @@ function Li(e, t = {}) {
|
|
|
2620
2620
|
return Je(y.visibleText) > St && (y.visibleText = fe(y.visibleText, St - 100)), y;
|
|
2621
2621
|
}
|
|
2622
2622
|
let Ze = null;
|
|
2623
|
+
function Ci(e) {
|
|
2624
|
+
const t = e.querySelectorAll("form");
|
|
2625
|
+
let n = `f${t.length}`;
|
|
2626
|
+
return t.forEach((i) => {
|
|
2627
|
+
n += `|${i.id || i.getAttribute("name") || ""}:${i.querySelectorAll("input,select,textarea").length}`;
|
|
2628
|
+
}), n;
|
|
2629
|
+
}
|
|
2623
2630
|
function En(e, t = {}) {
|
|
2624
|
-
const
|
|
2625
|
-
if (Ze && Ze.key ===
|
|
2631
|
+
const n = Date.now(), i = t.doc ?? (typeof document < "u" ? document : null), a = typeof window < "u" && window.location.pathname || "/", l = typeof window < "u" ? window.scrollY : 0, s = `${a}::${l}::${i ? Ci(i) : ""}`;
|
|
2632
|
+
if (Ze && Ze.key === s && n - Ze.at < 1e3)
|
|
2626
2633
|
return Ze.ctx;
|
|
2627
2634
|
const o = Li(e, t);
|
|
2628
|
-
return Ze = { key:
|
|
2635
|
+
return Ze = { key: s, at: n, ctx: o }, o;
|
|
2629
2636
|
}
|
|
2630
|
-
function
|
|
2637
|
+
function ki() {
|
|
2631
2638
|
Ze = null;
|
|
2632
2639
|
}
|
|
2633
|
-
const
|
|
2634
|
-
function
|
|
2640
|
+
const Si = 200;
|
|
2641
|
+
function Ei(e) {
|
|
2635
2642
|
const t = String(e.href || "");
|
|
2636
2643
|
return {
|
|
2637
2644
|
href: t,
|
|
@@ -2641,44 +2648,44 @@ function Si(e) {
|
|
|
2641
2648
|
description: e.description
|
|
2642
2649
|
};
|
|
2643
2650
|
}
|
|
2644
|
-
function
|
|
2651
|
+
function Ni(e) {
|
|
2645
2652
|
return !(!e || e.startsWith("#") || e.startsWith("javascript:") || e.startsWith("mailto:") || e.startsWith("tel:"));
|
|
2646
2653
|
}
|
|
2647
|
-
function
|
|
2654
|
+
function Ai(e) {
|
|
2648
2655
|
const t = e ?? (typeof document < "u" ? document : null);
|
|
2649
2656
|
if (!t) return [];
|
|
2650
|
-
const
|
|
2651
|
-
for (const
|
|
2652
|
-
if (a.length >=
|
|
2653
|
-
if (Yt(
|
|
2654
|
-
const
|
|
2655
|
-
if (!
|
|
2656
|
-
let
|
|
2657
|
+
const n = typeof window < "u" && window.location.origin || "", i = /* @__PURE__ */ new Set(), a = [], l = Array.from(t.querySelectorAll("a[href]"));
|
|
2658
|
+
for (const s of l) {
|
|
2659
|
+
if (a.length >= Si) break;
|
|
2660
|
+
if (Yt(s)) continue;
|
|
2661
|
+
const o = s.getAttribute("href") || "";
|
|
2662
|
+
if (!Ni(o)) continue;
|
|
2663
|
+
let c = o, u = !0;
|
|
2657
2664
|
try {
|
|
2658
2665
|
if (typeof window < "u") {
|
|
2659
|
-
const p = new URL(
|
|
2660
|
-
u = p.origin ===
|
|
2666
|
+
const p = new URL(o, n);
|
|
2667
|
+
u = p.origin === n, u && o.startsWith("http") && (c = p.pathname + p.search + p.hash);
|
|
2661
2668
|
}
|
|
2662
2669
|
} catch {
|
|
2663
2670
|
continue;
|
|
2664
2671
|
}
|
|
2665
|
-
if (i.has(
|
|
2666
|
-
i.add(
|
|
2667
|
-
const b = (
|
|
2668
|
-
a.push({ href:
|
|
2672
|
+
if (i.has(c)) continue;
|
|
2673
|
+
i.add(c);
|
|
2674
|
+
const b = (s.textContent || "").trim().slice(0, 120);
|
|
2675
|
+
a.push({ href: c, text: b, internal: u });
|
|
2669
2676
|
}
|
|
2670
2677
|
return a;
|
|
2671
2678
|
}
|
|
2672
2679
|
let Qe = null;
|
|
2673
|
-
const
|
|
2680
|
+
const Mi = 5e3;
|
|
2674
2681
|
function Bt() {
|
|
2675
2682
|
const e = Date.now(), t = typeof window < "u" && window.location.pathname || "/";
|
|
2676
|
-
if (Qe && Qe.pathname === t && e - Qe.at <
|
|
2683
|
+
if (Qe && Qe.pathname === t && e - Qe.at < Mi)
|
|
2677
2684
|
return Qe.routes;
|
|
2678
|
-
const
|
|
2679
|
-
return Qe = { at: e, pathname: t, routes:
|
|
2685
|
+
const n = Ai();
|
|
2686
|
+
return Qe = { at: e, pathname: t, routes: n }, n;
|
|
2680
2687
|
}
|
|
2681
|
-
function
|
|
2688
|
+
function Ii() {
|
|
2682
2689
|
Qe = null;
|
|
2683
2690
|
}
|
|
2684
2691
|
function Nn(e) {
|
|
@@ -2689,92 +2696,92 @@ function Nn(e) {
|
|
|
2689
2696
|
}
|
|
2690
2697
|
return !0;
|
|
2691
2698
|
}
|
|
2692
|
-
function
|
|
2699
|
+
function Ri(e, t) {
|
|
2693
2700
|
return e.getAttribute("name") || e.getAttribute("id") || `field_${t}`;
|
|
2694
2701
|
}
|
|
2695
|
-
function
|
|
2702
|
+
function Ti(e, t) {
|
|
2696
2703
|
if (!t) return null;
|
|
2697
2704
|
try {
|
|
2698
|
-
const
|
|
2705
|
+
const l = e.querySelector(
|
|
2699
2706
|
`[name="${t.replace(/"/g, '\\"')}"]`
|
|
2700
2707
|
);
|
|
2701
|
-
if (
|
|
2708
|
+
if (l && Nn(l)) return l;
|
|
2702
2709
|
} catch {
|
|
2703
2710
|
}
|
|
2704
|
-
const
|
|
2711
|
+
const n = Array.from(
|
|
2705
2712
|
e.querySelectorAll("input, textarea, select")
|
|
2706
2713
|
);
|
|
2707
2714
|
let i = 0;
|
|
2708
2715
|
const a = /* @__PURE__ */ new Map();
|
|
2709
|
-
for (const
|
|
2710
|
-
if (!Nn(
|
|
2711
|
-
const
|
|
2712
|
-
let
|
|
2713
|
-
if (a.has(
|
|
2714
|
-
a.set(
|
|
2716
|
+
for (const l of n) {
|
|
2717
|
+
if (!Nn(l)) continue;
|
|
2718
|
+
const s = Ri(l, i);
|
|
2719
|
+
let o = s;
|
|
2720
|
+
if (a.has(s) && (o = `${s}__${i}`), o === t) return l;
|
|
2721
|
+
a.set(s, l), i++;
|
|
2715
2722
|
}
|
|
2716
2723
|
return null;
|
|
2717
2724
|
}
|
|
2718
2725
|
function An(e, t) {
|
|
2719
|
-
const
|
|
2720
|
-
return
|
|
2726
|
+
const n = Ti(e, t);
|
|
2727
|
+
return n ? Ut(n) ? { el: n } : { el: null, reason: "private" } : { el: null, reason: "not_found" };
|
|
2721
2728
|
}
|
|
2722
|
-
function
|
|
2723
|
-
const
|
|
2729
|
+
function Pi(e, t) {
|
|
2730
|
+
const n = e instanceof HTMLInputElement ? HTMLInputElement.prototype : e instanceof HTMLTextAreaElement ? HTMLTextAreaElement.prototype : HTMLSelectElement.prototype, i = Object.getOwnPropertyDescriptor(n, "value"), a = i == null ? void 0 : i.set;
|
|
2724
2731
|
a ? a.call(e, t) : e.value = t;
|
|
2725
2732
|
}
|
|
2726
|
-
function
|
|
2727
|
-
const i =
|
|
2733
|
+
function Di(e, t, n = {}) {
|
|
2734
|
+
const i = n.triggerInput ?? !0, a = n.triggerChange ?? !0;
|
|
2728
2735
|
if (e instanceof HTMLInputElement && (e.type === "checkbox" || e.type === "radio")) {
|
|
2729
|
-
const
|
|
2736
|
+
const l = Object.getOwnPropertyDescriptor(
|
|
2730
2737
|
HTMLInputElement.prototype,
|
|
2731
2738
|
"checked"
|
|
2732
|
-
),
|
|
2733
|
-
|
|
2739
|
+
), s = l == null ? void 0 : l.set, o = t === "true" || t === "1" || t === "on";
|
|
2740
|
+
s ? s.call(e, o) : e.checked = o, i && e.dispatchEvent(new Event("input", { bubbles: !0 })), a && e.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
2734
2741
|
return;
|
|
2735
2742
|
}
|
|
2736
|
-
|
|
2743
|
+
Pi(e, t), i && e.dispatchEvent(new Event("input", { bubbles: !0 })), a && e.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
2737
2744
|
}
|
|
2738
2745
|
function Mn(e, t) {
|
|
2739
2746
|
if (!t) return null;
|
|
2740
|
-
const
|
|
2747
|
+
const n = t.replace(/"/g, '\\"'), i = (o) => o.closest('[data-ll-private="true"], [data-ll-skip], .ll-widget') !== null;
|
|
2741
2748
|
try {
|
|
2742
|
-
const
|
|
2749
|
+
const o = e.querySelector(
|
|
2743
2750
|
`form#${CSS.escape(t)}`
|
|
2744
2751
|
);
|
|
2745
|
-
if (
|
|
2752
|
+
if (o && !i(o)) return o;
|
|
2746
2753
|
} catch {
|
|
2747
2754
|
}
|
|
2748
2755
|
const a = e.querySelector(
|
|
2749
|
-
`form[name="${
|
|
2756
|
+
`form[name="${n}"]`
|
|
2750
2757
|
);
|
|
2751
2758
|
if (a && !i(a)) return a;
|
|
2752
|
-
const
|
|
2753
|
-
`form[data-ll-intent="${
|
|
2759
|
+
const l = e.querySelector(
|
|
2760
|
+
`form[data-ll-intent="${n}"]`
|
|
2754
2761
|
);
|
|
2755
|
-
if (
|
|
2756
|
-
const
|
|
2762
|
+
if (l && !i(l)) return l;
|
|
2763
|
+
const s = Array.from(
|
|
2757
2764
|
e.querySelectorAll("form")
|
|
2758
|
-
).filter((
|
|
2759
|
-
for (const
|
|
2760
|
-
const
|
|
2761
|
-
if (
|
|
2765
|
+
).filter((o) => !i(o));
|
|
2766
|
+
for (const o of s) {
|
|
2767
|
+
const c = o.getAttribute("data-ll-intent");
|
|
2768
|
+
if (c && zi(c) === t) return o;
|
|
2762
2769
|
}
|
|
2763
2770
|
if (/^form_\d+$/.test(t)) {
|
|
2764
|
-
const
|
|
2765
|
-
let
|
|
2766
|
-
for (const u of
|
|
2771
|
+
const o = parseInt(t.slice(5), 10);
|
|
2772
|
+
let c = 0;
|
|
2773
|
+
for (const u of s)
|
|
2767
2774
|
if (!(u.id || u.getAttribute("name") || u.getAttribute("data-ll-intent"))) {
|
|
2768
|
-
if (
|
|
2769
|
-
|
|
2775
|
+
if (c === o) return u;
|
|
2776
|
+
c++;
|
|
2770
2777
|
}
|
|
2771
2778
|
}
|
|
2772
|
-
return null;
|
|
2779
|
+
return s.length === 1 ? s[0] : null;
|
|
2773
2780
|
}
|
|
2774
|
-
function
|
|
2781
|
+
function zi(e) {
|
|
2775
2782
|
return e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 60) || null;
|
|
2776
2783
|
}
|
|
2777
|
-
function
|
|
2784
|
+
function $i() {
|
|
2778
2785
|
if (typeof window > "u" || typeof document > "u")
|
|
2779
2786
|
return !1;
|
|
2780
2787
|
const e = document.scrollingElement || document.documentElement;
|
|
@@ -2782,44 +2789,44 @@ function zi() {
|
|
|
2782
2789
|
const t = window.getComputedStyle(e);
|
|
2783
2790
|
return !(t.overflowY === "hidden" || t.overflowY === "clip");
|
|
2784
2791
|
}
|
|
2785
|
-
function
|
|
2792
|
+
function Hi(e) {
|
|
2786
2793
|
if (!(e instanceof HTMLElement)) return !1;
|
|
2787
|
-
const
|
|
2788
|
-
return !(
|
|
2794
|
+
const n = window.getComputedStyle(e).overflowY;
|
|
2795
|
+
return !(n !== "auto" && n !== "scroll" || e.scrollHeight <= e.clientHeight + 2);
|
|
2789
2796
|
}
|
|
2790
|
-
function
|
|
2797
|
+
function Oi() {
|
|
2791
2798
|
if (typeof document > "u") return null;
|
|
2792
2799
|
const e = Array.from(
|
|
2793
2800
|
document.querySelectorAll("body, body *")
|
|
2794
2801
|
);
|
|
2795
|
-
let t = null,
|
|
2802
|
+
let t = null, n = 0;
|
|
2796
2803
|
for (const i of e) {
|
|
2797
|
-
if (
|
|
2804
|
+
if (!Hi(i)) continue;
|
|
2798
2805
|
const a = i.getBoundingClientRect();
|
|
2799
2806
|
if (a.bottom <= 0 || a.top >= window.innerHeight || a.right <= 0 || a.left >= window.innerWidth || a.width <= 0 || a.height <= 0 || i.closest(".ll-widget")) continue;
|
|
2800
|
-
const
|
|
2801
|
-
|
|
2807
|
+
const l = a.width * a.height;
|
|
2808
|
+
l > n && (n = l, t = i);
|
|
2802
2809
|
}
|
|
2803
2810
|
return t;
|
|
2804
2811
|
}
|
|
2805
|
-
function
|
|
2812
|
+
function Fi() {
|
|
2806
2813
|
if (typeof window > "u")
|
|
2807
2814
|
return null;
|
|
2808
|
-
if (
|
|
2809
|
-
const e =
|
|
2815
|
+
if ($i()) return window;
|
|
2816
|
+
const e = Oi();
|
|
2810
2817
|
return e || window;
|
|
2811
2818
|
}
|
|
2812
2819
|
function In(e) {
|
|
2813
2820
|
return e instanceof Window ? e.innerHeight || 0 : e.clientHeight || 0;
|
|
2814
2821
|
}
|
|
2815
|
-
function
|
|
2816
|
-
var t,
|
|
2822
|
+
function Wi(e) {
|
|
2823
|
+
var t, n;
|
|
2817
2824
|
return e instanceof Window ? typeof document > "u" ? 0 : Math.max(
|
|
2818
2825
|
((t = document.body) == null ? void 0 : t.scrollHeight) ?? 0,
|
|
2819
|
-
((
|
|
2826
|
+
((n = document.documentElement) == null ? void 0 : n.scrollHeight) ?? 0
|
|
2820
2827
|
) : e.scrollHeight - e.clientHeight;
|
|
2821
2828
|
}
|
|
2822
|
-
const
|
|
2829
|
+
const Bi = /* @__PURE__ */ new Set([
|
|
2823
2830
|
"agent_state",
|
|
2824
2831
|
"avatar_stream_ready",
|
|
2825
2832
|
"avatar_active",
|
|
@@ -2850,15 +2857,15 @@ const Wi = /* @__PURE__ */ new Set([
|
|
|
2850
2857
|
"task_field_updated",
|
|
2851
2858
|
"task_completed"
|
|
2852
2859
|
]), qn = jt(
|
|
2853
|
-
function(t,
|
|
2860
|
+
function(t, n) {
|
|
2854
2861
|
var on, ln, an, sn, cn, un, dn;
|
|
2855
2862
|
const {
|
|
2856
2863
|
agentId: i,
|
|
2857
2864
|
apiKey: a,
|
|
2858
|
-
baseUrl:
|
|
2859
|
-
sessionEndpoint:
|
|
2860
|
-
sessionBody:
|
|
2861
|
-
soundEffects:
|
|
2865
|
+
baseUrl: l = "https://app.livelayer.studio",
|
|
2866
|
+
sessionEndpoint: s,
|
|
2867
|
+
sessionBody: o,
|
|
2868
|
+
soundEffects: c,
|
|
2862
2869
|
experienceMode: u = "WIDGET",
|
|
2863
2870
|
autoConnect: b = !1,
|
|
2864
2871
|
displayMode: p,
|
|
@@ -2921,7 +2928,7 @@ const Wi = /* @__PURE__ */ new Set([
|
|
|
2921
2928
|
zIndex: we = 2147483647
|
|
2922
2929
|
} = t, gt = Or(be), He = Vr(gt, me, Q);
|
|
2923
2930
|
T(() => {
|
|
2924
|
-
|
|
2931
|
+
ki(), Ii();
|
|
2925
2932
|
}, [gt]);
|
|
2926
2933
|
const Ne = O !== void 0, [Nt, yt] = M(() => {
|
|
2927
2934
|
var v;
|
|
@@ -2941,7 +2948,7 @@ const Wi = /* @__PURE__ */ new Set([
|
|
|
2941
2948
|
resizable: !le && (w ?? !pe),
|
|
2942
2949
|
persistKey: R,
|
|
2943
2950
|
disablePersistence: le || S
|
|
2944
|
-
}), Me = yr(), Se = _r(), ye = xr(), xe = Lr(), [bt, Ye] = M(!1), [lt, at] = M(!1), [_, re] = M(!1), [Un, jn] = M(!1), [Rt, Vn] = M(!1), wt = Gr({ baseUrl:
|
|
2951
|
+
}), Me = yr(), Se = _r(), ye = xr(), xe = Lr(), [bt, Ye] = M(!1), [lt, at] = M(!1), [_, re] = M(!1), [Un, jn] = M(!1), [Rt, Vn] = M(!1), wt = Gr({ baseUrl: l, config: c }), _t = I(wt);
|
|
2945
2952
|
_t.current = wt;
|
|
2946
2953
|
const Tt = I(ne), Pt = I(tt), Dt = I(rt), zt = I(mt), Gt = I(nt), Xt = I(pt), Kt = I(ht), $t = I(We), Le = I(null);
|
|
2947
2954
|
Tt.current = ne, Pt.current = tt, Dt.current = rt, zt.current = mt, Gt.current = nt, Xt.current = pt, Kt.current = ht, $t.current = We;
|
|
@@ -3117,12 +3124,12 @@ const Wi = /* @__PURE__ */ new Set([
|
|
|
3117
3124
|
return;
|
|
3118
3125
|
}
|
|
3119
3126
|
if (typeof window > "u") return;
|
|
3120
|
-
const Y = { behavior: H }, j =
|
|
3127
|
+
const Y = { behavior: H }, j = Fi(), J = (B) => {
|
|
3121
3128
|
j instanceof Window ? j.scrollBy({ top: B, ...Y }) : j.scrollBy({ top: B, ...Y });
|
|
3122
3129
|
}, Z = (B) => {
|
|
3123
3130
|
j instanceof Window ? j.scrollTo({ top: B, ...Y }) : j.scrollTo({ top: B, ...Y });
|
|
3124
3131
|
};
|
|
3125
|
-
A === "up" ? J(-In(j)) : A === "down" ? J(In(j)) : Z(A === "top" ? 0 :
|
|
3132
|
+
A === "up" ? J(-In(j)) : A === "down" ? J(In(j)) : Z(A === "top" ? 0 : Wi(j));
|
|
3126
3133
|
return;
|
|
3127
3134
|
}
|
|
3128
3135
|
if (d.type === "click") {
|
|
@@ -3228,7 +3235,7 @@ const Wi = /* @__PURE__ */ new Set([
|
|
|
3228
3235
|
continue;
|
|
3229
3236
|
}
|
|
3230
3237
|
try {
|
|
3231
|
-
|
|
3238
|
+
Di(Z.el, J);
|
|
3232
3239
|
} catch (B) {
|
|
3233
3240
|
console.warn(
|
|
3234
3241
|
`[LiveLayer] fill_form: failed to set "${j}".`,
|
|
@@ -3318,7 +3325,7 @@ const Wi = /* @__PURE__ */ new Set([
|
|
|
3318
3325
|
J([]);
|
|
3319
3326
|
return;
|
|
3320
3327
|
}
|
|
3321
|
-
J(he.map(
|
|
3328
|
+
J(he.map(Ei).slice(0, 200));
|
|
3322
3329
|
};
|
|
3323
3330
|
B instanceof Promise ? B.then(ce).catch((he) => {
|
|
3324
3331
|
console.warn(
|
|
@@ -3395,16 +3402,16 @@ const Wi = /* @__PURE__ */ new Set([
|
|
|
3395
3402
|
}
|
|
3396
3403
|
return;
|
|
3397
3404
|
}
|
|
3398
|
-
|
|
3405
|
+
Bi.has(d.type) || qe == null || qe(d);
|
|
3399
3406
|
}
|
|
3400
3407
|
},
|
|
3401
3408
|
[qe, De, ze]
|
|
3402
3409
|
), se = gr({
|
|
3403
3410
|
agentId: F ? "__controlled__" : it,
|
|
3404
|
-
baseUrl:
|
|
3411
|
+
baseUrl: l,
|
|
3405
3412
|
apiKey: a,
|
|
3406
|
-
sessionEndpoint:
|
|
3407
|
-
sessionBody:
|
|
3413
|
+
sessionEndpoint: s,
|
|
3414
|
+
sessionBody: o,
|
|
3408
3415
|
onDataMessage: F ? void 0 : st
|
|
3409
3416
|
});
|
|
3410
3417
|
T(() => {
|
|
@@ -3463,7 +3470,7 @@ const Wi = /* @__PURE__ */ new Set([
|
|
|
3463
3470
|
Jt.current = L;
|
|
3464
3471
|
const Zt = I(F);
|
|
3465
3472
|
Zt.current = F, cr(
|
|
3466
|
-
|
|
3473
|
+
n,
|
|
3467
3474
|
() => ({
|
|
3468
3475
|
sendData: async (v) => {
|
|
3469
3476
|
var Ee, ut;
|
|
@@ -3613,7 +3620,7 @@ const Wi = /* @__PURE__ */ new Set([
|
|
|
3613
3620
|
};
|
|
3614
3621
|
return window.addEventListener("keydown", v), () => window.removeEventListener("keydown", v);
|
|
3615
3622
|
}, [_]);
|
|
3616
|
-
const Kn = !!K || !!(ue != null && ue.avatarImageUrl) || L.isControlled, ct = Cr(it,
|
|
3623
|
+
const Kn = !!K || !!(ue != null && ue.avatarImageUrl) || L.isControlled, ct = Cr(it, l, Kn);
|
|
3617
3624
|
We === void 0 && ((on = ct.info) != null && on.capabilities) && ($t.current = ct.info.capabilities);
|
|
3618
3625
|
const Lt = (ue == null ? void 0 : ue.name) ?? ae ?? ((ln = L.agentConfig) == null ? void 0 : ln.name) ?? ((an = ct.info) == null ? void 0 : an.name) ?? "Live Layer", Ht = (ue == null ? void 0 : ue.avatarImageUrl) ?? K ?? ((sn = L.agentConfig) == null ? void 0 : sn.avatarImageUrl) ?? ((cn = ct.info) == null ? void 0 : cn.avatarImageUrl) ?? null, Jn = D ?? ((un = L.agentConfig) == null ? void 0 : un.idleLoopUrl) ?? ((dn = ct.info) == null ? void 0 : dn.idleLoopUrl) ?? null, Zn = W ?? null, Qn = C(() => _e("expanded"), [_e]), er = C(
|
|
3619
3626
|
() => _e("minimized"),
|
|
@@ -3644,7 +3651,7 @@ const Wi = /* @__PURE__ */ new Set([
|
|
|
3644
3651
|
$e
|
|
3645
3652
|
].filter(Boolean).join(" ");
|
|
3646
3653
|
if (!He) return null;
|
|
3647
|
-
const or = /* @__PURE__ */
|
|
3654
|
+
const or = /* @__PURE__ */ r(
|
|
3648
3655
|
"div",
|
|
3649
3656
|
{
|
|
3650
3657
|
className: ir,
|
|
@@ -3652,7 +3659,7 @@ const Wi = /* @__PURE__ */ new Set([
|
|
|
3652
3659
|
"data-display-mode": ge,
|
|
3653
3660
|
"data-position": x,
|
|
3654
3661
|
"data-experience-mode": u === "EMBEDDED" ? "embedded" : "widget",
|
|
3655
|
-
children: ge === "expanded" && /* @__PURE__ */
|
|
3662
|
+
children: ge === "expanded" && /* @__PURE__ */ r(
|
|
3656
3663
|
di,
|
|
3657
3664
|
{
|
|
3658
3665
|
position: x,
|
|
@@ -3730,7 +3737,7 @@ const Wi = /* @__PURE__ */ new Set([
|
|
|
3730
3737
|
"data-display-mode": ge,
|
|
3731
3738
|
"data-position": x,
|
|
3732
3739
|
children: [
|
|
3733
|
-
ge === "hidden" && /* @__PURE__ */
|
|
3740
|
+
ge === "hidden" && /* @__PURE__ */ r(
|
|
3734
3741
|
ei,
|
|
3735
3742
|
{
|
|
3736
3743
|
position: x,
|
|
@@ -3743,7 +3750,7 @@ const Wi = /* @__PURE__ */ new Set([
|
|
|
3743
3750
|
containerEl: V
|
|
3744
3751
|
}
|
|
3745
3752
|
),
|
|
3746
|
-
ge === "minimized" && /* @__PURE__ */
|
|
3753
|
+
ge === "minimized" && /* @__PURE__ */ r(
|
|
3747
3754
|
ni,
|
|
3748
3755
|
{
|
|
3749
3756
|
position: x,
|
|
@@ -3768,22 +3775,22 @@ const Wi = /* @__PURE__ */ new Set([
|
|
|
3768
3775
|
}
|
|
3769
3776
|
);
|
|
3770
3777
|
qn.displayName = "AvatarWidgetInner";
|
|
3771
|
-
const
|
|
3772
|
-
function(t,
|
|
3773
|
-
return /* @__PURE__ */
|
|
3778
|
+
const qi = jt(
|
|
3779
|
+
function(t, n) {
|
|
3780
|
+
return /* @__PURE__ */ r(mr, { children: /* @__PURE__ */ r(qn, { ...t, ref: n }) });
|
|
3774
3781
|
}
|
|
3775
3782
|
);
|
|
3776
|
-
|
|
3777
|
-
const
|
|
3783
|
+
qi.displayName = "AvatarWidget";
|
|
3784
|
+
const eo = ({
|
|
3778
3785
|
agentId: e,
|
|
3779
3786
|
baseUrl: t,
|
|
3780
|
-
apiKey:
|
|
3787
|
+
apiKey: n,
|
|
3781
3788
|
mode: i,
|
|
3782
3789
|
onAgentEvent: a,
|
|
3783
|
-
className:
|
|
3784
|
-
style:
|
|
3790
|
+
className: l,
|
|
3791
|
+
style: s
|
|
3785
3792
|
}) => {
|
|
3786
|
-
const
|
|
3793
|
+
const o = I(null), c = I(null), u = I(a);
|
|
3787
3794
|
u.current = a;
|
|
3788
3795
|
const b = C((p) => {
|
|
3789
3796
|
var P;
|
|
@@ -3791,37 +3798,37 @@ const Qi = ({
|
|
|
3791
3798
|
(P = u.current) == null || P.call(u, h);
|
|
3792
3799
|
}, []);
|
|
3793
3800
|
return T(() => {
|
|
3794
|
-
const p =
|
|
3801
|
+
const p = o.current;
|
|
3795
3802
|
if (!p) return;
|
|
3796
3803
|
const h = document.createElement("livelayer-widget");
|
|
3797
|
-
return h.setAttribute("agent-id", e), t && h.setAttribute("base-url", t),
|
|
3798
|
-
h.removeEventListener("agent-event", b), p.removeChild(h),
|
|
3804
|
+
return h.setAttribute("agent-id", e), t && h.setAttribute("base-url", t), n && h.setAttribute("api-key", n), i && h.setAttribute("mode", i), h.addEventListener("agent-event", b), p.appendChild(h), c.current = h, () => {
|
|
3805
|
+
h.removeEventListener("agent-event", b), p.removeChild(h), c.current = null;
|
|
3799
3806
|
};
|
|
3800
3807
|
}, [e]), T(() => {
|
|
3801
|
-
|
|
3802
|
-
}, [i]), /* @__PURE__ */
|
|
3803
|
-
},
|
|
3804
|
-
function({ id: t, intent:
|
|
3808
|
+
c.current && (i ? c.current.setAttribute("mode", i) : c.current.removeAttribute("mode"));
|
|
3809
|
+
}, [i]), /* @__PURE__ */ r("div", { ref: o, className: l, style: s });
|
|
3810
|
+
}, to = jt(
|
|
3811
|
+
function({ id: t, intent: n, as: i = "div", className: a, style: l, children: s }, o) {
|
|
3805
3812
|
return ur(
|
|
3806
3813
|
i,
|
|
3807
3814
|
{
|
|
3808
|
-
ref:
|
|
3815
|
+
ref: o,
|
|
3809
3816
|
"data-ll-region": t,
|
|
3810
|
-
"data-ll-intent":
|
|
3817
|
+
"data-ll-intent": n,
|
|
3811
3818
|
className: a,
|
|
3812
|
-
style:
|
|
3819
|
+
style: l
|
|
3813
3820
|
},
|
|
3814
|
-
|
|
3821
|
+
s
|
|
3815
3822
|
);
|
|
3816
3823
|
}
|
|
3817
3824
|
);
|
|
3818
|
-
function
|
|
3819
|
-
const { onFieldUpdate: t, onComplete:
|
|
3825
|
+
function no(e = {}) {
|
|
3826
|
+
const { onFieldUpdate: t, onComplete: n, source: i = "all" } = e, [a, l] = M({}), [s, o] = M(!1), [c, u] = M(null), b = I(t), p = I(n), h = I(i);
|
|
3820
3827
|
T(() => {
|
|
3821
|
-
b.current = t, p.current =
|
|
3822
|
-
}, [t,
|
|
3828
|
+
b.current = t, p.current = n, h.current = i;
|
|
3829
|
+
}, [t, n, i]);
|
|
3823
3830
|
const P = C(() => {
|
|
3824
|
-
|
|
3831
|
+
l({}), o(!1);
|
|
3825
3832
|
}, []);
|
|
3826
3833
|
return T(() => {
|
|
3827
3834
|
if (typeof window > "u") return;
|
|
@@ -3832,7 +3839,7 @@ function to(e = {}) {
|
|
|
3832
3839
|
if (g.phase === "field") {
|
|
3833
3840
|
if (h.current !== "all" && g.source !== h.current)
|
|
3834
3841
|
return;
|
|
3835
|
-
|
|
3842
|
+
o(!0), l(
|
|
3836
3843
|
(S) => S[g.fieldName] === g.value ? S : { ...S, [g.fieldName]: g.value }
|
|
3837
3844
|
);
|
|
3838
3845
|
try {
|
|
@@ -3846,7 +3853,7 @@ function to(e = {}) {
|
|
|
3846
3853
|
const S = g.result;
|
|
3847
3854
|
if (h.current !== "all" && S.source !== h.current)
|
|
3848
3855
|
return;
|
|
3849
|
-
u(S),
|
|
3856
|
+
u(S), o(!1);
|
|
3850
3857
|
try {
|
|
3851
3858
|
(R = p.current) == null || R.call(p, S);
|
|
3852
3859
|
} catch (y) {
|
|
@@ -3856,27 +3863,27 @@ function to(e = {}) {
|
|
|
3856
3863
|
}
|
|
3857
3864
|
};
|
|
3858
3865
|
return document.addEventListener("ll-collected", x), () => document.removeEventListener("ll-collected", x);
|
|
3859
|
-
}, []), { fields: a, isCollecting:
|
|
3866
|
+
}, []), { fields: a, isCollecting: s, lastResult: c, reset: P };
|
|
3860
3867
|
}
|
|
3861
3868
|
let Rn = 1;
|
|
3862
|
-
function
|
|
3869
|
+
function ro({
|
|
3863
3870
|
onMount: e,
|
|
3864
3871
|
defaultOpen: t = !1,
|
|
3865
|
-
storageKey:
|
|
3872
|
+
storageKey: n = "ll-debug-open"
|
|
3866
3873
|
}) {
|
|
3867
|
-
const [i, a] = M(t), [
|
|
3874
|
+
const [i, a] = M(t), [l, s] = M([]), [o, c] = M(""), [u, b] = M(!1), p = I(/* @__PURE__ */ new Set()), h = I([]), P = I(u);
|
|
3868
3875
|
P.current = u, T(() => {
|
|
3869
3876
|
try {
|
|
3870
|
-
const g = localStorage.getItem(
|
|
3877
|
+
const g = localStorage.getItem(n);
|
|
3871
3878
|
g === "1" && a(!0), g === "0" && a(!1);
|
|
3872
3879
|
} catch {
|
|
3873
3880
|
}
|
|
3874
|
-
}, [
|
|
3881
|
+
}, [n]), T(() => {
|
|
3875
3882
|
try {
|
|
3876
|
-
localStorage.setItem(
|
|
3883
|
+
localStorage.setItem(n, i ? "1" : "0");
|
|
3877
3884
|
} catch {
|
|
3878
3885
|
}
|
|
3879
|
-
}, [i,
|
|
3886
|
+
}, [i, n]), T(() => {
|
|
3880
3887
|
const g = (w) => {
|
|
3881
3888
|
(w.metaKey || w.ctrlKey) && w.shiftKey && w.key.toLowerCase() === "l" && (w.preventDefault(), a((R) => !R));
|
|
3882
3889
|
};
|
|
@@ -3885,7 +3892,7 @@ function no({
|
|
|
3885
3892
|
const g = setInterval(() => {
|
|
3886
3893
|
if (h.current.length === 0 || P.current) return;
|
|
3887
3894
|
const w = h.current.splice(0, h.current.length);
|
|
3888
|
-
|
|
3895
|
+
s(
|
|
3889
3896
|
(R) => [...w.reverse(), ...R].slice(0, 200)
|
|
3890
3897
|
);
|
|
3891
3898
|
}, 100);
|
|
@@ -3911,7 +3918,7 @@ function no({
|
|
|
3911
3918
|
ts: Date.now(),
|
|
3912
3919
|
kind: S,
|
|
3913
3920
|
type: m.slice(0, 120),
|
|
3914
|
-
data: { args: O.slice(1).map((D) =>
|
|
3921
|
+
data: { args: O.slice(1).map((D) => ji(D)) }
|
|
3915
3922
|
});
|
|
3916
3923
|
} catch {
|
|
3917
3924
|
}
|
|
@@ -3921,7 +3928,7 @@ function no({
|
|
|
3921
3928
|
console.warn = g, console.log = w;
|
|
3922
3929
|
};
|
|
3923
3930
|
}, []), !i)
|
|
3924
|
-
return /* @__PURE__ */
|
|
3931
|
+
return /* @__PURE__ */ r(
|
|
3925
3932
|
"button",
|
|
3926
3933
|
{
|
|
3927
3934
|
type: "button",
|
|
@@ -3947,9 +3954,9 @@ function no({
|
|
|
3947
3954
|
children: "🛰 LL debug"
|
|
3948
3955
|
}
|
|
3949
3956
|
);
|
|
3950
|
-
const E =
|
|
3951
|
-
if (!
|
|
3952
|
-
const w =
|
|
3957
|
+
const E = l.filter((g) => {
|
|
3958
|
+
if (!o) return !0;
|
|
3959
|
+
const w = o.toLowerCase();
|
|
3953
3960
|
return g.type.toLowerCase().includes(w) || JSON.stringify(g.data || {}).toLowerCase().includes(w);
|
|
3954
3961
|
});
|
|
3955
3962
|
return /* @__PURE__ */ k(
|
|
@@ -3986,14 +3993,14 @@ function no({
|
|
|
3986
3993
|
gap: 8
|
|
3987
3994
|
},
|
|
3988
3995
|
children: [
|
|
3989
|
-
/* @__PURE__ */
|
|
3996
|
+
/* @__PURE__ */ r("span", { style: { fontWeight: 600, fontSize: 12 }, children: "LiveLayer debug" }),
|
|
3990
3997
|
/* @__PURE__ */ k("span", { style: { fontSize: 10, color: "rgba(255,255,255,0.4)" }, children: [
|
|
3991
|
-
|
|
3998
|
+
l.length,
|
|
3992
3999
|
" event",
|
|
3993
|
-
|
|
4000
|
+
l.length === 1 ? "" : "s"
|
|
3994
4001
|
] }),
|
|
3995
|
-
/* @__PURE__ */
|
|
3996
|
-
/* @__PURE__ */
|
|
4002
|
+
/* @__PURE__ */ r("span", { style: { flex: 1 } }),
|
|
4003
|
+
/* @__PURE__ */ r(
|
|
3997
4004
|
"button",
|
|
3998
4005
|
{
|
|
3999
4006
|
type: "button",
|
|
@@ -4003,19 +4010,19 @@ function no({
|
|
|
4003
4010
|
children: u ? "▶ resume" : "⏸ pause"
|
|
4004
4011
|
}
|
|
4005
4012
|
),
|
|
4006
|
-
/* @__PURE__ */
|
|
4013
|
+
/* @__PURE__ */ r(
|
|
4007
4014
|
"button",
|
|
4008
4015
|
{
|
|
4009
4016
|
type: "button",
|
|
4010
4017
|
onClick: () => {
|
|
4011
|
-
|
|
4018
|
+
s([]), h.current = [];
|
|
4012
4019
|
},
|
|
4013
4020
|
style: qt("transparent"),
|
|
4014
4021
|
title: "Clear buffer",
|
|
4015
4022
|
children: "clear"
|
|
4016
4023
|
}
|
|
4017
4024
|
),
|
|
4018
|
-
/* @__PURE__ */
|
|
4025
|
+
/* @__PURE__ */ r(
|
|
4019
4026
|
"button",
|
|
4020
4027
|
{
|
|
4021
4028
|
type: "button",
|
|
@@ -4029,12 +4036,12 @@ function no({
|
|
|
4029
4036
|
]
|
|
4030
4037
|
}
|
|
4031
4038
|
),
|
|
4032
|
-
/* @__PURE__ */
|
|
4039
|
+
/* @__PURE__ */ r(
|
|
4033
4040
|
"input",
|
|
4034
4041
|
{
|
|
4035
4042
|
type: "text",
|
|
4036
|
-
value:
|
|
4037
|
-
onChange: (g) =>
|
|
4043
|
+
value: o,
|
|
4044
|
+
onChange: (g) => c(g.target.value),
|
|
4038
4045
|
placeholder: "filter by type or data…",
|
|
4039
4046
|
style: {
|
|
4040
4047
|
margin: 8,
|
|
@@ -4048,7 +4055,7 @@ function no({
|
|
|
4048
4055
|
}
|
|
4049
4056
|
}
|
|
4050
4057
|
),
|
|
4051
|
-
/* @__PURE__ */
|
|
4058
|
+
/* @__PURE__ */ r(
|
|
4052
4059
|
"div",
|
|
4053
4060
|
{
|
|
4054
4061
|
style: {
|
|
@@ -4067,7 +4074,7 @@ function no({
|
|
|
4067
4074
|
},
|
|
4068
4075
|
children: [
|
|
4069
4076
|
"No events yet. Connect to the agent and trigger a tool call — the events will stream in here. You can also dispatch commands manually in DevTools:",
|
|
4070
|
-
/* @__PURE__ */
|
|
4077
|
+
/* @__PURE__ */ r(
|
|
4071
4078
|
"pre",
|
|
4072
4079
|
{
|
|
4073
4080
|
style: {
|
|
@@ -4086,13 +4093,13 @@ function no({
|
|
|
4086
4093
|
)
|
|
4087
4094
|
]
|
|
4088
4095
|
}
|
|
4089
|
-
) : E.map((g) => /* @__PURE__ */
|
|
4090
|
-
|
|
4096
|
+
) : E.map((g) => /* @__PURE__ */ r(
|
|
4097
|
+
Ui,
|
|
4091
4098
|
{
|
|
4092
4099
|
entry: g,
|
|
4093
4100
|
expanded: p.current.has(g.id),
|
|
4094
4101
|
onToggle: () => {
|
|
4095
|
-
p.current.has(g.id) ? p.current.delete(g.id) : p.current.add(g.id),
|
|
4102
|
+
p.current.has(g.id) ? p.current.delete(g.id) : p.current.add(g.id), s((w) => [...w]);
|
|
4096
4103
|
}
|
|
4097
4104
|
},
|
|
4098
4105
|
g.id
|
|
@@ -4103,10 +4110,10 @@ function no({
|
|
|
4103
4110
|
}
|
|
4104
4111
|
);
|
|
4105
4112
|
}
|
|
4106
|
-
function
|
|
4113
|
+
function Ui({
|
|
4107
4114
|
entry: e,
|
|
4108
4115
|
expanded: t,
|
|
4109
|
-
onToggle:
|
|
4116
|
+
onToggle: n
|
|
4110
4117
|
}) {
|
|
4111
4118
|
const i = e.kind === "warn" ? "#f59e0b" : e.type.startsWith("[LiveLayer]") ? "#94a3b8" : e.type === "navigate" || e.type === "scroll_page" || e.type === "scroll_to" || e.type === "click" ? "#22c55e" : e.type === "fill_form" || e.type === "submit_form" || e.type === "focus_field" ? "#a78bfa" : e.type === "request_page_context" || e.type === "request_routes" ? "#38bdf8" : e.type === "agent_state" ? "#facc15" : "#cbd5e1", a = new Date(e.ts).toLocaleTimeString("en-US", {
|
|
4112
4119
|
hour12: !1
|
|
@@ -4115,7 +4122,7 @@ function qi({
|
|
|
4115
4122
|
"button",
|
|
4116
4123
|
{
|
|
4117
4124
|
type: "button",
|
|
4118
|
-
onClick:
|
|
4125
|
+
onClick: n,
|
|
4119
4126
|
style: {
|
|
4120
4127
|
textAlign: "left",
|
|
4121
4128
|
background: "transparent",
|
|
@@ -4130,7 +4137,7 @@ function qi({
|
|
|
4130
4137
|
},
|
|
4131
4138
|
children: [
|
|
4132
4139
|
/* @__PURE__ */ k("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
|
|
4133
|
-
/* @__PURE__ */
|
|
4140
|
+
/* @__PURE__ */ r(
|
|
4134
4141
|
"span",
|
|
4135
4142
|
{
|
|
4136
4143
|
style: {
|
|
@@ -4141,7 +4148,7 @@ function qi({
|
|
|
4141
4148
|
children: a
|
|
4142
4149
|
}
|
|
4143
4150
|
),
|
|
4144
|
-
/* @__PURE__ */
|
|
4151
|
+
/* @__PURE__ */ r(
|
|
4145
4152
|
"span",
|
|
4146
4153
|
{
|
|
4147
4154
|
style: {
|
|
@@ -4153,7 +4160,7 @@ function qi({
|
|
|
4153
4160
|
}
|
|
4154
4161
|
)
|
|
4155
4162
|
] }),
|
|
4156
|
-
t && e.data && /* @__PURE__ */
|
|
4163
|
+
t && e.data && /* @__PURE__ */ r(
|
|
4157
4164
|
"pre",
|
|
4158
4165
|
{
|
|
4159
4166
|
style: {
|
|
@@ -4184,62 +4191,62 @@ function qt(e) {
|
|
|
4184
4191
|
cursor: "pointer"
|
|
4185
4192
|
};
|
|
4186
4193
|
}
|
|
4187
|
-
function
|
|
4194
|
+
function ji(e) {
|
|
4188
4195
|
try {
|
|
4189
4196
|
return e instanceof Error ? { message: e.message, stack: e.stack } : (JSON.stringify(e), e);
|
|
4190
4197
|
} catch {
|
|
4191
4198
|
return String(e);
|
|
4192
4199
|
}
|
|
4193
4200
|
}
|
|
4194
|
-
function
|
|
4201
|
+
function Vi(e) {
|
|
4195
4202
|
const t = JSON.stringify(e);
|
|
4196
4203
|
T(() => fr(e), [t]);
|
|
4197
4204
|
}
|
|
4198
|
-
function
|
|
4199
|
-
return
|
|
4205
|
+
function io({ fields: e, children: t }) {
|
|
4206
|
+
return Vi(e), /* @__PURE__ */ r(Fe, { children: t });
|
|
4200
4207
|
}
|
|
4201
|
-
function
|
|
4202
|
-
const [e, t] = M([]),
|
|
4203
|
-
t((
|
|
4204
|
-
const
|
|
4205
|
-
if (
|
|
4206
|
-
const
|
|
4207
|
-
return
|
|
4208
|
+
function oo() {
|
|
4209
|
+
const [e, t] = M([]), n = C((a) => {
|
|
4210
|
+
t((l) => {
|
|
4211
|
+
const s = l.findIndex((o) => o.id === a.id);
|
|
4212
|
+
if (s >= 0) {
|
|
4213
|
+
const o = l.slice();
|
|
4214
|
+
return o[s] = a, o;
|
|
4208
4215
|
}
|
|
4209
|
-
return [...
|
|
4216
|
+
return [...l, a];
|
|
4210
4217
|
});
|
|
4211
4218
|
}, []), i = C(() => t([]), []);
|
|
4212
4219
|
return {
|
|
4213
4220
|
entries: e,
|
|
4214
|
-
pushSegment:
|
|
4221
|
+
pushSegment: n,
|
|
4215
4222
|
clear: i,
|
|
4216
4223
|
latest: e.length > 0 ? e[e.length - 1] : null
|
|
4217
4224
|
};
|
|
4218
4225
|
}
|
|
4219
4226
|
export {
|
|
4220
|
-
|
|
4227
|
+
qi as AvatarWidget,
|
|
4221
4228
|
mr as ErrorBoundary,
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
+
io as FieldProvider,
|
|
4230
|
+
ro as LiveLayerDebugPanel,
|
|
4231
|
+
to as LiveLayerRegion,
|
|
4232
|
+
eo as LiveLayerWidget,
|
|
4233
|
+
so as clearFieldRegistry,
|
|
4234
|
+
ki as clearPageContextCache,
|
|
4235
|
+
Ii as clearRoutesCache,
|
|
4229
4236
|
Li as extractPageContext,
|
|
4230
|
-
|
|
4237
|
+
Ai as extractRoutes,
|
|
4231
4238
|
En as getCachedPageContext,
|
|
4232
4239
|
Bt as getCachedRoutes,
|
|
4233
|
-
|
|
4240
|
+
co as getRegisteredFields,
|
|
4234
4241
|
Ur as matchesPattern,
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4242
|
+
Ei as normalizeRouteInput,
|
|
4243
|
+
uo as registerFields,
|
|
4244
|
+
fo as setFieldValue,
|
|
4238
4245
|
jr as shouldRenderAtPath,
|
|
4239
4246
|
Cr as useAgentInfo,
|
|
4240
4247
|
yr as useAudioLevel,
|
|
4241
4248
|
_r as useCameraState,
|
|
4242
|
-
|
|
4249
|
+
no as useCollect,
|
|
4243
4250
|
Sr as useDisplayMode,
|
|
4244
4251
|
Ar as useDisplayModePersistence,
|
|
4245
4252
|
Ir as useIsMobile,
|
|
@@ -4247,8 +4254,8 @@ export {
|
|
|
4247
4254
|
Lr as useMediaDevices,
|
|
4248
4255
|
br as useMicrophoneState,
|
|
4249
4256
|
Or as usePathname,
|
|
4250
|
-
|
|
4257
|
+
Vi as useRegisterFields,
|
|
4251
4258
|
Vr as useRouteMatch,
|
|
4252
4259
|
xr as useScreenShareState,
|
|
4253
|
-
|
|
4260
|
+
oo as useTranscript
|
|
4254
4261
|
};
|