@centive/aria-sdk 0.8.8 → 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
- import { jsx as n, jsxs as E, Fragment as Ve } from "react/jsx-runtime";
2
- import { useRef as me, useState as I, useEffect as ee, useCallback as H } from "react";
3
- import { Sparkles as Ne, Wrench as He, MicOff as je, Mic as De, Maximize2 as dr, Phone as We, X as Be, RefreshCw as Oe, MessageCircle as Fe, Minimize2 as gr, User as hr, Bot as ur, Send as pr } from "lucide-react";
1
+ import { jsx as n, jsxs as E, Fragment as He } from "react/jsx-runtime";
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 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);
@@ -17,10 +17,10 @@ function vr(r) {
17
17
  function yr(r) {
18
18
  return typeof r == "object" && r !== null && "type" in r && r.type === "session_end_error" && "status" in r && r.status === "error";
19
19
  }
20
- function Ar(r) {
20
+ function xr(r) {
21
21
  return typeof r == "object" && r !== null && "type" in r && r.type === "trigger_event";
22
22
  }
23
- function xr(r) {
23
+ function Ar(r) {
24
24
  return typeof r == "object" && r !== null && "status" in r && r.status === "ok" && "message" in r && !("type" in r);
25
25
  }
26
26
  function kr(r) {
@@ -320,11 +320,11 @@ class U {
320
320
  console.error(`[AriaSessionManager] Missing fields error: ${t.message}`), this.config.onError?.(new Error(t.message));
321
321
  return;
322
322
  }
323
- if (Ar(t)) {
323
+ if (xr(t)) {
324
324
  console.log("[AriaSessionManager] WebSocket trigger event received:", t.data), this.config.onWebSocketEvent?.(t), this.onWebSocketTrigger?.(t);
325
325
  return;
326
326
  }
327
- if (xr(t)) {
327
+ if (Ar(t)) {
328
328
  console.log(`[AriaSessionManager] Generic acknowledgment: ${t.message}`);
329
329
  return;
330
330
  }
@@ -525,6 +525,10 @@ 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
+ 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
+ }
528
532
  this.chatMessages = m.map((x) => ({
529
533
  role: x.role,
530
534
  content: x.content,
@@ -537,6 +541,10 @@ class U {
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
  }
@@ -794,11 +836,11 @@ class U {
794
836
  // ============================================================================
795
837
  /**
796
838
  * Check if session persistence is enabled
797
- * Always returns TRUE - sessions always persist when widget closes
798
- * Session only ends on logout (forceEndSession) or component unmount
839
+ * Returns FALSE - sessions are ended when widget closes to save Anam resources
840
+ * A new session with skip_greeting is created when widget reopens
799
841
  */
800
842
  isPersistSessionEnabled() {
801
- return !0;
843
+ return !1;
802
844
  }
803
845
  /**
804
846
  * Check if WebSocket should stay alive when paused
@@ -807,78 +849,49 @@ class U {
807
849
  return this.config.keepWebSocketAlive !== !1;
808
850
  }
809
851
  /**
810
- * Check if session is currently paused
852
+ * Check if widget is closed (session was ended on close)
853
+ * Note: With the new behavior, sessions are ended when widget closes,
854
+ * not paused. This returns true if the widget was closed.
811
855
  */
812
856
  isSessionPaused() {
813
- return this.isPaused;
857
+ return !this.anamClient && this.hasHadSessionBefore;
814
858
  }
815
859
  /**
816
- * Pause the session (called when widget closes)
817
- * - Does NOT end the session - keeps Anam client and video stream alive
818
- * - Optionally disconnects WebSocket (based on keepWebSocketAlive)
819
- * - Keeps session token and state in memory
820
- * - Session can be resumed when widget reopens
860
+ * Pause the session (called when widget closes / user hangs up)
861
+ *
862
+ * NEW BEHAVIOR: Ends the Anam session to save resources.
863
+ * When widget reopens, a new session is created with skip_greeting: true
864
+ * so the greeting doesn't play again.
865
+ *
866
+ * This is more resource-efficient than keeping the session alive.
821
867
  */
822
- pauseSession() {
823
- if (this.isPaused) {
824
- console.log("[AriaSessionManager] Session already paused");
825
- return;
826
- }
868
+ async pauseSession() {
827
869
  if (!this.anamClient) {
828
- console.log("[AriaSessionManager] No active Anam client, nothing to pause");
870
+ console.log("[AriaSessionManager] No active Anam client, nothing to pause/end");
829
871
  return;
830
872
  }
831
- console.log("[AriaSessionManager] Pausing session - keeping Anam client alive"), this.isPaused = !0, this.hiddenVideoElement && (this.hiddenVideoElement.muted = !0), this.hiddenAudioElement && (this.hiddenAudioElement.muted = !0, console.log("[AriaSessionManager] Audio element muted (session paused)")), this.shouldKeepWebSocketAlive() || (console.log("[AriaSessionManager] Disconnecting WebSocket (keepWebSocketAlive: false)"), this.ws && (this.ws.close(), this.ws = null)), this.config.onSessionPaused?.();
873
+ console.log("[AriaSessionManager] Widget closed - ending Anam session (will skip greeting on reopen)"), await this.endCurrentSession(), this.config.onSessionPaused?.();
832
874
  }
833
875
  /**
834
876
  * Resume the session (called when widget reopens)
835
- * - Reconnects WebSocket if needed
836
- * - Reuses existing Anam client and video stream
837
- * - Does NOT create a new session
838
- * @returns true if session was successfully resumed, false if a new session is needed
877
+ *
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.
880
+ *
881
+ * @returns true if session is ready or initialization started, false if waiting for token
839
882
  */
840
883
  async resumeSession() {
841
- if (!this.isPaused)
842
- return console.log("[AriaSessionManager] Session not paused, nothing to resume"), !1;
843
- if (console.log("[AriaSessionManager] Resuming session"), this.isPaused = !1, !this.anamClient)
844
- return console.log("[AriaSessionManager] No Anam client, cannot resume - will create new session"), !1;
845
- if (this.sessionState.expires_at) {
846
- const a = new Date(this.sessionState.expires_at).getTime();
847
- if (Date.now() >= a)
848
- return console.log("[AriaSessionManager] Session expired, will create new session"), await this.stopStreaming(), this.resetSessionState(), !1;
849
- }
850
- if (!this.videoStream)
851
- return console.log("[AriaSessionManager] No video stream available, will create new session"), await this.stopStreaming(), this.resetSessionState(), !1;
852
- const e = this.videoStream.getTracks(), t = e.filter((a) => a.kind === "video"), o = t.filter((a) => a.readyState === "live");
853
- return console.log("[AriaSessionManager] Video stream tracks:", e.length, "video:", t.length, "active:", o.length), o.length === 0 ? (console.log("[AriaSessionManager] No active video tracks, Anam connection is dead - will create new session"), await this.stopStreaming(), this.resetSessionState(), !1) : (this.hiddenAudioElement && (this.hiddenAudioElement.muted = !1, this.hiddenAudioElement.play().catch((a) => {
854
- console.warn("[AriaSessionManager] Audio play failed on resume:", a);
855
- }), console.log("[AriaSessionManager] Audio element unmuted (session resumed)")), this.isConnected() || (console.log("[AriaSessionManager] Reconnecting WebSocket for resumed session"), this.reconnectForResume()), this.setStatus("ready"), this.config.onSessionResumed?.(), !0);
856
- }
857
- /**
858
- * Reconnect WebSocket for session resume (without triggering new session)
859
- */
860
- reconnectForResume() {
861
- if (this.ws?.readyState === WebSocket.OPEN) {
862
- console.log("[AriaSessionManager] WebSocket already connected");
863
- return;
864
- }
865
- if (this.ws?.readyState === WebSocket.CONNECTING) {
866
- console.log("[AriaSessionManager] WebSocket already connecting");
867
- return;
868
- }
869
- this.setStatus("connecting");
870
- try {
871
- this.ws = new WebSocket(this.config.websocketUrl), this.ws.onopen = () => {
872
- console.log("[AriaSessionManager] WebSocket reconnected for resumed session"), this.setStatus("ready"), this.retryCount = 0, this.emit({ type: "connection_change", data: { connected: !0 } }), this.config.onConnectionStateChange?.(!0), console.log("[AriaSessionManager] Session resumed with existing token");
873
- }, this.ws.onmessage = (e) => this.handleWebSocketMessage(e), this.ws.onerror = (e) => {
874
- console.error("[AriaSessionManager] WebSocket error during resume:", e), this.setStatus("error"), this.updateSessionState({ lastError: "WebSocket connection error" }), this.config.onError?.(new Error("WebSocket connection failed"));
875
- }, this.ws.onclose = () => {
876
- console.log("[AriaSessionManager] WebSocket disconnected"), this.emit({ type: "connection_change", data: { connected: !1 } }), this.config.onConnectionStateChange?.(!1), !this.sessionState.isRefreshing && !this.isPaused && this.setStatus("idle");
877
- };
878
- } catch (e) {
879
- const t = e instanceof Error ? e.message : "Failed to reconnect WebSocket";
880
- console.error("[AriaSessionManager] Reconnection error:", t), this.setStatus("error"), this.updateSessionState({ lastError: t }), this.config.onError?.(e instanceof Error ? e : new Error(t));
884
+ if (console.log("[AriaSessionManager] Widget reopened - will create new session with skip_greeting"), this.anamClient && this.videoStream)
885
+ return console.log("[AriaSessionManager] Active session exists, no need to create new one"), this.setStatus("ready"), this.config.onSessionResumed?.(), !0;
886
+ if (this.sessionState.token && !this.isTokenExpired()) {
887
+ console.log("[AriaSessionManager] Session token ready, initializing Anam client (skip_greeting applied)");
888
+ try {
889
+ return await this.initializeAnamClient(this.sessionState.token), this.config.onSessionResumed?.(), !0;
890
+ } catch (e) {
891
+ console.error("[AriaSessionManager] Failed to initialize session on resume:", e), this.updateSessionState({ token: null, isSessionReady: !1 });
892
+ }
881
893
  }
894
+ return this.isConnected() ? (console.log("[AriaSessionManager] Requesting new session token for resume"), this.requestSessionToken()) : (console.log("[AriaSessionManager] WebSocket not connected, reconnecting..."), this.connect()), !1;
882
895
  }
883
896
  /**
884
897
  * Reset session state (used when session expires or needs to be recreated)
@@ -1007,7 +1020,7 @@ class U {
1007
1020
  lastError: null,
1008
1021
  isPreloaded: !1,
1009
1022
  isRefreshing: !1
1010
- }), 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");
1011
1024
  }
1012
1025
  // ============================================================================
1013
1026
  // Cleanup
@@ -1041,7 +1054,7 @@ const S = {
1041
1054
  uiContainer: null,
1042
1055
  reactRoot: null
1043
1056
  };
1044
- class Ae {
1057
+ class xe {
1045
1058
  /**
1046
1059
  * Initialize the Aria SDK with the given configuration.
1047
1060
  * This sets up the WebSocket connection, session management, and UI components.
@@ -1070,8 +1083,8 @@ class Ae {
1070
1083
  if (!e.userId)
1071
1084
  throw new Error("[AriaCore] userId is required");
1072
1085
  console.log("[AriaCore] Initializing Aria SDK..."), S.config = e;
1073
- const t = Ae.buildFullConfig(e);
1074
- S.sessionManager = U.getInstance(t), S.sessionManager.connect(), Ae.mountUI(e.theme || "light", e.triggerLabel), S.initialized = !0, console.log("[AriaCore] Aria SDK initialized successfully");
1086
+ const t = xe.buildFullConfig(e);
1087
+ S.sessionManager = U.getInstance(t), S.sessionManager.connect(), xe.mountUI(e.theme || "light", e.triggerLabel), S.initialized = !0, console.log("[AriaCore] Aria SDK initialized successfully");
1075
1088
  }
1076
1089
  /**
1077
1090
  * Open the Aria assistant widget.
@@ -1202,7 +1215,7 @@ class Ae {
1202
1215
  console.log("[AriaCore] Not initialized, nothing to destroy.");
1203
1216
  return;
1204
1217
  }
1205
- console.log("[AriaCore] Destroying Aria SDK..."), Ae.unmountUI(), U.destroyInstance(), S.initialized = !1, S.config = null, S.sessionManager = null, S.uiContainer = null, S.reactRoot = null, console.log("[AriaCore] Aria SDK destroyed");
1218
+ console.log("[AriaCore] Destroying Aria SDK..."), xe.unmountUI(), U.destroyInstance(), S.initialized = !1, S.config = null, S.sessionManager = null, S.uiContainer = null, S.reactRoot = null, console.log("[AriaCore] Aria SDK destroyed");
1206
1219
  }
1207
1220
  // ============================================================================
1208
1221
  // Private Methods
@@ -1250,7 +1263,7 @@ class Ae {
1250
1263
  */
1251
1264
  static mountUI(e, t) {
1252
1265
  const o = document.createElement("div");
1253
- o.id = "aria-sdk-root", o.setAttribute("data-aria-theme", e), o.setAttribute("data-aria-open", "false"), document.body.appendChild(o), S.uiContainer = o, Ae.renderReactUI(o, e, t);
1266
+ o.id = "aria-sdk-root", o.setAttribute("data-aria-theme", e), o.setAttribute("data-aria-open", "false"), document.body.appendChild(o), S.uiContainer = o, xe.renderReactUI(o, e, t);
1254
1267
  }
1255
1268
  /**
1256
1269
  * Render React UI components
@@ -1387,21 +1400,21 @@ function Cr() {
1387
1400
  for (var r, e, t = 0, o = "", a = arguments.length; t < a; t++) (r = arguments[t]) && (e = Xe(r)) && (o && (o += " "), o += e);
1388
1401
  return o;
1389
1402
  }
1390
- const Nr = (r, e) => {
1403
+ const Rr = (r, e) => {
1391
1404
  const t = new Array(r.length + e.length);
1392
1405
  for (let o = 0; o < r.length; o++)
1393
1406
  t[o] = r[o];
1394
1407
  for (let o = 0; o < e.length; o++)
1395
1408
  t[r.length + o] = e[o];
1396
1409
  return t;
1397
- }, Rr = (r, e) => ({
1410
+ }, Nr = (r, e) => ({
1398
1411
  classGroupId: r,
1399
1412
  validator: e
1400
1413
  }), Ze = (r = /* @__PURE__ */ new Map(), e = null, t) => ({
1401
1414
  nextPart: r,
1402
1415
  validators: e,
1403
1416
  classGroupId: t
1404
- }), Ee = "-", Le = [], Tr = "arbitrary..", Ir = (r) => {
1417
+ }), Ee = "-", _e = [], Tr = "arbitrary..", Ir = (r) => {
1405
1418
  const e = Pr(r), {
1406
1419
  conflictingClassGroups: t,
1407
1420
  conflictingClassGroupModifiers: o
@@ -1416,9 +1429,9 @@ const Nr = (r, e) => {
1416
1429
  getConflictingClassGroupIds: (i, b) => {
1417
1430
  if (b) {
1418
1431
  const d = o[i], m = t[i];
1419
- return d ? m ? Nr(m, d) : d : m || Le;
1432
+ return d ? m ? Rr(m, d) : d : m || _e;
1420
1433
  }
1421
- return t[i] || Le;
1434
+ return t[i] || _e;
1422
1435
  }
1423
1436
  };
1424
1437
  }, Ye = (r, e, t) => {
@@ -1446,8 +1459,8 @@ const Nr = (r, e) => {
1446
1459
  theme: e,
1447
1460
  classGroups: t
1448
1461
  } = r;
1449
- return Vr(t, e);
1450
- }, Vr = (r, e) => {
1462
+ return Hr(t, e);
1463
+ }, Hr = (r, e) => {
1451
1464
  const t = Ze();
1452
1465
  for (const o in r) {
1453
1466
  const a = r[o];
@@ -1458,9 +1471,9 @@ const Nr = (r, e) => {
1458
1471
  const a = r.length;
1459
1472
  for (let l = 0; l < a; l++) {
1460
1473
  const i = r[l];
1461
- Hr(i, e, t, o);
1474
+ Vr(i, e, t, o);
1462
1475
  }
1463
- }, Hr = (r, e, t, o) => {
1476
+ }, Vr = (r, e, t, o) => {
1464
1477
  if (typeof r == "string") {
1465
1478
  jr(r, e, t);
1466
1479
  return;
@@ -1469,17 +1482,17 @@ const Nr = (r, e) => {
1469
1482
  Dr(r, e, t, o);
1470
1483
  return;
1471
1484
  }
1472
- Wr(r, e, t, o);
1485
+ Br(r, e, t, o);
1473
1486
  }, jr = (r, e, t) => {
1474
1487
  const o = r === "" ? e : $e(e, r);
1475
1488
  o.classGroupId = t;
1476
1489
  }, Dr = (r, e, t, o) => {
1477
- if (Br(r)) {
1490
+ if (Or(r)) {
1478
1491
  ze(r(o), e, t, o);
1479
1492
  return;
1480
1493
  }
1481
- e.validators === null && (e.validators = []), e.validators.push(Rr(t, r));
1482
- }, Wr = (r, e, t, o) => {
1494
+ e.validators === null && (e.validators = []), e.validators.push(Nr(t, r));
1495
+ }, Br = (r, e, t, o) => {
1483
1496
  const a = Object.entries(r), l = a.length;
1484
1497
  for (let i = 0; i < l; i++) {
1485
1498
  const [b, d] = a[i];
@@ -1494,7 +1507,7 @@ const Nr = (r, e) => {
1494
1507
  b || (b = Ze(), t.nextPart.set(i, b)), t = b;
1495
1508
  }
1496
1509
  return t;
1497
- }, Br = (r) => "isThemeGetter" in r && r.isThemeGetter === !0, Or = (r) => {
1510
+ }, Or = (r) => "isThemeGetter" in r && r.isThemeGetter === !0, Wr = (r) => {
1498
1511
  if (r < 1)
1499
1512
  return {
1500
1513
  get: () => {
@@ -1518,7 +1531,7 @@ const Nr = (r, e) => {
1518
1531
  l in t ? t[l] = i : a(l, i);
1519
1532
  }
1520
1533
  };
1521
- }, Re = "!", _e = ":", Fr = [], Ge = (r, e, t, o, a) => ({
1534
+ }, Ne = "!", Le = ":", Fr = [], Ge = (r, e, t, o, a) => ({
1522
1535
  modifiers: r,
1523
1536
  hasImportantModifier: e,
1524
1537
  baseClassName: t,
@@ -1536,7 +1549,7 @@ const Nr = (r, e) => {
1536
1549
  for (let D = 0; D < f; D++) {
1537
1550
  const P = a[D];
1538
1551
  if (i === 0 && b === 0) {
1539
- if (P === _e) {
1552
+ if (P === Le) {
1540
1553
  l.push(a.slice(d, D)), d = D + 1;
1541
1554
  continue;
1542
1555
  }
@@ -1548,19 +1561,19 @@ const Nr = (r, e) => {
1548
1561
  P === "[" ? i++ : P === "]" ? i-- : P === "(" ? b++ : P === ")" && b--;
1549
1562
  }
1550
1563
  const x = l.length === 0 ? a : a.slice(d);
1551
- let N = x, z = !1;
1552
- x.endsWith(Re) ? (N = x.slice(0, -1), z = !0) : (
1564
+ let R = x, z = !1;
1565
+ x.endsWith(Ne) ? (R = x.slice(0, -1), z = !0) : (
1553
1566
  /**
1554
1567
  * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
1555
1568
  * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
1556
1569
  */
1557
- x.startsWith(Re) && (N = x.slice(1), z = !0)
1570
+ x.startsWith(Ne) && (R = x.slice(1), z = !0)
1558
1571
  );
1559
1572
  const j = m && m > d ? m - d : void 0;
1560
- return Ge(l, z, N, j);
1573
+ return Ge(l, z, R, j);
1561
1574
  };
1562
1575
  if (e) {
1563
- const a = e + _e, l = o;
1576
+ const a = e + Le, l = o;
1564
1577
  o = (i) => i.startsWith(a) ? l(i.slice(a.length)) : Ge(Fr, !1, i, void 0, !0);
1565
1578
  }
1566
1579
  if (t) {
@@ -1571,7 +1584,7 @@ const Nr = (r, e) => {
1571
1584
  });
1572
1585
  }
1573
1586
  return o;
1574
- }, Lr = (r) => {
1587
+ }, _r = (r) => {
1575
1588
  const e = /* @__PURE__ */ new Map();
1576
1589
  return r.orderSensitiveModifiers.forEach((t, o) => {
1577
1590
  e.set(t, 1e6 + o);
@@ -1584,10 +1597,10 @@ const Nr = (r, e) => {
1584
1597
  }
1585
1598
  return a.length > 0 && (a.sort(), o.push(...a)), o;
1586
1599
  };
1587
- }, _r = (r) => ({
1588
- cache: Or(r.cacheSize),
1600
+ }, Lr = (r) => ({
1601
+ cache: Wr(r.cacheSize),
1589
1602
  parseClassName: Ur(r),
1590
- sortModifiers: Lr(r),
1603
+ sortModifiers: _r(r),
1591
1604
  ...Ir(r)
1592
1605
  }), Gr = /\s+/, Qr = (r, e) => {
1593
1606
  const {
@@ -1600,7 +1613,7 @@ const Nr = (r, e) => {
1600
1613
  for (let m = b.length - 1; m >= 0; m -= 1) {
1601
1614
  const f = b[m], {
1602
1615
  isExternal: x,
1603
- modifiers: N,
1616
+ modifiers: R,
1604
1617
  hasImportantModifier: z,
1605
1618
  baseClassName: j,
1606
1619
  maybePostfixModifierPosition: D
@@ -1621,13 +1634,13 @@ const Nr = (r, e) => {
1621
1634
  }
1622
1635
  P = !1;
1623
1636
  }
1624
- const K = N.length === 0 ? "" : N.length === 1 ? N[0] : l(N).join(":"), Q = z ? K + Re : K, M = Q + G;
1637
+ const K = R.length === 0 ? "" : R.length === 1 ? R[0] : l(R).join(":"), Q = z ? K + Ne : K, M = Q + G;
1625
1638
  if (i.indexOf(M) > -1)
1626
1639
  continue;
1627
1640
  i.push(M);
1628
- const L = a(G, P);
1629
- for (let _ = 0; _ < L.length; ++_) {
1630
- const q = L[_];
1641
+ const _ = a(G, P);
1642
+ for (let L = 0; L < _.length; ++L) {
1643
+ const q = _[L];
1631
1644
  i.push(Q + q);
1632
1645
  }
1633
1646
  d = f + (d.length > 0 ? " " + d : d);
@@ -1649,7 +1662,7 @@ const Nr = (r, e) => {
1649
1662
  let t, o, a, l;
1650
1663
  const i = (d) => {
1651
1664
  const m = e.reduce((f, x) => x(f), r());
1652
- return t = _r(m), o = t.cache.get, a = t.cache.set, l = b, b(d);
1665
+ return t = Lr(m), o = t.cache.get, a = t.cache.set, l = b, b(d);
1653
1666
  }, b = (d) => {
1654
1667
  const m = o(d);
1655
1668
  if (m)
@@ -1673,7 +1686,7 @@ const Nr = (r, e) => {
1673
1686
  const o = tr.exec(r);
1674
1687
  return o ? o[1] ? e(o[1]) : t : !1;
1675
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 = () => {
1676
- 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"), N = 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 = () => [
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 = () => [
1677
1690
  "center",
1678
1691
  "top",
1679
1692
  "bottom",
@@ -1691,15 +1704,15 @@ const Nr = (r, e) => {
1691
1704
  "bottom-left",
1692
1705
  // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
1693
1706
  "left-bottom"
1694
- ], L = () => [...M(), h, g], _ = () => ["auto", "hidden", "clip", "visible", "scroll"], q = () => ["auto", "contain", "none"], y = () => [h, g, d], W = () => [pe, "full", "auto", ...y()], s = () => [te, "none", "subgrid", h, g], B = () => ["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", {
1695
1708
  span: ["full", te, h, g]
1696
- }, 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()], V = () => [pe, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...y()], v = () => [r, h, g], le = () => [...M(), qe, Qe, {
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, {
1697
1710
  position: [h, g]
1698
1711
  }], ce = () => ["no-repeat", {
1699
1712
  repeat: ["", "x", "y", "space", "round"]
1700
1713
  }], de = () => ["auto", "cover", "contain", dt, st, {
1701
1714
  size: [h, g]
1702
- }], oe = () => [Me, ye, se], R = () => [
1715
+ }], oe = () => [Me, ye, se], N = () => [
1703
1716
  // Deprecated since Tailwind CSS v4.0.0
1704
1717
  "",
1705
1718
  "none",
@@ -1707,7 +1720,7 @@ const Nr = (r, e) => {
1707
1720
  m,
1708
1721
  h,
1709
1722
  g
1710
- ], O = () => ["", 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 = () => [
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 = () => [
1711
1724
  // Deprecated since Tailwind CSS v4.0.0
1712
1725
  "",
1713
1726
  "none",
@@ -1838,28 +1851,28 @@ const Nr = (r, e) => {
1838
1851
  * @see https://tailwindcss.com/docs/object-position
1839
1852
  */
1840
1853
  "object-position": [{
1841
- object: L()
1854
+ object: _()
1842
1855
  }],
1843
1856
  /**
1844
1857
  * Overflow
1845
1858
  * @see https://tailwindcss.com/docs/overflow
1846
1859
  */
1847
1860
  overflow: [{
1848
- overflow: _()
1861
+ overflow: L()
1849
1862
  }],
1850
1863
  /**
1851
1864
  * Overflow X
1852
1865
  * @see https://tailwindcss.com/docs/overflow
1853
1866
  */
1854
1867
  "overflow-x": [{
1855
- "overflow-x": _()
1868
+ "overflow-x": L()
1856
1869
  }],
1857
1870
  /**
1858
1871
  * Overflow Y
1859
1872
  * @see https://tailwindcss.com/docs/overflow
1860
1873
  */
1861
1874
  "overflow-y": [{
1862
- "overflow-y": _()
1875
+ "overflow-y": L()
1863
1876
  }],
1864
1877
  /**
1865
1878
  * Overscroll Behavior
@@ -1892,63 +1905,63 @@ const Nr = (r, e) => {
1892
1905
  * @see https://tailwindcss.com/docs/top-right-bottom-left
1893
1906
  */
1894
1907
  inset: [{
1895
- inset: W()
1908
+ inset: B()
1896
1909
  }],
1897
1910
  /**
1898
1911
  * Right / Left
1899
1912
  * @see https://tailwindcss.com/docs/top-right-bottom-left
1900
1913
  */
1901
1914
  "inset-x": [{
1902
- "inset-x": W()
1915
+ "inset-x": B()
1903
1916
  }],
1904
1917
  /**
1905
1918
  * Top / Bottom
1906
1919
  * @see https://tailwindcss.com/docs/top-right-bottom-left
1907
1920
  */
1908
1921
  "inset-y": [{
1909
- "inset-y": W()
1922
+ "inset-y": B()
1910
1923
  }],
1911
1924
  /**
1912
1925
  * Start
1913
1926
  * @see https://tailwindcss.com/docs/top-right-bottom-left
1914
1927
  */
1915
1928
  start: [{
1916
- start: W()
1929
+ start: B()
1917
1930
  }],
1918
1931
  /**
1919
1932
  * End
1920
1933
  * @see https://tailwindcss.com/docs/top-right-bottom-left
1921
1934
  */
1922
1935
  end: [{
1923
- end: W()
1936
+ end: B()
1924
1937
  }],
1925
1938
  /**
1926
1939
  * Top
1927
1940
  * @see https://tailwindcss.com/docs/top-right-bottom-left
1928
1941
  */
1929
1942
  top: [{
1930
- top: W()
1943
+ top: B()
1931
1944
  }],
1932
1945
  /**
1933
1946
  * Right
1934
1947
  * @see https://tailwindcss.com/docs/top-right-bottom-left
1935
1948
  */
1936
1949
  right: [{
1937
- right: W()
1950
+ right: B()
1938
1951
  }],
1939
1952
  /**
1940
1953
  * Bottom
1941
1954
  * @see https://tailwindcss.com/docs/top-right-bottom-left
1942
1955
  */
1943
1956
  bottom: [{
1944
- bottom: W()
1957
+ bottom: B()
1945
1958
  }],
1946
1959
  /**
1947
1960
  * Left
1948
1961
  * @see https://tailwindcss.com/docs/top-right-bottom-left
1949
1962
  */
1950
1963
  left: [{
1951
- left: W()
1964
+ left: B()
1952
1965
  }],
1953
1966
  /**
1954
1967
  * Visibility
@@ -2026,7 +2039,7 @@ const Nr = (r, e) => {
2026
2039
  * @see https://tailwindcss.com/docs/grid-column
2027
2040
  */
2028
2041
  "col-start-end": [{
2029
- col: B()
2042
+ col: O()
2030
2043
  }],
2031
2044
  /**
2032
2045
  * Grid Column Start
@@ -2054,7 +2067,7 @@ const Nr = (r, e) => {
2054
2067
  * @see https://tailwindcss.com/docs/grid-row
2055
2068
  */
2056
2069
  "row-start-end": [{
2057
- row: B()
2070
+ row: O()
2058
2071
  }],
2059
2072
  /**
2060
2073
  * Grid Row Start
@@ -2338,14 +2351,14 @@ const Nr = (r, e) => {
2338
2351
  * @see https://tailwindcss.com/docs/width#setting-both-width-and-height
2339
2352
  */
2340
2353
  size: [{
2341
- size: V()
2354
+ size: H()
2342
2355
  }],
2343
2356
  /**
2344
2357
  * Width
2345
2358
  * @see https://tailwindcss.com/docs/width
2346
2359
  */
2347
2360
  w: [{
2348
- w: [b, "screen", ...V()]
2361
+ w: [b, "screen", ...H()]
2349
2362
  }],
2350
2363
  /**
2351
2364
  * Min-Width
@@ -2357,7 +2370,7 @@ const Nr = (r, e) => {
2357
2370
  "screen",
2358
2371
  /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
2359
2372
  "none",
2360
- ...V()
2373
+ ...H()
2361
2374
  ]
2362
2375
  }],
2363
2376
  /**
@@ -2375,7 +2388,7 @@ const Nr = (r, e) => {
2375
2388
  {
2376
2389
  screen: [i]
2377
2390
  },
2378
- ...V()
2391
+ ...H()
2379
2392
  ]
2380
2393
  }],
2381
2394
  /**
@@ -2383,21 +2396,21 @@ const Nr = (r, e) => {
2383
2396
  * @see https://tailwindcss.com/docs/height
2384
2397
  */
2385
2398
  h: [{
2386
- h: ["screen", "lh", ...V()]
2399
+ h: ["screen", "lh", ...H()]
2387
2400
  }],
2388
2401
  /**
2389
2402
  * Min-Height
2390
2403
  * @see https://tailwindcss.com/docs/min-height
2391
2404
  */
2392
2405
  "min-h": [{
2393
- "min-h": ["screen", "lh", "none", ...V()]
2406
+ "min-h": ["screen", "lh", "none", ...H()]
2394
2407
  }],
2395
2408
  /**
2396
2409
  * Max-Height
2397
2410
  * @see https://tailwindcss.com/docs/max-height
2398
2411
  */
2399
2412
  "max-h": [{
2400
- "max-h": ["screen", "lh", ...V()]
2413
+ "max-h": ["screen", "lh", ...H()]
2401
2414
  }],
2402
2415
  // ------------------
2403
2416
  // --- Typography ---
@@ -2752,175 +2765,175 @@ const Nr = (r, e) => {
2752
2765
  * @see https://tailwindcss.com/docs/border-radius
2753
2766
  */
2754
2767
  rounded: [{
2755
- rounded: R()
2768
+ rounded: N()
2756
2769
  }],
2757
2770
  /**
2758
2771
  * Border Radius Start
2759
2772
  * @see https://tailwindcss.com/docs/border-radius
2760
2773
  */
2761
2774
  "rounded-s": [{
2762
- "rounded-s": R()
2775
+ "rounded-s": N()
2763
2776
  }],
2764
2777
  /**
2765
2778
  * Border Radius End
2766
2779
  * @see https://tailwindcss.com/docs/border-radius
2767
2780
  */
2768
2781
  "rounded-e": [{
2769
- "rounded-e": R()
2782
+ "rounded-e": N()
2770
2783
  }],
2771
2784
  /**
2772
2785
  * Border Radius Top
2773
2786
  * @see https://tailwindcss.com/docs/border-radius
2774
2787
  */
2775
2788
  "rounded-t": [{
2776
- "rounded-t": R()
2789
+ "rounded-t": N()
2777
2790
  }],
2778
2791
  /**
2779
2792
  * Border Radius Right
2780
2793
  * @see https://tailwindcss.com/docs/border-radius
2781
2794
  */
2782
2795
  "rounded-r": [{
2783
- "rounded-r": R()
2796
+ "rounded-r": N()
2784
2797
  }],
2785
2798
  /**
2786
2799
  * Border Radius Bottom
2787
2800
  * @see https://tailwindcss.com/docs/border-radius
2788
2801
  */
2789
2802
  "rounded-b": [{
2790
- "rounded-b": R()
2803
+ "rounded-b": N()
2791
2804
  }],
2792
2805
  /**
2793
2806
  * Border Radius Left
2794
2807
  * @see https://tailwindcss.com/docs/border-radius
2795
2808
  */
2796
2809
  "rounded-l": [{
2797
- "rounded-l": R()
2810
+ "rounded-l": N()
2798
2811
  }],
2799
2812
  /**
2800
2813
  * Border Radius Start Start
2801
2814
  * @see https://tailwindcss.com/docs/border-radius
2802
2815
  */
2803
2816
  "rounded-ss": [{
2804
- "rounded-ss": R()
2817
+ "rounded-ss": N()
2805
2818
  }],
2806
2819
  /**
2807
2820
  * Border Radius Start End
2808
2821
  * @see https://tailwindcss.com/docs/border-radius
2809
2822
  */
2810
2823
  "rounded-se": [{
2811
- "rounded-se": R()
2824
+ "rounded-se": N()
2812
2825
  }],
2813
2826
  /**
2814
2827
  * Border Radius End End
2815
2828
  * @see https://tailwindcss.com/docs/border-radius
2816
2829
  */
2817
2830
  "rounded-ee": [{
2818
- "rounded-ee": R()
2831
+ "rounded-ee": N()
2819
2832
  }],
2820
2833
  /**
2821
2834
  * Border Radius End Start
2822
2835
  * @see https://tailwindcss.com/docs/border-radius
2823
2836
  */
2824
2837
  "rounded-es": [{
2825
- "rounded-es": R()
2838
+ "rounded-es": N()
2826
2839
  }],
2827
2840
  /**
2828
2841
  * Border Radius Top Left
2829
2842
  * @see https://tailwindcss.com/docs/border-radius
2830
2843
  */
2831
2844
  "rounded-tl": [{
2832
- "rounded-tl": R()
2845
+ "rounded-tl": N()
2833
2846
  }],
2834
2847
  /**
2835
2848
  * Border Radius Top Right
2836
2849
  * @see https://tailwindcss.com/docs/border-radius
2837
2850
  */
2838
2851
  "rounded-tr": [{
2839
- "rounded-tr": R()
2852
+ "rounded-tr": N()
2840
2853
  }],
2841
2854
  /**
2842
2855
  * Border Radius Bottom Right
2843
2856
  * @see https://tailwindcss.com/docs/border-radius
2844
2857
  */
2845
2858
  "rounded-br": [{
2846
- "rounded-br": R()
2859
+ "rounded-br": N()
2847
2860
  }],
2848
2861
  /**
2849
2862
  * Border Radius Bottom Left
2850
2863
  * @see https://tailwindcss.com/docs/border-radius
2851
2864
  */
2852
2865
  "rounded-bl": [{
2853
- "rounded-bl": R()
2866
+ "rounded-bl": N()
2854
2867
  }],
2855
2868
  /**
2856
2869
  * Border Width
2857
2870
  * @see https://tailwindcss.com/docs/border-width
2858
2871
  */
2859
2872
  "border-w": [{
2860
- border: O()
2873
+ border: W()
2861
2874
  }],
2862
2875
  /**
2863
2876
  * Border Width X
2864
2877
  * @see https://tailwindcss.com/docs/border-width
2865
2878
  */
2866
2879
  "border-w-x": [{
2867
- "border-x": O()
2880
+ "border-x": W()
2868
2881
  }],
2869
2882
  /**
2870
2883
  * Border Width Y
2871
2884
  * @see https://tailwindcss.com/docs/border-width
2872
2885
  */
2873
2886
  "border-w-y": [{
2874
- "border-y": O()
2887
+ "border-y": W()
2875
2888
  }],
2876
2889
  /**
2877
2890
  * Border Width Start
2878
2891
  * @see https://tailwindcss.com/docs/border-width
2879
2892
  */
2880
2893
  "border-w-s": [{
2881
- "border-s": O()
2894
+ "border-s": W()
2882
2895
  }],
2883
2896
  /**
2884
2897
  * Border Width End
2885
2898
  * @see https://tailwindcss.com/docs/border-width
2886
2899
  */
2887
2900
  "border-w-e": [{
2888
- "border-e": O()
2901
+ "border-e": W()
2889
2902
  }],
2890
2903
  /**
2891
2904
  * Border Width Top
2892
2905
  * @see https://tailwindcss.com/docs/border-width
2893
2906
  */
2894
2907
  "border-w-t": [{
2895
- "border-t": O()
2908
+ "border-t": W()
2896
2909
  }],
2897
2910
  /**
2898
2911
  * Border Width Right
2899
2912
  * @see https://tailwindcss.com/docs/border-width
2900
2913
  */
2901
2914
  "border-w-r": [{
2902
- "border-r": O()
2915
+ "border-r": W()
2903
2916
  }],
2904
2917
  /**
2905
2918
  * Border Width Bottom
2906
2919
  * @see https://tailwindcss.com/docs/border-width
2907
2920
  */
2908
2921
  "border-w-b": [{
2909
- "border-b": O()
2922
+ "border-b": W()
2910
2923
  }],
2911
2924
  /**
2912
2925
  * Border Width Left
2913
2926
  * @see https://tailwindcss.com/docs/border-width
2914
2927
  */
2915
2928
  "border-w-l": [{
2916
- "border-l": O()
2929
+ "border-l": W()
2917
2930
  }],
2918
2931
  /**
2919
2932
  * Divide Width X
2920
2933
  * @see https://tailwindcss.com/docs/border-width#between-children
2921
2934
  */
2922
2935
  "divide-x": [{
2923
- "divide-x": O()
2936
+ "divide-x": W()
2924
2937
  }],
2925
2938
  /**
2926
2939
  * Divide Width X Reverse
@@ -2932,7 +2945,7 @@ const Nr = (r, e) => {
2932
2945
  * @see https://tailwindcss.com/docs/border-width#between-children
2933
2946
  */
2934
2947
  "divide-y": [{
2935
- "divide-y": O()
2948
+ "divide-y": W()
2936
2949
  }],
2937
2950
  /**
2938
2951
  * Divide Width Y Reverse
@@ -3094,7 +3107,7 @@ const Nr = (r, e) => {
3094
3107
  * @see https://tailwindcss.com/docs/box-shadow#adding-a-ring
3095
3108
  */
3096
3109
  "ring-w": [{
3097
- ring: O()
3110
+ ring: W()
3098
3111
  }],
3099
3112
  /**
3100
3113
  * Ring Width Inset
@@ -3133,7 +3146,7 @@ const Nr = (r, e) => {
3133
3146
  * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring
3134
3147
  */
3135
3148
  "inset-ring-w": [{
3136
- "inset-ring": O()
3149
+ "inset-ring": W()
3137
3150
  }],
3138
3151
  /**
3139
3152
  * Inset Ring Color
@@ -3147,7 +3160,7 @@ const Nr = (r, e) => {
3147
3160
  * @see https://tailwindcss.com/docs/text-shadow
3148
3161
  */
3149
3162
  "text-shadow": [{
3150
- "text-shadow": ["none", N, Se, ke]
3163
+ "text-shadow": ["none", R, Se, ke]
3151
3164
  }],
3152
3165
  /**
3153
3166
  * Text Shadow Color
@@ -3654,7 +3667,7 @@ const Nr = (r, e) => {
3654
3667
  * @see https://tailwindcss.com/docs/perspective-origin
3655
3668
  */
3656
3669
  "perspective-origin": [{
3657
- "perspective-origin": L()
3670
+ "perspective-origin": _()
3658
3671
  }],
3659
3672
  /**
3660
3673
  * Rotate
@@ -3750,7 +3763,7 @@ const Nr = (r, e) => {
3750
3763
  * @see https://tailwindcss.com/docs/transform-origin
3751
3764
  */
3752
3765
  "transform-origin": [{
3753
- origin: L()
3766
+ origin: _()
3754
3767
  }],
3755
3768
  /**
3756
3769
  * Transform Style
@@ -4151,11 +4164,11 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4151
4164
  triggerLabel: e,
4152
4165
  container: t
4153
4166
  }) => {
4154
- const [o, a] = I(!1), [l, i] = I(!1), [b, d] = I(!1), [m, f] = I(!1), [x, N] = I([]), [z, j] = I(""), [D, P] = I(!1), [G, K] = I(!1), [Q, M] = I(null), [, L] = I("user"), [_, q] = I("bottom-right"), [y, W] = 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({
4155
4168
  isActive: !1,
4156
4169
  toolName: null,
4157
4170
  toolData: null
4158
- }), [s, B] = I({
4171
+ }), [s, O] = I({
4159
4172
  session_id: null,
4160
4173
  token: null,
4161
4174
  expires_at: null,
@@ -4163,61 +4176,61 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4163
4176
  lastError: null,
4164
4177
  isPreloaded: !1,
4165
4178
  isRefreshing: !1
4166
- }), [Y, re] = I("idle"), [, J] = I(!1), w = me(null), p = me(null), V = H((u) => {
4179
+ }), [Y, re] = I("idle"), [, J] = I(!1), w = me(null), p = me(null), H = V((u) => {
4167
4180
  const { newStatus: k } = u.data;
4168
4181
  re(k), k === "preloading" || k === "connecting" ? o && f(!0) : k === "ready" ? (f(!1), d(!0)) : k === "error" && f(!1);
4169
- }, [o]), v = H((u) => {
4182
+ }, [o]), v = V((u) => {
4170
4183
  const k = u.data;
4171
4184
  if (console.log("[AriaStandaloneUI] Session ready event:", k), w.current) {
4172
4185
  const F = w.current.getSessionState();
4173
- B(F);
4186
+ O(F);
4174
4187
  const ne = k?.lazyInit === !0;
4175
4188
  k?.streamReady === !0 ? (p.current && (console.log("[AriaStandaloneUI] Attaching video stream after full session ready (streamReady=true)"), w.current.attachToVideoElement(p.current)), d(!0), f(!1), M(null)) : ne ? console.log("[AriaStandaloneUI] Token ready (lazy init), button enabled") : (p.current && (console.log("[AriaStandaloneUI] Attaching video stream (legacy event)"), w.current.attachToVideoElement(p.current)), d(!0), f(!1), M(null));
4176
4189
  }
4177
- }, []), le = H((u) => {
4190
+ }, []), le = V((u) => {
4178
4191
  const k = u.error?.message || "Session error";
4179
4192
  if (console.error("[AriaStandaloneUI] Session error:", k), M(k), f(!1), w.current) {
4180
4193
  const F = w.current.getSessionState();
4181
- B(F);
4194
+ O(F);
4182
4195
  }
4183
- }, []), ce = H((u) => {
4196
+ }, []), ce = V((u) => {
4184
4197
  const { connected: k } = u.data;
4185
4198
  if (d(k), !k && w.current) {
4186
4199
  const F = w.current.getSessionState();
4187
- B(F);
4200
+ O(F);
4188
4201
  }
4189
- }, []), de = H((u) => {
4202
+ }, []), de = V((u) => {
4190
4203
  const { messages: k } = u.data;
4191
- k && N(k);
4192
- }, []), oe = H((u) => {
4204
+ k && R(k);
4205
+ }, []), oe = V((u) => {
4193
4206
  const { liveTranscript: k } = u.data;
4194
4207
  k !== void 0 && j(k);
4195
- }, []), R = H((u) => {
4208
+ }, []), N = V((u) => {
4196
4209
  const k = u.data;
4197
- W({
4210
+ B({
4198
4211
  isActive: k.isActive,
4199
4212
  toolName: k.toolName,
4200
4213
  toolData: k.toolData
4201
4214
  });
4202
- }, []), O = H((u) => {
4215
+ }, []), W = V((u) => {
4203
4216
  const k = p.current;
4204
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));
4205
- }, []), X = H((u = "user") => {
4206
- if (L(u), q(u === "websocket" ? "center" : "bottom-right"), a(!0), i(!1), M(null), !w.current) return;
4218
+ }, []), X = V((u = "user") => {
4219
+ if (_(u), q(u === "websocket" ? "center" : "bottom-right"), a(!0), i(!1), M(null), !w.current) return;
4207
4220
  const k = w.current.isSessionPaused();
4208
4221
  if (console.log("[AriaStandaloneUI] openAssistant called, isPaused:", k), k) {
4209
4222
  f(!0), w.current.resumeSession().then((Z) => {
4210
4223
  if (J(!1), Z) {
4211
4224
  f(!1), d(!0);
4212
4225
  const Pe = w.current.getSessionState();
4213
- B(Pe), N(w.current.getChatMessages()), p.current && w.current && (console.log("[AriaStandaloneUI] Attaching video stream after resume"), w.current.attachToVideoElement(p.current));
4226
+ O(Pe), R(w.current.getChatMessages()), p.current && w.current && (console.log("[AriaStandaloneUI] Attaching video stream after resume"), w.current.attachToVideoElement(p.current));
4214
4227
  } else
4215
4228
  w.current.hasSessionToken() ? w.current.initializeSessionOnDemand().then(() => {
4216
4229
  f(!1), d(!0);
4217
- const xe = w.current.getSessionState();
4218
- B(xe), p.current && w.current && (console.log("[AriaStandaloneUI] Attaching video stream after initialization (from resume)"), w.current.attachToVideoElement(p.current));
4219
- }).catch((xe) => {
4220
- f(!1), M(xe instanceof Error ? xe.message : "Failed to start new session");
4230
+ const Ae = w.current.getSessionState();
4231
+ O(Ae), p.current && w.current && (console.log("[AriaStandaloneUI] Attaching video stream after initialization (from resume)"), w.current.attachToVideoElement(p.current));
4232
+ }).catch((Ae) => {
4233
+ f(!1), M(Ae instanceof Error ? Ae.message : "Failed to start new session");
4221
4234
  }) : w.current.isConnected() || w.current.connect();
4222
4235
  }).catch((Z) => {
4223
4236
  f(!1), J(!1), M(Z instanceof Error ? Z.message : "Failed to resume session");
@@ -4228,17 +4241,17 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4228
4241
  console.log("[AriaStandaloneUI] openAssistant state check:", { isAnamReady: F, hasToken: ne, status: ve, isPaused: !1 }), F && ve === "ready" ? (console.log("[AriaStandaloneUI] Anam already ready, attaching video"), f(!1), d(!0), p.current && w.current.attachToVideoElement(p.current)) : ne ? (console.log("[AriaStandaloneUI] Has token, calling initializeSessionOnDemand"), f(!0), w.current.initializeSessionOnDemand().then(() => {
4229
4242
  f(!1), d(!0);
4230
4243
  const Z = w.current.getSessionState();
4231
- B(Z), p.current && w.current && (console.log("[AriaStandaloneUI] Attaching video stream after initialization"), w.current.attachToVideoElement(p.current));
4244
+ O(Z), p.current && w.current && (console.log("[AriaStandaloneUI] Attaching video stream after initialization"), w.current.attachToVideoElement(p.current));
4232
4245
  }).catch((Z) => {
4233
4246
  f(!1), M(Z instanceof Error ? Z.message : "Failed to initialize session");
4234
4247
  })) : (console.warn("[AriaStandaloneUI] No token available, button should have been disabled"), M("Session not ready. Please wait and try again."));
4235
- }, []), ae = H(() => {
4248
+ }, []), ae = V(() => {
4236
4249
  i(!0);
4237
- }, []), C = H(() => {
4250
+ }, []), C = V(() => {
4238
4251
  i(!1);
4239
- }, []), ge = H(() => {
4252
+ }, []), ge = V(() => {
4240
4253
  a(!1), i(!1), w.current && (p.current && w.current.detachFromVideoElement(p.current), j(""), console.log("[AriaStandaloneUI] Pausing session (widget closed)"), w.current.pauseSession(), J(!0));
4241
- }, []), ie = H(() => {
4254
+ }, []), ie = V(() => {
4242
4255
  console.log("[AriaStandaloneUI] WebSocket trigger event"), X("websocket");
4243
4256
  }, [X]);
4244
4257
  ee(() => {
@@ -4247,21 +4260,21 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4247
4260
  return;
4248
4261
  }
4249
4262
  const u = U.getInstance({});
4250
- return w.current = u, u.addEventListener("status_change", V), 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", R), u.setWebSocketTriggerCallback(ie), queueMicrotask(() => {
4251
- B(u.getSessionState()), re(u.getStatus()), d(u.isConnected()), N(u.getChatMessages()), j(u.getLiveTranscript()), K(u.isMuted()), J(u.isSessionPaused());
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(() => {
4264
+ O(u.getSessionState()), re(u.getStatus()), d(u.isConnected()), R(u.getChatMessages()), j(u.getLiveTranscript()), K(u.isMuted()), J(u.isSessionPaused());
4252
4265
  const F = u.getToolCallState();
4253
- W(F);
4266
+ B(F);
4254
4267
  }), () => {
4255
- u.removeEventListener("status_change", V), 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", R), u.setWebSocketTriggerCallback(null);
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);
4256
4269
  };
4257
4270
  }, [
4258
- V,
4271
+ H,
4259
4272
  v,
4260
4273
  le,
4261
4274
  ce,
4262
4275
  de,
4263
4276
  oe,
4264
- R,
4277
+ N,
4265
4278
  ie
4266
4279
  ]), ee(() => {
4267
4280
  const u = (ve) => {
@@ -4279,22 +4292,22 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4279
4292
  }, [X, ge, ae, C]), ee(() => {
4280
4293
  t.setAttribute("data-aria-open", String(o));
4281
4294
  }, [o, t]);
4282
- const he = H(() => {
4295
+ const he = V(() => {
4283
4296
  P((u) => !u);
4284
- }, []), be = H(async (u) => {
4297
+ }, []), be = V(async (u) => {
4285
4298
  if (!w.current || !b)
4286
4299
  throw new Error("Not connected to Aria");
4287
4300
  await w.current.sendMessage(u);
4288
- }, [b]), ue = H(() => {
4301
+ }, [b]), ue = V(() => {
4289
4302
  if (!w.current) return;
4290
4303
  const u = w.current.toggleMute();
4291
4304
  K(u);
4292
- }, []), cr = H(() => {
4305
+ }, []), cr = V(() => {
4293
4306
  w.current && (f(!0), M(null), w.current.refreshSession().catch((u) => {
4294
4307
  M(u instanceof Error ? u.message : "Failed to refresh session"), f(!1);
4295
4308
  }));
4296
4309
  }, []);
4297
- return /* @__PURE__ */ E(Ve, { children: [
4310
+ return /* @__PURE__ */ E(He, { children: [
4298
4311
  !o && /* @__PURE__ */ n(
4299
4312
  wt,
4300
4313
  {
@@ -4305,7 +4318,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4305
4318
  onClick: () => X("user")
4306
4319
  }
4307
4320
  ),
4308
- o && /* @__PURE__ */ E(Ve, { children: [
4321
+ o && /* @__PURE__ */ E(He, { children: [
4309
4322
  !l && /* @__PURE__ */ n(
4310
4323
  "div",
4311
4324
  {
@@ -4342,7 +4355,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4342
4355
  onMinimize: ae,
4343
4356
  onMaximize: C,
4344
4357
  theme: r,
4345
- displayMode: _,
4358
+ displayMode: L,
4346
4359
  isConnected: b,
4347
4360
  isLoading: m,
4348
4361
  chatMessages: x,
@@ -4352,7 +4365,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4352
4365
  error: Q,
4353
4366
  toolCallState: y,
4354
4367
  sessionState: s,
4355
- setVideoElement: O,
4368
+ setVideoElement: W,
4356
4369
  toggleChat: he,
4357
4370
  sendMessage: be,
4358
4371
  toggleMute: ue,
@@ -4431,7 +4444,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4431
4444
  "div",
4432
4445
  {
4433
4446
  className: "hidden w-full h-full items-center justify-center aria-gradient-bg text-white",
4434
- children: /* @__PURE__ */ n(Ne, { className: "w-4 h-4" })
4447
+ children: /* @__PURE__ */ n(Re, { className: "w-4 h-4" })
4435
4448
  }
4436
4449
  ),
4437
4450
  /* @__PURE__ */ n("span", { className: c(
@@ -4445,7 +4458,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4445
4458
  "transition-transform duration-200",
4446
4459
  o && "group-hover:scale-105",
4447
4460
  !o && "grayscale"
4448
- ), children: /* @__PURE__ */ n(Ne, { className: "w-4 h-4" }) }),
4461
+ ), children: /* @__PURE__ */ n(Re, { className: "w-4 h-4" }) }),
4449
4462
  /* @__PURE__ */ E("div", { className: "relative flex flex-col items-start min-w-0 text-left", children: [
4450
4463
  /* @__PURE__ */ n("span", { className: c(
4451
4464
  "font-bold text-[13px] tracking-tight leading-none",
@@ -4475,7 +4488,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4475
4488
  liveTranscript: m,
4476
4489
  isChatVisible: f,
4477
4490
  isMuted: x,
4478
- error: N,
4491
+ error: R,
4479
4492
  toolCallState: z,
4480
4493
  setVideoElement: j,
4481
4494
  toggleChat: D,
@@ -4483,22 +4496,22 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4483
4496
  toggleMute: G,
4484
4497
  refreshSession: K
4485
4498
  }) => {
4486
- const Q = me(null), M = me(null), [L, _] = I(""), [q, y] = I(!1), W = me(null), s = a === "dark", B = 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";
4487
4500
  ee(() => {
4488
4501
  M.current && (M.current.scrollTop = M.current.scrollHeight);
4489
4502
  }, [m]), ee(() => (Q.current && (console.log("[AriaWidgetStandalone] Registering video element, minimized:", e), j(Q.current)), () => {
4490
4503
  j(null);
4491
4504
  }), [j, e]), ee(() => {
4492
- W.current?.scrollIntoView({ behavior: "smooth" });
4505
+ B.current?.scrollIntoView({ behavior: "smooth" });
4493
4506
  }, [d]);
4494
4507
  const re = async () => {
4495
- if (!L.trim() || !i || q) return;
4496
- const p = L.trim();
4497
- _(""), y(!0);
4508
+ if (!_.trim() || !i || q) return;
4509
+ const p = _.trim();
4510
+ L(""), y(!0);
4498
4511
  try {
4499
4512
  await P(p);
4500
- } catch (V) {
4501
- console.error("Failed to send message:", V), _(p);
4513
+ } catch (H) {
4514
+ console.error("Failed to send message:", H), L(p);
4502
4515
  } finally {
4503
4516
  y(!1);
4504
4517
  }
@@ -4552,7 +4565,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4552
4565
  /* @__PURE__ */ n("div", { className: c(
4553
4566
  "w-5 h-5 rounded-full flex items-center justify-center",
4554
4567
  s ? "bg-amber-800/50" : "bg-amber-100"
4555
- ), children: /* @__PURE__ */ n(He, { className: c(
4568
+ ), children: /* @__PURE__ */ n(Ve, { className: c(
4556
4569
  "w-3 h-3 animate-pulse",
4557
4570
  s ? "text-amber-400" : "text-amber-600"
4558
4571
  ) }) }),
@@ -4563,7 +4576,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4563
4576
  ]
4564
4577
  }
4565
4578
  ),
4566
- i && !N && /* @__PURE__ */ E(
4579
+ i && !R && /* @__PURE__ */ E(
4567
4580
  "div",
4568
4581
  {
4569
4582
  className: c(
@@ -4606,7 +4619,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4606
4619
  onClick: r,
4607
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",
4608
4621
  title: "End Call",
4609
- children: /* @__PURE__ */ n(We, { className: "h-3.5 w-3.5 rotate-[135deg]" })
4622
+ children: /* @__PURE__ */ n(Be, { className: "h-3.5 w-3.5 rotate-[135deg]" })
4610
4623
  }
4611
4624
  )
4612
4625
  ]
@@ -4644,11 +4657,11 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4644
4657
  s ? "text-gray-400" : "text-gray-600"
4645
4658
  ), children: "Connecting..." })
4646
4659
  ] }),
4647
- N && /* @__PURE__ */ E("div", { className: c(
4660
+ R && /* @__PURE__ */ E("div", { className: c(
4648
4661
  "absolute inset-0 flex flex-col items-center justify-center z-10 p-4",
4649
4662
  s ? "bg-gray-950/90" : "bg-white/90"
4650
4663
  ), children: [
4651
- /* @__PURE__ */ n("div", { className: "w-10 h-10 rounded-full bg-red-500/10 flex items-center justify-center mb-2", children: /* @__PURE__ */ n(Be, { className: "w-5 h-5 text-red-500" }) }),
4664
+ /* @__PURE__ */ n("div", { className: "w-10 h-10 rounded-full bg-red-500/10 flex items-center justify-center mb-2", children: /* @__PURE__ */ n(Oe, { className: "w-5 h-5 text-red-500" }) }),
4652
4665
  /* @__PURE__ */ n("p", { className: c(
4653
4666
  "text-xs font-medium text-center mb-2",
4654
4667
  s ? "text-red-300" : "text-red-700"
@@ -4663,7 +4676,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4663
4676
  s ? "bg-indigo-600 hover:bg-indigo-700 text-white" : "bg-indigo-500 hover:bg-indigo-600 text-white"
4664
4677
  ),
4665
4678
  children: [
4666
- /* @__PURE__ */ n(Oe, { className: "w-3 h-3" }),
4679
+ /* @__PURE__ */ n(We, { className: "w-3 h-3" }),
4667
4680
  "Retry"
4668
4681
  ]
4669
4682
  }
@@ -4680,9 +4693,9 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4680
4693
  "shadow-2xl",
4681
4694
  !s && "bg-white/95 border border-gray-200/80",
4682
4695
  s && "bg-gray-950/95 border border-gray-800/50",
4683
- B && "fixed bottom-6 right-6 rounded-xl",
4684
- B && (f ? "w-[960px]" : "w-[640px]"),
4685
- B && "h-[500px]",
4696
+ O && "fixed bottom-6 right-6 rounded-xl",
4697
+ O && (f ? "w-[960px]" : "w-[640px]"),
4698
+ O && "h-[500px]",
4686
4699
  Y && "fixed inset-8 md:inset-16 lg:inset-20 rounded-2xl"
4687
4700
  ),
4688
4701
  style: {
@@ -4766,7 +4779,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4766
4779
  ), children: "Get ready to chat" })
4767
4780
  ] })
4768
4781
  ] }),
4769
- N && /* @__PURE__ */ n(
4782
+ R && /* @__PURE__ */ n(
4770
4783
  "div",
4771
4784
  {
4772
4785
  className: c(
@@ -4778,7 +4791,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4778
4791
  "rounded-lg p-6 max-w-sm w-full shadow-lg border",
4779
4792
  s ? "bg-gray-900 border-red-900/30" : "bg-white border-red-100"
4780
4793
  ), children: /* @__PURE__ */ E("div", { className: "flex flex-col items-center text-center gap-3", children: [
4781
- /* @__PURE__ */ n("div", { className: "w-12 h-12 rounded-full bg-red-500/10 flex items-center justify-center", children: /* @__PURE__ */ n(Be, { className: "w-6 h-6 text-red-500" }) }),
4794
+ /* @__PURE__ */ n("div", { className: "w-12 h-12 rounded-full bg-red-500/10 flex items-center justify-center", children: /* @__PURE__ */ n(Oe, { className: "w-6 h-6 text-red-500" }) }),
4782
4795
  /* @__PURE__ */ E("div", { children: [
4783
4796
  /* @__PURE__ */ n("p", { className: c(
4784
4797
  "text-base font-bold mb-2",
@@ -4787,7 +4800,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4787
4800
  /* @__PURE__ */ n("p", { className: c(
4788
4801
  "text-sm leading-relaxed mb-4",
4789
4802
  s ? "text-red-400" : "text-red-600"
4790
- ), children: N }),
4803
+ ), children: R }),
4791
4804
  /* @__PURE__ */ E(
4792
4805
  "button",
4793
4806
  {
@@ -4798,7 +4811,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4798
4811
  s ? "bg-indigo-600 hover:bg-indigo-700 text-white" : "bg-indigo-500 hover:bg-indigo-600 text-white"
4799
4812
  ),
4800
4813
  children: [
4801
- /* @__PURE__ */ n(Oe, { className: "w-4 h-4" }),
4814
+ /* @__PURE__ */ n(We, { className: "w-4 h-4" }),
4802
4815
  "Try Again"
4803
4816
  ]
4804
4817
  }
@@ -4830,7 +4843,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4830
4843
  /* @__PURE__ */ n("div", { className: c(
4831
4844
  "w-6 h-6 rounded-full flex items-center justify-center",
4832
4845
  s ? "bg-amber-800/50" : "bg-amber-100"
4833
- ), children: /* @__PURE__ */ n(He, { className: c(
4846
+ ), children: /* @__PURE__ */ n(Ve, { className: c(
4834
4847
  "w-3.5 h-3.5 animate-pulse",
4835
4848
  s ? "text-amber-400" : "text-amber-600"
4836
4849
  ) }) }),
@@ -4876,7 +4889,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4876
4889
  ] })
4877
4890
  }
4878
4891
  ),
4879
- i && !N && /* @__PURE__ */ E(
4892
+ i && !R && /* @__PURE__ */ E(
4880
4893
  "div",
4881
4894
  {
4882
4895
  className: c(
@@ -4932,7 +4945,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4932
4945
  onClick: r,
4933
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",
4934
4947
  title: "End Call",
4935
- children: /* @__PURE__ */ n(We, { className: "h-4 w-4 rotate-[135deg]" })
4948
+ children: /* @__PURE__ */ n(Be, { className: "h-4 w-4 rotate-[135deg]" })
4936
4949
  }
4937
4950
  )
4938
4951
  ]
@@ -4941,7 +4954,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4941
4954
  ] }),
4942
4955
  f && /* @__PURE__ */ E("div", { className: c(
4943
4956
  "flex flex-col shrink-0 border-l",
4944
- B ? "w-[320px]" : "w-[360px]",
4957
+ O ? "w-[320px]" : "w-[360px]",
4945
4958
  s ? "bg-gray-900 border-gray-800" : "bg-white border-gray-100"
4946
4959
  ), children: [
4947
4960
  /* @__PURE__ */ n("div", { className: c(
@@ -4968,7 +4981,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4968
4981
  /* @__PURE__ */ n("div", { className: c(
4969
4982
  "rounded-2xl p-6 mb-4",
4970
4983
  s ? "bg-gradient-to-br from-indigo-900/20 to-purple-900/20" : "bg-gradient-to-br from-indigo-50 to-purple-50"
4971
- ), children: /* @__PURE__ */ n(Ne, { className: c(
4984
+ ), children: /* @__PURE__ */ n(Re, { className: c(
4972
4985
  "h-8 w-8",
4973
4986
  s ? "text-indigo-400" : "text-indigo-500"
4974
4987
  ) }) }),
@@ -4980,14 +4993,14 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4980
4993
  "text-xs",
4981
4994
  s ? "text-gray-400" : "text-gray-500"
4982
4995
  ), children: "Aria is here to chat with you" })
4983
- ] }) : d.filter((p) => p.content && p.content.trim() !== "").map((p, V) => /* @__PURE__ */ E(
4996
+ ] }) : d.filter((p) => p.content && p.content.trim() !== "").map((p, H) => /* @__PURE__ */ E(
4984
4997
  "div",
4985
4998
  {
4986
4999
  className: c(
4987
5000
  "flex gap-2 aria-animate-fade-in",
4988
5001
  p.role === "user" ? "flex-row-reverse" : "flex-row"
4989
5002
  ),
4990
- style: { animationDelay: `${V * 50}ms` },
5003
+ style: { animationDelay: `${H * 50}ms` },
4991
5004
  children: [
4992
5005
  /* @__PURE__ */ n(
4993
5006
  "div",
@@ -5029,9 +5042,9 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
5029
5042
  )
5030
5043
  ]
5031
5044
  },
5032
- V
5045
+ H
5033
5046
  )),
5034
- /* @__PURE__ */ n("div", { ref: W })
5047
+ /* @__PURE__ */ n("div", { ref: B })
5035
5048
  ] }),
5036
5049
  /* @__PURE__ */ n("div", { className: c(
5037
5050
  "p-3 border-t",
@@ -5043,8 +5056,8 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
5043
5056
  /* @__PURE__ */ n(
5044
5057
  "input",
5045
5058
  {
5046
- value: L,
5047
- onChange: (p) => _(p.target.value),
5059
+ value: _,
5060
+ onChange: (p) => L(p.target.value),
5048
5061
  onKeyDown: J,
5049
5062
  placeholder: i ? "Message Aria..." : "Connecting...",
5050
5063
  disabled: !i || q,
@@ -5058,7 +5071,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
5058
5071
  "button",
5059
5072
  {
5060
5073
  onClick: re,
5061
- disabled: !i || !L.trim() || q,
5074
+ disabled: !i || !_.trim() || q,
5062
5075
  className: c(
5063
5076
  "h-7 w-7 rounded-md shrink-0 transition-all duration-200 flex items-center justify-center",
5064
5077
  "bg-indigo-500 hover:bg-indigo-600 disabled:opacity-40 text-white"
@@ -5076,7 +5089,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
5076
5089
  AriaStandaloneUI: ft
5077
5090
  }, Symbol.toStringTag, { value: "Module" }));
5078
5091
  export {
5079
- Ae as Aria,
5092
+ xe as Aria,
5080
5093
  Ie as decodeJWT,
5081
5094
  Er as extractSessionIdFromToken,
5082
5095
  St as getTokenInfo,