@livelayer/react 0.21.2 → 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.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  "use client";
2
- import { jsxs as k, jsx as n, Fragment as Fe } from "react/jsx-runtime";
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 ao, getRegisteredFields as so, registerFields as co, setFieldValue as uo } from "@livelayer/sdk";
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, r) {
17
+ componentDidCatch(t, n) {
18
18
  var i, a;
19
- (a = (i = this.props).onError) == null || a.call(i, t, r);
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__ */ n("p", { className: "ll-error-boundary__title", children: "Widget crashed" }),
25
- /* @__PURE__ */ n("p", { className: "ll-error-boundary__message", children: ((t = this.state.error) == null ? void 0 : t.message) || "Something went wrong." }),
26
- /* @__PURE__ */ n(
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, r] = M("idle"), [i, a] = M("idle"), [o, c] = M([]), [l, s] = 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);
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
- r(W), W === "connected" && g(null);
43
+ n(W), W === "connected" && g(null);
44
44
  },
45
45
  onAgentStateChange: a,
46
- onTranscript: (W) => c([...W]),
47
- onAgentConfig: s,
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, r("idle"), a("idle"), c([]), s(null), b(null), h(null), x(!1), g(null), () => {
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: o,
97
- agentConfig: l,
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()), r = I(null), i = I(/* @__PURE__ */ new Set()), a = C(() => {
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
- r.current = null;
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
- r.current = requestAnimationFrame(a);
130
- }, []), o = C(() => e.current ? e.current : typeof window > "u" || typeof AudioContext > "u" ? null : (e.current = new AudioContext(), e.current), []), c = C(() => {
131
- r.current === null && t.current.size > 0 && (r.current = requestAnimationFrame(a));
132
- }, [a]), l = C((x) => {
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
- }, []), s = C(
145
+ }, []), c = C(
146
146
  (x, E) => {
147
- const g = o();
147
+ const g = l();
148
148
  if (!g) return;
149
- l(x);
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
- }), c();
164
+ }), s();
165
165
  },
