@livelayer/react 0.22.1 → 0.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import { jsxs as S, jsx as r, Fragment as We } from "react/jsx-runtime";
3
- import { Component as br, useState as M, useRef as T, useEffect as I, useCallback as C, useMemo as it, useLayoutEffect as Un, forwardRef as Qt, useImperativeHandle as wr, createElement as _r } from "react";
4
- import { createPortal as en } from "react-dom";
5
- import { LiveKitSession as xr, registerFields as Lr } from "@livelayer/sdk";
6
- import { clearFieldRegistry as Do, getRegisteredFields as Po, registerFields as zo, setFieldValue as $o } from "@livelayer/sdk";
7
- import { createLocalAudioTrack as Cr, Track as jn, createLocalVideoTrack as kr } from "livekit-client";
8
- class Sr extends br {
2
+ import { jsxs as S, jsx as r, Fragment as Ve } from "react/jsx-runtime";
3
+ import { Component as Sr, useState as M, useRef as T, useEffect as I, useCallback as k, useMemo as at, useLayoutEffect as Qn, forwardRef as on, useImperativeHandle as Er, createElement as Ar } from "react";
4
+ import { createPortal as ln } from "react-dom";
5
+ import { LiveKitSession as Nr, registerFields as Mr } from "@livelayer/sdk";
6
+ import { clearFieldRegistry as Bo, getRegisteredFields as Wo, registerFields as qo, setFieldValue as Uo } from "@livelayer/sdk";
7
+ import { createLocalAudioTrack as Ir, Track as er, createLocalVideoTrack as Tr } from "livekit-client";
8
+ class Rr extends Sr {
9
9
  constructor() {
10
10
  super(...arguments), this.state = { hasError: !1, error: null }, this.reset = () => {
11
11
  this.setState({ hasError: !1, error: null });
@@ -35,9 +35,9 @@ class Sr extends br {
35
35
  ] }) : this.props.children;
36
36
  }
37
37
  }
