@centive/aria-sdk 0.8.9 → 0.9.0

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,6 +1,6 @@
1
1
  import { jsx as n, jsxs as E, Fragment as He } from "react/jsx-runtime";
2
2
  import { useRef as me, useState as I, useEffect as ee, useCallback as V } from "react";
3
- import { Sparkles as Re, Wrench as Ve, MicOff as je, Mic as Be, Maximize2 as dr, Phone as De, X as Oe, RefreshCw as We, MessageCircle as Fe, Minimize2 as gr, User as hr, Bot as ur, Send as pr } from "lucide-react";
3
+ import { Sparkles as Re, Wrench as Ve, MicOff as je, Mic as De, Maximize2 as dr, Phone as Be, X as Oe, RefreshCw as We, MessageCircle as Fe, Minimize2 as gr, User as hr, Bot as ur, Send as pr } from "lucide-react";
4
4
  import { createPortal as mr } from "react-dom";
5
5
  function fr(r) {
6
6
  return typeof r == "object" && r !== null && "status" in r && (r.status === "success" || r.status === "error") && !("type" in r);
@@ -525,18 +525,26 @@ class U {
525
525
  }
526
526
  this.autoReconnectOnAnamDisconnect && !this.isIntentionalDisconnect && !this.isReconnecting && (console.log("[AriaSessionManager] Anam disconnected unexpectedly, auto-reconnecting..."), this.autoReconnectSession());
527
527
  }), a.addListener(o.MESSAGE_HISTORY_UPDATED, (m) => {
528
- this.chatMessages = m.map((A) => ({
529
- role: A.role,
530
- content: A.content,
528
+ if (!this.sessionState.session_id) {
529
+ const x = a.getActiveSessionId();
530
+ x && (this.updateSessionState({ session_id: x }), console.log("[AriaSessionManager] Got session ID from message history event:", x));
531
+ }
532
+ this.chatMessages = m.map((x) => ({
533
+ role: x.role,
534
+ content: x.content,
531
535
  timestamp: Date.now()
532
536
  }));
533
- const f = m.map((A) => ({
534
- role: A.role,
535
- content: A.content,
537
+ const f = m.map((x) => ({
538
+ role: x.role,
539
+ content: x.content,
536
540
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
537
541
  }));
538
542
  this.sendMessageHistory(f), this.emit({ type: "message_history", data: { messages: this.chatMessages } });
539
543
  }), a.addListener(o.MESSAGE_STREAM_EVENT_RECEIVED, (m) => {
544
+ if (!this.sessionState.session_id) {
545
+ const x = a.getActiveSessionId();
546
+ x && (this.updateSessionState({ session_id: x }), console.log("[AriaSessionManager] Got session ID from message stream event:", x));
547
+ }
540
548
  m.role === "persona" ? this.liveTranscript += m.content : m.role === "user" && (this.liveTranscript = "");
541
549
  const f = {
542
550
  role: m.role,
@@ -643,7 +651,19 @@ class U {
643
651
  // Message Sending
644
652
  // ============================================================================
645
653
  sendMessageHistory(e, t = !1) {
646
- if (!this.ws || this.ws.readyState !== WebSocket.OPEN || !this.sessionState.session_id || !this.config.userId || !t && JSON.stringify(e) === JSON.stringify(this.lastMessageHistory))
654
+ if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {
655
+ console.log("[AriaSessionManager] Cannot send message history: WebSocket not connected");
656
+ return;
657
+ }
658
+ if (!this.sessionState.session_id) {
659
+ console.log("[AriaSessionManager] Cannot send message history: no session_id");
660
+ return;
661
+ }
662
+ if (!this.config.userId) {
663
+ console.log("[AriaSessionManager] Cannot send message history: no userId");
664
+ return;
665
+ }
666
+ if (!t && JSON.stringify(e) === JSON.stringify(this.lastMessageHistory))
647
667
  return;
648
668
  this.lastMessageHistory = e;
649
669
  const o = {
@@ -653,13 +673,24 @@ class U {
653
673
  messages: e
654
674
  };
655
675
  try {
656
- this.ws.send(JSON.stringify(o)), console.log("[AriaSessionManager] Sent message history:", e.length, "messages");
676
+ this.ws.send(JSON.stringify(o)), console.log("[AriaSessionManager] Sent message history:", e.length, "messages to session:", this.sessionState.session_id);
657
677
  } catch (a) {
658
678
  console.error("[AriaSessionManager] Failed to send message history:", a);
659
679
  }
660
680
  }
661
681
  sendMessageStream(e, t) {
662
- if (!this.ws || this.ws.readyState !== WebSocket.OPEN || !this.sessionState.session_id || !this.config.userId) return;
682
+ if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {
683
+ console.log("[AriaSessionManager] Cannot send message stream: WebSocket not connected");
684
+ return;
685
+ }
686
+ if (!this.sessionState.session_id) {
687
+ console.log("[AriaSessionManager] Cannot send message stream: no session_id");
688
+ return;
689
+ }
690
+ if (!this.config.userId) {
691
+ console.log("[AriaSessionManager] Cannot send message stream: no userId");
692
+ return;
693
+ }
663
694
  const o = {
664
695
  type: "message_stream",
665
696
  session_id: this.sessionState.session_id,
@@ -667,21 +698,32 @@ class U {
667
698
  message: { ...e, is_final: t }
668
699
  };
669
700
  try {
670
- this.ws.send(JSON.stringify(o));
701
+ this.ws.send(JSON.stringify(o)), t && console.log("[AriaSessionManager] Sent final message stream:", e.role, "to session:", this.sessionState.session_id);
671
702
  } catch (a) {
672
703
  console.error("[AriaSessionManager] Failed to send message stream:", a);
673
704
  }
674
705
  }
675
706
  sendSessionEnd() {
676
- if (!this.ws || this.ws.readyState !== WebSocket.OPEN || !this.sessionState.session_id || !this.config.userId) return;
677
- this.lastMessageHistory.length > 0 && this.sendMessageHistory(this.lastMessageHistory, !0);
707
+ if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {
708
+ console.log("[AriaSessionManager] Cannot send session end: WebSocket not connected");
709
+ return;
710
+ }
711
+ if (!this.sessionState.session_id) {
712
+ console.log("[AriaSessionManager] Cannot send session end: no session_id");
713
+ return;
714
+ }
715
+ if (!this.config.userId) {
716
+ console.log("[AriaSessionManager] Cannot send session end: no userId");
717
+ return;
718
+ }
719
+ this.lastMessageHistory.length > 0 && (console.log("[AriaSessionManager] Sending final message history before session end:", this.lastMessageHistory.length, "messages"), this.sendMessageHistory(this.lastMessageHistory, !0));
678
720
  const e = {
679
721
  type: "session_end",
680
722
  session_id: this.sessionState.session_id,
681
723
  user_id: this.config.userId
682
724
  };
683
725
  try {
684
- this.ws.send(JSON.stringify(e)), console.log("[AriaSessionManager] Sent session end event");
726
+ this.ws.send(JSON.stringify(e)), console.log("[AriaSessionManager] Sent session end event for session:", this.sessionState.session_id);
685
727
  } catch (t) {
686
728
  console.error("[AriaSessionManager] Failed to send session end:", t);
687
729
  }
@@ -833,11 +875,10 @@ class U {
833
875
  /**
834
876
  * Resume the session (called when widget reopens)
835
877
  *
836
- * NEW BEHAVIOR: Since we end the session on pause, this now creates a new session
837
- * with skip_greeting: true. The new session token should already be preloaded
838
- * (requested in endCurrentSession), so initialization should be fast.
878
+ * Since we end the session on pause (to free Anam resources), this requests a new
879
+ * session token with skip_greeting: true, then initializes the Anam client.
839
880
  *
840
- * @returns true if session initialization started, false if already has active session
881
+ * @returns true if session is ready or initialization started, false if waiting for token
841
882
  */
842
883
  async resumeSession() {
843
884
  if (console.log("[AriaSessionManager] Widget reopened - will create new session with skip_greeting"), this.anamClient && this.videoStream)
@@ -979,7 +1020,7 @@ class U {
979
1020
  lastError: null,
980
1021
  isPreloaded: !1,
981
1022
  isRefreshing: !1
982
- }), this.isPaused = !1, this.isAnamInitializing = !1, this.isConnected() ? (this.setStatus("connected"), this.config.preloadSession !== !1 && this.config.userId && (console.log("[AriaSessionManager] Requesting new session token for next open"), this.requestSessionToken())) : this.setStatus("idle");
1023
+ }), this.isPaused = !1, this.isAnamInitializing = !1, this.isConnected() ? (this.setStatus("connected"), console.log("[AriaSessionManager] Session ended, ready for new session when widget reopens")) : this.setStatus("idle");
983
1024
  }
984
1025
  // ============================================================================
985
1026
  // Cleanup
@@ -1314,8 +1355,8 @@ const Ke = ({
1314
1355
  ee(() => {
1315
1356
  const f = l.current;
1316
1357
  if (!f) return;
1317
- let A = f.shadowRoot;
1318
- A || (A = f.attachShadow({ mode: "open" })), b(A);
1358
+ let x = f.shadowRoot;
1359
+ x || (x = f.attachShadow({ mode: "open" })), b(x);
1319
1360
  }, []), ee(() => {
1320
1361
  if (!i || !e) return;
1321
1362
  const f = i.querySelector("style[data-aria-styles]");
@@ -1323,9 +1364,9 @@ const Ke = ({
1323
1364
  f.textContent = e;
1324
1365
  return;
1325
1366
  }
1326
- const A = document.createElement("style");
1327
- return A.setAttribute("data-aria-styles", "true"), A.textContent = e, i.prepend(A), () => {
1328
- A.remove();
1367
+ const x = document.createElement("style");
1368
+ return x.setAttribute("data-aria-styles", "true"), x.textContent = e, i.prepend(x), () => {
1369
+ x.remove();
1329
1370
  };
1330
1371
  }, [i, e]);
1331
1372
  const [d, m] = I(null);
@@ -1373,7 +1414,7 @@ const Rr = (r, e) => {
1373
1414
  nextPart: r,
1374
1415
  validators: e,
1375
1416
  classGroupId: t
1376
- }), Ee = "-", Le = [], Tr = "arbitrary..", Ir = (r) => {
1417
+ }), Ee = "-", _e = [], Tr = "arbitrary..", Ir = (r) => {
1377
1418
  const e = Pr(r), {
1378
1419
  conflictingClassGroups: t,
1379
1420
  conflictingClassGroupModifiers: o
@@ -1388,9 +1429,9 @@ const Rr = (r, e) => {
1388
1429
  getConflictingClassGroupIds: (i, b) => {
1389
1430
  if (b) {
1390
1431
  const d = o[i], m = t[i];
1391
- return d ? m ? Rr(m, d) : d : m || Le;
1432
+ return d ? m ? Rr(m, d) : d : m || _e;
1392
1433
  }
1393
- return t[i] || Le;
1434
+ return t[i] || _e;
1394
1435
  }
1395
1436
  };
1396
1437
  }, Ye = (r, e, t) => {
@@ -1438,20 +1479,20 @@ const Rr = (r, e) => {
1438
1479
  return;
1439
1480
  }
1440
1481
  if (typeof r == "function") {
1441
- Br(r, e, t, o);
1482
+ Dr(r, e, t, o);
1442
1483
  return;
1443
1484
  }
1444
- Dr(r, e, t, o);
1485
+ Br(r, e, t, o);
1445
1486
  }, jr = (r, e, t) => {
1446
1487
  const o = r === "" ? e : $e(e, r);
1447
1488
  o.classGroupId = t;
1448
- }, Br = (r, e, t, o) => {
1489
+ }, Dr = (r, e, t, o) => {
1449
1490
  if (Or(r)) {
1450
1491
  ze(r(o), e, t, o);
1451
1492
  return;
1452
1493
  }
1453
1494
  e.validators === null && (e.validators = []), e.validators.push(Nr(t, r));
1454
- }, Dr = (r, e, t, o) => {
1495
+ }, Br = (r, e, t, o) => {
1455
1496
  const a = Object.entries(r), l = a.length;
1456
1497
  for (let i = 0; i < l; i++) {
1457
1498
  const [b, d] = a[i];
@@ -1490,7 +1531,7 @@ const Rr = (r, e) => {
1490
1531
  l in t ? t[l] = i : a(l, i);
1491
1532
  }
1492
1533
  };
1493
- }, Ne = "!", _e = ":", Fr = [], Ge = (r, e, t, o, a) => ({
1534
+ }, Ne = "!", Le = ":", Fr = [], Ge = (r, e, t, o, a) => ({
1494
1535
  modifiers: r,
1495
1536
  hasImportantModifier: e,
1496
1537
  baseClassName: t,
@@ -1505,34 +1546,34 @@ const Rr = (r, e) => {
1505
1546
  const l = [];
1506
1547
  let i = 0, b = 0, d = 0, m;
1507
1548
  const f = a.length;
1508
- for (let B = 0; B < f; B++) {
1509
- const P = a[B];
1549
+ for (let D = 0; D < f; D++) {
1550
+ const P = a[D];
1510
1551
  if (i === 0 && b === 0) {
1511
- if (P === _e) {
1512
- l.push(a.slice(d, B)), d = B + 1;
1552
+ if (P === Le) {
1553
+ l.push(a.slice(d, D)), d = D + 1;
1513
1554
  continue;
1514
1555
  }
1515
1556
  if (P === "/") {
1516
- m = B;
1557
+ m = D;
1517
1558
  continue;
1518
1559
  }
1519
1560
  }
1520
1561
  P === "[" ? i++ : P === "]" ? i-- : P === "(" ? b++ : P === ")" && b--;
1521
1562
  }
1522
- const A = l.length === 0 ? a : a.slice(d);
1523
- let R = A, z = !1;
1524
- A.endsWith(Ne) ? (R = A.slice(0, -1), z = !0) : (
1563
+ const x = l.length === 0 ? a : a.slice(d);
1564
+ let R = x, z = !1;
1565
+ x.endsWith(Ne) ? (R = x.slice(0, -1), z = !0) : (
1525
1566
  /**
1526
1567
  * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
1527
1568
  * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
1528
1569
  */
1529
- A.startsWith(Ne) && (R = A.slice(1), z = !0)
1570
+ x.startsWith(Ne) && (R = x.slice(1), z = !0)
1530
1571
  );
1531
1572
  const j = m && m > d ? m - d : void 0;
1532
1573
  return Ge(l, z, R, j);
1533
1574
  };
1534
1575
  if (e) {
1535
- const a = e + _e, l = o;
1576
+ const a = e + Le, l = o;
1536
1577
  o = (i) => i.startsWith(a) ? l(i.slice(a.length)) : Ge(Fr, !1, i, void 0, !0);
1537
1578
  }
1538
1579
  if (t) {
@@ -1543,7 +1584,7 @@ const Rr = (r, e) => {
1543
1584
  });
1544
1585
  }
1545
1586
  return o;
1546
- }, Lr = (r) => {
1587
+ }, _r = (r) => {
1547
1588
  const e = /* @__PURE__ */ new Map();
1548
1589
  return r.orderSensitiveModifiers.forEach((t, o) => {
1549
1590
  e.set(t, 1e6 + o);
@@ -1556,10 +1597,10 @@ const Rr = (r, e) => {
1556
1597
  }
1557
1598
  return a.length > 0 && (a.sort(), o.push(...a)), o;
1558
1599
  };
1559
- }, _r = (r) => ({
1600
+ }, Lr = (r) => ({
1560
1601
  cache: Wr(r.cacheSize),
1561
1602
  parseClassName: Ur(r),
1562
- sortModifiers: Lr(r),
1603
+ sortModifiers: _r(r),
1563
1604
  ...Ir(r)
1564
1605
  }), Gr = /\s+/, Qr = (r, e) => {
1565
1606
  const {
@@ -1571,17 +1612,17 @@ const Rr = (r, e) => {
1571
1612
  let d = "";
1572
1613
  for (let m = b.length - 1; m >= 0; m -= 1) {
1573
1614
  const f = b[m], {
1574
- isExternal: A,
1615
+ isExternal: x,
1575
1616
  modifiers: R,
1576
1617
  hasImportantModifier: z,
1577
1618
  baseClassName: j,
1578
- maybePostfixModifierPosition: B
1619
+ maybePostfixModifierPosition: D
1579
1620
  } = t(f);
1580
- if (A) {
1621
+ if (x) {
1581
1622
  d = f + (d.length > 0 ? " " + d : d);
1582
1623
  continue;
1583
1624
  }
1584
- let P = !!B, G = o(P ? j.substring(0, B) : j);
1625
+ let P = !!D, G = o(P ? j.substring(0, D) : j);
1585
1626
  if (!G) {
1586
1627
  if (!P) {
1587
1628
  d = f + (d.length > 0 ? " " + d : d);
@@ -1597,9 +1638,9 @@ const Rr = (r, e) => {
1597
1638
  if (i.indexOf(M) > -1)
1598
1639
  continue;
1599
1640
  i.push(M);
1600
- const L = a(G, P);
1601
- for (let _ = 0; _ < L.length; ++_) {
1602
- const q = L[_];
1641
+ const _ = a(G, P);
1642
+ for (let L = 0; L < _.length; ++L) {
1643
+ const q = _[L];
1603
1644
  i.push(Q + q);
1604
1645
  }
1605
1646
  d = f + (d.length > 0 ? " " + d : d);
@@ -1620,8 +1661,8 @@ const Rr = (r, e) => {
1620
1661
  }, Kr = (r, ...e) => {
1621
1662
  let t, o, a, l;
1622
1663
  const i = (d) => {
1623
- const m = e.reduce((f, A) => A(f), r());
1624
- return t = _r(m), o = t.cache.get, a = t.cache.set, l = b, b(d);
1664
+ const m = e.reduce((f, x) => x(f), r());
1665
+ return t = Lr(m), o = t.cache.get, a = t.cache.set, l = b, b(d);
1625
1666
  }, b = (d) => {
1626
1667
  const m = o(d);
1627
1668
  if (m)
@@ -1633,19 +1674,19 @@ const Rr = (r, e) => {
1633
1674
  }, Jr = [], T = (r) => {
1634
1675
  const e = (t) => t[r] || Jr;
1635
1676
  return e.isThemeGetter = !0, e;
1636
- }, rr = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, tr = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Xr = /^\d+\/\d+$/, Zr = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Yr = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, $r = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, et = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, rt = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, pe = (r) => Xr.test(r), x = (r) => !!r && !Number.isNaN(Number(r)), te = (r) => !!r && Number.isInteger(Number(r)), Me = (r) => r.endsWith("%") && x(r.slice(0, -1)), $ = (r) => Zr.test(r), tt = () => !0, ot = (r) => (
1677
+ }, rr = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, tr = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Xr = /^\d+\/\d+$/, Zr = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Yr = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, $r = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, et = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, rt = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, pe = (r) => Xr.test(r), A = (r) => !!r && !Number.isNaN(Number(r)), te = (r) => !!r && Number.isInteger(Number(r)), Me = (r) => r.endsWith("%") && A(r.slice(0, -1)), $ = (r) => Zr.test(r), tt = () => !0, ot = (r) => (
1637
1678
  // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
1638
1679
  // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
1639
1680
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
1640
1681
  Yr.test(r) && !$r.test(r)
1641
- ), or = () => !1, at = (r) => et.test(r), it = (r) => rt.test(r), nt = (r) => !g(r) && !h(r), st = (r) => fe(r, nr, or), g = (r) => rr.test(r), se = (r) => fe(r, sr, ot), Ce = (r) => fe(r, ht, x), Qe = (r) => fe(r, ar, or), lt = (r) => fe(r, ir, it), ke = (r) => fe(r, lr, at), h = (r) => tr.test(r), ye = (r) => we(r, sr), ct = (r) => we(r, ut), qe = (r) => we(r, ar), dt = (r) => we(r, nr), gt = (r) => we(r, ir), Se = (r) => we(r, lr, !0), fe = (r, e, t) => {
1682
+ ), or = () => !1, at = (r) => et.test(r), it = (r) => rt.test(r), nt = (r) => !g(r) && !h(r), st = (r) => fe(r, nr, or), g = (r) => rr.test(r), se = (r) => fe(r, sr, ot), Ce = (r) => fe(r, ht, A), Qe = (r) => fe(r, ar, or), lt = (r) => fe(r, ir, it), ke = (r) => fe(r, lr, at), h = (r) => tr.test(r), ye = (r) => we(r, sr), ct = (r) => we(r, ut), qe = (r) => we(r, ar), dt = (r) => we(r, nr), gt = (r) => we(r, ir), Se = (r) => we(r, lr, !0), fe = (r, e, t) => {
1642
1683
  const o = rr.exec(r);
1643
1684
  return o ? o[1] ? e(o[1]) : t(o[2]) : !1;
1644
1685
  }, we = (r, e, t = !1) => {
1645
1686
  const o = tr.exec(r);
1646
1687
  return o ? o[1] ? e(o[1]) : t : !1;
1647
1688
  }, ar = (r) => r === "position" || r === "percentage", ir = (r) => r === "image" || r === "url", nr = (r) => r === "length" || r === "size" || r === "bg-size", sr = (r) => r === "length", ht = (r) => r === "number", ut = (r) => r === "family-name", lr = (r) => r === "shadow", pt = () => {
1648
- const r = T("color"), e = T("font"), t = T("text"), o = T("font-weight"), a = T("tracking"), l = T("leading"), i = T("breakpoint"), b = T("container"), d = T("spacing"), m = T("radius"), f = T("shadow"), A = T("inset-shadow"), R = T("text-shadow"), z = T("drop-shadow"), j = T("blur"), B = T("perspective"), P = T("aspect"), G = T("ease"), K = T("animate"), Q = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], M = () => [
1689
+ const r = T("color"), e = T("font"), t = T("text"), o = T("font-weight"), a = T("tracking"), l = T("leading"), i = T("breakpoint"), b = T("container"), d = T("spacing"), m = T("radius"), f = T("shadow"), x = T("inset-shadow"), R = T("text-shadow"), z = T("drop-shadow"), j = T("blur"), D = T("perspective"), P = T("aspect"), G = T("ease"), K = T("animate"), Q = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], M = () => [
1649
1690
  "center",
1650
1691
  "top",
1651
1692
  "bottom",
@@ -1663,7 +1704,7 @@ const Rr = (r, e) => {
1663
1704
  "bottom-left",
1664
1705
  // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
1665
1706
  "left-bottom"
1666
- ], L = () => [...M(), h, g], _ = () => ["auto", "hidden", "clip", "visible", "scroll"], q = () => ["auto", "contain", "none"], y = () => [h, g, d], D = () => [pe, "full", "auto", ...y()], s = () => [te, "none", "subgrid", h, g], O = () => ["auto", {
1707
+ ], _ = () => [...M(), h, g], L = () => ["auto", "hidden", "clip", "visible", "scroll"], q = () => ["auto", "contain", "none"], y = () => [h, g, d], B = () => [pe, "full", "auto", ...y()], s = () => [te, "none", "subgrid", h, g], O = () => ["auto", {
1667
1708
  span: ["full", te, h, g]
1668
1709
  }, te, h, g], Y = () => [te, "auto", h, g], re = () => ["auto", "min", "max", "fr", h, g], J = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], w = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], p = () => ["auto", ...y()], H = () => [pe, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...y()], v = () => [r, h, g], le = () => [...M(), qe, Qe, {
1669
1710
  position: [h, g]
@@ -1679,14 +1720,14 @@ const Rr = (r, e) => {
1679
1720
  m,
1680
1721
  h,
1681
1722
  g
1682
- ], W = () => ["", x, ye, se], X = () => ["solid", "dashed", "dotted", "double"], ae = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], C = () => [x, Me, qe, Qe], ge = () => [
1723
+ ], W = () => ["", A, ye, se], X = () => ["solid", "dashed", "dotted", "double"], ae = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], C = () => [A, Me, qe, Qe], ge = () => [
1683
1724
  // Deprecated since Tailwind CSS v4.0.0
1684
1725
  "",
1685
1726
  "none",
1686
1727
  j,
1687
1728
  h,
1688
1729
  g
1689
- ], ie = () => ["none", x, h, g], he = () => ["none", x, h, g], be = () => [x, h, g], ue = () => [pe, "full", ...y()];
1730
+ ], ie = () => ["none", A, h, g], he = () => ["none", A, h, g], be = () => [A, h, g], ue = () => [pe, "full", ...y()];
1690
1731
  return {
1691
1732
  cacheSize: 500,
1692
1733
  theme: {
@@ -1705,7 +1746,7 @@ const Rr = (r, e) => {
1705
1746
  perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
1706
1747
  radius: [$],
1707
1748
  shadow: [$],
1708
- spacing: ["px", x],
1749
+ spacing: ["px", A],
1709
1750
  text: [$],
1710
1751
  "text-shadow": [$],
1711
1752
  tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
@@ -1732,7 +1773,7 @@ const Rr = (r, e) => {
1732
1773
  * @see https://tailwindcss.com/docs/columns
1733
1774
  */
1734
1775
  columns: [{
1735
- columns: [x, g, h, b]
1776
+ columns: [A, g, h, b]
1736
1777
  }],
1737
1778
  /**
1738
1779
  * Break After
@@ -1810,28 +1851,28 @@ const Rr = (r, e) => {
1810
1851
  * @see https://tailwindcss.com/docs/object-position
1811
1852
  */
1812
1853
  "object-position": [{
1813
- object: L()
1854
+ object: _()
1814
1855
  }],
1815
1856
  /**
1816
1857
  * Overflow
1817
1858
  * @see https://tailwindcss.com/docs/overflow
1818
1859
  */
1819
1860
  overflow: [{
1820
- overflow: _()
1861
+ overflow: L()
1821
1862
  }],
1822
1863
  /**
1823
1864
  * Overflow X
1824
1865
  * @see https://tailwindcss.com/docs/overflow
1825
1866
  */
1826
1867
  "overflow-x": [{
1827
- "overflow-x": _()
1868
+ "overflow-x": L()
1828
1869
  }],
1829
1870
  /**
1830
1871
  * Overflow Y
1831
1872
  * @see https://tailwindcss.com/docs/overflow
1832
1873
  */
1833
1874
  "overflow-y": [{
1834
- "overflow-y": _()
1875
+ "overflow-y": L()
1835
1876
  }],
1836
1877
  /**
1837
1878
  * Overscroll Behavior
@@ -1864,63 +1905,63 @@ const Rr = (r, e) => {
1864
1905
  * @see https://tailwindcss.com/docs/top-right-bottom-left
1865
1906
  */
1866
1907
  inset: [{
1867
- inset: D()
1908
+ inset: B()
1868
1909
  }],
1869
1910
  /**
1870
1911
  * Right / Left
1871
1912
  * @see https://tailwindcss.com/docs/top-right-bottom-left
1872
1913
  */
1873
1914
  "inset-x": [{
1874
- "inset-x": D()
1915
+ "inset-x": B()
1875
1916
  }],
1876
1917
  /**
1877
1918
  * Top / Bottom
1878
1919
  * @see https://tailwindcss.com/docs/top-right-bottom-left
1879
1920
  */
1880
1921
  "inset-y": [{
1881
- "inset-y": D()
1922
+ "inset-y": B()
1882
1923
  }],
1883
1924
  /**
1884
1925
  * Start
1885
1926
  * @see https://tailwindcss.com/docs/top-right-bottom-left
1886
1927
  */
1887
1928
  start: [{
1888
- start: D()
1929
+ start: B()
1889
1930
  }],
1890
1931
  /**
1891
1932
  * End
1892
1933
  * @see https://tailwindcss.com/docs/top-right-bottom-left
1893
1934
  */
1894
1935
  end: [{
1895
- end: D()
1936
+ end: B()
1896
1937
  }],
1897
1938
  /**
1898
1939
  * Top
1899
1940
  * @see https://tailwindcss.com/docs/top-right-bottom-left
1900
1941
  */
1901
1942
  top: [{
1902
- top: D()
1943
+ top: B()
1903
1944
  }],
1904
1945
  /**
1905
1946
  * Right
1906
1947
  * @see https://tailwindcss.com/docs/top-right-bottom-left
1907
1948
  */
1908
1949
  right: [{
1909
- right: D()
1950
+ right: B()
1910
1951
  }],
1911
1952
  /**
1912
1953
  * Bottom
1913
1954
  * @see https://tailwindcss.com/docs/top-right-bottom-left
1914
1955
  */
1915
1956
  bottom: [{
1916
- bottom: D()
1957
+ bottom: B()
1917
1958
  }],
1918
1959
  /**
1919
1960
  * Left
1920
1961
  * @see https://tailwindcss.com/docs/top-right-bottom-left
1921
1962
  */
1922
1963
  left: [{
1923
- left: D()
1964
+ left: B()
1924
1965
  }],
1925
1966
  /**
1926
1967
  * Visibility
@@ -1963,21 +2004,21 @@ const Rr = (r, e) => {
1963
2004
  * @see https://tailwindcss.com/docs/flex
1964
2005
  */
1965
2006
  flex: [{
1966
- flex: [x, pe, "auto", "initial", "none", g]
2007
+ flex: [A, pe, "auto", "initial", "none", g]
1967
2008
  }],
1968
2009
  /**
1969
2010
  * Flex Grow
1970
2011
  * @see https://tailwindcss.com/docs/flex-grow
1971
2012
  */
1972
2013
  grow: [{
1973
- grow: ["", x, h, g]
2014
+ grow: ["", A, h, g]
1974
2015
  }],
1975
2016
  /**
1976
2017
  * Flex Shrink
1977
2018
  * @see https://tailwindcss.com/docs/flex-shrink
1978
2019
  */
1979
2020
  shrink: [{
1980
- shrink: ["", x, h, g]
2021
+ shrink: ["", A, h, g]
1981
2022
  }],
1982
2023
  /**
1983
2024
  * Order
@@ -2454,7 +2495,7 @@ const Rr = (r, e) => {
2454
2495
  * @see https://tailwindcss.com/docs/line-clamp
2455
2496
  */
2456
2497
  "line-clamp": [{
2457
- "line-clamp": [x, "none", h, Ce]
2498
+ "line-clamp": [A, "none", h, Ce]
2458
2499
  }],
2459
2500
  /**
2460
2501
  * Line Height
@@ -2527,7 +2568,7 @@ const Rr = (r, e) => {
2527
2568
  * @see https://tailwindcss.com/docs/text-decoration-thickness
2528
2569
  */
2529
2570
  "text-decoration-thickness": [{
2530
- decoration: [x, "from-font", "auto", h, se]
2571
+ decoration: [A, "from-font", "auto", h, se]
2531
2572
  }],
2532
2573
  /**
2533
2574
  * Text Decoration Color
@@ -2541,7 +2582,7 @@ const Rr = (r, e) => {
2541
2582
  * @see https://tailwindcss.com/docs/text-underline-offset
2542
2583
  */
2543
2584
  "underline-offset": [{
2544
- "underline-offset": [x, "auto", h, g]
2585
+ "underline-offset": [A, "auto", h, g]
2545
2586
  }],
2546
2587
  /**
2547
2588
  * Text Transform
@@ -3007,14 +3048,14 @@ const Rr = (r, e) => {
3007
3048
  * @see https://tailwindcss.com/docs/outline-offset
3008
3049
  */
3009
3050
  "outline-offset": [{
3010
- "outline-offset": [x, h, g]
3051
+ "outline-offset": [A, h, g]
3011
3052
  }],
3012
3053
  /**
3013
3054
  * Outline Width
3014
3055
  * @see https://tailwindcss.com/docs/outline-width
3015
3056
  */
3016
3057
  "outline-w": [{
3017
- outline: ["", x, ye, se]
3058
+ outline: ["", A, ye, se]
3018
3059
  }],
3019
3060
  /**
3020
3061
  * Outline Color
@@ -3052,7 +3093,7 @@ const Rr = (r, e) => {
3052
3093
  * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
3053
3094
  */
3054
3095
  "inset-shadow": [{
3055
- "inset-shadow": ["none", A, Se, ke]
3096
+ "inset-shadow": ["none", x, Se, ke]
3056
3097
  }],
3057
3098
  /**
3058
3099
  * Inset Box Shadow Color
@@ -3089,7 +3130,7 @@ const Rr = (r, e) => {
3089
3130
  * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
3090
3131
  */
3091
3132
  "ring-offset-w": [{
3092
- "ring-offset": [x, se]
3133
+ "ring-offset": [A, se]
3093
3134
  }],
3094
3135
  /**
3095
3136
  * Ring Offset Color
@@ -3133,7 +3174,7 @@ const Rr = (r, e) => {
3133
3174
  * @see https://tailwindcss.com/docs/opacity
3134
3175
  */
3135
3176
  opacity: [{
3136
- opacity: [x, h, g]
3177
+ opacity: [A, h, g]
3137
3178
  }],
3138
3179
  /**
3139
3180
  * Mix Blend Mode
@@ -3168,7 +3209,7 @@ const Rr = (r, e) => {
3168
3209
  * @see https://tailwindcss.com/docs/mask-image
3169
3210
  */
3170
3211
  "mask-image-linear-pos": [{
3171
- "mask-linear": [x]
3212
+ "mask-linear": [A]
3172
3213
  }],
3173
3214
  "mask-image-linear-from-pos": [{
3174
3215
  "mask-linear-from": C()
@@ -3282,7 +3323,7 @@ const Rr = (r, e) => {
3282
3323
  "mask-radial-at": M()
3283
3324
  }],
3284
3325
  "mask-image-conic-pos": [{
3285
- "mask-conic": [x]
3326
+ "mask-conic": [A]
3286
3327
  }],
3287
3328
  "mask-image-conic-from-pos": [{
3288
3329
  "mask-conic-from": C()
@@ -3373,14 +3414,14 @@ const Rr = (r, e) => {
3373
3414
  * @see https://tailwindcss.com/docs/brightness
3374
3415
  */
3375
3416
  brightness: [{
3376
- brightness: [x, h, g]
3417
+ brightness: [A, h, g]
3377
3418
  }],
3378
3419
  /**
3379
3420
  * Contrast
3380
3421
  * @see https://tailwindcss.com/docs/contrast
3381
3422
  */
3382
3423
  contrast: [{
3383
- contrast: [x, h, g]
3424
+ contrast: [A, h, g]
3384
3425
  }],
3385
3426
  /**
3386
3427
  * Drop Shadow
@@ -3408,35 +3449,35 @@ const Rr = (r, e) => {
3408
3449
  * @see https://tailwindcss.com/docs/grayscale
3409
3450
  */
3410
3451
  grayscale: [{
3411
- grayscale: ["", x, h, g]
3452
+ grayscale: ["", A, h, g]
3412
3453
  }],
3413
3454
  /**
3414
3455
  * Hue Rotate
3415
3456
  * @see https://tailwindcss.com/docs/hue-rotate
3416
3457
  */
3417
3458
  "hue-rotate": [{
3418
- "hue-rotate": [x, h, g]
3459
+ "hue-rotate": [A, h, g]
3419
3460
  }],
3420
3461
  /**
3421
3462
  * Invert
3422
3463
  * @see https://tailwindcss.com/docs/invert
3423
3464
  */
3424
3465
  invert: [{
3425
- invert: ["", x, h, g]
3466
+ invert: ["", A, h, g]
3426
3467
  }],
3427
3468
  /**
3428
3469
  * Saturate
3429
3470
  * @see https://tailwindcss.com/docs/saturate
3430
3471
  */
3431
3472
  saturate: [{
3432
- saturate: [x, h, g]
3473
+ saturate: [A, h, g]
3433
3474
  }],
3434
3475
  /**
3435
3476
  * Sepia
3436
3477
  * @see https://tailwindcss.com/docs/sepia
3437
3478
  */
3438
3479
  sepia: [{
3439
- sepia: ["", x, h, g]
3480
+ sepia: ["", A, h, g]
3440
3481
  }],
3441
3482
  /**
3442
3483
  * Backdrop Filter
@@ -3463,56 +3504,56 @@ const Rr = (r, e) => {
3463
3504
  * @see https://tailwindcss.com/docs/backdrop-brightness
3464
3505
  */
3465
3506
  "backdrop-brightness": [{
3466
- "backdrop-brightness": [x, h, g]
3507
+ "backdrop-brightness": [A, h, g]
3467
3508
  }],
3468
3509
  /**
3469
3510
  * Backdrop Contrast
3470
3511
  * @see https://tailwindcss.com/docs/backdrop-contrast
3471
3512
  */
3472
3513
  "backdrop-contrast": [{
3473
- "backdrop-contrast": [x, h, g]
3514
+ "backdrop-contrast": [A, h, g]
3474
3515
  }],
3475
3516
  /**
3476
3517
  * Backdrop Grayscale
3477
3518
  * @see https://tailwindcss.com/docs/backdrop-grayscale
3478
3519
  */
3479
3520
  "backdrop-grayscale": [{
3480
- "backdrop-grayscale": ["", x, h, g]
3521
+ "backdrop-grayscale": ["", A, h, g]
3481
3522
  }],
3482
3523
  /**
3483
3524
  * Backdrop Hue Rotate
3484
3525
  * @see https://tailwindcss.com/docs/backdrop-hue-rotate
3485
3526
  */
3486
3527
  "backdrop-hue-rotate": [{
3487
- "backdrop-hue-rotate": [x, h, g]
3528
+ "backdrop-hue-rotate": [A, h, g]
3488
3529
  }],
3489
3530
  /**
3490
3531
  * Backdrop Invert
3491
3532
  * @see https://tailwindcss.com/docs/backdrop-invert
3492
3533
  */
3493
3534
  "backdrop-invert": [{
3494
- "backdrop-invert": ["", x, h, g]
3535
+ "backdrop-invert": ["", A, h, g]
3495
3536
  }],
3496
3537
  /**
3497
3538
  * Backdrop Opacity
3498
3539
  * @see https://tailwindcss.com/docs/backdrop-opacity
3499
3540
  */
3500
3541
  "backdrop-opacity": [{
3501
- "backdrop-opacity": [x, h, g]
3542
+ "backdrop-opacity": [A, h, g]
3502
3543
  }],
3503
3544
  /**
3504
3545
  * Backdrop Saturate
3505
3546
  * @see https://tailwindcss.com/docs/backdrop-saturate
3506
3547
  */
3507
3548
  "backdrop-saturate": [{
3508
- "backdrop-saturate": [x, h, g]
3549
+ "backdrop-saturate": [A, h, g]
3509
3550
  }],
3510
3551
  /**
3511
3552
  * Backdrop Sepia
3512
3553
  * @see https://tailwindcss.com/docs/backdrop-sepia
3513
3554
  */
3514
3555
  "backdrop-sepia": [{
3515
- "backdrop-sepia": ["", x, h, g]
3556
+ "backdrop-sepia": ["", A, h, g]
3516
3557
  }],
3517
3558
  // --------------
3518
3559
  // --- Tables ---
@@ -3581,7 +3622,7 @@ const Rr = (r, e) => {
3581
3622
  * @see https://tailwindcss.com/docs/transition-duration
3582
3623
  */
3583
3624
  duration: [{
3584
- duration: [x, "initial", h, g]
3625
+ duration: [A, "initial", h, g]
3585
3626
  }],
3586
3627
  /**
3587
3628
  * Transition Timing Function
@@ -3595,7 +3636,7 @@ const Rr = (r, e) => {
3595
3636
  * @see https://tailwindcss.com/docs/transition-delay
3596
3637
  */
3597
3638
  delay: [{
3598
- delay: [x, h, g]
3639
+ delay: [A, h, g]
3599
3640
  }],
3600
3641
  /**
3601
3642
  * Animation
@@ -3619,14 +3660,14 @@ const Rr = (r, e) => {
3619
3660
  * @see https://tailwindcss.com/docs/perspective
3620
3661
  */
3621
3662
  perspective: [{
3622
- perspective: [B, h, g]
3663
+ perspective: [D, h, g]
3623
3664
  }],
3624
3665
  /**
3625
3666
  * Perspective Origin
3626
3667
  * @see https://tailwindcss.com/docs/perspective-origin
3627
3668
  */
3628
3669
  "perspective-origin": [{
3629
- "perspective-origin": L()
3670
+ "perspective-origin": _()
3630
3671
  }],
3631
3672
  /**
3632
3673
  * Rotate
@@ -3722,7 +3763,7 @@ const Rr = (r, e) => {
3722
3763
  * @see https://tailwindcss.com/docs/transform-origin
3723
3764
  */
3724
3765
  "transform-origin": [{
3725
- origin: L()
3766
+ origin: _()
3726
3767
  }],
3727
3768
  /**
3728
3769
  * Transform Style
@@ -4039,7 +4080,7 @@ const Rr = (r, e) => {
4039
4080
  * @see https://tailwindcss.com/docs/stroke-width
4040
4081
  */
4041
4082
  "stroke-w": [{
4042
- stroke: [x, ye, se, Ce]
4083
+ stroke: [A, ye, se, Ce]
4043
4084
  }],
4044
4085
  /**
4045
4086
  * Stroke
@@ -4123,7 +4164,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4123
4164
  triggerLabel: e,
4124
4165
  container: t
4125
4166
  }) => {
4126
- const [o, a] = I(!1), [l, i] = I(!1), [b, d] = I(!1), [m, f] = I(!1), [A, R] = I([]), [z, j] = I(""), [B, P] = I(!1), [G, K] = I(!1), [Q, M] = I(null), [, L] = I("user"), [_, q] = I("bottom-right"), [y, D] = I({
4167
+ const [o, a] = I(!1), [l, i] = I(!1), [b, d] = I(!1), [m, f] = I(!1), [x, R] = I([]), [z, j] = I(""), [D, P] = I(!1), [G, K] = I(!1), [Q, M] = I(null), [, _] = I("user"), [L, q] = I("bottom-right"), [y, B] = I({
4127
4168
  isActive: !1,
4128
4169
  toolName: null,
4129
4170
  toolData: null
@@ -4166,7 +4207,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4166
4207
  k !== void 0 && j(k);
4167
4208
  }, []), N = V((u) => {
4168
4209
  const k = u.data;
4169
- D({
4210
+ B({
4170
4211
  isActive: k.isActive,
4171
4212
  toolName: k.toolName,
4172
4213
  toolData: k.toolData
@@ -4175,7 +4216,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4175
4216
  const k = p.current;
4176
4217
  p.current = u, u && w.current ? w.current.getVideoStream() !== null ? (console.log("[AriaStandaloneUI] Attaching video stream to element"), w.current.attachToVideoElement(u)) : console.log("[AriaStandaloneUI] Video element registered, waiting for stream to be ready") : !u && k && w.current && (console.log("[AriaStandaloneUI] Detaching video stream from element"), w.current.detachFromVideoElement(k));
4177
4218
  }, []), X = V((u = "user") => {
4178
- if (L(u), q(u === "websocket" ? "center" : "bottom-right"), a(!0), i(!1), M(null), !w.current) return;
4219
+ if (_(u), q(u === "websocket" ? "center" : "bottom-right"), a(!0), i(!1), M(null), !w.current) return;
4179
4220
  const k = w.current.isSessionPaused();
4180
4221
  if (console.log("[AriaStandaloneUI] openAssistant called, isPaused:", k), k) {
4181
4222
  f(!0), w.current.resumeSession().then((Z) => {
@@ -4222,7 +4263,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4222
4263
  return w.current = u, u.addEventListener("status_change", H), u.addEventListener("session_ready", v), u.addEventListener("session_error", le), u.addEventListener("connection_change", ce), u.addEventListener("message_history", de), u.addEventListener("message_stream", oe), u.addEventListener("tool_call", N), u.setWebSocketTriggerCallback(ie), queueMicrotask(() => {
4223
4264
  O(u.getSessionState()), re(u.getStatus()), d(u.isConnected()), R(u.getChatMessages()), j(u.getLiveTranscript()), K(u.isMuted()), J(u.isSessionPaused());
4224
4265
  const F = u.getToolCallState();
4225
- D(F);
4266
+ B(F);
4226
4267
  }), () => {
4227
4268
  u.removeEventListener("status_change", H), u.removeEventListener("session_ready", v), u.removeEventListener("session_error", le), u.removeEventListener("connection_change", ce), u.removeEventListener("message_history", de), u.removeEventListener("message_stream", oe), u.removeEventListener("tool_call", N), u.setWebSocketTriggerCallback(null);
4228
4269
  };
@@ -4314,12 +4355,12 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4314
4355
  onMinimize: ae,
4315
4356
  onMaximize: C,
4316
4357
  theme: r,
4317
- displayMode: _,
4358
+ displayMode: L,
4318
4359
  isConnected: b,
4319
4360
  isLoading: m,
4320
- chatMessages: A,
4361
+ chatMessages: x,
4321
4362
  liveTranscript: z,
4322
- isChatVisible: B,
4363
+ isChatVisible: D,
4323
4364
  isMuted: G,
4324
4365
  error: Q,
4325
4366
  toolCallState: y,
@@ -4446,31 +4487,31 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4446
4487
  chatMessages: d,
4447
4488
  liveTranscript: m,
4448
4489
  isChatVisible: f,
4449
- isMuted: A,
4490
+ isMuted: x,
4450
4491
  error: R,
4451
4492
  toolCallState: z,
4452
4493
  setVideoElement: j,
4453
- toggleChat: B,
4494
+ toggleChat: D,
4454
4495
  sendMessage: P,
4455
4496
  toggleMute: G,
4456
4497
  refreshSession: K
4457
4498
  }) => {
4458
- const Q = me(null), M = me(null), [L, _] = I(""), [q, y] = I(!1), D = me(null), s = a === "dark", O = l === "bottom-right", Y = l === "center";
4499
+ const Q = me(null), M = me(null), [_, L] = I(""), [q, y] = I(!1), B = me(null), s = a === "dark", O = l === "bottom-right", Y = l === "center";
4459
4500
  ee(() => {
4460
4501
  M.current && (M.current.scrollTop = M.current.scrollHeight);
4461
4502
  }, [m]), ee(() => (Q.current && (console.log("[AriaWidgetStandalone] Registering video element, minimized:", e), j(Q.current)), () => {
4462
4503
  j(null);
4463
4504
  }), [j, e]), ee(() => {
4464
- D.current?.scrollIntoView({ behavior: "smooth" });
4505
+ B.current?.scrollIntoView({ behavior: "smooth" });
4465
4506
  }, [d]);
4466
4507
  const re = async () => {
4467
- if (!L.trim() || !i || q) return;
4468
- const p = L.trim();
4469
- _(""), y(!0);
4508
+ if (!_.trim() || !i || q) return;
4509
+ const p = _.trim();
4510
+ L(""), y(!0);
4470
4511
  try {
4471
4512
  await P(p);
4472
4513
  } catch (H) {
4473
- console.error("Failed to send message:", H), _(p);
4514
+ console.error("Failed to send message:", H), L(p);
4474
4515
  } finally {
4475
4516
  y(!1);
4476
4517
  }
@@ -4553,10 +4594,10 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4553
4594
  className: c(
4554
4595
  "w-8 h-8 rounded-full flex items-center justify-center transition-all duration-200",
4555
4596
  "border-0 outline-none focus:outline-none shadow-sm",
4556
- A ? "bg-red-500 hover:bg-red-600 text-white" : s ? "bg-gray-800/80 hover:bg-gray-700 text-gray-300" : "bg-gray-100/80 hover:bg-gray-200 text-gray-600"
4597
+ x ? "bg-red-500 hover:bg-red-600 text-white" : s ? "bg-gray-800/80 hover:bg-gray-700 text-gray-300" : "bg-gray-100/80 hover:bg-gray-200 text-gray-600"
4557
4598
  ),
4558
- title: A ? "Unmute" : "Mute",
4559
- children: A ? /* @__PURE__ */ n(je, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(Be, { className: "h-3.5 w-3.5" })
4599
+ title: x ? "Unmute" : "Mute",
4600
+ children: x ? /* @__PURE__ */ n(je, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(De, { className: "h-3.5 w-3.5" })
4560
4601
  }
4561
4602
  ),
4562
4603
  /* @__PURE__ */ n(
@@ -4578,7 +4619,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4578
4619
  onClick: r,
4579
4620
  className: "w-8 h-8 rounded-full bg-red-500 hover:bg-red-600 flex items-center justify-center transition-all duration-200 text-white border-0 outline-none focus:outline-none shadow-sm",
4580
4621
  title: "End Call",
4581
- children: /* @__PURE__ */ n(De, { className: "h-3.5 w-3.5 rotate-[135deg]" })
4622
+ children: /* @__PURE__ */ n(Be, { className: "h-3.5 w-3.5 rotate-[135deg]" })
4582
4623
  }
4583
4624
  )
4584
4625
  ]
@@ -4862,7 +4903,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4862
4903
  /* @__PURE__ */ n(
4863
4904
  "button",
4864
4905
  {
4865
- onClick: B,
4906
+ onClick: D,
4866
4907
  className: c(
4867
4908
  "w-9 h-9 rounded-full flex items-center justify-center transition-all duration-200",
4868
4909
  "border-0 outline-none focus:outline-none shadow-sm",
@@ -4879,10 +4920,10 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4879
4920
  className: c(
4880
4921
  "w-9 h-9 rounded-full flex items-center justify-center transition-all duration-200",
4881
4922
  "border-0 outline-none focus:outline-none shadow-sm",
4882
- A ? "bg-red-500 hover:bg-red-600 text-white" : s ? "bg-gray-800/80 hover:bg-gray-700 text-gray-300" : "bg-gray-100/80 hover:bg-gray-200 text-gray-600"
4923
+ x ? "bg-red-500 hover:bg-red-600 text-white" : s ? "bg-gray-800/80 hover:bg-gray-700 text-gray-300" : "bg-gray-100/80 hover:bg-gray-200 text-gray-600"
4883
4924
  ),
4884
- title: A ? "Unmute" : "Mute",
4885
- children: A ? /* @__PURE__ */ n(je, { className: "h-4 w-4" }) : /* @__PURE__ */ n(Be, { className: "h-4 w-4" })
4925
+ title: x ? "Unmute" : "Mute",
4926
+ children: x ? /* @__PURE__ */ n(je, { className: "h-4 w-4" }) : /* @__PURE__ */ n(De, { className: "h-4 w-4" })
4886
4927
  }
4887
4928
  ),
4888
4929
  /* @__PURE__ */ n(
@@ -4904,7 +4945,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4904
4945
  onClick: r,
4905
4946
  className: "w-10 h-9 rounded-full bg-red-500 hover:bg-red-600 flex items-center justify-center transition-all duration-200 text-white border-0 outline-none focus:outline-none shadow-sm",
4906
4947
  title: "End Call",
4907
- children: /* @__PURE__ */ n(De, { className: "h-4 w-4 rotate-[135deg]" })
4948
+ children: /* @__PURE__ */ n(Be, { className: "h-4 w-4 rotate-[135deg]" })
4908
4949
  }
4909
4950
  )
4910
4951
  ]
@@ -5003,7 +5044,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
5003
5044
  },
5004
5045
  H
5005
5046
  )),
5006
- /* @__PURE__ */ n("div", { ref: D })
5047
+ /* @__PURE__ */ n("div", { ref: B })
5007
5048
  ] }),
5008
5049
  /* @__PURE__ */ n("div", { className: c(
5009
5050
  "p-3 border-t",
@@ -5015,8 +5056,8 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
5015
5056
  /* @__PURE__ */ n(
5016
5057
  "input",
5017
5058
  {
5018
- value: L,
5019
- onChange: (p) => _(p.target.value),
5059
+ value: _,
5060
+ onChange: (p) => L(p.target.value),
5020
5061
  onKeyDown: J,
5021
5062
  placeholder: i ? "Message Aria..." : "Connecting...",
5022
5063
  disabled: !i || q,
@@ -5030,7 +5071,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
5030
5071
  "button",
5031
5072
  {
5032
5073
  onClick: re,
5033
- disabled: !i || !L.trim() || q,
5074
+ disabled: !i || !_.trim() || q,
5034
5075
  className: c(
5035
5076
  "h-7 w-7 rounded-md shrink-0 transition-all duration-200 flex items-center justify-center",
5036
5077
  "bg-indigo-500 hover:bg-indigo-600 disabled:opacity-40 text-white"