@elevenlabs/convai-widget-core 0.5.0 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  var ra = Object.defineProperty;
2
2
  var oa = (e, t, n) => t in e ? ra(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var oe = (e, t, n) => oa(e, typeof t != "symbol" ? t + "" : t, n);
3
+ var ae = (e, t, n) => oa(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import aa from "preact-custom-element";
5
- import { jsx as u, jsxs as _, Fragment as rt } from "preact/jsx-runtime";
5
+ import { jsx as u, jsxs as A, Fragment as rt } from "preact/jsx-runtime";
6
6
  import * as h from "preact/compat";
7
- import De, { useContext as ia, createContext as de, useMemo as Ae, useRef as J, useEffect as Ue, memo as vr, useState as Ie, useCallback as ee, forwardRef as sa, useLayoutEffect as la } from "preact/compat";
8
- import { signal as he, computed as Ce, useSignal as Q, useComputed as Y, useSignalEffect as Ee } from "@preact/signals";
7
+ import De, { useContext as ia, createContext as de, useMemo as Ae, useRef as ee, useEffect as Ue, memo as vr, useState as Ie, useCallback as te, forwardRef as sa, useLayoutEffect as la } from "preact/compat";
8
+ import { signal as he, computed as Ce, useSignal as J, useComputed as Y, useSignalEffect as Ee } from "@preact/signals";
9
9
  import { Conversation as ca, postOverallFeedback as Vn } from "@elevenlabs/client";
10
10
  import { clsx as V } from "clsx";
11
- import { jsx as E, jsxs as Nt, Fragment as gn } from "preact/compat/jsx-runtime";
11
+ import { jsx as T, jsxs as Nt, Fragment as mn } from "preact/compat/jsx-runtime";
12
12
  import { useMemo as ua, useCallback as Be } from "preact/hooks";
13
13
  function Re(e) {
14
14
  return e ? e === "true" ? !0 : e === "false" ? !1 : null : null;
@@ -56,7 +56,7 @@ const pa = [
56
56
  function ha(e) {
57
57
  return pa.includes(e) ? e : "bottom-right";
58
58
  }
59
- const mr = {
59
+ const gr = {
60
60
  main_label: "Need help?",
61
61
  start_call: "Start a call",
62
62
  start_chat: "Start a chat",
@@ -91,8 +91,8 @@ const mr = {
91
91
  submit: "Submit",
92
92
  go_back: "Go back"
93
93
  }, va = Object.keys(
94
- mr
95
- ), gr = {
94
+ gr
95
+ ), mr = {
96
96
  base: "#ffffff",
97
97
  base_hover: "#f9fafb",
98
98
  base_active: "#f3f4f6",
@@ -113,10 +113,10 @@ const mr = {
113
113
  sheet_radius: "calc(var(--el-button-radius) + 6px)",
114
114
  compact_sheet_radius: "calc(var(--el-button-radius) + 12px)",
115
115
  dropdown_sheet_radius: "calc(var(--el-input-radius) + 6px)"
116
- }, ma = Object.keys(
117
- gr
116
+ }, ga = Object.keys(
117
+ mr
118
118
  );
119
- function ga(e = "us") {
119
+ function ma(e = "us") {
120
120
  switch (e) {
121
121
  case "eu-residency":
122
122
  case "in-residency":
@@ -155,15 +155,15 @@ function wa({
155
155
  function ba() {
156
156
  return fe(wr);
157
157
  }
158
- function F(e) {
158
+ function B(e) {
159
159
  return ba()[e];
160
160
  }
161
161
  const br = de(null);
162
162
  function xa({
163
163
  children: e
164
164
  }) {
165
- const t = F("server-location"), n = Ae(() => {
166
- const r = Ce(() => ga(t.value)), o = {
165
+ const t = B("server-location"), n = Ae(() => {
166
+ const r = Ce(() => ma(t.value)), o = {
167
167
  us: "https://api.us.elevenlabs.io",
168
168
  "eu-residency": "https://api.eu.residency.elevenlabs.io",
169
169
  "in-residency": "https://api.in.residency.elevenlabs.io",
@@ -231,7 +231,7 @@ const xr = de(null);
231
231
  function ya({
232
232
  children: e
233
233
  }) {
234
- const t = q(), n = F("language"), r = F("override-language"), o = Q(
234
+ const t = q(), n = B("language"), r = B("override-language"), o = J(
235
235
  n.peek() ?? t.peek().language
236
236
  ), a = Y(
237
237
  () => (t.value.supported_language_overrides ?? []).filter(
@@ -257,11 +257,11 @@ function ya({
257
257
  function at() {
258
258
  return fe(xr);
259
259
  }
260
- const Ca = "0.5.0", yr = de(null);
260
+ const Ca = "0.5.2", yr = de(null);
261
261
  function Sa({ children: e }) {
262
262
  const t = q(), n = Y(
263
263
  () => t.value.mic_muting_enabled ?? !1
264
- ), r = Q(!1), o = Ae(
264
+ ), r = J(!1), o = Ae(
265
265
  () => ({
266
266
  isMuted: Ce(
267
267
  () => n.value ? r.value : (
@@ -286,7 +286,7 @@ const Sr = de(null);
286
286
  function ka({
287
287
  children: e
288
288
  }) {
289
- const { language: t } = at(), n = F("override-prompt"), r = F("override-first-message"), o = F("override-voice-id"), a = F("override-text-only"), i = F("user-id"), s = Y(() => ({
289
+ const { language: t } = at(), n = B("override-prompt"), r = B("override-first-message"), o = B("override-voice-id"), a = B("override-text-only"), i = B("user-id"), s = Y(() => ({
290
290
  agent: {
291
291
  prompt: {
292
292
  prompt: n.value
@@ -300,31 +300,31 @@ function ka({
300
300
  conversation: {
301
301
  textOnly: Re(a.value) ?? void 0
302
302
  }
303
- })), l = F("dynamic-variables"), c = Y(() => {
303
+ })), l = B("dynamic-variables"), c = Y(() => {
304
304
  if (l.value)
305
305
  try {
306
306
  return JSON.parse(l.value);
307
- } catch (m) {
307
+ } catch (g) {
308
308
  console.error(
309
- `[ConversationalAI] Cannot parse dynamic-variables: ${m == null ? void 0 : m.message}`
309
+ `[ConversationalAI] Cannot parse dynamic-variables: ${g == null ? void 0 : g.message}`
310
310
  );
311
311
  }
312
- }), { webSocketUrl: f } = wn(), p = F("agent-id"), v = F("signed-url"), g = bn(), b = Ia(), d = Y(() => {
313
- const m = b.value, w = {
312
+ }), { webSocketUrl: d } = wn(), p = B("agent-id"), v = B("signed-url"), m = bn(), x = Ia(), f = Y(() => {
313
+ const g = x.value, w = {
314
314
  dynamicVariables: c.value,
315
315
  overrides: s.value,
316
316
  connectionDelay: { default: 300 },
317
- textOnly: g.value,
317
+ textOnly: m.value,
318
318
  userId: i.value || void 0
319
319
  };
320
- return p.value ? m ? {
320
+ return p.value ? g ? {
321
321
  agentId: p.value,
322
- origin: f.value,
322
+ origin: d.value,
323
323
  connectionType: "webrtc",
324
324
  ...w
325
325
  } : {
326
326
  agentId: p.value,
327
- origin: f.value,
327
+ origin: d.value,
328
328
  connectionType: "websocket",
329
329
  ...w
330
330
  } : v.value ? {
@@ -335,10 +335,10 @@ function ka({
335
335
  "[ConversationalAI] Either agent-id or signed-url is required"
336
336
  ), null);
337
337
  });
338
- return d.value ? /* @__PURE__ */ u(
338
+ return f.value ? /* @__PURE__ */ u(
339
339
  Sr.Provider,
340
340
  {
341
- value: d,
341
+ value: f,
342
342
  children: e
343
343
  }
344
344
  ) : null;
@@ -362,11 +362,11 @@ function Ta({ children: e }) {
362
362
  acceptTerms: () => {
363
363
  i.value = !0, a.value = !1;
364
364
  const c = t.peek().terms_key;
365
- c && localStorage.setItem(c, "true"), l.forEach((f) => f.resolve()), l = [];
365
+ c && localStorage.setItem(c, "true"), l.forEach((d) => d.resolve()), l = [];
366
366
  },
367
367
  requestTerms: async () => {
368
- s.peek() || (a.value = !0, await new Promise((c, f) => {
369
- l.push({ resolve: c, reject: f });
368
+ s.peek() || (a.value = !0, await new Promise((c, d) => {
369
+ l.push({ resolve: c, reject: d });
370
370
  }));
371
371
  }
372
372
  };
@@ -395,153 +395,153 @@ function Aa({ children: e }) {
395
395
  }
396
396
  }), /* @__PURE__ */ u(Er.Provider, { value: t, children: e });
397
397
  }
398
- function re() {
398
+ function oe() {
399
399
  return fe(Er);
400
400
  }
401
401
  function _a() {
402
- const e = J(null), t = J(null), n = J(!1), r = J(null), o = J(!1), a = q();
403
- Ar();
404
- const i = Bt(), s = Ea(), { isMuted: l } = Cr();
402
+ const e = ee(null), t = ee(null), n = ee(!1), r = ee(null), o = ee(!1), a = q(), i = Ar(), s = Bt(), l = Ea(), { isMuted: c } = Cr();
405
403
  return Ee(() => {
406
- var f;
407
- const c = l.value;
408
- (f = e == null ? void 0 : e.current) == null || f.setMicMuted(c);
404
+ var p;
405
+ const d = c.value;
406
+ (p = e == null ? void 0 : e.current) == null || p.setMicMuted(d);
409
407
  }), Ue(() => () => {
410
- var c;
411
- (c = e.current) == null || c.endSession();
408
+ var d;
409
+ (d = e.current) == null || d.endSession();
412
410
  }, []), Ae(() => {
413
- const c = he("disconnected"), f = Ce(() => c.value === "disconnected"), p = he("listening"), v = Ce(() => p.value === "speaking"), g = he(null), b = he(null), d = he(!1), m = he([]), w = he(0), y = he(null);
411
+ const d = he("disconnected"), p = Ce(() => d.value === "disconnected"), v = he("listening"), m = Ce(() => v.value === "speaking"), x = he(null), f = he(null), g = he(!1), w = he([]), b = he(0), y = he(null);
414
412
  return {
415
- status: c,
416
- isSpeaking: v,
417
- mode: p,
418
- isDisconnected: f,
419
- lastId: b,
420
- error: g,
421
- canSendFeedback: d,
422
- conversationIndex: w,
413
+ status: d,
414
+ isSpeaking: m,
415
+ mode: v,
416
+ isDisconnected: p,
417
+ lastId: f,
418
+ error: x,
419
+ canSendFeedback: g,
420
+ conversationIndex: b,
423
421
  conversationTextOnly: y,
424
- transcript: m,
425
- startSession: async (x, C) => {
426
- var A, k, I, D, L, $, W;
427
- if (await i.requestTerms(), (A = e.current) != null && A.isOpen())
422
+ transcript: w,
423
+ startSession: async (C, S) => {
424
+ var k, I, D, L, $, W, F;
425
+ if (await s.requestTerms(), (k = e.current) != null && k.isOpen())
428
426
  return e.current.getId();
429
427
  if (t.current)
430
428
  return (await t.current).getId();
431
- let S = structuredClone(s.peek());
432
- C && a.value.supports_text_only && (S.textOnly = !0, a.value.text_only || (S.overrides ?? (S.overrides = {}), (k = S.overrides).conversation ?? (k.conversation = {}), S.overrides.conversation.textOnly = !0));
429
+ let E = structuredClone(l.peek());
430
+ S && a.value.supports_text_only && (E.textOnly = !0, a.value.text_only || (E.overrides ?? (E.overrides = {}), (I = E.overrides).conversation ?? (I.conversation = {}), E.overrides.conversation.textOnly = !0));
433
431
  try {
434
- S = Pa(x, S);
432
+ E = Pa(C, E);
435
433
  } catch (N) {
436
434
  console.error(
437
435
  "[ConversationalAI] Error triggering call event:",
438
436
  N
439
437
  );
440
438
  }
441
- y.value = S.textOnly ?? !1, m.value = C ? [
439
+ y.value = E.textOnly ?? !1, w.value = S ? [
442
440
  {
443
441
  type: "message",
444
442
  role: "user",
445
- message: C,
443
+ message: S,
446
444
  isText: !0,
447
- conversationIndex: w.peek()
445
+ conversationIndex: b.peek()
448
446
  }
449
447
  ] : [];
450
448
  try {
451
449
  if (t.current = ca.startSession({
452
- ...S,
450
+ ...E,
453
451
  overrides: {
454
- ...S.overrides,
452
+ ...E.overrides,
455
453
  client: {
456
- ...(I = S.overrides) == null ? void 0 : I.client,
457
- source: ((L = (D = S.overrides) == null ? void 0 : D.client) == null ? void 0 : L.source) || "widget",
458
- version: ((W = ($ = S.overrides) == null ? void 0 : $.client) == null ? void 0 : W.version) || Ca
454
+ ...(D = E.overrides) == null ? void 0 : D.client,
455
+ source: (($ = (L = E.overrides) == null ? void 0 : L.client) == null ? void 0 : $.source) || "widget",
456
+ version: ((F = (W = E.overrides) == null ? void 0 : W.client) == null ? void 0 : F.version) || Ca
459
457
  }
460
458
  },
461
- onModeChange: (T) => {
462
- p.value = T.mode;
459
+ onModeChange: (_) => {
460
+ v.value = _.mode;
463
461
  },
464
- onStatusChange: (T) => {
465
- c.value = T.status;
462
+ onStatusChange: (_) => {
463
+ d.value = _.status;
466
464
  },
467
- onCanSendFeedbackChange: (T) => {
468
- d.value = T.canSendFeedback;
465
+ onCanSendFeedbackChange: (_) => {
466
+ g.value = _.canSendFeedback;
469
467
  },
470
- onMessage: ({ source: T, message: B }) => {
471
- if (y.peek() === !0 && T === "ai" && !n.current) {
468
+ onMessage: ({ source: _, message: O }) => {
469
+ if (i.peek() && y.peek() === !0 && _ === "ai" && !n.current) {
472
470
  n.current = !0;
473
471
  return;
474
- } else T === "ai" && (n.current = !0);
475
- if (T === "ai" && o.current) {
472
+ } else _ === "ai" && (n.current = !0);
473
+ if (_ === "ai" && o.current) {
476
474
  o.current = !1;
477
475
  return;
478
476
  }
479
- m.value = [
480
- ...m.value,
477
+ w.value = [
478
+ ...w.value,
481
479
  {
482
480
  type: "message",
483
- role: T,
484
- message: B,
481
+ role: _,
482
+ message: O,
485
483
  isText: !1,
486
- conversationIndex: w.peek()
484
+ conversationIndex: b.peek()
487
485
  }
488
486
  ];
489
487
  },
490
- onAgentChatResponsePart: ({ text: T, type: B }) => {
491
- const O = m.peek();
492
- if (B === "start")
493
- o.current = !0, r.current = O.length, m.value = [
494
- ...O,
488
+ onAgentChatResponsePart: ({ text: _, type: O }) => {
489
+ if (i.peek() && y.peek() === !0 && !n.current)
490
+ return;
491
+ const M = w.peek();
492
+ if (O === "start")
493
+ o.current = !0, r.current = M.length, w.value = [
494
+ ...M,
495
495
  {
496
496
  type: "message",
497
497
  role: "ai",
498
498
  message: "",
499
499
  isText: !0,
500
- conversationIndex: w.peek()
500
+ conversationIndex: b.peek()
501
501
  }
502
502
  ];
503
- else if (B === "delta") {
504
- const M = r.current;
505
- if (M !== null && O[M]) {
506
- const P = [...O], z = P[M];
507
- z.type === "message" && (P[M] = {
508
- ...z,
509
- message: z.message + T
510
- }, m.value = P);
503
+ else if (O === "delta") {
504
+ const P = r.current;
505
+ if (P !== null && M[P]) {
506
+ const z = [...M], Q = z[P];
507
+ Q.type === "message" && (z[P] = {
508
+ ...Q,
509
+ message: Q.message + _
510
+ }, w.value = z);
511
511
  }
512
- } else B === "stop" && (r.current = null);
512
+ } else O === "stop" && (r.current = null);
513
513
  },
514
- onDisconnect: (T) => {
515
- n.current = !1, y.value = null, r.current = null, o.current = !1, m.value = [
516
- ...m.value,
517
- T.reason === "error" ? {
514
+ onDisconnect: (_) => {
515
+ n.current = !1, y.value = null, r.current = null, o.current = !1, w.value = [
516
+ ...w.value,
517
+ _.reason === "error" ? {
518
518
  type: "error",
519
- message: T.message,
520
- conversationIndex: w.peek()
519
+ message: _.message,
520
+ conversationIndex: b.peek()
521
521
  } : {
522
522
  type: "disconnection",
523
- role: T.reason === "user" ? "user" : "ai",
524
- conversationIndex: w.peek()
523
+ role: _.reason === "user" ? "user" : "ai",
524
+ conversationIndex: b.peek()
525
525
  }
526
- ], w.value++, T.reason === "error" && (g.value = T.message, console.error(
526
+ ], b.value++, _.reason === "error" && (x.value = _.message, console.error(
527
527
  "[ConversationalAI] Disconnected due to an error:",
528
- T.message
528
+ _.message
529
529
  ));
530
530
  }
531
- }), e.current = await t.current, e.current.setMicMuted(l.peek()), C) {
532
- const T = e.current;
533
- setTimeout(() => T.sendUserMessage(C), 100);
531
+ }), e.current = await t.current, e.current.setMicMuted(c.peek()), S) {
532
+ const _ = e.current;
533
+ setTimeout(() => _.sendUserMessage(S), 100);
534
534
  }
535
535
  const N = e.current.getId();
536
- return b.value = N, g.value = null, N;
536
+ return f.value = N, x.value = null, N;
537
537
  } catch (N) {
538
- let T = "Could not start a conversation.";
539
- N instanceof CloseEvent ? T = N.reason || T : N instanceof Error && (T = N.message || T), g.value = T, m.value = [
540
- ...m.value,
538
+ let _ = "Could not start a conversation.";
539
+ N instanceof CloseEvent ? _ = N.reason || _ : N instanceof Error && (_ = N.message || _), x.value = _, w.value = [
540
+ ...w.value,
541
541
  {
542
542
  type: "error",
543
- message: T,
544
- conversationIndex: w.peek()
543
+ message: _,
544
+ conversationIndex: b.peek()
545
545
  }
546
546
  ];
547
547
  } finally {
@@ -549,40 +549,40 @@ function _a() {
549
549
  }
550
550
  },
551
551
  endSession: async () => {
552
- const x = e.current;
553
- e.current = null, await (x == null ? void 0 : x.endSession());
552
+ const C = e.current;
553
+ e.current = null, await (C == null ? void 0 : C.endSession());
554
554
  },
555
555
  getInputVolume: () => {
556
- var x;
557
- return ((x = e.current) == null ? void 0 : x.getInputVolume()) ?? 0;
556
+ var C;
557
+ return ((C = e.current) == null ? void 0 : C.getInputVolume()) ?? 0;
558
558
  },
559
559
  getOutputVolume: () => {
560
- var x;
561
- return ((x = e.current) == null ? void 0 : x.getOutputVolume()) ?? 0;
562
- },
563
- sendFeedback: (x) => {
564
560
  var C;
565
- (C = e.current) == null || C.sendFeedback(x);
561
+ return ((C = e.current) == null ? void 0 : C.getOutputVolume()) ?? 0;
566
562
  },
567
- sendUserMessage: (x) => {
568
- var C;
569
- (C = e.current) == null || C.sendUserMessage(x), m.value = [
570
- ...m.value,
563
+ sendFeedback: (C) => {
564
+ var S;
565
+ (S = e.current) == null || S.sendFeedback(C);
566
+ },
567
+ sendUserMessage: (C) => {
568
+ var S;
569
+ (S = e.current) == null || S.sendUserMessage(C), w.value = [
570
+ ...w.value,
571
571
  {
572
572
  type: "message",
573
573
  role: "user",
574
- message: x,
574
+ message: C,
575
575
  isText: !0,
576
- conversationIndex: w.peek()
576
+ conversationIndex: b.peek()
577
577
  }
578
578
  ];
579
579
  },
580
580
  sendUserActivity: () => {
581
- var x;
582
- (x = e.current) == null || x.sendUserActivity();
581
+ var C;
582
+ (C = e.current) == null || C.sendUserActivity();
583
583
  }
584
584
  };
585
- }, [s, l]);
585
+ }, [l, c]);
586
586
  }
587
587
  function Pa(e, t) {
588
588
  try {
@@ -600,7 +600,7 @@ const Tr = de(
600
600
  null
601
601
  );
602
602
  function Ra({ children: e }) {
603
- const { serverUrl: t } = wn(), n = F("agent-id"), r = F("override-config"), o = F("signed-url"), a = Q(null);
603
+ const { serverUrl: t } = wn(), n = B("agent-id"), r = B("override-config"), o = B("signed-url"), a = J(null);
604
604
  Ee(() => {
605
605
  if (r.value)
606
606
  try {
@@ -614,65 +614,65 @@ function Ra({ children: e }) {
614
614
  `[ConversationalAI] Cannot parse override-config: ${C == null ? void 0 : C.message}`
615
615
  );
616
616
  }
617
- let w = n.value, y;
617
+ let w = n.value, b;
618
618
  if (o.value) {
619
619
  const C = new URL(o.value).searchParams;
620
- w = C.get("agent_id") ?? n.value, y = C.get("conversation_signature") ?? void 0;
620
+ w = C.get("agent_id") ?? n.value, b = C.get("conversation_signature") ?? void 0;
621
621
  }
622
622
  if (!w) {
623
623
  a.value = null;
624
624
  return;
625
625
  }
626
- const x = new AbortController();
626
+ const y = new AbortController();
627
627
  return Oa(
628
628
  w,
629
629
  t.value,
630
- x.signal,
631
- y
630
+ y.signal,
631
+ b
632
632
  ).then((C) => {
633
- x.signal.aborted || (a.value = C);
633
+ y.signal.aborted || (a.value = C);
634
634
  }).catch((C) => {
635
635
  console.error(
636
636
  `[ConversationalAI] Cannot fetch config for agent ${n.value}: ${C == null ? void 0 : C.message}`
637
- ), x.signal.aborted || (a.value = null);
637
+ ), y.signal.aborted || (a.value = null);
638
638
  }), () => {
639
- x.abort();
639
+ y.abort();
640
640
  };
641
641
  });
642
- const i = F("variant"), s = F("placement"), l = F("terms-key"), c = F("mic-muting"), f = F("transcript"), p = F("text-input"), v = F("default-expanded"), g = F("always-expanded"), b = F("override-text-only"), d = F("use-rtc"), m = Y(() => {
642
+ const i = B("variant"), s = B("placement"), l = B("terms-key"), c = B("mic-muting"), d = B("transcript"), p = B("text-input"), v = B("default-expanded"), m = B("always-expanded"), x = B("override-text-only"), f = B("use-rtc"), g = Y(() => {
643
643
  if (!a.value)
644
644
  return null;
645
- const w = i.value ?? a.value.variant, y = s.value ?? a.value.placement, x = l.value ?? a.value.terms_key, C = Re(b.value) ?? a.value.text_only ?? !1, S = Re(c.value) ?? a.value.mic_muting_enabled, A = Re(f.value) ?? a.value.transcript_enabled, k = Re(p.value) ?? a.value.text_input_enabled, I = Re(g.value) ?? a.value.always_expanded ?? !1, D = Re(v.value) ?? a.value.default_expanded ?? !1, L = Re(d.value) ?? a.value.use_rtc ?? !1;
645
+ const w = i.value ?? a.value.variant, b = s.value ?? a.value.placement, y = l.value ?? a.value.terms_key, C = Re(x.value) ?? a.value.text_only ?? !1, S = Re(c.value) ?? a.value.mic_muting_enabled, E = Re(d.value) ?? a.value.transcript_enabled, k = Re(p.value) ?? a.value.text_input_enabled, I = Re(m.value) ?? a.value.always_expanded ?? !1, D = Re(v.value) ?? a.value.default_expanded ?? !1, L = Re(f.value) ?? a.value.use_rtc ?? !1;
646
646
  return {
647
647
  ...a.value,
648
648
  variant: fa(w),
649
- placement: ha(y),
650
- terms_key: x,
649
+ placement: ha(b),
650
+ terms_key: y,
651
651
  mic_muting_enabled: !C && S,
652
- transcript_enabled: C || A,
652
+ transcript_enabled: C || E,
653
653
  text_input_enabled: C || k,
654
654
  always_expanded: I,
655
655
  default_expanded: D,
656
656
  use_rtc: L
657
657
  };
658
658
  });
659
- return m.value ? /* @__PURE__ */ u(Tr.Provider, { value: m, children: e }) : null;
659
+ return g.value ? /* @__PURE__ */ u(Tr.Provider, { value: g, children: e }) : null;
660
660
  }
661
661
  function q() {
662
662
  return fe(Tr);
663
663
  }
664
664
  function bn() {
665
- const e = F("override-text-only"), t = q();
665
+ const e = B("override-text-only"), t = q();
666
666
  return Y(
667
667
  () => Re(e.value) ?? t.value.text_only ?? !1
668
668
  );
669
669
  }
670
670
  function zt() {
671
- const e = bn(), { conversationTextOnly: t } = re();
671
+ const e = bn(), { conversationTextOnly: t } = oe();
672
672
  return Y(() => t.value ?? e.value);
673
673
  }
674
674
  function Ar() {
675
- const e = F("override-first-message"), t = q(), { language: n } = at();
675
+ const e = B("override-first-message"), t = q(), { language: n } = at();
676
676
  return Y(
677
677
  () => {
678
678
  var r, o;
@@ -686,7 +686,10 @@ function Ia() {
686
686
  }
687
687
  function Na() {
688
688
  const e = q();
689
- return Y(() => e.value.end_feedback !== void 0);
689
+ return Y(() => {
690
+ var t;
691
+ return ((t = e.value.end_feedback) == null ? void 0 : t.type) ?? null;
692
+ });
690
693
  }
691
694
  async function Oa(e, t, n, r) {
692
695
  const a = await (await fetch(
@@ -703,13 +706,13 @@ const La = vr(function() {
703
706
  const t = q(), n = Y(() => {
704
707
  const r = t.value.styles;
705
708
  return `:host, :root {
706
- ${ma.map(
707
- (o) => `${Ma(o)}: ${Da((r == null ? void 0 : r[o]) ?? gr[o])};`
709
+ ${ga.map(
710
+ (o) => `${Ma(o)}: ${Da((r == null ? void 0 : r[o]) ?? mr[o])};`
708
711
  ).join(`
709
712
  `)}
710
713
  }`;
711
714
  });
712
- return /* @__PURE__ */ _("style", { children: [
715
+ return /* @__PURE__ */ A("style", { children: [
713
716
  n,
714
717
  da
715
718
  ] });
@@ -722,7 +725,7 @@ function Da(e) {
722
725
  }
723
726
  const _r = de(null);
724
727
  function Fa({ children: e }) {
725
- const t = q(), { language: n } = at(), r = F("text-contents"), o = Y(() => {
728
+ const t = q(), { language: n } = at(), r = B("text-contents"), o = Y(() => {
726
729
  try {
727
730
  if (r.value) {
728
731
  const i = JSON.parse(r.value);
@@ -738,8 +741,8 @@ function Fa({ children: e }) {
738
741
  i,
739
742
  Ce(
740
743
  () => {
741
- var s, l, c, f;
742
- return o.value[i] ?? ((c = (l = (s = t.value.language_presets) == null ? void 0 : s[n.value.languageCode]) == null ? void 0 : l.text_contents) == null ? void 0 : c[i]) ?? ((f = t.value.text_contents) == null ? void 0 : f[i]) ?? mr[i];
744
+ var s, l, c, d;
745
+ return o.value[i] ?? ((c = (l = (s = t.value.language_presets) == null ? void 0 : s[n.value.languageCode]) == null ? void 0 : l.text_contents) == null ? void 0 : c[i]) ?? ((d = t.value.text_contents) == null ? void 0 : d[i]) ?? gr[i];
743
746
  }
744
747
  )
745
748
  ])
@@ -751,7 +754,7 @@ function G() {
751
754
  }
752
755
  const Pr = de(null);
753
756
  function Ba({ children: e }) {
754
- const t = q(), n = F("avatar-image-url"), r = F("avatar-orb-color-1"), o = F("avatar-orb-color-2"), a = Q(""), i = Y(() => n.value ? {
757
+ const t = q(), n = B("avatar-image-url"), r = B("avatar-orb-color-1"), o = B("avatar-orb-color-2"), a = J(""), i = Y(() => n.value ? {
755
758
  type: "image",
756
759
  url: n.value
757
760
  } : r.value && o.value ? {
@@ -785,7 +788,7 @@ function yn(e) {
785
788
  return e && typeof e == "object" && "peek" in e;
786
789
  }
787
790
  function Va(e) {
788
- const t = yn(e), n = Q(t ? e.peek() : e);
791
+ const t = yn(e), n = J(t ? e.peek() : e);
789
792
  return t ? e : (n.value = e, n);
790
793
  }
791
794
  function Ir(e) {
@@ -815,22 +818,22 @@ function Nr(...e) {
815
818
  };
816
819
  };
817
820
  }
818
- function te(...e) {
821
+ function ne(...e) {
819
822
  return h.useCallback(Nr(...e), e);
820
823
  }
821
824
  // @__NO_SIDE_EFFECTS__
822
- function gt(e) {
825
+ function mt(e) {
823
826
  const t = /* @__PURE__ */ Wa(e), n = h.forwardRef((r, o) => {
824
827
  const { children: a, ...i } = r, s = h.Children.toArray(a), l = s.find(Ua);
825
828
  if (l) {
826
- const c = l.props.children, f = s.map((p) => p === l ? h.Children.count(c) > 1 ? h.Children.only(null) : h.isValidElement(c) ? c.props.children : null : p);
827
- return /* @__PURE__ */ E(t, { ...i, ref: o, children: h.isValidElement(c) ? h.cloneElement(c, void 0, f) : null });
829
+ const c = l.props.children, d = s.map((p) => p === l ? h.Children.count(c) > 1 ? h.Children.only(null) : h.isValidElement(c) ? c.props.children : null : p);
830
+ return /* @__PURE__ */ T(t, { ...i, ref: o, children: h.isValidElement(c) ? h.cloneElement(c, void 0, d) : null });
828
831
  }
829
- return /* @__PURE__ */ E(t, { ...i, ref: o, children: a });
832
+ return /* @__PURE__ */ T(t, { ...i, ref: o, children: a });
830
833
  });
831
834
  return n.displayName = `${e}.Slot`, n;
832
835
  }
833
- var Or = /* @__PURE__ */ gt("Slot");
836
+ var Or = /* @__PURE__ */ mt("Slot");
834
837
  // @__NO_SIDE_EFFECTS__
835
838
  function Wa(e) {
836
839
  const t = h.forwardRef((n, r) => {
@@ -865,7 +868,7 @@ function Ya(e) {
865
868
  }
866
869
  const Xt = window.matchMedia("(prefers-reduced-motion: reduce)");
867
870
  function Lr() {
868
- const e = Q(Xt.matches);
871
+ const e = J(Xt.matches);
869
872
  return Ue(() => {
870
873
  const t = (n) => {
871
874
  e.value = n.matches;
@@ -874,21 +877,21 @@ function Lr() {
874
877
  }, []), e;
875
878
  }
876
879
  function Mr({ onStart: e, onEnd: t }) {
877
- const n = J();
880
+ const n = ee();
878
881
  n.current ?? (n.current = /* @__PURE__ */ new Set());
879
- const r = J(e);
882
+ const r = ee(e);
880
883
  r.current = e;
881
- const o = J(t);
884
+ const o = ee(t);
882
885
  o.current = t;
883
- const a = Q(!1), i = ee(
886
+ const a = J(!1), i = te(
884
887
  (l) => {
885
- var c, f;
886
- l.target === l.currentTarget && ((c = n.current) == null || c.add(l.propertyName), a.peek() || (a.value = !0, (f = r.current) == null || f.call(r)));
888
+ var c, d;
889
+ l.target === l.currentTarget && ((c = n.current) == null || c.add(l.propertyName), a.peek() || (a.value = !0, (d = r.current) == null || d.call(r)));
887
890
  },
888
891
  []
889
- ), s = ee((l) => {
890
- var c, f, p;
891
- l.target === l.currentTarget && ((c = n.current) == null || c.delete(l.propertyName), (f = n.current) != null && f.size || (a.value = !1, (p = o.current) == null || p.call(o)));
892
+ ), s = te((l) => {
893
+ var c, d, p;
894
+ l.target === l.currentTarget && ((c = n.current) == null || c.delete(l.propertyName), (d = n.current) != null && d.size || (a.value = !1, (p = o.current) == null || p.call(o)));
892
895
  }, []);
893
896
  return {
894
897
  transitioning: a,
@@ -898,7 +901,7 @@ function Mr({ onStart: e, onEnd: t }) {
898
901
  }
899
902
  };
900
903
  }
901
- function ae(e) {
904
+ function ie(e) {
902
905
  const t = Lr().value ? Ka : Xa;
903
906
  return /* @__PURE__ */ u(t, { ...e });
904
907
  }
@@ -910,7 +913,7 @@ function Xa({
910
913
  initial: t = e,
911
914
  ...n
912
915
  }) {
913
- const r = Va(e), o = Q($a(t));
916
+ const r = Va(e), o = J($a(t));
914
917
  Ee(() => {
915
918
  r.value && (o.value = r.value);
916
919
  });
@@ -1107,17 +1110,17 @@ void main() {
1107
1110
  -1
1108
1111
  ]), Qa = "https://storage.googleapis.com/eleven-public-cdn/images/perlin-noise.png", be = class be {
1109
1112
  constructor(t) {
1110
- oe(this, "gl");
1111
- oe(this, "program");
1112
- oe(this, "startTime");
1113
- oe(this, "targetSpeed", 0);
1114
- oe(this, "speed", 0.5);
1115
- oe(this, "rafId", null);
1116
- oe(this, "resizeObserver");
1117
- oe(this, "colorA", [0, 0, 0]);
1118
- oe(this, "colorB", [0, 0, 0]);
1119
- oe(this, "offsets", new Float32Array(7).map(() => Math.random() * Math.PI * 2));
1120
- oe(this, "copyNoiseImage", () => {
1113
+ ae(this, "gl");
1114
+ ae(this, "program");
1115
+ ae(this, "startTime");
1116
+ ae(this, "targetSpeed", 0);
1117
+ ae(this, "speed", 0.5);
1118
+ ae(this, "rafId", null);
1119
+ ae(this, "resizeObserver");
1120
+ ae(this, "colorA", [0, 0, 0]);
1121
+ ae(this, "colorB", [0, 0, 0]);
1122
+ ae(this, "offsets", new Float32Array(7).map(() => Math.random() * Math.PI * 2));
1123
+ ae(this, "copyNoiseImage", () => {
1121
1124
  this.gl && (this.gl.texImage2D(
1122
1125
  this.gl.TEXTURE_2D,
1123
1126
  0,
@@ -1127,8 +1130,8 @@ void main() {
1127
1130
  be.noiseImage
1128
1131
  ), this.gl.generateMipmap(this.gl.TEXTURE_2D));
1129
1132
  });
1130
- oe(this, "toDataURL", () => this.gl.canvas.toDataURL("image/png"));
1131
- oe(this, "render", () => {
1133
+ ae(this, "toDataURL", () => this.gl.canvas.toDataURL("image/png"));
1134
+ ae(this, "render", () => {
1132
1135
  if (!this.gl) {
1133
1136
  this.rafId = null;
1134
1137
  return;
@@ -1221,32 +1224,32 @@ void main() {
1221
1224
  return this.gl.shaderSource(r, n), this.gl.compileShader(r), this.gl.getShaderParameter(r, this.gl.COMPILE_STATUS) ? r : (this.gl.deleteShader(r), null);
1222
1225
  }
1223
1226
  };
1224
- oe(be, "noiseImage");
1227
+ ae(be, "noiseImage");
1225
1228
  let an = be;
1226
1229
  const Ja = {
1227
1230
  sm: "w-9 h-9",
1228
1231
  lg: "w-48 h-48"
1229
1232
  };
1230
1233
  function it({ size: e = "sm", className: t }) {
1231
- const { getInputVolume: n, getOutputVolume: r, isSpeaking: o, isDisconnected: a } = re(), { config: i } = xn(), s = J(null), l = J(null);
1234
+ const { getInputVolume: n, getOutputVolume: r, isSpeaking: o, isDisconnected: a } = oe(), { config: i } = xn(), s = ee(null), l = ee(null);
1232
1235
  Ee(() => {
1233
1236
  if (a.value) {
1234
1237
  s.current.style.transform = "", l.current.style.transform = "";
1235
1238
  return;
1236
1239
  }
1237
- let f;
1240
+ let d;
1238
1241
  function p() {
1239
- const v = n(), g = r(), b = o.peek() ? 1 : 1 - v * 0.4, d = o.peek() ? 1 + g * 0.4 : 1;
1240
- s.current.style.transform = `scale(${d})`, l.current.style.transform = `scale(${b})`, f = requestAnimationFrame(p);
1242
+ const v = n(), m = r(), x = o.peek() ? 1 : 1 - v * 0.4, f = o.peek() ? 1 + m * 0.4 : 1;
1243
+ s.current.style.transform = `scale(${f})`, l.current.style.transform = `scale(${x})`, d = requestAnimationFrame(p);
1241
1244
  }
1242
1245
  return p(), () => {
1243
- cancelAnimationFrame(f);
1246
+ cancelAnimationFrame(d);
1244
1247
  };
1245
1248
  });
1246
1249
  const c = Y(() => ({
1247
1250
  backgroundImage: i.value.type === "image" ? `url(${i.value.url})` : i.value.type === "url" ? `url(${i.value.custom_url})` : void 0
1248
1251
  }));
1249
- return /* @__PURE__ */ _("div", { className: V("relative shrink-0", Ja[e], t), children: [
1252
+ return /* @__PURE__ */ A("div", { className: V("relative shrink-0", Ja[e], t), children: [
1250
1253
  /* @__PURE__ */ u(
1251
1254
  "div",
1252
1255
  {
@@ -1276,7 +1279,7 @@ function ei({ color1: e, color2: t }) {
1276
1279
  Ue(() => {
1277
1280
  r && (r.updateColors(e, t), r.render(), n.value = r.toDataURL());
1278
1281
  }, [r, e, t]);
1279
- const a = ee(
1282
+ const a = te(
1280
1283
  (i) => {
1281
1284
  if (i) {
1282
1285
  const s = new an(i);
@@ -1331,7 +1334,7 @@ function ri(e) {
1331
1334
  );
1332
1335
  }
1333
1336
  function oi(e) {
1334
- return /* @__PURE__ */ _(
1337
+ return /* @__PURE__ */ A(
1335
1338
  "svg",
1336
1339
  {
1337
1340
  height: "1em",
@@ -1369,7 +1372,7 @@ function ai(e) {
1369
1372
  );
1370
1373
  }
1371
1374
  function ii(e) {
1372
- return /* @__PURE__ */ _(
1375
+ return /* @__PURE__ */ A(
1373
1376
  "svg",
1374
1377
  {
1375
1378
  height: "1em",
@@ -1386,7 +1389,7 @@ function ii(e) {
1386
1389
  );
1387
1390
  }
1388
1391
  function si(e) {
1389
- return /* @__PURE__ */ _(
1392
+ return /* @__PURE__ */ A(
1390
1393
  "svg",
1391
1394
  {
1392
1395
  height: "1em",
@@ -1466,13 +1469,7 @@ function di(e) {
1466
1469
  viewBox: "0 0 20 20",
1467
1470
  fill: "currentColor",
1468
1471
  ...e,
1469
- children: /* @__PURE__ */ u(
1470
- "path",
1471
- {
1472
- d: "M2.59413 5.1485C2.04 3.39377 3.86657 1.83482 5.51245 2.65776L16.47 8.13653C18.0055 8.90429 18.0055 11.0955 16.47 11.8633L5.51245 17.3421C3.86656 18.165 2.04 16.6061 2.59413 14.8513L3.86297 10.8333H7.50006C7.9603 10.8333 8.33339 10.4602 8.33339 10C8.33339 9.53976 7.9603 9.16667 7.50006 9.16667H3.86302L2.59413 5.1485Z",
1473
- fill: "black"
1474
- }
1475
- )
1472
+ children: /* @__PURE__ */ u("path", { d: "M2.59413 5.1485C2.04 3.39377 3.86657 1.83482 5.51245 2.65776L16.47 8.13653C18.0055 8.90429 18.0055 11.0955 16.47 11.8633L5.51245 17.3421C3.86656 18.165 2.04 16.6061 2.59413 14.8513L3.86297 10.8333H7.50006C7.9603 10.8333 8.33339 10.4602 8.33339 10C8.33339 9.53976 7.9603 9.16667 7.50006 9.16667H3.86302L2.59413 5.1485Z" })
1476
1473
  }
1477
1474
  );
1478
1475
  }
@@ -1496,125 +1493,143 @@ function pi({
1496
1493
  starColor: n,
1497
1494
  className: r
1498
1495
  }) {
1499
- return /* @__PURE__ */ u("slot", { name: "icon-feedback", className: V("flex", r), "aria-hidden": !0, children: /* @__PURE__ */ _(
1500
- "svg",
1496
+ return /* @__PURE__ */ u(
1497
+ "slot",
1501
1498
  {
1502
- width: "100%",
1503
- height: "100%",
1504
- viewBox: "0 0 82 88",
1505
- fill: "none",
1506
- xmlns: "http://www.w3.org/2000/svg",
1507
- children: [
1508
- /* @__PURE__ */ u(
1509
- "path",
1510
- {
1511
- "fill-rule": "evenodd",
1512
- "clip-rule": "evenodd",
1513
- d: "M9 42C9 59.6731 23.3269 74 41 74C58.6731 74 73 59.6731 73 42C73 24.3269 58.6731 10 41 10C23.3269 10 9 24.3269 9 42ZM29.4529 18.5973C31.1347 18.0574 32.8641 17.5023 34.9844 16.6005C42.2533 13.5091 48.3526 11.9217 51.7782 14.094C53.5063 15.1899 54.4051 16.7749 55.6117 18.9024C56.7969 20.9922 58.279 23.6057 61.1358 26.7937C62.2737 28.0636 63.3886 29.2195 64.4371 30.3064C68.7007 34.7263 71.8645 38.0061 70.9949 43.1697C70.2965 47.316 67.9794 49.4559 65.6038 51.65C63.4317 53.656 61.2107 55.7073 60.1332 59.3786C57.8774 67.0653 53.5327 71.9113 48.3526 72.7468C43.1725 73.5823 36.6555 75.1698 29.8043 70.1567C26.1949 67.5157 25.229 64.3182 24.1947 60.894C23.2657 57.8184 22.2814 54.56 19.2768 51.3577C14.1619 45.9062 10.2533 29.6345 19.2768 23.0339C23.736 20.4327 26.5223 19.5382 29.4529 18.5973Z",
1514
- fill: e,
1515
- "fill-opacity": "0.15",
1516
- stroke: e,
1517
- "stroke-opacity": "0.35"
1518
- }
1519
- ),
1520
- /* @__PURE__ */ u(
1521
- "path",
1522
- {
1523
- d: "M43.5 73.4212C40.4387 73.4212 35.0039 71.1025 37.556 56.4696C40.143 41.6365 42.6582 40.577 44.6991 25.744C46.3318 13.8775 41.1635 8.87964 33 10.9988",
1524
- stroke: e,
1525
- "stroke-opacity": "0.35"
1526
- }
1527
- ),
1528
- /* @__PURE__ */ u(
1529
- "path",
1530
- {
1531
- d: "M43.5 73.4212C40.4387 73.4212 35.0039 71.1025 37.556 56.4696C40.143 41.6365 42.6582 40.577 44.6991 25.744C46.3318 13.8775 41.1635 8.87964 33 10.9988",
1532
- stroke: e,
1533
- "stroke-opacity": "0.35"
1534
- }
1535
- ),
1536
- /* @__PURE__ */ u(
1537
- "path",
1538
- {
1539
- d: "M21.9366 68.1987C21.3549 66.5119 21.0386 60.9231 28.1376 53.3448C37.0114 43.8719 40.5 43.9579 51.4911 31.7482C59.5691 22.7747 59.1723 17.0524 58.0993 15.4626",
1540
- stroke: e,
1541
- "stroke-opacity": "0.35"
1542
- }
1543
- ),
1544
- /* @__PURE__ */ u(
1545
- "path",
1546
- {
1547
- d: "M9.26819 42.161C10.4003 43.5337 15.6951 46.3853 25.7661 44.3926C38.3548 41.9018 52.434 40.307 57.694 41.0287C70.352 42.7655 71.4138 51.3035 71.4138 51.3035",
1548
- stroke: e,
1549
- "stroke-opacity": "0.35"
1550
- }
1551
- ),
1552
- /* @__PURE__ */ u(
1553
- "path",
1554
- {
1555
- d: "M22 16.4916C18.815 21.85 19.6451 26.0591 27.9943 32.0828C38.4307 39.6124 50.2985 48.8304 53.5024 53.1027C58.6684 59.9914 59.5 67.928 59.5 67.928",
1556
- stroke: e,
1557
- "stroke-opacity": "0.35"
1558
- }
1559
- ),
1560
- /* @__PURE__ */ u(
1561
- "rect",
1562
- {
1563
- x: "9.26099",
1564
- y: "10",
1565
- width: "63.7129",
1566
- height: "63.7129",
1567
- rx: "31.8565",
1568
- stroke: e,
1569
- "stroke-opacity": "0.43",
1570
- "stroke-width": "1.5"
1571
- }
1572
- ),
1573
- /* @__PURE__ */ _("g", { "clip-path": "url(#clip0_7006_42127)", children: [
1574
- /* @__PURE__ */ u(
1575
- "circle",
1576
- {
1577
- cx: "62.4996",
1578
- cy: "18.2032",
1579
- r: "15.0195",
1580
- transform: "rotate(6.27205 62.4996 18.2032)",
1581
- fill: t
1582
- }
1583
- ),
1584
- /* @__PURE__ */ u(
1585
- "path",
1586
- {
1587
- d: "M60.7142 12.1753C62.057 10.0714 65.2294 10.4202 66.0833 12.7654L66.6158 14.2308L68.1251 14.6217C70.5415 15.2484 71.1908 18.3742 69.2237 19.911L67.9944 20.8704L68.0896 22.4262C68.2403 24.9178 65.4681 26.5011 63.3987 25.1056L62.1065 24.2326L60.6555 24.8041C58.3322 25.7172 55.9702 23.5694 56.6585 21.1698L57.0884 19.6717L56.0977 18.4684C54.5112 16.541 55.8231 13.6307 58.318 13.5438L59.8751 13.4899L60.7142 12.1753Z",
1588
- fill: n,
1589
- stroke: t,
1590
- "stroke-width": "3.27381"
1591
- }
1592
- ),
1593
- /* @__PURE__ */ u(
1594
- "path",
1595
- {
1596
- d: "M63.925 5.23719C71.0867 6.02431 76.2545 12.4676 75.4676 19.6293C74.6805 26.7911 68.2364 31.959 61.0746 31.1718C53.9129 30.3845 48.7459 23.9406 49.533 16.7789C50.3203 9.61739 56.7634 4.45029 63.925 5.23719ZM63.6957 7.32326C57.6866 6.66302 52.2797 10.9991 51.6191 17.0082C50.9586 23.0174 55.2946 28.4251 61.3038 29.0858C67.3132 29.7462 72.7211 25.4094 73.3816 19.4C74.0418 13.3908 69.705 7.98372 63.6957 7.32326Z",
1597
- fill: n,
1598
- stroke: t,
1599
- "stroke-width": "0.3",
1600
- "stroke-linecap": "round",
1601
- "stroke-linejoin": "round"
1602
- }
1603
- )
1604
- ] }),
1605
- /* @__PURE__ */ u("ellipse", { cx: "41", cy: "85", rx: "15", ry: "3", fill: e, "fill-opacity": "0.35" }),
1606
- /* @__PURE__ */ u("defs", { children: /* @__PURE__ */ u("clipPath", { id: "clip0_7006_42127", children: /* @__PURE__ */ u(
1607
- "rect",
1608
- {
1609
- width: "33",
1610
- height: "33",
1611
- fill: "white",
1612
- transform: "translate(47.9012) rotate(6.27205)"
1613
- }
1614
- ) }) })
1615
- ]
1499
+ name: "icon-feedback",
1500
+ className: V("flex", r),
1501
+ "aria-hidden": !0,
1502
+ children: /* @__PURE__ */ A(
1503
+ "svg",
1504
+ {
1505
+ width: "100%",
1506
+ height: "100%",
1507
+ viewBox: "0 0 82 88",
1508
+ fill: "none",
1509
+ xmlns: "http://www.w3.org/2000/svg",
1510
+ children: [
1511
+ /* @__PURE__ */ u(
1512
+ "path",
1513
+ {
1514
+ "fill-rule": "evenodd",
1515
+ "clip-rule": "evenodd",
1516
+ d: "M9 42C9 59.6731 23.3269 74 41 74C58.6731 74 73 59.6731 73 42C73 24.3269 58.6731 10 41 10C23.3269 10 9 24.3269 9 42ZM29.4529 18.5973C31.1347 18.0574 32.8641 17.5023 34.9844 16.6005C42.2533 13.5091 48.3526 11.9217 51.7782 14.094C53.5063 15.1899 54.4051 16.7749 55.6117 18.9024C56.7969 20.9922 58.279 23.6057 61.1358 26.7937C62.2737 28.0636 63.3886 29.2195 64.4371 30.3064C68.7007 34.7263 71.8645 38.0061 70.9949 43.1697C70.2965 47.316 67.9794 49.4559 65.6038 51.65C63.4317 53.656 61.2107 55.7073 60.1332 59.3786C57.8774 67.0653 53.5327 71.9113 48.3526 72.7468C43.1725 73.5823 36.6555 75.1698 29.8043 70.1567C26.1949 67.5157 25.229 64.3182 24.1947 60.894C23.2657 57.8184 22.2814 54.56 19.2768 51.3577C14.1619 45.9062 10.2533 29.6345 19.2768 23.0339C23.736 20.4327 26.5223 19.5382 29.4529 18.5973Z",
1517
+ fill: e,
1518
+ "fill-opacity": "0.15",
1519
+ stroke: e,
1520
+ "stroke-opacity": "0.35"
1521
+ }
1522
+ ),
1523
+ /* @__PURE__ */ u(
1524
+ "path",
1525
+ {
1526
+ d: "M43.5 73.4212C40.4387 73.4212 35.0039 71.1025 37.556 56.4696C40.143 41.6365 42.6582 40.577 44.6991 25.744C46.3318 13.8775 41.1635 8.87964 33 10.9988",
1527
+ stroke: e,
1528
+ "stroke-opacity": "0.35"
1529
+ }
1530
+ ),
1531
+ /* @__PURE__ */ u(
1532
+ "path",
1533
+ {
1534
+ d: "M43.5 73.4212C40.4387 73.4212 35.0039 71.1025 37.556 56.4696C40.143 41.6365 42.6582 40.577 44.6991 25.744C46.3318 13.8775 41.1635 8.87964 33 10.9988",
1535
+ stroke: e,
1536
+ "stroke-opacity": "0.35"
1537
+ }
1538
+ ),
1539
+ /* @__PURE__ */ u(
1540
+ "path",
1541
+ {
1542
+ d: "M21.9366 68.1987C21.3549 66.5119 21.0386 60.9231 28.1376 53.3448C37.0114 43.8719 40.5 43.9579 51.4911 31.7482C59.5691 22.7747 59.1723 17.0524 58.0993 15.4626",
1543
+ stroke: e,
1544
+ "stroke-opacity": "0.35"
1545
+ }
1546
+ ),
1547
+ /* @__PURE__ */ u(
1548
+ "path",
1549
+ {
1550
+ d: "M9.26819 42.161C10.4003 43.5337 15.6951 46.3853 25.7661 44.3926C38.3548 41.9018 52.434 40.307 57.694 41.0287C70.352 42.7655 71.4138 51.3035 71.4138 51.3035",
1551
+ stroke: e,
1552
+ "stroke-opacity": "0.35"
1553
+ }
1554
+ ),
1555
+ /* @__PURE__ */ u(
1556
+ "path",
1557
+ {
1558
+ d: "M22 16.4916C18.815 21.85 19.6451 26.0591 27.9943 32.0828C38.4307 39.6124 50.2985 48.8304 53.5024 53.1027C58.6684 59.9914 59.5 67.928 59.5 67.928",
1559
+ stroke: e,
1560
+ "stroke-opacity": "0.35"
1561
+ }
1562
+ ),
1563
+ /* @__PURE__ */ u(
1564
+ "rect",
1565
+ {
1566
+ x: "9.26099",
1567
+ y: "10",
1568
+ width: "63.7129",
1569
+ height: "63.7129",
1570
+ rx: "31.8565",
1571
+ stroke: e,
1572
+ "stroke-opacity": "0.43",
1573
+ "stroke-width": "1.5"
1574
+ }
1575
+ ),
1576
+ /* @__PURE__ */ A("g", { "clip-path": "url(#clip0_7006_42127)", children: [
1577
+ /* @__PURE__ */ u(
1578
+ "circle",
1579
+ {
1580
+ cx: "62.4996",
1581
+ cy: "18.2032",
1582
+ r: "15.0195",
1583
+ transform: "rotate(6.27205 62.4996 18.2032)",
1584
+ fill: t
1585
+ }
1586
+ ),
1587
+ /* @__PURE__ */ u(
1588
+ "path",
1589
+ {
1590
+ d: "M60.7142 12.1753C62.057 10.0714 65.2294 10.4202 66.0833 12.7654L66.6158 14.2308L68.1251 14.6217C70.5415 15.2484 71.1908 18.3742 69.2237 19.911L67.9944 20.8704L68.0896 22.4262C68.2403 24.9178 65.4681 26.5011 63.3987 25.1056L62.1065 24.2326L60.6555 24.8041C58.3322 25.7172 55.9702 23.5694 56.6585 21.1698L57.0884 19.6717L56.0977 18.4684C54.5112 16.541 55.8231 13.6307 58.318 13.5438L59.8751 13.4899L60.7142 12.1753Z",
1591
+ fill: n,
1592
+ stroke: t,
1593
+ "stroke-width": "3.27381"
1594
+ }
1595
+ ),
1596
+ /* @__PURE__ */ u(
1597
+ "path",
1598
+ {
1599
+ d: "M63.925 5.23719C71.0867 6.02431 76.2545 12.4676 75.4676 19.6293C74.6805 26.7911 68.2364 31.959 61.0746 31.1718C53.9129 30.3845 48.7459 23.9406 49.533 16.7789C50.3203 9.61739 56.7634 4.45029 63.925 5.23719ZM63.6957 7.32326C57.6866 6.66302 52.2797 10.9991 51.6191 17.0082C50.9586 23.0174 55.2946 28.4251 61.3038 29.0858C67.3132 29.7462 72.7211 25.4094 73.3816 19.4C74.0418 13.3908 69.705 7.98372 63.6957 7.32326Z",
1600
+ fill: n,
1601
+ stroke: t,
1602
+ "stroke-width": "0.3",
1603
+ "stroke-linecap": "round",
1604
+ "stroke-linejoin": "round"
1605
+ }
1606
+ )
1607
+ ] }),
1608
+ /* @__PURE__ */ u(
1609
+ "ellipse",
1610
+ {
1611
+ cx: "41",
1612
+ cy: "85",
1613
+ rx: "15",
1614
+ ry: "3",
1615
+ fill: e,
1616
+ "fill-opacity": "0.35"
1617
+ }
1618
+ ),
1619
+ /* @__PURE__ */ u("defs", { children: /* @__PURE__ */ u("clipPath", { id: "clip0_7006_42127", children: /* @__PURE__ */ u(
1620
+ "rect",
1621
+ {
1622
+ width: "33",
1623
+ height: "33",
1624
+ fill: "white",
1625
+ transform: "translate(47.9012) rotate(6.27205)"
1626
+ }
1627
+ ) }) })
1628
+ ]
1629
+ }
1630
+ )
1616
1631
  }
1617
- ) });
1632
+ );
1618
1633
  }
1619
1634
  function Ne(e) {
1620
1635
  const t = Lr().value ? hi : vi;
@@ -1637,13 +1652,13 @@ function vi({
1637
1652
  dep: o,
1638
1653
  ...a
1639
1654
  }) {
1640
- const [i, s] = Ie(e), [l, c] = Ie(null), [f, p] = Ie(null), v = J(t);
1655
+ const [i, s] = Ie(e), [l, c] = Ie(null), [d, p] = Ie(null), v = ee(t);
1641
1656
  e && (v.current = t);
1642
- const g = ee((m) => {
1643
- c(m), m && !e && (m.style.width = "0px", m.style.height = "0px");
1657
+ const m = te((g) => {
1658
+ c(g), g && !e && (g.style.width = "0px", g.style.height = "0px");
1644
1659
  }, []);
1645
1660
  Ue(() => {
1646
- f && (f.style.transition = "none", f.style.opacity = "0", f.offsetWidth, f.style.transition = "", f.style.opacity = "");
1661
+ d && (d.style.transition = "none", d.style.opacity = "0", d.offsetWidth, d.style.transition = "", d.style.opacity = "");
1647
1662
  }, [o]), Ae(() => {
1648
1663
  l && (l.style.width = `${l.offsetWidth}px`, l.style.height = `${l.offsetHeight}px`);
1649
1664
  }, [
@@ -1653,19 +1668,19 @@ function vi({
1653
1668
  o
1654
1669
  // node's content changed
1655
1670
  ]), Ue(() => {
1656
- if (!l || !f) return;
1671
+ if (!l || !d) return;
1657
1672
  e && s(!0);
1658
- const m = e ? f.offsetWidth : 0, w = e ? f.offsetHeight : 0;
1659
- l.style.width = !e || l.offsetWidth !== m ? `${m}px` : "", l.style.height = !e || l.offsetHeight !== w ? `${w}px` : "";
1673
+ const g = e ? d.offsetWidth : 0, w = e ? d.offsetHeight : 0;
1674
+ l.style.width = !e || l.offsetWidth !== g ? `${g}px` : "", l.style.height = !e || l.offsetHeight !== w ? `${w}px` : "";
1660
1675
  }, [
1661
1676
  l,
1662
- f,
1677
+ d,
1663
1678
  e,
1664
1679
  // node's visibility changed
1665
1680
  o
1666
1681
  // node's content changed
1667
1682
  ]);
1668
- const { transitioning: b, handlers: d } = Mr({
1683
+ const { transitioning: x, handlers: f } = Mr({
1669
1684
  onEnd: () => {
1670
1685
  e ? (l.style.width = "", l.style.height = "") : s(!1);
1671
1686
  }
@@ -1673,14 +1688,14 @@ function vi({
1673
1688
  return /* @__PURE__ */ u(
1674
1689
  "div",
1675
1690
  {
1676
- ref: g,
1691
+ ref: m,
1677
1692
  className: V(
1678
1693
  "relative inline-flex shrink-0 justify-center items-center transition-[opacity,width,height,transform,flex-grow] duration-200 min-w-0",
1679
1694
  !e && "opacity-0 scale-75",
1680
1695
  e && r && "grow",
1681
- e && i && !b.value && "z-1"
1696
+ e && i && !x.value && "z-1"
1682
1697
  ),
1683
- ...d,
1698
+ ...f,
1684
1699
  children: /* @__PURE__ */ u(
1685
1700
  "div",
1686
1701
  {
@@ -1697,7 +1712,7 @@ function vi({
1697
1712
  }
1698
1713
  );
1699
1714
  }
1700
- const mi = {
1715
+ const gi = {
1701
1716
  primary: "text-accent-primary border border-accent bg-accent hover:border-accent-hover hover:bg-accent-hover active:border-accent-active active:bg-accent-active",
1702
1717
  secondary: "text-base-primary border border-base-border bg-base hover:bg-base-hover active:bg-base-active",
1703
1718
  ghost: "text-base-primary border border-base bg-base hover:bg-base-hover hover:border-base-hover active:bg-base-active active:border-base-active"
@@ -1712,13 +1727,13 @@ const mi = {
1712
1727
  ...s
1713
1728
  }, l) {
1714
1729
  const c = !!r && !n;
1715
- return /* @__PURE__ */ _(
1730
+ return /* @__PURE__ */ A(
1716
1731
  "button",
1717
1732
  {
1718
1733
  ref: l,
1719
1734
  className: V(
1720
1735
  "h-9 flex px-2.5 text-sm items-center transition-colors justify-center rounded-button duration-200 focus-ring overflow-hidden select-none",
1721
- mi[t],
1736
+ gi[t],
1722
1737
  c && "min-w-9",
1723
1738
  o
1724
1739
  ),
@@ -1746,7 +1761,7 @@ function Cn({
1746
1761
  className: e,
1747
1762
  ...t
1748
1763
  }) {
1749
- const { status: n, isSpeaking: r } = re(), o = zt(), a = G(), i = Y(
1764
+ const { status: n, isSpeaking: r } = oe(), o = zt(), a = G(), i = Y(
1750
1765
  () => n.value !== "connected" ? a.connecting_status.value : o.value ? a.chatting_status.value : r.value ? a.speaking_status.value : a.listening_status.value
1751
1766
  ), [s, l] = Ie(i.peek());
1752
1767
  return Ee(() => {
@@ -1754,10 +1769,10 @@ function Cn({
1754
1769
  if (n.value === "connected" && r.value)
1755
1770
  l(c);
1756
1771
  else {
1757
- const f = setTimeout(() => {
1772
+ const d = setTimeout(() => {
1758
1773
  l(c);
1759
1774
  }, 500);
1760
- return () => clearTimeout(f);
1775
+ return () => clearTimeout(d);
1761
1776
  }
1762
1777
  }), /* @__PURE__ */ u(
1763
1778
  "div",
@@ -1767,17 +1782,17 @@ function Cn({
1767
1782
  e
1768
1783
  ),
1769
1784
  ...t,
1770
- children: /* @__PURE__ */ u(ae, { initial: !1, active: !0, children: /* @__PURE__ */ u("div", { className: "animate-text whitespace-nowrap transition-[opacity,transform] ease-out duration-200 data-hidden:opacity-0 transform data-hidden:translate-y-2", children: s }) }, s)
1785
+ children: /* @__PURE__ */ u(ie, { initial: !1, active: !0, children: /* @__PURE__ */ u("div", { className: "animate-text whitespace-nowrap transition-[opacity,transform] ease-out duration-200 data-hidden:opacity-0 transform data-hidden:translate-y-2", children: s }) }, s)
1771
1786
  }
1772
1787
  );
1773
1788
  }
1774
1789
  const Dr = de(null);
1775
- function gi({
1790
+ function mi({
1776
1791
  children: e
1777
1792
  }) {
1778
- const t = Q(null), n = Q(""), r = Q("initial"), { lastId: o } = re(), a = F("agent-id"), { serverUrl: i } = wn(), s = ee(async (p) => {
1779
- const v = o.value, g = a.value;
1780
- if (!v || !g) {
1793
+ const t = J(null), n = J(""), r = J("initial"), { lastId: o } = oe(), a = B("agent-id"), { serverUrl: i } = wn(), s = te(async (p) => {
1794
+ const v = o.value, m = a.value;
1795
+ if (!v || !m) {
1781
1796
  console.warn(
1782
1797
  "[ConversationalAI] Cannot submit rating: missing agent_id or conversation_id"
1783
1798
  );
@@ -1791,10 +1806,10 @@ function gi({
1791
1806
  },
1792
1807
  i.value
1793
1808
  );
1794
- } catch (b) {
1795
- console.error("[ConversationalAI] Failed to submit rating:", b);
1809
+ } catch (x) {
1810
+ console.error("[ConversationalAI] Failed to submit rating:", x);
1796
1811
  }
1797
- }, []), l = ee(async () => {
1812
+ }, []), l = te(async () => {
1798
1813
  const p = o.value, v = a.value;
1799
1814
  if (!p || !v) {
1800
1815
  console.warn(
@@ -1816,16 +1831,16 @@ function gi({
1816
1831
  },
1817
1832
  i.value
1818
1833
  );
1819
- } catch (g) {
1820
- console.error("[ConversationalAI] Failed to submit feedback:", g);
1834
+ } catch (m) {
1835
+ console.error("[ConversationalAI] Failed to submit feedback:", m);
1821
1836
  }
1822
- }, []), c = ee(() => {
1837
+ }, []), c = te(() => {
1823
1838
  t.value = null, n.value = "", r.value = "initial";
1824
1839
  }, []);
1825
1840
  Ee(() => {
1826
1841
  o.value !== null && c();
1827
1842
  });
1828
- const f = Ae(
1843
+ const d = Ae(
1829
1844
  () => ({
1830
1845
  rating: t,
1831
1846
  feedbackText: n,
@@ -1836,7 +1851,7 @@ function gi({
1836
1851
  }),
1837
1852
  [s, l, c]
1838
1853
  );
1839
- return /* @__PURE__ */ u(Dr.Provider, { value: f, children: e });
1854
+ return /* @__PURE__ */ u(Dr.Provider, { value: d, children: e });
1840
1855
  }
1841
1856
  function Sn() {
1842
1857
  return fe(Dr);
@@ -1846,7 +1861,7 @@ function wi({
1846
1861
  defaultContent: e = "transcript",
1847
1862
  children: t
1848
1863
  }) {
1849
- const n = Q(e), r = ua(() => {
1864
+ const n = J(e), r = ua(() => {
1850
1865
  const a = n.value === "feedback" ? {
1851
1866
  showHeaderBack: !0,
1852
1867
  onHeaderBack: () => {
@@ -1888,7 +1903,7 @@ const Br = (e, t) => Array.from({ length: t - e + 1 }, (n, r) => r + e), bi = ({
1888
1903
  p.stopPropagation(), r(e);
1889
1904
  },
1890
1905
  [r, e]
1891
- ), f = Be(
1906
+ ), d = Be(
1892
1907
  (p) => {
1893
1908
  a(p, e);
1894
1909
  },
@@ -1905,7 +1920,7 @@ const Br = (e, t) => Array.from({ length: t - e + 1 }, (n, r) => r + e), bi = ({
1905
1920
  "aria-label": e.toString(),
1906
1921
  onMouseEnter: () => o(e),
1907
1922
  onClick: c,
1908
- onKeyDown: f,
1923
+ onKeyDown: d,
1909
1924
  className: V(
1910
1925
  "w-8 h-8 grid place-content-center rounded-full focus-ring transition-colors cursor-pointer",
1911
1926
  s || l ? "text-base-primary" : "text-base-border"
@@ -1921,30 +1936,30 @@ const Br = (e, t) => Array.from({ length: t - e + 1 }, (n, r) => r + e), bi = ({
1921
1936
  ariaLabel: r,
1922
1937
  icon: o = "star"
1923
1938
  }) => {
1924
- const a = Q(null), i = Q(null), s = Br(t, n), l = Be(
1939
+ const a = J(null), i = J(null), s = Br(t, n), l = Be(
1925
1940
  (v) => {
1926
1941
  i.value = v;
1927
1942
  },
1928
1943
  [i]
1929
1944
  ), c = Be(() => {
1930
1945
  i.value = null;
1931
- }, [i]), f = Be(
1946
+ }, [i]), d = Be(
1932
1947
  (v) => {
1933
1948
  a.value = v, e(v);
1934
1949
  },
1935
1950
  [a, e]
1936
1951
  ), p = Be(
1937
- (v, g) => {
1952
+ (v, m) => {
1938
1953
  if (v.key === "Enter" || v.key === " ")
1939
- v.preventDefault(), a.value = g, e(g);
1954
+ v.preventDefault(), a.value = m, e(m);
1940
1955
  else if (v.key === "ArrowLeft" || v.key === "ArrowDown") {
1941
- if (v.preventDefault(), g - 1 >= t) {
1942
- const d = v.currentTarget, m = d == null ? void 0 : d.previousElementSibling;
1943
- m == null || m.focus();
1956
+ if (v.preventDefault(), m - 1 >= t) {
1957
+ const f = v.currentTarget, g = f == null ? void 0 : f.previousElementSibling;
1958
+ g == null || g.focus();
1944
1959
  }
1945
- } else if ((v.key === "ArrowRight" || v.key === "ArrowUp") && (v.preventDefault(), g + 1 <= n)) {
1946
- const d = v.currentTarget, m = d == null ? void 0 : d.nextElementSibling;
1947
- m == null || m.focus();
1960
+ } else if ((v.key === "ArrowRight" || v.key === "ArrowUp") && (v.preventDefault(), m + 1 <= n)) {
1961
+ const f = v.currentTarget, g = f == null ? void 0 : f.nextElementSibling;
1962
+ g == null || g.focus();
1948
1963
  }
1949
1964
  },
1950
1965
  [a, e, t, n]
@@ -1962,7 +1977,7 @@ const Br = (e, t) => Array.from({ length: t - e + 1 }, (n, r) => r + e), bi = ({
1962
1977
  value: v,
1963
1978
  rating: a,
1964
1979
  hoverRating: i,
1965
- onClick: f,
1980
+ onClick: d,
1966
1981
  onHover: l,
1967
1982
  onKeyDown: p,
1968
1983
  iconName: o
@@ -1994,7 +2009,7 @@ function Ci({
1994
2009
  onRate: t
1995
2010
  }) {
1996
2011
  const n = G();
1997
- return /* @__PURE__ */ _("div", { className: "flex flex-col items-center", children: [
2012
+ return /* @__PURE__ */ A("div", { className: "flex flex-col items-center", children: [
1998
2013
  /* @__PURE__ */ u("div", { className: "text-sm text-base-primary font-medium", children: n.initiate_feedback }),
1999
2014
  /* @__PURE__ */ u("div", { className: "py-4", children: /* @__PURE__ */ u(
2000
2015
  yi,
@@ -2013,7 +2028,7 @@ function Si({
2013
2028
  onFollowUpClick: r
2014
2029
  }) {
2015
2030
  const o = G();
2016
- return /* @__PURE__ */ _("div", { className: "flex flex-col items-center gap-3 mb-4", children: [
2031
+ return /* @__PURE__ */ A("div", { className: "flex flex-col items-center gap-3 mb-4", children: [
2017
2032
  /* @__PURE__ */ u("div", { className: "text-sm text-base-primary font-medium", children: o.thanks_for_feedback }),
2018
2033
  /* @__PURE__ */ u(zr, { rating: t, min: 1, max: 5, icon: e }),
2019
2034
  n && /* @__PURE__ */ u(ve, { variant: "secondary", onClick: r, children: o.request_follow_up_feedback })
@@ -2040,7 +2055,7 @@ function ki({ icon: e = "star" }) {
2040
2055
  }
2041
2056
  function Ei({ entry: e }) {
2042
2057
  const { previewUrl: t } = xn();
2043
- return /* @__PURE__ */ _(
2058
+ return /* @__PURE__ */ A(
2044
2059
  "div",
2045
2060
  {
2046
2061
  className: V(
@@ -2072,13 +2087,13 @@ function Ei({ entry: e }) {
2072
2087
  );
2073
2088
  }
2074
2089
  function Ti({ entry: e }) {
2075
- const t = G(), { lastId: n } = re(), r = Na();
2076
- return /* @__PURE__ */ _("div", { className: "mt-3 px-8 flex flex-col", children: [
2077
- r && /* @__PURE__ */ u(ki, {}),
2078
- /* @__PURE__ */ _("div", { className: "text-xs text-base-subtle text-center transition-opacity duration-200 data-hidden:opacity-0", children: [
2090
+ const t = G(), { lastId: n } = oe(), r = Na();
2091
+ return /* @__PURE__ */ A("div", { className: "mt-3 px-8 flex flex-col", children: [
2092
+ r.value === "rating" && /* @__PURE__ */ u(ki, {}),
2093
+ /* @__PURE__ */ A("div", { className: "text-xs text-base-subtle text-center transition-opacity duration-200 data-hidden:opacity-0", children: [
2079
2094
  e.role === "user" ? t.user_ended_conversation : t.agent_ended_conversation,
2080
2095
  /* @__PURE__ */ u("br", {}),
2081
- n.value && /* @__PURE__ */ _("span", { className: "break-all", children: [
2096
+ n.value && /* @__PURE__ */ A("span", { className: "break-all", children: [
2082
2097
  t.conversation_id,
2083
2098
  ": ",
2084
2099
  n.value
@@ -2087,14 +2102,14 @@ function Ti({ entry: e }) {
2087
2102
  ] });
2088
2103
  }
2089
2104
  function Ai({ entry: e }) {
2090
- const t = G(), { lastId: n } = re();
2091
- return /* @__PURE__ */ _("div", { className: "mt-2 px-8 text-xs text-base-error text-center transition-opacity duration-200 data-hidden:opacity-0", children: [
2105
+ const t = G(), { lastId: n } = oe();
2106
+ return /* @__PURE__ */ A("div", { className: "mt-2 px-8 text-xs text-base-error text-center transition-opacity duration-200 data-hidden:opacity-0", children: [
2092
2107
  t.error_occurred,
2093
2108
  /* @__PURE__ */ u("br", {}),
2094
2109
  e.message,
2095
- n.value && /* @__PURE__ */ _(rt, { children: [
2110
+ n.value && /* @__PURE__ */ A(rt, { children: [
2096
2111
  /* @__PURE__ */ u("br", {}),
2097
- /* @__PURE__ */ _("span", { className: "text-base-subtle break-all", children: [
2112
+ /* @__PURE__ */ A("span", { className: "text-base-subtle break-all", children: [
2098
2113
  t.conversation_id,
2099
2114
  ": ",
2100
2115
  n.value
@@ -2106,11 +2121,11 @@ function _i({
2106
2121
  entry: e,
2107
2122
  animateIn: t
2108
2123
  }) {
2109
- return /* @__PURE__ */ u(ae, { initial: !t, active: !0, children: e.type === "message" ? /* @__PURE__ */ u(Ei, { entry: e }) : e.type === "disconnection" ? /* @__PURE__ */ u(Ti, { entry: e }) : /* @__PURE__ */ u(Ai, { entry: e }) });
2124
+ return /* @__PURE__ */ u(ie, { initial: !t, active: !0, children: e.type === "message" ? /* @__PURE__ */ u(Ei, { entry: e }) : e.type === "disconnection" ? /* @__PURE__ */ u(Ti, { entry: e }) : /* @__PURE__ */ u(Ai, { entry: e }) });
2110
2125
  }
2111
2126
  const Pi = 16;
2112
2127
  function Ri({ scrollPinned: e, transcript: t }) {
2113
- const n = J(null), r = J(0), o = J(null), a = J(!1), i = J(!1), s = (p) => {
2128
+ const n = ee(null), r = ee(0), o = ee(null), a = ee(!1), i = ee(!1), s = (p) => {
2114
2129
  var v;
2115
2130
  (v = n.current) == null || v.scrollTo({
2116
2131
  top: n.current.scrollHeight,
@@ -2119,30 +2134,30 @@ function Ri({ scrollPinned: e, transcript: t }) {
2119
2134
  }, l = () => {
2120
2135
  const p = n.current;
2121
2136
  if (!p || !a.current || i.current) return;
2122
- const v = p.scrollTop, g = p.scrollHeight - p.clientHeight, b = g - v;
2123
- if (Math.abs(b) < 1) {
2124
- p.scrollTop = g, o.current = requestAnimationFrame(l);
2137
+ const v = p.scrollTop, m = p.scrollHeight - p.clientHeight, x = m - v;
2138
+ if (Math.abs(x) < 1) {
2139
+ p.scrollTop = m, o.current = requestAnimationFrame(l);
2125
2140
  return;
2126
2141
  }
2127
- const d = b * 0.2, m = 2;
2128
- p.scrollTop = v + Math.max(d, m), o.current = requestAnimationFrame(l);
2142
+ const f = x * 0.2, g = 2;
2143
+ p.scrollTop = v + Math.max(f, g), o.current = requestAnimationFrame(l);
2129
2144
  }, c = () => {
2130
2145
  !n.current || i.current || a.current || (a.current = !0, o.current = requestAnimationFrame(l));
2131
- }, f = J(!0);
2132
- return Ue(() => (f.current = !1, s(!1), () => {
2146
+ }, d = ee(!0);
2147
+ return Ue(() => (d.current = !1, s(!1), () => {
2133
2148
  o.current && cancelAnimationFrame(o.current);
2134
2149
  }), []), Ee(() => {
2135
- var b;
2150
+ var x;
2136
2151
  const p = t.value;
2137
2152
  if (!e.peek()) return;
2138
2153
  const v = p[p.length - 1];
2139
2154
  if ((v == null ? void 0 : v.type) === "message" && (v == null ? void 0 : v.role) === "ai" && (v == null ? void 0 : v.isText) === !0) {
2140
- const d = ((b = v.message) == null ? void 0 : b.length) || 0;
2141
- r.current === 0 && d > 0 ? (r.current = d, i.current = !1, requestAnimationFrame(() => {
2155
+ const f = ((x = v.message) == null ? void 0 : x.length) || 0;
2156
+ r.current === 0 && f > 0 ? (r.current = f, i.current = !1, requestAnimationFrame(() => {
2142
2157
  requestAnimationFrame(() => {
2143
2158
  !i.current && e.peek() && (s(!1), c());
2144
2159
  });
2145
- })) : d > r.current && (r.current = d, c());
2160
+ })) : f > r.current && (r.current = f, c());
2146
2161
  } else
2147
2162
  r.current = 0, a.current = !1, i.current = !1, o.current && (cancelAnimationFrame(o.current), o.current = null), s(!0);
2148
2163
  }), /* @__PURE__ */ u(
@@ -2158,7 +2173,7 @@ function Ri({ scrollPinned: e, transcript: t }) {
2158
2173
  _i,
2159
2174
  {
2160
2175
  entry: p,
2161
- animateIn: !f.current
2176
+ animateIn: !d.current
2162
2177
  },
2163
2178
  `${v}-${p.conversationIndex}`
2164
2179
  ))
@@ -2184,7 +2199,7 @@ function En({
2184
2199
  visible: e,
2185
2200
  ...t
2186
2201
  }) {
2187
- const n = G(), { isMuted: r, isMutingEnabled: o, setIsMuted: a } = Cr(), i = ee(() => {
2202
+ const n = G(), { isMuted: r, isMutingEnabled: o, setIsMuted: a } = Cr(), i = te(() => {
2188
2203
  a(!r.peek());
2189
2204
  }, [a]);
2190
2205
  return o.value ? /* @__PURE__ */ u(Ne, { visible: e, className: "p-1", children: /* @__PURE__ */ u(
@@ -2204,7 +2219,7 @@ function Tn({
2204
2219
  children: n,
2205
2220
  ...r
2206
2221
  }) {
2207
- const { endSession: o, startSession: a } = re(), i = G();
2222
+ const { endSession: o, startSession: a } = oe(), i = G();
2208
2223
  return /* @__PURE__ */ u(
2209
2224
  ve,
2210
2225
  {
@@ -2221,47 +2236,47 @@ function Ii({
2221
2236
  showTranscript: e,
2222
2237
  scrollPinned: t
2223
2238
  }) {
2224
- const n = Q(""), r = zt(), { text_input_enabled: o } = q().value, a = G(), {
2239
+ const n = J(""), r = zt(), { text_input_enabled: o } = q().value, a = G(), {
2225
2240
  isDisconnected: i,
2226
2241
  status: s,
2227
2242
  startSession: l,
2228
2243
  sendUserMessage: c,
2229
- sendUserActivity: f,
2244
+ sendUserActivity: d,
2230
2245
  conversationIndex: p
2231
- } = re(), v = ee(
2232
- async (m) => {
2233
- m.preventDefault();
2246
+ } = oe(), v = te(
2247
+ async (g) => {
2248
+ g.preventDefault();
2234
2249
  const w = n.value.trim();
2235
- w && (t.value = !0, n.value = "", i.value ? await l(m.currentTarget, w) : c(w));
2250
+ w && (t.value = !0, n.value = "", i.value ? await l(g.currentTarget, w) : c(w));
2236
2251
  },
2237
2252
  [n, t, i, l, c]
2238
- ), g = ee(
2239
- async (m) => {
2240
- m.key === "Enter" && !m.shiftKey && await v(m);
2253
+ ), m = te(
2254
+ async (g) => {
2255
+ g.key === "Enter" && !g.shiftKey && await v(g);
2241
2256
  },
2242
2257
  [v]
2243
- ), b = ee(
2244
- (m) => {
2245
- n.value = m.currentTarget.value;
2258
+ ), x = te(
2259
+ (g) => {
2260
+ n.value = g.currentTarget.value;
2246
2261
  },
2247
2262
  [n]
2248
- ), d = Y(() => !!n.value.trim());
2249
- return /* @__PURE__ */ _("div", { className: "shrink-0 overflow-hidden flex p-3 items-end justify-end", children: [
2250
- o && /* @__PURE__ */ _("div", { className: "relative grow min-w-0 flex z-1 m-1", children: [
2263
+ ), f = Y(() => !!n.value.trim());
2264
+ return /* @__PURE__ */ A("div", { className: "shrink-0 overflow-hidden flex p-3 items-end justify-end", children: [
2265
+ o && /* @__PURE__ */ A("div", { className: "relative grow min-w-0 flex z-1 m-1", children: [
2251
2266
  /* @__PURE__ */ u(
2252
2267
  Vr,
2253
2268
  {
2254
2269
  rows: 1,
2255
2270
  "aria-label": a.input_label,
2256
2271
  value: n,
2257
- onInput: f,
2258
- onChange: b,
2259
- onKeyDown: g,
2272
+ onInput: d,
2273
+ onChange: x,
2274
+ onKeyDown: m,
2260
2275
  className: "min-w-0 w-full max-h-[8lh] pr-9",
2261
2276
  placeholder: r.value ? i.value && p.value > 0 ? a.input_placeholder_new_conversation : a.input_placeholder_text_only : a.input_placeholder
2262
2277
  }
2263
2278
  ),
2264
- /* @__PURE__ */ u(ae, { active: d, children: /* @__PURE__ */ u(
2279
+ /* @__PURE__ */ u(ie, { active: f, children: /* @__PURE__ */ u(
2265
2280
  "button",
2266
2281
  {
2267
2282
  "aria-label": a.send_message,
@@ -2271,7 +2286,7 @@ function Ii({
2271
2286
  }
2272
2287
  ) })
2273
2288
  ] }),
2274
- /* @__PURE__ */ _("div", { className: "flex h-11 items-center", children: [
2289
+ /* @__PURE__ */ A("div", { className: "flex h-11 items-center", children: [
2275
2290
  /* @__PURE__ */ u(En, { visible: !r.value && !i.value }),
2276
2291
  /* @__PURE__ */ u(
2277
2292
  Ne,
@@ -2293,14 +2308,14 @@ function Ii({
2293
2308
  ] });
2294
2309
  }
2295
2310
  function Ni() {
2296
- const e = G(), { rating: t, feedbackText: n } = Sn(), r = ee(
2311
+ const e = G(), { rating: t, feedbackText: n } = Sn(), r = te(
2297
2312
  (o) => {
2298
2313
  n.value = o.currentTarget.value;
2299
2314
  },
2300
2315
  []
2301
2316
  );
2302
- return /* @__PURE__ */ u("div", { className: "grow flex flex-col overflow-y-auto overflow-x-hidden px-4", children: /* @__PURE__ */ _("div", { className: "flex flex-col gap-8 min-h-full pt-4 pb-2", children: [
2303
- /* @__PURE__ */ _("div", { className: "flex flex-col items-center justify-center gap-3", children: [
2317
+ return /* @__PURE__ */ u("div", { className: "grow flex flex-col overflow-y-auto overflow-x-hidden px-4", children: /* @__PURE__ */ A("div", { className: "flex flex-col gap-8 min-h-full pt-4 pb-2", children: [
2318
+ /* @__PURE__ */ A("div", { className: "flex flex-col items-center justify-center gap-3", children: [
2304
2319
  /* @__PURE__ */ u(
2305
2320
  pi,
2306
2321
  {
@@ -2311,7 +2326,7 @@ function Ni() {
2311
2326
  }
2312
2327
  ),
2313
2328
  t.value !== null && /* @__PURE__ */ u(zr, { rating: t.value, min: 1, max: 5 }),
2314
- /* @__PURE__ */ _("div", { className: "text-center", children: [
2329
+ /* @__PURE__ */ A("div", { className: "text-center", children: [
2315
2330
  /* @__PURE__ */ u("p", { className: "text-sm text-base-primary font-medium", children: e.thanks_for_feedback }),
2316
2331
  /* @__PURE__ */ u("p", { className: "text-sm text-base-subtle", children: e.thanks_for_feedback_details })
2317
2332
  ] })
@@ -2329,7 +2344,7 @@ function Ni() {
2329
2344
  ] }) });
2330
2345
  }
2331
2346
  function Oi() {
2332
- const e = G(), { currentContent: t } = kn(), { submitFeedback: n } = Sn(), r = ee(() => {
2347
+ const e = G(), { currentContent: t } = kn(), { submitFeedback: n } = Sn(), r = te(() => {
2333
2348
  n(), t.value = "transcript";
2334
2349
  }, [n]);
2335
2350
  return /* @__PURE__ */ u("div", { className: "shrink-0 overflow-hidden flex p-3 items-end justify-end", children: /* @__PURE__ */ u(ve, { variant: "primary", onClick: r, children: e.submit }) });
@@ -2350,18 +2365,18 @@ function An(e, t = []) {
2350
2365
  n = [...n, i];
2351
2366
  const c = (p) => {
2352
2367
  var w;
2353
- const { scope: v, children: g, ...b } = p, d = ((w = v == null ? void 0 : v[e]) == null ? void 0 : w[l]) || s, m = h.useMemo(() => b, Object.values(b));
2354
- return /* @__PURE__ */ E(d.Provider, { value: m, children: g });
2368
+ const { scope: v, children: m, ...x } = p, f = ((w = v == null ? void 0 : v[e]) == null ? void 0 : w[l]) || s, g = h.useMemo(() => x, Object.values(x));
2369
+ return /* @__PURE__ */ T(f.Provider, { value: g, children: m });
2355
2370
  };
2356
2371
  c.displayName = a + "Provider";
2357
- function f(p, v) {
2358
- var d;
2359
- const g = ((d = v == null ? void 0 : v[e]) == null ? void 0 : d[l]) || s, b = h.useContext(g);
2360
- if (b) return b;
2372
+ function d(p, v) {
2373
+ var f;
2374
+ const m = ((f = v == null ? void 0 : v[e]) == null ? void 0 : f[l]) || s, x = h.useContext(m);
2375
+ if (x) return x;
2361
2376
  if (i !== void 0) return i;
2362
2377
  throw new Error(`\`${p}\` must be used within \`${a}\``);
2363
2378
  }
2364
- return [c, f];
2379
+ return [c, d];
2365
2380
  }
2366
2381
  const o = () => {
2367
2382
  const a = n.map((i) => h.createContext(i));
@@ -2397,39 +2412,39 @@ function Mi(e) {
2397
2412
  const t = e + "CollectionProvider", [n, r] = An(t), [o, a] = n(
2398
2413
  t,
2399
2414
  { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
2400
- ), i = (d) => {
2401
- const { scope: m, children: w } = d, y = De.useRef(null), x = De.useRef(/* @__PURE__ */ new Map()).current;
2402
- return /* @__PURE__ */ E(o, { scope: m, itemMap: x, collectionRef: y, children: w });
2415
+ ), i = (f) => {
2416
+ const { scope: g, children: w } = f, b = De.useRef(null), y = De.useRef(/* @__PURE__ */ new Map()).current;
2417
+ return /* @__PURE__ */ T(o, { scope: g, itemMap: y, collectionRef: b, children: w });
2403
2418
  };
2404
2419
  i.displayName = t;
2405
- const s = e + "CollectionSlot", l = /* @__PURE__ */ gt(s), c = De.forwardRef(
2406
- (d, m) => {
2407
- const { scope: w, children: y } = d, x = a(s, w), C = te(m, x.collectionRef);
2408
- return /* @__PURE__ */ E(l, { ref: C, children: y });
2420
+ const s = e + "CollectionSlot", l = /* @__PURE__ */ mt(s), c = De.forwardRef(
2421
+ (f, g) => {
2422
+ const { scope: w, children: b } = f, y = a(s, w), C = ne(g, y.collectionRef);
2423
+ return /* @__PURE__ */ T(l, { ref: C, children: b });
2409
2424
  }
2410
2425
  );
2411
2426
  c.displayName = s;
2412
- const f = e + "CollectionItemSlot", p = "data-radix-collection-item", v = /* @__PURE__ */ gt(f), g = De.forwardRef(
2413
- (d, m) => {
2414
- const { scope: w, children: y, ...x } = d, C = De.useRef(null), S = te(m, C), A = a(f, w);
2415
- return De.useEffect(() => (A.itemMap.set(C, { ref: C, ...x }), () => void A.itemMap.delete(C))), /* @__PURE__ */ E(v, { [p]: "", ref: S, children: y });
2427
+ const d = e + "CollectionItemSlot", p = "data-radix-collection-item", v = /* @__PURE__ */ mt(d), m = De.forwardRef(
2428
+ (f, g) => {
2429
+ const { scope: w, children: b, ...y } = f, C = De.useRef(null), S = ne(g, C), E = a(d, w);
2430
+ return De.useEffect(() => (E.itemMap.set(C, { ref: C, ...y }), () => void E.itemMap.delete(C))), /* @__PURE__ */ T(v, { [p]: "", ref: S, children: b });
2416
2431
  }
2417
2432
  );
2418
- g.displayName = f;
2419
- function b(d) {
2420
- const m = a(e + "CollectionConsumer", d);
2433
+ m.displayName = d;
2434
+ function x(f) {
2435
+ const g = a(e + "CollectionConsumer", f);
2421
2436
  return De.useCallback(() => {
2422
- const y = m.collectionRef.current;
2423
- if (!y) return [];
2424
- const x = Array.from(y.querySelectorAll(`[${p}]`));
2425
- return Array.from(m.itemMap.values()).sort(
2426
- (A, k) => x.indexOf(A.ref.current) - x.indexOf(k.ref.current)
2437
+ const b = g.collectionRef.current;
2438
+ if (!b) return [];
2439
+ const y = Array.from(b.querySelectorAll(`[${p}]`));
2440
+ return Array.from(g.itemMap.values()).sort(
2441
+ (E, k) => y.indexOf(E.ref.current) - y.indexOf(k.ref.current)
2427
2442
  );
2428
- }, [m.collectionRef, m.itemMap]);
2443
+ }, [g.collectionRef, g.itemMap]);
2429
2444
  }
2430
2445
  return [
2431
- { Provider: i, Slot: c, ItemSlot: g },
2432
- b,
2446
+ { Provider: i, Slot: c, ItemSlot: m },
2447
+ x,
2433
2448
  r
2434
2449
  ];
2435
2450
  }
@@ -2457,9 +2472,9 @@ var Bi = [
2457
2472
  "svg",
2458
2473
  "ul"
2459
2474
  ], X = Bi.reduce((e, t) => {
2460
- const n = /* @__PURE__ */ gt(`Primitive.${t}`), r = h.forwardRef((o, a) => {
2475
+ const n = /* @__PURE__ */ mt(`Primitive.${t}`), r = h.forwardRef((o, a) => {
2461
2476
  const { asChild: i, ...s } = o, l = i ? n : t;
2462
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ E(l, { ...s, ref: a });
2477
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ T(l, { ...s, ref: a });
2463
2478
  });
2464
2479
  return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
2465
2480
  }, {});
@@ -2498,36 +2513,36 @@ var $i = "DismissableLayer", sn = "dismissableLayer.update", Wi = "dismissableLa
2498
2513
  onInteractOutside: i,
2499
2514
  onDismiss: s,
2500
2515
  ...l
2501
- } = e, c = h.useContext($r), [f, p] = h.useState(null), v = (f == null ? void 0 : f.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, g] = h.useState({}), b = te(t, (k) => p(k)), d = Array.from(c.layers), [m] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), w = d.indexOf(m), y = f ? d.indexOf(f) : -1, x = c.layersWithOutsidePointerEventsDisabled.size > 0, C = y >= w, S = Yi((k) => {
2516
+ } = e, c = h.useContext($r), [d, p] = h.useState(null), v = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, m] = h.useState({}), x = ne(t, (k) => p(k)), f = Array.from(c.layers), [g] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), w = f.indexOf(g), b = d ? f.indexOf(d) : -1, y = c.layersWithOutsidePointerEventsDisabled.size > 0, C = b >= w, S = Yi((k) => {
2502
2517
  const I = k.target, D = [...c.branches].some((L) => L.contains(I));
2503
2518
  !C || D || (o == null || o(k), i == null || i(k), k.defaultPrevented || s == null || s());
2504
- }, v), A = Ki((k) => {
2519
+ }, v), E = Ki((k) => {
2505
2520
  const I = k.target;
2506
2521
  [...c.branches].some((L) => L.contains(I)) || (a == null || a(k), i == null || i(k), k.defaultPrevented || s == null || s());
2507
2522
  }, v);
2508
2523
  return Vi((k) => {
2509
- y === c.layers.size - 1 && (r == null || r(k), !k.defaultPrevented && s && (k.preventDefault(), s()));
2524
+ b === c.layers.size - 1 && (r == null || r(k), !k.defaultPrevented && s && (k.preventDefault(), s()));
2510
2525
  }, v), h.useEffect(() => {
2511
- if (f)
2512
- return n && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (jn = v.body.style.pointerEvents, v.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(f)), c.layers.add(f), Yn(), () => {
2526
+ if (d)
2527
+ return n && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (jn = v.body.style.pointerEvents, v.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(d)), c.layers.add(d), Yn(), () => {
2513
2528
  n && c.layersWithOutsidePointerEventsDisabled.size === 1 && (v.body.style.pointerEvents = jn);
2514
2529
  };
2515
- }, [f, v, n, c]), h.useEffect(() => () => {
2516
- f && (c.layers.delete(f), c.layersWithOutsidePointerEventsDisabled.delete(f), Yn());
2517
- }, [f, c]), h.useEffect(() => {
2518
- const k = () => g({});
2530
+ }, [d, v, n, c]), h.useEffect(() => () => {
2531
+ d && (c.layers.delete(d), c.layersWithOutsidePointerEventsDisabled.delete(d), Yn());
2532
+ }, [d, c]), h.useEffect(() => {
2533
+ const k = () => m({});
2519
2534
  return document.addEventListener(sn, k), () => document.removeEventListener(sn, k);
2520
- }, []), /* @__PURE__ */ E(
2535
+ }, []), /* @__PURE__ */ T(
2521
2536
  X.div,
2522
2537
  {
2523
2538
  ...l,
2524
- ref: b,
2539
+ ref: x,
2525
2540
  style: {
2526
- pointerEvents: x ? C ? "auto" : "none" : void 0,
2541
+ pointerEvents: y ? C ? "auto" : "none" : void 0,
2527
2542
  ...e.style
2528
2543
  },
2529
- onFocusCapture: Z(e.onFocusCapture, A.onFocusCapture),
2530
- onBlurCapture: Z(e.onBlurCapture, A.onBlurCapture),
2544
+ onFocusCapture: Z(e.onFocusCapture, E.onFocusCapture),
2545
+ onBlurCapture: Z(e.onBlurCapture, E.onBlurCapture),
2531
2546
  onPointerDownCapture: Z(
2532
2547
  e.onPointerDownCapture,
2533
2548
  S.onPointerDownCapture
@@ -2538,14 +2553,14 @@ var $i = "DismissableLayer", sn = "dismissableLayer.update", Wi = "dismissableLa
2538
2553
  );
2539
2554
  Wr.displayName = $i;
2540
2555
  var Ui = "DismissableLayerBranch", ji = h.forwardRef((e, t) => {
2541
- const n = h.useContext($r), r = h.useRef(null), o = te(t, r);
2556
+ const n = h.useContext($r), r = h.useRef(null), o = ne(t, r);
2542
2557
  return h.useEffect(() => {
2543
2558
  const a = r.current;
2544
2559
  if (a)
2545
2560
  return n.branches.add(a), () => {
2546
2561
  n.branches.delete(a);
2547
2562
  };
2548
- }, [n.branches]), /* @__PURE__ */ E(X.div, { ...e, ref: o });
2563
+ }, [n.branches]), /* @__PURE__ */ T(X.div, { ...e, ref: o });
2549
2564
  });
2550
2565
  ji.displayName = Ui;
2551
2566
  function Yi(e, t = globalThis == null ? void 0 : globalThis.document) {
@@ -2620,7 +2635,7 @@ var Gt = "focusScope.autoFocusOnMount", qt = "focusScope.autoFocusOnUnmount", Xn
2620
2635
  onMountAutoFocus: o,
2621
2636
  onUnmountAutoFocus: a,
2622
2637
  ...i
2623
- } = e, [s, l] = h.useState(null), c = je(o), f = je(a), p = h.useRef(null), v = te(t, (d) => l(d)), g = h.useRef({
2638
+ } = e, [s, l] = h.useState(null), c = je(o), d = je(a), p = h.useRef(null), v = ne(t, (f) => l(f)), m = h.useRef({
2624
2639
  paused: !1,
2625
2640
  pause() {
2626
2641
  this.paused = !0;
@@ -2631,53 +2646,53 @@ var Gt = "focusScope.autoFocusOnMount", qt = "focusScope.autoFocusOnUnmount", Xn
2631
2646
  }).current;
2632
2647
  h.useEffect(() => {
2633
2648
  if (r) {
2634
- let d = function(x) {
2635
- if (g.paused || !s) return;
2636
- const C = x.target;
2649
+ let f = function(y) {
2650
+ if (m.paused || !s) return;
2651
+ const C = y.target;
2637
2652
  s.contains(C) ? p.current = C : Fe(p.current, { select: !0 });
2638
- }, m = function(x) {
2639
- if (g.paused || !s) return;
2640
- const C = x.relatedTarget;
2653
+ }, g = function(y) {
2654
+ if (m.paused || !s) return;
2655
+ const C = y.relatedTarget;
2641
2656
  C !== null && (s.contains(C) || Fe(p.current, { select: !0 }));
2642
- }, w = function(x) {
2657
+ }, w = function(y) {
2643
2658
  if (document.activeElement === document.body)
2644
- for (const S of x)
2659
+ for (const S of y)
2645
2660
  S.removedNodes.length > 0 && Fe(s);
2646
2661
  };
2647
- document.addEventListener("focusin", d), document.addEventListener("focusout", m);
2648
- const y = new MutationObserver(w);
2649
- return s && y.observe(s, { childList: !0, subtree: !0 }), () => {
2650
- document.removeEventListener("focusin", d), document.removeEventListener("focusout", m), y.disconnect();
2662
+ document.addEventListener("focusin", f), document.addEventListener("focusout", g);
2663
+ const b = new MutationObserver(w);
2664
+ return s && b.observe(s, { childList: !0, subtree: !0 }), () => {
2665
+ document.removeEventListener("focusin", f), document.removeEventListener("focusout", g), b.disconnect();
2651
2666
  };
2652
2667
  }
2653
- }, [r, s, g.paused]), h.useEffect(() => {
2668
+ }, [r, s, m.paused]), h.useEffect(() => {
2654
2669
  if (s) {
2655
- Gn.add(g);
2656
- const d = document.activeElement;
2657
- if (!s.contains(d)) {
2670
+ Gn.add(m);
2671
+ const f = document.activeElement;
2672
+ if (!s.contains(f)) {
2658
2673
  const w = new CustomEvent(Gt, Xn);
2659
- s.addEventListener(Gt, c), s.dispatchEvent(w), w.defaultPrevented || (Gi(ts(jr(s)), { select: !0 }), document.activeElement === d && Fe(s));
2674
+ s.addEventListener(Gt, c), s.dispatchEvent(w), w.defaultPrevented || (Gi(ts(jr(s)), { select: !0 }), document.activeElement === f && Fe(s));
2660
2675
  }
2661
2676
  return () => {
2662
2677
  s.removeEventListener(Gt, c), setTimeout(() => {
2663
2678
  const w = new CustomEvent(qt, Xn);
2664
- s.addEventListener(qt, f), s.dispatchEvent(w), w.defaultPrevented || Fe(d ?? document.body, { select: !0 }), s.removeEventListener(qt, f), Gn.remove(g);
2679
+ s.addEventListener(qt, d), s.dispatchEvent(w), w.defaultPrevented || Fe(f ?? document.body, { select: !0 }), s.removeEventListener(qt, d), Gn.remove(m);
2665
2680
  }, 0);
2666
2681
  };
2667
2682
  }
2668
- }, [s, c, f, g]);
2669
- const b = h.useCallback(
2670
- (d) => {
2671
- if (!n && !r || g.paused) return;
2672
- const m = d.key === "Tab" && !d.altKey && !d.ctrlKey && !d.metaKey, w = document.activeElement;
2673
- if (m && w) {
2674
- const y = d.currentTarget, [x, C] = qi(y);
2675
- x && C ? !d.shiftKey && w === C ? (d.preventDefault(), n && Fe(x, { select: !0 })) : d.shiftKey && w === x && (d.preventDefault(), n && Fe(C, { select: !0 })) : w === y && d.preventDefault();
2683
+ }, [s, c, d, m]);
2684
+ const x = h.useCallback(
2685
+ (f) => {
2686
+ if (!n && !r || m.paused) return;
2687
+ const g = f.key === "Tab" && !f.altKey && !f.ctrlKey && !f.metaKey, w = document.activeElement;
2688
+ if (g && w) {
2689
+ const b = f.currentTarget, [y, C] = qi(b);
2690
+ y && C ? !f.shiftKey && w === C ? (f.preventDefault(), n && Fe(y, { select: !0 })) : f.shiftKey && w === y && (f.preventDefault(), n && Fe(C, { select: !0 })) : w === b && f.preventDefault();
2676
2691
  }
2677
2692
  },
2678
- [n, r, g.paused]
2693
+ [n, r, m.paused]
2679
2694
  );
2680
- return /* @__PURE__ */ E(X.div, { tabIndex: -1, ...i, ref: v, onKeyDown: b });
2695
+ return /* @__PURE__ */ T(X.div, { tabIndex: -1, ...i, ref: v, onKeyDown: x });
2681
2696
  });
2682
2697
  Ur.displayName = Zi;
2683
2698
  function Gi(e, { select: t = !1 } = {}) {
@@ -2862,48 +2877,48 @@ function er(e, t, n) {
2862
2877
  reference: r,
2863
2878
  floating: o
2864
2879
  } = e;
2865
- const a = ye(t), i = In(t), s = Rn(i), l = Le(t), c = a === "y", f = r.x + r.width / 2 - o.width / 2, p = r.y + r.height / 2 - o.height / 2, v = r[s] / 2 - o[s] / 2;
2866
- let g;
2880
+ const a = ye(t), i = In(t), s = Rn(i), l = Le(t), c = a === "y", d = r.x + r.width / 2 - o.width / 2, p = r.y + r.height / 2 - o.height / 2, v = r[s] / 2 - o[s] / 2;
2881
+ let m;
2867
2882
  switch (l) {
2868
2883
  case "top":
2869
- g = {
2870
- x: f,
2884
+ m = {
2885
+ x: d,
2871
2886
  y: r.y - o.height
2872
2887
  };
2873
2888
  break;
2874
2889
  case "bottom":
2875
- g = {
2876
- x: f,
2890
+ m = {
2891
+ x: d,
2877
2892
  y: r.y + r.height
2878
2893
  };
2879
2894
  break;
2880
2895
  case "right":
2881
- g = {
2896
+ m = {
2882
2897
  x: r.x + r.width,
2883
2898
  y: p
2884
2899
  };
2885
2900
  break;
2886
2901
  case "left":
2887
- g = {
2902
+ m = {
2888
2903
  x: r.x - o.width,
2889
2904
  y: p
2890
2905
  };
2891
2906
  break;
2892
2907
  default:
2893
- g = {
2908
+ m = {
2894
2909
  x: r.x,
2895
2910
  y: r.y
2896
2911
  };
2897
2912
  }
2898
2913
  switch (st(t)) {
2899
2914
  case "start":
2900
- g[i] -= v * (n && c ? -1 : 1);
2915
+ m[i] -= v * (n && c ? -1 : 1);
2901
2916
  break;
2902
2917
  case "end":
2903
- g[i] += v * (n && c ? -1 : 1);
2918
+ m[i] += v * (n && c ? -1 : 1);
2904
2919
  break;
2905
2920
  }
2906
- return g;
2921
+ return m;
2907
2922
  }
2908
2923
  const vs = async (e, t, n) => {
2909
2924
  const {
@@ -2917,25 +2932,25 @@ const vs = async (e, t, n) => {
2917
2932
  floating: t,
2918
2933
  strategy: o
2919
2934
  }), {
2920
- x: f,
2935
+ x: d,
2921
2936
  y: p
2922
- } = er(c, r, l), v = r, g = {}, b = 0;
2923
- for (let d = 0; d < s.length; d++) {
2937
+ } = er(c, r, l), v = r, m = {}, x = 0;
2938
+ for (let f = 0; f < s.length; f++) {
2924
2939
  const {
2925
- name: m,
2940
+ name: g,
2926
2941
  fn: w
2927
- } = s[d], {
2928
- x: y,
2929
- y: x,
2942
+ } = s[f], {
2943
+ x: b,
2944
+ y,
2930
2945
  data: C,
2931
2946
  reset: S
2932
2947
  } = await w({
2933
- x: f,
2948
+ x: d,
2934
2949
  y: p,
2935
2950
  initialPlacement: r,
2936
2951
  placement: v,
2937
2952
  strategy: o,
2938
- middlewareData: g,
2953
+ middlewareData: m,
2939
2954
  rects: c,
2940
2955
  platform: i,
2941
2956
  elements: {
@@ -2943,27 +2958,27 @@ const vs = async (e, t, n) => {
2943
2958
  floating: t
2944
2959
  }
2945
2960
  });
2946
- f = y ?? f, p = x ?? p, g = {
2947
- ...g,
2948
- [m]: {
2949
- ...g[m],
2961
+ d = b ?? d, p = y ?? p, m = {
2962
+ ...m,
2963
+ [g]: {
2964
+ ...m[g],
2950
2965
  ...C
2951
2966
  }
2952
- }, S && b <= 50 && (b++, typeof S == "object" && (S.placement && (v = S.placement), S.rects && (c = S.rects === !0 ? await i.getElementRects({
2967
+ }, S && x <= 50 && (x++, typeof S == "object" && (S.placement && (v = S.placement), S.rects && (c = S.rects === !0 ? await i.getElementRects({
2953
2968
  reference: e,
2954
2969
  floating: t,
2955
2970
  strategy: o
2956
2971
  }) : S.rects), {
2957
- x: f,
2972
+ x: d,
2958
2973
  y: p
2959
- } = er(c, v, l)), d = -1);
2974
+ } = er(c, v, l)), f = -1);
2960
2975
  }
2961
2976
  return {
2962
- x: f,
2977
+ x: d,
2963
2978
  y: p,
2964
2979
  placement: v,
2965
2980
  strategy: o,
2966
- middlewareData: g
2981
+ middlewareData: m
2967
2982
  };
2968
2983
  };
2969
2984
  async function wt(e, t) {
@@ -2978,21 +2993,21 @@ async function wt(e, t) {
2978
2993
  strategy: l
2979
2994
  } = e, {
2980
2995
  boundary: c = "clippingAncestors",
2981
- rootBoundary: f = "viewport",
2996
+ rootBoundary: d = "viewport",
2982
2997
  elementContext: p = "floating",
2983
2998
  altBoundary: v = !1,
2984
- padding: g = 0
2985
- } = Oe(t, e), b = Yr(g), m = s[v ? p === "floating" ? "reference" : "floating" : p], w = Mt(await a.getClippingRect({
2986
- element: (n = await (a.isElement == null ? void 0 : a.isElement(m))) == null || n ? m : m.contextElement || await (a.getDocumentElement == null ? void 0 : a.getDocumentElement(s.floating)),
2999
+ padding: m = 0
3000
+ } = Oe(t, e), x = Yr(m), g = s[v ? p === "floating" ? "reference" : "floating" : p], w = Mt(await a.getClippingRect({
3001
+ element: (n = await (a.isElement == null ? void 0 : a.isElement(g))) == null || n ? g : g.contextElement || await (a.getDocumentElement == null ? void 0 : a.getDocumentElement(s.floating)),
2987
3002
  boundary: c,
2988
- rootBoundary: f,
3003
+ rootBoundary: d,
2989
3004
  strategy: l
2990
- })), y = p === "floating" ? {
3005
+ })), b = p === "floating" ? {
2991
3006
  x: r,
2992
3007
  y: o,
2993
3008
  width: i.floating.width,
2994
3009
  height: i.floating.height
2995
- } : i.reference, x = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(s.floating)), C = await (a.isElement == null ? void 0 : a.isElement(x)) ? await (a.getScale == null ? void 0 : a.getScale(x)) || {
3010
+ } : i.reference, y = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(s.floating)), C = await (a.isElement == null ? void 0 : a.isElement(y)) ? await (a.getScale == null ? void 0 : a.getScale(y)) || {
2996
3011
  x: 1,
2997
3012
  y: 1
2998
3013
  } : {
@@ -3000,18 +3015,18 @@ async function wt(e, t) {
3000
3015
  y: 1
3001
3016
  }, S = Mt(a.convertOffsetParentRelativeRectToViewportRelativeRect ? await a.convertOffsetParentRelativeRectToViewportRelativeRect({
3002
3017
  elements: s,
3003
- rect: y,
3004
- offsetParent: x,
3018
+ rect: b,
3019
+ offsetParent: y,
3005
3020
  strategy: l
3006
- }) : y);
3021
+ }) : b);
3007
3022
  return {
3008
- top: (w.top - S.top + b.top) / C.y,
3009
- bottom: (S.bottom - w.bottom + b.bottom) / C.y,
3010
- left: (w.left - S.left + b.left) / C.x,
3011
- right: (S.right - w.right + b.right) / C.x
3023
+ top: (w.top - S.top + x.top) / C.y,
3024
+ bottom: (S.bottom - w.bottom + x.bottom) / C.y,
3025
+ left: (w.left - S.left + x.left) / C.x,
3026
+ right: (S.right - w.right + x.right) / C.x
3012
3027
  };
3013
3028
  }
3014
- const ms = (e) => ({
3029
+ const gs = (e) => ({
3015
3030
  name: "arrow",
3016
3031
  options: e,
3017
3032
  async fn(t) {
@@ -3025,22 +3040,22 @@ const ms = (e) => ({
3025
3040
  middlewareData: l
3026
3041
  } = t, {
3027
3042
  element: c,
3028
- padding: f = 0
3043
+ padding: d = 0
3029
3044
  } = Oe(e, t) || {};
3030
3045
  if (c == null)
3031
3046
  return {};
3032
- const p = Yr(f), v = {
3047
+ const p = Yr(d), v = {
3033
3048
  x: n,
3034
3049
  y: r
3035
- }, g = In(o), b = Rn(g), d = await i.getDimensions(c), m = g === "y", w = m ? "top" : "left", y = m ? "bottom" : "right", x = m ? "clientHeight" : "clientWidth", C = a.reference[b] + a.reference[g] - v[g] - a.floating[b], S = v[g] - a.reference[g], A = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c));
3036
- let k = A ? A[x] : 0;
3037
- (!k || !await (i.isElement == null ? void 0 : i.isElement(A))) && (k = s.floating[x] || a.floating[b]);
3038
- const I = C / 2 - S / 2, D = k / 2 - d[b] / 2 - 1, L = ze(p[w], D), $ = ze(p[y], D), W = L, N = k - d[b] - $, T = k / 2 - d[b] / 2 + I, B = ln(W, T, N), O = !l.arrow && st(o) != null && T !== B && a.reference[b] / 2 - (T < W ? L : $) - d[b] / 2 < 0, M = O ? T < W ? T - W : T - N : 0;
3050
+ }, m = In(o), x = Rn(m), f = await i.getDimensions(c), g = m === "y", w = g ? "top" : "left", b = g ? "bottom" : "right", y = g ? "clientHeight" : "clientWidth", C = a.reference[x] + a.reference[m] - v[m] - a.floating[x], S = v[m] - a.reference[m], E = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c));
3051
+ let k = E ? E[y] : 0;
3052
+ (!k || !await (i.isElement == null ? void 0 : i.isElement(E))) && (k = s.floating[y] || a.floating[x]);
3053
+ const I = C / 2 - S / 2, D = k / 2 - f[x] / 2 - 1, L = ze(p[w], D), $ = ze(p[b], D), W = L, F = k - f[x] - $, N = k / 2 - f[x] / 2 + I, _ = ln(W, N, F), O = !l.arrow && st(o) != null && N !== _ && a.reference[x] / 2 - (N < W ? L : $) - f[x] / 2 < 0, M = O ? N < W ? N - W : N - F : 0;
3039
3054
  return {
3040
- [g]: v[g] + M,
3055
+ [m]: v[m] + M,
3041
3056
  data: {
3042
- [g]: B,
3043
- centerOffset: T - B - M,
3057
+ [m]: _,
3058
+ centerOffset: N - _ - M,
3044
3059
  ...O && {
3045
3060
  alignmentOffset: M
3046
3061
  }
@@ -3048,7 +3063,7 @@ const ms = (e) => ({
3048
3063
  reset: O
3049
3064
  };
3050
3065
  }
3051
- }), gs = function(e) {
3066
+ }), ms = function(e) {
3052
3067
  return e === void 0 && (e = {}), {
3053
3068
  name: "flip",
3054
3069
  options: e,
@@ -3062,56 +3077,56 @@ const ms = (e) => ({
3062
3077
  platform: l,
3063
3078
  elements: c
3064
3079
  } = t, {
3065
- mainAxis: f = !0,
3080
+ mainAxis: d = !0,
3066
3081
  crossAxis: p = !0,
3067
3082
  fallbackPlacements: v,
3068
- fallbackStrategy: g = "bestFit",
3069
- fallbackAxisSideDirection: b = "none",
3070
- flipAlignment: d = !0,
3071
- ...m
3083
+ fallbackStrategy: m = "bestFit",
3084
+ fallbackAxisSideDirection: x = "none",
3085
+ flipAlignment: f = !0,
3086
+ ...g
3072
3087
  } = Oe(e, t);
3073
3088
  if ((n = a.arrow) != null && n.alignmentOffset)
3074
3089
  return {};
3075
- const w = Le(o), y = ye(s), x = Le(s) === s, C = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), S = v || (x || !d ? [Lt(s)] : cs(s)), A = b !== "none";
3076
- !v && A && S.push(...ps(s, d, b, C));
3077
- const k = [s, ...S], I = await wt(t, m), D = [];
3090
+ const w = Le(o), b = ye(s), y = Le(s) === s, C = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), S = v || (y || !f ? [Lt(s)] : cs(s)), E = x !== "none";
3091
+ !v && E && S.push(...ps(s, f, x, C));
3092
+ const k = [s, ...S], I = await wt(t, g), D = [];
3078
3093
  let L = ((r = a.flip) == null ? void 0 : r.overflows) || [];
3079
- if (f && D.push(I[w]), p) {
3080
- const T = ls(o, i, C);
3081
- D.push(I[T[0]], I[T[1]]);
3094
+ if (d && D.push(I[w]), p) {
3095
+ const N = ls(o, i, C);
3096
+ D.push(I[N[0]], I[N[1]]);
3082
3097
  }
3083
3098
  if (L = [...L, {
3084
3099
  placement: o,
3085
3100
  overflows: D
3086
- }], !D.every((T) => T <= 0)) {
3101
+ }], !D.every((N) => N <= 0)) {
3087
3102
  var $, W;
3088
- const T = ((($ = a.flip) == null ? void 0 : $.index) || 0) + 1, B = k[T];
3089
- if (B && (!(p === "alignment" ? y !== ye(B) : !1) || // We leave the current main axis only if every placement on that axis
3103
+ const N = ((($ = a.flip) == null ? void 0 : $.index) || 0) + 1, _ = k[N];
3104
+ if (_ && (!(p === "alignment" ? b !== ye(_) : !1) || // We leave the current main axis only if every placement on that axis
3090
3105
  // overflows the main axis.
3091
- L.every((P) => ye(P.placement) === y ? P.overflows[0] > 0 : !0)))
3106
+ L.every((P) => ye(P.placement) === b ? P.overflows[0] > 0 : !0)))
3092
3107
  return {
3093
3108
  data: {
3094
- index: T,
3109
+ index: N,
3095
3110
  overflows: L
3096
3111
  },
3097
3112
  reset: {
3098
- placement: B
3113
+ placement: _
3099
3114
  }
3100
3115
  };
3101
3116
  let O = (W = L.filter((M) => M.overflows[0] <= 0).sort((M, P) => M.overflows[1] - P.overflows[1])[0]) == null ? void 0 : W.placement;
3102
3117
  if (!O)
3103
- switch (g) {
3118
+ switch (m) {
3104
3119
  case "bestFit": {
3105
- var N;
3106
- const M = (N = L.filter((P) => {
3107
- if (A) {
3120
+ var F;
3121
+ const M = (F = L.filter((P) => {
3122
+ if (E) {
3108
3123
  const z = ye(P.placement);
3109
- return z === y || // Create a bias to the `y` side axis due to horizontal
3124
+ return z === b || // Create a bias to the `y` side axis due to horizontal
3110
3125
  // reading directions favoring greater width.
3111
3126
  z === "y";
3112
3127
  }
3113
3128
  return !0;
3114
- }).map((P) => [P.placement, P.overflows.filter((z) => z > 0).reduce((z, ie) => z + ie, 0)]).sort((P, z) => P[1] - z[1])[0]) == null ? void 0 : N[0];
3129
+ }).map((P) => [P.placement, P.overflows.filter((z) => z > 0).reduce((z, Q) => z + Q, 0)]).sort((P, z) => P[1] - z[1])[0]) == null ? void 0 : F[0];
3115
3130
  M && (O = M);
3116
3131
  break;
3117
3132
  }
@@ -3188,11 +3203,11 @@ async function bs(e, t) {
3188
3203
  placement: n,
3189
3204
  platform: r,
3190
3205
  elements: o
3191
- } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = Le(n), s = st(n), l = ye(n) === "y", c = Kr.has(i) ? -1 : 1, f = a && l ? -1 : 1, p = Oe(t, e);
3206
+ } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = Le(n), s = st(n), l = ye(n) === "y", c = Kr.has(i) ? -1 : 1, d = a && l ? -1 : 1, p = Oe(t, e);
3192
3207
  let {
3193
3208
  mainAxis: v,
3194
- crossAxis: g,
3195
- alignmentAxis: b
3209
+ crossAxis: m,
3210
+ alignmentAxis: x
3196
3211
  } = typeof p == "number" ? {
3197
3212
  mainAxis: p,
3198
3213
  crossAxis: 0,
@@ -3202,12 +3217,12 @@ async function bs(e, t) {
3202
3217
  crossAxis: p.crossAxis || 0,
3203
3218
  alignmentAxis: p.alignmentAxis
3204
3219
  };
3205
- return s && typeof b == "number" && (g = s === "end" ? b * -1 : b), l ? {
3206
- x: g * f,
3220
+ return s && typeof x == "number" && (m = s === "end" ? x * -1 : x), l ? {
3221
+ x: m * d,
3207
3222
  y: v * c
3208
3223
  } : {
3209
3224
  x: v * c,
3210
- y: g * f
3225
+ y: m * d
3211
3226
  };
3212
3227
  }
3213
3228
  const xs = function(e) {
@@ -3245,14 +3260,14 @@ const xs = function(e) {
3245
3260
  mainAxis: a = !0,
3246
3261
  crossAxis: i = !1,
3247
3262
  limiter: s = {
3248
- fn: (m) => {
3263
+ fn: (g) => {
3249
3264
  let {
3250
3265
  x: w,
3251
- y
3252
- } = m;
3266
+ y: b
3267
+ } = g;
3253
3268
  return {
3254
3269
  x: w,
3255
- y
3270
+ y: b
3256
3271
  };
3257
3272
  }
3258
3273
  },
@@ -3260,26 +3275,26 @@ const xs = function(e) {
3260
3275
  } = Oe(e, t), c = {
3261
3276
  x: n,
3262
3277
  y: r
3263
- }, f = await wt(t, l), p = ye(Le(o)), v = Pn(p);
3264
- let g = c[v], b = c[p];
3278
+ }, d = await wt(t, l), p = ye(Le(o)), v = Pn(p);
3279
+ let m = c[v], x = c[p];
3265
3280
  if (a) {
3266
- const m = v === "y" ? "top" : "left", w = v === "y" ? "bottom" : "right", y = g + f[m], x = g - f[w];
3267
- g = ln(y, g, x);
3281
+ const g = v === "y" ? "top" : "left", w = v === "y" ? "bottom" : "right", b = m + d[g], y = m - d[w];
3282
+ m = ln(b, m, y);
3268
3283
  }
3269
3284
  if (i) {
3270
- const m = p === "y" ? "top" : "left", w = p === "y" ? "bottom" : "right", y = b + f[m], x = b - f[w];
3271
- b = ln(y, b, x);
3285
+ const g = p === "y" ? "top" : "left", w = p === "y" ? "bottom" : "right", b = x + d[g], y = x - d[w];
3286
+ x = ln(b, x, y);
3272
3287
  }
3273
- const d = s.fn({
3288
+ const f = s.fn({
3274
3289
  ...t,
3275
- [v]: g,
3276
- [p]: b
3290
+ [v]: m,
3291
+ [p]: x
3277
3292
  });
3278
3293
  return {
3279
- ...d,
3294
+ ...f,
3280
3295
  data: {
3281
- x: d.x - n,
3282
- y: d.y - r,
3296
+ x: f.x - n,
3297
+ y: f.y - r,
3283
3298
  enabled: {
3284
3299
  [v]: a,
3285
3300
  [p]: i
@@ -3302,31 +3317,31 @@ const xs = function(e) {
3302
3317
  offset: s = 0,
3303
3318
  mainAxis: l = !0,
3304
3319
  crossAxis: c = !0
3305
- } = Oe(e, t), f = {
3320
+ } = Oe(e, t), d = {
3306
3321
  x: n,
3307
3322
  y: r
3308
3323
  }, p = ye(o), v = Pn(p);
3309
- let g = f[v], b = f[p];
3310
- const d = Oe(s, t), m = typeof d == "number" ? {
3311
- mainAxis: d,
3324
+ let m = d[v], x = d[p];
3325
+ const f = Oe(s, t), g = typeof f == "number" ? {
3326
+ mainAxis: f,
3312
3327
  crossAxis: 0
3313
3328
  } : {
3314
3329
  mainAxis: 0,
3315
3330
  crossAxis: 0,
3316
- ...d
3331
+ ...f
3317
3332
  };
3318
3333
  if (l) {
3319
- const x = v === "y" ? "height" : "width", C = a.reference[v] - a.floating[x] + m.mainAxis, S = a.reference[v] + a.reference[x] - m.mainAxis;
3320
- g < C ? g = C : g > S && (g = S);
3334
+ const y = v === "y" ? "height" : "width", C = a.reference[v] - a.floating[y] + g.mainAxis, S = a.reference[v] + a.reference[y] - g.mainAxis;
3335
+ m < C ? m = C : m > S && (m = S);
3321
3336
  }
3322
3337
  if (c) {
3323
- var w, y;
3324
- const x = v === "y" ? "width" : "height", C = Kr.has(Le(o)), S = a.reference[p] - a.floating[x] + (C && ((w = i.offset) == null ? void 0 : w[p]) || 0) + (C ? 0 : m.crossAxis), A = a.reference[p] + a.reference[x] + (C ? 0 : ((y = i.offset) == null ? void 0 : y[p]) || 0) - (C ? m.crossAxis : 0);
3325
- b < S ? b = S : b > A && (b = A);
3338
+ var w, b;
3339
+ const y = v === "y" ? "width" : "height", C = Kr.has(Le(o)), S = a.reference[p] - a.floating[y] + (C && ((w = i.offset) == null ? void 0 : w[p]) || 0) + (C ? 0 : g.crossAxis), E = a.reference[p] + a.reference[y] + (C ? 0 : ((b = i.offset) == null ? void 0 : b[p]) || 0) - (C ? g.crossAxis : 0);
3340
+ x < S ? x = S : x > E && (x = E);
3326
3341
  }
3327
3342
  return {
3328
- [v]: g,
3329
- [p]: b
3343
+ [v]: m,
3344
+ [p]: x
3330
3345
  };
3331
3346
  }
3332
3347
  };
@@ -3345,17 +3360,17 @@ const xs = function(e) {
3345
3360
  apply: l = () => {
3346
3361
  },
3347
3362
  ...c
3348
- } = Oe(e, t), f = await wt(t, c), p = Le(o), v = st(o), g = ye(o) === "y", {
3349
- width: b,
3350
- height: d
3363
+ } = Oe(e, t), d = await wt(t, c), p = Le(o), v = st(o), m = ye(o) === "y", {
3364
+ width: x,
3365
+ height: f
3351
3366
  } = a.floating;
3352
- let m, w;
3353
- p === "top" || p === "bottom" ? (m = p, w = v === (await (i.isRTL == null ? void 0 : i.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (w = p, m = v === "end" ? "top" : "bottom");
3354
- const y = d - f.top - f.bottom, x = b - f.left - f.right, C = ze(d - f[m], y), S = ze(b - f[w], x), A = !t.middlewareData.shift;
3367
+ let g, w;
3368
+ p === "top" || p === "bottom" ? (g = p, w = v === (await (i.isRTL == null ? void 0 : i.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (w = p, g = v === "end" ? "top" : "bottom");
3369
+ const b = f - d.top - d.bottom, y = x - d.left - d.right, C = ze(f - d[g], b), S = ze(x - d[w], y), E = !t.middlewareData.shift;
3355
3370
  let k = C, I = S;
3356
- if ((n = t.middlewareData.shift) != null && n.enabled.x && (I = x), (r = t.middlewareData.shift) != null && r.enabled.y && (k = y), A && !v) {
3357
- const L = ce(f.left, 0), $ = ce(f.right, 0), W = ce(f.top, 0), N = ce(f.bottom, 0);
3358
- g ? I = b - 2 * (L !== 0 || $ !== 0 ? L + $ : ce(f.left, f.right)) : k = d - 2 * (W !== 0 || N !== 0 ? W + N : ce(f.top, f.bottom));
3371
+ if ((n = t.middlewareData.shift) != null && n.enabled.x && (I = y), (r = t.middlewareData.shift) != null && r.enabled.y && (k = b), E && !v) {
3372
+ const L = ce(d.left, 0), $ = ce(d.right, 0), W = ce(d.top, 0), F = ce(d.bottom, 0);
3373
+ m ? I = x - 2 * (L !== 0 || $ !== 0 ? L + $ : ce(d.left, d.right)) : k = f - 2 * (W !== 0 || F !== 0 ? W + F : ce(d.top, d.bottom));
3359
3374
  }
3360
3375
  await l({
3361
3376
  ...t,
@@ -3363,7 +3378,7 @@ const xs = function(e) {
3363
3378
  availableHeight: k
3364
3379
  });
3365
3380
  const D = await i.getDimensions(s.floating);
3366
- return b !== D.width || d !== D.height ? {
3381
+ return x !== D.width || f !== D.height ? {
3367
3382
  reset: {
3368
3383
  rects: !0
3369
3384
  }
@@ -3388,7 +3403,7 @@ function _e(e) {
3388
3403
  function Xr(e) {
3389
3404
  return Vt() ? e instanceof Node || e instanceof ue(e).Node : !1;
3390
3405
  }
3391
- function me(e) {
3406
+ function ge(e) {
3392
3407
  return Vt() ? e instanceof Element || e instanceof ue(e).Element : !1;
3393
3408
  }
3394
3409
  function Te(e) {
@@ -3404,7 +3419,7 @@ function xt(e) {
3404
3419
  overflowX: n,
3405
3420
  overflowY: r,
3406
3421
  display: o
3407
- } = ge(e);
3422
+ } = me(e);
3408
3423
  return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !ks.has(o);
3409
3424
  }
3410
3425
  const Es = /* @__PURE__ */ new Set(["table", "td", "th"]);
@@ -3423,7 +3438,7 @@ function $t(e) {
3423
3438
  }
3424
3439
  const _s = ["transform", "translate", "scale", "rotate", "perspective"], Ps = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Rs = ["paint", "layout", "strict", "content"];
3425
3440
  function Nn(e) {
3426
- const t = On(), n = me(e) ? ge(e) : e;
3441
+ const t = On(), n = ge(e) ? me(e) : e;
3427
3442
  return _s.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || Ps.some((r) => (n.willChange || "").includes(r)) || Rs.some((r) => (n.contain || "").includes(r));
3428
3443
  }
3429
3444
  function Is(e) {
@@ -3444,11 +3459,11 @@ const Ns = /* @__PURE__ */ new Set(["html", "body", "#document"]);
3444
3459
  function ot(e) {
3445
3460
  return Ns.has(lt(e));
3446
3461
  }
3447
- function ge(e) {
3462
+ function me(e) {
3448
3463
  return ue(e).getComputedStyle(e);
3449
3464
  }
3450
3465
  function Wt(e) {
3451
- return me(e) ? {
3466
+ return ge(e) ? {
3452
3467
  scrollLeft: e.scrollLeft,
3453
3468
  scrollTop: e.scrollTop
3454
3469
  } : {
@@ -3486,7 +3501,7 @@ function un(e) {
3486
3501
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
3487
3502
  }
3488
3503
  function Gr(e) {
3489
- const t = ge(e);
3504
+ const t = me(e);
3490
3505
  let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
3491
3506
  const o = Te(e), a = o ? e.offsetWidth : n, i = o ? e.offsetHeight : r, s = Ot(n) !== a || Ot(r) !== i;
3492
3507
  return s && (n = a, r = i), {
@@ -3496,7 +3511,7 @@ function Gr(e) {
3496
3511
  };
3497
3512
  }
3498
3513
  function Ln(e) {
3499
- return me(e) ? e : e.contextElement;
3514
+ return ge(e) ? e : e.contextElement;
3500
3515
  }
3501
3516
  function tt(e) {
3502
3517
  const t = Ln(e);
@@ -3528,19 +3543,19 @@ function Ye(e, t, n, r) {
3528
3543
  t === void 0 && (t = !1), n === void 0 && (n = !1);
3529
3544
  const o = e.getBoundingClientRect(), a = Ln(e);
3530
3545
  let i = ke(1);
3531
- t && (r ? me(r) && (i = tt(r)) : i = tt(e));
3546
+ t && (r ? ge(r) && (i = tt(r)) : i = tt(e));
3532
3547
  const s = Ls(a, n, r) ? qr(a) : ke(0);
3533
- let l = (o.left + s.x) / i.x, c = (o.top + s.y) / i.y, f = o.width / i.x, p = o.height / i.y;
3548
+ let l = (o.left + s.x) / i.x, c = (o.top + s.y) / i.y, d = o.width / i.x, p = o.height / i.y;
3534
3549
  if (a) {
3535
- const v = ue(a), g = r && me(r) ? ue(r) : r;
3536
- let b = v, d = un(b);
3537
- for (; d && r && g !== b; ) {
3538
- const m = tt(d), w = d.getBoundingClientRect(), y = ge(d), x = w.left + (d.clientLeft + parseFloat(y.paddingLeft)) * m.x, C = w.top + (d.clientTop + parseFloat(y.paddingTop)) * m.y;
3539
- l *= m.x, c *= m.y, f *= m.x, p *= m.y, l += x, c += C, b = ue(d), d = un(b);
3550
+ const v = ue(a), m = r && ge(r) ? ue(r) : r;
3551
+ let x = v, f = un(x);
3552
+ for (; f && r && m !== x; ) {
3553
+ const g = tt(f), w = f.getBoundingClientRect(), b = me(f), y = w.left + (f.clientLeft + parseFloat(b.paddingLeft)) * g.x, C = w.top + (f.clientTop + parseFloat(b.paddingTop)) * g.y;
3554
+ l *= g.x, c *= g.y, d *= g.x, p *= g.y, l += y, c += C, x = ue(f), f = un(x);
3540
3555
  }
3541
3556
  }
3542
3557
  return Mt({
3543
- width: f,
3558
+ width: d,
3544
3559
  height: p,
3545
3560
  x: l,
3546
3561
  y: c
@@ -3575,17 +3590,17 @@ function Ms(e) {
3575
3590
  scrollLeft: 0,
3576
3591
  scrollTop: 0
3577
3592
  }, c = ke(1);
3578
- const f = ke(0), p = Te(r);
3593
+ const d = ke(0), p = Te(r);
3579
3594
  if ((p || !p && !a) && ((lt(r) !== "body" || xt(i)) && (l = Wt(r)), Te(r))) {
3580
- const g = Ye(r);
3581
- c = tt(r), f.x = g.x + r.clientLeft, f.y = g.y + r.clientTop;
3595
+ const m = Ye(r);
3596
+ c = tt(r), d.x = m.x + r.clientLeft, d.y = m.y + r.clientTop;
3582
3597
  }
3583
3598
  const v = i && !p && !a ? Qr(i, l, !0) : ke(0);
3584
3599
  return {
3585
3600
  width: n.width * c.x,
3586
3601
  height: n.height * c.y,
3587
- x: n.x * c.x - l.scrollLeft * c.x + f.x + v.x,
3588
- y: n.y * c.y - l.scrollTop * c.y + f.y + v.y
3602
+ x: n.x * c.x - l.scrollLeft * c.x + d.x + v.x,
3603
+ y: n.y * c.y - l.scrollTop * c.y + d.y + v.y
3589
3604
  };
3590
3605
  }
3591
3606
  function Ds(e) {
@@ -3595,7 +3610,7 @@ function Fs(e) {
3595
3610
  const t = _e(e), n = Wt(e), r = e.ownerDocument.body, o = ce(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = ce(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
3596
3611
  let i = -n.scrollLeft + Mn(e);
3597
3612
  const s = -n.scrollTop;
3598
- return ge(r).direction === "rtl" && (i += ce(t.clientWidth, r.clientWidth) - o), {
3613
+ return me(r).direction === "rtl" && (i += ce(t.clientWidth, r.clientWidth) - o), {
3599
3614
  width: o,
3600
3615
  height: a,
3601
3616
  x: i,
@@ -3633,7 +3648,7 @@ function or(e, t, n) {
3633
3648
  r = Bs(e, n);
3634
3649
  else if (t === "document")
3635
3650
  r = Fs(_e(e));
3636
- else if (me(t))
3651
+ else if (ge(t))
3637
3652
  r = Vs(t, n);
3638
3653
  else {
3639
3654
  const o = qr(e);
@@ -3648,18 +3663,18 @@ function or(e, t, n) {
3648
3663
  }
3649
3664
  function Jr(e, t) {
3650
3665
  const n = Ve(e);
3651
- return n === t || !me(n) || ot(n) ? !1 : ge(n).position === "fixed" || Jr(n, t);
3666
+ return n === t || !ge(n) || ot(n) ? !1 : me(n).position === "fixed" || Jr(n, t);
3652
3667
  }
3653
3668
  function $s(e, t) {
3654
3669
  const n = t.get(e);
3655
3670
  if (n)
3656
3671
  return n;
3657
- let r = bt(e, [], !1).filter((s) => me(s) && lt(s) !== "body"), o = null;
3658
- const a = ge(e).position === "fixed";
3672
+ let r = bt(e, [], !1).filter((s) => ge(s) && lt(s) !== "body"), o = null;
3673
+ const a = me(e).position === "fixed";
3659
3674
  let i = a ? Ve(e) : e;
3660
- for (; me(i) && !ot(i); ) {
3661
- const s = ge(i), l = Nn(i);
3662
- !l && s.position === "fixed" && (o = null), (a ? !l && !o : !l && s.position === "static" && !!o && zs.has(o.position) || xt(i) && !l && Jr(e, i)) ? r = r.filter((f) => f !== i) : o = s, i = Ve(i);
3675
+ for (; ge(i) && !ot(i); ) {
3676
+ const s = me(i), l = Nn(i);
3677
+ !l && s.position === "fixed" && (o = null), (a ? !l && !o : !l && s.position === "static" && !!o && zs.has(o.position) || xt(i) && !l && Jr(e, i)) ? r = r.filter((d) => d !== i) : o = s, i = Ve(i);
3663
3678
  }
3664
3679
  return t.set(e, r), r;
3665
3680
  }
@@ -3670,8 +3685,8 @@ function Ws(e) {
3670
3685
  rootBoundary: r,
3671
3686
  strategy: o
3672
3687
  } = e;
3673
- const i = [...n === "clippingAncestors" ? $t(t) ? [] : $s(t, this._c) : [].concat(n), r], s = i[0], l = i.reduce((c, f) => {
3674
- const p = or(t, f, o);
3688
+ const i = [...n === "clippingAncestors" ? $t(t) ? [] : $s(t, this._c) : [].concat(n), r], s = i[0], l = i.reduce((c, d) => {
3689
+ const p = or(t, d, o);
3675
3690
  return c.top = ce(p.top, c.top), c.right = ze(p.right, c.right), c.bottom = ze(p.bottom, c.bottom), c.left = ce(p.left, c.left), c;
3676
3691
  }, or(t, s, o));
3677
3692
  return {
@@ -3703,11 +3718,11 @@ function Us(e, t, n) {
3703
3718
  }
3704
3719
  if (r || !r && !a)
3705
3720
  if ((lt(t) !== "body" || xt(o)) && (s = Wt(t)), r) {
3706
- const g = Ye(t, !0, a, t);
3707
- l.x = g.x + t.clientLeft, l.y = g.y + t.clientTop;
3721
+ const m = Ye(t, !0, a, t);
3722
+ l.x = m.x + t.clientLeft, l.y = m.y + t.clientTop;
3708
3723
  } else o && c();
3709
3724
  a && !r && o && c();
3710
- const f = o && !r && !a ? Qr(o, s) : ke(0), p = i.left + s.scrollLeft - l.x - f.x, v = i.top + s.scrollTop - l.y - f.y;
3725
+ const d = o && !r && !a ? Qr(o, s) : ke(0), p = i.left + s.scrollLeft - l.x - d.x, v = i.top + s.scrollTop - l.y - d.y;
3711
3726
  return {
3712
3727
  x: p,
3713
3728
  y: v,
@@ -3716,10 +3731,10 @@ function Us(e, t, n) {
3716
3731
  };
3717
3732
  }
3718
3733
  function Qt(e) {
3719
- return ge(e).position === "static";
3734
+ return me(e).position === "static";
3720
3735
  }
3721
3736
  function ar(e, t) {
3722
- if (!Te(e) || ge(e).position === "fixed")
3737
+ if (!Te(e) || me(e).position === "fixed")
3723
3738
  return null;
3724
3739
  if (t)
3725
3740
  return t(e);
@@ -3733,7 +3748,7 @@ function eo(e, t) {
3733
3748
  if (!Te(e)) {
3734
3749
  let o = Ve(e);
3735
3750
  for (; o && !ot(o); ) {
3736
- if (me(o) && !Qt(o))
3751
+ if (ge(o) && !Qt(o))
3737
3752
  return o;
3738
3753
  o = Ve(o);
3739
3754
  }
@@ -3757,7 +3772,7 @@ const js = async function(e) {
3757
3772
  };
3758
3773
  };
3759
3774
  function Ys(e) {
3760
- return ge(e).direction === "rtl";
3775
+ return me(e).direction === "rtl";
3761
3776
  }
3762
3777
  const Ks = {
3763
3778
  convertOffsetParentRelativeRectToViewportRelativeRect: Ms,
@@ -3768,7 +3783,7 @@ const Ks = {
3768
3783
  getClientRects: Ds,
3769
3784
  getDimensions: Hs,
3770
3785
  getScale: tt,
3771
- isElement: me,
3786
+ isElement: ge,
3772
3787
  isRTL: Ys
3773
3788
  };
3774
3789
  function to(e, t) {
@@ -3784,20 +3799,20 @@ function Xs(e, t) {
3784
3799
  function i(s, l) {
3785
3800
  s === void 0 && (s = !1), l === void 0 && (l = 1), a();
3786
3801
  const c = e.getBoundingClientRect(), {
3787
- left: f,
3802
+ left: d,
3788
3803
  top: p,
3789
3804
  width: v,
3790
- height: g
3805
+ height: m
3791
3806
  } = c;
3792
- if (s || t(), !v || !g)
3807
+ if (s || t(), !v || !m)
3793
3808
  return;
3794
- const b = St(p), d = St(o.clientWidth - (f + v)), m = St(o.clientHeight - (p + g)), w = St(f), x = {
3795
- rootMargin: -b + "px " + -d + "px " + -m + "px " + -w + "px",
3809
+ const x = St(p), f = St(o.clientWidth - (d + v)), g = St(o.clientHeight - (p + m)), w = St(d), y = {
3810
+ rootMargin: -x + "px " + -f + "px " + -g + "px " + -w + "px",
3796
3811
  threshold: ce(0, ze(1, l)) || 1
3797
3812
  };
3798
3813
  let C = !0;
3799
- function S(A) {
3800
- const k = A[0].intersectionRatio;
3814
+ function S(E) {
3815
+ const k = E[0].intersectionRatio;
3801
3816
  if (k !== l) {
3802
3817
  if (!C)
3803
3818
  return i();
@@ -3809,12 +3824,12 @@ function Xs(e, t) {
3809
3824
  }
3810
3825
  try {
3811
3826
  n = new IntersectionObserver(S, {
3812
- ...x,
3827
+ ...y,
3813
3828
  // Handle <iframe>s
3814
3829
  root: o.ownerDocument
3815
3830
  });
3816
3831
  } catch {
3817
- n = new IntersectionObserver(S, x);
3832
+ n = new IntersectionObserver(S, y);
3818
3833
  }
3819
3834
  n.observe(e);
3820
3835
  }
@@ -3828,35 +3843,35 @@ function Zs(e, t, n, r) {
3828
3843
  elementResize: i = typeof ResizeObserver == "function",
3829
3844
  layoutShift: s = typeof IntersectionObserver == "function",
3830
3845
  animationFrame: l = !1
3831
- } = r, c = Ln(e), f = o || a ? [...c ? bt(c) : [], ...bt(t)] : [];
3832
- f.forEach((w) => {
3846
+ } = r, c = Ln(e), d = o || a ? [...c ? bt(c) : [], ...bt(t)] : [];
3847
+ d.forEach((w) => {
3833
3848
  o && w.addEventListener("scroll", n, {
3834
3849
  passive: !0
3835
3850
  }), a && w.addEventListener("resize", n);
3836
3851
  });
3837
3852
  const p = c && s ? Xs(c, n) : null;
3838
- let v = -1, g = null;
3839
- i && (g = new ResizeObserver((w) => {
3840
- let [y] = w;
3841
- y && y.target === c && g && (g.unobserve(t), cancelAnimationFrame(v), v = requestAnimationFrame(() => {
3842
- var x;
3843
- (x = g) == null || x.observe(t);
3853
+ let v = -1, m = null;
3854
+ i && (m = new ResizeObserver((w) => {
3855
+ let [b] = w;
3856
+ b && b.target === c && m && (m.unobserve(t), cancelAnimationFrame(v), v = requestAnimationFrame(() => {
3857
+ var y;
3858
+ (y = m) == null || y.observe(t);
3844
3859
  })), n();
3845
- }), c && !l && g.observe(c), g.observe(t));
3846
- let b, d = l ? Ye(e) : null;
3847
- l && m();
3848
- function m() {
3860
+ }), c && !l && m.observe(c), m.observe(t));
3861
+ let x, f = l ? Ye(e) : null;
3862
+ l && g();
3863
+ function g() {
3849
3864
  const w = Ye(e);
3850
- d && !to(d, w) && n(), d = w, b = requestAnimationFrame(m);
3865
+ f && !to(f, w) && n(), f = w, x = requestAnimationFrame(g);
3851
3866
  }
3852
3867
  return n(), () => {
3853
3868
  var w;
3854
- f.forEach((y) => {
3855
- o && y.removeEventListener("scroll", n), a && y.removeEventListener("resize", n);
3856
- }), p == null || p(), (w = g) == null || w.disconnect(), g = null, l && cancelAnimationFrame(b);
3869
+ d.forEach((b) => {
3870
+ o && b.removeEventListener("scroll", n), a && b.removeEventListener("resize", n);
3871
+ }), p == null || p(), (w = m) == null || w.disconnect(), m = null, l && cancelAnimationFrame(x);
3857
3872
  };
3858
3873
  }
3859
- const Gs = xs, qs = ys, Qs = gs, Js = Ss, el = ws, ir = ms, tl = Cs, nl = (e, t, n) => {
3874
+ const Gs = xs, qs = ys, Qs = ms, Js = Ss, el = ws, ir = gs, tl = Cs, nl = (e, t, n) => {
3860
3875
  const r = /* @__PURE__ */ new Map(), o = {
3861
3876
  platform: Ks,
3862
3877
  ...n
@@ -3928,29 +3943,29 @@ function al(e) {
3928
3943
  transform: s = !0,
3929
3944
  whileElementsMounted: l,
3930
3945
  open: c
3931
- } = e, [f, p] = h.useState({
3946
+ } = e, [d, p] = h.useState({
3932
3947
  x: 0,
3933
3948
  y: 0,
3934
3949
  strategy: n,
3935
3950
  placement: t,
3936
3951
  middlewareData: {},
3937
3952
  isPositioned: !1
3938
- }), [v, g] = h.useState(r);
3939
- Dt(v, r) || g(r);
3940
- const [b, d] = h.useState(null), [m, w] = h.useState(null), y = h.useCallback((P) => {
3941
- P !== A.current && (A.current = P, d(P));
3942
- }, []), x = h.useCallback((P) => {
3953
+ }), [v, m] = h.useState(r);
3954
+ Dt(v, r) || m(r);
3955
+ const [x, f] = h.useState(null), [g, w] = h.useState(null), b = h.useCallback((P) => {
3956
+ P !== E.current && (E.current = P, f(P));
3957
+ }, []), y = h.useCallback((P) => {
3943
3958
  P !== k.current && (k.current = P, w(P));
3944
- }, []), C = a || b, S = i || m, A = h.useRef(null), k = h.useRef(null), I = h.useRef(f), D = l != null, L = Jt(l), $ = Jt(o), W = Jt(c), N = h.useCallback(() => {
3945
- if (!A.current || !k.current)
3959
+ }, []), C = a || x, S = i || g, E = h.useRef(null), k = h.useRef(null), I = h.useRef(d), D = l != null, L = Jt(l), $ = Jt(o), W = Jt(c), F = h.useCallback(() => {
3960
+ if (!E.current || !k.current)
3946
3961
  return;
3947
3962
  const P = {
3948
3963
  placement: t,
3949
3964
  strategy: n,
3950
3965
  middleware: v
3951
3966
  };
3952
- $.current && (P.platform = $.current), nl(A.current, k.current, P).then((z) => {
3953
- const ie = {
3967
+ $.current && (P.platform = $.current), nl(E.current, k.current, P).then((z) => {
3968
+ const Q = {
3954
3969
  ...z,
3955
3970
  // The floating element's position may be recomputed while it's closed
3956
3971
  // but still mounted (such as when transitioning out). To ensure
@@ -3958,8 +3973,8 @@ function al(e) {
3958
3973
  // setting it to `true` when `open === false` (must be specified).
3959
3974
  isPositioned: W.current !== !1
3960
3975
  };
3961
- T.current && !Dt(I.current, ie) && (I.current = ie, h.flushSync(() => {
3962
- p(ie);
3976
+ N.current && !Dt(I.current, Q) && (I.current = Q, h.flushSync(() => {
3977
+ p(Q);
3963
3978
  }));
3964
3979
  });
3965
3980
  }, [v, t, n, $, W]);
@@ -3969,22 +3984,22 @@ function al(e) {
3969
3984
  isPositioned: !1
3970
3985
  })));
3971
3986
  }, [c]);
3972
- const T = h.useRef(!1);
3973
- Pt(() => (T.current = !0, () => {
3974
- T.current = !1;
3987
+ const N = h.useRef(!1);
3988
+ Pt(() => (N.current = !0, () => {
3989
+ N.current = !1;
3975
3990
  }), []), Pt(() => {
3976
- if (C && (A.current = C), S && (k.current = S), C && S) {
3991
+ if (C && (E.current = C), S && (k.current = S), C && S) {
3977
3992
  if (L.current)
3978
- return L.current(C, S, N);
3979
- N();
3993
+ return L.current(C, S, F);
3994
+ F();
3980
3995
  }
3981
- }, [C, S, N, L, D]);
3982
- const B = h.useMemo(() => ({
3983
- reference: A,
3996
+ }, [C, S, F, L, D]);
3997
+ const _ = h.useMemo(() => ({
3998
+ reference: E,
3984
3999
  floating: k,
3985
- setReference: y,
3986
- setFloating: x
3987
- }), [y, x]), O = h.useMemo(() => ({
4000
+ setReference: b,
4001
+ setFloating: y
4002
+ }), [b, y]), O = h.useMemo(() => ({
3988
4003
  reference: C,
3989
4004
  floating: S
3990
4005
  }), [C, S]), M = h.useMemo(() => {
@@ -3995,26 +4010,26 @@ function al(e) {
3995
4010
  };
3996
4011
  if (!O.floating)
3997
4012
  return P;
3998
- const z = sr(O.floating, f.x), ie = sr(O.floating, f.y);
4013
+ const z = sr(O.floating, d.x), Q = sr(O.floating, d.y);
3999
4014
  return s ? {
4000
4015
  ...P,
4001
- transform: "translate(" + z + "px, " + ie + "px)",
4016
+ transform: "translate(" + z + "px, " + Q + "px)",
4002
4017
  ...no(O.floating) >= 1.5 && {
4003
4018
  willChange: "transform"
4004
4019
  }
4005
4020
  } : {
4006
4021
  position: n,
4007
4022
  left: z,
4008
- top: ie
4023
+ top: Q
4009
4024
  };
4010
- }, [n, s, O.floating, f.x, f.y]);
4025
+ }, [n, s, O.floating, d.x, d.y]);
4011
4026
  return h.useMemo(() => ({
4012
- ...f,
4013
- update: N,
4014
- refs: B,
4027
+ ...d,
4028
+ update: F,
4029
+ refs: _,
4015
4030
  elements: O,
4016
4031
  floatingStyles: M
4017
- }), [f, N, B, O, M]);
4032
+ }), [d, F, _, O, M]);
4018
4033
  }
4019
4034
  const il = (e) => {
4020
4035
  function t(n) {
@@ -4061,7 +4076,7 @@ const il = (e) => {
4061
4076
  });
4062
4077
  var hl = "Arrow", ro = h.forwardRef((e, t) => {
4063
4078
  const { children: n, width: r = 10, height: o = 5, ...a } = e;
4064
- return /* @__PURE__ */ E(
4079
+ return /* @__PURE__ */ T(
4065
4080
  X.svg,
4066
4081
  {
4067
4082
  ...a,
@@ -4070,13 +4085,13 @@ var hl = "Arrow", ro = h.forwardRef((e, t) => {
4070
4085
  height: o,
4071
4086
  viewBox: "0 0 30 10",
4072
4087
  preserveAspectRatio: "none",
4073
- children: e.asChild ? n : /* @__PURE__ */ E("polygon", { points: "0,0 30,0 15,10" })
4088
+ children: e.asChild ? n : /* @__PURE__ */ T("polygon", { points: "0,0 30,0 15,10" })
4074
4089
  }
4075
4090
  );
4076
4091
  });
4077
4092
  ro.displayName = hl;
4078
4093
  var vl = ro;
4079
- function ml(e) {
4094
+ function gl(e) {
4080
4095
  const [t, n] = h.useState(void 0);
4081
4096
  return se(() => {
4082
4097
  if (e) {
@@ -4098,24 +4113,24 @@ function ml(e) {
4098
4113
  n(void 0);
4099
4114
  }, [e]), t;
4100
4115
  }
4101
- var Dn = "Popper", [oo, ao] = An(Dn), [gl, io] = oo(Dn), so = (e) => {
4116
+ var Dn = "Popper", [oo, ao] = An(Dn), [ml, io] = oo(Dn), so = (e) => {
4102
4117
  const { __scopePopper: t, children: n } = e, [r, o] = h.useState(null);
4103
- return /* @__PURE__ */ E(gl, { scope: t, anchor: r, onAnchorChange: o, children: n });
4118
+ return /* @__PURE__ */ T(ml, { scope: t, anchor: r, onAnchorChange: o, children: n });
4104
4119
  };
4105
4120
  so.displayName = Dn;
4106
4121
  var lo = "PopperAnchor", co = h.forwardRef(
4107
4122
  (e, t) => {
4108
- const { __scopePopper: n, virtualRef: r, ...o } = e, a = io(lo, n), i = h.useRef(null), s = te(t, i), l = h.useRef(null);
4123
+ const { __scopePopper: n, virtualRef: r, ...o } = e, a = io(lo, n), i = h.useRef(null), s = ne(t, i), l = h.useRef(null);
4109
4124
  return h.useEffect(() => {
4110
4125
  const c = l.current;
4111
4126
  l.current = (r == null ? void 0 : r.current) || i.current, c !== l.current && a.onAnchorChange(l.current);
4112
- }), r ? null : /* @__PURE__ */ E(X.div, { ...o, ref: s });
4127
+ }), r ? null : /* @__PURE__ */ T(X.div, { ...o, ref: s });
4113
4128
  }
4114
4129
  );
4115
4130
  co.displayName = lo;
4116
4131
  var Fn = "PopperContent", [wl, bl] = oo(Fn), uo = h.forwardRef(
4117
4132
  (e, t) => {
4118
- var R, K, ne, j, H, U;
4133
+ var R, K, re, j, H, U;
4119
4134
  const {
4120
4135
  __scopePopper: n,
4121
4136
  side: r = "bottom",
@@ -4125,26 +4140,26 @@ var Fn = "PopperContent", [wl, bl] = oo(Fn), uo = h.forwardRef(
4125
4140
  arrowPadding: s = 0,
4126
4141
  avoidCollisions: l = !0,
4127
4142
  collisionBoundary: c = [],
4128
- collisionPadding: f = 0,
4143
+ collisionPadding: d = 0,
4129
4144
  sticky: p = "partial",
4130
4145
  hideWhenDetached: v = !1,
4131
- updatePositionStrategy: g = "optimized",
4132
- onPlaced: b,
4133
- ...d
4134
- } = e, m = io(Fn, n), [w, y] = h.useState(null), x = te(t, (le) => y(le)), [C, S] = h.useState(null), A = ml(C), k = (A == null ? void 0 : A.width) ?? 0, I = (A == null ? void 0 : A.height) ?? 0, D = r + (a !== "center" ? "-" + a : ""), L = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, $ = Array.isArray(c) ? c : [c], W = $.length > 0, N = {
4146
+ updatePositionStrategy: m = "optimized",
4147
+ onPlaced: x,
4148
+ ...f
4149
+ } = e, g = io(Fn, n), [w, b] = h.useState(null), y = ne(t, (le) => b(le)), [C, S] = h.useState(null), E = gl(C), k = (E == null ? void 0 : E.width) ?? 0, I = (E == null ? void 0 : E.height) ?? 0, D = r + (a !== "center" ? "-" + a : ""), L = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, $ = Array.isArray(c) ? c : [c], W = $.length > 0, F = {
4135
4150
  padding: L,
4136
4151
  boundary: $.filter(yl),
4137
4152
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
4138
4153
  altBoundary: W
4139
- }, { refs: T, floatingStyles: B, placement: O, isPositioned: M, middlewareData: P } = al({
4154
+ }, { refs: N, floatingStyles: _, placement: O, isPositioned: M, middlewareData: P } = al({
4140
4155
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
4141
4156
  strategy: "fixed",
4142
4157
  placement: D,
4143
4158
  whileElementsMounted: (...le) => Zs(...le, {
4144
- animationFrame: g === "always"
4159
+ animationFrame: m === "always"
4145
4160
  }),
4146
4161
  elements: {
4147
- reference: m.anchor
4162
+ reference: g.anchor
4148
4163
  },
4149
4164
  middleware: [
4150
4165
  sl({ mainAxis: o + I, alignmentAxis: i }),
@@ -4152,11 +4167,11 @@ var Fn = "PopperContent", [wl, bl] = oo(Fn), uo = h.forwardRef(
4152
4167
  mainAxis: !0,
4153
4168
  crossAxis: !1,
4154
4169
  limiter: p === "partial" ? cl() : void 0,
4155
- ...N
4170
+ ...F
4156
4171
  }),
4157
- l && ul({ ...N }),
4172
+ l && ul({ ...F }),
4158
4173
  dl({
4159
- ...N,
4174
+ ...F,
4160
4175
  apply: ({ elements: le, rects: we, availableWidth: ft, availableHeight: pt }) => {
4161
4176
  const { width: ht, height: na } = we.reference, yt = le.floating.style;
4162
4177
  yt.setProperty("--radix-popper-available-width", `${ft}px`), yt.setProperty("--radix-popper-available-height", `${pt}px`), yt.setProperty("--radix-popper-anchor-width", `${ht}px`), yt.setProperty("--radix-popper-anchor-height", `${na}px`);
@@ -4164,23 +4179,23 @@ var Fn = "PopperContent", [wl, bl] = oo(Fn), uo = h.forwardRef(
4164
4179
  }),
4165
4180
  C && pl({ element: C, padding: s }),
4166
4181
  Cl({ arrowWidth: k, arrowHeight: I }),
4167
- v && fl({ strategy: "referenceHidden", ...N })
4182
+ v && fl({ strategy: "referenceHidden", ...F })
4168
4183
  ]
4169
- }), [z, ie] = ho(O), Pe = je(b);
4184
+ }), [z, Q] = ho(O), Pe = je(x);
4170
4185
  se(() => {
4171
4186
  M && (Pe == null || Pe());
4172
4187
  }, [M, Pe]);
4173
- const ut = (R = P.arrow) == null ? void 0 : R.x, dt = (K = P.arrow) == null ? void 0 : K.y, Me = ((ne = P.arrow) == null ? void 0 : ne.centerOffset) !== 0, [Ze, He] = h.useState();
4188
+ const ut = (R = P.arrow) == null ? void 0 : R.x, dt = (K = P.arrow) == null ? void 0 : K.y, Me = ((re = P.arrow) == null ? void 0 : re.centerOffset) !== 0, [Ze, He] = h.useState();
4174
4189
  return se(() => {
4175
4190
  w && He(window.getComputedStyle(w).zIndex);
4176
- }, [w]), /* @__PURE__ */ E(
4191
+ }, [w]), /* @__PURE__ */ T(
4177
4192
  "div",
4178
4193
  {
4179
- ref: T.setFloating,
4194
+ ref: N.setFloating,
4180
4195
  "data-radix-popper-content-wrapper": "",
4181
4196
  style: {
4182
- ...B,
4183
- transform: M ? B.transform : "translate(0, -200%)",
4197
+ ..._,
4198
+ transform: M ? _.transform : "translate(0, -200%)",
4184
4199
  // keep off the page when measuring
4185
4200
  minWidth: "max-content",
4186
4201
  zIndex: Ze,
@@ -4197,7 +4212,7 @@ var Fn = "PopperContent", [wl, bl] = oo(Fn), uo = h.forwardRef(
4197
4212
  }
4198
4213
  },
4199
4214
  dir: e.dir,
4200
- children: /* @__PURE__ */ E(
4215
+ children: /* @__PURE__ */ T(
4201
4216
  wl,
4202
4217
  {
4203
4218
  scope: n,
@@ -4206,15 +4221,15 @@ var Fn = "PopperContent", [wl, bl] = oo(Fn), uo = h.forwardRef(
4206
4221
  arrowX: ut,
4207
4222
  arrowY: dt,
4208
4223
  shouldHideArrow: Me,
4209
- children: /* @__PURE__ */ E(
4224
+ children: /* @__PURE__ */ T(
4210
4225
  X.div,
4211
4226
  {
4212
4227
  "data-side": z,
4213
- "data-align": ie,
4214
- ...d,
4215
- ref: x,
4228
+ "data-align": Q,
4229
+ ...f,
4230
+ ref: y,
4216
4231
  style: {
4217
- ...d.style,
4232
+ ...f.style,
4218
4233
  // if the PopperContent hasn't been placed yet (not all measurements done)
4219
4234
  // we prevent animations so that users's animation don't kick in too early referring wrong sides
4220
4235
  animation: M ? void 0 : "none"
@@ -4239,7 +4254,7 @@ var fo = "PopperArrow", xl = {
4239
4254
  // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
4240
4255
  // doesn't report size as we'd expect on SVG elements.
4241
4256
  // it reports their bounding box which is effectively the largest path inside the SVG.
4242
- /* @__PURE__ */ E(
4257
+ /* @__PURE__ */ T(
4243
4258
  "span",
4244
4259
  {
4245
4260
  ref: a.onArrowChange,
@@ -4262,7 +4277,7 @@ var fo = "PopperArrow", xl = {
4262
4277
  }[a.placedSide],
4263
4278
  visibility: a.shouldHideArrow ? "hidden" : void 0
4264
4279
  },
4265
- children: /* @__PURE__ */ E(
4280
+ children: /* @__PURE__ */ T(
4266
4281
  vl,
4267
4282
  {
4268
4283
  ...o,
@@ -4286,10 +4301,10 @@ var Cl = (e) => ({
4286
4301
  name: "transformOrigin",
4287
4302
  options: e,
4288
4303
  fn(t) {
4289
- var m, w, y;
4290
- const { placement: n, rects: r, middlewareData: o } = t, i = ((m = o.arrow) == null ? void 0 : m.centerOffset) !== 0, s = i ? 0 : e.arrowWidth, l = i ? 0 : e.arrowHeight, [c, f] = ho(n), p = { start: "0%", center: "50%", end: "100%" }[f], v = (((w = o.arrow) == null ? void 0 : w.x) ?? 0) + s / 2, g = (((y = o.arrow) == null ? void 0 : y.y) ?? 0) + l / 2;
4291
- let b = "", d = "";
4292
- return c === "bottom" ? (b = i ? p : `${v}px`, d = `${-l}px`) : c === "top" ? (b = i ? p : `${v}px`, d = `${r.floating.height + l}px`) : c === "right" ? (b = `${-l}px`, d = i ? p : `${g}px`) : c === "left" && (b = `${r.floating.width + l}px`, d = i ? p : `${g}px`), { data: { x: b, y: d } };
4304
+ var g, w, b;
4305
+ const { placement: n, rects: r, middlewareData: o } = t, i = ((g = o.arrow) == null ? void 0 : g.centerOffset) !== 0, s = i ? 0 : e.arrowWidth, l = i ? 0 : e.arrowHeight, [c, d] = ho(n), p = { start: "0%", center: "50%", end: "100%" }[d], v = (((w = o.arrow) == null ? void 0 : w.x) ?? 0) + s / 2, m = (((b = o.arrow) == null ? void 0 : b.y) ?? 0) + l / 2;
4306
+ let x = "", f = "";
4307
+ return c === "bottom" ? (x = i ? p : `${v}px`, f = `${-l}px`) : c === "top" ? (x = i ? p : `${v}px`, f = `${r.floating.height + l}px`) : c === "right" ? (x = `${-l}px`, f = i ? p : `${m}px`) : c === "left" && (x = `${r.floating.width + l}px`, f = i ? p : `${m}px`), { data: { x, y: f } };
4293
4308
  }
4294
4309
  });
4295
4310
  function ho(e) {
@@ -4301,7 +4316,7 @@ var Sl = so, kl = co, El = uo, Tl = po, Al = "Portal", vo = h.forwardRef((e, t)
4301
4316
  const { container: n, ...r } = e, [o, a] = h.useState(!1);
4302
4317
  se(() => a(!0), []);
4303
4318
  const i = n || o && ((s = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : s.body);
4304
- return i ? De.createPortal(/* @__PURE__ */ E(X.div, { ...r, ref: t }), i) : null;
4319
+ return i ? De.createPortal(/* @__PURE__ */ T(X.div, { ...r, ref: t }), i) : null;
4305
4320
  });
4306
4321
  vo.displayName = Al;
4307
4322
  var _l = h[" useInsertionEffect ".trim().toString()] || se;
@@ -4317,22 +4332,22 @@ function lr({
4317
4332
  onChange: n
4318
4333
  }), s = e !== void 0, l = s ? e : o;
4319
4334
  {
4320
- const f = h.useRef(e !== void 0);
4335
+ const d = h.useRef(e !== void 0);
4321
4336
  h.useEffect(() => {
4322
- const p = f.current;
4337
+ const p = d.current;
4323
4338
  p !== s && console.warn(
4324
4339
  `${r} is changing from ${p ? "controlled" : "uncontrolled"} to ${s ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
4325
- ), f.current = s;
4340
+ ), d.current = s;
4326
4341
  }, [s, r]);
4327
4342
  }
4328
4343
  const c = h.useCallback(
4329
- (f) => {
4344
+ (d) => {
4330
4345
  var p;
4331
4346
  if (s) {
4332
- const v = Rl(f) ? f(e) : f;
4347
+ const v = Rl(d) ? d(e) : d;
4333
4348
  v !== e && ((p = i.current) == null || p.call(i, v));
4334
4349
  } else
4335
- a(f);
4350
+ a(d);
4336
4351
  },
4337
4352
  [s, e, a, i]
4338
4353
  );
@@ -4357,7 +4372,7 @@ function Il(e) {
4357
4372
  const t = h.useRef({ value: e, previous: e });
4358
4373
  return h.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
4359
4374
  }
4360
- var mo = Object.freeze({
4375
+ var go = Object.freeze({
4361
4376
  // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
4362
4377
  position: "absolute",
4363
4378
  border: 0,
@@ -4370,12 +4385,12 @@ var mo = Object.freeze({
4370
4385
  whiteSpace: "nowrap",
4371
4386
  wordWrap: "normal"
4372
4387
  }), Nl = "VisuallyHidden", Ol = h.forwardRef(
4373
- (e, t) => /* @__PURE__ */ E(
4388
+ (e, t) => /* @__PURE__ */ T(
4374
4389
  X.span,
4375
4390
  {
4376
4391
  ...e,
4377
4392
  ref: t,
4378
- style: { ...mo, ...e.style }
4393
+ style: { ...go, ...e.style }
4379
4394
  }
4380
4395
  )
4381
4396
  );
@@ -4385,13 +4400,13 @@ var Ll = function(e) {
4385
4400
  return null;
4386
4401
  var t = Array.isArray(e) ? e[0] : e;
4387
4402
  return t.ownerDocument.body;
4388
- }, Ge = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), Et = {}, en = 0, go = function(e) {
4389
- return e && (e.host || go(e.parentNode));
4403
+ }, Ge = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), Et = {}, en = 0, mo = function(e) {
4404
+ return e && (e.host || mo(e.parentNode));
4390
4405
  }, Ml = function(e, t) {
4391
4406
  return t.map(function(n) {
4392
4407
  if (e.contains(n))
4393
4408
  return n;
4394
- var r = go(n);
4409
+ var r = mo(n);
4395
4410
  return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
4396
4411
  }).filter(function(n) {
4397
4412
  return !!n;
@@ -4403,23 +4418,23 @@ var Ll = function(e) {
4403
4418
  !p || s.has(p) || (s.add(p), c(p.parentNode));
4404
4419
  };
4405
4420
  o.forEach(c);
4406
- var f = function(p) {
4421
+ var d = function(p) {
4407
4422
  !p || l.has(p) || Array.prototype.forEach.call(p.children, function(v) {
4408
4423
  if (s.has(v))
4409
- f(v);
4424
+ d(v);
4410
4425
  else
4411
4426
  try {
4412
- var g = v.getAttribute(r), b = g !== null && g !== "false", d = (Ge.get(v) || 0) + 1, m = (a.get(v) || 0) + 1;
4413
- Ge.set(v, d), a.set(v, m), i.push(v), d === 1 && b && kt.set(v, !0), m === 1 && v.setAttribute(n, "true"), b || v.setAttribute(r, "true");
4427
+ var m = v.getAttribute(r), x = m !== null && m !== "false", f = (Ge.get(v) || 0) + 1, g = (a.get(v) || 0) + 1;
4428
+ Ge.set(v, f), a.set(v, g), i.push(v), f === 1 && x && kt.set(v, !0), g === 1 && v.setAttribute(n, "true"), x || v.setAttribute(r, "true");
4414
4429
  } catch (w) {
4415
4430
  console.error("aria-hidden: cannot operate on ", v, w);
4416
4431
  }
4417
4432
  });
4418
4433
  };
4419
- return f(t), s.clear(), en++, function() {
4434
+ return d(t), s.clear(), en++, function() {
4420
4435
  i.forEach(function(p) {
4421
- var v = Ge.get(p) - 1, g = a.get(p) - 1;
4422
- Ge.set(p, v), a.set(p, g), v || (kt.has(p) || p.removeAttribute(r), kt.delete(p)), g || p.removeAttribute(n);
4436
+ var v = Ge.get(p) - 1, m = a.get(p) - 1;
4437
+ Ge.set(p, v), a.set(p, m), v || (kt.has(p) || p.removeAttribute(r), kt.delete(p)), m || p.removeAttribute(n);
4423
4438
  }), en--, en || (Ge = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), Et = {});
4424
4439
  };
4425
4440
  }, Fl = function(e, t, n) {
@@ -4536,17 +4551,17 @@ function jl(e, t) {
4536
4551
  n = [], s.forEach(a), i = n;
4537
4552
  }
4538
4553
  var l = function() {
4539
- var f = i;
4540
- i = [], f.forEach(a);
4554
+ var d = i;
4555
+ i = [], d.forEach(a);
4541
4556
  }, c = function() {
4542
4557
  return Promise.resolve().then(l);
4543
4558
  };
4544
4559
  c(), n = {
4545
- push: function(f) {
4546
- i.push(f), c();
4560
+ push: function(d) {
4561
+ i.push(d), c();
4547
4562
  },
4548
- filter: function(f) {
4549
- return i = i.filter(f), n;
4563
+ filter: function(d) {
4564
+ return i = i.filter(d), n;
4550
4565
  }
4551
4566
  };
4552
4567
  }
@@ -4577,12 +4592,12 @@ var xo = Yl(), nn = function() {
4577
4592
  onScrollCapture: nn,
4578
4593
  onWheelCapture: nn,
4579
4594
  onTouchMoveCapture: nn
4580
- }), o = r[0], a = r[1], i = e.forwardProps, s = e.children, l = e.className, c = e.removeScrollBar, f = e.enabled, p = e.shards, v = e.sideCar, g = e.noRelative, b = e.noIsolation, d = e.inert, m = e.allowPinchZoom, w = e.as, y = w === void 0 ? "div" : w, x = e.gapMode, C = wo(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = v, A = Hl([n, t]), k = xe(xe({}, C), o);
4595
+ }), o = r[0], a = r[1], i = e.forwardProps, s = e.children, l = e.className, c = e.removeScrollBar, d = e.enabled, p = e.shards, v = e.sideCar, m = e.noRelative, x = e.noIsolation, f = e.inert, g = e.allowPinchZoom, w = e.as, b = w === void 0 ? "div" : w, y = e.gapMode, C = wo(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = v, E = Hl([n, t]), k = xe(xe({}, C), o);
4581
4596
  return h.createElement(
4582
4597
  h.Fragment,
4583
4598
  null,
4584
- f && h.createElement(S, { sideCar: xo, removeScrollBar: c, shards: p, noRelative: g, noIsolation: b, inert: d, setCallbacks: a, allowPinchZoom: !!m, lockRef: n, gapMode: x }),
4585
- i ? h.cloneElement(h.Children.only(s), xe(xe({}, k), { ref: A })) : h.createElement(y, xe({}, k, { className: l, ref: A }), s)
4599
+ d && h.createElement(S, { sideCar: xo, removeScrollBar: c, shards: p, noRelative: m, noIsolation: x, inert: f, setCallbacks: a, allowPinchZoom: !!g, lockRef: n, gapMode: y }),
4600
+ i ? h.cloneElement(h.Children.only(s), xe(xe({}, k), { ref: E })) : h.createElement(b, xe({}, k, { className: l, ref: E }), s)
4586
4601
  );
4587
4602
  });
4588
4603
  Ht.defaultProps = {
@@ -4780,20 +4795,20 @@ var qe = dn ? { passive: !1 } : !1, sc = function(e) {
4780
4795
  }, fc = function(e, t) {
4781
4796
  return e === "h" && t === "rtl" ? -1 : 1;
4782
4797
  }, pc = function(e, t, n, r, o) {
4783
- var a = fc(e, window.getComputedStyle(t).direction), i = a * r, s = n.target, l = t.contains(s), c = !1, f = i > 0, p = 0, v = 0;
4798
+ var a = fc(e, window.getComputedStyle(t).direction), i = a * r, s = n.target, l = t.contains(s), c = !1, d = i > 0, p = 0, v = 0;
4784
4799
  do {
4785
4800
  if (!s)
4786
4801
  break;
4787
- var g = ko(e, s), b = g[0], d = g[1], m = g[2], w = d - m - a * b;
4788
- (b || w) && So(e, s) && (p += w, v += b);
4789
- var y = s.parentNode;
4790
- s = y && y.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? y.host : y;
4802
+ var m = ko(e, s), x = m[0], f = m[1], g = m[2], w = f - g - a * x;
4803
+ (x || w) && So(e, s) && (p += w, v += x);
4804
+ var b = s.parentNode;
4805
+ s = b && b.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? b.host : b;
4791
4806
  } while (
4792
4807
  // portaled content
4793
4808
  !l && s !== document.body || // self content
4794
4809
  l && (t.contains(s) || t === s)
4795
4810
  );
4796
- return (f && Math.abs(p) < 1 || !f && Math.abs(v) < 1) && (c = !0), c;
4811
+ return (d && Math.abs(p) < 1 || !d && Math.abs(v) < 1) && (c = !0), c;
4797
4812
  }, At = function(e) {
4798
4813
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
4799
4814
  }, fr = function(e) {
@@ -4807,87 +4822,87 @@ var qe = dn ? { passive: !1 } : !1, sc = function(e) {
4807
4822
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
4808
4823
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
4809
4824
  `);
4810
- }, mc = 0, Qe = [];
4811
- function gc(e) {
4812
- var t = h.useRef([]), n = h.useRef([0, 0]), r = h.useRef(), o = h.useState(mc++)[0], a = h.useState(yo)[0], i = h.useRef(e);
4825
+ }, gc = 0, Qe = [];
4826
+ function mc(e) {
4827
+ var t = h.useRef([]), n = h.useRef([0, 0]), r = h.useRef(), o = h.useState(gc++)[0], a = h.useState(yo)[0], i = h.useRef(e);
4813
4828
  h.useEffect(function() {
4814
4829
  i.current = e;
4815
4830
  }, [e]), h.useEffect(function() {
4816
4831
  if (e.inert) {
4817
4832
  document.body.classList.add("block-interactivity-".concat(o));
4818
- var d = Bl([e.lockRef.current], (e.shards || []).map(pr), !0).filter(Boolean);
4819
- return d.forEach(function(m) {
4820
- return m.classList.add("allow-interactivity-".concat(o));
4833
+ var f = Bl([e.lockRef.current], (e.shards || []).map(pr), !0).filter(Boolean);
4834
+ return f.forEach(function(g) {
4835
+ return g.classList.add("allow-interactivity-".concat(o));
4821
4836
  }), function() {
4822
- document.body.classList.remove("block-interactivity-".concat(o)), d.forEach(function(m) {
4823
- return m.classList.remove("allow-interactivity-".concat(o));
4837
+ document.body.classList.remove("block-interactivity-".concat(o)), f.forEach(function(g) {
4838
+ return g.classList.remove("allow-interactivity-".concat(o));
4824
4839
  });
4825
4840
  };
4826
4841
  }
4827
4842
  }, [e.inert, e.lockRef.current, e.shards]);
4828
- var s = h.useCallback(function(d, m) {
4829
- if ("touches" in d && d.touches.length === 2 || d.type === "wheel" && d.ctrlKey)
4843
+ var s = h.useCallback(function(f, g) {
4844
+ if ("touches" in f && f.touches.length === 2 || f.type === "wheel" && f.ctrlKey)
4830
4845
  return !i.current.allowPinchZoom;
4831
- var w = At(d), y = n.current, x = "deltaX" in d ? d.deltaX : y[0] - w[0], C = "deltaY" in d ? d.deltaY : y[1] - w[1], S, A = d.target, k = Math.abs(x) > Math.abs(C) ? "h" : "v";
4832
- if ("touches" in d && k === "h" && A.type === "range")
4846
+ var w = At(f), b = n.current, y = "deltaX" in f ? f.deltaX : b[0] - w[0], C = "deltaY" in f ? f.deltaY : b[1] - w[1], S, E = f.target, k = Math.abs(y) > Math.abs(C) ? "h" : "v";
4847
+ if ("touches" in f && k === "h" && E.type === "range")
4833
4848
  return !1;
4834
- var I = dr(k, A);
4849
+ var I = dr(k, E);
4835
4850
  if (!I)
4836
4851
  return !0;
4837
- if (I ? S = k : (S = k === "v" ? "h" : "v", I = dr(k, A)), !I)
4852
+ if (I ? S = k : (S = k === "v" ? "h" : "v", I = dr(k, E)), !I)
4838
4853
  return !1;
4839
- if (!r.current && "changedTouches" in d && (x || C) && (r.current = S), !S)
4854
+ if (!r.current && "changedTouches" in f && (y || C) && (r.current = S), !S)
4840
4855
  return !0;
4841
4856
  var D = r.current || S;
4842
- return pc(D, m, d, D === "h" ? x : C);
4843
- }, []), l = h.useCallback(function(d) {
4844
- var m = d;
4857
+ return pc(D, g, f, D === "h" ? y : C);
4858
+ }, []), l = h.useCallback(function(f) {
4859
+ var g = f;
4845
4860
  if (!(!Qe.length || Qe[Qe.length - 1] !== a)) {
4846
- var w = "deltaY" in m ? fr(m) : At(m), y = t.current.filter(function(S) {
4847
- return S.name === m.type && (S.target === m.target || m.target === S.shadowParent) && hc(S.delta, w);
4861
+ var w = "deltaY" in g ? fr(g) : At(g), b = t.current.filter(function(S) {
4862
+ return S.name === g.type && (S.target === g.target || g.target === S.shadowParent) && hc(S.delta, w);
4848
4863
  })[0];
4849
- if (y && y.should) {
4850
- m.cancelable && m.preventDefault();
4864
+ if (b && b.should) {
4865
+ g.cancelable && g.preventDefault();
4851
4866
  return;
4852
4867
  }
4853
- if (!y) {
4854
- var x = (i.current.shards || []).map(pr).filter(Boolean).filter(function(S) {
4855
- return S.contains(m.target);
4856
- }), C = x.length > 0 ? s(m, x[0]) : !i.current.noIsolation;
4857
- C && m.cancelable && m.preventDefault();
4868
+ if (!b) {
4869
+ var y = (i.current.shards || []).map(pr).filter(Boolean).filter(function(S) {
4870
+ return S.contains(g.target);
4871
+ }), C = y.length > 0 ? s(g, y[0]) : !i.current.noIsolation;
4872
+ C && g.cancelable && g.preventDefault();
4858
4873
  }
4859
4874
  }
4860
- }, []), c = h.useCallback(function(d, m, w, y) {
4861
- var x = { name: d, delta: m, target: w, should: y, shadowParent: wc(w) };
4862
- t.current.push(x), setTimeout(function() {
4875
+ }, []), c = h.useCallback(function(f, g, w, b) {
4876
+ var y = { name: f, delta: g, target: w, should: b, shadowParent: wc(w) };
4877
+ t.current.push(y), setTimeout(function() {
4863
4878
  t.current = t.current.filter(function(C) {
4864
- return C !== x;
4879
+ return C !== y;
4865
4880
  });
4866
4881
  }, 1);
4867
- }, []), f = h.useCallback(function(d) {
4868
- n.current = At(d), r.current = void 0;
4869
- }, []), p = h.useCallback(function(d) {
4870
- c(d.type, fr(d), d.target, s(d, e.lockRef.current));
4871
- }, []), v = h.useCallback(function(d) {
4872
- c(d.type, At(d), d.target, s(d, e.lockRef.current));
4882
+ }, []), d = h.useCallback(function(f) {
4883
+ n.current = At(f), r.current = void 0;
4884
+ }, []), p = h.useCallback(function(f) {
4885
+ c(f.type, fr(f), f.target, s(f, e.lockRef.current));
4886
+ }, []), v = h.useCallback(function(f) {
4887
+ c(f.type, At(f), f.target, s(f, e.lockRef.current));
4873
4888
  }, []);
4874
4889
  h.useEffect(function() {
4875
4890
  return Qe.push(a), e.setCallbacks({
4876
4891
  onScrollCapture: p,
4877
4892
  onWheelCapture: p,
4878
4893
  onTouchMoveCapture: v
4879
- }), document.addEventListener("wheel", l, qe), document.addEventListener("touchmove", l, qe), document.addEventListener("touchstart", f, qe), function() {
4880
- Qe = Qe.filter(function(d) {
4881
- return d !== a;
4882
- }), document.removeEventListener("wheel", l, qe), document.removeEventListener("touchmove", l, qe), document.removeEventListener("touchstart", f, qe);
4894
+ }), document.addEventListener("wheel", l, qe), document.addEventListener("touchmove", l, qe), document.addEventListener("touchstart", d, qe), function() {
4895
+ Qe = Qe.filter(function(f) {
4896
+ return f !== a;
4897
+ }), document.removeEventListener("wheel", l, qe), document.removeEventListener("touchmove", l, qe), document.removeEventListener("touchstart", d, qe);
4883
4898
  };
4884
4899
  }, []);
4885
- var g = e.removeScrollBar, b = e.inert;
4900
+ var m = e.removeScrollBar, x = e.inert;
4886
4901
  return h.createElement(
4887
4902
  h.Fragment,
4888
4903
  null,
4889
- b ? h.createElement(a, { styles: vc(o) }) : null,
4890
- g ? h.createElement(ic, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
4904
+ x ? h.createElement(a, { styles: vc(o) }) : null,
4905
+ m ? h.createElement(ic, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
4891
4906
  );
4892
4907
  }
4893
4908
  function wc(e) {
@@ -4895,7 +4910,7 @@ function wc(e) {
4895
4910
  e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
4896
4911
  return t;
4897
4912
  }
4898
- const bc = Kl(xo, gc);
4913
+ const bc = Kl(xo, mc);
4899
4914
  var Eo = h.forwardRef(function(e, t) {
4900
4915
  return h.createElement(Ht, xe({}, e, { ref: t, sideCar: bc }));
4901
4916
  });
@@ -4914,12 +4929,12 @@ var xc = [" ", "Enter", "ArrowUp", "ArrowDown"], yc = [" ", "Enter"], Ke = "Sele
4914
4929
  defaultValue: s,
4915
4930
  onValueChange: l,
4916
4931
  dir: c,
4917
- name: f,
4932
+ name: d,
4918
4933
  autoComplete: p,
4919
4934
  disabled: v,
4920
- required: g,
4921
- form: b
4922
- } = e, d = Yt(t), [m, w] = h.useState(null), [y, x] = h.useState(null), [C, S] = h.useState(!1), A = Fi(c), [k, I] = lr({
4935
+ required: m,
4936
+ form: x
4937
+ } = e, f = Yt(t), [g, w] = h.useState(null), [b, y] = h.useState(null), [C, S] = h.useState(!1), E = Fi(c), [k, I] = lr({
4923
4938
  prop: r,
4924
4939
  defaultProp: o ?? !1,
4925
4940
  onChange: a,
@@ -4929,16 +4944,16 @@ var xc = [" ", "Enter", "ArrowUp", "ArrowDown"], yc = [" ", "Enter"], Ke = "Sele
4929
4944
  defaultProp: s,
4930
4945
  onChange: l,
4931
4946
  caller: Ke
4932
- }), $ = h.useRef(null), W = m ? b || !!m.closest("form") : !0, [N, T] = h.useState(/* @__PURE__ */ new Set()), B = Array.from(N).map((O) => O.props.value).join(";");
4933
- return /* @__PURE__ */ E(Sl, { ...d, children: /* @__PURE__ */ Nt(
4947
+ }), $ = h.useRef(null), W = g ? x || !!g.closest("form") : !0, [F, N] = h.useState(/* @__PURE__ */ new Set()), _ = Array.from(F).map((O) => O.props.value).join(";");
4948
+ return /* @__PURE__ */ T(Sl, { ...f, children: /* @__PURE__ */ Nt(
4934
4949
  Sc,
4935
4950
  {
4936
- required: g,
4951
+ required: m,
4937
4952
  scope: t,
4938
- trigger: m,
4953
+ trigger: g,
4939
4954
  onTriggerChange: w,
4940
- valueNode: y,
4941
- onValueNodeChange: x,
4955
+ valueNode: b,
4956
+ onValueNodeChange: y,
4942
4957
  valueNodeHasChildren: C,
4943
4958
  onValueNodeHasChildrenChange: S,
4944
4959
  contentId: _n(),
@@ -4946,19 +4961,19 @@ var xc = [" ", "Enter", "ArrowUp", "ArrowDown"], yc = [" ", "Enter"], Ke = "Sele
4946
4961
  onValueChange: L,
4947
4962
  open: k,
4948
4963
  onOpenChange: I,
4949
- dir: A,
4964
+ dir: E,
4950
4965
  triggerPointerDownPosRef: $,
4951
4966
  disabled: v,
4952
4967
  children: [
4953
- /* @__PURE__ */ E(Ut.Provider, { scope: t, children: /* @__PURE__ */ E(
4968
+ /* @__PURE__ */ T(Ut.Provider, { scope: t, children: /* @__PURE__ */ T(
4954
4969
  kc,
4955
4970
  {
4956
4971
  scope: e.__scopeSelect,
4957
4972
  onNativeOptionAdd: h.useCallback((O) => {
4958
- T((M) => new Set(M).add(O));
4973
+ N((M) => new Set(M).add(O));
4959
4974
  }, []),
4960
4975
  onNativeOptionRemove: h.useCallback((O) => {
4961
- T((M) => {
4976
+ N((M) => {
4962
4977
  const P = new Set(M);
4963
4978
  return P.delete(O), P;
4964
4979
  });
@@ -4970,20 +4985,20 @@ var xc = [" ", "Enter", "ArrowUp", "ArrowDown"], yc = [" ", "Enter"], Ke = "Sele
4970
4985
  Ko,
4971
4986
  {
4972
4987
  "aria-hidden": !0,
4973
- required: g,
4988
+ required: m,
4974
4989
  tabIndex: -1,
4975
- name: f,
4990
+ name: d,
4976
4991
  autoComplete: p,
4977
4992
  value: D,
4978
4993
  onChange: (O) => L(O.target.value),
4979
4994
  disabled: v,
4980
- form: b,
4995
+ form: x,
4981
4996
  children: [
4982
- D === void 0 ? /* @__PURE__ */ E("option", { value: "" }) : null,
4983
- Array.from(N)
4997
+ D === void 0 ? /* @__PURE__ */ T("option", { value: "" }) : null,
4998
+ Array.from(F)
4984
4999
  ]
4985
5000
  },
4986
- B
5001
+ _
4987
5002
  ) : null
4988
5003
  ]
4989
5004
  }
@@ -4992,16 +5007,16 @@ var xc = [" ", "Enter", "ArrowUp", "ArrowDown"], yc = [" ", "Enter"], Ke = "Sele
4992
5007
  To.displayName = Ke;
4993
5008
  var Ao = "SelectTrigger", _o = h.forwardRef(
4994
5009
  (e, t) => {
4995
- const { __scopeSelect: n, disabled: r = !1, ...o } = e, a = Yt(n), i = $e(Ao, n), s = i.disabled || r, l = te(t, i.onTriggerChange), c = jt(n), f = h.useRef("touch"), [p, v, g] = Zo((d) => {
4996
- const m = c().filter((x) => !x.disabled), w = m.find((x) => x.value === i.value), y = Go(m, d, w);
4997
- y !== void 0 && i.onValueChange(y.value);
4998
- }), b = (d) => {
4999
- s || (i.onOpenChange(!0), g()), d && (i.triggerPointerDownPosRef.current = {
5000
- x: Math.round(d.pageX),
5001
- y: Math.round(d.pageY)
5010
+ const { __scopeSelect: n, disabled: r = !1, ...o } = e, a = Yt(n), i = $e(Ao, n), s = i.disabled || r, l = ne(t, i.onTriggerChange), c = jt(n), d = h.useRef("touch"), [p, v, m] = Zo((f) => {
5011
+ const g = c().filter((y) => !y.disabled), w = g.find((y) => y.value === i.value), b = Go(g, f, w);
5012
+ b !== void 0 && i.onValueChange(b.value);
5013
+ }), x = (f) => {
5014
+ s || (i.onOpenChange(!0), m()), f && (i.triggerPointerDownPosRef.current = {
5015
+ x: Math.round(f.pageX),
5016
+ y: Math.round(f.pageY)
5002
5017
  });
5003
5018
  };
5004
- return /* @__PURE__ */ E(kl, { asChild: !0, ...a, children: /* @__PURE__ */ E(
5019
+ return /* @__PURE__ */ T(kl, { asChild: !0, ...a, children: /* @__PURE__ */ T(
5005
5020
  X.button,
5006
5021
  {
5007
5022
  type: "button",
@@ -5017,17 +5032,17 @@ var Ao = "SelectTrigger", _o = h.forwardRef(
5017
5032
  "data-placeholder": Xo(i.value) ? "" : void 0,
5018
5033
  ...o,
5019
5034
  ref: l,
5020
- onClick: Z(o.onClick, (d) => {
5021
- d.currentTarget.focus(), f.current !== "mouse" && b(d);
5035
+ onClick: Z(o.onClick, (f) => {
5036
+ f.currentTarget.focus(), d.current !== "mouse" && x(f);
5022
5037
  }),
5023
- onPointerDown: Z(o.onPointerDown, (d) => {
5024
- f.current = d.pointerType;
5025
- const m = d.target;
5026
- m.hasPointerCapture(d.pointerId) && m.releasePointerCapture(d.pointerId), d.button === 0 && d.ctrlKey === !1 && d.pointerType === "mouse" && (b(d), d.preventDefault());
5038
+ onPointerDown: Z(o.onPointerDown, (f) => {
5039
+ d.current = f.pointerType;
5040
+ const g = f.target;
5041
+ g.hasPointerCapture(f.pointerId) && g.releasePointerCapture(f.pointerId), f.button === 0 && f.ctrlKey === !1 && f.pointerType === "mouse" && (x(f), f.preventDefault());
5027
5042
  }),
5028
- onKeyDown: Z(o.onKeyDown, (d) => {
5029
- const m = p.current !== "";
5030
- !(d.ctrlKey || d.altKey || d.metaKey) && d.key.length === 1 && v(d.key), !(m && d.key === " ") && xc.includes(d.key) && (b(), d.preventDefault());
5043
+ onKeyDown: Z(o.onKeyDown, (f) => {
5044
+ const g = p.current !== "";
5045
+ !(f.ctrlKey || f.altKey || f.metaKey) && f.key.length === 1 && v(f.key), !(g && f.key === " ") && xc.includes(f.key) && (x(), f.preventDefault());
5031
5046
  })
5032
5047
  }
5033
5048
  ) });
@@ -5036,16 +5051,16 @@ var Ao = "SelectTrigger", _o = h.forwardRef(
5036
5051
  _o.displayName = Ao;
5037
5052
  var Po = "SelectValue", Tc = h.forwardRef(
5038
5053
  (e, t) => {
5039
- const { __scopeSelect: n, className: r, style: o, children: a, placeholder: i = "", ...s } = e, l = $e(Po, n), { onValueNodeHasChildrenChange: c } = l, f = a !== void 0, p = te(t, l.onValueNodeChange);
5054
+ const { __scopeSelect: n, className: r, style: o, children: a, placeholder: i = "", ...s } = e, l = $e(Po, n), { onValueNodeHasChildrenChange: c } = l, d = a !== void 0, p = ne(t, l.onValueNodeChange);
5040
5055
  return se(() => {
5041
- c(f);
5042
- }, [c, f]), /* @__PURE__ */ E(
5056
+ c(d);
5057
+ }, [c, d]), /* @__PURE__ */ T(
5043
5058
  X.span,
5044
5059
  {
5045
5060
  ...s,
5046
5061
  ref: p,
5047
5062
  style: { pointerEvents: "none" },
5048
- children: Xo(l.value) ? /* @__PURE__ */ E(gn, { children: i }) : a
5063
+ children: Xo(l.value) ? /* @__PURE__ */ T(mn, { children: i }) : a
5049
5064
  }
5050
5065
  );
5051
5066
  }
@@ -5054,11 +5069,11 @@ Tc.displayName = Po;
5054
5069
  var Ac = "SelectIcon", Ro = h.forwardRef(
5055
5070
  (e, t) => {
5056
5071
  const { __scopeSelect: n, children: r, ...o } = e;
5057
- return /* @__PURE__ */ E(X.span, { "aria-hidden": !0, ...o, ref: t, children: r || "▼" });
5072
+ return /* @__PURE__ */ T(X.span, { "aria-hidden": !0, ...o, ref: t, children: r || "▼" });
5058
5073
  }
5059
5074
  );
5060
5075
  Ro.displayName = Ac;
5061
- var _c = "SelectPortal", Io = (e) => /* @__PURE__ */ E(vo, { asChild: !0, ...e });
5076
+ var _c = "SelectPortal", Io = (e) => /* @__PURE__ */ T(vo, { asChild: !0, ...e });
5062
5077
  Io.displayName = _c;
5063
5078
  var Xe = "SelectContent", No = h.forwardRef(
5064
5079
  (e, t) => {
@@ -5068,15 +5083,15 @@ var Xe = "SelectContent", No = h.forwardRef(
5068
5083
  }, []), !n.open) {
5069
5084
  const a = r;
5070
5085
  return a ? h.createPortal(
5071
- /* @__PURE__ */ E(Oo, { scope: e.__scopeSelect, children: /* @__PURE__ */ E(Ut.Slot, { scope: e.__scopeSelect, children: /* @__PURE__ */ E("div", { children: e.children }) }) }),
5086
+ /* @__PURE__ */ T(Oo, { scope: e.__scopeSelect, children: /* @__PURE__ */ T(Ut.Slot, { scope: e.__scopeSelect, children: /* @__PURE__ */ T("div", { children: e.children }) }) }),
5072
5087
  a
5073
5088
  ) : null;
5074
5089
  }
5075
- return /* @__PURE__ */ E(Lo, { ...e, ref: t });
5090
+ return /* @__PURE__ */ T(Lo, { ...e, ref: t });
5076
5091
  }
5077
5092
  );
5078
5093
  No.displayName = Xe;
5079
- var pe = 10, [Oo, We] = ct(Xe), Pc = "SelectContentImpl", Rc = /* @__PURE__ */ gt("SelectContent.RemoveScroll"), Lo = h.forwardRef(
5094
+ var pe = 10, [Oo, We] = ct(Xe), Pc = "SelectContentImpl", Rc = /* @__PURE__ */ mt("SelectContent.RemoveScroll"), Lo = h.forwardRef(
5080
5095
  (e, t) => {
5081
5096
  const {
5082
5097
  __scopeSelect: n,
@@ -5089,38 +5104,38 @@ var pe = 10, [Oo, We] = ct(Xe), Pc = "SelectContentImpl", Rc = /* @__PURE__ */ g
5089
5104
  side: s,
5090
5105
  sideOffset: l,
5091
5106
  align: c,
5092
- alignOffset: f,
5107
+ alignOffset: d,
5093
5108
  arrowPadding: p,
5094
5109
  collisionBoundary: v,
5095
- collisionPadding: g,
5096
- sticky: b,
5097
- hideWhenDetached: d,
5098
- avoidCollisions: m,
5110
+ collisionPadding: m,
5111
+ sticky: x,
5112
+ hideWhenDetached: f,
5113
+ avoidCollisions: g,
5099
5114
  //
5100
5115
  ...w
5101
- } = e, y = $e(Xe, n), [x, C] = h.useState(null), [S, A] = h.useState(null), k = te(t, (R) => C(R)), [I, D] = h.useState(null), [L, $] = h.useState(
5116
+ } = e, b = $e(Xe, n), [y, C] = h.useState(null), [S, E] = h.useState(null), k = ne(t, (R) => C(R)), [I, D] = h.useState(null), [L, $] = h.useState(
5102
5117
  null
5103
- ), W = jt(n), [N, T] = h.useState(!1), B = h.useRef(!1);
5118
+ ), W = jt(n), [F, N] = h.useState(!1), _ = h.useRef(!1);
5104
5119
  h.useEffect(() => {
5105
- if (x) return Fl(x);
5106
- }, [x]), Xi();
5120
+ if (y) return Fl(y);
5121
+ }, [y]), Xi();
5107
5122
  const O = h.useCallback(
5108
5123
  (R) => {
5109
- const [K, ...ne] = W().map((U) => U.ref.current), [j] = ne.slice(-1), H = document.activeElement;
5124
+ const [K, ...re] = W().map((U) => U.ref.current), [j] = re.slice(-1), H = document.activeElement;
5110
5125
  for (const U of R)
5111
5126
  if (U === H || (U == null || U.scrollIntoView({ block: "nearest" }), U === K && S && (S.scrollTop = 0), U === j && S && (S.scrollTop = S.scrollHeight), U == null || U.focus(), document.activeElement !== H)) return;
5112
5127
  },
5113
5128
  [W, S]
5114
5129
  ), M = h.useCallback(
5115
- () => O([I, x]),
5116
- [O, I, x]
5130
+ () => O([I, y]),
5131
+ [O, I, y]
5117
5132
  );
5118
5133
  h.useEffect(() => {
5119
- N && M();
5120
- }, [N, M]);
5121
- const { onOpenChange: P, triggerPointerDownPosRef: z } = y;
5134
+ F && M();
5135
+ }, [F, M]);
5136
+ const { onOpenChange: P, triggerPointerDownPosRef: z } = b;
5122
5137
  h.useEffect(() => {
5123
- if (x) {
5138
+ if (y) {
5124
5139
  let R = { x: 0, y: 0 };
5125
5140
  const K = (j) => {
5126
5141
  var H, U;
@@ -5128,53 +5143,53 @@ var pe = 10, [Oo, We] = ct(Xe), Pc = "SelectContentImpl", Rc = /* @__PURE__ */ g
5128
5143
  x: Math.abs(Math.round(j.pageX) - (((H = z.current) == null ? void 0 : H.x) ?? 0)),
5129
5144
  y: Math.abs(Math.round(j.pageY) - (((U = z.current) == null ? void 0 : U.y) ?? 0))
5130
5145
  };
5131
- }, ne = (j) => {
5132
- R.x <= 10 && R.y <= 10 ? j.preventDefault() : x.contains(j.target) || P(!1), document.removeEventListener("pointermove", K), z.current = null;
5146
+ }, re = (j) => {
5147
+ R.x <= 10 && R.y <= 10 ? j.preventDefault() : y.contains(j.target) || P(!1), document.removeEventListener("pointermove", K), z.current = null;
5133
5148
  };
5134
- return z.current !== null && (document.addEventListener("pointermove", K), document.addEventListener("pointerup", ne, { capture: !0, once: !0 })), () => {
5135
- document.removeEventListener("pointermove", K), document.removeEventListener("pointerup", ne, { capture: !0 });
5149
+ return z.current !== null && (document.addEventListener("pointermove", K), document.addEventListener("pointerup", re, { capture: !0, once: !0 })), () => {
5150
+ document.removeEventListener("pointermove", K), document.removeEventListener("pointerup", re, { capture: !0 });
5136
5151
  };
5137
5152
  }
5138
- }, [x, P, z]), h.useEffect(() => {
5153
+ }, [y, P, z]), h.useEffect(() => {
5139
5154
  const R = () => P(!1);
5140
5155
  return window.addEventListener("blur", R), window.addEventListener("resize", R), () => {
5141
5156
  window.removeEventListener("blur", R), window.removeEventListener("resize", R);
5142
5157
  };
5143
5158
  }, [P]);
5144
- const [ie, Pe] = Zo((R) => {
5145
- const K = W().filter((H) => !H.disabled), ne = K.find((H) => H.ref.current === document.activeElement), j = Go(K, R, ne);
5159
+ const [Q, Pe] = Zo((R) => {
5160
+ const K = W().filter((H) => !H.disabled), re = K.find((H) => H.ref.current === document.activeElement), j = Go(K, R, re);
5146
5161
  j && setTimeout(() => j.ref.current.focus());
5147
5162
  }), ut = h.useCallback(
5148
- (R, K, ne) => {
5149
- const j = !B.current && !ne;
5150
- (y.value !== void 0 && y.value === K || j) && (D(R), j && (B.current = !0));
5163
+ (R, K, re) => {
5164
+ const j = !_.current && !re;
5165
+ (b.value !== void 0 && b.value === K || j) && (D(R), j && (_.current = !0));
5151
5166
  },
5152
- [y.value]
5153
- ), dt = h.useCallback(() => x == null ? void 0 : x.focus(), [x]), Me = h.useCallback(
5154
- (R, K, ne) => {
5155
- const j = !B.current && !ne;
5156
- (y.value !== void 0 && y.value === K || j) && $(R);
5167
+ [b.value]
5168
+ ), dt = h.useCallback(() => y == null ? void 0 : y.focus(), [y]), Me = h.useCallback(
5169
+ (R, K, re) => {
5170
+ const j = !_.current && !re;
5171
+ (b.value !== void 0 && b.value === K || j) && $(R);
5157
5172
  },
5158
- [y.value]
5173
+ [b.value]
5159
5174
  ), Ze = r === "popper" ? fn : Mo, He = Ze === fn ? {
5160
5175
  side: s,
5161
5176
  sideOffset: l,
5162
5177
  align: c,
5163
- alignOffset: f,
5178
+ alignOffset: d,
5164
5179
  arrowPadding: p,
5165
5180
  collisionBoundary: v,
5166
- collisionPadding: g,
5167
- sticky: b,
5168
- hideWhenDetached: d,
5169
- avoidCollisions: m
5181
+ collisionPadding: m,
5182
+ sticky: x,
5183
+ hideWhenDetached: f,
5184
+ avoidCollisions: g
5170
5185
  } : {};
5171
- return /* @__PURE__ */ E(
5186
+ return /* @__PURE__ */ T(
5172
5187
  Oo,
5173
5188
  {
5174
5189
  scope: n,
5175
- content: x,
5190
+ content: y,
5176
5191
  viewport: S,
5177
- onViewportChange: A,
5192
+ onViewportChange: E,
5178
5193
  itemRefCallback: ut,
5179
5194
  selectedItem: I,
5180
5195
  onItemLeave: dt,
@@ -5182,21 +5197,21 @@ var pe = 10, [Oo, We] = ct(Xe), Pc = "SelectContentImpl", Rc = /* @__PURE__ */ g
5182
5197
  focusSelectedItem: M,
5183
5198
  selectedItemText: L,
5184
5199
  position: r,
5185
- isPositioned: N,
5186
- searchRef: ie,
5187
- children: /* @__PURE__ */ E(Eo, { as: Rc, allowPinchZoom: !0, children: /* @__PURE__ */ E(
5200
+ isPositioned: F,
5201
+ searchRef: Q,
5202
+ children: /* @__PURE__ */ T(Eo, { as: Rc, allowPinchZoom: !0, children: /* @__PURE__ */ T(
5188
5203
  Ur,
5189
5204
  {
5190
5205
  asChild: !0,
5191
- trapped: y.open,
5206
+ trapped: b.open,
5192
5207
  onMountAutoFocus: (R) => {
5193
5208
  R.preventDefault();
5194
5209
  },
5195
5210
  onUnmountAutoFocus: Z(o, (R) => {
5196
5211
  var K;
5197
- (K = y.trigger) == null || K.focus({ preventScroll: !0 }), R.preventDefault();
5212
+ (K = b.trigger) == null || K.focus({ preventScroll: !0 }), R.preventDefault();
5198
5213
  }),
5199
- children: /* @__PURE__ */ E(
5214
+ children: /* @__PURE__ */ T(
5200
5215
  Wr,
5201
5216
  {
5202
5217
  asChild: !0,
@@ -5204,18 +5219,18 @@ var pe = 10, [Oo, We] = ct(Xe), Pc = "SelectContentImpl", Rc = /* @__PURE__ */ g
5204
5219
  onEscapeKeyDown: a,
5205
5220
  onPointerDownOutside: i,
5206
5221
  onFocusOutside: (R) => R.preventDefault(),
5207
- onDismiss: () => y.onOpenChange(!1),
5208
- children: /* @__PURE__ */ E(
5222
+ onDismiss: () => b.onOpenChange(!1),
5223
+ children: /* @__PURE__ */ T(
5209
5224
  Ze,
5210
5225
  {
5211
5226
  role: "listbox",
5212
- id: y.contentId,
5213
- "data-state": y.open ? "open" : "closed",
5214
- dir: y.dir,
5227
+ id: b.contentId,
5228
+ "data-state": b.open ? "open" : "closed",
5229
+ dir: b.dir,
5215
5230
  onContextMenu: (R) => R.preventDefault(),
5216
5231
  ...w,
5217
5232
  ...He,
5218
- onPlaced: () => T(!0),
5233
+ onPlaced: () => N(!0),
5219
5234
  ref: k,
5220
5235
  style: {
5221
5236
  // flex layout so we can place the scroll buttons properly
@@ -5248,8 +5263,8 @@ var pe = 10, [Oo, We] = ct(Xe), Pc = "SelectContentImpl", Rc = /* @__PURE__ */ g
5248
5263
  );
5249
5264
  Lo.displayName = Pc;
5250
5265
  var Ic = "SelectItemAlignedPosition", Mo = h.forwardRef((e, t) => {
5251
- const { __scopeSelect: n, onPlaced: r, ...o } = e, a = $e(Xe, n), i = We(Xe, n), [s, l] = h.useState(null), [c, f] = h.useState(null), p = te(t, (k) => f(k)), v = jt(n), g = h.useRef(!1), b = h.useRef(!0), { viewport: d, selectedItem: m, selectedItemText: w, focusSelectedItem: y } = i, x = h.useCallback(() => {
5252
- if (a.trigger && a.valueNode && s && c && d && m && w) {
5266
+ const { __scopeSelect: n, onPlaced: r, ...o } = e, a = $e(Xe, n), i = We(Xe, n), [s, l] = h.useState(null), [c, d] = h.useState(null), p = ne(t, (k) => d(k)), v = jt(n), m = h.useRef(!1), x = h.useRef(!0), { viewport: f, selectedItem: g, selectedItemText: w, focusSelectedItem: b } = i, y = h.useCallback(() => {
5267
+ if (a.trigger && a.valueNode && s && c && f && g && w) {
5253
5268
  const k = a.trigger.getBoundingClientRect(), I = c.getBoundingClientRect(), D = a.valueNode.getBoundingClientRect(), L = w.getBoundingClientRect();
5254
5269
  if (a.dir !== "rtl") {
5255
5270
  const H = L.left - I.left, U = D.left - H, le = k.left - U, we = k.width + le, ft = Math.max(we, I.width), pt = window.innerWidth - pe, ht = Un(U, [
@@ -5269,27 +5284,27 @@ var Ic = "SelectItemAlignedPosition", Mo = h.forwardRef((e, t) => {
5269
5284
  ]);
5270
5285
  s.style.minWidth = we + "px", s.style.right = ht + "px";
5271
5286
  }
5272
- const $ = v(), W = window.innerHeight - pe * 2, N = d.scrollHeight, T = window.getComputedStyle(c), B = parseInt(T.borderTopWidth, 10), O = parseInt(T.paddingTop, 10), M = parseInt(T.borderBottomWidth, 10), P = parseInt(T.paddingBottom, 10), z = B + O + N + P + M, ie = Math.min(m.offsetHeight * 5, z), Pe = window.getComputedStyle(d), ut = parseInt(Pe.paddingTop, 10), dt = parseInt(Pe.paddingBottom, 10), Me = k.top + k.height / 2 - pe, Ze = W - Me, He = m.offsetHeight / 2, R = m.offsetTop + He, K = B + O + R, ne = z - K;
5287
+ const $ = v(), W = window.innerHeight - pe * 2, F = f.scrollHeight, N = window.getComputedStyle(c), _ = parseInt(N.borderTopWidth, 10), O = parseInt(N.paddingTop, 10), M = parseInt(N.borderBottomWidth, 10), P = parseInt(N.paddingBottom, 10), z = _ + O + F + P + M, Q = Math.min(g.offsetHeight * 5, z), Pe = window.getComputedStyle(f), ut = parseInt(Pe.paddingTop, 10), dt = parseInt(Pe.paddingBottom, 10), Me = k.top + k.height / 2 - pe, Ze = W - Me, He = g.offsetHeight / 2, R = g.offsetTop + He, K = _ + O + R, re = z - K;
5273
5288
  if (K <= Me) {
5274
- const H = $.length > 0 && m === $[$.length - 1].ref.current;
5289
+ const H = $.length > 0 && g === $[$.length - 1].ref.current;
5275
5290
  s.style.bottom = "0px";
5276
- const U = c.clientHeight - d.offsetTop - d.offsetHeight, le = Math.max(
5291
+ const U = c.clientHeight - f.offsetTop - f.offsetHeight, le = Math.max(
5277
5292
  Ze,
5278
5293
  He + // viewport might have padding bottom, include it to avoid a scrollable viewport
5279
5294
  (H ? dt : 0) + U + M
5280
5295
  ), we = K + le;
5281
5296
  s.style.height = we + "px";
5282
5297
  } else {
5283
- const H = $.length > 0 && m === $[0].ref.current;
5298
+ const H = $.length > 0 && g === $[0].ref.current;
5284
5299
  s.style.top = "0px";
5285
5300
  const le = Math.max(
5286
5301
  Me,
5287
- B + d.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
5302
+ _ + f.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
5288
5303
  (H ? ut : 0) + He
5289
- ) + ne;
5290
- s.style.height = le + "px", d.scrollTop = K - Me + d.offsetTop;
5304
+ ) + re;
5305
+ s.style.height = le + "px", f.scrollTop = K - Me + f.offsetTop;
5291
5306
  }
5292
- s.style.margin = `${pe}px 0`, s.style.minHeight = ie + "px", s.style.maxHeight = W + "px", r == null || r(), requestAnimationFrame(() => g.current = !0);
5307
+ s.style.margin = `${pe}px 0`, s.style.minHeight = Q + "px", s.style.maxHeight = W + "px", r == null || r(), requestAnimationFrame(() => m.current = !0);
5293
5308
  }
5294
5309
  }, [
5295
5310
  v,
@@ -5297,31 +5312,31 @@ var Ic = "SelectItemAlignedPosition", Mo = h.forwardRef((e, t) => {
5297
5312
  a.valueNode,
5298
5313
  s,
5299
5314
  c,
5300
- d,
5301
- m,
5315
+ f,
5316
+ g,
5302
5317
  w,
5303
5318
  a.dir,
5304
5319
  r
5305
5320
  ]);
5306
- se(() => x(), [x]);
5321
+ se(() => y(), [y]);
5307
5322
  const [C, S] = h.useState();
5308
5323
  se(() => {
5309
5324
  c && S(window.getComputedStyle(c).zIndex);
5310
5325
  }, [c]);
5311
- const A = h.useCallback(
5326
+ const E = h.useCallback(
5312
5327
  (k) => {
5313
- k && b.current === !0 && (x(), y == null || y(), b.current = !1);
5328
+ k && x.current === !0 && (y(), b == null || b(), x.current = !1);
5314
5329
  },
5315
- [x, y]
5330
+ [y, b]
5316
5331
  );
5317
- return /* @__PURE__ */ E(
5332
+ return /* @__PURE__ */ T(
5318
5333
  Oc,
5319
5334
  {
5320
5335
  scope: n,
5321
5336
  contentWrapper: s,
5322
- shouldExpandOnScrollRef: g,
5323
- onScrollButtonChange: A,
5324
- children: /* @__PURE__ */ E(
5337
+ shouldExpandOnScrollRef: m,
5338
+ onScrollButtonChange: E,
5339
+ children: /* @__PURE__ */ T(
5325
5340
  "div",
5326
5341
  {
5327
5342
  ref: l,
@@ -5331,7 +5346,7 @@ var Ic = "SelectItemAlignedPosition", Mo = h.forwardRef((e, t) => {
5331
5346
  position: "fixed",
5332
5347
  zIndex: C
5333
5348
  },
5334
- children: /* @__PURE__ */ E(
5349
+ children: /* @__PURE__ */ T(
5335
5350
  X.div,
5336
5351
  {
5337
5352
  ...o,
@@ -5359,7 +5374,7 @@ var Nc = "SelectPopperPosition", fn = h.forwardRef((e, t) => {
5359
5374
  collisionPadding: o = pe,
5360
5375
  ...a
5361
5376
  } = e, i = Yt(n);
5362
- return /* @__PURE__ */ E(
5377
+ return /* @__PURE__ */ T(
5363
5378
  El,
5364
5379
  {
5365
5380
  ...i,
@@ -5383,9 +5398,9 @@ var Nc = "SelectPopperPosition", fn = h.forwardRef((e, t) => {
5383
5398
  fn.displayName = Nc;
5384
5399
  var [Oc, Bn] = ct(Xe, {}), pn = "SelectViewport", Do = h.forwardRef(
5385
5400
  (e, t) => {
5386
- const { __scopeSelect: n, nonce: r, ...o } = e, a = We(pn, n), i = Bn(pn, n), s = te(t, a.onViewportChange), l = h.useRef(0);
5387
- return /* @__PURE__ */ Nt(gn, { children: [
5388
- /* @__PURE__ */ E(
5401
+ const { __scopeSelect: n, nonce: r, ...o } = e, a = We(pn, n), i = Bn(pn, n), s = ne(t, a.onViewportChange), l = h.useRef(0);
5402
+ return /* @__PURE__ */ Nt(mn, { children: [
5403
+ /* @__PURE__ */ T(
5389
5404
  "style",
5390
5405
  {
5391
5406
  dangerouslySetInnerHTML: {
@@ -5394,7 +5409,7 @@ var [Oc, Bn] = ct(Xe, {}), pn = "SelectViewport", Do = h.forwardRef(
5394
5409
  nonce: r
5395
5410
  }
5396
5411
  ),
5397
- /* @__PURE__ */ E(Ut.Slot, { scope: n, children: /* @__PURE__ */ E(
5412
+ /* @__PURE__ */ T(Ut.Slot, { scope: n, children: /* @__PURE__ */ T(
5398
5413
  X.div,
5399
5414
  {
5400
5415
  "data-radix-select-viewport": "",
@@ -5415,18 +5430,18 @@ var [Oc, Bn] = ct(Xe, {}), pn = "SelectViewport", Do = h.forwardRef(
5415
5430
  ...o.style
5416
5431
  },
5417
5432
  onScroll: Z(o.onScroll, (c) => {
5418
- const f = c.currentTarget, { contentWrapper: p, shouldExpandOnScrollRef: v } = i;
5433
+ const d = c.currentTarget, { contentWrapper: p, shouldExpandOnScrollRef: v } = i;
5419
5434
  if (v != null && v.current && p) {
5420
- const g = Math.abs(l.current - f.scrollTop);
5421
- if (g > 0) {
5422
- const b = window.innerHeight - pe * 2, d = parseFloat(p.style.minHeight), m = parseFloat(p.style.height), w = Math.max(d, m);
5423
- if (w < b) {
5424
- const y = w + g, x = Math.min(b, y), C = y - x;
5425
- p.style.height = x + "px", p.style.bottom === "0px" && (f.scrollTop = C > 0 ? C : 0, p.style.justifyContent = "flex-end");
5435
+ const m = Math.abs(l.current - d.scrollTop);
5436
+ if (m > 0) {
5437
+ const x = window.innerHeight - pe * 2, f = parseFloat(p.style.minHeight), g = parseFloat(p.style.height), w = Math.max(f, g);
5438
+ if (w < x) {
5439
+ const b = w + m, y = Math.min(x, b), C = b - y;
5440
+ p.style.height = y + "px", p.style.bottom === "0px" && (d.scrollTop = C > 0 ? C : 0, p.style.justifyContent = "flex-end");
5426
5441
  }
5427
5442
  }
5428
5443
  }
5429
- l.current = f.scrollTop;
5444
+ l.current = d.scrollTop;
5430
5445
  })
5431
5446
  }
5432
5447
  ) })
@@ -5437,14 +5452,14 @@ Do.displayName = pn;
5437
5452
  var Fo = "SelectGroup", [Lc, Mc] = ct(Fo), Dc = h.forwardRef(
5438
5453
  (e, t) => {
5439
5454
  const { __scopeSelect: n, ...r } = e, o = _n();
5440
- return /* @__PURE__ */ E(Lc, { scope: n, id: o, children: /* @__PURE__ */ E(X.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
5455
+ return /* @__PURE__ */ T(Lc, { scope: n, id: o, children: /* @__PURE__ */ T(X.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
5441
5456
  }
5442
5457
  );
5443
5458
  Dc.displayName = Fo;
5444
5459
  var Bo = "SelectLabel", Fc = h.forwardRef(
5445
5460
  (e, t) => {
5446
5461
  const { __scopeSelect: n, ...r } = e, o = Mc(Bo, n);
5447
- return /* @__PURE__ */ E(X.div, { id: o.id, ...r, ref: t });
5462
+ return /* @__PURE__ */ T(X.div, { id: o.id, ...r, ref: t });
5448
5463
  }
5449
5464
  );
5450
5465
  Fc.displayName = Bo;
@@ -5456,42 +5471,42 @@ var Ft = "SelectItem", [Bc, zo] = ct(Ft), Vo = h.forwardRef(
5456
5471
  disabled: o = !1,
5457
5472
  textValue: a,
5458
5473
  ...i
5459
- } = e, s = $e(Ft, n), l = We(Ft, n), c = s.value === r, [f, p] = h.useState(a ?? ""), [v, g] = h.useState(!1), b = te(
5474
+ } = e, s = $e(Ft, n), l = We(Ft, n), c = s.value === r, [d, p] = h.useState(a ?? ""), [v, m] = h.useState(!1), x = ne(
5460
5475
  t,
5461
- (y) => {
5462
- var x;
5463
- return (x = l.itemRefCallback) == null ? void 0 : x.call(l, y, r, o);
5476
+ (b) => {
5477
+ var y;
5478
+ return (y = l.itemRefCallback) == null ? void 0 : y.call(l, b, r, o);
5464
5479
  }
5465
- ), d = _n(), m = h.useRef("touch"), w = () => {
5480
+ ), f = _n(), g = h.useRef("touch"), w = () => {
5466
5481
  o || (s.onValueChange(r), s.onOpenChange(!1));
5467
5482
  };
5468
5483
  if (r === "")
5469
5484
  throw new Error(
5470
5485
  "A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder."
5471
5486
  );
5472
- return /* @__PURE__ */ E(
5487
+ return /* @__PURE__ */ T(
5473
5488
  Bc,
5474
5489
  {
5475
5490
  scope: n,
5476
5491
  value: r,
5477
5492
  disabled: o,
5478
- textId: d,
5493
+ textId: f,
5479
5494
  isSelected: c,
5480
- onItemTextChange: h.useCallback((y) => {
5481
- p((x) => x || ((y == null ? void 0 : y.textContent) ?? "").trim());
5495
+ onItemTextChange: h.useCallback((b) => {
5496
+ p((y) => y || ((b == null ? void 0 : b.textContent) ?? "").trim());
5482
5497
  }, []),
5483
- children: /* @__PURE__ */ E(
5498
+ children: /* @__PURE__ */ T(
5484
5499
  Ut.ItemSlot,
5485
5500
  {
5486
5501
  scope: n,
5487
5502
  value: r,
5488
5503
  disabled: o,
5489
- textValue: f,
5490
- children: /* @__PURE__ */ E(
5504
+ textValue: d,
5505
+ children: /* @__PURE__ */ T(
5491
5506
  X.div,
5492
5507
  {
5493
5508
  role: "option",
5494
- "aria-labelledby": d,
5509
+ "aria-labelledby": f,
5495
5510
  "data-highlighted": v ? "" : void 0,
5496
5511
  "aria-selected": c && v,
5497
5512
  "data-state": c ? "checked" : "unchecked",
@@ -5499,29 +5514,29 @@ var Ft = "SelectItem", [Bc, zo] = ct(Ft), Vo = h.forwardRef(
5499
5514
  "data-disabled": o ? "" : void 0,
5500
5515
  tabIndex: o ? void 0 : -1,
5501
5516
  ...i,
5502
- ref: b,
5503
- onFocus: Z(i.onFocus, () => g(!0)),
5504
- onBlur: Z(i.onBlur, () => g(!1)),
5517
+ ref: x,
5518
+ onFocus: Z(i.onFocus, () => m(!0)),
5519
+ onBlur: Z(i.onBlur, () => m(!1)),
5505
5520
  onClick: Z(i.onClick, () => {
5506
- m.current !== "mouse" && w();
5521
+ g.current !== "mouse" && w();
5507
5522
  }),
5508
5523
  onPointerUp: Z(i.onPointerUp, () => {
5509
- m.current === "mouse" && w();
5524
+ g.current === "mouse" && w();
5510
5525
  }),
5511
- onPointerDown: Z(i.onPointerDown, (y) => {
5512
- m.current = y.pointerType;
5526
+ onPointerDown: Z(i.onPointerDown, (b) => {
5527
+ g.current = b.pointerType;
5513
5528
  }),
5514
- onPointerMove: Z(i.onPointerMove, (y) => {
5515
- var x;
5516
- m.current = y.pointerType, o ? (x = l.onItemLeave) == null || x.call(l) : m.current === "mouse" && y.currentTarget.focus({ preventScroll: !0 });
5529
+ onPointerMove: Z(i.onPointerMove, (b) => {
5530
+ var y;
5531
+ g.current = b.pointerType, o ? (y = l.onItemLeave) == null || y.call(l) : g.current === "mouse" && b.currentTarget.focus({ preventScroll: !0 });
5517
5532
  }),
5518
- onPointerLeave: Z(i.onPointerLeave, (y) => {
5519
- var x;
5520
- y.currentTarget === document.activeElement && ((x = l.onItemLeave) == null || x.call(l));
5533
+ onPointerLeave: Z(i.onPointerLeave, (b) => {
5534
+ var y;
5535
+ b.currentTarget === document.activeElement && ((y = l.onItemLeave) == null || y.call(l));
5521
5536
  }),
5522
- onKeyDown: Z(i.onKeyDown, (y) => {
5537
+ onKeyDown: Z(i.onKeyDown, (b) => {
5523
5538
  var C;
5524
- ((C = l.searchRef) == null ? void 0 : C.current) !== "" && y.key === " " || (yc.includes(y.key) && w(), y.key === " " && y.preventDefault());
5539
+ ((C = l.searchRef) == null ? void 0 : C.current) !== "" && b.key === " " || (yc.includes(b.key) && w(), b.key === " " && b.preventDefault());
5525
5540
  })
5526
5541
  }
5527
5542
  )
@@ -5532,36 +5547,36 @@ var Ft = "SelectItem", [Bc, zo] = ct(Ft), Vo = h.forwardRef(
5532
5547
  }
5533
5548
  );
5534
5549
  Vo.displayName = Ft;
5535
- var mt = "SelectItemText", $o = h.forwardRef(
5550
+ var gt = "SelectItemText", $o = h.forwardRef(
5536
5551
  (e, t) => {
5537
- const { __scopeSelect: n, className: r, style: o, ...a } = e, i = $e(mt, n), s = We(mt, n), l = zo(mt, n), c = Ec(mt, n), [f, p] = h.useState(null), v = te(
5552
+ const { __scopeSelect: n, className: r, style: o, ...a } = e, i = $e(gt, n), s = We(gt, n), l = zo(gt, n), c = Ec(gt, n), [d, p] = h.useState(null), v = ne(
5538
5553
  t,
5539
5554
  (w) => p(w),
5540
5555
  l.onItemTextChange,
5541
5556
  (w) => {
5542
- var y;
5543
- return (y = s.itemTextRefCallback) == null ? void 0 : y.call(s, w, l.value, l.disabled);
5557
+ var b;
5558
+ return (b = s.itemTextRefCallback) == null ? void 0 : b.call(s, w, l.value, l.disabled);
5544
5559
  }
5545
- ), g = f == null ? void 0 : f.textContent, b = h.useMemo(
5546
- () => /* @__PURE__ */ E("option", { value: l.value, disabled: l.disabled, children: g }, l.value),
5547
- [l.disabled, l.value, g]
5548
- ), { onNativeOptionAdd: d, onNativeOptionRemove: m } = c;
5549
- return se(() => (d(b), () => m(b)), [d, m, b]), /* @__PURE__ */ Nt(gn, { children: [
5550
- /* @__PURE__ */ E(X.span, { id: l.textId, ...a, ref: v }),
5560
+ ), m = d == null ? void 0 : d.textContent, x = h.useMemo(
5561
+ () => /* @__PURE__ */ T("option", { value: l.value, disabled: l.disabled, children: m }, l.value),
5562
+ [l.disabled, l.value, m]
5563
+ ), { onNativeOptionAdd: f, onNativeOptionRemove: g } = c;
5564
+ return se(() => (f(x), () => g(x)), [f, g, x]), /* @__PURE__ */ Nt(mn, { children: [
5565
+ /* @__PURE__ */ T(X.span, { id: l.textId, ...a, ref: v }),
5551
5566
  l.isSelected && i.valueNode && !i.valueNodeHasChildren ? h.createPortal(a.children, i.valueNode) : null
5552
5567
  ] });
5553
5568
  }
5554
5569
  );
5555
- $o.displayName = mt;
5570
+ $o.displayName = gt;
5556
5571
  var Wo = "SelectItemIndicator", Ho = h.forwardRef(
5557
5572
  (e, t) => {
5558
5573
  const { __scopeSelect: n, ...r } = e;
5559
- return zo(Wo, n).isSelected ? /* @__PURE__ */ E(X.span, { "aria-hidden": !0, ...r, ref: t }) : null;
5574
+ return zo(Wo, n).isSelected ? /* @__PURE__ */ T(X.span, { "aria-hidden": !0, ...r, ref: t }) : null;
5560
5575
  }
5561
5576
  );
5562
5577
  Ho.displayName = Wo;
5563
5578
  var hn = "SelectScrollUpButton", Uo = h.forwardRef((e, t) => {
5564
- const n = We(hn, e.__scopeSelect), r = Bn(hn, e.__scopeSelect), [o, a] = h.useState(!1), i = te(t, r.onScrollButtonChange);
5579
+ const n = We(hn, e.__scopeSelect), r = Bn(hn, e.__scopeSelect), [o, a] = h.useState(!1), i = ne(t, r.onScrollButtonChange);
5565
5580
  return se(() => {
5566
5581
  if (n.viewport && n.isPositioned) {
5567
5582
  let s = function() {
@@ -5571,7 +5586,7 @@ var hn = "SelectScrollUpButton", Uo = h.forwardRef((e, t) => {
5571
5586
  const l = n.viewport;
5572
5587
  return s(), l.addEventListener("scroll", s), () => l.removeEventListener("scroll", s);
5573
5588
  }
5574
- }, [n.viewport, n.isPositioned]), o ? /* @__PURE__ */ E(
5589
+ }, [n.viewport, n.isPositioned]), o ? /* @__PURE__ */ T(
5575
5590
  Yo,
5576
5591
  {
5577
5592
  ...e,
@@ -5585,17 +5600,17 @@ var hn = "SelectScrollUpButton", Uo = h.forwardRef((e, t) => {
5585
5600
  });
5586
5601
  Uo.displayName = hn;
5587
5602
  var vn = "SelectScrollDownButton", jo = h.forwardRef((e, t) => {
5588
- const n = We(vn, e.__scopeSelect), r = Bn(vn, e.__scopeSelect), [o, a] = h.useState(!1), i = te(t, r.onScrollButtonChange);
5603
+ const n = We(vn, e.__scopeSelect), r = Bn(vn, e.__scopeSelect), [o, a] = h.useState(!1), i = ne(t, r.onScrollButtonChange);
5589
5604
  return se(() => {
5590
5605
  if (n.viewport && n.isPositioned) {
5591
5606
  let s = function() {
5592
- const c = l.scrollHeight - l.clientHeight, f = Math.ceil(l.scrollTop) < c;
5593
- a(f);
5607
+ const c = l.scrollHeight - l.clientHeight, d = Math.ceil(l.scrollTop) < c;
5608
+ a(d);
5594
5609
  };
5595
5610
  const l = n.viewport;
5596
5611
  return s(), l.addEventListener("scroll", s), () => l.removeEventListener("scroll", s);
5597
5612
  }
5598
- }, [n.viewport, n.isPositioned]), o ? /* @__PURE__ */ E(
5613
+ }, [n.viewport, n.isPositioned]), o ? /* @__PURE__ */ T(
5599
5614
  Yo,
5600
5615
  {
5601
5616
  ...e,
@@ -5613,10 +5628,10 @@ var Yo = h.forwardRef((e, t) => {
5613
5628
  i.current !== null && (window.clearInterval(i.current), i.current = null);
5614
5629
  }, []);
5615
5630
  return h.useEffect(() => () => l(), [l]), se(() => {
5616
- var f;
5631
+ var d;
5617
5632
  const c = s().find((p) => p.ref.current === document.activeElement);
5618
- (f = c == null ? void 0 : c.ref.current) == null || f.scrollIntoView({ block: "nearest" });
5619
- }, [s]), /* @__PURE__ */ E(
5633
+ (d = c == null ? void 0 : c.ref.current) == null || d.scrollIntoView({ block: "nearest" });
5634
+ }, [s]), /* @__PURE__ */ T(
5620
5635
  X.div,
5621
5636
  {
5622
5637
  "aria-hidden": !0,
@@ -5638,36 +5653,36 @@ var Yo = h.forwardRef((e, t) => {
5638
5653
  }), zc = "SelectSeparator", Vc = h.forwardRef(
5639
5654
  (e, t) => {
5640
5655
  const { __scopeSelect: n, ...r } = e;
5641
- return /* @__PURE__ */ E(X.div, { "aria-hidden": !0, ...r, ref: t });
5656
+ return /* @__PURE__ */ T(X.div, { "aria-hidden": !0, ...r, ref: t });
5642
5657
  }
5643
5658
  );
5644
5659
  Vc.displayName = zc;
5645
- var mn = "SelectArrow", $c = h.forwardRef(
5660
+ var gn = "SelectArrow", $c = h.forwardRef(
5646
5661
  (e, t) => {
5647
- const { __scopeSelect: n, ...r } = e, o = Yt(n), a = $e(mn, n), i = We(mn, n);
5648
- return a.open && i.position === "popper" ? /* @__PURE__ */ E(Tl, { ...o, ...r, ref: t }) : null;
5662
+ const { __scopeSelect: n, ...r } = e, o = Yt(n), a = $e(gn, n), i = We(gn, n);
5663
+ return a.open && i.position === "popper" ? /* @__PURE__ */ T(Tl, { ...o, ...r, ref: t }) : null;
5649
5664
  }
5650
5665
  );
5651
- $c.displayName = mn;
5666
+ $c.displayName = gn;
5652
5667
  var Wc = "SelectBubbleInput", Ko = h.forwardRef(
5653
5668
  ({ __scopeSelect: e, value: t, ...n }, r) => {
5654
- const o = h.useRef(null), a = te(r, o), i = Il(t);
5669
+ const o = h.useRef(null), a = ne(r, o), i = Il(t);
5655
5670
  return h.useEffect(() => {
5656
5671
  const s = o.current;
5657
5672
  if (!s) return;
5658
- const l = window.HTMLSelectElement.prototype, f = Object.getOwnPropertyDescriptor(
5673
+ const l = window.HTMLSelectElement.prototype, d = Object.getOwnPropertyDescriptor(
5659
5674
  l,
5660
5675
  "value"
5661
5676
  ).set;
5662
- if (i !== t && f) {
5677
+ if (i !== t && d) {
5663
5678
  const p = new Event("change", { bubbles: !0 });
5664
- f.call(s, t), s.dispatchEvent(p);
5679
+ d.call(s, t), s.dispatchEvent(p);
5665
5680
  }
5666
- }, [i, t]), /* @__PURE__ */ E(
5681
+ }, [i, t]), /* @__PURE__ */ T(
5667
5682
  X.select,
5668
5683
  {
5669
5684
  ...n,
5670
- style: { ...mo, ...n.style },
5685
+ style: { ...go, ...n.style },
5671
5686
  ref: a,
5672
5687
  defaultValue: t
5673
5688
  }
@@ -5731,7 +5746,7 @@ function zn({
5731
5746
  }
5732
5747
  function Jo({ children: e, ...t }) {
5733
5748
  const [n, r] = Ie(!1), { language: o, setLanguage: a, options: i } = at(), s = za();
5734
- return /* @__PURE__ */ _(
5749
+ return /* @__PURE__ */ A(
5735
5750
  Uc,
5736
5751
  {
5737
5752
  open: n,
@@ -5744,7 +5759,7 @@ function Jo({ children: e, ...t }) {
5744
5759
  },
5745
5760
  children: [
5746
5761
  e,
5747
- /* @__PURE__ */ u(jc, { container: s, children: /* @__PURE__ */ _(
5762
+ /* @__PURE__ */ u(jc, { container: s, children: /* @__PURE__ */ A(
5748
5763
  Yc,
5749
5764
  {
5750
5765
  className: "overflow-hidden bg-base border border-base-border rounded-dropdown-sheet max-h-[min(384px,var(--radix-select-content-available-height))] min-w-[var(--radix-select-trigger-width)] z-10",
@@ -5758,7 +5773,7 @@ function Jo({ children: e, ...t }) {
5758
5773
  ...t,
5759
5774
  children: [
5760
5775
  /* @__PURE__ */ u(qc, { className: "flex items-center justify-center h-6 bg-base text-base-subtle cursor-default", children: /* @__PURE__ */ u(Se, { size: "sm", name: "chevron-up" }) }),
5761
- /* @__PURE__ */ u(Kc, { className: "p-1.5", children: i.value.map((l) => /* @__PURE__ */ _(
5776
+ /* @__PURE__ */ u(Kc, { className: "p-1.5", children: i.value.map((l) => /* @__PURE__ */ A(
5762
5777
  Xc,
5763
5778
  {
5764
5779
  value: l.languageCode,
@@ -5784,7 +5799,7 @@ function eu({
5784
5799
  ...t
5785
5800
  }) {
5786
5801
  const n = G(), { language: r, showPicker: o } = at();
5787
- return o.value ? /* @__PURE__ */ u(Jo, { align: "center", children: /* @__PURE__ */ _(
5802
+ return o.value ? /* @__PURE__ */ u(Jo, { align: "center", children: /* @__PURE__ */ A(
5788
5803
  qo,
5789
5804
  {
5790
5805
  className: V(
@@ -5809,7 +5824,7 @@ function tu({
5809
5824
  showLanguageSelector: o
5810
5825
  }) {
5811
5826
  const a = G();
5812
- return /* @__PURE__ */ _(
5827
+ return /* @__PURE__ */ A(
5813
5828
  "div",
5814
5829
  {
5815
5830
  className: V(
@@ -5817,7 +5832,7 @@ function tu({
5817
5832
  r && "shadow-header"
5818
5833
  ),
5819
5834
  children: [
5820
- /* @__PURE__ */ _("div", { className: "flex gap-2 p-4 items-start", children: [
5835
+ /* @__PURE__ */ A("div", { className: "flex gap-2 p-4 items-start", children: [
5821
5836
  e ? /* @__PURE__ */ u(
5822
5837
  ve,
5823
5838
  {
@@ -5828,9 +5843,9 @@ function tu({
5828
5843
  children: /* @__PURE__ */ u(Se, { name: "chevron-up", className: "-rotate-90", size: "sm" })
5829
5844
  }
5830
5845
  ) : /* @__PURE__ */ u("div", { className: "relative w-8 h-8" }),
5831
- /* @__PURE__ */ u(ae, { active: n, children: /* @__PURE__ */ u(Cn, { className: "transition-opacity data-hidden:opacity-0" }) })
5846
+ /* @__PURE__ */ u(ie, { active: n, children: /* @__PURE__ */ u(Cn, { className: "transition-opacity data-hidden:opacity-0" }) })
5832
5847
  ] }),
5833
- /* @__PURE__ */ u(ae, { active: o, children: /* @__PURE__ */ u("div", { className: "absolute top-0 left-0 right-0 p-4 flex justify-center transition-[opacity,transform] duration-200 data-hidden:opacity-0 data-hidden:-translate-y-4", children: /* @__PURE__ */ u(eu, {}) }) })
5848
+ /* @__PURE__ */ u(ie, { active: o, children: /* @__PURE__ */ u("div", { className: "absolute top-0 left-0 right-0 p-4 flex justify-center transition-[opacity,transform] duration-200 data-hidden:opacity-0 data-hidden:-translate-y-4", children: /* @__PURE__ */ u(eu, {}) }) })
5834
5849
  ]
5835
5850
  }
5836
5851
  );
@@ -5844,22 +5859,22 @@ const nu = {
5844
5859
  bottom: "origin-bottom"
5845
5860
  };
5846
5861
  function hr({ open: e }) {
5847
- const t = G(), n = bn(), r = zt(), o = q(), a = o.value.placement, { isDisconnected: i, startSession: s, transcript: l, conversationIndex: c } = re(), f = Ar(), { currentContent: p, currentConfig: v } = kn(), g = Y(() => {
5862
+ const t = G(), n = bn(), r = zt(), o = q(), a = o.value.placement, { isDisconnected: i, startSession: s, transcript: l, conversationIndex: c } = oe(), d = Ar(), { currentContent: p, currentConfig: v } = kn(), m = Y(() => {
5848
5863
  var w;
5849
- return n.value || r.value ? !f.value || !n.value ? l.value : [
5864
+ return n.value || r.value ? !d.value || !n.value ? l.value : [
5850
5865
  {
5851
5866
  type: "message",
5852
5867
  role: "ai",
5853
- message: f.value,
5868
+ message: d.value,
5854
5869
  isText: !0,
5855
5870
  conversationIndex: ((w = l.value[0]) == null ? void 0 : w.conversationIndex) ?? c.peek()
5856
5871
  },
5857
5872
  ...l.value
5858
5873
  ] : o.value.transcript_enabled ? l.value : l.value.filter(
5859
- (y) => y.type !== "message" || y.isText
5874
+ (b) => b.type !== "message" || b.isText
5860
5875
  );
5861
- }), b = g.value.length > 0 || !i.value && o.value.transcript_enabled, d = Q(!0), m = p.value !== "feedback";
5862
- return /* @__PURE__ */ u(ae, { initial: !1, active: e, children: /* @__PURE__ */ _(
5876
+ }), x = m.value.length > 0 || !i.value && o.value.transcript_enabled, f = J(!0), g = p.value !== "feedback";
5877
+ return /* @__PURE__ */ u(ie, { initial: !1, active: e, children: /* @__PURE__ */ A(
5863
5878
  "div",
5864
5879
  {
5865
5880
  className: V(
@@ -5874,45 +5889,45 @@ function hr({ open: e }) {
5874
5889
  {
5875
5890
  showBackButton: v.showHeaderBack,
5876
5891
  onBackClick: v.onHeaderBack,
5877
- showStatusLabel: b && !i.value,
5878
- showShadow: b,
5879
- showLanguageSelector: p.value !== "feedback" && (!b || i.value)
5892
+ showStatusLabel: x && !i.value,
5893
+ showShadow: x,
5894
+ showLanguageSelector: p.value !== "feedback" && (!x || i.value)
5880
5895
  }
5881
5896
  ),
5882
- /* @__PURE__ */ u(ae, { active: p.value === "transcript", children: /* @__PURE__ */ _("div", { className: "grow flex flex-col min-h-0 transition-opacity duration-300 ease-out data-hidden:opacity-0", children: [
5897
+ /* @__PURE__ */ u(ie, { active: p.value === "transcript", children: /* @__PURE__ */ A("div", { className: "grow flex flex-col min-h-0 transition-opacity duration-300 ease-out data-hidden:opacity-0", children: [
5883
5898
  /* @__PURE__ */ u(
5884
5899
  Ri,
5885
5900
  {
5886
- transcript: g,
5887
- scrollPinned: d
5901
+ transcript: m,
5902
+ scrollPinned: f
5888
5903
  }
5889
5904
  ),
5890
5905
  /* @__PURE__ */ u(
5891
5906
  Ii,
5892
5907
  {
5893
- scrollPinned: d,
5894
- showTranscript: b
5908
+ scrollPinned: f,
5909
+ showTranscript: x
5895
5910
  }
5896
5911
  )
5897
5912
  ] }) }),
5898
- /* @__PURE__ */ u(ae, { active: p.value === "feedback", children: /* @__PURE__ */ _("div", { className: "absolute inset-0 top-[88px] flex flex-col bg-base transition-transform duration-300 ease-out data-hidden:translate-x-full", children: [
5913
+ /* @__PURE__ */ u(ie, { active: p.value === "feedback", children: /* @__PURE__ */ A("div", { className: "absolute inset-0 top-[88px] flex flex-col bg-base transition-transform duration-300 ease-out data-hidden:translate-x-full", children: [
5899
5914
  /* @__PURE__ */ u(Ni, {}),
5900
5915
  /* @__PURE__ */ u(Oi, {})
5901
5916
  ] }) }),
5902
- /* @__PURE__ */ u(ae, { active: m, children: /* @__PURE__ */ _(
5917
+ /* @__PURE__ */ u(ie, { active: g, children: /* @__PURE__ */ A(
5903
5918
  "div",
5904
5919
  {
5905
5920
  className: V(
5906
5921
  "absolute origin-top-left transition-[transform,left,top,opacity,scale] duration-200 z-1",
5907
5922
  "data-hidden:opacity-0",
5908
- b ? "top-4 left-4 scale-[0.1667]" : "top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 scale-100"
5923
+ x ? "top-4 left-4 scale-[0.1667]" : "top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 scale-100"
5909
5924
  ),
5910
5925
  children: [
5911
5926
  /* @__PURE__ */ u(it, { size: "lg" }),
5912
5927
  /* @__PURE__ */ u(
5913
- ae,
5928
+ ie,
5914
5929
  {
5915
- active: !b && i.value && !n.value,
5930
+ active: !x && i.value && !n.value,
5916
5931
  children: /* @__PURE__ */ u("div", { className: "absolute bottom-0 p-1 rounded-[calc(var(--el-button-radius)+4px)] bg-base left-1/2 -translate-x-1/2 translate-y-1/2 transition-[opacity,transform] data-hidden:opacity-0 data-hidden:scale-100 scale-150", children: /* @__PURE__ */ u(
5917
5932
  ve,
5918
5933
  {
@@ -5924,7 +5939,7 @@ function hr({ open: e }) {
5924
5939
  ) })
5925
5940
  }
5926
5941
  ),
5927
- /* @__PURE__ */ u(ae, { active: !b && !i.value, children: /* @__PURE__ */ u("div", { className: "absolute -bottom-3 left-1/2 -translate-x-1/2 translate-y-full transition-[opacity,transform] data-hidden:opacity-0 data-hidden:scale-75", children: /* @__PURE__ */ u(Cn, {}) }) })
5942
+ /* @__PURE__ */ u(ie, { active: !x && !i.value, children: /* @__PURE__ */ u("div", { className: "absolute -bottom-3 left-1/2 -translate-x-1/2 translate-y-full transition-[opacity,transform] data-hidden:opacity-0 data-hidden:scale-75", children: /* @__PURE__ */ u(Cn, {}) }) })
5928
5943
  ]
5929
5944
  }
5930
5945
  ) })
@@ -5933,10 +5948,10 @@ function hr({ open: e }) {
5933
5948
  ) });
5934
5949
  }
5935
5950
  function ea({ expanded: e }) {
5936
- const t = zt(), n = q().value.variant, { isDisconnected: r } = re(), o = G(), a = ee(() => {
5951
+ const t = zt(), n = q().value.variant, { isDisconnected: r } = oe(), o = G(), a = te(() => {
5937
5952
  e.value = !e.value;
5938
5953
  }, [e]);
5939
- return /* @__PURE__ */ _(rt, { children: [
5954
+ return /* @__PURE__ */ A(rt, { children: [
5940
5955
  n === "full" && /* @__PURE__ */ u(
5941
5956
  Ne,
5942
5957
  {
@@ -5982,8 +5997,8 @@ function ru({
5982
5997
  className: t,
5983
5998
  ...n
5984
5999
  }) {
5985
- const { isDisconnected: r } = re(), o = G();
5986
- return /* @__PURE__ */ _(
6000
+ const { isDisconnected: r } = oe(), o = G();
6001
+ return /* @__PURE__ */ A(
5987
6002
  "div",
5988
6003
  {
5989
6004
  className: V(
@@ -5998,7 +6013,7 @@ function ru({
5998
6013
  {
5999
6014
  visible: !e.value && r.value,
6000
6015
  className: "p-1 !min-w-60",
6001
- children: /* @__PURE__ */ _("div", { className: "flex items-center gap-2", children: [
6016
+ children: /* @__PURE__ */ A("div", { className: "flex items-center gap-2", children: [
6002
6017
  /* @__PURE__ */ u(it, {}),
6003
6018
  /* @__PURE__ */ u("div", { className: "text-sm max-w-64", children: o.main_label })
6004
6019
  ] })
@@ -6014,7 +6029,7 @@ function ou({
6014
6029
  className: t,
6015
6030
  ...n
6016
6031
  }) {
6017
- return /* @__PURE__ */ _(
6032
+ return /* @__PURE__ */ A(
6018
6033
  "div",
6019
6034
  {
6020
6035
  className: V("rounded-compact-sheet flex items-center p-2", t),
@@ -6028,7 +6043,7 @@ function ou({
6028
6043
  }
6029
6044
  function au({ visible: e, className: t, ...n }) {
6030
6045
  const r = G(), { language: o, showPicker: a } = at();
6031
- return a.value ? /* @__PURE__ */ u(Ne, { visible: e, className: "p-1", children: /* @__PURE__ */ u(Jo, { children: /* @__PURE__ */ _(
6046
+ return a.value ? /* @__PURE__ */ u(Ne, { visible: e, className: "p-1", children: /* @__PURE__ */ u(Jo, { children: /* @__PURE__ */ A(
6032
6047
  qo,
6033
6048
  {
6034
6049
  className: V(
@@ -6045,8 +6060,8 @@ function au({ visible: e, className: t, ...n }) {
6045
6060
  ) }) }) : null;
6046
6061
  }
6047
6062
  function ta() {
6048
- const e = q().value.variant, { isDisconnected: t, status: n } = re();
6049
- return /* @__PURE__ */ _(rt, { children: [
6063
+ const e = q().value.variant, { isDisconnected: t, status: n } = oe();
6064
+ return /* @__PURE__ */ A(rt, { children: [
6050
6065
  /* @__PURE__ */ u(
6051
6066
  Tn,
6052
6067
  {
@@ -6064,11 +6079,11 @@ function iu({
6064
6079
  className: e,
6065
6080
  ...t
6066
6081
  }) {
6067
- const { isDisconnected: n } = re(), r = G();
6068
- return /* @__PURE__ */ _("div", { className: V("flex flex-col p-2 rounded-sheet", e), ...t, children: [
6069
- /* @__PURE__ */ _("div", { className: "flex items-center p-1 gap-2 min-w-60", children: [
6082
+ const { isDisconnected: n } = oe(), r = G();
6083
+ return /* @__PURE__ */ A("div", { className: V("flex flex-col p-2 rounded-sheet", e), ...t, children: [
6084
+ /* @__PURE__ */ A("div", { className: "flex items-center p-1 gap-2 min-w-60", children: [
6070
6085
  /* @__PURE__ */ u(it, {}),
6071
- /* @__PURE__ */ _("div", { className: "relative text-sm max-w-64", children: [
6086
+ /* @__PURE__ */ A("div", { className: "relative text-sm max-w-64", children: [
6072
6087
  /* @__PURE__ */ u(
6073
6088
  "span",
6074
6089
  {
@@ -6079,7 +6094,7 @@ function iu({
6079
6094
  children: r.main_label
6080
6095
  }
6081
6096
  ),
6082
- /* @__PURE__ */ u(ae, { active: !n.value, children: /* @__PURE__ */ u(Cn, { className: "absolute top-1/2 -translate-y-1/2 transition-[transform,opacity] duration-200 data-hidden:opacity-0 data-hidden:scale-90" }) })
6097
+ /* @__PURE__ */ u(ie, { active: !n.value, children: /* @__PURE__ */ u(Cn, { className: "absolute top-1/2 -translate-y-1/2 transition-[transform,opacity] duration-200 data-hidden:opacity-0 data-hidden:scale-90" }) })
6083
6098
  ] })
6084
6099
  ] }),
6085
6100
  /* @__PURE__ */ u("div", { className: "flex items-center", children: /* @__PURE__ */ u(ta, {}) })
@@ -6089,7 +6104,7 @@ function su({
6089
6104
  className: e,
6090
6105
  ...t
6091
6106
  }) {
6092
- return /* @__PURE__ */ _(
6107
+ return /* @__PURE__ */ A(
6093
6108
  "div",
6094
6109
  {
6095
6110
  className: V("rounded-compact-sheet flex items-center p-2", e),
@@ -6102,7 +6117,7 @@ function su({
6102
6117
  );
6103
6118
  }
6104
6119
  function lu({ expandable: e, expanded: t }) {
6105
- const n = q().value.variant, r = Bt(), { isDisconnected: o } = re(), a = ee(async () => {
6120
+ const n = q().value.variant, r = Bt(), { isDisconnected: o } = oe(), a = te(async () => {
6106
6121
  await r.requestTerms(), t.value = !t.peek();
6107
6122
  }, [t]), i = n === "full";
6108
6123
  return e ? /* @__PURE__ */ u(
@@ -6119,7 +6134,7 @@ function lu({ expandable: e, expanded: t }) {
6119
6134
  }
6120
6135
  function cu() {
6121
6136
  const e = G(), t = q(), { dismissTerms: n, acceptTerms: r } = Bt();
6122
- return /* @__PURE__ */ _("div", { className: "max-w-[400px] flex flex-col gap-2 bg-base shadow-md pointer-events-auto rounded-sheet p-3 text-sm", children: [
6137
+ return /* @__PURE__ */ A("div", { className: "max-w-[400px] flex flex-col gap-2 bg-base shadow-md pointer-events-auto rounded-sheet p-3 text-sm", children: [
6123
6138
  /* @__PURE__ */ u(
6124
6139
  "div",
6125
6140
  {
@@ -6127,7 +6142,7 @@ function cu() {
6127
6142
  dangerouslySetInnerHTML: { __html: t.value.terms_html ?? "" }
6128
6143
  }
6129
6144
  ),
6130
- /* @__PURE__ */ _("div", { className: "flex justify-end gap-2", children: [
6145
+ /* @__PURE__ */ A("div", { className: "flex justify-end gap-2", children: [
6131
6146
  /* @__PURE__ */ u(ve, { onClick: n, children: e.dismiss_terms }),
6132
6147
  /* @__PURE__ */ u(ve, { onClick: r, variant: "primary", children: e.accept_terms })
6133
6148
  ] })
@@ -6145,30 +6160,30 @@ function uu({ copyText: e, children: t }) {
6145
6160
  };
6146
6161
  }
6147
6162
  }, [r]);
6148
- const a = ee(() => {
6163
+ const a = te(() => {
6149
6164
  const i = Ir(e);
6150
6165
  i && (navigator.clipboard.writeText(i), o(!0));
6151
6166
  }, []);
6152
6167
  return /* @__PURE__ */ u(ve, { onClick: a, children: r ? n.copied : t });
6153
6168
  }
6154
6169
  function du({ sawError: e }) {
6155
- const t = G(), { error: n, lastId: r } = re(), o = ee(() => {
6170
+ const t = G(), { error: n, lastId: r } = oe(), o = te(() => {
6156
6171
  e.value = !0;
6157
6172
  }, []);
6158
- return /* @__PURE__ */ _("div", { className: "max-w-[400px] flex flex-col gap-2 bg-base shadow-md pointer-events-auto rounded-sheet p-3 text-sm", children: [
6159
- /* @__PURE__ */ _("div", { className: "p-2 pt-1", children: [
6173
+ return /* @__PURE__ */ A("div", { className: "max-w-[400px] flex flex-col gap-2 bg-base shadow-md pointer-events-auto rounded-sheet p-3 text-sm", children: [
6174
+ /* @__PURE__ */ A("div", { className: "p-2 pt-1", children: [
6160
6175
  /* @__PURE__ */ u("h1", { className: "text-md font-medium pb-1", children: t.error_occurred }),
6161
6176
  n.value,
6162
- r.value && /* @__PURE__ */ _(rt, { children: [
6177
+ r.value && /* @__PURE__ */ A(rt, { children: [
6163
6178
  /* @__PURE__ */ u("br", {}),
6164
- /* @__PURE__ */ _("span", { className: "text-base-subtle", children: [
6179
+ /* @__PURE__ */ A("span", { className: "text-base-subtle", children: [
6165
6180
  t.conversation_id,
6166
6181
  ": ",
6167
6182
  r.value
6168
6183
  ] })
6169
6184
  ] })
6170
6185
  ] }),
6171
- /* @__PURE__ */ _("div", { className: "flex justify-end gap-2", children: [
6186
+ /* @__PURE__ */ A("div", { className: "flex justify-end gap-2", children: [
6172
6187
  /* @__PURE__ */ u(uu, { copyText: r, children: t.copy_id }),
6173
6188
  /* @__PURE__ */ u(ve, { variant: "primary", onClick: o, children: "Close" })
6174
6189
  ] })
@@ -6176,7 +6191,7 @@ function du({ sawError: e }) {
6176
6191
  }
6177
6192
  function fu() {
6178
6193
  const e = q();
6179
- return e.value.disable_banner ? null : /* @__PURE__ */ _(
6194
+ return e.value.disable_banner ? null : /* @__PURE__ */ A(
6180
6195
  "p",
6181
6196
  {
6182
6197
  className: V(
@@ -6216,7 +6231,7 @@ const Je = {
6216
6231
  }, _t = {
6217
6232
  display: "none"
6218
6233
  }, hu = vr(function() {
6219
- const t = q(), n = Q(t.peek().default_expanded), r = Q(!1), { error: o } = re(), a = Bt(), i = Y(
6234
+ const t = q(), n = J(t.peek().default_expanded), r = J(!1), { error: o } = oe(), a = Bt(), i = Y(
6220
6235
  () => t.value.transcript_enabled || t.value.text_input_enabled
6221
6236
  ), s = Y(
6222
6237
  () => V(
@@ -6227,27 +6242,27 @@ const Je = {
6227
6242
  Ee(() => {
6228
6243
  o.value && (i.value ? (r.value = !0, n.value = !0) : r.value = !1);
6229
6244
  }), Ee(() => {
6230
- const v = (g) => {
6231
- var b, d, m;
6232
- ((b = g.detail) == null ? void 0 : b.action) === "expand" ? n.value = !0 : ((d = g.detail) == null ? void 0 : d.action) === "collapse" ? n.value = !1 : ((m = g.detail) == null ? void 0 : m.action) === "toggle" && (n.value = !n.value);
6245
+ const v = (m) => {
6246
+ var x, f, g;
6247
+ ((x = m.detail) == null ? void 0 : x.action) === "expand" ? n.value = !0 : ((f = m.detail) == null ? void 0 : f.action) === "collapse" ? n.value = !1 : ((g = m.detail) == null ? void 0 : g.action) === "toggle" && (n.value = !n.value);
6233
6248
  };
6234
6249
  return document.addEventListener("elevenlabs-agent:expand", v), () => {
6235
6250
  document.removeEventListener("elevenlabs-agent:expand", v);
6236
6251
  };
6237
6252
  });
6238
- const l = Y(() => !i.value && o.value && !r.value ? "error" : !a.termsAccepted.value && a.termsShown.value ? "terms" : "conversation"), c = Y(() => l.value === "error"), f = Y(() => l.value === "terms"), p = Y(() => l.value === "conversation");
6239
- return /* @__PURE__ */ _(rt, { children: [
6240
- /* @__PURE__ */ u(ae, { initial: !1, active: p, children: /* @__PURE__ */ u(Ct, { className: s, style: _t, children: t.value.always_expanded ? /* @__PURE__ */ u(hr, { open: !0 }) : /* @__PURE__ */ _(rt, { children: [
6253
+ const l = Y(() => !i.value && o.value && !r.value ? "error" : !a.termsAccepted.value && a.termsShown.value ? "terms" : "conversation"), c = Y(() => l.value === "error"), d = Y(() => l.value === "terms"), p = Y(() => l.value === "conversation");
6254
+ return /* @__PURE__ */ A(rt, { children: [
6255
+ /* @__PURE__ */ u(ie, { initial: !1, active: p, children: /* @__PURE__ */ u(Ct, { className: s, style: _t, children: t.value.always_expanded ? /* @__PURE__ */ u(hr, { open: !0 }) : /* @__PURE__ */ A(rt, { children: [
6241
6256
  i.value && /* @__PURE__ */ u(hr, { open: n }),
6242
6257
  /* @__PURE__ */ u(lu, { expandable: i.value, expanded: n })
6243
6258
  ] }) }) }),
6244
- /* @__PURE__ */ u(ae, { initial: !1, active: f, children: /* @__PURE__ */ u(Ct, { className: s, style: _t, children: /* @__PURE__ */ u(cu, {}) }) }),
6245
- /* @__PURE__ */ u(ae, { initial: !1, active: c, children: /* @__PURE__ */ u(Ct, { className: s, style: _t, children: /* @__PURE__ */ u(du, { sawError: r }) }) }),
6259
+ /* @__PURE__ */ u(ie, { initial: !1, active: d, children: /* @__PURE__ */ u(Ct, { className: s, style: _t, children: /* @__PURE__ */ u(cu, {}) }) }),
6260
+ /* @__PURE__ */ u(ie, { initial: !1, active: c, children: /* @__PURE__ */ u(Ct, { className: s, style: _t, children: /* @__PURE__ */ u(du, { sawError: r }) }) }),
6246
6261
  /* @__PURE__ */ u(Ct, { className: s, style: _t, children: /* @__PURE__ */ u(fu, {}) })
6247
6262
  ] });
6248
6263
  });
6249
6264
  function vu(e) {
6250
- return /* @__PURE__ */ u(wa, { value: e, children: /* @__PURE__ */ u(xa, { children: /* @__PURE__ */ u(Ra, { children: /* @__PURE__ */ u(Ta, { children: /* @__PURE__ */ u(ya, { children: /* @__PURE__ */ u(Sa, { children: /* @__PURE__ */ u(ka, { children: /* @__PURE__ */ u(Aa, { children: /* @__PURE__ */ u(Fa, { children: /* @__PURE__ */ u(Ba, { children: /* @__PURE__ */ u(wi, { children: /* @__PURE__ */ _(gi, { children: [
6265
+ return /* @__PURE__ */ u(wa, { value: e, children: /* @__PURE__ */ u(xa, { children: /* @__PURE__ */ u(Ra, { children: /* @__PURE__ */ u(Ta, { children: /* @__PURE__ */ u(ya, { children: /* @__PURE__ */ u(Sa, { children: /* @__PURE__ */ u(ka, { children: /* @__PURE__ */ u(Aa, { children: /* @__PURE__ */ u(Fa, { children: /* @__PURE__ */ u(Ba, { children: /* @__PURE__ */ u(wi, { children: /* @__PURE__ */ A(mi, { children: [
6251
6266
  /* @__PURE__ */ u(La, {}),
6252
6267
  /* @__PURE__ */ u(hu, {})
6253
6268
  ] }) }) }) }) }) }) }) }) }) }) }) });