166
- [l, o, c]
166
+ [o, l, s]
167
167
  ), u = C(
168
168
  (x, E = "agent") => {
169
- s(E, (g) => {
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
- [s]
181
+ [c]
182
182
  ), b = C(
183
183
  (x, E = "mic") => {
184
- s(E, (g) => {
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
- [s]
196
+ [c]
197
197
  ), p = C(
198
198
  (x) => {
199
- l(x), t.current.size === 0 && r.current !== null && (cancelAnimationFrame(r.current), r.current = null);
199
+ o(x), t.current.size === 0 && n.current !== null && (cancelAnimationFrame(n.current), n.current = null);
200
200
  },
201
- [l]
201
+ [o]
202
202
  ), h = C(() => {
203
- r.current !== null && (cancelAnimationFrame(r.current), r.current = null);
203
+ n.current !== null && (cancelAnimationFrame(n.current), n.current = null);
204
204
  for (const x of Array.from(t.current.keys()))
205
- l(x);
206
- }, [l]), P = C((x) => (i.current.add(x), () => {
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, r = e.agentState ?? null, [i, a] = M(t), [o, c] = M(""), [l, s] = M(null), u = I(null), b = I(null), p = I({
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, s(null);
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 && c(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 s(D), m;
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), c(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 || r !== "listening") return;
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
- }, [r]);
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), c("");
288
- }, [t]), w = C(() => s(null), []), R = C(() => vr(u.current), []);
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: o,
292
- micError: l,
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), [r, i] = M(null), [a, o] = M(null), [c, l] = M(""), s = I(null), u = I(null), b = C((w) => {
305
- s.current = w;
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 = s.current, R = u.current;
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, o(null), t(!1);
320
+ u.current = null, l(null), t(!1);
321
321
  }, []), h = C(async (w) => {
322
- const R = s.current;
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
- o(O), t(!0), w && l(w);
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(c || void 0);
346
- }, [e, c, p, h]), x = C(async (w) => {
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(), s.current = null, i(null), l("");
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: r,
355
+ error: n,
356
356
  previewEl: a,
357
- activeDeviceId: c,
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), [r, i] = M(null), [a, o] = M(null), c = I(null), l = C((h) => {
367
- c.current = h;
368
- }, []), s = C(() => o(null), []), u = C(async () => {
369
- const h = c.current;
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
- s(), t(!1);
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
- o(g), t(!0);
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, s]), b = C(() => {
406
- const h = c.current;
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
- s(), t(!1), i(null), c.current = null;
413
- }, [e, s]), p = C(() => i(null), []);
414
- return { isEnabled: e, error: r, previewEl: a, toggle: u, attachRoom: l, teardown: b, clearError: p };
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([]), [r, i] = M([]), a = C(async () => {
417
+ const [e, t] = M([]), [n, i] = M([]), a = C(async () => {
418
418
  if (!(typeof navigator > "u" || !navigator.mediaDevices))
419
419
  try {
420
- const o = await navigator.mediaDevices.enumerateDevices();
421
- t(o.filter((c) => c.kind === "audioinput")), i(o.filter((c) => c.kind === "videoinput"));
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 o = () => void a();
428
- return navigator.mediaDevices.addEventListener("devicechange", o), () => navigator.mediaDevices.removeEventListener("devicechange", o);
429
- }, [a]), { mics: e, cameras: r, refresh: a };
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, r = !1) {
432
- const [i, a] = M(null), [o, c] = M(null), [l, s] = M(!r && !!e);
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 (r || !e) {
435
- s(!1);
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 s(!0), c(null), fetch(`${b}/api/widget/agent/${encodeURIComponent(e)}`, {
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), s(!1));
448
+ u.signal.aborted || (a(p), c(!1));
449
449
  }).catch((p) => {
450
- u.signal.aborted || (c(p instanceof Error ? p.message : "Agent lookup failed"), s(!1));
450
+ u.signal.aborted || (s(p instanceof Error ? p.message : "Agent lookup failed"), c(!1));
451
451
  }), () => u.abort();
452
- }, [e, t, r]), { info: i, error: o, loading: l };
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: r
479
+ onChange: n
480
480
  } = {}) {
481
- const i = e !== void 0, [a, o] = M(t), c = i ? e : a, l = C(
482
- (s) => {
483
- s !== c && (i || o(s), r == null || r(s));
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
- [c, i, r]
485
+ [s, i, n]
486
486
  );
487
- return [c, l];
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: r,
496
+ onChange: n,
497
497
  persistKey: i = "ll-widget",
498
498
  disablePersistence: a = !1
499
499
  } = {}) {
500
- const o = `${i}:display-mode`, c = I(!1), [l, s] = Sr({
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(o, u), r == null || r(u);
504
+ e === void 0 && !a && zn(l, u), n == null || n(u);
505
505
  }
506
506
  });
507
507
  return T(() => {
508
- if (c.current || (c.current = !0, a || e !== void 0)) return;
509
- const u = Nr(Dn(o));
510
- u && u !== l && s(u);
511
- }, []), [l, s];
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, r] = M(!1);
515
+ const [t, n] = M(!1);
516
516
  return T(() => {
517
517
  if (e === !1) {
518
- r(!1);
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), o = () => r(a.matches);
524
- return o(), typeof a.addEventListener == "function" ? (a.addEventListener("change", o), () => a.removeEventListener("change", o)) : (a.addListener(o), () => {
525
- a.removeListener(o);
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 r = t, { top: i, left: a, width: o, height: c } = r;
543
- return typeof i != "number" || typeof a != "number" || typeof o != "number" || typeof c != "number" || !Number.isFinite(i) || !Number.isFinite(a) || !Number.isFinite(o) || !Number.isFinite(c) ? null : { top: i, left: a, width: o, height: c };
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, r) {
549
- const { minWidth: i, minHeight: a, edgeMargin: o, vw: c, vh: l } = r, s = Math.max(i, c - o * 2), u = Math.max(a, l - o * 2);
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(s, e)),
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, r, i, a) {
556
- const { edgeMargin: o, vw: c, vh: l } = a, s = o, u = o, b = Math.max(s, c - r - o), p = Math.max(u, l - i - o);
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(s, Math.min(b, t))
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: r,
565
+ resizable: n,
566
566
  persistKey: i,
567
567
  disablePersistence: a,
568
- minWidth: o = Rr,
569
- minHeight: c = Tr,
570
- edgeMargin: l = Pr
571
- } = e, [s, 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 = s;
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: o,
585
- minHeight: c,
586
- edgeMargin: l,
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: l,
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: o,
602
- minHeight: c,
603
- edgeMargin: l,
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: l,
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
- }, [o, c, l]);
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: l, vw: X, vh: ee }
657
+ { edgeMargin: o, vw: X, vh: ee }
658
658
  );
659
659
  u({ ...V, width: N.width, height: N.height });
660
660
  },
661
- [l]
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 (!r || f.pointerType === "mouse" && f.button !== 0) return;
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
- [r]
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 - l, te = ee - N.top - l, oe = Ft(N.startWidth + z, N.startHeight + q, {
708
- minWidth: o,
709
- minHeight: c,
710
- edgeMargin: l,
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 + l),
714
- vh: Math.min(ee, N.top + te + l)
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
- [l, o, c]
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: s === null ? {} : {
732
+ style: c === null ? {} : {
733
733
  position: "fixed",
734
- top: `${s.top}px`,
735
- left: `${s.left}px`,
734
+ top: `${c.top}px`,
735
+ left: `${c.left}px`,
736
736
  right: "auto",
737
737
  bottom: "auto",
738
- width: `${s.width}px`,
739
- height: `${s.height}px`
738
+ width: `${c.width}px`,
739
+ height: `${c.height}px`
740
740
  },
741
- hasGeometry: s !== null,
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": r ? "" : void 0
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(...r) {
767
- const i = e.apply(this, r);
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(...r) {
770
- const i = t.apply(this, r);
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, r] = M(
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 = () => r(pn());
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 r = e.length > 1 && e.endsWith("/") ? e.slice(0, -1) : e, i = "", a = "", o = r.replace(/\*\*/g, i).replace(/\*/g, a), l = Wr(o).replace(new RegExp(`\\/${i}`, "g"), "(?:\\/.*)?").replace(new RegExp(i, "g"), ".*").replace(new RegExp(a, "g"), "[^/]+"), s = new RegExp(`^${l}\\/?$`);
798
- return hn.set(e, s), s;
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 r = t.length > 1 && t.endsWith("/") ? t.slice(0, -1) : t;
802
- return Br(e).test(r);
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 r of e)
810
- if (Ur(r, t)) return !0;
809
+ for (const n of e)
810
+ if (Ur(n, t)) return !0;
811
811
  return !1;
812
812
  }
813
- function jr(e, t, r) {
814
- return e === void 0 ? !0 : mn(r, e) ? !1 : t && t.length > 0 ? mn(t, e) : !0;
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, r) {
816
+ function Vr(e, t, n) {
817
817
  return et(
818
- () => jr(e, t, r),
819
- [e, t, r]
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]), r = e.baseUrl.replace(/\/+$/, ""), i = I(null), a = C(
831
- (s) => {
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(`${r}${s}`).play().catch(() => {
833
+ new Audio(`${n}${c}`).play().catch(() => {
834
834
  });
835
835
  } catch {
836
836
  }
837
837
  },
838
- [r]
839
- ), o = C(() => {
838
+ [n]
839
+ ), l = C(() => {
840
840
  t.navigate && a("/audio/page-change-sound.mp3");
841
- }, [t.navigate, a]), c = C(() => {
841
+ }, [t.navigate, a]), s = C(() => {
842
842
  t.action && a("/audio/confirmation-sound.mp3");
843
- }, [t.action, a]), l = C(
844
- (s) => {
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 (s) {
855
+ if (c) {
856
856
  if (i.current) return;
857
857
  try {
858
- const u = new Audio(`${r}/audio/thinking-sound.mp3`);
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
- [r, t.thinking]
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: o, playConfirmation: c, setThinking: l }),
884
- [o, c, l]
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__ */ n(
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__ */ n(
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__ */ n(
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__ */ n(
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__ */ n(
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__ */ n(
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__ */ n(
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__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
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__ */ n(
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__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 6l6 6-6 6" })
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: r,
1005
+ isSpeaking: n,
1006
1006
  onExpand: i,
1007
1007
  label: a = "Open widget",
1008
- avatarImageUrl: o,
1009
- agentName: c,
1010
- containerEl: l
1008
+ avatarImageUrl: l,
1009
+ agentName: s,
1010
+ containerEl: o
1011
1011
  }) => {
1012
- const s = Jr(e), u = s === "right" ? "left" : "right", b = t ? 80 : 72, p = !!o, h = !!l, [P, x] = M(null), [E, g] = M(!1), w = I(null), R = I(!1), S = C(
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--${s}`,
1088
+ `ll-hidden--${c}`,
1089
1089
  t ? "ll-hidden--mobile" : "ll-hidden--desktop",
1090
- r ? "ll-hidden--speaking" : null,
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__ */ n(
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__ */ n(
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__ */ n(
1122
+ /* @__PURE__ */ r(
1123
1123
  "img",
1124
1124
  {
1125
- src: o,
1126
- alt: c ? `${c} avatar` : "Agent avatar",
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__ */ n(
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: r = 20,
1144
+ maxHeight: n = 20,
1145
1145
  minHeight: i = 4,
1146
1146
  className: a,
1147
- barClassName: o
1147
+ barClassName: l
1148
1148
  }) => {
1149
- const c = I(null), l = I([]), s = et(() => {
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 = l.current[h];
1155
+ const P = o.current[h];
1156
1156
  if (!P) continue;
1157
- const x = Math.max(i, p * r * s[h]);
1157
+ const x = Math.max(i, p * n * c[h]);
1158
1158
  P.style.height = `${x}px`;
1159
1159
  }
1160
- }), [e, t, r, i, s]);
1160
+ }), [e, t, n, i, c]);
1161
1161
  const u = ["ll-waveform", a].filter(Boolean).join(" ");
1162
- return /* @__PURE__ */ n("div", { ref: c, className: u, "aria-hidden": "true", children: Array.from({ length: t }, (b, p) => /* @__PURE__ */ n(
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
- l.current[p] = h;
1166
+ o.current[p] = h;
1167
1167
  },
1168
- className: ["ll-waveform__bar", o].filter(Boolean).join(" "),
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: r,
1176
+ agentName: n,
1177
1177
  avatarImageUrl: i,
1178
1178
  agentState: a,
1179
- isMuted: o,
1180
- audioLevel: c,
1181
- onExpand: l,
1182
- onToggleMute: s,
1179
+ isMuted: l,
1180
+ audioLevel: s,
1181
+ onExpand: o,
1182
+ onToggleMute: c,
1183
1183
  onClose: u
1184
- }) => t ? /* @__PURE__ */ n(
1184
+ }) => t ? /* @__PURE__ */ r(
1185
1185
  "div",
1186
1186
  {
1187
1187
  className: "ll-minimized ll-minimized--mobile",
1188
1188
  role: "region",
1189
- "aria-label": `${r} widget`,
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: l,
1196
- "aria-label": `Expand ${r} widget`,
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__ */ n(
1200
+ /* @__PURE__ */ r(
1201
1201
  "img",
1202
1202
  {
1203
1203
  src: i,
1204
- alt: r,
1204
+ alt: n,
1205
1205
  className: "ll-minimized__avatar"
1206
1206
  }
1207
1207
  )
1208
- ) : /* @__PURE__ */ n("div", { className: "ll-minimized__avatar ll-minimized__avatar--placeholder" }),
1209
- /* @__PURE__ */ n(
1208
+ ) : /* @__PURE__ */ r("div", { className: "ll-minimized__avatar ll-minimized__avatar--placeholder" }),
1209
+ /* @__PURE__ */ r(
1210
1210
  ti,
1211
1211
  {
1212
- audioLevel: c,
1212
+ audioLevel: s,
1213
1213
  bars: 16,
1214
1214
  maxHeight: 18,
1215
1215
  className: "ll-minimized__waveform"
1216
1216
  }
1217
1217
  ),
1218
- /* @__PURE__ */ n("span", { className: "ll-minimized__name", children: r }),
1218
+ /* @__PURE__ */ r("span", { className: "ll-minimized__name", children: n }),
1219
1219
  /* @__PURE__ */ k("div", { className: "ll-minimized__controls", children: [
1220
- /* @__PURE__ */ n(
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(), s();
1227
+ b.stopPropagation(), c();
1228
1228
  },
1229
1229
  onKeyDown: (b) => {
1230
- (b.key === "Enter" || b.key === " ") && (b.stopPropagation(), b.preventDefault(), s());
1230
+ (b.key === "Enter" || b.key === " ") && (b.stopPropagation(), b.preventDefault(), c());
1231
1231
  },
1232
- "aria-label": o ? "Unmute microphone" : "Mute microphone",
1233
- children: /* @__PURE__ */ n(gn, { muted: o, className: "ll-minimized__icon" })
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__ */ n(yn, { className: "ll-minimized__icon ll-minimized__icon--expand" })
1236
+ /* @__PURE__ */ r(yn, { className: "ll-minimized__icon ll-minimized__icon--expand" })
1237
1237
  ] })
1238
1238
  ]
1239
1239
  }
1240
1240
  )
1241
1241
  }
1242
- ) : /* @__PURE__ */ n(
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": `${r} widget`,
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__ */ n(
1252
+ /* @__PURE__ */ r(
1253
1253
  "img",
1254
1254
  {
1255
1255
  src: i,
1256
- alt: r,
1256
+ alt: n,
1257
1257
  className: "ll-minimized__avatar"
1258
1258
  }
1259
1259
  )
1260
- ) : /* @__PURE__ */ n("div", { className: "ll-minimized__avatar ll-minimized__avatar--placeholder" }),
1260
+ ) : /* @__PURE__ */ r("div", { className: "ll-minimized__avatar ll-minimized__avatar--placeholder" }),
1261
1261
  /* @__PURE__ */ k("div", { className: "ll-minimized__meta", children: [
1262
- /* @__PURE__ */ n("span", { className: "ll-minimized__name", children: r }),
1263
- /* @__PURE__ */ n("span", { className: "ll-minimized__state", children: a === "speaking" ? "Speaking" : a === "thinking" ? "Thinking" : "Listening" })
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__ */ n(
1266
+ /* @__PURE__ */ r(
1267
1267
  "button",
1268
1268
  {
1269
1269
  type: "button",
1270
1270
  className: "ll-minimized__btn",
1271
- onClick: s,
1272
- "aria-label": o ? "Unmute microphone" : "Mute microphone",
1273
- children: /* @__PURE__ */ n(gn, { muted: o, className: "ll-minimized__icon" })
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__ */ n(
1276
+ /* @__PURE__ */ r(
1277
1277
  "button",
1278
1278
  {
1279
1279
  type: "button",
1280
1280
  className: "ll-minimized__btn",
1281
- onClick: l,
1282
- "aria-label": `Expand ${r} widget`,
1283
- children: /* @__PURE__ */ n(yn, { className: "ll-minimized__icon" })
1281
+ onClick: o,
1282
+ "aria-label": `Expand ${n} widget`,
1283
+ children: /* @__PURE__ */ r(yn, { className: "ll-minimized__icon" })
1284
1284
  }
1285
1285
  ),
1286
- /* @__PURE__ */ n(
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__ */ n(Xr, { className: "ll-minimized__icon" })
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: r = !1,
1302
+ preCannedPlaying: n = !1,
1303
1303
  className: i,
1304
1304
  style: a
1305
1305
  }) => {
1306
- const [o, c] = M(!1), l = I(e);
1306
+ const [l, s] = M(!1), o = I(e);
1307
1307
  if (T(() => {
1308
- l.current !== e && (l.current = e, c(!1));
1308
+ o.current !== e && (o.current = e, s(!1));
1309
1309
  }, [e]), !e) return null;
1310
- const s = {
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: r ? "scale(1.02)" : "scale(1)",
1319
- opacity: o ? 1 : 0,
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__ */ n(
1324
+ /* @__PURE__ */ r(
1325
1325
  "img",
1326
1326
  {
1327
1327
  src: e,
1328
1328
  alt: t,
1329
1329
  className: i,
1330
- style: s,
1330
+ style: c,
1331
1331
  loading: "eager",
1332
1332
  fetchPriority: "high",
1333
- onLoad: () => c(!0)
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: r = ii
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__ */ n(
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: r
1358
+ fill: n
1359
1359
  }
1360
1360
  ),
1361
- /* @__PURE__ */ n(
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: r
1365
+ fill: n
1366
1366
  }
1367
1367
  ),
1368
- /* @__PURE__ */ n(
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: r
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: r,
1382
+ anchorRef: n,
1383
1383
  children: i
1384
1384
  }) => {
1385
- const a = I(null), [o, c] = M(null);
1385
+ const a = I(null), [l, s] = M(null);
1386
1386
  return Tn(() => {
1387
1387
  if (!e) {
1388
- c(null);
1388
+ s(null);
1389
1389
  return;
1390
1390
  }
1391
- const l = r.current;
1392
- if (!l) return;
1393
- const s = () => {
1394
- const u = l.getBoundingClientRect(), b = {
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), c(b);
1398
+ b.left < p && (b.left = p), b.left > h && (b.left = h), s(b);
1399
1399
  };
1400
- return s(), window.addEventListener("scroll", s, !0), window.addEventListener("resize", s), () => {
1401
- window.removeEventListener("scroll", s, !0), window.removeEventListener("resize", s);
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, r]), T(() => {
1403
+ }, [e, n]), T(() => {
1404
1404
  if (!e) return;
1405
- const l = (u) => {
1406
- const b = u.target, p = a.current, h = r.current;
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
- }, s = (u) => {
1408
+ }, c = (u) => {
1409
1409
  u.key === "Escape" && (u.stopPropagation(), t());
1410
1410
  };
1411
- return document.addEventListener("mousedown", l), document.addEventListener("keydown", s), () => {
1412
- document.removeEventListener("mousedown", l), document.removeEventListener("keydown", s);
1411
+ return document.addEventListener("mousedown", o), document.addEventListener("keydown", c), () => {
1412
+ document.removeEventListener("mousedown", o), document.removeEventListener("keydown", c);
1413
1413
  };
1414
- }, [e, t, r]), !e || o === null || typeof document > "u" ? null : Vt(
1415
- /* @__PURE__ */ n(
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: o.top,
1426
- left: o.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: r,
1437
+ isCameraEnabled: n,
1438
1438
  onToggleCamera: i,
1439
1439
  allowCamera: a,
1440
- isScreenShareEnabled: o,
1441
- onToggleScreenShare: c,
1442
- allowScreenShare: l,
1443
- isSpeakerMuted: s,
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__ */ n(
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__ */ n(Fn, { muted: e })
1466
+ children: /* @__PURE__ */ r(Fn, { muted: e })
1467
1467
  }
1468
1468
  ),
1469
- /* @__PURE__ */ n(
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__ */ n(ci, {})
1479
+ children: /* @__PURE__ */ r(ci, {})
1480
1480
  }
1481
1481
  ),
1482
- /* @__PURE__ */ n(
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__ */ n(Bn, {})
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 ${r ? "is-on" : ""}`,
1506
+ className: `ll-overflow-popover__item ${n ? "is-on" : ""}`,
1507
1507
  onClick: () => {
1508
1508
  i(), E(!1);
1509
1509
  },
1510
1510
  children: [
1511
- /* @__PURE__ */ n(On, {}),
1512
- /* @__PURE__ */ n("span", { children: r ? "Stop camera" : "Start camera" })
1511
+ /* @__PURE__ */ r(On, {}),
1512
+ /* @__PURE__ */ r("span", { children: n ? "Stop camera" : "Start camera" })
1513
1513
  ]
1514
1514
  }
1515
1515
  ),
1516
- l && /* @__PURE__ */ k(
1516
+ o && /* @__PURE__ */ k(
1517
1517
  "button",
1518
1518
  {
1519
1519
  type: "button",
1520
- className: `ll-overflow-popover__item ${o ? "is-on" : ""}`,
1520
+ className: `ll-overflow-popover__item ${l ? "is-on" : ""}`,
1521
1521
  onClick: () => {
1522
- c(), E(!1);
1522
+ s(), E(!1);
1523
1523
  },
1524
1524
  children: [
1525
- /* @__PURE__ */ n(Hn, {}),
1526
- /* @__PURE__ */ n("span", { children: o ? "Stop sharing" : "Share screen" })
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 ${s ? "is-on" : ""}`,
1534
+ className: `ll-overflow-popover__item ${c ? "is-on" : ""}`,
1535
1535
  onClick: () => {
1536
1536
  u(), E(!1);
1537
1537
  },
1538
1538
  children: [
1539
- /* @__PURE__ */ n(Wn, { muted: s }),
1540
- /* @__PURE__ */ n("span", { children: s ? "Unmute speaker" : "Mute speaker" })
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__ */ n(ui, {}),
1554
- /* @__PURE__ */ n("span", { children: p ? "Hide typing" : "Type a message" })
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__ */ n("span", { className: "ll-overflow-popover__lang-code", children: "EN" }),
1567
- /* @__PURE__ */ n("span", { children: "English" })
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__ */ n("circle", { cx: "6", cy: "12", r: "1.5" }),
1587
- /* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "1.5" }),
1588
- /* @__PURE__ */ n("circle", { cx: "18", cy: "12", r: "1.5" })
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__ */ n(
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__ */ n("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
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: r,
1613
+ agentName: n,
1614
1614
  avatarImageUrl: i,
1615
1615
  idleLoopUrl: a,
1616
- greeting: o,
1617
- branding: c,
1618
- teamMembers: l,
1619
- currentTeamMemberId: s,
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 = ((l == null ? void 0 : l.length) ?? 0) > 1, Ue = E === "connecting" || E === "connected", we = E === "connected", gt = E === "idle" || E === "disconnected" || E === "error", [He, Ne] = M(!1);
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 = c.productName || "Live Layer", Se = !c.productName;
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 : o || null, Ye = we && (xe == null ? void 0 : xe.text) || null, lt = [
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": `${r} widget`,
1745
+ "aria-label": `${n} widget`,
1746
1746
  children: [
1747
1747
  /* @__PURE__ */ k("div", { className: "ll-expanded__bg", children: [
1748
- i ? /* @__PURE__ */ n(
1748
+ i ? /* @__PURE__ */ r(
1749
1749
  ri,
1750
1750
  {
1751
1751
  src: i,
1752
- alt: r,
1752
+ alt: n,
1753
1753
  className: "ll-expanded__bg-img"
1754
1754
  }
1755
- ) : /* @__PURE__ */ n("div", { className: "ll-expanded__bg-fallback", children: /* @__PURE__ */ n("span", { className: "ll-expanded__bg-initial", children: ((at = r == null ? void 0 : r.charAt(0)) == null ? void 0 : at.toUpperCase()) || "A" }) }),
1756
- a && !we && /* @__PURE__ */ n(
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__ */ n("div", { ref: be, className: "ll-expanded__video" }),
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__ */ n("div", { className: "ll-expanded__spinner" }),
1771
- /* @__PURE__ */ n("p", { className: "ll-expanded__overlay-text", children: u ? "Switching..." : "Connecting..." })
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__ */ n("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": !0, children: /* @__PURE__ */ n("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__ */ n("p", { className: "ll-expanded__overlay-text", children: "Tap to enable audio" })
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__ */ n("div", { className: "ll-expanded__spinner" }),
1794
- /* @__PURE__ */ n("p", { className: "ll-expanded__overlay-text", children: Q })
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__ */ n("span", { className: "ll-hpill__label", children: r }),
1814
- $e && /* @__PURE__ */ n(kt, {})
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__ */ n(
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: l == null ? void 0 : l.map((_) => /* @__PURE__ */ k(
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 === s ? "is-active" : ""}`,
1828
+ className: `ll-hmenu__item ${_.id === c ? "is-active" : ""}`,
1829
1829
  onClick: () => h(_.id),
1830
1830
  role: "option",
1831
- "aria-selected": _.id === s,
1831
+ "aria-selected": _.id === c,
1832
1832
  children: [
1833
- _.avatarImageUrl && /* @__PURE__ */ n(
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__ */ n("span", { className: "ll-hmenu__name", children: _.name }),
1842
- _.role && /* @__PURE__ */ n("span", { className: "ll-hmenu__role", children: _.role })
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__ */ n("span", { className: "ll-hpill__label", children: "EN" }),
1865
- /* @__PURE__ */ n(kt, {})
1864
+ /* @__PURE__ */ r("span", { className: "ll-hpill__label", children: "EN" }),
1865
+ /* @__PURE__ */ r(kt, {})
1866
1866
  ]
1867
1867
  }
1868
1868
  ),
1869
- P && /* @__PURE__ */ n(
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__ */ n(
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__ */ n("span", { className: "ll-hmenu__name", children: "English" })
1882
+ children: /* @__PURE__ */ r("span", { className: "ll-hmenu__name", children: "English" })
1883
1883
  }
1884
1884
  )
1885
1885
  }
1886
1886
  )
1887
1887
  ] }),
1888
- /* @__PURE__ */ n(
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__ */ n(
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__ */ n(Ln, {})
1905
+ children: /* @__PURE__ */ r(Ln, {})
1906
1906
  }
1907
1907
  ),
1908
- te !== !1 && /* @__PURE__ */ n(
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__ */ n(xn, {})
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__ */ n("span", { className: "ll-compact-status__dot", "aria-hidden": !0 }),
1923
- /* @__PURE__ */ n("span", { className: "ll-compact-status__label", children: g })
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__ */ n(oi, { size: 14, className: "ll-expanded__brand-mark" }),
1946
- /* @__PURE__ */ n("span", { children: Me })
1945
+ /* @__PURE__ */ r(oi, { size: 14, className: "ll-expanded__brand-mark" }),
1946
+ /* @__PURE__ */ r("span", { children: Me })
1947
1947
  ]
1948
1948
  }
1949
- ) : /* @__PURE__ */ n("span", { className: "ll-expanded__brand", children: Me })),
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__ */ n(
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__ */ n(Ln, {})
1958
+ children: /* @__PURE__ */ r(Ln, {})
1959
1959
  }
1960
1960
  ),
1961
- te !== !1 && /* @__PURE__ */ n(
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__ */ n(xn, {})
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__ */ n("div", { className: "ll-expanded__play-circle", children: /* @__PURE__ */ n("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": !0, children: /* @__PURE__ */ n("polygon", { points: "6 3 20 12 6 21 6 3" }) }) }),
1986
- U && /* @__PURE__ */ n("span", { className: "ll-expanded__play-label", children: _ })
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
- o && /* @__PURE__ */ n("div", { className: "ll-expanded__transcript", children: /* @__PURE__ */ n("p", { className: "ll-expanded__transcript-text", children: o }) }),
1992
- /* @__PURE__ */ n(
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__ */ n(
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__ */ n(
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__ */ n(
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__ */ n("p", { className: "ll-expanded__transcript-text", children: bt })
2033
+ children: /* @__PURE__ */ r("p", { className: "ll-expanded__transcript-text", children: bt })
2034
2034
  }
2035
2035
  ),
2036
- !U && Ye && /* @__PURE__ */ n(
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__ */ n("p", { className: "ll-expanded__transcript-text", children: Ye })
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__ */ n(
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__ */ n(Hn, {})
2053
+ children: /* @__PURE__ */ r(Hn, {})
2054
2054
  }
2055
2055
  ),
2056
2056
  q && /* @__PURE__ */ k("div", { className: "ll-tool-split", children: [
2057
- /* @__PURE__ */ n(
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__ */ n(On, {})
2065
+ children: /* @__PURE__ */ r(On, {})
2066
2066
  }
2067
2067
  ),
2068
- /* @__PURE__ */ n(
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__ */ n(kt, {})
2080
+ children: /* @__PURE__ */ r(kt, {})
2081
2081
  }
2082
2082
  ),
2083
- je && $.length > 0 && /* @__PURE__ */ n(
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__ */ n(
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__ */ n(Fn, { muted: O })
2105
+ children: /* @__PURE__ */ r(Fn, { muted: O })
2106
2106
  }
2107
2107
  ),
2108
- /* @__PURE__ */ n(
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__ */ n(kt, {})
2120
+ children: /* @__PURE__ */ r(kt, {})
2121
2121
  }
2122
2122
  ),
2123
- le && D.length > 0 && /* @__PURE__ */ n(
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__ */ n(
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__ */ n(Wn, { muted: z })
2144
+ children: /* @__PURE__ */ r(Wn, { muted: z })
2145
2145
  }
2146
2146
  ),
2147
- /* @__PURE__ */ n(
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__ */ n(Bn, {})
2155
+ children: /* @__PURE__ */ r(Bn, {})
2156
2156
  }
2157
2157
  )
2158
2158
  ] }),
2159
- !oe && U && /* @__PURE__ */ n(
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__ */ n(
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__ */ n(
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__ */ n(fi, {})
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__ */ n("span", { children: m }),
2205
- /* @__PURE__ */ n(
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__ */ n("span", { children: _ }),
2220
- /* @__PURE__ */ n(
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__ */ n(
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__ */ n("line", { x1: "11", y1: "4", x2: "4", y2: "11" }),
2239
- /* @__PURE__ */ n("line", { x1: "11", y1: "8", x2: "8", y2: "11" })
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__ */ n("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": !0, children: /* @__PURE__ */ n("polyline", { points: "6 9 12 15 18 9" }) });
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__ */ n("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
2253
- /* @__PURE__ */ n("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
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__ */ n("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", "aria-hidden": !0, children: /* @__PURE__ */ n("line", { x1: "5", y1: "12", x2: "19", y2: "12" }) });
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__ */ n("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2" }),
2262
- /* @__PURE__ */ n("line", { x1: "8", y1: "21", x2: "16", y2: "21" }),
2263
- /* @__PURE__ */ n("line", { x1: "12", y1: "17", x2: "12", y2: "21" })
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__ */ n("path", { d: "M23 7l-7 5 7 5V7z" }),
2269
- /* @__PURE__ */ n("rect", { x: "1", y: "5", width: "15", height: "14", rx: "2" })
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__ */ n("path", { d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" }),
2275
- /* @__PURE__ */ n("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }),
2276
- /* @__PURE__ */ n("line", { x1: "12", y1: "19", x2: "12", y2: "23" }),
2277
- e && /* @__PURE__ */ n("line", { x1: "1", y1: "1", x2: "23", y2: "23" })
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__ */ n("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
2283
- e ? /* @__PURE__ */ n("line", { x1: "23", y1: "9", x2: "17", y2: "15" }) : /* @__PURE__ */ k(Fe, { children: [
2284
- /* @__PURE__ */ n("path", { d: "M19.07 4.93a10 10 0 0 1 0 14.14" }),
2285
- /* @__PURE__ */ n("path", { d: "M15.54 8.46a5 5 0 0 1 0 7.07" })
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__ */ n("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
2292
- /* @__PURE__ */ n("polyline", { points: "12 5 19 12 12 19" })
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__ */ n("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__ */ n(
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: r,
2307
+ activeId: n,
2308
2308
  onPick: i,
2309
2309
  anchorRef: a
2310
2310
  }) => {
2311
- const [o, c] = M(null);
2311
+ const [l, s] = M(null);
2312
2312
  return Tn(() => {
2313
- const l = () => {
2314
- const s = a.current;
2315
- if (!s) return;
2316
- const u = s.getBoundingClientRect(), b = 126, p = window.innerWidth - 16 - 110, h = u.left + u.width / 2;
2317
- c({
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 l(), window.addEventListener("scroll", l, !0), window.addEventListener("resize", l), () => {
2323
- window.removeEventListener("scroll", l, !0), window.removeEventListener("resize", l);
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]), o === null || typeof document > "u" ? null : Vt(
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: (l) => l.stopPropagation(),
2330
+ onClick: (o) => o.stopPropagation(),
2331
2331
  role: "listbox",
2332
2332
  style: {
2333
2333
  position: "fixed",
2334
- top: o.top,
2335
- left: o.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__ */ n("p", { className: "ll-device-menu__label", children: e }),
2341
- t.map((l, s) => {
2342
- const u = r === l.deviceId;
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(l.deviceId),
2348
+ onClick: () => i(o.deviceId),
2349
2349
  role: "option",
2350
2350
  "aria-selected": u,
2351
2351
  children: [
2352
- u && /* @__PURE__ */ n("span", { className: "ll-device-menu__dot", children: "●" }),
2353
- /* @__PURE__ */ n("span", { className: "ll-device-menu__name", children: l.label || `${e} ${s + 1}` })
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
- l.deviceId || s
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 r of pi)
2376
- if (t.matches(r)) return !0;
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 r of wi)
2403
- if (t.matches(r)) return !0;
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 r = window.innerHeight || document.documentElement.clientHeight, i = window.innerWidth || document.documentElement.clientWidth;
2413
- return t.bottom > 0 && t.right > 0 && t.top < r && t.left < i;
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 o = typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(t) : t.replace(/"/g, '\\"'), c = document.querySelector(`label[for="${o}"]`);
2419
- if (c != null && c.textContent) return c.textContent.trim();
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 r = e.getAttribute("aria-label");
2422
- if (r) return r.trim();
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 o = [];
2426
- for (const l of Array.from(i.childNodes))
2427
- if (l.nodeType === Node.TEXT_NODE) {
2428
- const s = (l.textContent || "").trim();
2429
- s && o.push(s);
2430
- } else if (l instanceof HTMLElement) {
2431
- if (l instanceof HTMLInputElement || l instanceof HTMLTextAreaElement || l instanceof HTMLSelectElement || l instanceof HTMLButtonElement)
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 s = (l.textContent || "").trim();
2434
- s && o.push(s);
2433
+ const c = (o.textContent || "").trim();
2434
+ c && l.push(c);
2435
2435
  }
2436
- const c = o.join(" ").trim();
2437
- if (c) return c;
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 r = e.getAttribute("aria-labelledby");
2452
- if (r) {
2453
- const o = document.getElementById(r);
2454
- if (o != null && o.textContent) return o.textContent.trim().slice(0, 80);
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 o = i instanceof HTMLInputElement ? i.value : (i.textContent ?? "").trim();
2461
- if (o && o.length < 60 && !/^(submit|ok|continue)$/i.test(o))
2462
- return o;
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 o = 0; a && o < 4; o++, a = a.parentElement) {
2466
- const c = a.querySelector("h1, h2, h3, h4");
2467
- if (c != null && c.textContent) {
2468
- const l = c.textContent.trim();
2469
- if (l && l.length < 80) return l;
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 r = t.doc ?? (typeof document < "u" ? document : null);
2479
- if (!r)
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 || "/", o = r.title || "", c = Array.from(
2492
- r.querySelectorAll("[data-ll-region]")
2493
- ), l = [];
2494
- for (const m of c) {
2495
- if (l.length >= gi) break;
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 || l.push({ id: D, intent: W, text: K });
2501
+ !D || !K || o.push({ id: D, intent: W, text: K });
2502
2502
  }
2503
- const s = [], u = ["H1", "H2", "H3", "H4", "H5", "H6"], b = Array.from(
2504
- r.querySelectorAll("h1, h2, h3, h4, h5, h6")
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 && s.push(`${m.tagName}: ${fe(D, 200)}`);
2509
+ D && c.push(`${m.tagName}: ${fe(D, 200)}`);
2510
2510
  }
2511
- const p = Array.from(r.querySelectorAll("p, li"));
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 && s.push(fe(D, kn));
2515
+ D.length > 10 && c.push(fe(D, kn));
2516
2516
  }
2517
- const h = s.join(`
2518
- `), P = [], x = Array.from(r.querySelectorAll("a[href]"));
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
- r.querySelectorAll(
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(r.querySelectorAll("form")), R = [];
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: o,
2606
+ title: l,
2607
2607
  pathname: a,
2608
- regions: l,
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 r = Date.now(), a = `${typeof window < "u" && window.location.pathname || "/"}::${typeof window < "u" ? window.scrollY : 0}`;
2625
- if (Ze && Ze.key === a && r - Ze.at < 1e3)
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: a, at: r, ctx: o }, o;
2635
+ return Ze = { key: s, at: n, ctx: o }, o;
2629
2636
  }
2630
- function Ci() {
2637
+ function ki() {
2631
2638
  Ze = null;
2632
2639
  }
2633
- const ki = 200;
2634
- function Si(e) {
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 Ei(e) {
2651
+ function Ni(e) {
2645
2652
  return !(!e || e.startsWith("#") || e.startsWith("javascript:") || e.startsWith("mailto:") || e.startsWith("tel:"));
2646
2653
  }
2647
- function Ni(e) {
2654
+ function Ai(e) {
2648
2655
  const t = e ?? (typeof document < "u" ? document : null);
2649
2656
  if (!t) return [];
2650
- const r = typeof window < "u" && window.location.origin || "", i = /* @__PURE__ */ new Set(), a = [], o = Array.from(t.querySelectorAll("a[href]"));
2651
- for (const c of o) {
2652
- if (a.length >= ki) break;
2653
- if (Yt(c)) continue;
2654
- const l = c.getAttribute("href") || "";
2655
- if (!Ei(l)) continue;
2656
- let s = l, u = !0;
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(l, r);
2660
- u = p.origin === r, u && l.startsWith("http") && (s = p.pathname + p.search + p.hash);
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(s)) continue;
2666
- i.add(s);
2667
- const b = (c.textContent || "").trim().slice(0, 120);
2668
- a.push({ href: s, text: b, internal: u });
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 Ai = 5e3;
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 < Ai)
2683
+ if (Qe && Qe.pathname === t && e - Qe.at < Mi)
2677
2684
  return Qe.routes;
2678
- const r = Ni();
2679
- return Qe = { at: e, pathname: t, routes: r }, r;
2685
+ const n = Ai();
2686
+ return Qe = { at: e, pathname: t, routes: n }, n;
2680
2687
  }
2681
- function Mi() {
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 Ii(e, t) {
2699
+ function Ri(e, t) {
2693
2700
  return e.getAttribute("name") || e.getAttribute("id") || `field_${t}`;
2694
2701
  }
2695
- function Ri(e, t) {
2702
+ function Ti(e, t) {
2696
2703
  if (!t) return null;
2697
2704
  try {
2698
- const o = e.querySelector(
2705
+ const l = e.querySelector(
2699
2706
  `[name="${t.replace(/"/g, '\\"')}"]`
2700
2707
  );
2701
- if (o && Nn(o)) return o;
2708
+ if (l && Nn(l)) return l;
2702
2709
  } catch {
2703
2710
  }
2704
- const r = Array.from(
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 o of r) {
2710
- if (!Nn(o)) continue;
2711
- const c = Ii(o, i);
2712
- let l = c;
2713
- if (a.has(c) && (l = `${c}__${i}`), l === t) return o;
2714
- a.set(c, o), i++;
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 r = Ri(e, t);
2720
- return r ? Ut(r) ? { el: r } : { el: null, reason: "private" } : { el: null, reason: "not_found" };
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 Ti(e, t) {
2723
- const r = e instanceof HTMLInputElement ? HTMLInputElement.prototype : e instanceof HTMLTextAreaElement ? HTMLTextAreaElement.prototype : HTMLSelectElement.prototype, i = Object.getOwnPropertyDescriptor(r, "value"), a = i == null ? void 0 : i.set;
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 Pi(e, t, r = {}) {
2727
- const i = r.triggerInput ?? !0, a = r.triggerChange ?? !0;
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 o = Object.getOwnPropertyDescriptor(
2736
+ const l = Object.getOwnPropertyDescriptor(
2730
2737
  HTMLInputElement.prototype,
2731
2738
  "checked"
2732
- ), c = o == null ? void 0 : o.set, l = t === "true" || t === "1" || t === "on";
2733
- c ? c.call(e, l) : e.checked = l, i && e.dispatchEvent(new Event("input", { bubbles: !0 })), a && e.dispatchEvent(new Event("change", { bubbles: !0 }));
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
- Ti(e, t), i && e.dispatchEvent(new Event("input", { bubbles: !0 })), a && e.dispatchEvent(new Event("change", { bubbles: !0 }));
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 r = t.replace(/"/g, '\\"'), i = (l) => l.closest('[data-ll-private="true"], [data-ll-skip], .ll-widget') !== null;
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 l = e.querySelector(
2749
+ const o = e.querySelector(
2743
2750
  `form#${CSS.escape(t)}`
2744
2751
  );
2745
- if (l && !i(l)) return l;
2752
+ if (o && !i(o)) return o;
2746
2753
  } catch {
2747
2754
  }
2748
2755
  const a = e.querySelector(
2749
- `form[name="${r}"]`
2756
+ `form[name="${n}"]`
2750
2757
  );
2751
2758
  if (a && !i(a)) return a;
2752
- const o = e.querySelector(
2753
- `form[data-ll-intent="${r}"]`
2759
+ const l = e.querySelector(
2760
+ `form[data-ll-intent="${n}"]`
2754
2761
  );
2755
- if (o && !i(o)) return o;
2756
- const c = Array.from(
2762
+ if (l && !i(l)) return l;
2763
+ const s = Array.from(
2757
2764
  e.querySelectorAll("form")
2758
- ).filter((l) => !i(l));
2759
- for (const l of c) {
2760
- const s = l.getAttribute("data-ll-intent");
2761
- if (s && Di(s) === t) return l;
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 l = parseInt(t.slice(5), 10);
2765
- let s = 0;
2766
- for (const u of c)
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 (s === l) return u;
2769
- s++;
2775
+ if (c === o) return u;
2776
+ c++;
2770
2777
  }
2771
2778
  }
2772
- return c.length === 1 ? c[0] : null;
2779
+ return s.length === 1 ? s[0] : null;
2773
2780
  }
2774
- function Di(e) {
2781
+ function zi(e) {
2775
2782
  return e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 60) || null;
2776
2783
  }
2777
- function zi() {
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 $i(e) {
2792
+ function Hi(e) {
2786
2793
  if (!(e instanceof HTMLElement)) return !1;
2787
- const r = window.getComputedStyle(e).overflowY;
2788
- return !(r !== "auto" && r !== "scroll" || e.scrollHeight <= e.clientHeight + 2);
2794
+ const n = window.getComputedStyle(e).overflowY;
2795
+ return !(n !== "auto" && n !== "scroll" || e.scrollHeight <= e.clientHeight + 2);
2789
2796
  }
2790
- function Hi() {
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, r = 0;
2802
+ let t = null, n = 0;
2796
2803
  for (const i of e) {
2797
- if (!$i(i)) continue;
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 o = a.width * a.height;
2801
- o > r && (r = o, t = i);
2807
+ const l = a.width * a.height;
2808
+ l > n && (n = l, t = i);
2802
2809
  }
2803
2810
  return t;
2804
2811
  }
2805
- function Oi() {
2812
+ function Fi() {
2806
2813
  if (typeof window > "u")
2807
2814
  return null;
2808
- if (zi()) return window;
2809
- const e = Hi();
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 Fi(e) {
2816
- var t, r;
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
- ((r = document.documentElement) == null ? void 0 : r.scrollHeight) ?? 0
2826
+ ((n = document.documentElement) == null ? void 0 : n.scrollHeight) ?? 0
2820
2827
  ) : e.scrollHeight - e.clientHeight;
2821
2828
  }
2822
- const Wi = /* @__PURE__ */ new Set([
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, r) {
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: o = "https://app.livelayer.studio",
2859
- sessionEndpoint: c,
2860
- sessionBody: l,
2861
- soundEffects: s,
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
- Ci(), Mi();
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: o, config: s }), _t = I(wt);
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 = Oi(), J = (B) => {
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 : Fi(j));
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
- Pi(Z.el, J);
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(Si).slice(0, 200));
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
- Wi.has(d.type) || qe == null || qe(d);
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: o,
3411
+ baseUrl: l,
3405
3412
  apiKey: a,
3406
- sessionEndpoint: c,
3407
- sessionBody: l,
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
- r,
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, o, Kn);
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__ */ n(
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__ */ n(
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__ */ n(
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__ */ n(
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 Bi = jt(
3772
- function(t, r) {
3773
- return /* @__PURE__ */ n(mr, { children: /* @__PURE__ */ n(qn, { ...t, ref: r }) });
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
- Bi.displayName = "AvatarWidget";
3777
- const Qi = ({
3783
+ qi.displayName = "AvatarWidget";
3784
+ const eo = ({
3778
3785
  agentId: e,
3779
3786
  baseUrl: t,
3780
- apiKey: r,
3787
+ apiKey: n,
3781
3788
  mode: i,
3782
3789
  onAgentEvent: a,
3783
- className: o,
3784
- style: c
3790
+ className: l,
3791
+ style: s
3785
3792
  }) => {
3786
- const l = I(null), s = I(null), u = I(a);
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 = l.current;
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), r && h.setAttribute("api-key", r), i && h.setAttribute("mode", i), h.addEventListener("agent-event", b), p.appendChild(h), s.current = h, () => {
3798
- h.removeEventListener("agent-event", b), p.removeChild(h), s.current = null;
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
- s.current && (i ? s.current.setAttribute("mode", i) : s.current.removeAttribute("mode"));
3802
- }, [i]), /* @__PURE__ */ n("div", { ref: l, className: o, style: c });
3803
- }, eo = jt(
3804
- function({ id: t, intent: r, as: i = "div", className: a, style: o, children: c }, l) {
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: l,
3815
+ ref: o,
3809
3816
  "data-ll-region": t,
3810
- "data-ll-intent": r,
3817
+ "data-ll-intent": n,
3811
3818
  className: a,
3812
- style: o
3819
+ style: l
3813
3820
  },
3814
- c
3821
+ s
3815
3822
  );
3816
3823
  }
3817
3824
  );
3818
- function to(e = {}) {
3819
- const { onFieldUpdate: t, onComplete: r, source: i = "all" } = e, [a, o] = M({}), [c, l] = M(!1), [s, u] = M(null), b = I(t), p = I(r), h = I(i);
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 = r, h.current = i;
3822
- }, [t, r, i]);
3828
+ b.current = t, p.current = n, h.current = i;
3829
+ }, [t, n, i]);
3823
3830
  const P = C(() => {
3824
- o({}), l(!1);
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
- l(!0), o(
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), l(!1);
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: c, lastResult: s, reset: P };
3866
+ }, []), { fields: a, isCollecting: s, lastResult: c, reset: P };
3860
3867
  }
3861
3868
  let Rn = 1;
3862
- function no({
3869
+ function ro({
3863
3870
  onMount: e,
3864
3871
  defaultOpen: t = !1,
3865
- storageKey: r = "ll-debug-open"
3872
+ storageKey: n = "ll-debug-open"
3866
3873
  }) {
3867
- const [i, a] = M(t), [o, c] = M([]), [l, s] = M(""), [u, b] = M(!1), p = I(/* @__PURE__ */ new Set()), h = I([]), P = I(u);
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(r);
3877
+ const g = localStorage.getItem(n);
3871
3878
  g === "1" && a(!0), g === "0" && a(!1);
3872
3879
  } catch {
3873
3880
  }
3874
- }, [r]), T(() => {
3881
+ }, [n]), T(() => {
3875
3882
  try {
3876
- localStorage.setItem(r, i ? "1" : "0");
3883
+ localStorage.setItem(n, i ? "1" : "0");
3877
3884
  } catch {
3878
3885
  }
3879
- }, [i, r]), T(() => {
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
- c(
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) => Ui(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__ */ n(
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 = o.filter((g) => {
3951
- if (!l) return !0;
3952
- const w = l.toLowerCase();
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__ */ n("span", { style: { fontWeight: 600, fontSize: 12 }, children: "LiveLayer debug" }),
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
- o.length,
3998
+ l.length,
3992
3999
  " event",
3993
- o.length === 1 ? "" : "s"
4000
+ l.length === 1 ? "" : "s"
3994
4001
  ] }),
3995
- /* @__PURE__ */ n("span", { style: { flex: 1 } }),
3996
- /* @__PURE__ */ n(
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__ */ n(
4013
+ /* @__PURE__ */ r(
4007
4014
  "button",
4008
4015
  {
4009
4016
  type: "button",
4010
4017
  onClick: () => {
4011
- c([]), h.current = [];
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__ */ n(
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__ */ n(
4039
+ /* @__PURE__ */ r(
4033
4040
  "input",
4034
4041
  {
4035
4042
  type: "text",
4036
- value: l,
4037
- onChange: (g) => s(g.target.value),
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__ */ n(
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__ */ n(
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__ */ n(
4090
- qi,
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), c((w) => [...w]);
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 qi({
4113
+ function Ui({
4107
4114
  entry: e,
4108
4115
  expanded: t,
4109
- onToggle: r
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: r,
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__ */ n(
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__ */ n(
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__ */ n(
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 Ui(e) {
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 ji(e) {
4201
+ function Vi(e) {
4195
4202
  const t = JSON.stringify(e);
4196
4203
  T(() => fr(e), [t]);
4197
4204
  }
4198
- function ro({ fields: e, children: t }) {
4199
- return ji(e), /* @__PURE__ */ n(Fe, { children: t });
4205
+ function io({ fields: e, children: t }) {
4206
+ return Vi(e), /* @__PURE__ */ r(Fe, { children: t });
4200
4207
  }
4201
- function io() {
4202
- const [e, t] = M([]), r = C((a) => {
4203
- t((o) => {
4204
- const c = o.findIndex((l) => l.id === a.id);
4205
- if (c >= 0) {
4206
- const l = o.slice();
4207
- return l[c] = a, l;
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 [...o, a];
4216
+ return [...l, a];
4210
4217
  });
4211
4218
  }, []), i = C(() => t([]), []);
4212
4219
  return {
4213
4220
  entries: e,
4214
- pushSegment: r,
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
- Bi as AvatarWidget,
4227
+ qi as AvatarWidget,
4221
4228
  mr as ErrorBoundary,
4222
- ro as FieldProvider,
4223
- no as LiveLayerDebugPanel,
4224
- eo as LiveLayerRegion,
4225
- Qi as LiveLayerWidget,
4226
- ao as clearFieldRegistry,
4227
- Ci as clearPageContextCache,
4228
- Mi as clearRoutesCache,
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
- Ni as extractRoutes,
4237
+ Ai as extractRoutes,
4231
4238
  En as getCachedPageContext,
4232
4239
  Bt as getCachedRoutes,
4233
- so as getRegisteredFields,
4240
+ co as getRegisteredFields,
4234
4241
  Ur as matchesPattern,
4235
- Si as normalizeRouteInput,
4236
- co as registerFields,
4237
- uo as setFieldValue,
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
- to as useCollect,
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
- ji as useRegisterFields,
4257
+ Vi as useRegisterFields,
4251
4258
  Vr as useRouteMatch,
4252
4259
  xr as useScreenShareState,
4253
- io as useTranscript
4260
+ oo as useTranscript
4254
4261
  };