38
- function Er(e) {
39
- const [t, n] = M("idle"), [i, l] = M("idle"), [o, s] = M([]), [a, c] = M(null), [u, m] = M(null), [p, h] = M(null), [D, _] = M(!1), [k, g] = M(null), w = T(null), R = T(e.onDataMessage);
40
- R.current = e.onDataMessage, I(() => {
38
+ function Dr(e) {
39
+ const [t, n] = M("idle"), [i, l] = M("idle"), [o, s] = M([]), [a, c] = M(null), [u, m] = M(null), [p, h] = M(null), [P, _] = M(!1), [C, g] = M(null), w = T(null), D = T(e.onDataMessage);
40
+ D.current = e.onDataMessage, I(() => {
41
41
  const y = {
42
42
  onConnectionStateChange: (B) => {
43
43
  n(B), B === "connected" && g(null);
@@ -50,11 +50,11 @@ function Er(e) {
50
50
  onVideoTrackRemoved: () => m(null),
51
51
  onError: (B) => g(B),
52
52
  onDataMessage: (B) => {
53
- var K;
54
- (K = R.current) == null || K.call(R, B);
53
+ var J;
54
+ (J = D.current) == null || J.call(D, B);
55
55
  },
56
56
  onResumabilityChange: _
57
- }, z = new xr(
57
+ }, z = new Nr(
58
58
  {
59
59
  agentId: e.agentId,
60
60
  baseUrl: e.baseUrl,
@@ -75,7 +75,7 @@ function Er(e) {
75
75
  e.sessionEndpoint,
76
76
  JSON.stringify(e.sessionBody ?? {})
77
77
  ]);
78
- const E = C(async () => {
78
+ const E = k(async () => {
79
79
  const y = w.current;
80
80
  if (y)
81
81
  try {
@@ -83,10 +83,10 @@ function Er(e) {
83
83
  } catch (z) {
84
84
  throw g(z instanceof Error ? z.message : String(z)), z;
85
85
  }
86
- }, []), v = C(() => {
86
+ }, []), v = k(() => {
87
87
  const y = w.current;
88
88
  y && y.disconnect();
89
- }, []), O = C(() => {
89
+ }, []), O = k(() => {
90
90
  var y;
91
91
  return ((y = w.current) == null ? void 0 : y.getRoom()) ?? null;
92
92
  }, []);
@@ -97,113 +97,113 @@ function Er(e) {
97
97
  agentConfig: a,
98
98
  videoElement: u,
99
99
  audioElement: p,
100
- canResume: D,
101
- error: k,
100
+ canResume: P,
101
+ error: C,
102
102
  connect: E,
103
103
  disconnect: v,
104
104
  getRoom: O,
105
105
  session: w.current
106
106
  };
107
107
  }
108
- function Ar() {
109
- const e = T(null), t = T(/* @__PURE__ */ new Map()), n = T(null), i = T(/* @__PURE__ */ new Set()), l = C(() => {
108
+ function Pr() {
109
+ const e = T(null), t = T(/* @__PURE__ */ new Map()), n = T(null), i = T(/* @__PURE__ */ new Set()), l = k(() => {
110
110
  const _ = t.current;
111
111
  if (_.size === 0) {
112
112
  n.current = null;
113
113
  return;
114
114
  }
115
- let k = 0;
115
+ let C = 0;
116
116
  for (const { analyser: g, buffer: w } of _.values()) {
117
117
  g.getByteFrequencyData(w);
118
- let R = 0;
119
- for (let v = 0; v < w.length; v++) R += w[v];
120
- const E = R / w.length / 255;
121
- E > k && (k = E);
118
+ let D = 0;
119
+ for (let v = 0; v < w.length; v++) D += w[v];
120
+ const E = D / w.length / 255;
121
+ E > C && (C = E);
122
122
  }
123
123
  for (const g of i.current)
124
124
  try {
125
- g(k);
125
+ g(C);
126
126
  } catch (w) {
127
127
  console.error("[useAudioLevel] subscriber threw:", w);
128
128
  }
129
129
  n.current = requestAnimationFrame(l);
130
- }, []), o = C(() => e.current ? e.current : typeof window > "u" || typeof AudioContext > "u" ? null : (e.current = new AudioContext(), e.current), []), s = C(() => {
130
+ }, []), o = k(() => e.current ? e.current : typeof window > "u" || typeof AudioContext > "u" ? null : (e.current = new AudioContext(), e.current), []), s = k(() => {
131
131
  n.current === null && t.current.size > 0 && (n.current = requestAnimationFrame(l));
132
- }, [l]), a = C((_) => {
133
- const k = t.current.get(_);
134
- if (k) {
132
+ }, [l]), a = k((_) => {
133
+ const C = t.current.get(_);
134
+ if (C) {
135
135
  try {
136
- k.node.disconnect();
136
+ C.node.disconnect();
137
137
  } catch {
138
138
  }
139
139
  try {
140
- k.analyser.disconnect();
140
+ C.analyser.disconnect();
141
141
  } catch {
142
142
  }
143
143
  t.current.delete(_);
144
144
  }
145
- }, []), c = C(
146
- (_, k) => {
145
+ }, []), c = k(
146
+ (_, C) => {
147
147
  const g = o();
148
148
  if (!g) return;
149
149
  a(_);
150
- const w = k(g);
150
+ const w = C(g);
151
151
  if (!w) return;
152
- const R = g.createAnalyser();
153
- R.fftSize = 64;
152
+ const D = g.createAnalyser();
153
+ D.fftSize = 64;
154
154
  try {
155
- w.connect(R);
155
+ w.connect(D);
156
156
  } catch (E) {
157
157
  console.warn("[useAudioLevel] connect failed for slot", _, E);
158
158
  return;
159
159
  }
160
160
  t.current.set(_, {
161
- analyser: R,
161
+ analyser: D,
162
162
  node: w,
163
- buffer: new Uint8Array(new ArrayBuffer(R.frequencyBinCount))
163
+ buffer: new Uint8Array(new ArrayBuffer(D.frequencyBinCount))
164
164
  }), s();
165
165
  },
166
166
  [a, o, s]
167
- ), u = C(
168
- (_, k = "agent") => {
169
- c(k, (g) => {
167
+ ), u = k(
168
+ (_, C = "agent") => {
169
+ c(C, (g) => {
170
170
  try {
171
171
  return g.createMediaElementSource(_);
172
172
  } catch (w) {
173
173
  return console.warn(
174
174
  "[useAudioLevel] createMediaElementSource failed for slot",
175
- k,
175
+ C,
176
176
  w
177
177
  ), null;
178
178
  }
179
179
  });
180
180
  },
181
181
  [c]
182
- ), m = C(
183
- (_, k = "mic") => {
184
- c(k, (g) => {
182
+ ), m = k(
183
+ (_, C = "mic") => {
184
+ c(C, (g) => {
185
185
  try {
186
186
  return g.createMediaStreamSource(_);
187
187
  } catch (w) {
188
188
  return console.warn(
189
189
  "[useAudioLevel] createMediaStreamSource failed for slot",
190
- k,
190
+ C,
191
191
  w
192
192
  ), null;
193
193
  }
194
194
  });
195
195
  },
196
196
  [c]
197
- ), p = C(
197
+ ), p = k(
198
198
  (_) => {
199
199
  a(_), t.current.size === 0 && n.current !== null && (cancelAnimationFrame(n.current), n.current = null);
200
200
  },
201
201
  [a]
202
- ), h = C(() => {
202
+ ), h = k(() => {
203
203
  n.current !== null && (cancelAnimationFrame(n.current), n.current = null);
204
204
  for (const _ of Array.from(t.current.keys()))
205
205
  a(_);
206
- }, [a]), D = C((_) => (i.current.add(_), () => {
206
+ }, [a]), P = k((_) => (i.current.add(_), () => {
207
207
  i.current.delete(_);
208
208
  }), []);
209
209
  return I(() => () => {
@@ -215,17 +215,17 @@ function Ar() {
215
215
  e.current = null;
216
216
  }
217
217
  i.current.clear();
218
- }, [h]), { attach: u, attachStream: m, detach: h, detachSlot: p, subscribe: D };
218
+ }, [h]), { attach: u, attachStream: m, detach: h, detachSlot: p, subscribe: P };
219
219
  }
220
- function Nr(e) {
220
+ function zr(e) {
221
221
  const t = e == null ? void 0 : e.mediaStreamTrack;
222
222
  return t ? new MediaStream([t]) : null;
223
223
  }
224
- function Mr(e = {}) {
224
+ function $r(e = {}) {
225
225
  const t = e.gateUntilAgentReady ?? !1, n = e.agentState ?? null, [i, l] = M(t), [o, s] = M(""), [a, c] = M(null), u = T(null), m = T(null), p = T({
226
226
  active: t,
227
227
  lastAutoIntent: null
228
- }), h = C(async (E) => {
228
+ }), h = k(async (E) => {
229
229
  var v, O;
230
230
  if (u.current && m.current) {
231
231
  try {
@@ -236,7 +236,7 @@ function Mr(e = {}) {
236
236
  }
237
237
  m.current = E, c(null);
238
238
  try {
239
- const y = await Cr({
239
+ const y = await Ir({
240
240
  echoCancellation: !0,
241
241
  noiseSuppression: !0
242
242
  });
@@ -247,9 +247,9 @@ function Mr(e = {}) {
247
247
  const z = y instanceof Error && y.name === "NotAllowedError" ? "Enable your microphone to talk with the agent." : "Microphone unavailable. Check browser permissions and try again.";
248
248
  throw c(z), y;
249
249
  }
250
- }, []), D = C((E) => {
250
+ }, []), P = k((E) => {
251
251
  m.current = E;
252
- }, []), _ = C(async (E) => {
252
+ }, []), _ = k(async (E) => {
253
253
  const v = m.current;
254
254
  if (v)
255
255
  try {
@@ -257,7 +257,7 @@ function Mr(e = {}) {
257
257
  } catch (O) {
258
258
  console.warn("[useMicrophoneState] switchDevice failed:", O);
259
259
  }
260
- }, []), k = C(async () => {
260
+ }, []), C = k(async () => {
261
261
  const E = m.current, v = !i;
262
262
  if (l(v), p.current.active = !1, !!E)
263
263
  try {
@@ -275,7 +275,7 @@ function Mr(e = {}) {
275
275
  }
276
276
  v.isMicrophoneEnabled === p.current.lastAutoIntent && (v.setMicrophoneEnabled(!0), p.current.lastAutoIntent = !0, l(!1)), p.current.active = !1;
277
277
  }, [n]);
278
- const g = C(() => {
278
+ const g = k(() => {
279
279
  const E = u.current, v = m.current;
280
280
  if (E && v) {
281
281
  try {
@@ -285,29 +285,29 @@ function Mr(e = {}) {
285
285
  E.stop();
286
286
  }
287
287
  u.current = null, m.current = null, p.current = { active: t, lastAutoIntent: null }, l(t), s("");
288
- }, [t]), w = C(() => c(null), []), R = C(() => Nr(u.current), []);
288
+ }, [t]), w = k(() => c(null), []), D = k(() => zr(u.current), []);
289
289
  return {
290
290
  isMuted: i,
291
291
  activeDeviceId: o,
292
292
  micError: a,
293
- toggleMute: k,
293
+ toggleMute: C,
294
294
  setupMic: h,
295
- attachRoom: D,
295
+ attachRoom: P,
296
296
  switchDevice: _,
297
297
  teardownMic: g,
298
298
  clearError: w,
299
- getMicStream: R
299
+ getMicStream: D
300
300
  };
301
301
  }
302
- const Ir = { resolution: { width: 640, height: 480, frameRate: 24 } };
303
- function Tr() {
304
- const [e, t] = M(!1), [n, i] = M(null), [l, o] = M(null), [s, a] = M(""), c = T(null), u = T(null), m = C((w) => {
302
+ const Hr = { resolution: { width: 640, height: 480, frameRate: 24 } };
303
+ function Or() {
304
+ const [e, t] = M(!1), [n, i] = M(null), [l, o] = M(null), [s, a] = M(""), c = T(null), u = T(null), m = k((w) => {
305
305
  c.current = w;
306
- }, []), p = C(() => {
306
+ }, []), p = k(() => {
307
307
  var E;
308
- const w = c.current, R = u.current;
309
- if (R && w) {
310
- const v = w.localParticipant.getTrackPublication(jn.Source.Camera), y = (v == null ? void 0 : v.track) ?? R;
308
+ const w = c.current, D = u.current;
309
+ if (D && w) {
310
+ const v = w.localParticipant.getTrackPublication(er.Source.Camera), y = (v == null ? void 0 : v.track) ?? D;
311
311
  try {
312
312
  w.localParticipant.unpublishTrack(y);
313
313
  } catch {
@@ -318,19 +318,19 @@ function Tr() {
318
318
  }
319
319
  }
320
320
  u.current = null, o(null), t(!1);
321
- }, []), h = C(async (w) => {
322
- const R = c.current;
323
- if (R) {
321
+ }, []), h = k(async (w) => {
322
+ const D = c.current;
323
+ if (D) {
324
324
  i(null);
325
325
  try {
326
- const E = { ...Ir };
326
+ const E = { ...Hr };
327
327
  w && (E.deviceId = w);
328
- const v = await kr(E);
329
- await R.localParticipant.publishTrack(v), u.current = v;
328
+ const v = await Tr(E);
329
+ await D.localParticipant.publishTrack(v), u.current = v;
330
330
  const O = v.attach();
331
331
  o(O), t(!0), w && a(w);
332
332
  try {
333
- R.localParticipant.publishData(
333
+ D.localParticipant.publishData(
334
334
  new TextEncoder().encode(JSON.stringify({ type: "user_camera_on" })),
335
335
  { reliable: !0 }
336
336
  );
@@ -341,13 +341,13 @@ function Tr() {
341
341
  i(v);
342
342
  }
343
343
  }
344
- }, []), D = C(async () => {
344
+ }, []), P = k(async () => {
345
345
  e ? p() : await h(s || void 0);
346
- }, [e, s, p, h]), _ = C(async (w) => {
346
+ }, [e, s, p, h]), _ = k(async (w) => {
347
347
  p(), await h(w);
348
- }, [p, h]), k = C(() => {
348
+ }, [p, h]), C = k(() => {
349
349
  p(), c.current = null, i(null), a("");
350
- }, [p]), g = C(() => i(null), []);
350
+ }, [p]), g = k(() => i(null), []);
351
351
  return I(() => () => {
352
352
  u.current && u.current.stop();
353
353
  }, []), {
@@ -355,17 +355,17 @@ function Tr() {
355
355
  error: n,
356
356
  previewEl: l,
357
357
  activeDeviceId: s,
358
- toggle: D,
358
+ toggle: P,
359
359
  switchDevice: _,
360
360
  attachRoom: m,
361
- teardown: k,
361
+ teardown: C,
362
362
  clearError: g
363
363
  };
364
364
  }
365
- function Rr() {
366
- const [e, t] = M(!1), [n, i] = M(null), [l, o] = M(null), s = T(null), a = C((h) => {
365
+ function Fr() {
366
+ const [e, t] = M(!1), [n, i] = M(null), [l, o] = M(null), s = T(null), a = k((h) => {
367
367
  s.current = h;
368
- }, []), c = C(() => o(null), []), u = C(async () => {
368
+ }, []), c = k(() => o(null), []), u = k(async () => {
369
369
  const h = s.current;
370
370
  if (h) {
371
371
  if (e) {
@@ -379,11 +379,11 @@ function Rr() {
379
379
  i(null);
380
380
  try {
381
381
  await h.localParticipant.setScreenShareEnabled(!0);
382
- let D = 0;
382
+ let P = 0;
383
383
  const _ = () => {
384
- const k = h.localParticipant.getTrackPublication(jn.Source.ScreenShare);
385
- if (k != null && k.track) {
386
- const g = k.track.attach();
384
+ const C = h.localParticipant.getTrackPublication(er.Source.ScreenShare);
385
+ if (C != null && C.track) {
386
+ const g = C.track.attach();
387
387
  o(g), t(!0);
388
388
  try {
389
389
  h.localParticipant.publishData(
@@ -394,15 +394,15 @@ function Rr() {
394
394
  }
395
395
  return;
396
396
  }
397
- D++ < 10 ? setTimeout(_, 100) : t(!0);
397
+ P++ < 10 ? setTimeout(_, 100) : t(!0);
398
398
  };
399
399
  _();
400
- } catch (D) {
401
- const _ = D instanceof Error ? D.name : "";
400
+ } catch (P) {
401
+ const _ = P instanceof Error ? P.name : "";
402
402
  _ !== "NotAllowedError" && _ !== "AbortError" && i("Screen share unavailable. Try again."), t(!1);
403
403
  }
404
404
  }
405
- }, [e, c]), m = C(() => {
405
+ }, [e, c]), m = k(() => {
406
406
  const h = s.current;
407
407
  if (h && e)
408
408
  try {
@@ -410,11 +410,11 @@ function Rr() {
410
410
  } catch {
411
411
  }
412
412
  c(), t(!1), i(null), s.current = null;
413
- }, [e, c]), p = C(() => i(null), []);
413
+ }, [e, c]), p = k(() => i(null), []);
414
414
  return { isEnabled: e, error: n, previewEl: l, toggle: u, attachRoom: a, teardown: m, clearError: p };
415
415
  }
416
- function Dr() {
417
- const [e, t] = M([]), [n, i] = M([]), l = C(async () => {
416
+ function Br() {
417
+ const [e, t] = M([]), [n, i] = M([]), l = k(async () => {
418
418
  if (!(typeof navigator > "u" || !navigator.mediaDevices))
419
419
  try {
420
420
  const o = await navigator.mediaDevices.enumerateDevices();
@@ -428,7 +428,7 @@ function Dr() {
428
428
  return navigator.mediaDevices.addEventListener("devicechange", o), () => navigator.mediaDevices.removeEventListener("devicechange", o);
429
429
  }, [l]), { mics: e, cameras: n, refresh: l };
430
430
  }
431
- function Pr(e, t, n = !1) {
431
+ function Wr(e, t, n = !1) {
432
432
  const [i, l] = M(null), [o, s] = M(null), [a, c] = M(!n && !!e);
433
433
  return I(() => {
434
434
  if (n || !e) {
@@ -451,7 +451,7 @@ function Pr(e, t, n = !1) {
451
451
  }), () => u.abort();
452
452
  }, [e, t, n]), { info: i, error: o, loading: a };
453
453
  }
454
- function Vn(e) {
454
+ function tr(e) {
455
455
  if (typeof window > "u") return null;
456
456
  try {
457
457
  return window.localStorage.getItem(e);
@@ -459,26 +459,26 @@ function Vn(e) {
459
459
  return null;
460
460
  }
461
461
  }
462
- function Yn(e, t) {
462
+ function nr(e, t) {
463
463
  if (!(typeof window > "u"))
464
464
  try {
465
465
  window.localStorage.setItem(e, t);
466
466
  } catch {
467
467
  }
468
468
  }
469
- function zr(e) {
469
+ function qr(e) {
470
470
  if (!(typeof window > "u"))
471
471
  try {
472
472
  window.localStorage.removeItem(e);
473
473
  } catch {
474
474
  }
475
475
  }
476
- function $r({
476
+ function Ur({
477
477
  value: e,
478
478
  defaultValue: t = "expanded",
479
479
  onChange: n
480
480
  } = {}) {
481
- const i = e !== void 0, [l, o] = M(t), s = i ? e : l, a = C(
481
+ const i = e !== void 0, [l, o] = M(t), s = i ? e : l, a = k(
482
482
  (c) => {
483
483
  c !== s && (i || o(c), n == null || n(c));
484
484
  },
@@ -486,32 +486,32 @@ function $r({
486
486
  );
487
487
  return [s, a];
488
488
  }
489
- const Hr = ["hidden", "minimized", "expanded"];
490
- function Or(e) {
491
- return e && Hr.includes(e) ? e : null;
489
+ const jr = ["hidden", "minimized", "expanded"];
490
+ function Vr(e) {
491
+ return e && jr.includes(e) ? e : null;
492
492
  }
493
- function Fr({
493
+ function Yr({
494
494
  value: e,
495
495
  defaultValue: t = "expanded",
496
496
  onChange: n,
497
497
  persistKey: i = "ll-widget",
498
498
  disablePersistence: l = !1
499
499
  } = {}) {
500
- const o = `${i}:display-mode`, s = T(!1), [a, c] = $r({
500
+ const o = `${i}:display-mode`, s = T(!1), [a, c] = Ur({
501
501
  value: e,
502
502
  defaultValue: t,
503
503
  onChange: (u) => {
504
- e === void 0 && !l && Yn(o, u), n == null || n(u);
504
+ e === void 0 && !l && nr(o, u), n == null || n(u);
505
505
  }
506
506
  });
507
507
  return I(() => {
508
508
  if (s.current || (s.current = !0, l || e !== void 0)) return;
509
- const u = Or(Vn(o));
509
+ const u = Vr(tr(o));
510
510
  u && u !== a && c(u);
511
511
  }, []), [a, c];
512
512
  }
513
- const Br = 640;
514
- function Wr(e = Br) {
513
+ const Gr = 640;
514
+ function Xr(e = Gr) {
515
515
  const [t, n] = M(!1);
516
516
  return I(() => {
517
517
  if (e === !1) {
@@ -526,11 +526,11 @@ function Wr(e = Br) {
526
526
  });
527
527
  }, [e]), t;
528
528
  }
529
- const qr = 280, Ur = 380, jr = 8, Vr = 4;
530
- function jt(e) {
529
+ const Kr = 280, Jr = 380, Zr = 8, Qr = 4;
530
+ function Kt(e) {
531
531
  return `${e}:geometry`;
532
532
  }
533
- function Yr(e) {
533
+ function ei(e) {
534
534
  if (!e) return null;
535
535
  let t;
536
536
  try {
@@ -542,51 +542,51 @@ function Yr(e) {
542
542
  const n = t, { top: i, left: l, width: o, height: s } = n;
543
543
  return typeof i != "number" || typeof l != "number" || typeof o != "number" || typeof s != "number" || !Number.isFinite(i) || !Number.isFinite(l) || !Number.isFinite(o) || !Number.isFinite(s) ? null : { top: i, left: l, width: o, height: s };
544
544
  }
545
- function It() {
545
+ function zt() {
546
546
  return typeof window > "u" ? { vw: 0, vh: 0 } : { vw: window.innerWidth, vh: window.innerHeight };
547
547
  }
548
- function Vt(e, t, n) {
548
+ function Jt(e, t, n) {
549
549
  const { minWidth: i, minHeight: l, edgeMargin: o, vw: s, vh: a } = n, c = Math.max(i, s - o * 2), u = Math.max(l, a - o * 2);
550
550
  return {
551
551
  width: Math.max(i, Math.min(c, e)),
552
552
  height: Math.max(l, Math.min(u, t))
553
553
  };
554
554
  }
555
- function Yt(e, t, n, i, l) {
555
+ function Zt(e, t, n, i, l) {
556
556
  const { edgeMargin: o, vw: s, vh: a } = l, c = o, u = o, m = Math.max(c, s - n - o), p = Math.max(u, a - i - o);
557
557
  return {
558
558
  top: Math.max(u, Math.min(p, e)),
559
559
  left: Math.max(c, Math.min(m, t))
560
560
  };
561
561
  }
562
- function Gr(e) {
562
+ function ti(e) {
563
563
  const {
564
564
  draggable: t,
565
565
  resizable: n,
566
566
  persistKey: i,
567
567
  disablePersistence: l,
568
- minWidth: o = qr,
569
- minHeight: s = Ur,
570
- edgeMargin: a = jr
571
- } = e, [c, u] = M(null), [m, p] = M(!1), [h, D] = M(!1), _ = T(null), k = T(null), g = T(!1), w = T(null);
568
+ minWidth: o = Kr,
569
+ minHeight: s = Jr,
570
+ edgeMargin: a = Zr
571
+ } = e, [c, u] = M(null), [m, p] = M(!1), [h, P] = M(!1), _ = T(null), C = T(null), g = T(!1), w = T(null);
572
572
  w.current = c;
573
- const R = C(
573
+ const D = k(
574
574
  (f) => {
575
- l || (f === null ? zr(jt(i)) : Yn(jt(i), JSON.stringify(f)));
575
+ l || (f === null ? qr(Kt(i)) : nr(Kt(i), JSON.stringify(f)));
576
576
  },
577
577
  [l, i]
578
578
  );
579
579
  I(() => {
580
580
  if (g.current || (g.current = !0, l)) return;
581
- const f = Yr(Vn(jt(i)));
581
+ const f = ei(tr(Kt(i)));
582
582
  if (!f) return;
583
- const { vw: A, vh: $ } = It(), q = Vt(f.width, f.height, {
583
+ const { vw: A, vh: $ } = zt(), q = Jt(f.width, f.height, {
584
584
  minWidth: o,
585
585
  minHeight: s,
586
586
  edgeMargin: a,
587
587
  vw: A,
588
588
  vh: $
589
- }), X = Yt(f.top, f.left, q.width, q.height, {
589
+ }), X = Zt(f.top, f.left, q.width, q.height, {
590
590
  edgeMargin: a,
591
591
  vw: A,
592
592
  vh: $
@@ -597,14 +597,14 @@ function Gr(e) {
597
597
  const f = () => {
598
598
  u((A) => {
599
599
  if (A === null) return null;
600
- const { vw: $, vh: q } = It(), X = Vt(A.width, A.height, {
600
+ const { vw: $, vh: q } = zt(), X = Jt(A.width, A.height, {
601
601
  minWidth: o,
602
602
  minHeight: s,
603
603
  edgeMargin: a,
604
604
  vw: $,
605
605
  vh: q
606
606
  });
607
- return { ...Yt(A.top, A.left, X.width, X.height, {
607
+ return { ...Zt(A.top, A.left, X.width, X.height, {
608
608
  edgeMargin: a,
609
609
  vw: $,
610
610
  vh: q
@@ -613,16 +613,16 @@ function Gr(e) {
613
613
  };
614
614
  return window.addEventListener("resize", f), () => window.removeEventListener("resize", f);
615
615
  }, [o, s, a]);
616
- const E = C(
616
+ const E = k(
617
617
  (f) => {
618
618
  if (!t || f.pointerType === "mouse" && f.button !== 0) return;
619
619
  const A = f.target;
620
620
  if (A && typeof A.closest == "function" && A.closest('button, a, input, select, textarea, [role="listbox"], [role="option"], [data-ll-no-drag]'))
621
621
  return;
622
622
  let $, q, X, ee;
623
- const V = w.current;
624
- if (V)
625
- ({ top: $, left: q, width: X, height: ee } = V);
623
+ const W = w.current;
624
+ if (W)
625
+ ({ top: $, left: q, width: X, height: ee } = W);
626
626
  else {
627
627
  const te = f.currentTarget.closest(".ll-widget"), oe = te == null ? void 0 : te.getBoundingClientRect();
628
628
  if (!oe) return;
@@ -643,23 +643,23 @@ function Gr(e) {
643
643
  };
644
644
  },
645
645
  [t]
646
- ), v = C(
646
+ ), v = k(
647
647
  (f) => {
648
648
  const A = _.current;
649
649
  if (!A) return;
650
650
  const $ = f.clientX - A.startClientX, q = f.clientY - A.startClientY;
651
- if (!A.moved && Math.abs($) + Math.abs(q) > Vr && (A.moved = !0, p(!0)), !A.moved) return;
652
- const { vw: X, vh: ee } = It(), V = Yt(
651
+ if (!A.moved && Math.abs($) + Math.abs(q) > Qr && (A.moved = !0, p(!0)), !A.moved) return;
652
+ const { vw: X, vh: ee } = zt(), W = Zt(
653
653
  A.startTop + q,
654
654
  A.startLeft + $,
655
655
  A.width,
656
656
  A.height,
657
657
  { edgeMargin: a, vw: X, vh: ee }
658
658
  );
659
- u({ ...V, width: A.width, height: A.height });
659
+ u({ ...W, width: A.width, height: A.height });
660
660
  },
661
661
  [a]
662
- ), O = C(
662
+ ), O = k(
663
663
  (f) => {
664
664
  const A = _.current;
665
665
  if (A) {
@@ -667,13 +667,13 @@ function Gr(e) {
667
667
  f.currentTarget.releasePointerCapture(f.pointerId);
668
668
  } catch {
669
669
  }
670
- _.current = null, A.moved && (p(!1), u(($) => ($ && R($), $)));
670
+ _.current = null, A.moved && (p(!1), u(($) => ($ && D($), $)));
671
671
  }
672
672
  },
673
- [R]
674
- ), y = C(() => {
675
- _.current = null, k.current = null, p(!1), D(!1), u(null), R(null);
676
- }, [R]), z = C(
673
+ [D]
674
+ ), y = k(() => {
675
+ _.current = null, C.current = null, p(!1), P(!1), u(null), D(null);
676
+ }, [D]), z = k(
677
677
  (f) => {
678
678
  if (!n || f.pointerType === "mouse" && f.button !== 0) return;
679
679
  f.stopPropagation();
@@ -682,7 +682,7 @@ function Gr(e) {
682
682
  if (ee)
683
683
  ({ top: A, left: $, width: q, height: X } = ee);
684
684
  else {
685
- const V = f.currentTarget.closest(".ll-widget"), te = V == null ? void 0 : V.getBoundingClientRect();
685
+ const W = f.currentTarget.closest(".ll-widget"), te = W == null ? void 0 : W.getBoundingClientRect();
686
686
  if (!te) return;
687
687
  A = te.top, $ = te.left, q = te.width, X = te.height;
688
688
  }
@@ -690,43 +690,43 @@ function Gr(e) {
690
690
  f.currentTarget.setPointerCapture(f.pointerId);
691
691
  } catch {
692
692
  }
693
- k.current = {
693
+ C.current = {
694
694
  startClientX: f.clientX,
695
695
  startClientY: f.clientY,
696
696
  startWidth: q,
697
697
  startHeight: X,
698
698
  top: A,
699
699
  left: $
700
- }, D(!0);
700
+ }, P(!0);
701
701
  },
702
702
  [n]
703
- ), B = C(
703
+ ), B = k(
704
704
  (f) => {
705
- const A = k.current;
705
+ const A = C.current;
706
706
  if (!A) return;
707
- const $ = f.clientX - A.startClientX, q = f.clientY - A.startClientY, { vw: X, vh: ee } = It(), V = X - A.left - a, te = ee - A.top - a, oe = Vt(A.startWidth + $, A.startHeight + q, {
707
+ const $ = f.clientX - A.startClientX, q = f.clientY - A.startClientY, { vw: X, vh: ee } = zt(), W = X - A.left - a, te = ee - A.top - a, oe = Jt(A.startWidth + $, A.startHeight + q, {
708
708
  minWidth: o,
709
709
  minHeight: s,
710
710
  edgeMargin: a,
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, A.left + V + a),
713
+ vw: Math.min(X, A.left + W + a),
714
714
  vh: Math.min(ee, A.top + te + a)
715
715
  });
716
716
  u({ top: A.top, left: A.left, ...oe });
717
717
  },
718
718
  [a, o, s]
719
- ), K = C(
719
+ ), J = k(
720
720
  (f) => {
721
- if (k.current) {
721
+ if (C.current) {
722
722
  try {
723
723
  f.currentTarget.releasePointerCapture(f.pointerId);
724
724
  } catch {
725
725
  }
726
- k.current = null, D(!1), u(($) => ($ && R($), $));
726
+ C.current = null, P(!1), u(($) => ($ && D($), $));
727
727
  }
728
728
  },
729
- [R]
729
+ [D]
730
730
  );
731
731
  return {
732
732
  style: c === null ? {} : {
@@ -752,82 +752,82 @@ function Gr(e) {
752
752
  resizeHandleProps: {
753
753
  onPointerDown: z,
754
754
  onPointerMove: B,
755
- onPointerUp: K,
756
- onPointerCancel: K,
755
+ onPointerUp: J,
756
+ onPointerCancel: J,
757
757
  "data-ll-resize-handle": n ? "" : void 0
758
758
  },
759
759
  reset: y
760
760
  };
761
761
  }
762
- const wn = "__llHistoryPatched", Dt = "ll:pathname";
763
- function Xr() {
764
- if (typeof window > "u" || window.history[wn]) return;
762
+ const Nn = "__llHistoryPatched", Ot = "ll:pathname";
763
+ function ni() {
764
+ if (typeof window > "u" || window.history[Nn]) return;
765
765
  const e = window.history.pushState, t = window.history.replaceState;
766
766
  window.history.pushState = function(...n) {
767
767
  const i = e.apply(this, n);
768
- return window.dispatchEvent(new Event(Dt)), i;
768
+ return window.dispatchEvent(new Event(Ot)), i;
769
769
  }, window.history.replaceState = function(...n) {
770
770
  const i = t.apply(this, n);
771
- return window.dispatchEvent(new Event(Dt)), i;
772
- }, window.history[wn] = !0;
771
+ return window.dispatchEvent(new Event(Ot)), i;
772
+ }, window.history[Nn] = !0;
773
773
  }
774
- function _n() {
774
+ function Mn() {
775
775
  return typeof window > "u" ? "/" : window.location.pathname || "/";
776
776
  }
777
- function Kr(e) {
777
+ function ri(e) {
778
778
  const [t, n] = M(
779
- () => e ?? _n()
779
+ () => e ?? Mn()
780
780
  );
781
781
  return I(() => {
782
782
  if (e !== void 0) return;
783
- Xr();
784
- const i = () => n(_n());
785
- return i(), window.addEventListener("popstate", i), window.addEventListener(Dt, i), () => {
786
- window.removeEventListener("popstate", i), window.removeEventListener(Dt, i);
783
+ ni();
784
+ const i = () => n(Mn());
785
+ return i(), window.addEventListener("popstate", i), window.addEventListener(Ot, i), () => {
786
+ window.removeEventListener("popstate", i), window.removeEventListener(Ot, i);
787
787
  };
788
788
  }, [e]), e ?? t;
789
789
  }
790
- const xn = /* @__PURE__ */ new Map(), Jr = /[\\^$+?.()|{}[\]]/g;
791
- function Zr(e) {
792
- return e.replace(Jr, "\\$&");
790
+ const In = /* @__PURE__ */ new Map(), ii = /[\\^$+?.()|{}[\]]/g;
791
+ function oi(e) {
792
+ return e.replace(ii, "\\$&");
793
793
  }
794
- function Qr(e) {
795
- const t = xn.get(e);
794
+ function li(e) {
795
+ const t = In.get(e);
796
796
  if (t) return t;
797
- const n = e.length > 1 && e.endsWith("/") ? e.slice(0, -1) : e, i = "", l = "", o = n.replace(/\*\*/g, i).replace(/\*/g, l), a = Zr(o).replace(new RegExp(`\\/${i}`, "g"), "(?:\\/.*)?").replace(new RegExp(i, "g"), ".*").replace(new RegExp(l, "g"), "[^/]+"), c = new RegExp(`^${a}\\/?$`);
798
- return xn.set(e, c), c;
797
+ const n = e.length > 1 && e.endsWith("/") ? e.slice(0, -1) : e, i = "", l = "", o = n.replace(/\*\*/g, i).replace(/\*/g, l), a = oi(o).replace(new RegExp(`\\/${i}`, "g"), "(?:\\/.*)?").replace(new RegExp(i, "g"), ".*").replace(new RegExp(l, "g"), "[^/]+"), c = new RegExp(`^${a}\\/?$`);
798
+ return In.set(e, c), c;
799
799
  }
800
- function ei(e, t) {
800
+ function ai(e, t) {
801
801
  const n = t.length > 1 && t.endsWith("/") ? t.slice(0, -1) : t;
802
- return Qr(e).test(n);
802
+ return li(e).test(n);
803
803
  }
804
- function ti(e, t) {
805
- return typeof e == "function" ? e(t) : e instanceof RegExp ? e.test(t) : ei(e, t);
804
+ function si(e, t) {
805
+ return typeof e == "function" ? e(t) : e instanceof RegExp ? e.test(t) : ai(e, t);
806
806
  }
807
- function Ln(e, t) {
807
+ function Tn(e, t) {
808
808
  if (!e || e.length === 0) return !1;
809
809
  for (const n of e)
810
- if (ti(n, t)) return !0;
810
+ if (si(n, t)) return !0;
811
811
  return !1;
812
812
  }
813
- function ni(e, t, n) {
814
- return e === void 0 ? !0 : Ln(n, e) ? !1 : t && t.length > 0 ? Ln(t, e) : !0;
813
+ function ci(e, t, n) {
814
+ return e === void 0 ? !0 : Tn(n, e) ? !1 : t && t.length > 0 ? Tn(t, e) : !0;
815
815
  }
816
- function ri(e, t, n) {
817
- return it(
818
- () => ni(e, t, n),
816
+ function ui(e, t, n) {
817
+ return at(
818
+ () => ci(e, t, n),
819
819
  [e, t, n]
820
820
  );
821
821
  }
822
- function ii(e) {
822
+ function di(e) {
823
823
  return e === !1 ? { navigate: !1, thinking: !1, action: !1 } : e === void 0 || e === !0 ? { navigate: !0, thinking: !0, action: !0 } : {
824
824
  navigate: e.navigate !== !1,
825
825
  thinking: e.thinking !== !1,
826
826
  action: e.action !== !1
827
827
  };
828
828
  }
829
- function oi(e) {
830
- const t = it(() => ii(e.config), [e.config]), n = e.baseUrl.replace(/\/+$/, ""), i = T(null), l = C(
829
+ function fi(e) {
830
+ const t = at(() => di(e.config), [e.config]), n = e.baseUrl.replace(/\/+$/, ""), i = T(null), l = k(
831
831
  (c) => {
832
832
  try {
833
833
  new Audio(`${n}${c}`).play().catch(() => {
@@ -836,11 +836,11 @@ function oi(e) {
836
836
  }
837
837
  },
838
838
  [n]
839
- ), o = C(() => {
839
+ ), o = k(() => {
840
840
  t.navigate && l("/audio/page-change-sound.mp3");
841
- }, [t.navigate, l]), s = C(() => {
841
+ }, [t.navigate, l]), s = k(() => {
842
842
  t.action && l("/audio/confirmation-sound.mp3");
843
- }, [t.action, l]), a = C(
843
+ }, [t.action, l]), a = k(
844
844
  (c) => {
845
845
  if (!t.thinking) {
846
846
  if (i.current) {
@@ -879,12 +879,12 @@ function oi(e) {
879
879
  }
880
880
  i.current = null;
881
881
  }
882
- }, []), it(
882
+ }, []), at(
883
883
  () => ({ playPageChange: o, playConfirmation: s, setThinking: a }),
884
884
  [o, s, a]
885
885
  );
886
886
  }
887
- const Cn = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ S(
887
+ const Rn = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ S(
888
888
  "svg",
889
889
  {
890
890
  className: t,
@@ -930,7 +930,7 @@ const Cn = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ S(
930
930
  }
931
931
  )
932
932
  }
933
- ), kn = ({ className: e }) => /* @__PURE__ */ r(
933
+ ), Dn = ({ className: e }) => /* @__PURE__ */ r(
934
934
  "svg",
935
935
  {
936
936
  className: e,
@@ -948,7 +948,7 @@ const Cn = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ S(
948
948
  }
949
949
  )
950
950
  }
951
- ), li = ({ className: e }) => /* @__PURE__ */ r(
951
+ ), pi = ({ className: e }) => /* @__PURE__ */ r(
952
952
  "svg",
953
953
  {
954
954
  className: e,
@@ -959,12 +959,12 @@ const Cn = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ S(
959
959
  "aria-hidden": "true",
960
960
  children: /* @__PURE__ */ r("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
961
961
  }
962
- ), ai = {
962
+ ), hi = {
963
963
  left: 180,
964
964
  right: 0,
965
965
  up: -90,
966
966
  down: 90
967
- }, Sn = ({ direction: e = "right", className: t }) => /* @__PURE__ */ r(
967
+ }, Pn = ({ direction: e = "right", className: t }) => /* @__PURE__ */ r(
968
968
  "svg",
969
969
  {
970
970
  className: t,
@@ -972,19 +972,19 @@ const Cn = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ S(
972
972
  viewBox: "0 0 24 24",
973
973
  stroke: "currentColor",
974
974
  strokeWidth: 2,
975
- style: { transform: `rotate(${ai[e]}deg)` },
975
+ style: { transform: `rotate(${hi[e]}deg)` },
976
976
  "aria-hidden": "true",
977
977
  children: /* @__PURE__ */ r("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 6l6 6-6 6" })
978
978
  }
979
979
  );
980
- function si(e) {
980
+ function mi(e) {
981
981
  return e === "top-left" || e === "bottom-left" ? "left" : "right";
982
982
  }
983
- const Gn = "ll-hidden-tab-center-y", ci = 5, En = 16;
984
- function ui() {
983
+ const rr = "ll-hidden-tab-center-y", gi = 5, zn = 16;
984
+ function yi() {
985
985
  if (typeof window > "u") return null;
986
986
  try {
987
- const e = window.localStorage.getItem(Gn);
987
+ const e = window.localStorage.getItem(rr);
988
988
  if (!e) return null;
989
989
  const t = Number.parseFloat(e);
990
990
  return Number.isFinite(t) ? t : null;
@@ -992,14 +992,14 @@ function ui() {
992
992
  return null;
993
993
  }
994
994
  }
995
- function An(e) {
995
+ function $n(e) {
996
996
  if (!(typeof window > "u"))
997
997
  try {
998
- window.localStorage.setItem(Gn, String(e));
998
+ window.localStorage.setItem(rr, String(e));
999
999
  } catch {
1000
1000
  }
1001
1001
  }
1002
- const di = ({
1002
+ const vi = ({
1003
1003
  position: e,
1004
1004
  isMobile: t,
1005
1005
  isSpeaking: n,
@@ -1009,10 +1009,10 @@ const di = ({
1009
1009
  agentName: s,
1010
1010
  containerEl: a
1011
1011
  }) => {
1012
- const c = si(e), u = c === "right" ? "left" : "right", m = t ? 80 : 72, p = !!o, h = !!a, [D, _] = M(null), [k, g] = M(!1), w = T(null), R = T(!1), E = C(
1012
+ const c = mi(e), u = c === "right" ? "left" : "right", m = t ? 80 : 72, p = !!o, h = !!a, [P, _] = M(null), [C, g] = M(!1), w = T(null), D = T(!1), E = k(
1013
1013
  (H) => {
1014
1014
  if (typeof window > "u") return H;
1015
- const G = m / 2, f = En + G, A = window.innerHeight - En - G;
1015
+ const G = m / 2, f = zn + G, A = window.innerHeight - zn - G;
1016
1016
  return A < f ? Math.max(f, H) : Math.max(f, Math.min(A, H));
1017
1017
  },
1018
1018
  [m]
@@ -1022,37 +1022,37 @@ const di = ({
1022
1022
  _(null);
1023
1023
  return;
1024
1024
  }
1025
- const H = ui();
1025
+ const H = yi();
1026
1026
  _(E(H ?? window.innerHeight / 2));
1027
1027
  const G = () => {
1028
1028
  _((f) => f === null ? null : E(f));
1029
1029
  };
1030
1030
  return window.addEventListener("resize", G), () => window.removeEventListener("resize", G);
1031
1031
  }, [E, h]);
1032
- const v = C(
1032
+ const v = k(
1033
1033
  (H) => {
1034
- if (!h && !(H.pointerType === "mouse" && H.button !== 0) && D !== null) {
1034
+ if (!h && !(H.pointerType === "mouse" && H.button !== 0) && P !== null) {
1035
1035
  try {
1036
1036
  H.currentTarget.setPointerCapture(H.pointerId);
1037
1037
  } catch {
1038
1038
  }
1039
1039
  w.current = {
1040
1040
  startClientY: H.clientY,
1041
- startCenterY: D,
1041
+ startCenterY: P,
1042
1042
  moved: !1
1043
1043
  };
1044
1044
  }
1045
1045
  },
1046
- [D, h]
1047
- ), O = C(
1046
+ [P, h]
1047
+ ), O = k(
1048
1048
  (H) => {
1049
1049
  const G = w.current;
1050
1050
  if (!G) return;
1051
1051
  const f = H.clientY - G.startClientY;
1052
- !G.moved && Math.abs(f) > ci && (G.moved = !0, g(!0)), G.moved && _(E(G.startCenterY + f));
1052
+ !G.moved && Math.abs(f) > gi && (G.moved = !0, g(!0)), G.moved && _(E(G.startCenterY + f));
1053
1053
  },
1054
1054
  [E]
1055
- ), y = C(
1055
+ ), y = k(
1056
1056
  (H) => {
1057
1057
  const G = w.current;
1058
1058
  if (G) {
@@ -1060,17 +1060,17 @@ const di = ({
1060
1060
  H.currentTarget.releasePointerCapture(H.pointerId);
1061
1061
  } catch {
1062
1062
  }
1063
- w.current = null, G.moved && (g(!1), R.current = !0, _((f) => (f !== null && An(f), f)));
1063
+ w.current = null, G.moved && (g(!1), D.current = !0, _((f) => (f !== null && $n(f), f)));
1064
1064
  }
1065
1065
  },
1066
1066
  []
1067
- ), z = C(() => {
1068
- if (R.current) {
1069
- R.current = !1;
1067
+ ), z = k(() => {
1068
+ if (D.current) {
1069
+ D.current = !1;
1070
1070
  return;
1071
1071
  }
1072
1072
  i();
1073
- }, [i]), B = C(
1073
+ }, [i]), B = k(
1074
1074
  (H) => {
1075
1075
  if (H.key === "ArrowUp" || H.key === "ArrowDown") {
1076
1076
  H.preventDefault();
@@ -1078,25 +1078,25 @@ const di = ({
1078
1078
  _((f) => {
1079
1079
  if (f === null) return f;
1080
1080
  const A = E(f + G);
1081
- return An(A), A;
1081
+ return $n(A), A;
1082
1082
  });
1083
1083
  }
1084
1084
  },
1085
1085
  [E]
1086
- ), K = [
1086
+ ), J = [
1087
1087
  "ll-hidden",
1088
1088
  `ll-hidden--${c}`,
1089
1089
  t ? "ll-hidden--mobile" : "ll-hidden--desktop",
1090
1090
  n ? "ll-hidden--speaking" : null,
1091
- k ? "is-dragging" : null,
1091
+ C ? "is-dragging" : null,
1092
1092
  p ? "ll-hidden--with-avatar" : null,
1093
1093
  h ? "ll-hidden--scoped" : null
1094
- ].filter(Boolean).join(" "), le = D === null ? void 0 : { top: `${D - m / 2}px`, transform: "none" };
1094
+ ].filter(Boolean).join(" "), ae = P === null ? void 0 : { top: `${P - m / 2}px`, transform: "none" };
1095
1095
  return /* @__PURE__ */ r(
1096
1096
  "button",
1097
1097
  {
1098
1098
  type: "button",
1099
- className: K,
1099
+ className: J,
1100
1100
  onPointerDown: v,
1101
1101
  onPointerMove: O,
1102
1102
  onPointerUp: y,
@@ -1105,15 +1105,15 @@ const di = ({
1105
1105
  onKeyDown: B,
1106
1106
  "aria-label": l,
1107
1107
  "data-position": e,
1108
- style: le,
1108
+ style: ae,
1109
1109
  children: p ? (
1110
1110
  // Layout: tiny chevron flush against the inward edge (peeks out
1111
1111
  // as the click affordance), then the circular avatar photo
1112
1112
  // taking the rest of the tab. Reinforces "this is an
1113
1113
  // avatar-based experience" even when collapsed.
1114
- /* @__PURE__ */ S(We, { children: [
1114
+ /* @__PURE__ */ S(Ve, { children: [
1115
1115
  /* @__PURE__ */ r(
1116
- Sn,
1116
+ Pn,
1117
1117
  {
1118
1118
  direction: u,
1119
1119
  className: "ll-hidden__chevron ll-hidden__chevron--mini"
@@ -1130,7 +1130,7 @@ const di = ({
1130
1130
  )
1131
1131
  ] })
1132
1132
  ) : /* @__PURE__ */ r(
1133
- Sn,
1133
+ Pn,
1134
1134
  {
1135
1135
  direction: u,
1136
1136
  className: "ll-hidden__chevron"
@@ -1138,7 +1138,7 @@ const di = ({
1138
1138
  )
1139
1139
  }
1140
1140
  );
1141
- }, fi = ({
1141
+ }, bi = ({
1142
1142
  audioLevel: e,
1143
1143
  bars: t = 20,
1144
1144
  maxHeight: n = 20,
@@ -1146,16 +1146,16 @@ const di = ({
1146
1146
  className: l,
1147
1147
  barClassName: o
1148
1148
  }) => {
1149
- const s = T(null), a = T([]), c = it(() => {
1149
+ const s = T(null), a = T([]), c = at(() => {
1150
1150
  const m = (Math.sqrt(5) - 1) / 2;
1151
1151
  return Array.from({ length: t }, (p, h) => 0.5 + h * m % 1 * 0.5);
1152
1152
  }, [t]);
1153
1153
  I(() => e.subscribe((p) => {
1154
1154
  for (let h = 0; h < t; h++) {
1155
- const D = a.current[h];
1156
- if (!D) continue;
1155
+ const P = a.current[h];
1156
+ if (!P) continue;
1157
1157
  const _ = Math.max(i, p * n * c[h]);
1158
- D.style.height = `${_}px`;
1158
+ P.style.height = `${_}px`;
1159
1159
  }
1160
1160
  }), [e, t, n, i, c]);
1161
1161
  const u = ["ll-waveform", l].filter(Boolean).join(" ");
@@ -1170,7 +1170,7 @@ const di = ({
1170
1170
  },
1171
1171
  p
1172
1172
  )) });
1173
- }, pi = ({
1173
+ }, wi = ({
1174
1174
  position: e,
1175
1175
  isMobile: t,
1176
1176
  agentName: n,
@@ -1207,7 +1207,7 @@ const di = ({
1207
1207
  )
1208
1208
  ) : /* @__PURE__ */ r("div", { className: "ll-minimized__avatar ll-minimized__avatar--placeholder" }),
1209
1209
  /* @__PURE__ */ r(
1210
- fi,
1210
+ bi,
1211
1211
  {
1212
1212
  audioLevel: s,
1213
1213
  bars: 16,
@@ -1230,10 +1230,10 @@ const di = ({
1230
1230
  (m.key === "Enter" || m.key === " ") && (m.stopPropagation(), m.preventDefault(), c());
1231
1231
  },
1232
1232
  "aria-label": o ? "Unmute microphone" : "Mute microphone",
1233
- children: /* @__PURE__ */ r(Cn, { muted: o, className: "ll-minimized__icon" })
1233
+ children: /* @__PURE__ */ r(Rn, { muted: o, className: "ll-minimized__icon" })
1234
1234
  }
1235
1235
  ),
1236
- /* @__PURE__ */ r(kn, { className: "ll-minimized__icon ll-minimized__icon--expand" })
1236
+ /* @__PURE__ */ r(Dn, { className: "ll-minimized__icon ll-minimized__icon--expand" })
1237
1237
  ] })
1238
1238
  ]
1239
1239
  }
@@ -1270,7 +1270,7 @@ const di = ({
1270
1270
  className: "ll-minimized__btn",
1271
1271
  onClick: c,
1272
1272
  "aria-label": o ? "Unmute microphone" : "Mute microphone",
1273
- children: /* @__PURE__ */ r(Cn, { muted: o, className: "ll-minimized__icon" })
1273
+ children: /* @__PURE__ */ r(Rn, { muted: o, className: "ll-minimized__icon" })
1274
1274
  }
1275
1275
  ),
1276
1276
  /* @__PURE__ */ r(
@@ -1280,7 +1280,7 @@ const di = ({
1280
1280
  className: "ll-minimized__btn",
1281
1281
  onClick: a,
1282
1282
  "aria-label": `Expand ${n} widget`,
1283
- children: /* @__PURE__ */ r(kn, { className: "ll-minimized__icon" })
1283
+ children: /* @__PURE__ */ r(Dn, { className: "ll-minimized__icon" })
1284
1284
  }
1285
1285
  ),
1286
1286
  /* @__PURE__ */ r(
@@ -1290,13 +1290,13 @@ const di = ({
1290
1290
  className: "ll-minimized__btn ll-minimized__btn--close",
1291
1291
  onClick: u,
1292
1292
  "aria-label": "Close widget",
1293
- children: /* @__PURE__ */ r(li, { className: "ll-minimized__icon" })
1293
+ children: /* @__PURE__ */ r(pi, { className: "ll-minimized__icon" })
1294
1294
  }
1295
1295
  )
1296
1296
  ] })
1297
1297
  ] })
1298
1298
  }
1299
- ), hi = ({
1299
+ ), _i = ({
1300
1300
  src: e,
1301
1301
  alt: t,
1302
1302
  preCannedPlaying: n = !1,
@@ -1334,11 +1334,11 @@ const di = ({
1334
1334
  }
1335
1335
  )
1336
1336
  );
1337
- }, mi = "#E06540";
1338
- function gi({
1337
+ }, xi = "#E06540";
1338
+ function Li({
1339
1339
  size: e = 14,
1340
1340
  className: t,
1341
- fill: n = mi
1341
+ fill: n = xi
1342
1342
  }) {
1343
1343
  return /* @__PURE__ */ S(
1344
1344
  "svg",
@@ -1376,14 +1376,14 @@ function gi({
1376
1376
  }
1377
1377
  );
1378
1378
  }
1379
- const yi = 8, Nn = 8, vi = ({
1379
+ const ki = 8, Hn = 8, Ci = ({
1380
1380
  open: e,
1381
1381
  onClose: t,
1382
1382
  anchorRef: n,
1383
1383
  children: i
1384
1384
  }) => {
1385
1385
  const l = T(null), [o, s] = M(null);
1386
- return Un(() => {
1386
+ return Qn(() => {
1387
1387
  if (!e) {
1388
1388
  s(null);
1389
1389
  return;
@@ -1392,9 +1392,9 @@ const yi = 8, Nn = 8, vi = ({
1392
1392
  if (!a) return;
1393
1393
  const c = () => {
1394
1394
  const u = a.getBoundingClientRect(), m = {
1395
- top: u.top - yi,
1395
+ top: u.top - ki,
1396
1396
  left: u.left + u.width / 2
1397
- }, p = Nn + 90, h = window.innerWidth - Nn - 90;
1397
+ }, p = Hn + 90, h = window.innerWidth - Hn - 90;
1398
1398
  m.left < p && (m.left = p), m.left > h && (m.left = h), s(m);
1399
1399
  };
1400
1400
  return c(), window.addEventListener("scroll", c, !0), window.addEventListener("resize", c), () => {
@@ -1411,7 +1411,7 @@ const yi = 8, Nn = 8, vi = ({
1411
1411
  return document.addEventListener("mousedown", a), document.addEventListener("keydown", c), () => {
1412
1412
  document.removeEventListener("mousedown", a), document.removeEventListener("keydown", c);
1413
1413
  };
1414
- }, [e, t, n]), !e || o === null || typeof document > "u" ? null : en(
1414
+ }, [e, t, n]), !e || o === null || typeof document > "u" ? null : ln(
1415
1415
  /* @__PURE__ */ r(
1416
1416
  "div",
1417
1417
  {
@@ -1431,7 +1431,7 @@ const yi = 8, Nn = 8, vi = ({
1431
1431
  ),
1432
1432
  document.body
1433
1433
  );
1434
- }, bi = ({
1434
+ }, Si = ({
1435
1435
  isMuted: e,
1436
1436
  onToggleMute: t,
1437
1437
  isCameraEnabled: n,
@@ -1445,10 +1445,10 @@ const yi = 8, Nn = 8, vi = ({
1445
1445
  allowTyping: m,
1446
1446
  isTypingOpen: p,
1447
1447
  onToggleTyping: h,
1448
- onDisconnect: D
1448
+ onDisconnect: P
1449
1449
  }) => {
1450
- const [_, k] = M(!1), g = T(null);
1451
- return /* @__PURE__ */ S(We, { children: [
1450
+ const [_, C] = M(!1), g = T(null);
1451
+ return /* @__PURE__ */ S(Ve, { children: [
1452
1452
  /* @__PURE__ */ S(
1453
1453
  "div",
1454
1454
  {
@@ -1463,7 +1463,7 @@ const yi = 8, Nn = 8, vi = ({
1463
1463
  className: `ll-tool ${e ? "is-muted" : ""}`,
1464
1464
  onClick: t,
1465
1465
  "aria-label": e ? "Unmute microphone" : "Mute microphone",
1466
- children: /* @__PURE__ */ r(Jn, { muted: e })
1466
+ children: /* @__PURE__ */ r(lr, { muted: e })
1467
1467
  }
1468
1468
  ),
1469
1469
  /* @__PURE__ */ r(
@@ -1472,11 +1472,11 @@ const yi = 8, Nn = 8, vi = ({
1472
1472
  ref: g,
1473
1473
  type: "button",
1474
1474
  className: `ll-tool ${_ ? "is-on" : ""}`,
1475
- onClick: () => k((w) => !w),
1475
+ onClick: () => C((w) => !w),
1476
1476
  "aria-label": "More controls",
1477
1477
  "aria-haspopup": "menu",
1478
1478
  "aria-expanded": _,
1479
- children: /* @__PURE__ */ r(wi, {})
1479
+ children: /* @__PURE__ */ r(Ei, {})
1480
1480
  }
1481
1481
  ),
1482
1482
  /* @__PURE__ */ r(
@@ -1484,19 +1484,19 @@ const yi = 8, Nn = 8, vi = ({
1484
1484
  {
1485
1485
  type: "button",
1486
1486
  className: "ll-tool ll-tool--danger",
1487
- onClick: D,
1487
+ onClick: P,
1488
1488
  "aria-label": "End conversation",
1489
- children: /* @__PURE__ */ r(Qn, {})
1489
+ children: /* @__PURE__ */ r(sr, {})
1490
1490
  }
1491
1491
  )
1492
1492
  ]
1493
1493
  }
1494
1494
  ),
1495
1495
  /* @__PURE__ */ S(
1496
- vi,
1496
+ Ci,
1497
1497
  {
1498
1498
  open: _,
1499
- onClose: () => k(!1),
1499
+ onClose: () => C(!1),
1500
1500
  anchorRef: g,
1501
1501
  children: [
1502
1502
  l && /* @__PURE__ */ S(
@@ -1505,10 +1505,10 @@ const yi = 8, Nn = 8, vi = ({
1505
1505
  type: "button",
1506
1506
  className: `ll-overflow-popover__item ${n ? "is-on" : ""}`,
1507
1507
  onClick: () => {
1508
- i(), k(!1);
1508
+ i(), C(!1);
1509
1509
  },
1510
1510
  children: [
1511
- /* @__PURE__ */ r(Kn, {}),
1511
+ /* @__PURE__ */ r(or, {}),
1512
1512
  /* @__PURE__ */ r("span", { children: n ? "Stop camera" : "Start camera" })
1513
1513
  ]
1514
1514
  }
@@ -1519,10 +1519,10 @@ const yi = 8, Nn = 8, vi = ({
1519
1519
  type: "button",
1520
1520
  className: `ll-overflow-popover__item ${o ? "is-on" : ""}`,
1521
1521
  onClick: () => {
1522
- s(), k(!1);
1522
+ s(), C(!1);
1523
1523
  },
1524
1524
  children: [
1525
- /* @__PURE__ */ r(Xn, {}),
1525
+ /* @__PURE__ */ r(ir, {}),
1526
1526
  /* @__PURE__ */ r("span", { children: o ? "Stop sharing" : "Share screen" })
1527
1527
  ]
1528
1528
  }
@@ -1533,10 +1533,10 @@ const yi = 8, Nn = 8, vi = ({
1533
1533
  type: "button",
1534
1534
  className: `ll-overflow-popover__item ${c ? "is-on" : ""}`,
1535
1535
  onClick: () => {
1536
- u(), k(!1);
1536
+ u(), C(!1);
1537
1537
  },
1538
1538
  children: [
1539
- /* @__PURE__ */ r(Zn, { muted: c }),
1539
+ /* @__PURE__ */ r(ar, { muted: c }),
1540
1540
  /* @__PURE__ */ r("span", { children: c ? "Unmute speaker" : "Mute speaker" })
1541
1541
  ]
1542
1542
  }
@@ -1547,10 +1547,10 @@ const yi = 8, Nn = 8, vi = ({
1547
1547
  type: "button",
1548
1548
  className: `ll-overflow-popover__item ${p ? "is-on" : ""}`,
1549
1549
  onClick: () => {
1550
- h(), k(!1);
1550
+ h(), C(!1);
1551
1551
  },
1552
1552
  children: [
1553
- /* @__PURE__ */ r(_i, {}),
1553
+ /* @__PURE__ */ r(Ai, {}),
1554
1554
  /* @__PURE__ */ r("span", { children: p ? "Hide typing" : "Type a message" })
1555
1555
  ]
1556
1556
  }
@@ -1573,7 +1573,7 @@ const yi = 8, Nn = 8, vi = ({
1573
1573
  )
1574
1574
  ] });
1575
1575
  };
1576
- function wi() {
1576
+ function Ei() {
1577
1577
  return /* @__PURE__ */ S(
1578
1578
  "svg",
1579
1579
  {
@@ -1590,7 +1590,7 @@ function wi() {
1590
1590
  }
1591
1591
  );
1592
1592
  }
1593
- function _i() {
1593
+ function Ai() {
1594
1594
  return /* @__PURE__ */ r(
1595
1595
  "svg",
1596
1596
  {
@@ -1607,7 +1607,7 @@ function _i() {
1607
1607
  }
1608
1608
  );
1609
1609
  }
1610
- const xi = ({
1610
+ const Ni = ({
1611
1611
  position: e,
1612
1612
  isMobile: t,
1613
1613
  agentName: n,
@@ -1621,20 +1621,20 @@ const xi = ({
1621
1621
  teamSwitcherOpen: m,
1622
1622
  onToggleTeamSwitcher: p,
1623
1623
  onSelectTeamMember: h,
1624
- languageMenuOpen: D,
1624
+ languageMenuOpen: P,
1625
1625
  onToggleLanguageMenu: _,
1626
- connectionState: k,
1626
+ connectionState: C,
1627
1627
  agentState: g,
1628
1628
  transcript: w,
1629
- canResume: R,
1629
+ canResume: D,
1630
1630
  needsUserGesture: E,
1631
1631
  error: v,
1632
1632
  isMuted: O,
1633
1633
  micError: y,
1634
1634
  micDevices: z,
1635
1635
  activeMicId: B,
1636
- isCameraEnabled: K,
1637
- cameraPreviewEl: le,
1636
+ isCameraEnabled: J,
1637
+ cameraPreviewEl: ae,
1638
1638
  cameraDevices: H,
1639
1639
  activeCameraId: G,
1640
1640
  isScreenShareEnabled: f,
@@ -1643,123 +1643,123 @@ const xi = ({
1643
1643
  allowCamera: q,
1644
1644
  allowScreenShare: X,
1645
1645
  allowTyping: ee,
1646
- showMinimize: V = !0,
1646
+ showMinimize: W = !0,
1647
1647
  showClose: te = !0,
1648
1648
  chromeless: oe = !1,
1649
1649
  compactControls: U = !1,
1650
- transforming: me,
1651
- transformingLabel: Q,
1652
- avatarVideoContainerRef: _e,
1650
+ transforming: ge,
1651
+ transformingLabel: Z,
1652
+ avatarVideoContainerRef: Le,
1653
1653
  agentVideoEl: ne,
1654
- onConnect: ot,
1655
- onDisconnect: lt,
1656
- onRetry: vt,
1657
- onResumeAudio: bt,
1658
- onToggleMute: at,
1659
- onSwitchMicDevice: wt,
1660
- onToggleCamera: qe,
1661
- onSwitchCameraDevice: Ue,
1662
- onToggleScreenShare: De,
1663
- onToggleSpeaker: Pe,
1664
- onSendMessage: ze,
1665
- onMinimize: $e,
1666
- onClose: He,
1667
- onClearMicError: je,
1668
- dragHandleProps: Oe,
1654
+ onConnect: Te,
1655
+ onDisconnect: st,
1656
+ onRetry: wt,
1657
+ onResumeAudio: _t,
1658
+ onToggleMute: ct,
1659
+ onSwitchMicDevice: xt,
1660
+ onToggleCamera: Ye,
1661
+ onSwitchCameraDevice: Ge,
1662
+ onToggleScreenShare: $e,
1663
+ onToggleSpeaker: He,
1664
+ onSendMessage: Oe,
1665
+ onMinimize: Fe,
1666
+ onClose: Be,
1667
+ onClearMicError: Xe,
1668
+ dragHandleProps: We,
1669
1669
  resizeHandleProps: F
1670
1670
  }) => {
1671
- var St;
1672
- const Fe = ((a == null ? void 0 : a.length) ?? 0) > 1, Ve = k === "connecting" || k === "connected", xe = k === "connected", _t = k === "idle" || k === "disconnected" || k === "error", [st, Me] = M(!1);
1671
+ var At;
1672
+ const qe = ((a == null ? void 0 : a.length) ?? 0) > 1, Ke = C === "connecting" || C === "connected", ke = C === "connected", Lt = C === "idle" || C === "disconnected" || C === "error", [ut, Re] = M(!1);
1673
1673
  I(() => {
1674
1674
  if (!ne) {
1675
- Me(!1);
1675
+ Re(!1);
1676
1676
  return;
1677
1677
  }
1678
1678
  if (!ne.paused && ne.readyState >= 2) {
1679
- Me(!0);
1679
+ Re(!0);
1680
1680
  return;
1681
1681
  }
1682
- Me(!1);
1683
- const x = () => Me(!0);
1682
+ Re(!1);
1683
+ const x = () => Re(!0);
1684
1684
  return ne.addEventListener("playing", x), ne.addEventListener("loadeddata", x), () => {
1685
1685
  ne.removeEventListener("playing", x), ne.removeEventListener("loadeddata", x);
1686
1686
  };
1687
1687
  }, [ne]);
1688
- const [zt, xt] = M(!1);
1688
+ const [Bt, kt] = M(!1);
1689
1689
  I(() => {
1690
- g === "speaking" && xt(!0);
1690
+ g === "speaking" && kt(!0);
1691
1691
  }, [g]), I(() => {
1692
- (k === "disconnected" || k === "idle") && xt(!1);
1693
- }, [k]);
1694
- const Ae = zt && st, [de, ct] = M(!1);
1692
+ (C === "disconnected" || C === "idle") && kt(!1);
1693
+ }, [C]);
1694
+ const Me = Bt && ut, [de, dt] = M(!1);
1695
1695
  I(() => {
1696
- if (!xe) {
1697
- ct(!1);
1696
+ if (!ke) {
1697
+ dt(!1);
1698
1698
  return;
1699
1699
  }
1700
- if (Ae) return;
1701
- const x = setTimeout(() => ct(!0), 12e3);
1700
+ if (Me) return;
1701
+ const x = setTimeout(() => dt(!0), 12e3);
1702
1702
  return () => clearTimeout(x);
1703
- }, [xe, Ae]);
1704
- const fe = k === "connecting" || xe && !Ae && !de, ge = T(null), Lt = T(null);
1703
+ }, [ke, Me]);
1704
+ const fe = C === "connecting" || ke && !Me && !de, ve = T(null), Ct = T(null);
1705
1705
  I(() => {
1706
- const x = ge.current;
1707
- x && (x.innerHTML = "", le && (le.style.width = "100%", le.style.height = "100%", le.style.objectFit = "cover", le.style.transform = "scaleX(-1)", x.appendChild(le)));
1708
- }, [le]), I(() => {
1709
- const x = Lt.current;
1706
+ const x = ve.current;
1707
+ x && (x.innerHTML = "", ae && (ae.style.width = "100%", ae.style.height = "100%", ae.style.objectFit = "cover", ae.style.transform = "scaleX(-1)", x.appendChild(ae)));
1708
+ }, [ae]), I(() => {
1709
+ const x = Ct.current;
1710
1710
  x && (x.innerHTML = "", A && (A.style.width = "100%", A.style.height = "100%", A.style.objectFit = "contain", x.appendChild(A)));
1711
1711
  }, [A]);
1712
- const [Ye, pe] = M(!1), [ye, Ge] = M(!1), Ct = T(null), kt = T(null);
1712
+ const [Je, pe] = M(!1), [be, Ze] = M(!1), St = T(null), Et = T(null);
1713
1713
  I(() => {
1714
- if (!Ye && !ye && !D && !m) return;
1714
+ if (!Je && !be && !P && !m) return;
1715
1715
  const x = () => {
1716
- pe(!1), Ge(!1), D && _(), m && p();
1716
+ pe(!1), Ze(!1), P && _(), m && p();
1717
1717
  };
1718
1718
  return document.addEventListener("click", x), () => document.removeEventListener("click", x);
1719
1719
  }, [
1720
- Ye,
1721
- ye,
1722
- D,
1720
+ Je,
1721
+ be,
1722
+ P,
1723
1723
  m,
1724
1724
  _,
1725
1725
  p
1726
1726
  ]);
1727
- const [$t, tn] = M(!1), Ie = C(() => tn((x) => !x), []), [Le, Ce] = M(""), Be = C(
1727
+ const [Wt, an] = M(!1), De = k(() => an((x) => !x), []), [Ce, Se] = M(""), Ue = k(
1728
1728
  (x) => {
1729
1729
  x.preventDefault();
1730
- const re = Le.trim();
1731
- re && (ze(re), Ce(""));
1730
+ const re = Ce.trim();
1731
+ re && (Oe(re), Se(""));
1732
1732
  },
1733
- [Le, ze]
1734
- ), Xe = s.productName || "Live Layer", Ht = !s.productName;
1735
- let ke = null, Se = null;
1733
+ [Ce, Oe]
1734
+ ), Qe = s.productName || "Live Layer", qt = !s.productName;
1735
+ let Ee = null, Ae = null;
1736
1736
  for (let x = w.length - 1; x >= 0; x--) {
1737
1737
  const re = w[x];
1738
- if (!ke && re.role === "agent" ? ke = re : !Se && re.role === "user" && (Se = re), ke && Se) break;
1738
+ if (!Ee && re.role === "agent" ? Ee = re : !Ae && re.role === "user" && (Ae = re), Ee && Ae) break;
1739
1739
  }
1740
- const ut = xe ? (ke == null ? void 0 : ke.text) || null : o || null, Ke = xe && (Se == null ? void 0 : Se.text) || null, dt = [
1740
+ const ft = ke ? (Ee == null ? void 0 : Ee.text) || null : o || null, et = ke && (Ae == null ? void 0 : Ae.text) || null, pt = [
1741
1741
  "ll-expanded",
1742
1742
  t ? "ll-expanded--mobile" : "ll-expanded--desktop"
1743
1743
  ].join(" ");
1744
1744
  return /* @__PURE__ */ S(
1745
1745
  "div",
1746
1746
  {
1747
- className: dt,
1747
+ className: pt,
1748
1748
  "data-position": e,
1749
- "data-state": xe ? "connected" : Ve ? "connecting" : "idle",
1749
+ "data-state": ke ? "connected" : Ke ? "connecting" : "idle",
1750
1750
  role: "dialog",
1751
1751
  "aria-label": `${n} widget`,
1752
1752
  children: [
1753
1753
  /* @__PURE__ */ S("div", { className: "ll-expanded__bg", children: [
1754
1754
  i ? /* @__PURE__ */ r(
1755
- hi,
1755
+ _i,
1756
1756
  {
1757
1757
  src: i,
1758
1758
  alt: n,
1759
1759
  className: "ll-expanded__bg-img"
1760
1760
  }
1761
- ) : /* @__PURE__ */ r("div", { className: "ll-expanded__bg-fallback", children: /* @__PURE__ */ r("span", { className: "ll-expanded__bg-initial", children: ((St = n == null ? void 0 : n.charAt(0)) == null ? void 0 : St.toUpperCase()) || "A" }) }),
1762
- l && !xe && /* @__PURE__ */ r(
1761
+ ) : /* @__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" }) }),
1762
+ l && !ke && /* @__PURE__ */ r(
1763
1763
  "video",
1764
1764
  {
1765
1765
  className: "ll-expanded__bg-idle",
@@ -1771,38 +1771,38 @@ const xi = ({
1771
1771
  }
1772
1772
  )
1773
1773
  ] }),
1774
- /* @__PURE__ */ r("div", { ref: _e, className: "ll-expanded__video" }),
1774
+ /* @__PURE__ */ r("div", { ref: Le, className: "ll-expanded__video" }),
1775
1775
  fe && /* @__PURE__ */ S("div", { className: "ll-expanded__overlay ll-expanded__overlay--connecting", children: [
1776
1776
  /* @__PURE__ */ r("div", { className: "ll-expanded__spinner" }),
1777
1777
  /* @__PURE__ */ r("p", { className: "ll-expanded__overlay-text", children: u ? "Switching..." : "Connecting..." })
1778
1778
  ] }),
1779
- E && xe && /* @__PURE__ */ S(
1779
+ E && ke && /* @__PURE__ */ S(
1780
1780
  "button",
1781
1781
  {
1782
1782
  type: "button",
1783
1783
  className: "ll-expanded__overlay ll-expanded__overlay--gesture",
1784
- onClick: bt,
1784
+ onClick: _t,
1785
1785
  children: [
1786
1786
  /* @__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" }) }),
1787
1787
  /* @__PURE__ */ r("p", { className: "ll-expanded__overlay-text", children: "Tap to enable audio" })
1788
1788
  ]
1789
1789
  }
1790
1790
  ),
1791
- me && /* @__PURE__ */ S(
1791
+ ge && /* @__PURE__ */ S(
1792
1792
  "div",
1793
1793
  {
1794
1794
  className: "ll-expanded__overlay ll-expanded__overlay--transforming",
1795
1795
  role: "status",
1796
1796
  "aria-live": "polite",
1797
- "aria-label": Q,
1797
+ "aria-label": Z,
1798
1798
  children: [
1799
1799
  /* @__PURE__ */ r("div", { className: "ll-expanded__spinner" }),
1800
- /* @__PURE__ */ r("p", { className: "ll-expanded__overlay-text", children: Q })
1800
+ /* @__PURE__ */ r("p", { className: "ll-expanded__overlay-text", children: Z })
1801
1801
  ]
1802
1802
  }
1803
1803
  ),
1804
- Ve ? /* @__PURE__ */ S(We, { children: [
1805
- !U && /* @__PURE__ */ S("div", { className: "ll-expanded__topbar", ...Oe, children: [
1804
+ Ke ? /* @__PURE__ */ S(Ve, { children: [
1805
+ !U && /* @__PURE__ */ S("div", { className: "ll-expanded__topbar", ...We, children: [
1806
1806
  !oe && /* @__PURE__ */ S("div", { className: "ll-expanded__topbar-left", children: [
1807
1807
  /* @__PURE__ */ S("div", { className: "ll-expanded__pill-wrap", children: [
1808
1808
  /* @__PURE__ */ S(
@@ -1811,17 +1811,17 @@ const xi = ({
1811
1811
  type: "button",
1812
1812
  className: "ll-hpill",
1813
1813
  onClick: (x) => {
1814
- Fe && (x.stopPropagation(), p());
1814
+ qe && (x.stopPropagation(), p());
1815
1815
  },
1816
- "aria-haspopup": Fe ? "listbox" : void 0,
1817
- "aria-expanded": Fe ? m : void 0,
1816
+ "aria-haspopup": qe ? "listbox" : void 0,
1817
+ "aria-expanded": qe ? m : void 0,
1818
1818
  children: [
1819
1819
  /* @__PURE__ */ r("span", { className: "ll-hpill__label", children: n }),
1820
- Fe && /* @__PURE__ */ r(Tt, {})
1820
+ qe && /* @__PURE__ */ r($t, {})
1821
1821
  ]
1822
1822
  }
1823
1823
  ),
1824
- Fe && m && /* @__PURE__ */ r(
1824
+ qe && m && /* @__PURE__ */ r(
1825
1825
  "div",
1826
1826
  {
1827
1827
  className: "ll-hmenu",
@@ -1863,16 +1863,16 @@ const xi = ({
1863
1863
  x.stopPropagation(), _();
1864
1864
  },
1865
1865
  "aria-haspopup": "listbox",
1866
- "aria-expanded": D,
1866
+ "aria-expanded": P,
1867
1867
  "aria-label": "Language: English",
1868
1868
  title: "Language: English",
1869
1869
  children: [
1870
1870
  /* @__PURE__ */ r("span", { className: "ll-hpill__label", children: "EN" }),
1871
- /* @__PURE__ */ r(Tt, {})
1871
+ /* @__PURE__ */ r($t, {})
1872
1872
  ]
1873
1873
  }
1874
1874
  ),
1875
- D && /* @__PURE__ */ r(
1875
+ P && /* @__PURE__ */ r(
1876
1876
  "div",
1877
1877
  {
1878
1878
  className: "ll-hmenu",
@@ -1900,15 +1900,15 @@ const xi = ({
1900
1900
  )
1901
1901
  ] }),
1902
1902
  /* @__PURE__ */ S("div", { className: "ll-expanded__header-actions", children: [
1903
- V !== !1 && /* @__PURE__ */ r(
1903
+ W !== !1 && /* @__PURE__ */ r(
1904
1904
  "button",
1905
1905
  {
1906
1906
  type: "button",
1907
1907
  className: "ll-hbtn",
1908
- onClick: $e,
1908
+ onClick: Fe,
1909
1909
  "aria-label": "Minimize widget",
1910
1910
  title: "Minimize",
1911
- children: /* @__PURE__ */ r(In, {})
1911
+ children: /* @__PURE__ */ r(Fn, {})
1912
1912
  }
1913
1913
  ),
1914
1914
  te !== !1 && /* @__PURE__ */ r(
@@ -1916,10 +1916,10 @@ const xi = ({
1916
1916
  {
1917
1917
  type: "button",
1918
1918
  className: "ll-hbtn ll-hbtn--danger",
1919
- onClick: He,
1919
+ onClick: Be,
1920
1920
  "aria-label": "End call",
1921
1921
  title: "End call",
1922
- children: /* @__PURE__ */ r(Mn, {})
1922
+ children: /* @__PURE__ */ r(On, {})
1923
1923
  }
1924
1924
  )
1925
1925
  ] })
@@ -1937,8 +1937,8 @@ const xi = ({
1937
1937
  // can always dismiss; making the whole header disappear (the
1938
1938
  // pre-0.18.0 behavior) left users no way out short of scrolling
1939
1939
  // the page itself.
1940
- /* @__PURE__ */ S("div", { className: "ll-expanded__header ll-expanded__header--idle", ...Oe, children: [
1941
- !U && (Ht ? /* @__PURE__ */ S(
1940
+ /* @__PURE__ */ S("div", { className: "ll-expanded__header ll-expanded__header--idle", ...We, children: [
1941
+ !U && (qt ? /* @__PURE__ */ S(
1942
1942
  "a",
1943
1943
  {
1944
1944
  className: "ll-expanded__brand ll-expanded__brand--link",
@@ -1948,20 +1948,20 @@ const xi = ({
1948
1948
  "aria-label": "Powered by LiveLayer — opens livelayer.studio in a new tab",
1949
1949
  title: "Powered by LiveLayer — visit livelayer.studio",
1950
1950
  children: [
1951
- /* @__PURE__ */ r(gi, { size: 14, className: "ll-expanded__brand-mark" }),
1952
- /* @__PURE__ */ r("span", { children: Xe })
1951
+ /* @__PURE__ */ r(Li, { size: 14, className: "ll-expanded__brand-mark" }),
1952
+ /* @__PURE__ */ r("span", { children: Qe })
1953
1953
  ]
1954
1954
  }
1955
- ) : /* @__PURE__ */ r("span", { className: "ll-expanded__brand", children: Xe })),
1955
+ ) : /* @__PURE__ */ r("span", { className: "ll-expanded__brand", children: Qe })),
1956
1956
  /* @__PURE__ */ S("div", { className: "ll-expanded__header-actions", children: [
1957
- !U && V !== !1 && /* @__PURE__ */ r(
1957
+ !U && W !== !1 && /* @__PURE__ */ r(
1958
1958
  "button",
1959
1959
  {
1960
1960
  type: "button",
1961
1961
  className: "ll-hbtn ll-hbtn--ghost",
1962
- onClick: $e,
1962
+ onClick: Fe,
1963
1963
  "aria-label": "Minimize widget",
1964
- children: /* @__PURE__ */ r(In, {})
1964
+ children: /* @__PURE__ */ r(Fn, {})
1965
1965
  }
1966
1966
  ),
1967
1967
  te !== !1 && /* @__PURE__ */ r(
@@ -1969,23 +1969,23 @@ const xi = ({
1969
1969
  {
1970
1970
  type: "button",
1971
1971
  className: "ll-hbtn ll-hbtn--danger",
1972
- onClick: He,
1972
+ onClick: Be,
1973
1973
  "aria-label": "Close widget",
1974
- children: /* @__PURE__ */ r(Mn, {})
1974
+ children: /* @__PURE__ */ r(On, {})
1975
1975
  }
1976
1976
  )
1977
1977
  ] })
1978
1978
  ] })
1979
1979
  ),
1980
- _t && /* @__PURE__ */ (() => {
1981
- const x = R ? "Resume session" : k === "disconnected" ? "Reconnect to agent" : "Start video call";
1982
- return /* @__PURE__ */ S(We, { children: [
1980
+ Lt && /* @__PURE__ */ (() => {
1981
+ const x = D ? "Resume session" : C === "disconnected" ? "Reconnect to agent" : "Start video call";
1982
+ return /* @__PURE__ */ S(Ve, { children: [
1983
1983
  !v && /* @__PURE__ */ S(
1984
1984
  "button",
1985
1985
  {
1986
1986
  type: "button",
1987
1987
  className: "ll-expanded__play",
1988
- onClick: ot,
1988
+ onClick: Te,
1989
1989
  "aria-label": x,
1990
1990
  children: [
1991
1991
  /* @__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" }) }) }),
@@ -2000,7 +2000,7 @@ const xi = ({
2000
2000
  {
2001
2001
  type: "button",
2002
2002
  className: "ll-expanded__cta",
2003
- onClick: ot,
2003
+ onClick: Te,
2004
2004
  "aria-label": x,
2005
2005
  children: x
2006
2006
  }
@@ -2011,40 +2011,40 @@ const xi = ({
2011
2011
  /* @__PURE__ */ S(
2012
2012
  "div",
2013
2013
  {
2014
- className: `ll-expanded__pip ${Ve && (K || f) ? "is-visible" : ""}`,
2014
+ className: `ll-expanded__pip ${Ke && (J || f) ? "is-visible" : ""}`,
2015
2015
  children: [
2016
2016
  /* @__PURE__ */ r(
2017
2017
  "div",
2018
2018
  {
2019
- ref: Lt,
2019
+ ref: Ct,
2020
2020
  className: f ? "ll-expanded__pip-host" : "ll-expanded__pip-host is-hidden"
2021
2021
  }
2022
2022
  ),
2023
2023
  /* @__PURE__ */ r(
2024
2024
  "div",
2025
2025
  {
2026
- ref: ge,
2027
- className: !f && K ? "ll-expanded__pip-host" : "ll-expanded__pip-host is-hidden"
2026
+ ref: ve,
2027
+ className: !f && J ? "ll-expanded__pip-host" : "ll-expanded__pip-host is-hidden"
2028
2028
  }
2029
2029
  )
2030
2030
  ]
2031
2031
  }
2032
2032
  ),
2033
- Ve ? /* @__PURE__ */ S("div", { className: "ll-expanded__bottom", children: [
2034
- !U && ut && /* @__PURE__ */ r(
2033
+ Ke ? /* @__PURE__ */ S("div", { className: "ll-expanded__bottom", children: [
2034
+ !U && ft && /* @__PURE__ */ r(
2035
2035
  "div",
2036
2036
  {
2037
2037
  className: "ll-expanded__transcript ll-expanded__transcript--agent",
2038
2038
  "data-role": "agent",
2039
- children: /* @__PURE__ */ r("p", { className: "ll-expanded__transcript-text", children: ut })
2039
+ children: /* @__PURE__ */ r("p", { className: "ll-expanded__transcript-text", children: ft })
2040
2040
  }
2041
2041
  ),
2042
- !U && Ke && /* @__PURE__ */ r(
2042
+ !U && et && /* @__PURE__ */ r(
2043
2043
  "div",
2044
2044
  {
2045
2045
  className: "ll-expanded__transcript ll-expanded__transcript--user",
2046
2046
  "data-role": "user",
2047
- children: /* @__PURE__ */ r("p", { className: "ll-expanded__transcript-text", children: Ke })
2047
+ children: /* @__PURE__ */ r("p", { className: "ll-expanded__transcript-text", children: et })
2048
2048
  }
2049
2049
  ),
2050
2050
  !oe && !U && /* @__PURE__ */ S("div", { className: "ll-toolbar", onClick: (x) => x.stopPropagation(), children: [
@@ -2053,10 +2053,10 @@ const xi = ({
2053
2053
  {
2054
2054
  type: "button",
2055
2055
  className: `ll-tool ${f ? "is-on" : ""}`,
2056
- onClick: De,
2056
+ onClick: $e,
2057
2057
  "aria-label": f ? "Stop sharing screen" : "Share screen",
2058
2058
  title: f ? "Stop sharing" : "Share screen",
2059
- children: /* @__PURE__ */ r(Xn, {})
2059
+ children: /* @__PURE__ */ r(ir, {})
2060
2060
  }
2061
2061
  ),
2062
2062
  q && /* @__PURE__ */ S("div", { className: "ll-tool-split", children: [
@@ -2064,37 +2064,37 @@ const xi = ({
2064
2064
  "button",
2065
2065
  {
2066
2066
  type: "button",
2067
- className: `ll-tool ll-tool--left ${K ? "is-on" : ""}`,
2068
- onClick: qe,
2069
- "aria-label": K ? "Turn off camera" : "Turn on camera",
2070
- title: K ? "Stop camera" : "Start camera",
2071
- children: /* @__PURE__ */ r(Kn, {})
2067
+ className: `ll-tool ll-tool--left ${J ? "is-on" : ""}`,
2068
+ onClick: Ye,
2069
+ "aria-label": J ? "Turn off camera" : "Turn on camera",
2070
+ title: J ? "Stop camera" : "Start camera",
2071
+ children: /* @__PURE__ */ r(or, {})
2072
2072
  }
2073
2073
  ),
2074
2074
  /* @__PURE__ */ r(
2075
2075
  "button",
2076
2076
  {
2077
- ref: kt,
2077
+ ref: Et,
2078
2078
  type: "button",
2079
- className: `ll-tool ll-tool--right ${K ? "is-on" : ""}`,
2079
+ className: `ll-tool ll-tool--right ${J ? "is-on" : ""}`,
2080
2080
  onClick: (x) => {
2081
- x.stopPropagation(), Ge((re) => !re), pe(!1);
2081
+ x.stopPropagation(), Ze((re) => !re), pe(!1);
2082
2082
  },
2083
2083
  "aria-label": "Camera devices",
2084
2084
  "aria-haspopup": "listbox",
2085
- "aria-expanded": ye,
2086
- children: /* @__PURE__ */ r(Tt, {})
2085
+ "aria-expanded": be,
2086
+ children: /* @__PURE__ */ r($t, {})
2087
2087
  }
2088
2088
  ),
2089
- ye && H.length > 0 && /* @__PURE__ */ r(
2090
- Tn,
2089
+ be && H.length > 0 && /* @__PURE__ */ r(
2090
+ Bn,
2091
2091
  {
2092
2092
  label: "Camera",
2093
2093
  devices: H,
2094
2094
  activeId: G,
2095
- anchorRef: kt,
2095
+ anchorRef: Et,
2096
2096
  onPick: (x) => {
2097
- Ge(!1), Ue(x);
2097
+ Ze(!1), Ge(x);
2098
2098
  }
2099
2099
  }
2100
2100
  )
@@ -2105,36 +2105,36 @@ const xi = ({
2105
2105
  {
2106
2106
  type: "button",
2107
2107
  className: `ll-tool ll-tool--left ${O ? "is-muted" : ""}`,
2108
- onClick: at,
2108
+ onClick: ct,
2109
2109
  "aria-label": O ? "Unmute microphone" : "Mute microphone",
2110
2110
  title: O ? "Unmute" : "Mute",
2111
- children: /* @__PURE__ */ r(Jn, { muted: O })
2111
+ children: /* @__PURE__ */ r(lr, { muted: O })
2112
2112
  }
2113
2113
  ),
2114
2114
  /* @__PURE__ */ r(
2115
2115
  "button",
2116
2116
  {
2117
- ref: Ct,
2117
+ ref: St,
2118
2118
  type: "button",
2119
2119
  className: `ll-tool ll-tool--right ${O ? "is-muted" : ""}`,
2120
2120
  onClick: (x) => {
2121
- x.stopPropagation(), pe((re) => !re), Ge(!1);
2121
+ x.stopPropagation(), pe((re) => !re), Ze(!1);
2122
2122
  },
2123
2123
  "aria-label": "Microphone devices",
2124
2124
  "aria-haspopup": "listbox",
2125
- "aria-expanded": Ye,
2126
- children: /* @__PURE__ */ r(Tt, {})
2125
+ "aria-expanded": Je,
2126
+ children: /* @__PURE__ */ r($t, {})
2127
2127
  }
2128
2128
  ),
2129
- Ye && z.length > 0 && /* @__PURE__ */ r(
2130
- Tn,
2129
+ Je && z.length > 0 && /* @__PURE__ */ r(
2130
+ Bn,
2131
2131
  {
2132
2132
  label: "Microphone",
2133
2133
  devices: z,
2134
2134
  activeId: B,
2135
- anchorRef: Ct,
2135
+ anchorRef: St,
2136
2136
  onPick: (x) => {
2137
- pe(!1), wt(x);
2137
+ pe(!1), xt(x);
2138
2138
  }
2139
2139
  }
2140
2140
  )
@@ -2144,10 +2144,10 @@ const xi = ({
2144
2144
  {
2145
2145
  type: "button",
2146
2146
  className: `ll-tool ${$ ? "is-muted" : ""}`,
2147
- onClick: Pe,
2147
+ onClick: He,
2148
2148
  "aria-label": $ ? "Unmute speaker" : "Mute speaker",
2149
2149
  title: $ ? "Unmute speaker" : "Mute speaker",
2150
- children: /* @__PURE__ */ r(Zn, { muted: $ })
2150
+ children: /* @__PURE__ */ r(ar, { muted: $ })
2151
2151
  }
2152
2152
  ),
2153
2153
  /* @__PURE__ */ r(
@@ -2155,57 +2155,57 @@ const xi = ({
2155
2155
  {
2156
2156
  type: "button",
2157
2157
  className: "ll-tool ll-tool--danger",
2158
- onClick: lt,
2158
+ onClick: st,
2159
2159
  "aria-label": "End conversation",
2160
2160
  title: "End conversation",
2161
- children: /* @__PURE__ */ r(Qn, {})
2161
+ children: /* @__PURE__ */ r(sr, {})
2162
2162
  }
2163
2163
  )
2164
2164
  ] }),
2165
2165
  !oe && U && /* @__PURE__ */ r(
2166
- bi,
2166
+ Si,
2167
2167
  {
2168
2168
  isMuted: O,
2169
- onToggleMute: at,
2170
- isCameraEnabled: K,
2171
- onToggleCamera: qe,
2169
+ onToggleMute: ct,
2170
+ isCameraEnabled: J,
2171
+ onToggleCamera: Ye,
2172
2172
  allowCamera: q,
2173
2173
  isScreenShareEnabled: f,
2174
- onToggleScreenShare: De,
2174
+ onToggleScreenShare: $e,
2175
2175
  allowScreenShare: X,
2176
2176
  isSpeakerMuted: $,
2177
- onToggleSpeaker: Pe,
2177
+ onToggleSpeaker: He,
2178
2178
  allowTyping: ee,
2179
- isTypingOpen: $t,
2180
- onToggleTyping: Ie,
2181
- onDisconnect: lt
2179
+ isTypingOpen: Wt,
2180
+ onToggleTyping: De,
2181
+ onDisconnect: st
2182
2182
  }
2183
2183
  ),
2184
- !oe && ee && (U ? $t : !0) && /* @__PURE__ */ S("form", { className: "ll-message-input", onSubmit: Be, children: [
2184
+ !oe && ee && (U ? Wt : !0) && /* @__PURE__ */ S("form", { className: "ll-message-input", onSubmit: Ue, children: [
2185
2185
  /* @__PURE__ */ r(
2186
2186
  "input",
2187
2187
  {
2188
2188
  type: "text",
2189
2189
  className: "ll-message-input__field",
2190
2190
  placeholder: "Message...",
2191
- value: Le,
2192
- onChange: (x) => Ce(x.target.value),
2191
+ value: Ce,
2192
+ onChange: (x) => Se(x.target.value),
2193
2193
  "aria-label": "Message the agent"
2194
2194
  }
2195
2195
  ),
2196
- Le.trim() && /* @__PURE__ */ r(
2196
+ Ce.trim() && /* @__PURE__ */ r(
2197
2197
  "button",
2198
2198
  {
2199
2199
  type: "submit",
2200
2200
  className: "ll-message-input__send",
2201
2201
  "aria-label": "Send message",
2202
- children: /* @__PURE__ */ r(Li, {})
2202
+ children: /* @__PURE__ */ r(Mi, {})
2203
2203
  }
2204
2204
  )
2205
2205
  ] })
2206
2206
  ] }) : null,
2207
2207
  (() => {
2208
- if (y && k !== "error")
2208
+ if (y && C !== "error")
2209
2209
  return /* @__PURE__ */ S("div", { className: "ll-expanded__banner", role: "alert", children: [
2210
2210
  /* @__PURE__ */ r("span", { children: y }),
2211
2211
  /* @__PURE__ */ r(
@@ -2213,13 +2213,13 @@ const xi = ({
2213
2213
  {
2214
2214
  type: "button",
2215
2215
  className: "ll-expanded__banner-x",
2216
- onClick: je,
2216
+ onClick: Xe,
2217
2217
  "aria-label": "Dismiss",
2218
2218
  children: "×"
2219
2219
  }
2220
2220
  )
2221
2221
  ] });
2222
- if (!v || k !== "error") return null;
2222
+ if (!v || C !== "error") return null;
2223
2223
  let x = "Failed to connect", re = "Try again";
2224
2224
  return v === "MIC_PERMISSION_DENIED" ? x = "Microphone blocked. Allow access to talk." : v === "MIC_NOT_FOUND" ? x = "No microphone found. Plug one in + retry." : v === "MIC_UNAVAILABLE" ? x = "Mic unavailable. Check other apps using it." : v === "AGENT_TIMEOUT" ? x = "Agent didn't pick up. Try again." : v === "CONNECT_FAILED" ? x = "Connection failed. Check your network." : v.length < 80 && (x = v), /* @__PURE__ */ S("div", { className: "ll-expanded__banner ll-expanded__banner--error", role: "alert", children: [
2225
2225
  /* @__PURE__ */ r("span", { children: x }),
@@ -2228,7 +2228,7 @@ const xi = ({
2228
2228
  {
2229
2229
  type: "button",
2230
2230
  className: "ll-expanded__banner-retry",
2231
- onClick: vt,
2231
+ onClick: wt,
2232
2232
  children: re
2233
2233
  }
2234
2234
  )
@@ -2250,32 +2250,32 @@ const xi = ({
2250
2250
  }
2251
2251
  );
2252
2252
  };
2253
- function Tt() {
2253
+ function $t() {
2254
2254
  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" }) });
2255
2255
  }
2256
- function Mn() {
2256
+ function On() {
2257
2257
  return /* @__PURE__ */ S("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", "aria-hidden": !0, children: [
2258
2258
  /* @__PURE__ */ r("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
2259
2259
  /* @__PURE__ */ r("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
2260
2260
  ] });
2261
2261
  }
2262
- function In() {
2262
+ function Fn() {
2263
2263
  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" }) });
2264
2264
  }
2265
- function Xn() {
2265
+ function ir() {
2266
2266
  return /* @__PURE__ */ S("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: [
2267
2267
  /* @__PURE__ */ r("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2" }),
2268
2268
  /* @__PURE__ */ r("line", { x1: "8", y1: "21", x2: "16", y2: "21" }),
2269
2269
  /* @__PURE__ */ r("line", { x1: "12", y1: "17", x2: "12", y2: "21" })
2270
2270
  ] });
2271
2271
  }
2272
- function Kn() {
2272
+ function or() {
2273
2273
  return /* @__PURE__ */ S("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
2274
  /* @__PURE__ */ r("path", { d: "M23 7l-7 5 7 5V7z" }),
2275
2275
  /* @__PURE__ */ r("rect", { x: "1", y: "5", width: "15", height: "14", rx: "2" })
2276
2276
  ] });
2277
2277
  }
2278
- function Jn({ muted: e }) {
2278
+ function lr({ muted: e }) {
2279
2279
  return /* @__PURE__ */ S("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: [
2280
2280
  /* @__PURE__ */ r("path", { d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" }),
2281
2281
  /* @__PURE__ */ r("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }),
@@ -2283,22 +2283,22 @@ function Jn({ muted: e }) {
2283
2283
  e && /* @__PURE__ */ r("line", { x1: "1", y1: "1", x2: "23", y2: "23" })
2284
2284
  ] });
2285
2285
  }
2286
- function Zn({ muted: e }) {
2286
+ function ar({ muted: e }) {
2287
2287
  return /* @__PURE__ */ S("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: [
2288
2288
  /* @__PURE__ */ r("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
2289
- e ? /* @__PURE__ */ r("line", { x1: "23", y1: "9", x2: "17", y2: "15" }) : /* @__PURE__ */ S(We, { children: [
2289
+ e ? /* @__PURE__ */ r("line", { x1: "23", y1: "9", x2: "17", y2: "15" }) : /* @__PURE__ */ S(Ve, { children: [
2290
2290
  /* @__PURE__ */ r("path", { d: "M19.07 4.93a10 10 0 0 1 0 14.14" }),
2291
2291
  /* @__PURE__ */ r("path", { d: "M15.54 8.46a5 5 0 0 1 0 7.07" })
2292
2292
  ] })
2293
2293
  ] });
2294
2294
  }
2295
- function Li() {
2295
+ function Mi() {
2296
2296
  return /* @__PURE__ */ S("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: [
2297
2297
  /* @__PURE__ */ r("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
2298
2298
  /* @__PURE__ */ r("polyline", { points: "12 5 19 12 12 19" })
2299
2299
  ] });
2300
2300
  }
2301
- function Qn() {
2301
+ function sr() {
2302
2302
  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(
2303
2303
  "path",
2304
2304
  {
@@ -2307,7 +2307,7 @@ function Qn() {
2307
2307
  }
2308
2308
  ) });
2309
2309
  }
2310
- const Tn = ({
2310
+ const Bn = ({
2311
2311
  label: e,
2312
2312
  devices: t,
2313
2313
  activeId: n,
@@ -2315,7 +2315,7 @@ const Tn = ({
2315
2315
  anchorRef: l
2316
2316
  }) => {
2317
2317
  const [o, s] = M(null);
2318
- return Un(() => {
2318
+ return Qn(() => {
2319
2319
  const a = () => {
2320
2320
  const c = l.current;
2321
2321
  if (!c) return;
@@ -2328,7 +2328,7 @@ const Tn = ({
2328
2328
  return a(), window.addEventListener("scroll", a, !0), window.addEventListener("resize", a), () => {
2329
2329
  window.removeEventListener("scroll", a, !0), window.removeEventListener("resize", a);
2330
2330
  };
2331
- }, [l]), o === null || typeof document > "u" ? null : en(
2331
+ }, [l]), o === null || typeof document > "u" ? null : ln(
2332
2332
  /* @__PURE__ */ S(
2333
2333
  "div",
2334
2334
  {
@@ -2367,7 +2367,7 @@ const Tn = ({
2367
2367
  ),
2368
2368
  document.body
2369
2369
  );
2370
- }, Ci = [
2370
+ }, Ii = [
2371
2371
  // Accept any value (or empty) — `<input data-ll-private />` and
2372
2372
  // `<input data-ll-private="true" />` both opt out. The bare attribute
2373
2373
  // is the recommended spelling; "true" is preserved for back-compat.
@@ -2375,17 +2375,17 @@ const Tn = ({
2375
2375
  "[data-ll-skip]",
2376
2376
  ".ll-widget"
2377
2377
  ];
2378
- function Pt(e) {
2378
+ function Ft(e) {
2379
2379
  let t = e;
2380
2380
  for (; t; ) {
2381
- for (const n of Ci)
2381
+ for (const n of Ii)
2382
2382
  if (t.matches(n)) return !0;
2383
2383
  t = t.parentElement;
2384
2384
  }
2385
2385
  return !1;
2386
2386
  }
2387
- function Jt(e) {
2388
- if (Pt(e)) return !1;
2387
+ function nn(e) {
2388
+ if (Ft(e)) return !1;
2389
2389
  if (e instanceof HTMLInputElement) {
2390
2390
  if (e.type === "password") return !1;
2391
2391
  const t = (e.getAttribute("autocomplete") || "").toLowerCase();
@@ -2393,66 +2393,66 @@ function Jt(e) {
2393
2393
  }
2394
2394
  return !0;
2395
2395
  }
2396
- const ki = /\b(continue|next|proceed|move\s*on|forward)\b|→|›/i, Rn = /\b(back|previous|prev|go\s*back)\b|←|‹/i, Si = /\b(submit|finish|done|complete|send)\b/i, yt = /* @__PURE__ */ new Map();
2397
- function Dn(e) {
2398
- const t = yt.get(e);
2396
+ const Ti = /\b(continue|next|proceed|move\s*on|forward)\b|→|›/i, Wn = /\b(back|previous|prev|go\s*back)\b|←|‹/i, Ri = /\b(submit|finish|done|complete|send)\b/i, bt = /* @__PURE__ */ new Map();
2397
+ function qn(e) {
2398
+ const t = bt.get(e);
2399
2399
  return t && t.isConnected ? t : null;
2400
2400
  }
2401
- function tt(e) {
2402
- if (Pt(e) || e.hidden || e.getAttribute("aria-hidden") === "true") return !0;
2401
+ function it(e) {
2402
+ if (Ft(e) || e.hidden || e.getAttribute("aria-hidden") === "true") return !0;
2403
2403
  const t = typeof window < "u" && window.getComputedStyle ? window.getComputedStyle(e) : null;
2404
2404
  return !!(t && (t.display === "none" || t.visibility === "hidden"));
2405
2405
  }
2406
- function Ei(e) {
2406
+ function Di(e) {
2407
2407
  return !!(e.disabled || e.getAttribute("aria-disabled") === "true");
2408
2408
  }
2409
- function Ai(e) {
2409
+ function Pi(e) {
2410
2410
  return (e.innerText || e.textContent || e.getAttribute("aria-label") || e.value || "").trim();
2411
2411
  }
2412
- function Ni(e) {
2412
+ function zi(e) {
2413
2413
  return Array.from(e.querySelectorAll('button, [role="button"], input[type="submit"], input[type="button"]')).filter(
2414
- (n) => !tt(n) && !Ei(n)
2414
+ (n) => !it(n) && !Di(n)
2415
2415
  );
2416
2416
  }
2417
- function er(e) {
2418
- yt.clear();
2419
- const t = Ni(e);
2417
+ function cr(e) {
2418
+ bt.clear();
2419
+ const t = zi(e);
2420
2420
  let n, i, l;
2421
2421
  for (const a of t) {
2422
- const c = Ai(a);
2422
+ const c = Pi(a);
2423
2423
  if (!c || c.length > 40) continue;
2424
2424
  const u = a.getAttribute("type") === "submit" || a.tagName === "BUTTON" && !a.getAttribute("type") && !!a.closest("form");
2425
- !n && ki.test(c) && !Rn.test(c) ? (n = { id: "ll-advance", label: c }, yt.set("ll-advance", a)) : !i && Rn.test(c) ? (i = { id: "ll-back", label: c }, yt.set("ll-back", a)) : !l && (Si.test(c) || u) && (l = { id: "ll-submit", label: c }, yt.set("ll-submit", a));
2425
+ !n && Ti.test(c) && !Wn.test(c) ? (n = { id: "ll-advance", label: c }, bt.set("ll-advance", a)) : !i && Wn.test(c) ? (i = { id: "ll-back", label: c }, bt.set("ll-back", a)) : !l && (Ri.test(c) || u) && (l = { id: "ll-submit", label: c }, bt.set("ll-submit", a));
2426
2426
  }
2427
- const o = zi(e);
2427
+ const o = qi(e);
2428
2428
  return { kind: n || o.totalSteps ? "multi-step" : "single-page", advance: n, back: i, submit: l, ...o };
2429
2429
  }
2430
- const Mi = 60;
2431
- function tr(e) {
2432
- return e.replace(/^\s*(step\s+)?\d{1,2}(?:[.):\-]+\s*|\s+)/i, "").replace(/\s+/g, " ").trim().slice(0, Mi);
2430
+ const $i = 60;
2431
+ function ur(e) {
2432
+ return e.replace(/^\s*(step\s+)?\d{1,2}(?:[.):\-]+\s*|\s+)/i, "").replace(/\s+/g, " ").trim().slice(0, $i);
2433
2433
  }
2434
- function Ii(e) {
2434
+ function Hi(e) {
2435
2435
  const t = e.getAttribute("class");
2436
2436
  return t ? t.toLowerCase() : "";
2437
2437
  }
2438
- const Ti = /stepper|wizard|ant-steps|step-indicator/;
2439
- function Ri(e) {
2440
- return Ti.test(Ii(e));
2438
+ const Oi = /stepper|wizard|ant-steps|step-indicator/;
2439
+ function Fi(e) {
2440
+ return Oi.test(Hi(e));
2441
2441
  }
2442
- function Pn(e) {
2442
+ function Un(e) {
2443
2443
  const t = e.getAttribute("aria-current");
2444
2444
  return t === "step" || t === "true" ? !0 : Array.from(e.classList).some(
2445
2445
  (n) => /(^|[-_])(active|current|selected)([-_]|$)/i.test(n)
2446
2446
  );
2447
2447
  }
2448
- const Di = '[aria-current="step"],[aria-current="true"],[class*="active"],[class*="Active"],[class*="current"],[class*="Current"],[class*="selected"],[class*="Selected"]';
2449
- function Pi(e) {
2450
- return Pn(e) ? !0 : Array.from(e.querySelectorAll(Di)).some(
2451
- Pn
2448
+ const Bi = '[aria-current="step"],[aria-current="true"],[class*="active"],[class*="Active"],[class*="current"],[class*="Current"],[class*="selected"],[class*="Selected"]';
2449
+ function Wi(e) {
2450
+ return Un(e) ? !0 : Array.from(e.querySelectorAll(Bi)).some(
2451
+ Un
2452
2452
  );
2453
2453
  }
2454
- function zn(e, t) {
2455
- const n = tr(
2454
+ function jn(e, t) {
2455
+ const n = ur(
2456
2456
  e[t].innerText || e[t].textContent || ""
2457
2457
  );
2458
2458
  return {
@@ -2461,23 +2461,23 @@ function zn(e, t) {
2461
2461
  ...n ? { stepLabel: n } : {}
2462
2462
  };
2463
2463
  }
2464
- function zi(e) {
2464
+ function qi(e) {
2465
2465
  const t = e.querySelector('[aria-current="step"]');
2466
- if (t && t.parentElement && !tt(t)) {
2466
+ if (t && t.parentElement && !it(t)) {
2467
2467
  const l = Array.from(t.parentElement.children).filter(
2468
- (s) => s.tagName === t.tagName && !tt(s)
2468
+ (s) => s.tagName === t.tagName && !it(s)
2469
2469
  ), o = l.indexOf(t);
2470
- if (o >= 0 && l.length >= 2) return zn(l, o);
2470
+ if (o >= 0 && l.length >= 2) return jn(l, o);
2471
2471
  }
2472
2472
  const n = e.querySelector('[role="progressbar"]');
2473
- if (n && !tt(n)) {
2473
+ if (n && !it(n)) {
2474
2474
  const l = Number(n.getAttribute("aria-valuenow")), o = Number(n.getAttribute("aria-valuemax"));
2475
2475
  if (Number.isFinite(l) && Number.isFinite(o) && o >= 2) {
2476
2476
  const s = (n.getAttribute("aria-valuetext") || "").trim();
2477
2477
  return {
2478
2478
  totalSteps: o,
2479
2479
  currentStep: l,
2480
- ...s ? { stepLabel: tr(s) } : {}
2480
+ ...s ? { stepLabel: ur(s) } : {}
2481
2481
  };
2482
2482
  }
2483
2483
  }
@@ -2485,19 +2485,19 @@ function zi(e) {
2485
2485
  e.querySelectorAll(
2486
2486
  '[class*="step"], [class*="Step"], [class*="wizard"], [class*="Wizard"]'
2487
2487
  )
2488
- ).filter((l) => !tt(l) && Ri(l));
2488
+ ).filter((l) => !it(l) && Fi(l));
2489
2489
  for (const l of i) {
2490
2490
  const o = Array.from(l.children).filter(
2491
- (a) => !tt(a) && (a.textContent || "").trim().length > 0
2491
+ (a) => !it(a) && (a.textContent || "").trim().length > 0
2492
2492
  );
2493
2493
  if (o.length < 2 || o.length > 12) continue;
2494
- const s = o.findIndex(Pi);
2494
+ const s = o.findIndex(Wi);
2495
2495
  if (!(s < 0))
2496
- return zn(o, s);
2496
+ return jn(o, s);
2497
2497
  }
2498
2498
  return {};
2499
2499
  }
2500
- const Rt = 4096, $i = 20, Hi = 20, Oi = 10, Fi = 10, Bi = 30, Wi = 20, $n = 500, qi = [
2500
+ const Ht = 4096, Ui = 20, ji = 20, Vi = 10, Yi = 10, Gi = 30, Xi = 20, Vn = 500, Ki = [
2501
2501
  '[data-ll-private="true"]',
2502
2502
  ".ll-widget",
2503
2503
  "script",
@@ -2505,24 +2505,24 @@ const Rt = 4096, $i = 20, Hi = 20, Oi = 10, Fi = 10, Bi = 30, Wi = 20, $n = 500,
2505
2505
  "noscript",
2506
2506
  "iframe"
2507
2507
  ];
2508
- function mt(e) {
2508
+ function yt(e) {
2509
2509
  if (e.getAttribute("aria-hidden") === "true" || e.hasAttribute("hidden")) return !0;
2510
2510
  let t = e;
2511
2511
  for (; t; ) {
2512
- for (const n of qi)
2512
+ for (const n of Ki)
2513
2513
  if (t.matches(n)) return !0;
2514
2514
  t = t.parentElement;
2515
2515
  }
2516
2516
  return !1;
2517
2517
  }
2518
- function gt(e) {
2518
+ function vt(e) {
2519
2519
  if (typeof window > "u") return !0;
2520
2520
  const t = e.getBoundingClientRect();
2521
2521
  if (t.width <= 0 || t.height <= 0) return !1;
2522
2522
  const n = window.innerHeight || document.documentElement.clientHeight, i = window.innerWidth || document.documentElement.clientWidth;
2523
2523
  return t.bottom > 0 && t.right > 0 && t.top < n && t.left < i;
2524
2524
  }
2525
- function Hn(e) {
2525
+ function Yn(e) {
2526
2526
  const t = e.getAttribute("id");
2527
2527
  if (t) {
2528
2528
  const o = typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(t) : t.replace(/"/g, '\\"'), s = document.querySelector(`label[for="${o}"]`);
@@ -2549,13 +2549,13 @@ function Hn(e) {
2549
2549
  const l = e.getAttribute("placeholder");
2550
2550
  return l ? l.trim() : "";
2551
2551
  }
2552
- function ue(e, t) {
2552
+ function ce(e, t) {
2553
2553
  return e.length <= t ? e : e.slice(0, t - 1) + "…";
2554
2554
  }
2555
- function Ui(e) {
2555
+ function Ji(e) {
2556
2556
  return e && e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 60) || null;
2557
2557
  }
2558
- function ji(e) {
2558
+ function Zi(e) {
2559
2559
  const t = e.getAttribute("aria-label");
2560
2560
  if (t) return t.trim().slice(0, 80);
2561
2561
  const n = e.getAttribute("aria-labelledby");
@@ -2581,10 +2581,10 @@ function ji(e) {
2581
2581
  }
2582
2582
  return null;
2583
2583
  }
2584
- function et(e) {
2584
+ function rt(e) {
2585
2585
  return e.length;
2586
2586
  }
2587
- function Vi(e, t = {}) {
2587
+ function Qi(e, t = {}) {
2588
2588
  const n = t.doc ?? (typeof document < "u" ? document : null);
2589
2589
  if (!n)
2590
2590
  return {
@@ -2602,62 +2602,62 @@ function Vi(e, t = {}) {
2602
2602
  n.querySelectorAll("[data-ll-region]")
2603
2603
  ), a = [];
2604
2604
  for (const y of s) {
2605
- if (a.length >= Oi) break;
2606
- if (mt(y) || !gt(y)) continue;
2607
- const z = y.getAttribute("data-ll-region") ?? "", B = y.getAttribute("data-ll-intent") ?? void 0, K = ue(
2605
+ if (a.length >= Vi) break;
2606
+ if (yt(y) || !vt(y)) continue;
2607
+ const z = y.getAttribute("data-ll-region") ?? "", B = y.getAttribute("data-ll-intent") ?? void 0, J = ce(
2608
2608
  (y.innerText || y.textContent || "").trim(),
2609
- $n * 2
2609
+ Vn * 2
2610
2610
  );
2611
- !z || !K || a.push({ id: z, intent: B, text: K });
2611
+ !z || !J || a.push({ id: z, intent: B, text: J });
2612
2612
  }
2613
2613
  const c = [], u = ["H1", "H2", "H3", "H4", "H5", "H6"], m = Array.from(
2614
2614
  n.querySelectorAll("h1, h2, h3, h4, h5, h6")
2615
2615
  );
2616
2616
  for (const y of m) {
2617
- if (mt(y) || !gt(y)) continue;
2617
+ if (yt(y) || !vt(y)) continue;
2618
2618
  const z = (y.textContent || "").trim();
2619
- z && c.push(`${y.tagName}: ${ue(z, 200)}`);
2619
+ z && c.push(`${y.tagName}: ${ce(z, 200)}`);
2620
2620
  }
2621
2621
  const p = Array.from(n.querySelectorAll("p, li"));
2622
2622
  for (const y of p) {
2623
- if (mt(y) || !gt(y) || u.includes(y.tagName)) continue;
2623
+ if (yt(y) || !vt(y) || u.includes(y.tagName)) continue;
2624
2624
  const z = (y.textContent || "").trim();
2625
- z.length > 10 && c.push(ue(z, $n));
2625
+ z.length > 10 && c.push(ce(z, Vn));
2626
2626
  }
2627
2627
  const h = c.join(`
2628
- `), D = [], _ = Array.from(n.querySelectorAll("a[href]"));
2628
+ `), P = [], _ = Array.from(n.querySelectorAll("a[href]"));
2629
2629
  for (const y of _) {
2630
- if (D.length >= $i) break;
2631
- if (mt(y) || !gt(y)) continue;
2630
+ if (P.length >= Ui) break;
2631
+ if (yt(y) || !vt(y)) continue;
2632
2632
  const z = y.getAttribute("href") || "", B = (y.textContent || "").trim();
2633
- !z || !B || D.push({ href: z, text: ue(B, 100) });
2633
+ !z || !B || P.push({ href: z, text: ce(B, 100) });
2634
2634
  }
2635
- const k = [], g = Array.from(
2635
+ const C = [], g = Array.from(
2636
2636
  n.querySelectorAll(
2637
2637
  "input, textarea, select"
2638
2638
  )
2639
2639
  );
2640
2640
  for (const y of g) {
2641
- if (k.length >= Hi) break;
2642
- if (mt(y) || !Jt(y) || !gt(y)) continue;
2643
- const z = Hn(y), B = y instanceof HTMLInputElement ? y.type : y.tagName.toLowerCase();
2644
- z && k.push({ label: ue(z, 100), type: B });
2641
+ if (C.length >= ji) break;
2642
+ if (yt(y) || !nn(y) || !vt(y)) continue;
2643
+ const z = Yn(y), B = y instanceof HTMLInputElement ? y.type : y.tagName.toLowerCase();
2644
+ z && C.push({ label: ce(z, 100), type: B });
2645
2645
  }
2646
- const w = Array.from(n.querySelectorAll("form")), R = [];
2646
+ const w = Array.from(n.querySelectorAll("form")), D = [];
2647
2647
  let E = 0;
2648
2648
  for (const y of w) {
2649
- if (R.length >= Fi) break;
2650
- if (Pt(y) || y.matches(".ll-widget *, .ll-widget")) continue;
2651
- const z = y.getAttribute("id") || y.getAttribute("name") || Ui(y.getAttribute("data-ll-intent")) || `form_${E++}`, B = y.getAttribute("data-ll-intent") || ji(y) || void 0, K = Array.from(
2649
+ if (D.length >= Yi) break;
2650
+ if (Ft(y) || y.matches(".ll-widget *, .ll-widget")) continue;
2651
+ const z = y.getAttribute("id") || y.getAttribute("name") || Ji(y.getAttribute("data-ll-intent")) || `form_${E++}`, B = y.getAttribute("data-ll-intent") || Zi(y) || void 0, J = Array.from(
2652
2652
  y.querySelectorAll(
2653
2653
  "input, textarea, select"
2654
2654
  )
2655
- ), le = [];
2655
+ ), ae = [];
2656
2656
  let H = 0;
2657
2657
  const G = /* @__PURE__ */ new Set();
2658
- for (const f of K) {
2659
- if (le.length >= Bi) break;
2660
- if (!Jt(f)) continue;
2658
+ for (const f of J) {
2659
+ if (ae.length >= Gi) break;
2660
+ if (!nn(f)) continue;
2661
2661
  if (f instanceof HTMLInputElement) {
2662
2662
  const U = f.type;
2663
2663
  if (U === "submit" || U === "button" || U === "reset" || U === "hidden" || U === "image" || U === "file") continue;
@@ -2665,51 +2665,56 @@ function Vi(e, t = {}) {
2665
2665
  const A = f.getAttribute("name") || "", $ = f.getAttribute("id") || "";
2666
2666
  let q = A || $ || `field_${H}`;
2667
2667
  G.has(q) && (q = `${q}__${H}`), G.add(q), H++;
2668
- const X = Hn(f) || q, ee = f instanceof HTMLInputElement ? f.type : f.tagName.toLowerCase(), V = {
2668
+ const X = Yn(f) || q, ee = f instanceof HTMLInputElement ? f.type : f.tagName.toLowerCase(), W = {
2669
2669
  name: q,
2670
- label: ue(X, 100),
2670
+ label: ce(X, 100),
2671
2671
  type: ee
2672
2672
  };
2673
- f.required === !0 && (V.required = !0);
2673
+ f.required === !0 && (W.required = !0);
2674
2674
  const te = f.getAttribute("placeholder");
2675
- if (te && (V.placeholder = ue(te.trim(), 100)), f instanceof HTMLInputElement || f instanceof HTMLTextAreaElement) {
2675
+ if (te && (W.placeholder = ce(te.trim(), 100)), f instanceof HTMLInputElement || f instanceof HTMLTextAreaElement) {
2676
2676
  const U = f.getAttribute("minlength");
2677
2677
  if (U !== null) {
2678
- const Q = parseInt(U, 10);
2679
- !Number.isNaN(Q) && Q >= 0 && (V.minLength = Q);
2678
+ const Z = parseInt(U, 10);
2679
+ !Number.isNaN(Z) && Z >= 0 && (W.minLength = Z);
2680
2680
  }
2681
- const me = f.getAttribute("maxlength");
2682
- if (me !== null) {
2683
- const Q = parseInt(me, 10);
2684
- !Number.isNaN(Q) && Q >= 0 && (V.maxLength = Q);
2681
+ const ge = f.getAttribute("maxlength");
2682
+ if (ge !== null) {
2683
+ const Z = parseInt(ge, 10);
2684
+ !Number.isNaN(Z) && Z >= 0 && (W.maxLength = Z);
2685
2685
  }
2686
2686
  }
2687
2687
  if (f instanceof HTMLInputElement) {
2688
2688
  const U = f.getAttribute("min");
2689
- U !== null && (V.min = ue(U, 50));
2690
- const me = f.getAttribute("max");
2691
- me !== null && (V.max = ue(me, 50));
2692
- const Q = f.getAttribute("step");
2693
- Q !== null && (V.step = ue(Q, 20));
2694
- const _e = f.getAttribute("pattern");
2695
- _e !== null && (V.pattern = ue(_e, 200));
2689
+ U !== null && (W.min = ce(U, 50));
2690
+ const ge = f.getAttribute("max");
2691
+ ge !== null && (W.max = ce(ge, 50));
2692
+ const Z = f.getAttribute("step");
2693
+ Z !== null && (W.step = ce(Z, 20));
2694
+ const Le = f.getAttribute("pattern");
2695
+ Le !== null && (W.pattern = ce(Le, 200));
2696
2696
  const ne = (f.getAttribute("autocomplete") || "").toLowerCase();
2697
- ne && ne !== "off" && !ne.startsWith("cc-") && (V.autocomplete = ue(ne, 50));
2697
+ ne && ne !== "off" && !ne.startsWith("cc-") && (W.autocomplete = ce(ne, 50));
2698
2698
  }
2699
2699
  if (f instanceof HTMLSelectElement) {
2700
2700
  const U = [];
2701
- for (let me = 0; me < f.options.length && !(U.length >= Wi); me++) {
2702
- const Q = f.options[me];
2703
- if (!Q || Q.disabled) continue;
2704
- const _e = Q.value || "", ne = (Q.textContent || "").trim() || _e;
2705
- !_e && !ne || U.push({ value: _e, label: ue(ne, 60) });
2701
+ for (let ge = 0; ge < f.options.length; ge++) {
2702
+ const Z = f.options[ge];
2703
+ if (!Z) continue;
2704
+ if (Z.value === "" || Z.disabled) {
2705
+ const Te = (Z.textContent || "").trim();
2706
+ if (Te && !W.placeholderOption && (W.placeholderOption = ce(Te, 60)), W.hasEmptyOption = !0, Z.disabled) continue;
2707
+ }
2708
+ if (U.length >= Xi) break;
2709
+ const Le = Z.value || "", ne = (Z.textContent || "").trim() || Le;
2710
+ !Le && !ne || U.push({ value: Le, label: ce(ne, 60) });
2706
2711
  }
2707
- U.length > 0 && (V.options = U);
2712
+ U.length > 0 && (W.options = U);
2708
2713
  }
2709
2714
  const oe = typeof f.validationMessage == "string" ? f.validationMessage : "";
2710
- oe && (V.validationMessage = ue(oe, 200)), le.push(V);
2715
+ oe && (W.validationMessage = ce(oe, 200)), ae.push(W);
2711
2716
  }
2712
- R.push({ id: z, intent: B, fields: le });
2717
+ D.push({ id: z, intent: B, fields: ae });
2713
2718
  }
2714
2719
  const v = {
2715
2720
  url: i,
@@ -2717,39 +2722,39 @@ function Vi(e, t = {}) {
2717
2722
  pathname: l,
2718
2723
  regions: a,
2719
2724
  visibleText: h,
2720
- visibleLinks: D,
2721
- visibleFields: k,
2722
- forms: R,
2723
- flow: er(n),
2725
+ visibleLinks: P,
2726
+ visibleFields: C,
2727
+ forms: D,
2728
+ flow: cr(n),
2724
2729
  extras: e
2725
2730
  };
2726
- let O = et(JSON.stringify(v.regions)) + et(v.visibleText) + et(JSON.stringify(v.visibleLinks)) + et(JSON.stringify(v.visibleFields));
2727
- for (; O > Rt && v.visibleFields.length > 0; )
2728
- v.visibleFields.pop(), O = et(JSON.stringify(v.visibleFields));
2729
- for (; O > Rt && v.visibleLinks.length > 0; )
2731
+ let O = rt(JSON.stringify(v.regions)) + rt(v.visibleText) + rt(JSON.stringify(v.visibleLinks)) + rt(JSON.stringify(v.visibleFields));
2732
+ for (; O > Ht && v.visibleFields.length > 0; )
2733
+ v.visibleFields.pop(), O = rt(JSON.stringify(v.visibleFields));
2734
+ for (; O > Ht && v.visibleLinks.length > 0; )
2730
2735
  v.visibleLinks.pop(), O -= 80;
2731
- return et(v.visibleText) > Rt && (v.visibleText = ue(v.visibleText, Rt - 100)), v;
2736
+ return rt(v.visibleText) > Ht && (v.visibleText = ce(v.visibleText, Ht - 100)), v;
2732
2737
  }
2733
- let nt = null;
2734
- function Yi(e) {
2738
+ let ot = null;
2739
+ function eo(e) {
2735
2740
  const t = e.querySelectorAll("form");
2736
2741
  let n = `f${t.length}`;
2737
2742
  return t.forEach((i) => {
2738
2743
  n += `|${i.id || i.getAttribute("name") || ""}:${i.querySelectorAll("input,select,textarea").length}`;
2739
2744
  }), n;
2740
2745
  }
2741
- function On(e, t = {}) {
2742
- const n = Date.now(), i = t.doc ?? (typeof document < "u" ? document : null), l = typeof window < "u" && window.location.pathname || "/", o = typeof window < "u" ? window.scrollY : 0, s = `${l}::${o}::${i ? Yi(i) : ""}`;
2743
- if (nt && nt.key === s && n - nt.at < 1e3)
2744
- return nt.ctx;
2745
- const a = Vi(e, t);
2746
- return nt = { key: s, at: n, ctx: a }, a;
2746
+ function Gn(e, t = {}) {
2747
+ const n = Date.now(), i = t.doc ?? (typeof document < "u" ? document : null), l = typeof window < "u" && window.location.pathname || "/", o = typeof window < "u" ? window.scrollY : 0, s = `${l}::${o}::${i ? eo(i) : ""}`;
2748
+ if (ot && ot.key === s && n - ot.at < 1e3)
2749
+ return ot.ctx;
2750
+ const a = Qi(e, t);
2751
+ return ot = { key: s, at: n, ctx: a }, a;
2747
2752
  }
2748
- function Gi() {
2749
- nt = null;
2753
+ function to() {
2754
+ ot = null;
2750
2755
  }
2751
- const Xi = 200;
2752
- function Ki(e) {
2756
+ const no = 200;
2757
+ function ro(e) {
2753
2758
  const t = String(e.href || "");
2754
2759
  return {
2755
2760
  href: t,
@@ -2759,18 +2764,18 @@ function Ki(e) {
2759
2764
  description: e.description
2760
2765
  };
2761
2766
  }
2762
- function Ji(e) {
2767
+ function io(e) {
2763
2768
  return !(!e || e.startsWith("#") || e.startsWith("javascript:") || e.startsWith("mailto:") || e.startsWith("tel:"));
2764
2769
  }
2765
- function Zi(e) {
2770
+ function oo(e) {
2766
2771
  const t = e ?? (typeof document < "u" ? document : null);
2767
2772
  if (!t) return [];
2768
2773
  const n = typeof window < "u" && window.location.origin || "", i = /* @__PURE__ */ new Set(), l = [], o = Array.from(t.querySelectorAll("a[href]"));
2769
2774
  for (const s of o) {
2770
- if (l.length >= Xi) break;
2771
- if (Pt(s)) continue;
2775
+ if (l.length >= no) break;
2776
+ if (Ft(s)) continue;
2772
2777
  const a = s.getAttribute("href") || "";
2773
- if (!Ji(a)) continue;
2778
+ if (!io(a)) continue;
2774
2779
  let c = a, u = !0;
2775
2780
  try {
2776
2781
  if (typeof window < "u") {
@@ -2787,19 +2792,19 @@ function Zi(e) {
2787
2792
  }
2788
2793
  return l;
2789
2794
  }
2790
- let rt = null;
2791
- const Qi = 5e3;
2792
- function Gt() {
2795
+ let lt = null;
2796
+ const lo = 5e3;
2797
+ function Qt() {
2793
2798
  const e = Date.now(), t = typeof window < "u" && window.location.pathname || "/";
2794
- if (rt && rt.pathname === t && e - rt.at < Qi)
2795
- return rt.routes;
2796
- const n = Zi();
2797
- return rt = { at: e, pathname: t, routes: n }, n;
2799
+ if (lt && lt.pathname === t && e - lt.at < lo)
2800
+ return lt.routes;
2801
+ const n = oo();
2802
+ return lt = { at: e, pathname: t, routes: n }, n;
2798
2803
  }
2799
- function eo() {
2800
- rt = null;
2804
+ function ao() {
2805
+ lt = null;
2801
2806
  }
2802
- function Zt(e) {
2807
+ function rn(e) {
2803
2808
  if (e instanceof HTMLInputElement) {
2804
2809
  const t = e.type;
2805
2810
  if (t === "submit" || t === "button" || t === "reset" || t === "hidden" || t === "image" || t === "file")
@@ -2807,17 +2812,17 @@ function Zt(e) {
2807
2812
  }
2808
2813
  return !0;
2809
2814
  }
2810
- function to(e, t) {
2815
+ function so(e, t) {
2811
2816
  return e.getAttribute("name") || e.getAttribute("id") || `field_${t}`;
2812
2817
  }
2813
- function Re(e) {
2818
+ function ze(e) {
2814
2819
  return e.toLowerCase().replace(/[^a-z0-9]+/g, "");
2815
2820
  }
2816
- function Xt(e) {
2821
+ function en(e) {
2817
2822
  const t = e.lastIndexOf(".");
2818
2823
  return t >= 0 ? e.slice(t + 1) : e;
2819
2824
  }
2820
- function no(e) {
2825
+ function co(e) {
2821
2826
  var i;
2822
2827
  const t = e.getAttribute("id");
2823
2828
  if (t)
@@ -2831,36 +2836,36 @@ function no(e) {
2831
2836
  const n = e.closest("label");
2832
2837
  return n != null && n.textContent ? n.textContent : e.getAttribute("aria-label") || e.getAttribute("placeholder") || "";
2833
2838
  }
2834
- function ro(e, t) {
2835
- const n = Re(t);
2839
+ function uo(e, t) {
2840
+ const n = ze(t);
2836
2841
  if (n.length < 2) return null;
2837
2842
  let i = null, l = 0;
2838
2843
  for (const o of Array.from(
2839
2844
  e.querySelectorAll("input, textarea, select")
2840
2845
  )) {
2841
- if (!Zt(o)) continue;
2846
+ if (!rn(o)) continue;
2842
2847
  const s = o.getAttribute("name") || "", a = o.getAttribute("id") || "", c = [
2843
- Re(Xt(s)),
2844
- Re(Xt(a)),
2845
- Re(s),
2846
- Re(a)
2848
+ ze(en(s)),
2849
+ ze(en(a)),
2850
+ ze(s),
2851
+ ze(a)
2847
2852
  ];
2848
2853
  let u = 0;
2849
2854
  c.some((m) => m.length >= 2 && m === n) ? u = 4 : [
2850
- Re(s),
2851
- Re(Xt(s)),
2852
- Re(no(o))
2855
+ ze(s),
2856
+ ze(en(s)),
2857
+ ze(co(o))
2853
2858
  ].some((p) => p.length >= 3 && (p.includes(n) || n.includes(p))) && (u = 2), u > l && (l = u, i = o);
2854
2859
  }
2855
2860
  return l >= 2 ? i : null;
2856
2861
  }
2857
- function io(e, t) {
2862
+ function fo(e, t) {
2858
2863
  if (!t) return null;
2859
2864
  try {
2860
2865
  const o = e.querySelector(
2861
2866
  `[name="${t.replace(/"/g, '\\"')}"]`
2862
2867
  );
2863
- if (o && Zt(o)) return o;
2868
+ if (o && rn(o)) return o;
2864
2869
  } catch {
2865
2870
  }
2866
2871
  const n = Array.from(
@@ -2869,23 +2874,23 @@ function io(e, t) {
2869
2874
  let i = 0;
2870
2875
  const l = /* @__PURE__ */ new Map();
2871
2876
  for (const o of n) {
2872
- if (!Zt(o)) continue;
2873
- const s = to(o, i);
2877
+ if (!rn(o)) continue;
2878
+ const s = so(o, i);
2874
2879
  let a = s;
2875
2880
  if (l.has(s) && (a = `${s}__${i}`), a === t) return o;
2876
2881
  l.set(s, o), i++;
2877
2882
  }
2878
- return ro(e, t);
2883
+ return uo(e, t);
2879
2884
  }
2880
- function Fn(e, t) {
2881
- const n = io(e, t);
2882
- return n ? Jt(n) ? { el: n } : { el: null, reason: "private" } : { el: null, reason: "not_found" };
2885
+ function Xn(e, t) {
2886
+ const n = fo(e, t);
2887
+ return n ? nn(n) ? { el: n } : { el: null, reason: "private" } : { el: null, reason: "not_found" };
2883
2888
  }
2884
- function oo(e, t) {
2889
+ function po(e, t) {
2885
2890
  const n = e instanceof HTMLInputElement ? HTMLInputElement.prototype : e instanceof HTMLTextAreaElement ? HTMLTextAreaElement.prototype : HTMLSelectElement.prototype, i = Object.getOwnPropertyDescriptor(n, "value"), l = i == null ? void 0 : i.set;
2886
2891
  l ? l.call(e, t) : e.value = t;
2887
2892
  }
2888
- function lo(e, t, n = {}) {
2893
+ function ho(e, t, n = {}) {
2889
2894
  const i = n.triggerInput ?? !0, l = n.triggerChange ?? !0;
2890
2895
  if (e instanceof HTMLInputElement && (e.type === "checkbox" || e.type === "radio")) {
2891
2896
  const o = Object.getOwnPropertyDescriptor(
@@ -2895,9 +2900,9 @@ function lo(e, t, n = {}) {
2895
2900
  s ? s.call(e, a) : e.checked = a, i && e.dispatchEvent(new Event("input", { bubbles: !0 })), l && e.dispatchEvent(new Event("change", { bubbles: !0 }));
2896
2901
  return;
2897
2902
  }
2898
- oo(e, t), i && e.dispatchEvent(new Event("input", { bubbles: !0 })), l && e.dispatchEvent(new Event("change", { bubbles: !0 }));
2903
+ po(e, t), i && e.dispatchEvent(new Event("input", { bubbles: !0 })), l && e.dispatchEvent(new Event("change", { bubbles: !0 }));
2899
2904
  }
2900
- function Bn(e, t) {
2905
+ function Kn(e, t) {
2901
2906
  if (!t) return null;
2902
2907
  const n = t.replace(/"/g, '\\"'), i = (a) => a.closest('[data-ll-private="true"], [data-ll-skip], .ll-widget') !== null;
2903
2908
  try {
@@ -2920,7 +2925,7 @@ function Bn(e, t) {
2920
2925
  ).filter((a) => !i(a));
2921
2926
  for (const a of s) {
2922
2927
  const c = a.getAttribute("data-ll-intent");
2923
- if (c && ao(c) === t) return a;
2928
+ if (c && mo(c) === t) return a;
2924
2929
  }
2925
2930
  if (/^form_\d+$/.test(t)) {
2926
2931
  const a = parseInt(t.slice(5), 10);
@@ -2933,10 +2938,10 @@ function Bn(e, t) {
2933
2938
  }
2934
2939
  return s.length === 1 ? s[0] : null;
2935
2940
  }
2936
- function ao(e) {
2941
+ function mo(e) {
2937
2942
  return e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 60) || null;
2938
2943
  }
2939
- function so() {
2944
+ function go() {
2940
2945
  if (typeof window > "u" || typeof document > "u")
2941
2946
  return !1;
2942
2947
  const e = document.scrollingElement || document.documentElement;
@@ -2944,19 +2949,19 @@ function so() {
2944
2949
  const t = window.getComputedStyle(e);
2945
2950
  return !(t.overflowY === "hidden" || t.overflowY === "clip");
2946
2951
  }
2947
- function co(e) {
2952
+ function yo(e) {
2948
2953
  if (!(e instanceof HTMLElement)) return !1;
2949
2954
  const n = window.getComputedStyle(e).overflowY;
2950
2955
  return !(n !== "auto" && n !== "scroll" || e.scrollHeight <= e.clientHeight + 2);
2951
2956
  }
2952
- function uo() {
2957
+ function vo() {
2953
2958
  if (typeof document > "u") return null;
2954
2959
  const e = Array.from(
2955
2960
  document.querySelectorAll("body, body *")
2956
2961
  );
2957
2962
  let t = null, n = 0;
2958
2963
  for (const i of e) {
2959
- if (!co(i)) continue;
2964
+ if (!yo(i)) continue;
2960
2965
  const l = i.getBoundingClientRect();
2961
2966
  if (l.bottom <= 0 || l.top >= window.innerHeight || l.right <= 0 || l.left >= window.innerWidth || l.width <= 0 || l.height <= 0 || i.closest(".ll-widget")) continue;
2962
2967
  const o = l.width * l.height;
@@ -2964,24 +2969,24 @@ function uo() {
2964
2969
  }
2965
2970
  return t;
2966
2971
  }
2967
- function fo() {
2972
+ function bo() {
2968
2973
  if (typeof window > "u")
2969
2974
  return null;
2970
- if (so()) return window;
2971
- const e = uo();
2975
+ if (go()) return window;
2976
+ const e = vo();
2972
2977
  return e || window;
2973
2978
  }
2974
- function Wn(e) {
2979
+ function Jn(e) {
2975
2980
  return e instanceof Window ? e.innerHeight || 0 : e.clientHeight || 0;
2976
2981
  }
2977
- function po(e) {
2982
+ function wo(e) {
2978
2983
  var t, n;
2979
2984
  return e instanceof Window ? typeof document > "u" ? 0 : Math.max(
2980
2985
  ((t = document.body) == null ? void 0 : t.scrollHeight) ?? 0,
2981
2986
  ((n = document.documentElement) == null ? void 0 : n.scrollHeight) ?? 0
2982
2987
  ) : e.scrollHeight - e.clientHeight;
2983
2988
  }
2984
- const ho = /* @__PURE__ */ new Set([
2989
+ const _o = /* @__PURE__ */ new Set([
2985
2990
  "agent_state",
2986
2991
  "avatar_stream_ready",
2987
2992
  "avatar_active",
@@ -3016,9 +3021,9 @@ const ho = /* @__PURE__ */ new Set([
3016
3021
  // to onAgentCommand.
3017
3022
  "task_field_updated",
3018
3023
  "task_completed"
3019
- ]), nr = Qt(
3024
+ ]), dr = on(
3020
3025
  function(t, n) {
3021
- var pn, hn, mn, gn, yn, vn, bn;
3026
+ var vn, bn, wn, _n, xn, Ln, kn;
3022
3027
  const {
3023
3028
  agentId: i,
3024
3029
  apiKey: l,
@@ -3037,20 +3042,20 @@ const ho = /* @__PURE__ */ new Set([
3037
3042
  // minimized produced). The card sizing now lives in CSS — see
3038
3043
  // .ll-expanded--mobile in styles.css.
3039
3044
  defaultDisplayMode: h = "expanded",
3040
- onDisplayModeChange: D,
3045
+ onDisplayModeChange: P,
3041
3046
  position: _ = "bottom-right",
3042
- mobileBreakpoint: k = 640,
3047
+ mobileBreakpoint: C = 640,
3043
3048
  draggable: g,
3044
3049
  resizable: w,
3045
- persistKey: R = "ll-widget",
3050
+ persistKey: D = "ll-widget",
3046
3051
  disablePersistence: E = !1,
3047
3052
  teamMembers: v,
3048
3053
  currentTeamMemberId: O,
3049
3054
  onTeamMemberChange: y,
3050
3055
  idleLoopUrl: z,
3051
3056
  greeting: B,
3052
- avatarImageUrl: K,
3053
- agentName: le,
3057
+ avatarImageUrl: J,
3058
+ agentName: ae,
3054
3059
  branding: H = {},
3055
3060
  allowCamera: G = !0,
3056
3061
  allowScreenShare: f = !0,
@@ -3059,76 +3064,76 @@ const ho = /* @__PURE__ */ new Set([
3059
3064
  showMinimize: q,
3060
3065
  showClose: X,
3061
3066
  chromeless: ee = !1,
3062
- floatingChromeContainer: V = null,
3067
+ floatingChromeContainer: W = null,
3063
3068
  compactControls: te = !1,
3064
3069
  transforming: oe = !1,
3065
3070
  transformingLabel: U = "Transforming…",
3066
- showOn: me,
3067
- hideOn: Q,
3068
- pathname: _e,
3071
+ showOn: ge,
3072
+ hideOn: Z,
3073
+ pathname: Le,
3069
3074
  onNavigate: ne,
3070
- onScrollToSelector: ot,
3071
- getPageContext: lt,
3072
- pageContextExtras: vt,
3073
- getRoutes: bt,
3074
- onScrollPage: at,
3075
- onClick: wt,
3076
- capabilities: qe,
3077
- onConnect: Ue,
3078
- onDisconnect: De,
3079
- onTranscript: Pe,
3080
- onAgentState: ze,
3081
- onConnectionStateChange: $e,
3082
- onAgentEvent: He,
3083
- onAgentCommand: je,
3084
- onCollect: Oe,
3075
+ onScrollToSelector: Te,
3076
+ getPageContext: st,
3077
+ pageContextExtras: wt,
3078
+ getRoutes: _t,
3079
+ onScrollPage: ct,
3080
+ onClick: xt,
3081
+ capabilities: Ye,
3082
+ onConnect: Ge,
3083
+ onDisconnect: $e,
3084
+ onTranscript: He,
3085
+ onAgentState: Oe,
3086
+ onConnectionStateChange: Fe,
3087
+ onAgentEvent: Be,
3088
+ onAgentCommand: Xe,
3089
+ onCollect: We,
3085
3090
  controlledSession: F,
3086
- className: Fe,
3087
- style: Ve,
3088
- zIndex: xe = 2147483647
3089
- } = t, _t = Kr(_e), st = ri(_t, me, Q);
3091
+ className: qe,
3092
+ style: Ke,
3093
+ zIndex: ke = 2147483647
3094
+ } = t, Lt = ri(Le), ut = ui(Lt, ge, Z);
3090
3095
  I(() => {
3091
- Gi(), eo();
3092
- }, [_t]);
3093
- const Me = O !== void 0, [zt, xt] = M(() => {
3096
+ to(), ao();
3097
+ }, [Lt]);
3098
+ const Re = O !== void 0, [Bt, kt] = M(() => {
3094
3099
  var b;
3095
3100
  return O ?? ((b = v == null ? void 0 : v[0]) == null ? void 0 : b.id);
3096
- }), Ae = Me ? O : zt, de = it(
3097
- () => (v == null ? void 0 : v.find((b) => b.id === Ae)) ?? null,
3098
- [v, Ae]
3099
- ), ct = (de == null ? void 0 : de.agentId) ?? i, fe = u === "EMBEDDED", ge = Wr(k), [Lt, Ye] = Fr({
3101
+ }), Me = Re ? O : Bt, de = at(
3102
+ () => (v == null ? void 0 : v.find((b) => b.id === Me)) ?? null,
3103
+ [v, Me]
3104
+ ), dt = (de == null ? void 0 : de.agentId) ?? i, fe = u === "EMBEDDED", ve = Xr(C), [Ct, Je] = Yr({
3100
3105
  value: p,
3101
3106
  defaultValue: h,
3102
- onChange: D,
3103
- persistKey: R,
3107
+ onChange: P,
3108
+ persistKey: D,
3104
3109
  disablePersistence: fe || E
3105
- }), pe = fe ? "expanded" : Lt, ye = fe ? () => {
3106
- } : Ye, Ge = q ?? !fe, Ct = X ?? !fe, kt = te || !fe && ge, Ie = Gr({
3107
- draggable: !fe && (g ?? !ge),
3108
- resizable: !fe && (w ?? !ge),
3109
- persistKey: R,
3110
+ }), pe = fe ? "expanded" : Ct, be = fe ? () => {
3111
+ } : Je, Ze = q ?? !fe, St = X ?? !fe, Et = te || !fe && ve, De = ti({
3112
+ draggable: !fe && (g ?? !ve),
3113
+ resizable: !fe && (w ?? !ve),
3114
+ persistKey: D,
3110
3115
  disablePersistence: fe || E
3111
- }), Le = Ar(), Ce = Tr(), Be = Rr(), Xe = Dr(), [Ht, ke] = M(!1), [Se, ut] = M(!1), [Ke, dt] = M(!1), [St, x] = M(!1), [re, rr] = M(!1), Et = oi({ baseUrl: o, config: c }), At = T(Et);
3112
- At.current = Et;
3113
- const Ot = T(ne), Ft = T(ot), Bt = T(at), Wt = T(wt), nn = T(lt), rn = T(vt), on = T(bt), qt = T(qe), Ee = T(null);
3114
- Ot.current = ne, Ft.current = ot, Bt.current = at, Wt.current = wt, nn.current = lt, rn.current = vt, on.current = bt, qt.current = qe;
3115
- function be(b) {
3116
- const d = qt.current;
3116
+ }), Ce = Pr(), Se = Or(), Ue = Fr(), Qe = Br(), [qt, Ee] = M(!1), [Ae, ft] = M(!1), [et, pt] = M(!1), [At, x] = M(!1), [re, fr] = M(!1), Nt = fi({ baseUrl: o, config: c }), Mt = T(Nt);
3117
+ Mt.current = Nt;
3118
+ const Ut = T(ne), jt = T(Te), Vt = T(ct), Yt = T(xt), sn = T(st), cn = T(wt), un = T(_t), Gt = T(Ye), Ne = T(null);
3119
+ Ut.current = ne, jt.current = Te, Vt.current = ct, Yt.current = xt, sn.current = st, cn.current = wt, un.current = _t, Gt.current = Ye;
3120
+ function _e(b) {
3121
+ const d = Gt.current;
3117
3122
  return d ? d.includes(b) : !0;
3118
3123
  }
3119
- function we(b, d) {
3124
+ function xe(b, d) {
3120
3125
  console.warn(
3121
3126
  `[LiveLayer] Agent command "${b}" blocked — capability "${d}" not in allowlist. See https://livelayer.studio/docs/react/capabilities`
3122
3127
  );
3123
3128
  }
3124
- const ft = C(
3129
+ const ht = k(
3125
3130
  (b) => {
3126
- var ie, ce, Ne, ht, Te;
3131
+ var ie, ue, Ie, gt, Pe, Cn;
3127
3132
  const d = b;
3128
3133
  if (!(!d.type || typeof d.type != "string")) {
3129
- if (He == null || He({ eventName: d.type, data: b }), d.type === "navigate") {
3130
- if (!be("navigate")) {
3131
- we("navigate", "navigate");
3134
+ if (Be == null || Be({ eventName: d.type, data: b }), d.type === "navigate") {
3135
+ if (!_e("navigate")) {
3136
+ xe("navigate", "navigate");
3132
3137
  return;
3133
3138
  }
3134
3139
  const N = typeof d.href == "string" ? d.href : null;
@@ -3138,50 +3143,50 @@ const ho = /* @__PURE__ */ new Set([
3138
3143
  );
3139
3144
  return;
3140
3145
  }
3141
- if (At.current.playPageChange(), Ot.current) {
3146
+ if (Mt.current.playPageChange(), Ut.current) {
3142
3147
  try {
3143
- Ot.current(N);
3144
- } catch (P) {
3148
+ Ut.current(N);
3149
+ } catch (R) {
3145
3150
  console.warn(
3146
3151
  `[LiveLayer] onNavigate threw for "${N}". Falling back. Error:`,
3147
- P
3152
+ R
3148
3153
  );
3149
3154
  }
3150
3155
  return;
3151
3156
  }
3152
3157
  if (typeof document < "u") {
3153
- const P = document.querySelector(
3158
+ const R = document.querySelector(
3154
3159
  `a[href="${N.replace(/"/g, '\\"')}"]`
3155
3160
  );
3156
- if (P) {
3157
- P.click();
3161
+ if (R) {
3162
+ R.click();
3158
3163
  return;
3159
3164
  }
3160
3165
  }
3161
3166
  if (typeof window < "u" && typeof history < "u")
3162
3167
  try {
3163
3168
  history.pushState({}, "", N), window.dispatchEvent(new PopStateEvent("popstate"));
3164
- } catch (P) {
3169
+ } catch (R) {
3165
3170
  console.warn(
3166
3171
  `[LiveLayer] history.pushState fallback failed for "${N}". Pass an onNavigate prop to use your router directly. See https://livelayer.studio/docs/react/navigation`,
3167
- P
3172
+ R
3168
3173
  );
3169
3174
  }
3170
3175
  return;
3171
3176
  }
3172
3177
  if (d.type === "scroll_to") {
3173
- if (!be("scroll")) {
3174
- we("scroll_to", "scroll");
3178
+ if (!_e("scroll")) {
3179
+ xe("scroll_to", "scroll");
3175
3180
  return;
3176
3181
  }
3177
3182
  const N = typeof d.selector == "string" ? d.selector : null;
3178
3183
  if (!N) return;
3179
- const P = d.behavior === "instant" ? "instant" : "smooth";
3180
- if (Ft.current) {
3184
+ const R = d.behavior === "instant" ? "instant" : "smooth";
3185
+ if (jt.current) {
3181
3186
  try {
3182
- Ft.current(
3187
+ jt.current(
3183
3188
  N,
3184
- P
3189
+ R
3185
3190
  );
3186
3191
  } catch (Y) {
3187
3192
  console.warn("[LiveLayer] onScrollToSelector threw.", Y);
@@ -3205,53 +3210,53 @@ const ho = /* @__PURE__ */ new Set([
3205
3210
  return;
3206
3211
  }
3207
3212
  Y.scrollIntoView({
3208
- behavior: P,
3213
+ behavior: R,
3209
3214
  block: "start"
3210
3215
  });
3211
3216
  }
3212
3217
  return;
3213
3218
  }
3214
3219
  if (d.type === "request_page_context") {
3215
- if (!be("read_page")) {
3216
- we("request_page_context", "read_page");
3220
+ if (!_e("read_page")) {
3221
+ xe("request_page_context", "read_page");
3217
3222
  return;
3218
3223
  }
3219
- const N = typeof d.requestId == "string" ? d.requestId : void 0, P = (ie = Ee.current) == null ? void 0 : ie.call(Ee), Y = (Z) => {
3220
- const W = P, se = W == null ? void 0 : W.localParticipant;
3221
- if (se != null && se.publishData)
3224
+ const N = typeof d.requestId == "string" ? d.requestId : void 0, R = (ie = Ne.current) == null ? void 0 : ie.call(Ne), Y = (Q) => {
3225
+ const V = R, he = V == null ? void 0 : V.localParticipant;
3226
+ if (he != null && he.publishData)
3222
3227
  try {
3223
- const he = N ? { ...Z, requestId: N } : Z, Qe = new TextEncoder().encode(JSON.stringify(he));
3224
- se.publishData(Qe, { reliable: !0 });
3225
- } catch (he) {
3226
- console.warn("[LiveLayer] publishData failed.", he);
3228
+ const me = N ? { ...Q, requestId: N } : Q, le = new TextEncoder().encode(JSON.stringify(me));
3229
+ he.publishData(le, { reliable: !0 });
3230
+ } catch (me) {
3231
+ console.warn("[LiveLayer] publishData failed.", me);
3227
3232
  }
3228
- }, j = rn.current, J = nn.current;
3233
+ }, j = cn.current, K = sn.current;
3229
3234
  try {
3230
- if (J) {
3231
- const Z = J(j);
3232
- if (Z instanceof Promise) {
3233
- Y({ type: "page_context_pending" }), Z.then((W) => Y({ type: "page_context", context: W })).catch((W) => {
3235
+ if (K) {
3236
+ const Q = K(j);
3237
+ if (Q instanceof Promise) {
3238
+ Y({ type: "page_context_pending" }), Q.then((V) => Y({ type: "page_context", context: V })).catch((V) => {
3234
3239
  console.warn(
3235
3240
  "[LiveLayer] getPageContext rejected; falling back to default walker.",
3236
- W
3241
+ V
3237
3242
  ), Y({
3238
3243
  type: "page_context",
3239
- context: On(j)
3244
+ context: Gn(j)
3240
3245
  });
3241
3246
  });
3242
3247
  return;
3243
3248
  }
3244
- Y({ type: "page_context", context: Z });
3249
+ Y({ type: "page_context", context: Q });
3245
3250
  return;
3246
3251
  }
3247
3252
  Y({
3248
3253
  type: "page_context",
3249
- context: On(j)
3254
+ context: Gn(j)
3250
3255
  });
3251
- } catch (Z) {
3256
+ } catch (Q) {
3252
3257
  console.warn(
3253
3258
  "[LiveLayer] page-context extraction threw. Sending empty context.",
3254
- Z
3259
+ Q
3255
3260
  ), Y({
3256
3261
  type: "page_context",
3257
3262
  context: { url: "", title: "", pathname: "/", regions: [], visibleText: "", visibleLinks: [], visibleFields: [], forms: [], extras: j }
@@ -3260,8 +3265,8 @@ const ho = /* @__PURE__ */ new Set([
3260
3265
  return;
3261
3266
  }
3262
3267
  if (d.type === "scroll_page") {
3263
- if (!be("scroll")) {
3264
- we("scroll_page", "scroll");
3268
+ if (!_e("scroll")) {
3269
+ xe("scroll_page", "scroll");
3265
3270
  return;
3266
3271
  }
3267
3272
  const N = d.direction;
@@ -3271,30 +3276,30 @@ const ho = /* @__PURE__ */ new Set([
3271
3276
  );
3272
3277
  return;
3273
3278
  }
3274
- const P = d.behavior === "instant" ? "instant" : "smooth";
3275
- if (Bt.current) {
3279
+ const R = d.behavior === "instant" ? "instant" : "smooth";
3280
+ if (Vt.current) {
3276
3281
  try {
3277
- Bt.current(
3282
+ Vt.current(
3278
3283
  N,
3279
- P
3284
+ R
3280
3285
  );
3281
- } catch (W) {
3282
- console.warn("[LiveLayer] onScrollPage threw.", W);
3286
+ } catch (V) {
3287
+ console.warn("[LiveLayer] onScrollPage threw.", V);
3283
3288
  }
3284
3289
  return;
3285
3290
  }
3286
3291
  if (typeof window > "u") return;
3287
- const Y = { behavior: P }, j = fo(), J = (W) => {
3288
- j instanceof Window ? j.scrollBy({ top: W, ...Y }) : j.scrollBy({ top: W, ...Y });
3289
- }, Z = (W) => {
3290
- j instanceof Window ? j.scrollTo({ top: W, ...Y }) : j.scrollTo({ top: W, ...Y });
3292
+ const Y = { behavior: R }, j = bo(), K = (V) => {
3293
+ j instanceof Window ? j.scrollBy({ top: V, ...Y }) : j.scrollBy({ top: V, ...Y });
3294
+ }, Q = (V) => {
3295
+ j instanceof Window ? j.scrollTo({ top: V, ...Y }) : j.scrollTo({ top: V, ...Y });
3291
3296
  };
3292
- N === "up" ? J(-Wn(j)) : N === "down" ? J(Wn(j)) : Z(N === "top" ? 0 : po(j));
3297
+ N === "up" ? K(-Jn(j)) : N === "down" ? K(Jn(j)) : Q(N === "top" ? 0 : wo(j));
3293
3298
  return;
3294
3299
  }
3295
3300
  if (d.type === "click") {
3296
- if (!be("click")) {
3297
- we("click", "click");
3301
+ if (!_e("click")) {
3302
+ xe("click", "click");
3298
3303
  return;
3299
3304
  }
3300
3305
  const N = typeof d.selector == "string" ? d.selector : null;
@@ -3302,74 +3307,74 @@ const ho = /* @__PURE__ */ new Set([
3302
3307
  console.warn("[LiveLayer] click: missing selector.");
3303
3308
  return;
3304
3309
  }
3305
- if (Wt.current) {
3310
+ if (Yt.current) {
3306
3311
  try {
3307
- Wt.current(N);
3312
+ Yt.current(N);
3308
3313
  } catch (Y) {
3309
3314
  console.warn("[LiveLayer] onClick threw.", Y);
3310
3315
  }
3311
3316
  return;
3312
3317
  }
3313
3318
  if (typeof document > "u") return;
3314
- let P = null;
3319
+ let R = null;
3315
3320
  try {
3316
- P = document.querySelector(N);
3321
+ R = document.querySelector(N);
3317
3322
  } catch {
3318
3323
  console.warn(
3319
3324
  `[LiveLayer] click: invalid selector "${N}".`
3320
3325
  );
3321
3326
  return;
3322
3327
  }
3323
- if (!P) {
3328
+ if (!R) {
3324
3329
  console.warn(
3325
3330
  `[LiveLayer] click: no element matched "${N}". See https://livelayer.studio/docs/errors/click-no-match`
3326
3331
  );
3327
3332
  return;
3328
3333
  }
3329
- if (P.closest('[data-ll-private="true"], .ll-widget')) {
3334
+ if (R.closest('[data-ll-private="true"], .ll-widget')) {
3330
3335
  console.warn(
3331
3336
  "[LiveLayer] click: refusing to click element inside a private subtree."
3332
3337
  );
3333
3338
  return;
3334
3339
  }
3335
- (ce = P.click) == null || ce.call(P);
3340
+ (ue = R.click) == null || ue.call(R);
3336
3341
  return;
3337
3342
  }
3338
3343
  if (d.type === "advance_step" || d.type === "go_back" || d.type === "submit_flow") {
3339
- if (!be("click")) {
3340
- we(d.type, "click");
3344
+ if (!_e("click")) {
3345
+ xe(d.type, "click");
3341
3346
  return;
3342
3347
  }
3343
3348
  if (typeof document > "u") return;
3344
3349
  const N = d.type === "advance_step" ? "ll-advance" : d.type === "go_back" ? "ll-back" : "ll-submit";
3345
- let P = Dn(N);
3346
- if (P || (er(document), P = Dn(N)), !P) {
3350
+ let R = qn(N);
3351
+ if (R || (cr(document), R = qn(N)), !R) {
3347
3352
  console.warn(`[LiveLayer] ${d.type}: no "${N}" control found.`);
3348
3353
  return;
3349
3354
  }
3350
- (Ne = P.click) == null || Ne.call(P);
3355
+ (Ie = R.click) == null || Ie.call(R);
3351
3356
  return;
3352
3357
  }
3353
3358
  if (d.type === "fill_form" || d.type === "focus_field") {
3354
- if (!be("fill_forms")) {
3355
- we(d.type, "fill_forms");
3359
+ if (!_e("fill_forms")) {
3360
+ xe(d.type, "fill_forms");
3356
3361
  return;
3357
3362
  }
3358
3363
  if (typeof document > "u") return;
3359
- d.type === "fill_form" && At.current.playConfirmation();
3364
+ d.type === "fill_form" && Mt.current.playConfirmation();
3360
3365
  const N = typeof d.formId == "string" ? d.formId : null;
3361
3366
  if (!N) {
3362
3367
  console.warn(`[LiveLayer] ${d.type}: missing formId.`);
3363
3368
  return;
3364
3369
  }
3365
- const P = Bn(document, N);
3366
- if (!P) {
3370
+ const R = Kn(document, N);
3371
+ if (!R) {
3367
3372
  console.warn(
3368
3373
  `[LiveLayer] ${d.type}: no <form> matched id="${N}" (or matching name / data-ll-intent slug). Forms are auto-discovered — make sure the form has an \`id\`, \`name\`, or \`data-ll-intent\` attribute the agent observed in PageContext.forms.`
3369
3374
  );
3370
3375
  return;
3371
3376
  }
3372
- if (P.closest('[data-ll-private="true"], [data-ll-skip], .ll-widget')) {
3377
+ if (R.closest('[data-ll-private="true"], [data-ll-skip], .ll-widget')) {
3373
3378
  console.warn(
3374
3379
  `[LiveLayer] ${d.type}: refusing to touch a form in a private / opted-out subtree.`
3375
3380
  );
@@ -3381,16 +3386,16 @@ const ho = /* @__PURE__ */ new Set([
3381
3386
  console.warn("[LiveLayer] focus_field: missing fieldName.");
3382
3387
  return;
3383
3388
  }
3384
- const J = Fn(P, j);
3385
- if (J.el === null) {
3386
- J.reason === "private" ? console.warn(
3389
+ const K = Xn(R, j);
3390
+ if (K.el === null) {
3391
+ K.reason === "private" ? console.warn(
3387
3392
  `[LiveLayer] focus_field: field "${j}" is privacy-protected and not focusable.`
3388
3393
  ) : console.warn(
3389
3394
  `[LiveLayer] focus_field: no input matching key="${j}" in form "${N}". The agent should use the field.name it observed in PageContext.forms[].fields[].`
3390
3395
  );
3391
3396
  return;
3392
3397
  }
3393
- J.el.focus();
3398
+ K.el.focus();
3394
3399
  return;
3395
3400
  }
3396
3401
  const Y = d.values && typeof d.values == "object" ? d.values : null;
@@ -3398,11 +3403,11 @@ const ho = /* @__PURE__ */ new Set([
3398
3403
  console.warn("[LiveLayer] fill_form: missing or invalid values.");
3399
3404
  return;
3400
3405
  }
3401
- for (const [j, J] of Object.entries(Y)) {
3402
- if (typeof J != "string") continue;
3403
- const Z = Fn(P, j);
3404
- if (Z.el === null) {
3405
- Z.reason === "private" ? console.warn(
3406
+ for (const [j, K] of Object.entries(Y)) {
3407
+ if (typeof K != "string") continue;
3408
+ const Q = Xn(R, j);
3409
+ if (Q.el === null) {
3410
+ Q.reason === "private" ? console.warn(
3406
3411
  `[LiveLayer] fill_form: field "${j}" is privacy-protected (password / cc-* / data-ll-private). Skipping.`
3407
3412
  ) : console.warn(
3408
3413
  `[LiveLayer] fill_form: no input matching key="${j}" in form "${N}". The agent should use the field.name it observed in PageContext.forms[].fields[]. Skipping.`
@@ -3410,19 +3415,19 @@ const ho = /* @__PURE__ */ new Set([
3410
3415
  continue;
3411
3416
  }
3412
3417
  try {
3413
- lo(Z.el, J);
3414
- } catch (W) {
3418
+ ho(Q.el, K);
3419
+ } catch (V) {
3415
3420
  console.warn(
3416
3421
  `[LiveLayer] fill_form: failed to set "${j}".`,
3417
- W
3422
+ V
3418
3423
  );
3419
3424
  }
3420
3425
  }
3421
3426
  return;
3422
3427
  }
3423
3428
  if (d.type === "submit_form") {
3424
- if (!be("submit_forms")) {
3425
- we("submit_form", "submit_forms");
3429
+ if (!_e("submit_forms")) {
3430
+ xe("submit_form", "submit_forms");
3426
3431
  return;
3427
3432
  }
3428
3433
  if (typeof document > "u") return;
@@ -3431,38 +3436,71 @@ const ho = /* @__PURE__ */ new Set([
3431
3436
  console.warn("[LiveLayer] submit_form: missing formId.");
3432
3437
  return;
3433
3438
  }
3434
- At.current.playConfirmation();
3435
- const P = Bn(document, N);
3436
- if (!P) {
3439
+ Mt.current.playConfirmation();
3440
+ const R = Kn(document, N);
3441
+ if (!R) {
3437
3442
  console.warn(
3438
3443
  `[LiveLayer] submit_form: no <form> matched id="${N}" (or matching name / data-ll-intent slug).`
3439
3444
  );
3440
3445
  return;
3441
3446
  }
3442
- if (P.closest('[data-ll-private="true"], [data-ll-skip], .ll-widget')) {
3447
+ if (R.closest('[data-ll-private="true"], [data-ll-skip], .ll-widget')) {
3443
3448
  console.warn(
3444
3449
  "[LiveLayer] submit_form: refusing to submit a form in a private / opted-out subtree."
3445
3450
  );
3446
3451
  return;
3447
3452
  }
3448
- const Y = typeof d.requestId == "string" ? d.requestId : void 0, j = (ht = Ee.current) == null ? void 0 : ht.call(Ee), J = (se) => {
3449
- const he = j, Qe = he == null ? void 0 : he.localParticipant;
3450
- if (Qe != null && Qe.publishData)
3453
+ const Y = typeof d.requestId == "string" ? d.requestId : void 0, j = (gt = Ne.current) == null ? void 0 : gt.call(Ne), K = (le) => {
3454
+ const ye = j, je = ye == null ? void 0 : ye.localParticipant;
3455
+ if (je != null && je.publishData)
3451
3456
  try {
3452
- const yr = Y ? { ...se, requestId: Y } : se, vr = new TextEncoder().encode(JSON.stringify(yr));
3453
- Qe.publishData(vr, { reliable: !0 });
3457
+ const Rt = Y ? { ...le, requestId: Y } : le, Dt = new TextEncoder().encode(JSON.stringify(Rt));
3458
+ je.publishData(Dt, { reliable: !0 });
3454
3459
  } catch {
3455
3460
  }
3461
+ }, Q = (le) => {
3462
+ var Dt, Sn, En, An;
3463
+ const ye = le, je = (Dt = ye.getAttribute) == null ? void 0 : Dt.call(ye, "aria-label");
3464
+ if (je) return je;
3465
+ const Rt = ye.id;
3466
+ if (Rt) {
3467
+ const Pt = (Sn = R.ownerDocument) == null ? void 0 : Sn.querySelector(`label[for="${Rt}"]`);
3468
+ if ((En = Pt == null ? void 0 : Pt.textContent) != null && En.trim()) return Pt.textContent.trim();
3469
+ }
3470
+ return ((An = ye.getAttribute) == null ? void 0 : An.call(ye, "name")) || ye.id || ye.type || "field";
3471
+ }, V = () => {
3472
+ try {
3473
+ return Array.from(R.elements).filter(
3474
+ (le) => "willValidate" in le && le.willValidate && !le.checkValidity()
3475
+ ).map((le) => `${Q(le)}: ${le.validationMessage}`);
3476
+ } catch {
3477
+ return [];
3478
+ }
3456
3479
  };
3457
- let Z = !1;
3458
- const W = () => {
3459
- Z = !0, J({ type: "form_submitted", formId: N });
3480
+ if (typeof R.checkValidity == "function" && !R.checkValidity()) {
3481
+ try {
3482
+ (Pe = R.reportValidity) == null || Pe.call(R);
3483
+ } catch {
3484
+ }
3485
+ K({
3486
+ type: "form_submit_blocked",
3487
+ formId: N,
3488
+ reason: "validation",
3489
+ invalidFields: V()
3490
+ });
3491
+ return;
3492
+ }
3493
+ let he = !1;
3494
+ const me = (le) => {
3495
+ he = !0, queueMicrotask(() => {
3496
+ le.defaultPrevented ? K({ type: "form_submit_uncertain", formId: N, reason: "spa_prevented" }) : K({ type: "form_submitted", formId: N });
3497
+ });
3460
3498
  };
3461
- P.addEventListener("submit", W, { once: !0 });
3499
+ R.addEventListener("submit", me, { once: !0 });
3462
3500
  try {
3463
- typeof P.requestSubmit == "function" ? P.requestSubmit() : P.submit();
3464
- } catch (se) {
3465
- console.warn("[LiveLayer] submit_form: requestSubmit threw.", se), P.removeEventListener("submit", W), J({
3501
+ typeof R.requestSubmit == "function" ? R.requestSubmit() : R.submit();
3502
+ } catch (le) {
3503
+ console.warn("[LiveLayer] submit_form: requestSubmit threw.", le), R.removeEventListener("submit", me), K({
3466
3504
  type: "form_submit_blocked",
3467
3505
  formId: N,
3468
3506
  reason: "exception"
@@ -3470,62 +3508,63 @@ const ho = /* @__PURE__ */ new Set([
3470
3508
  return;
3471
3509
  }
3472
3510
  setTimeout(() => {
3473
- Z || (P.removeEventListener("submit", W), J({
3511
+ he || (R.removeEventListener("submit", me), K({
3474
3512
  type: "form_submit_blocked",
3475
3513
  formId: N,
3476
- reason: "validation"
3514
+ reason: "validation",
3515
+ invalidFields: V()
3477
3516
  }));
3478
3517
  }, 500);
3479
3518
  return;
3480
3519
  }
3481
3520
  if (d.type === "request_routes") {
3482
- if (!be("read_page")) {
3483
- we("request_routes", "read_page");
3521
+ if (!_e("read_page")) {
3522
+ xe("request_routes", "read_page");
3484
3523
  return;
3485
3524
  }
3486
- const N = typeof d.requestId == "string" ? d.requestId : void 0, Y = (Te = Ee.current) == null ? void 0 : Te.call(Ee), j = Y == null ? void 0 : Y.localParticipant;
3525
+ const N = typeof d.requestId == "string" ? d.requestId : void 0, Y = (Cn = Ne.current) == null ? void 0 : Cn.call(Ne), j = Y == null ? void 0 : Y.localParticipant;
3487
3526
  if (!(j != null && j.publishData)) return;
3488
- const J = (W) => {
3527
+ const K = (V) => {
3489
3528
  try {
3490
- const se = N ? { type: "routes", routes: W, requestId: N } : { type: "routes", routes: W }, he = new TextEncoder().encode(JSON.stringify(se));
3491
- j.publishData(he, { reliable: !0 });
3492
- } catch (se) {
3493
- console.warn("[LiveLayer] request_routes: publishData failed.", se);
3529
+ const he = N ? { type: "routes", routes: V, requestId: N } : { type: "routes", routes: V }, me = new TextEncoder().encode(JSON.stringify(he));
3530
+ j.publishData(me, { reliable: !0 });
3531
+ } catch (he) {
3532
+ console.warn("[LiveLayer] request_routes: publishData failed.", he);
3494
3533
  }
3495
- }, Z = on.current;
3496
- if (Z) {
3534
+ }, Q = un.current;
3535
+ if (Q) {
3497
3536
  try {
3498
- const W = Z(), se = (he) => {
3499
- if (!Array.isArray(he)) {
3500
- J([]);
3537
+ const V = Q(), he = (me) => {
3538
+ if (!Array.isArray(me)) {
3539
+ K([]);
3501
3540
  return;
3502
3541
  }
3503
- J(he.map(Ki).slice(0, 200));
3542
+ K(me.map(ro).slice(0, 200));
3504
3543
  };
3505
- W instanceof Promise ? W.then(se).catch((he) => {
3544
+ V instanceof Promise ? V.then(he).catch((me) => {
3506
3545
  console.warn(
3507
3546
  "[LiveLayer] getRoutes rejected; falling back to DOM walker.",
3508
- he
3509
- ), J(Gt());
3510
- }) : se(W);
3511
- } catch (W) {
3547
+ me
3548
+ ), K(Qt());
3549
+ }) : he(V);
3550
+ } catch (V) {
3512
3551
  console.warn(
3513
3552
  "[LiveLayer] getRoutes threw; falling back to DOM walker.",
3514
- W
3515
- ), J(Gt());
3553
+ V
3554
+ ), K(Qt());
3516
3555
  }
3517
3556
  return;
3518
3557
  }
3519
3558
  try {
3520
- J(Gt());
3521
- } catch (W) {
3522
- console.warn("[LiveLayer] request_routes: extractRoutes threw.", W);
3559
+ K(Qt());
3560
+ } catch (V) {
3561
+ console.warn("[LiveLayer] request_routes: extractRoutes threw.", V);
3523
3562
  }
3524
3563
  return;
3525
3564
  }
3526
3565
  if (d.type === "task_field_updated") {
3527
- if (!be("collect_data")) {
3528
- we("task_field_updated", "collect_data");
3566
+ if (!_e("collect_data")) {
3567
+ xe("task_field_updated", "collect_data");
3529
3568
  return;
3530
3569
  }
3531
3570
  const N = {
@@ -3548,8 +3587,8 @@ const ho = /* @__PURE__ */ new Set([
3548
3587
  return;
3549
3588
  }
3550
3589
  if (d.type === "task_completed") {
3551
- if (!be("collect_data")) {
3552
- we("task_completed", "collect_data");
3590
+ if (!_e("collect_data")) {
3591
+ xe("task_completed", "collect_data");
3553
3592
  return;
3554
3593
  }
3555
3594
  const N = d.result;
@@ -3569,48 +3608,48 @@ const ho = /* @__PURE__ */ new Set([
3569
3608
  } catch {
3570
3609
  }
3571
3610
  try {
3572
- Oe == null || Oe(
3611
+ We == null || We(
3573
3612
  N
3574
3613
  );
3575
- } catch (P) {
3576
- console.warn("[LiveLayer] onCollect threw.", P);
3614
+ } catch (R) {
3615
+ console.warn("[LiveLayer] onCollect threw.", R);
3577
3616
  }
3578
3617
  return;
3579
3618
  }
3580
- ho.has(d.type) || je == null || je(d);
3619
+ _o.has(d.type) || Xe == null || Xe(d);
3581
3620
  }
3582
3621
  },
3583
- [je, He, Oe]
3584
- ), ae = Er({
3585
- agentId: F ? "__controlled__" : ct,
3622
+ [Xe, Be, We]
3623
+ ), se = Dr({
3624
+ agentId: F ? "__controlled__" : dt,
3586
3625
  baseUrl: o,
3587
3626
  apiKey: l,
3588
3627
  sessionEndpoint: s,
3589
3628
  sessionBody: a,
3590
- onDataMessage: F ? void 0 : ft
3629
+ onDataMessage: F ? void 0 : ht
3591
3630
  });
3592
3631
  I(() => {
3593
3632
  if (F != null && F.subscribeToDataMessages)
3594
- return F.subscribeToDataMessages(ft);
3595
- }, [F, ft]), Ee.current = () => {
3633
+ return F.subscribeToDataMessages(ht);
3634
+ }, [F, ht]), Ne.current = () => {
3596
3635
  var b;
3597
- return (b = ae.getRoom) == null ? void 0 : b.call(ae);
3636
+ return (b = se.getRoom) == null ? void 0 : b.call(se);
3598
3637
  }, I(() => {
3599
3638
  var ie;
3600
3639
  if (typeof window > "u") return;
3601
3640
  const b = ((ie = window.location) == null ? void 0 : ie.hostname) || "";
3602
3641
  if (b === "localhost" || b === "127.0.0.1" || b === "0.0.0.0" || b.endsWith(".local") || b.endsWith(".test"))
3603
- return window.__livelayerSimulateCommand = (ce) => {
3642
+ return window.__livelayerSimulateCommand = (ue) => {
3604
3643
  try {
3605
- ft(ce);
3606
- } catch (Ne) {
3607
- console.warn("[LiveLayer] simulate-command threw:", Ne);
3644
+ ht(ue);
3645
+ } catch (Ie) {
3646
+ console.warn("[LiveLayer] simulate-command threw:", Ie);
3608
3647
  }
3609
3648
  }, () => {
3610
3649
  delete window.__livelayerSimulateCommand;
3611
3650
  };
3612
- }, [ft]);
3613
- const L = it(() => F ? {
3651
+ }, [ht]);
3652
+ const L = at(() => F ? {
3614
3653
  connectionState: F.connectionState,
3615
3654
  agentState: F.agentState,
3616
3655
  transcript: F.transcript,
@@ -3626,95 +3665,95 @@ const ho = /* @__PURE__ */ new Set([
3626
3665
  // Dummy getRoom for shape compatibility — controlled consumers own the Room.
3627
3666
  // Internal session's getRoom returns null when no real connect has happened,
3628
3667
  // so we reuse its reference for type consistency.
3629
- getRoom: ae.getRoom,
3668
+ getRoom: se.getRoom,
3630
3669
  isControlled: !0
3631
3670
  } : {
3632
- connectionState: ae.connectionState,
3633
- agentState: ae.agentState,
3634
- transcript: ae.transcript,
3635
- videoElement: ae.videoElement,
3636
- audioElement: ae.audioElement,
3637
- canResume: ae.canResume,
3638
- error: ae.error,
3639
- agentConfig: ae.agentConfig,
3640
- connect: ae.connect,
3641
- disconnect: ae.disconnect,
3642
- getRoom: ae.getRoom,
3671
+ connectionState: se.connectionState,
3672
+ agentState: se.agentState,
3673
+ transcript: se.transcript,
3674
+ videoElement: se.videoElement,
3675
+ audioElement: se.audioElement,
3676
+ canResume: se.canResume,
3677
+ error: se.error,
3678
+ agentConfig: se.agentConfig,
3679
+ connect: se.connect,
3680
+ disconnect: se.disconnect,
3681
+ getRoom: se.getRoom,
3643
3682
  isControlled: !1
3644
- }, [F, ae]), ln = T(L);
3645
- ln.current = L;
3646
- const an = T(F);
3647
- an.current = F, wr(
3683
+ }, [F, se]), dn = T(L);
3684
+ dn.current = L;
3685
+ const fn = T(F);
3686
+ fn.current = F, Er(
3648
3687
  n,
3649
3688
  () => ({
3650
3689
  sendData: async (b) => {
3651
- var Ne, ht;
3652
- const d = an.current;
3690
+ var Ie, gt;
3691
+ const d = fn.current;
3653
3692
  if (d != null && d.publishData) {
3654
3693
  try {
3655
3694
  await d.publishData(b);
3656
- } catch (Te) {
3657
- console.warn("[AvatarWidget] sendData (controlled) failed:", Te);
3695
+ } catch (Pe) {
3696
+ console.warn("[AvatarWidget] sendData (controlled) failed:", Pe);
3658
3697
  }
3659
3698
  return;
3660
3699
  }
3661
- const ie = (ht = (Ne = ln.current) == null ? void 0 : Ne.getRoom) == null ? void 0 : ht.call(Ne), ce = ie == null ? void 0 : ie.localParticipant;
3662
- if (ce != null && ce.publishData)
3700
+ const ie = (gt = (Ie = dn.current) == null ? void 0 : Ie.getRoom) == null ? void 0 : gt.call(Ie), ue = ie == null ? void 0 : ie.localParticipant;
3701
+ if (ue != null && ue.publishData)
3663
3702
  try {
3664
- const Te = new TextEncoder().encode(JSON.stringify(b));
3665
- await ce.publishData(Te, { reliable: !0 });
3666
- } catch (Te) {
3667
- console.warn("[AvatarWidget] sendData failed:", Te);
3703
+ const Pe = new TextEncoder().encode(JSON.stringify(b));
3704
+ await ue.publishData(Pe, { reliable: !0 });
3705
+ } catch (Pe) {
3706
+ console.warn("[AvatarWidget] sendData failed:", Pe);
3668
3707
  }
3669
3708
  }
3670
3709
  }),
3671
3710
  []
3672
3711
  );
3673
- const sn = T(null);
3712
+ const pn = T(null);
3674
3713
  I(() => {
3675
- const b = L.videoElement, d = sn.current;
3714
+ const b = L.videoElement, d = pn.current;
3676
3715
  if (!(!b || !d))
3677
3716
  return d.appendChild(b), () => {
3678
3717
  b.parentNode === d && d.removeChild(b);
3679
3718
  };
3680
3719
  }, [L.videoElement]);
3681
- const [Je, Nt] = M(!1);
3720
+ const [tt, It] = M(!1);
3682
3721
  I(() => {
3683
3722
  if (!$) {
3684
- Nt(!0);
3723
+ It(!0);
3685
3724
  return;
3686
3725
  }
3687
- L.agentState === "speaking" && !Je && Nt(!0);
3688
- }, [$, L.agentState, Je]), I(() => {
3726
+ L.agentState === "speaking" && !tt && It(!0);
3727
+ }, [$, L.agentState, tt]), I(() => {
3689
3728
  if (!$) return;
3690
3729
  const b = L.connectionState;
3691
- (b === "disconnected" || b === "idle") && Nt(!1);
3730
+ (b === "disconnected" || b === "idle") && It(!1);
3692
3731
  }, [$, L.connectionState]), I(() => {
3693
- if (!$ || !L.videoElement || Je) return;
3694
- const b = setTimeout(() => Nt(!0), 5e3);
3732
+ if (!$ || !L.videoElement || tt) return;
3733
+ const b = setTimeout(() => It(!0), 5e3);
3695
3734
  return () => clearTimeout(b);
3696
- }, [$, L.videoElement, Je]), I(() => {
3735
+ }, [$, L.videoElement, tt]), I(() => {
3697
3736
  const b = L.videoElement;
3698
3737
  if (b) {
3699
3738
  if (!$) {
3700
3739
  b.style.filter = "";
3701
3740
  return;
3702
3741
  }
3703
- b.style.transition = "filter 500ms ease-out", b.style.filter = Je ? "" : "blur(8px)";
3742
+ b.style.transition = "filter 500ms ease-out", b.style.filter = tt ? "" : "blur(8px)";
3704
3743
  }
3705
- }, [$, L.videoElement, Je]), I(() => {
3744
+ }, [$, L.videoElement, tt]), I(() => {
3706
3745
  const b = L.audioElement;
3707
3746
  if (!b) return;
3708
3747
  const d = document.createElement("div");
3709
- d.className = "ll-audio-sink", d.setAttribute("aria-hidden", "true"), d.style.cssText = "position:absolute;width:0;height:0;overflow:hidden;clip:rect(0 0 0 0);pointer-events:none;", d.appendChild(b), document.body.appendChild(d), Le.attach(b);
3748
+ d.className = "ll-audio-sink", d.setAttribute("aria-hidden", "true"), d.style.cssText = "position:absolute;width:0;height:0;overflow:hidden;clip:rect(0 0 0 0);pointer-events:none;", d.appendChild(b), document.body.appendChild(d), Ce.attach(b);
3710
3749
  const ie = b.play();
3711
- return ie && typeof ie.catch == "function" && ie.catch((ce) => {
3712
- (ce == null ? void 0 : ce.name) === "NotAllowedError" && ke(!0);
3750
+ return ie && typeof ie.catch == "function" && ie.catch((ue) => {
3751
+ (ue == null ? void 0 : ue.name) === "NotAllowedError" && Ee(!0);
3713
3752
  }), () => {
3714
- Le.detach(), b.parentNode === d && d.removeChild(b), d.parentNode === document.body && document.body.removeChild(d);
3753
+ Ce.detach(), b.parentNode === d && d.removeChild(b), d.parentNode === document.body && document.body.removeChild(d);
3715
3754
  };
3716
3755
  }, [L.audioElement]);
3717
- const ve = Mr({
3756
+ const we = $r({
3718
3757
  gateUntilAgentReady: !0,
3719
3758
  agentState: L.agentState
3720
3759
  });
@@ -3722,26 +3761,26 @@ const ho = /* @__PURE__ */ new Set([
3722
3761
  if (L.isControlled || L.connectionState !== "connected") return;
3723
3762
  const b = L.getRoom();
3724
3763
  if (b)
3725
- return ve.setupMic(b).then(() => {
3726
- const d = ve.getMicStream();
3727
- d && Le.attachStream(d, "mic");
3764
+ return we.setupMic(b).then(() => {
3765
+ const d = we.getMicStream();
3766
+ d && Ce.attachStream(d, "mic");
3728
3767
  }).catch(() => {
3729
3768
  }), () => {
3730
- Le.detachSlot("mic"), ve.teardownMic();
3769
+ Ce.detachSlot("mic"), we.teardownMic();
3731
3770
  };
3732
3771
  }, [L.isControlled, L.connectionState]), I(() => {
3733
3772
  var d;
3734
3773
  if (L.connectionState !== "connected") return;
3735
3774
  const b = L.isControlled ? (d = F == null ? void 0 : F.getRoom) == null ? void 0 : d.call(F) : L.getRoom();
3736
3775
  if (b)
3737
- return Ce.attachRoom(b), Be.attachRoom(b), L.isControlled && ve.attachRoom(b), Xe.refresh(), () => {
3738
- Ce.teardown(), Be.teardown();
3776
+ return Se.attachRoom(b), Ue.attachRoom(b), L.isControlled && we.attachRoom(b), Qe.refresh(), () => {
3777
+ Se.teardown(), Ue.teardown();
3739
3778
  };
3740
3779
  }, [L.isControlled, L.connectionState, F]), I(() => {
3741
3780
  const b = L.audioElement;
3742
3781
  b && (b.muted = re);
3743
3782
  }, [L.audioElement, re]);
3744
- const ir = C((b) => {
3783
+ const pr = k((b) => {
3745
3784
  const d = { type: "user_message", text: b };
3746
3785
  if (F != null && F.publishData) {
3747
3786
  try {
@@ -3753,210 +3792,210 @@ const ho = /* @__PURE__ */ new Set([
3753
3792
  const ie = L.getRoom();
3754
3793
  if (ie)
3755
3794
  try {
3756
- const ce = new TextEncoder().encode(JSON.stringify(d));
3757
- ie.localParticipant.publishData(ce, { reliable: !0 });
3795
+ const ue = new TextEncoder().encode(JSON.stringify(d));
3796
+ ie.localParticipant.publishData(ue, { reliable: !0 });
3758
3797
  } catch {
3759
3798
  }
3760
- }, [L, F]), or = C(() => {
3761
- rr((b) => !b);
3799
+ }, [L, F]), hr = k(() => {
3800
+ fr((b) => !b);
3762
3801
  }, []);
3763
3802
  I(() => {
3764
- $e == null || $e(L.connectionState), L.connectionState === "connected" ? Ue == null || Ue() : L.connectionState === "disconnected" && (De == null || De());
3765
- }, [L.connectionState, Ue, De, $e]), I(() => {
3766
- Pe == null || Pe(L.transcript);
3767
- }, [L.transcript, Pe]), I(() => {
3768
- ze == null || ze(L.agentState);
3769
- }, [L.agentState, ze]), I(() => {
3770
- Et.setThinking(L.agentState === "thinking");
3771
- }, [L.agentState, Et]);
3772
- const cn = T(!1);
3803
+ Fe == null || Fe(L.connectionState), L.connectionState === "connected" ? Ge == null || Ge() : L.connectionState === "disconnected" && ($e == null || $e());
3804
+ }, [L.connectionState, Ge, $e, Fe]), I(() => {
3805
+ He == null || He(L.transcript);
3806
+ }, [L.transcript, He]), I(() => {
3807
+ Oe == null || Oe(L.agentState);
3808
+ }, [L.agentState, Oe]), I(() => {
3809
+ Nt.setThinking(L.agentState === "thinking");
3810
+ }, [L.agentState, Nt]);
3811
+ const hn = T(!1);
3773
3812
  I(() => {
3774
- !m || cn.current || st && L.connectionState === "idle" && (cn.current = !0, L.connect());
3775
- }, [m, L.connectionState, L, st]);
3776
- const lr = C(
3813
+ !m || hn.current || ut && L.connectionState === "idle" && (hn.current = !0, L.connect());
3814
+ }, [m, L.connectionState, L, ut]);
3815
+ const mr = k(
3777
3816
  (b) => {
3778
3817
  const d = v == null ? void 0 : v.find((ie) => ie.id === b);
3779
- d && (dt(!1), b !== Ae && (ut(!0), L.disconnect(), Me || xt(b), y == null || y(d)));
3818
+ d && (pt(!1), b !== Me && (ft(!0), L.disconnect(), Re || kt(b), y == null || y(d)));
3780
3819
  },
3781
3820
  [
3782
3821
  v,
3783
- Ae,
3784
- L,
3785
3822
  Me,
3823
+ L,
3824
+ Re,
3786
3825
  y
3787
3826
  ]
3788
3827
  );
3789
3828
  I(() => {
3790
- Se && L.connectionState === "connected" && ut(!1);
3791
- }, [L.connectionState, Se]), I(() => {
3792
- if (!Ke) return;
3829
+ Ae && L.connectionState === "connected" && ft(!1);
3830
+ }, [L.connectionState, Ae]), I(() => {
3831
+ if (!et) return;
3793
3832
  const b = (d) => {
3794
- d.key === "Escape" && dt(!1);
3833
+ d.key === "Escape" && pt(!1);
3795
3834
  };
3796
3835
  return window.addEventListener("keydown", b), () => window.removeEventListener("keydown", b);
3797
- }, [Ke]);
3798
- const ar = !!K || !!(de != null && de.avatarImageUrl) || L.isControlled, pt = Pr(ct, o, ar);
3799
- qe === void 0 && ((pn = pt.info) != null && pn.capabilities) && (qt.current = pt.info.capabilities);
3800
- const Mt = (de == null ? void 0 : de.name) ?? le ?? ((hn = L.agentConfig) == null ? void 0 : hn.name) ?? ((mn = pt.info) == null ? void 0 : mn.name) ?? "Live Layer", Ut = (de == null ? void 0 : de.avatarImageUrl) ?? K ?? ((gn = L.agentConfig) == null ? void 0 : gn.avatarImageUrl) ?? ((yn = pt.info) == null ? void 0 : yn.avatarImageUrl) ?? null, sr = z ?? ((vn = L.agentConfig) == null ? void 0 : vn.idleLoopUrl) ?? ((bn = pt.info) == null ? void 0 : bn.idleLoopUrl) ?? null, cr = B ?? null, ur = C(() => ye("expanded"), [ye]), dr = C(
3801
- () => ye("minimized"),
3802
- [ye]
3803
- ), un = C(() => {
3804
- L.disconnect(), ye("hidden");
3805
- }, [L, ye]), fr = C(() => {
3836
+ }, [et]);
3837
+ const gr = !!J || !!(de != null && de.avatarImageUrl) || L.isControlled, mt = Wr(dt, o, gr);
3838
+ Ye === void 0 && ((vn = mt.info) != null && vn.capabilities) && (Gt.current = mt.info.capabilities);
3839
+ const Tt = (de == null ? void 0 : de.name) ?? ae ?? ((bn = L.agentConfig) == null ? void 0 : bn.name) ?? ((wn = mt.info) == null ? void 0 : wn.name) ?? "Live Layer", Xt = (de == null ? void 0 : de.avatarImageUrl) ?? J ?? ((_n = L.agentConfig) == null ? void 0 : _n.avatarImageUrl) ?? ((xn = mt.info) == null ? void 0 : xn.avatarImageUrl) ?? null, yr = z ?? ((Ln = L.agentConfig) == null ? void 0 : Ln.idleLoopUrl) ?? ((kn = mt.info) == null ? void 0 : kn.idleLoopUrl) ?? null, vr = B ?? null, br = k(() => be("expanded"), [be]), wr = k(
3840
+ () => be("minimized"),
3841
+ [be]
3842
+ ), mn = k(() => {
3843
+ L.disconnect(), be("hidden");
3844
+ }, [L, be]), _r = k(() => {
3806
3845
  const b = L.audioElement;
3807
- b && b.play().then(() => ke(!1)).catch(() => {
3846
+ b && b.play().then(() => Ee(!1)).catch(() => {
3808
3847
  });
3809
- }, [L.audioElement]), pr = C(() => {
3810
- ke(!1), L.connect();
3811
- }, [L]), Ze = {
3812
- ...Ve,
3813
- ...fe ? {} : { zIndex: xe }
3848
+ }, [L.audioElement]), xr = k(() => {
3849
+ Ee(!1), L.connect();
3850
+ }, [L]), nt = {
3851
+ ...Ke,
3852
+ ...fe ? {} : { zIndex: ke }
3814
3853
  };
3815
- H.primaryColor && (Ze["--ll-color-primary"] = H.primaryColor), H.accentColor && (Ze["--ll-color-accent"] = H.accentColor), H.backgroundColor && (Ze["--ll-color-bg"] = H.backgroundColor), H.textColor && (Ze["--ll-color-fg"] = H.textColor);
3816
- const hr = {
3817
- ...Ze,
3818
- ...Ie.style
3819
- }, mr = [
3854
+ H.primaryColor && (nt["--ll-color-primary"] = H.primaryColor), H.accentColor && (nt["--ll-color-accent"] = H.accentColor), H.backgroundColor && (nt["--ll-color-bg"] = H.backgroundColor), H.textColor && (nt["--ll-color-fg"] = H.textColor);
3855
+ const Lr = {
3856
+ ...nt,
3857
+ ...De.style
3858
+ }, kr = [
3820
3859
  "ll-widget",
3821
3860
  `ll-widget--${pe}`,
3822
- `ll-widget--${ge ? "mobile" : "desktop"}`,
3823
- Ie.hasGeometry ? "ll-widget--has-geometry" : null,
3824
- Ie.isDragging ? "is-dragging" : null,
3825
- Ie.isResizing ? "is-resizing" : null,
3826
- Fe
3861
+ `ll-widget--${ve ? "mobile" : "desktop"}`,
3862
+ De.hasGeometry ? "ll-widget--has-geometry" : null,
3863
+ De.isDragging ? "is-dragging" : null,
3864
+ De.isResizing ? "is-resizing" : null,
3865
+ qe
3827
3866
  ].filter(Boolean).join(" ");
3828
- if (!st) return null;
3829
- const gr = /* @__PURE__ */ r(
3867
+ if (!ut) return null;
3868
+ const Cr = /* @__PURE__ */ r(
3830
3869
  "div",
3831
3870
  {
3832
- className: mr,
3833
- style: hr,
3871
+ className: kr,
3872
+ style: Lr,
3834
3873
  "data-display-mode": pe,
3835
3874
  "data-position": _,
3836
3875
  "data-experience-mode": u === "EMBEDDED" ? "embedded" : "widget",
3837
3876
  children: pe === "expanded" && /* @__PURE__ */ r(
3838
- xi,
3877
+ Ni,
3839
3878
  {
3840
3879
  position: _,
3841
- isMobile: ge,
3842
- agentName: Mt,
3843
- avatarImageUrl: Ut,
3844
- idleLoopUrl: sr,
3845
- greeting: cr,
3880
+ isMobile: ve,
3881
+ agentName: Tt,
3882
+ avatarImageUrl: Xt,
3883
+ idleLoopUrl: yr,
3884
+ greeting: vr,
3846
3885
  branding: H,
3847
3886
  teamMembers: v,
3848
- currentTeamMemberId: Ae,
3849
- isSwitchingTeamMember: Se,
3850
- teamSwitcherOpen: Ke,
3851
- onToggleTeamSwitcher: () => dt((b) => !b),
3852
- onSelectTeamMember: lr,
3887
+ currentTeamMemberId: Me,
3888
+ isSwitchingTeamMember: Ae,
3889
+ teamSwitcherOpen: et,
3890
+ onToggleTeamSwitcher: () => pt((b) => !b),
3891
+ onSelectTeamMember: mr,
3853
3892
  connectionState: L.connectionState,
3854
3893
  agentState: L.agentState,
3855
3894
  transcript: L.transcript,
3856
- isMuted: ve.isMuted,
3857
- micDevices: Xe.mics,
3858
- activeMicId: ve.activeDeviceId,
3859
- isCameraEnabled: Ce.isEnabled,
3860
- cameraPreviewEl: Ce.previewEl,
3861
- cameraDevices: Xe.cameras,
3862
- activeCameraId: Ce.activeDeviceId,
3863
- isScreenShareEnabled: Be.isEnabled,
3864
- screenPreviewEl: Be.previewEl,
3895
+ isMuted: we.isMuted,
3896
+ micDevices: Qe.mics,
3897
+ activeMicId: we.activeDeviceId,
3898
+ isCameraEnabled: Se.isEnabled,
3899
+ cameraPreviewEl: Se.previewEl,
3900
+ cameraDevices: Qe.cameras,
3901
+ activeCameraId: Se.activeDeviceId,
3902
+ isScreenShareEnabled: Ue.isEnabled,
3903
+ screenPreviewEl: Ue.previewEl,
3865
3904
  isSpeakerMuted: re,
3866
3905
  allowCamera: G,
3867
3906
  allowScreenShare: f,
3868
3907
  allowTyping: A,
3869
- showMinimize: ge && !fe ? !1 : Ge,
3870
- showClose: Ct,
3908
+ showMinimize: ve && !fe ? !1 : Ze,
3909
+ showClose: St,
3871
3910
  chromeless: ee,
3872
- compactControls: kt,
3911
+ compactControls: Et,
3873
3912
  transforming: oe,
3874
3913
  transformingLabel: U,
3875
- languageMenuOpen: St,
3914
+ languageMenuOpen: At,
3876
3915
  onToggleLanguageMenu: () => x((b) => !b),
3877
- needsUserGesture: Ht,
3916
+ needsUserGesture: qt,
3878
3917
  canResume: L.canResume,
3879
- micError: ve.micError,
3918
+ micError: we.micError,
3880
3919
  error: L.error,
3881
- avatarVideoContainerRef: sn,
3920
+ avatarVideoContainerRef: pn,
3882
3921
  agentVideoEl: L.videoElement,
3883
3922
  onConnect: () => void L.connect(),
3884
3923
  onDisconnect: () => L.disconnect(),
3885
- onRetry: pr,
3886
- onResumeAudio: fr,
3887
- onToggleMute: ve.toggleMute,
3888
- onSwitchMicDevice: (b) => void ve.switchDevice(b),
3889
- onToggleCamera: () => void Ce.toggle(),
3890
- onSwitchCameraDevice: (b) => void Ce.switchDevice(b),
3891
- onToggleScreenShare: () => void Be.toggle(),
3892
- onToggleSpeaker: or,
3893
- onSendMessage: ir,
3894
- onMinimize: dr,
3895
- onClose: un,
3896
- onClearMicError: ve.clearError,
3897
- dragHandleProps: Ie.dragHandleProps,
3898
- resizeHandleProps: Ie.resizeHandleProps
3924
+ onRetry: xr,
3925
+ onResumeAudio: _r,
3926
+ onToggleMute: we.toggleMute,
3927
+ onSwitchMicDevice: (b) => void we.switchDevice(b),
3928
+ onToggleCamera: () => void Se.toggle(),
3929
+ onSwitchCameraDevice: (b) => void Se.switchDevice(b),
3930
+ onToggleScreenShare: () => void Ue.toggle(),
3931
+ onToggleSpeaker: hr,
3932
+ onSendMessage: pr,
3933
+ onMinimize: wr,
3934
+ onClose: mn,
3935
+ onClearMicError: we.clearError,
3936
+ dragHandleProps: De.dragHandleProps,
3937
+ resizeHandleProps: De.resizeHandleProps
3899
3938
  }
3900
3939
  )
3901
3940
  }
3902
- ), dn = !fe && (pe === "hidden" || pe === "minimized") ? /* @__PURE__ */ S(
3941
+ ), gn = !fe && (pe === "hidden" || pe === "minimized") ? /* @__PURE__ */ S(
3903
3942
  "div",
3904
3943
  {
3905
3944
  className: [
3906
3945
  "ll-widget",
3907
3946
  "ll-widget--floating",
3908
3947
  `ll-widget--${pe}`,
3909
- `ll-widget--${ge ? "mobile" : "desktop"}`
3948
+ `ll-widget--${ve ? "mobile" : "desktop"}`
3910
3949
  ].join(" "),
3911
- style: Ze,
3950
+ style: nt,
3912
3951
  "data-display-mode": pe,
3913
3952
  "data-position": _,
3914
3953
  children: [
3915
3954
  pe === "hidden" && /* @__PURE__ */ r(
3916
- di,
3955
+ vi,
3917
3956
  {
3918
3957
  position: _,
3919
- isMobile: ge,
3958
+ isMobile: ve,
3920
3959
  isSpeaking: L.agentState === "speaking",
3921
- onExpand: () => ye("expanded"),
3922
- label: `Open ${Mt} widget`,
3923
- avatarImageUrl: Ut,
3924
- agentName: Mt,
3925
- containerEl: V
3960
+ onExpand: () => be("expanded"),
3961
+ label: `Open ${Tt} widget`,
3962
+ avatarImageUrl: Xt,
3963
+ agentName: Tt,
3964
+ containerEl: W
3926
3965
  }
3927
3966
  ),
3928
3967
  pe === "minimized" && /* @__PURE__ */ r(
3929
- pi,
3968
+ wi,
3930
3969
  {
3931
3970
  position: _,
3932
- isMobile: ge,
3933
- agentName: Mt,
3934
- avatarImageUrl: Ut,
3971
+ isMobile: ve,
3972
+ agentName: Tt,
3973
+ avatarImageUrl: Xt,
3935
3974
  agentState: L.agentState,
3936
- isMuted: ve.isMuted,
3937
- audioLevel: Le,
3938
- onExpand: ur,
3939
- onToggleMute: ve.toggleMute,
3940
- onClose: un
3975
+ isMuted: we.isMuted,
3976
+ audioLevel: Ce,
3977
+ onExpand: br,
3978
+ onToggleMute: we.toggleMute,
3979
+ onClose: mn
3941
3980
  }
3942
3981
  )
3943
3982
  ]
3944
3983
  }
3945
- ) : null, fn = V ?? (typeof document < "u" ? document.body : null);
3946
- return /* @__PURE__ */ S(We, { children: [
3947
- gr,
3948
- dn && fn && en(dn, fn)
3984
+ ) : null, yn = W ?? (typeof document < "u" ? document.body : null);
3985
+ return /* @__PURE__ */ S(Ve, { children: [
3986
+ Cr,
3987
+ gn && yn && ln(gn, yn)
3949
3988
  ] });
3950
3989
  }
3951
3990
  );
3952
- nr.displayName = "AvatarWidgetInner";
3953
- const mo = Qt(
3991
+ dr.displayName = "AvatarWidgetInner";
3992
+ const xo = on(
3954
3993
  function(t, n) {
3955
- return /* @__PURE__ */ r(Sr, { children: /* @__PURE__ */ r(nr, { ...t, ref: n }) });
3994
+ return /* @__PURE__ */ r(Rr, { children: /* @__PURE__ */ r(dr, { ...t, ref: n }) });
3956
3995
  }
3957
3996
  );
3958
- mo.displayName = "AvatarWidget";
3959
- const So = ({
3997
+ xo.displayName = "AvatarWidget";
3998
+ const Ro = ({
3960
3999
  agentId: e,
3961
4000
  baseUrl: t,
3962
4001
  apiKey: n,
@@ -3967,10 +4006,10 @@ const So = ({
3967
4006
  }) => {
3968
4007
  const a = T(null), c = T(null), u = T(l);
3969
4008
  u.current = l;
3970
- const m = C((p) => {
3971
- var D;
4009
+ const m = k((p) => {
4010
+ var P;
3972
4011
  const h = p.detail;
3973
- (D = u.current) == null || D.call(u, h);
4012
+ (P = u.current) == null || P.call(u, h);
3974
4013
  }, []);
3975
4014
  return I(() => {
3976
4015
  const p = a.current;
@@ -3982,9 +4021,9 @@ const So = ({
3982
4021
  }, [e]), I(() => {
3983
4022
  c.current && (i ? c.current.setAttribute("mode", i) : c.current.removeAttribute("mode"));
3984
4023
  }, [i]), /* @__PURE__ */ r("div", { ref: a, className: o, style: s });
3985
- }, Eo = Qt(
4024
+ }, Do = on(
3986
4025
  function({ id: t, intent: n, as: i = "div", className: l, style: o, children: s }, a) {
3987
- return _r(
4026
+ return Ar(
3988
4027
  i,
3989
4028
  {
3990
4029
  ref: a,
@@ -3997,19 +4036,19 @@ const So = ({
3997
4036
  );
3998
4037
  }
3999
4038
  );
4000
- function Ao(e = {}) {
4039
+ function Po(e = {}) {
4001
4040
  const { onFieldUpdate: t, onComplete: n, source: i = "all" } = e, [l, o] = M({}), [s, a] = M(!1), [c, u] = M(null), m = T(t), p = T(n), h = T(i);
4002
4041
  I(() => {
4003
4042
  m.current = t, p.current = n, h.current = i;
4004
4043
  }, [t, n, i]);
4005
- const D = C(() => {
4044
+ const P = k(() => {
4006
4045
  o({}), a(!1);
4007
4046
  }, []);
4008
4047
  return I(() => {
4009
4048
  if (typeof window > "u") return;
4010
- const _ = (k) => {
4011
- var w, R;
4012
- const g = k.detail;
4049
+ const _ = (C) => {
4050
+ var w, D;
4051
+ const g = C.detail;
4013
4052
  if (g) {
4014
4053
  if (g.phase === "field") {
4015
4054
  if (h.current !== "all" && g.source !== h.current)
@@ -4030,7 +4069,7 @@ function Ao(e = {}) {
4030
4069
  return;
4031
4070
  u(E), a(!1);
4032
4071
  try {
4033
- (R = p.current) == null || R.call(p, E);
4072
+ (D = p.current) == null || D.call(p, E);
4034
4073
  } catch (v) {
4035
4074
  console.warn("[LiveLayer] useCollect onComplete threw.", v);
4036
4075
  }
@@ -4038,16 +4077,16 @@ function Ao(e = {}) {
4038
4077
  }
4039
4078
  };
4040
4079
  return document.addEventListener("ll-collected", _), () => document.removeEventListener("ll-collected", _);
4041
- }, []), { fields: l, isCollecting: s, lastResult: c, reset: D };
4080
+ }, []), { fields: l, isCollecting: s, lastResult: c, reset: P };
4042
4081
  }
4043
- let qn = 1;
4044
- function No({
4082
+ let Zn = 1;
4083
+ function zo({
4045
4084
  onMount: e,
4046
4085
  defaultOpen: t = !1,
4047
4086
  storageKey: n = "ll-debug-open"
4048
4087
  }) {
4049
- const [i, l] = M(t), [o, s] = M([]), [a, c] = M(""), [u, m] = M(!1), p = T(/* @__PURE__ */ new Set()), h = T([]), D = T(u);
4050
- D.current = u, I(() => {
4088
+ const [i, l] = M(t), [o, s] = M([]), [a, c] = M(""), [u, m] = M(!1), p = T(/* @__PURE__ */ new Set()), h = T([]), P = T(u);
4089
+ P.current = u, I(() => {
4051
4090
  try {
4052
4091
  const g = localStorage.getItem(n);
4053
4092
  g === "1" && l(!0), g === "0" && l(!1);
@@ -4060,15 +4099,15 @@ function No({
4060
4099
  }
4061
4100
  }, [i, n]), I(() => {
4062
4101
  const g = (w) => {
4063
- (w.metaKey || w.ctrlKey) && w.shiftKey && w.key.toLowerCase() === "l" && (w.preventDefault(), l((R) => !R));
4102
+ (w.metaKey || w.ctrlKey) && w.shiftKey && w.key.toLowerCase() === "l" && (w.preventDefault(), l((D) => !D));
4064
4103
  };
4065
4104
  return window.addEventListener("keydown", g), () => window.removeEventListener("keydown", g);
4066
4105
  }, []), I(() => {
4067
4106
  const g = setInterval(() => {
4068
- if (h.current.length === 0 || D.current) return;
4107
+ if (h.current.length === 0 || P.current) return;
4069
4108
  const w = h.current.splice(0, h.current.length);
4070
4109
  s(
4071
- (R) => [...w.reverse(), ...R].slice(0, 200)
4110
+ (D) => [...w.reverse(), ...D].slice(0, 200)
4072
4111
  );
4073
4112
  }, 100);
4074
4113
  return () => clearInterval(g);
@@ -4077,7 +4116,7 @@ function No({
4077
4116
  if (I(() => {
4078
4117
  !e || _.current || (_.current = !0, e((g) => {
4079
4118
  h.current.push({
4080
- id: qn++,
4119
+ id: Zn++,
4081
4120
  ts: Date.now(),
4082
4121
  kind: "event",
4083
4122
  type: g.eventName,
@@ -4085,21 +4124,21 @@ function No({
4085
4124
  });
4086
4125
  }));
4087
4126
  }, [e]), I(() => {
4088
- const g = console.warn, w = console.log, R = (E, v) => function(...O) {
4127
+ const g = console.warn, w = console.log, D = (E, v) => function(...O) {
4089
4128
  try {
4090
4129
  const y = typeof O[0] == "string" ? O[0] : "";
4091
4130
  y.startsWith("[LiveLayer]") && h.current.push({
4092
- id: qn++,
4131
+ id: Zn++,
4093
4132
  ts: Date.now(),
4094
4133
  kind: E,
4095
4134
  type: y.slice(0, 120),
4096
- data: { args: O.slice(1).map((z) => yo(z)) }
4135
+ data: { args: O.slice(1).map((z) => ko(z)) }
4097
4136
  });
4098
4137
  } catch {
4099
4138
  }
4100
4139
  return v.apply(this, O);
4101
4140
  };
4102
- return console.warn = R("warn", g), console.log = R("log", w), () => {
4141
+ return console.warn = D("warn", g), console.log = D("log", w), () => {
4103
4142
  console.warn = g, console.log = w;
4104
4143
  };
4105
4144
  }, []), !i)
@@ -4129,7 +4168,7 @@ function No({
4129
4168
  children: "🛰 LL debug"
4130
4169
  }
4131
4170
  );
4132
- const k = o.filter((g) => {
4171
+ const C = o.filter((g) => {
4133
4172
  if (!a) return !0;
4134
4173
  const w = a.toLowerCase();
4135
4174
  return g.type.toLowerCase().includes(w) || JSON.stringify(g.data || {}).toLowerCase().includes(w);
@@ -4180,7 +4219,7 @@ function No({
4180
4219
  {
4181
4220
  type: "button",
4182
4221
  onClick: () => m((g) => !g),
4183
- style: Kt(u ? "#f59e0b" : "transparent"),
4222
+ style: tn(u ? "#f59e0b" : "transparent"),
4184
4223
  title: "Pause / resume capture",
4185
4224
  children: u ? "▶ resume" : "⏸ pause"
4186
4225
  }
@@ -4192,7 +4231,7 @@ function No({
4192
4231
  onClick: () => {
4193
4232
  s([]), h.current = [];
4194
4233
  },
4195
- style: Kt("transparent"),
4234
+ style: tn("transparent"),
4196
4235
  title: "Clear buffer",
4197
4236
  children: "clear"
4198
4237
  }
@@ -4202,7 +4241,7 @@ function No({
4202
4241
  {
4203
4242
  type: "button",
4204
4243
  onClick: () => l(!1),
4205
- style: Kt("transparent"),
4244
+ style: tn("transparent"),
4206
4245
  "aria-label": "Close",
4207
4246
  title: "Close (Cmd/Ctrl + Shift + L)",
4208
4247
  children: "✕"
@@ -4238,7 +4277,7 @@ function No({
4238
4277
  overflowY: "auto",
4239
4278
  padding: "0 8px 8px"
4240
4279
  },
4241
- children: k.length === 0 ? /* @__PURE__ */ S(
4280
+ children: C.length === 0 ? /* @__PURE__ */ S(
4242
4281
  "div",
4243
4282
  {
4244
4283
  style: {
@@ -4268,8 +4307,8 @@ function No({
4268
4307
  )
4269
4308
  ]
4270
4309
  }
4271
- ) : k.map((g) => /* @__PURE__ */ r(
4272
- go,
4310
+ ) : C.map((g) => /* @__PURE__ */ r(
4311
+ Lo,
4273
4312
  {
4274
4313
  entry: g,
4275
4314
  expanded: p.current.has(g.id),
@@ -4285,7 +4324,7 @@ function No({
4285
4324
  }
4286
4325
  );
4287
4326
  }
4288
- function go({
4327
+ function Lo({
4289
4328
  entry: e,
4290
4329
  expanded: t,
4291
4330
  onToggle: n
@@ -4355,7 +4394,7 @@ function go({
4355
4394
  }
4356
4395
  );
4357
4396
  }
4358
- function Kt(e) {
4397
+ function tn(e) {
4359
4398
  return {
4360
4399
  background: e,
4361
4400
  color: "#fff",
@@ -4366,22 +4405,22 @@ function Kt(e) {
4366
4405
  cursor: "pointer"
4367
4406
  };
4368
4407
  }
4369
- function yo(e) {
4408
+ function ko(e) {
4370
4409
  try {
4371
4410
  return e instanceof Error ? { message: e.message, stack: e.stack } : (JSON.stringify(e), e);
4372
4411
  } catch {
4373
4412
  return String(e);
4374
4413
  }
4375
4414
  }
4376
- function vo(e) {
4415
+ function Co(e) {
4377
4416
  const t = JSON.stringify(e);
4378
- I(() => Lr(e), [t]);
4417
+ I(() => Mr(e), [t]);
4379
4418
  }
4380
- function Mo({ fields: e, children: t }) {
4381
- return vo(e), /* @__PURE__ */ r(We, { children: t });
4419
+ function $o({ fields: e, children: t }) {
4420
+ return Co(e), /* @__PURE__ */ r(Ve, { children: t });
4382
4421
  }
4383
- function Io() {
4384
- const [e, t] = M([]), n = C((l) => {
4422
+ function Ho() {
4423
+ const [e, t] = M([]), n = k((l) => {
4385
4424
  t((o) => {
4386
4425
  const s = o.findIndex((a) => a.id === l.id);
4387
4426
  if (s >= 0) {
@@ -4390,7 +4429,7 @@ function Io() {
4390
4429
  }
4391
4430
  return [...o, l];
4392
4431
  });
4393
- }, []), i = C(() => t([]), []);
4432
+ }, []), i = k(() => t([]), []);
4394
4433
  return {
4395
4434
  entries: e,
4396
4435
  pushSegment: n,
@@ -4399,38 +4438,38 @@ function Io() {
4399
4438
  };
4400
4439
  }
4401
4440
  export {
4402
- mo as AvatarWidget,
4403
- Sr as ErrorBoundary,
4404
- Mo as FieldProvider,
4405
- No as LiveLayerDebugPanel,
4406
- Eo as LiveLayerRegion,
4407
- So as LiveLayerWidget,
4408
- Do as clearFieldRegistry,
4409
- Gi as clearPageContextCache,
4410
- eo as clearRoutesCache,
4411
- Vi as extractPageContext,
4412
- Zi as extractRoutes,
4413
- On as getCachedPageContext,
4414
- Gt as getCachedRoutes,
4415
- Po as getRegisteredFields,
4416
- ti as matchesPattern,
4417
- Ki as normalizeRouteInput,
4418
- zo as registerFields,
4419
- $o as setFieldValue,
4420
- ni as shouldRenderAtPath,
4421
- Pr as useAgentInfo,
4422
- Ar as useAudioLevel,
4423
- Tr as useCameraState,
4424
- Ao as useCollect,
4425
- $r as useDisplayMode,
4426
- Fr as useDisplayModePersistence,
4427
- Wr as useIsMobile,
4428
- Er as useLiveKitSession,
4429
- Dr as useMediaDevices,
4430
- Mr as useMicrophoneState,
4431
- Kr as usePathname,
4432
- vo as useRegisterFields,
4433
- ri as useRouteMatch,
4434
- Rr as useScreenShareState,
4435
- Io as useTranscript
4441
+ xo as AvatarWidget,
4442
+ Rr as ErrorBoundary,
4443
+ $o as FieldProvider,
4444
+ zo as LiveLayerDebugPanel,
4445
+ Do as LiveLayerRegion,
4446
+ Ro as LiveLayerWidget,
4447
+ Bo as clearFieldRegistry,
4448
+ to as clearPageContextCache,
4449
+ ao as clearRoutesCache,
4450
+ Qi as extractPageContext,
4451
+ oo as extractRoutes,
4452
+ Gn as getCachedPageContext,
4453
+ Qt as getCachedRoutes,
4454
+ Wo as getRegisteredFields,
4455
+ si as matchesPattern,
4456
+ ro as normalizeRouteInput,
4457
+ qo as registerFields,
4458
+ Uo as setFieldValue,
4459
+ ci as shouldRenderAtPath,
4460
+ Wr as useAgentInfo,
4461
+ Pr as useAudioLevel,
4462
+ Or as useCameraState,
4463
+ Po as useCollect,
4464
+ Ur as useDisplayMode,
4465
+ Yr as useDisplayModePersistence,
4466
+ Xr as useIsMobile,
4467
+ Dr as useLiveKitSession,
4468
+ Br as useMediaDevices,
4469
+ $r as useMicrophoneState,
4470
+ ri as usePathname,
4471
+ Co as useRegisterFields,
4472
+ ui as useRouteMatch,
4473
+ Fr as useScreenShareState,
4474
+ Ho as useTranscript
4436
4475
  };