@centive/aria-sdk 0.8.7 → 0.8.8

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 Ve } from "react/jsx-runtime";
2
- import { useRef as me, useState as I, useEffect as ee, useCallback as j } from "react";
3
- import { Sparkles as Ne, Wrench as je, MicOff as De, Mic as He, Maximize2 as dr, Phone as We, X as Oe, RefreshCw as Be, MessageCircle as Fe, Minimize2 as gr, User as hr, Bot as ur, Send as pr } from "lucide-react";
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";
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 xr(r) {
20
+ function Ar(r) {
21
21
  return typeof r == "object" && r !== null && "type" in r && r.type === "trigger_event";
22
22
  }
23
- function Ar(r) {
23
+ function xr(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) {
@@ -90,6 +90,9 @@ class U {
90
90
  // Auto-reconnect on Anam disconnect (for inactivity timeout)
91
91
  isReconnecting = !1;
92
92
  autoReconnectOnAnamDisconnect = !0;
93
+ // Track if user has had a session before (to skip greeting on subsequent sessions)
94
+ // This persists across session restarts within the same app lifecycle
95
+ hasHadSessionBefore = !1;
93
96
  // ============================================================================
94
97
  // Singleton Pattern
95
98
  // ============================================================================
@@ -143,8 +146,8 @@ class U {
143
146
  t && t.forEach((o) => {
144
147
  try {
145
148
  o(e);
146
- } catch (i) {
147
- console.error("[AriaSessionManager] Error in event listener:", i);
149
+ } catch (a) {
150
+ console.error("[AriaSessionManager] Error in event listener:", a);
148
151
  }
149
152
  });
150
153
  }
@@ -317,11 +320,11 @@ class U {
317
320
  console.error(`[AriaSessionManager] Missing fields error: ${t.message}`), this.config.onError?.(new Error(t.message));
318
321
  return;
319
322
  }
320
- if (xr(t)) {
323
+ if (Ar(t)) {
321
324
  console.log("[AriaSessionManager] WebSocket trigger event received:", t.data), this.config.onWebSocketEvent?.(t), this.onWebSocketTrigger?.(t);
322
325
  return;
323
326
  }
324
- if (Ar(t)) {
327
+ if (xr(t)) {
325
328
  console.log(`[AriaSessionManager] Generic acknowledgment: ${t.message}`);
326
329
  return;
327
330
  }
@@ -369,8 +372,8 @@ class U {
369
372
  // Token is ready for use
370
373
  }), this.scheduleRefresh(), this.deferAnamInit ? t ? (console.log("[AriaSessionManager] Session token refreshed proactively"), this.config.onSessionRefresh?.(), this.emit({ type: "session_refresh", data: { token: o } }), this.anamClient ? this.setStatus("ready") : this.setStatus("connected")) : this.isReconnecting ? (console.log("[AriaSessionManager] Token received during reconnect, initializing Anam client"), this.initializeAnamClient(o).then(() => {
371
374
  console.log("[AriaSessionManager] Anam client initialized after reconnect"), this.isReconnecting = !1, this.emit({ type: "reconnecting", data: { isReconnecting: !1 } });
372
- }).catch((i) => {
373
- console.error("[AriaSessionManager] Failed to initialize Anam client during reconnect:", i), this.isReconnecting = !1, this.emit({ type: "reconnecting", data: { isReconnecting: !1 } }), this.setStatus("error"), this.updateSessionState({ lastError: "Failed to reconnect session" });
375
+ }).catch((a) => {
376
+ console.error("[AriaSessionManager] Failed to initialize Anam client during reconnect:", a), this.isReconnecting = !1, this.emit({ type: "reconnecting", data: { isReconnecting: !1 } }), this.setStatus("error"), this.updateSessionState({ lastError: "Failed to reconnect session" });
374
377
  })) : (console.log("[AriaSessionManager] Session token ready, waiting for user to open widget"), this.setStatus("connected"), this.emit({ type: "session_ready", data: { sessionId: null, tokenReady: !0, lazyInit: !0 } }), this.config.onSessionPreloaded?.()) : this.anamClient ? t && (console.log("[AriaSessionManager] Session refreshed, token updated"), this.config.onSessionRefresh?.(), this.emit({ type: "session_refresh", data: { token: o } })) : this.initializeAnamClient(o);
375
378
  } else
376
379
  console.log("[AriaSessionManager] Session response without data:", e.message), this.updateSessionState({
@@ -393,6 +396,9 @@ class U {
393
396
  * Request a session token from the backend with user_trigger=true
394
397
  * This is called automatically when WebSocket connects
395
398
  * The token is stored and used when user opens the widget for the first time
399
+ *
400
+ * If user has had a session before (in this app lifecycle), skip_greeting is sent
401
+ * to prevent the greeting from playing again on subsequent sessions.
396
402
  */
397
403
  requestSessionToken() {
398
404
  if (this.sessionState.token && !this.isTokenExpired()) {
@@ -407,16 +413,22 @@ class U {
407
413
  console.warn("[AriaSessionManager] Cannot request session token: WebSocket not connected");
408
414
  return;
409
415
  }
410
- console.log("[AriaSessionManager] Requesting session token with user_trigger=true for user:", this.config.userId), this.setStatus("preloading");
416
+ const e = this.hasHadSessionBefore;
417
+ console.log(
418
+ "[AriaSessionManager] Requesting session token with user_trigger=true for user:",
419
+ this.config.userId,
420
+ e ? "(skip_greeting: true)" : "(with greeting)"
421
+ ), this.setStatus("preloading");
411
422
  try {
412
- const e = JSON.stringify({
423
+ const t = JSON.stringify({
413
424
  user_trigger: !0,
414
- ...this.config.userId && { userId: this.config.userId }
425
+ ...this.config.userId && { userId: this.config.userId },
426
+ ...e && { skip_greeting: !0 }
415
427
  });
416
- console.log("[AriaSessionManager] Sending message:", e), this.ws.send(e);
417
- } catch (e) {
418
- const t = e instanceof Error ? e.message : "Failed to request session token";
419
- console.error("[AriaSessionManager] Session token request error:", t), this.handleSessionError(t);
428
+ console.log("[AriaSessionManager] Sending message:", t), this.ws.send(t);
429
+ } catch (t) {
430
+ const o = t instanceof Error ? t.message : "Failed to request session token";
431
+ console.error("[AriaSessionManager] Session token request error:", o), this.handleSessionError(o);
420
432
  }
421
433
  }
422
434
  /**
@@ -439,15 +451,21 @@ class U {
439
451
  console.error("[AriaSessionManager] Cannot trigger session: WebSocket not connected");
440
452
  return;
441
453
  }
454
+ const t = this.hasHadSessionBefore;
442
455
  try {
443
- const t = JSON.stringify({
456
+ const o = JSON.stringify({
444
457
  user_trigger: !0,
445
- userId: this.config.userId
458
+ userId: this.config.userId,
459
+ ...t && { skip_greeting: !0 }
446
460
  });
447
- this.ws.send(t), console.log("[AriaSessionManager] Sent session request with user_trigger: true, userId:", this.config.userId), e && this.config.userId && this.config.onManualTrigger?.(this.config.userId);
448
- } catch (t) {
449
- const o = t instanceof Error ? t.message : "Failed to trigger session";
450
- console.error("[AriaSessionManager] Trigger error:", o), this.config.onError?.(t instanceof Error ? t : new Error(o));
461
+ this.ws.send(o), console.log(
462
+ "[AriaSessionManager] Sent session request with user_trigger: true, userId:",
463
+ this.config.userId,
464
+ t ? "(skip_greeting: true)" : "(with greeting)"
465
+ ), e && this.config.userId && this.config.onManualTrigger?.(this.config.userId);
466
+ } catch (o) {
467
+ const a = o instanceof Error ? o.message : "Failed to trigger session";
468
+ console.error("[AriaSessionManager] Trigger error:", a), this.config.onError?.(o instanceof Error ? o : new Error(a));
451
469
  }
452
470
  }
453
471
  // ============================================================================
@@ -496,25 +514,29 @@ class U {
496
514
  this.isAnamInitializing = !0, console.log("[AriaSessionManager] Initializing Anam client"), this.setStatus("preloading");
497
515
  try {
498
516
  this.createHiddenVideoElement();
499
- const { createClient: t, AnamEvent: o } = await import("@anam-ai/js-sdk"), i = t(e);
500
- i.addListener(o.SESSION_READY, () => {
501
- const m = i.getActiveSessionId();
517
+ const { createClient: t, AnamEvent: o } = await import("@anam-ai/js-sdk"), a = t(e);
518
+ a.addListener(o.SESSION_READY, () => {
519
+ const m = a.getActiveSessionId();
502
520
  m && (this.updateSessionState({ session_id: m }), console.log("[AriaSessionManager] Anam session ready with ID:", m));
503
- }), i.addListener(o.CONNECTION_CLOSED, () => {
504
- console.log("[AriaSessionManager] Anam connection closed"), this.emit({ type: "connection_change", data: { connected: !1 } }), this.autoReconnectOnAnamDisconnect && !this.isIntentionalDisconnect && !this.isPaused && !this.isReconnecting && (console.log("[AriaSessionManager] Anam disconnected unexpectedly, auto-reconnecting..."), this.autoReconnectSession());
505
- }), i.addListener(o.MESSAGE_HISTORY_UPDATED, (m) => {
506
- this.chatMessages = m.map((A) => ({
507
- role: A.role,
508
- content: A.content,
521
+ }), a.addListener(o.CONNECTION_CLOSED, () => {
522
+ if (console.log("[AriaSessionManager] Anam connection closed"), this.emit({ type: "connection_change", data: { connected: !1 } }), this.isPaused) {
523
+ console.log("[AriaSessionManager] Anam disconnected while paused, clearing stale session"), this.clearStaleSessionForResume();
524
+ return;
525
+ }
526
+ this.autoReconnectOnAnamDisconnect && !this.isIntentionalDisconnect && !this.isReconnecting && (console.log("[AriaSessionManager] Anam disconnected unexpectedly, auto-reconnecting..."), this.autoReconnectSession());
527
+ }), a.addListener(o.MESSAGE_HISTORY_UPDATED, (m) => {
528
+ this.chatMessages = m.map((x) => ({
529
+ role: x.role,
530
+ content: x.content,
509
531
  timestamp: Date.now()
510
532
  }));
511
- const f = m.map((A) => ({
512
- role: A.role,
513
- content: A.content,
533
+ const f = m.map((x) => ({
534
+ role: x.role,
535
+ content: x.content,
514
536
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
515
537
  }));
516
538
  this.sendMessageHistory(f), this.emit({ type: "message_history", data: { messages: this.chatMessages } });
517
- }), i.addListener(o.MESSAGE_STREAM_EVENT_RECEIVED, (m) => {
539
+ }), a.addListener(o.MESSAGE_STREAM_EVENT_RECEIVED, (m) => {
518
540
  m.role === "persona" ? this.liveTranscript += m.content : m.role === "user" && (this.liveTranscript = "");
519
541
  const f = {
520
542
  role: m.role,
@@ -522,7 +544,7 @@ class U {
522
544
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
523
545
  };
524
546
  this.sendMessageStream(f, m.is_final ?? !1), this.emit({ type: "message_stream", data: { event: m, liveTranscript: this.liveTranscript } });
525
- }), i.addListener(o.CLIENT_TOOL_EVENT_RECEIVED, (m) => {
547
+ }), a.addListener(o.CLIENT_TOOL_EVENT_RECEIVED, (m) => {
526
548
  console.log("[AriaSessionManager] Tool call event received:", m.eventName), this.isToolCallActive = !0, this.activeToolCall = m, this.emit({
527
549
  type: "tool_call",
528
550
  data: {
@@ -534,13 +556,13 @@ class U {
534
556
  }), setTimeout(() => {
535
557
  this.activeToolCall?.eventUid === m.eventUid && this.clearToolCallState();
536
558
  }, 3e4);
537
- }), this.anamClient = i, this.audioInputStream = await navigator.mediaDevices.getUserMedia({ audio: !0 }), this.createHiddenAudioElement();
538
- const l = await i.stream(this.audioInputStream), a = l[0], b = l[1];
539
- this.videoStream = a, this.hiddenVideoElement && (this.hiddenVideoElement.srcObject = a, this.hiddenVideoElement.muted = !0), this.hiddenAudioElement && b ? (this.hiddenAudioElement.srcObject = b, this.hiddenAudioElement.muted = !1, this.hiddenAudioElement.play().catch((m) => {
559
+ }), this.anamClient = a, this.audioInputStream = await navigator.mediaDevices.getUserMedia({ audio: !0 }), this.createHiddenAudioElement();
560
+ const l = await a.stream(this.audioInputStream), i = l[0], b = l[1];
561
+ this.videoStream = i, this.hiddenVideoElement && (this.hiddenVideoElement.srcObject = i, this.hiddenVideoElement.muted = !0), this.hiddenAudioElement && b ? (this.hiddenAudioElement.srcObject = b, this.hiddenAudioElement.muted = !1, this.hiddenAudioElement.play().catch((m) => {
540
562
  console.warn("[AriaSessionManager] Initial audio play failed (may need user interaction):", m);
541
563
  }), console.log("[AriaSessionManager] Audio stream attached to audio element")) : console.log("[AriaSessionManager] No separate audio stream available, audio may come through video"), this.isAnamInitializing = !1, this.setStatus("ready");
542
- const d = i.getActiveSessionId();
543
- console.log("[AriaSessionManager] Session fully ready with video stream, ID:", d), this.emit({ type: "session_ready", data: { sessionId: d, streamReady: !0 } }), this.config.onSessionReady?.(), console.log("[AriaSessionManager] Anam client initialized and streaming");
564
+ const d = a.getActiveSessionId();
565
+ console.log("[AriaSessionManager] Session fully ready with video stream, ID:", d), this.emit({ type: "session_ready", data: { sessionId: d, streamReady: !0 } }), this.config.onSessionReady?.(), this.hasHadSessionBefore || (this.hasHadSessionBefore = !0, console.log("[AriaSessionManager] First session started - subsequent sessions will skip greeting")), console.log("[AriaSessionManager] Anam client initialized and streaming");
544
566
  } catch (t) {
545
567
  this.isAnamInitializing = !1;
546
568
  const o = t instanceof Error ? t.message : "Failed to initialize Anam client";
@@ -590,11 +612,11 @@ class U {
590
612
  */
591
613
  attachToVideoElement(e) {
592
614
  if (this.videoStream) {
593
- const t = this.videoStream.getTracks(), o = t.filter((a) => a.readyState === "live"), i = t.filter((a) => a.kind === "audio");
594
- console.log("[AriaSessionManager] Attaching video stream, tracks:", t.length, "active:", o.length, "audio:", i.length), e.srcObject = this.videoStream, this.hiddenAudioElement && this.hiddenAudioElement.srcObject ? (e.muted = !0, this.hiddenAudioElement.muted = !1, this.hiddenAudioElement.play().catch((a) => {
595
- console.warn("[AriaSessionManager] Audio play failed:", a);
596
- }), console.log("[AriaSessionManager] Audio playing through separate audio element")) : (e.muted = !1, console.log("[AriaSessionManager] Audio playing through video element")), e.play().catch((a) => {
597
- console.warn("[AriaSessionManager] Video play failed:", a);
615
+ const t = this.videoStream.getTracks(), o = t.filter((i) => i.readyState === "live"), a = t.filter((i) => i.kind === "audio");
616
+ console.log("[AriaSessionManager] Attaching video stream, tracks:", t.length, "active:", o.length, "audio:", a.length), e.srcObject = this.videoStream, this.hiddenAudioElement && this.hiddenAudioElement.srcObject ? (e.muted = !0, this.hiddenAudioElement.muted = !1, this.hiddenAudioElement.play().catch((i) => {
617
+ console.warn("[AriaSessionManager] Audio play failed:", i);
618
+ }), console.log("[AriaSessionManager] Audio playing through separate audio element")) : (e.muted = !1, console.log("[AriaSessionManager] Audio playing through video element")), e.play().catch((i) => {
619
+ console.warn("[AriaSessionManager] Video play failed:", i);
598
620
  });
599
621
  } else
600
622
  console.log("[AriaSessionManager] No video stream available to attach (session may be initializing)");
@@ -632,8 +654,8 @@ class U {
632
654
  };
633
655
  try {
634
656
  this.ws.send(JSON.stringify(o)), console.log("[AriaSessionManager] Sent message history:", e.length, "messages");
635
- } catch (i) {
636
- console.error("[AriaSessionManager] Failed to send message history:", i);
657
+ } catch (a) {
658
+ console.error("[AriaSessionManager] Failed to send message history:", a);
637
659
  }
638
660
  }
639
661
  sendMessageStream(e, t) {
@@ -646,8 +668,8 @@ class U {
646
668
  };
647
669
  try {
648
670
  this.ws.send(JSON.stringify(o));
649
- } catch (i) {
650
- console.error("[AriaSessionManager] Failed to send message stream:", i);
671
+ } catch (a) {
672
+ console.error("[AriaSessionManager] Failed to send message stream:", a);
651
673
  }
652
674
  }
653
675
  sendSessionEnd() {
@@ -702,8 +724,8 @@ class U {
702
724
  console.log("[AriaSessionManager] No expiration time, skipping refresh scheduling");
703
725
  return;
704
726
  }
705
- const e = new Date(this.sessionState.expires_at).getTime(), t = Date.now(), o = this.refreshConfig.bufferMinutes * 60 * 1e3, i = e - o, l = Math.max(0, i - t), a = e - t;
706
- console.log(`[AriaSessionManager] Token expires at: ${new Date(e).toISOString()}`), console.log(`[AriaSessionManager] Time until expiry: ${Math.round(a / 1e3 / 60)} minutes`), console.log(`[AriaSessionManager] Refresh buffer: ${this.refreshConfig.bufferMinutes} minutes`), l <= 0 ? (console.log("[AriaSessionManager] Session expiring soon, refreshing immediately"), this.refreshSession()) : (console.log(`[AriaSessionManager] Scheduling proactive refresh in ${Math.round(l / 1e3 / 60)} minutes`), this.refreshTimer = setTimeout(() => {
727
+ const e = new Date(this.sessionState.expires_at).getTime(), t = Date.now(), o = this.refreshConfig.bufferMinutes * 60 * 1e3, a = e - o, l = Math.max(0, a - t), i = e - t;
728
+ console.log(`[AriaSessionManager] Token expires at: ${new Date(e).toISOString()}`), console.log(`[AriaSessionManager] Time until expiry: ${Math.round(i / 1e3 / 60)} minutes`), console.log(`[AriaSessionManager] Refresh buffer: ${this.refreshConfig.bufferMinutes} minutes`), l <= 0 ? (console.log("[AriaSessionManager] Session expiring soon, refreshing immediately"), this.refreshSession()) : (console.log(`[AriaSessionManager] Scheduling proactive refresh in ${Math.round(l / 1e3 / 60)} minutes`), this.refreshTimer = setTimeout(() => {
707
729
  console.log("[AriaSessionManager] Proactive refresh timer fired"), this.refreshSession();
708
730
  }, l));
709
731
  }
@@ -721,15 +743,17 @@ class U {
721
743
  return;
722
744
  }
723
745
  console.log("[AriaSessionManager] Refreshing session token (proactive refresh)"), this.updateSessionState({ isRefreshing: !0 }), this.setStatus("refreshing");
746
+ const e = this.hasHadSessionBefore;
724
747
  try {
725
- const e = JSON.stringify({
748
+ const t = JSON.stringify({
726
749
  user_trigger: !0,
727
- userId: this.config.userId
750
+ userId: this.config.userId,
751
+ ...e && { skip_greeting: !0 }
728
752
  });
729
- this.ws.send(e);
730
- } catch (e) {
731
- const t = e instanceof Error ? e.message : "Failed to refresh session";
732
- console.error("[AriaSessionManager] Refresh error:", t), this.updateSessionState({ isRefreshing: !1 }), this.config.onSessionRefreshError?.(e instanceof Error ? e : new Error(t)), this.scheduleRetry();
753
+ this.ws.send(t);
754
+ } catch (t) {
755
+ const o = t instanceof Error ? t.message : "Failed to refresh session";
756
+ console.error("[AriaSessionManager] Refresh error:", o), this.updateSessionState({ isRefreshing: !1 }), this.config.onSessionRefreshError?.(t instanceof Error ? t : new Error(o)), this.scheduleRetry();
733
757
  }
734
758
  }
735
759
  // ============================================================================
@@ -819,16 +843,16 @@ class U {
819
843
  if (console.log("[AriaSessionManager] Resuming session"), this.isPaused = !1, !this.anamClient)
820
844
  return console.log("[AriaSessionManager] No Anam client, cannot resume - will create new session"), !1;
821
845
  if (this.sessionState.expires_at) {
822
- const o = new Date(this.sessionState.expires_at).getTime();
823
- if (Date.now() >= o)
846
+ const a = new Date(this.sessionState.expires_at).getTime();
847
+ if (Date.now() >= a)
824
848
  return console.log("[AriaSessionManager] Session expired, will create new session"), await this.stopStreaming(), this.resetSessionState(), !1;
825
849
  }
826
850
  if (!this.videoStream)
827
851
  return console.log("[AriaSessionManager] No video stream available, will create new session"), await this.stopStreaming(), this.resetSessionState(), !1;
828
- const e = this.videoStream.getTracks(), t = e.filter((o) => o.readyState === "live");
829
- return console.log("[AriaSessionManager] Video stream tracks:", e.length, "active:", t.length), this.hiddenAudioElement && (this.hiddenAudioElement.muted = !1, this.hiddenAudioElement.play().catch((o) => {
830
- console.warn("[AriaSessionManager] Audio play failed on resume:", o);
831
- }), 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;
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);
832
856
  }
833
857
  /**
834
858
  * Reconnect WebSocket for session resume (without triggering new session)
@@ -873,9 +897,24 @@ class U {
873
897
  /**
874
898
  * Force end the session (explicit user action or logout)
875
899
  * This always ends the session regardless of persistSession setting
900
+ *
901
+ * @param resetGreeting - If true, resets the greeting state so next session shows greeting (useful for logout)
902
+ */
903
+ async forceEndSession(e = !1) {
904
+ console.log("[AriaSessionManager] Force ending session", e ? "(resetting greeting state)" : ""), this.sendSessionEnd(), await this.stopStreaming(), this.resetSessionState(), this.isPaused = !1, e && (this.hasHadSessionBefore = !1, console.log("[AriaSessionManager] Greeting state reset - next session will show greeting")), this.setStatus("idle");
905
+ }
906
+ /**
907
+ * Reset the greeting state so the next session will show the greeting
908
+ * Call this when user logs out or you want to show greeting again
909
+ */
910
+ resetGreetingState() {
911
+ this.hasHadSessionBefore = !1, console.log("[AriaSessionManager] Greeting state reset - next session will show greeting");
912
+ }
913
+ /**
914
+ * Check if greeting will be skipped on next session
876
915
  */
877
- async forceEndSession() {
878
- console.log("[AriaSessionManager] Force ending session"), this.sendSessionEnd(), await this.stopStreaming(), this.resetSessionState(), this.isPaused = !1, this.setStatus("idle");
916
+ willSkipGreeting() {
917
+ return this.hasHadSessionBefore;
879
918
  }
880
919
  // ============================================================================
881
920
  // Auto-Reconnect on Anam Disconnect (Inactivity Timeout)
@@ -934,6 +973,18 @@ class U {
934
973
  isRefreshing: !1
935
974
  }), this.isAnamInitializing = !1;
936
975
  }
976
+ /**
977
+ * Clear stale session data when Anam disconnects while paused
978
+ * This ensures a fresh session is created when the widget reopens
979
+ */
980
+ clearStaleSessionForResume() {
981
+ console.log("[AriaSessionManager] Clearing stale session for resume"), this.anamClient = null, this.videoStream = null, this.audioInputStream && (this.audioInputStream.getTracks().forEach((e) => e.stop()), this.audioInputStream = null), this.removeHiddenVideoElement(), this.removeHiddenAudioElement(), this.updateSessionState({
982
+ session_id: null,
983
+ token: null,
984
+ isSessionReady: !1,
985
+ isPreloaded: !1
986
+ }), this.isAnamInitializing = !1, console.log("[AriaSessionManager] Stale session cleared, ready for fresh session on resume");
987
+ }
937
988
  /**
938
989
  * End the current session but keep WebSocket connected for new session creation
939
990
  * This is called when widget closes without persistSession enabled
@@ -990,7 +1041,7 @@ const S = {
990
1041
  uiContainer: null,
991
1042
  reactRoot: null
992
1043
  };
993
- class xe {
1044
+ class Ae {
994
1045
  /**
995
1046
  * Initialize the Aria SDK with the given configuration.
996
1047
  * This sets up the WebSocket connection, session management, and UI components.
@@ -1019,8 +1070,8 @@ class xe {
1019
1070
  if (!e.userId)
1020
1071
  throw new Error("[AriaCore] userId is required");
1021
1072
  console.log("[AriaCore] Initializing Aria SDK..."), S.config = e;
1022
- const t = xe.buildFullConfig(e);
1023
- 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");
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");
1024
1075
  }
1025
1076
  /**
1026
1077
  * Open the Aria assistant widget.
@@ -1151,7 +1202,7 @@ class xe {
1151
1202
  console.log("[AriaCore] Not initialized, nothing to destroy.");
1152
1203
  return;
1153
1204
  }
1154
- 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");
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");
1155
1206
  }
1156
1207
  // ============================================================================
1157
1208
  // Private Methods
@@ -1199,23 +1250,23 @@ class xe {
1199
1250
  */
1200
1251
  static mountUI(e, t) {
1201
1252
  const o = document.createElement("div");
1202
- 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);
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);
1203
1254
  }
1204
1255
  /**
1205
1256
  * Render React UI components
1206
1257
  */
1207
1258
  static async renderReactUI(e, t, o) {
1208
1259
  try {
1209
- const i = await import("react"), l = await import("react-dom/client"), { AriaStandaloneUI: a } = await Promise.resolve().then(() => vt), b = l.createRoot(e);
1260
+ const a = await import("react"), l = await import("react-dom/client"), { AriaStandaloneUI: i } = await Promise.resolve().then(() => vt), b = l.createRoot(e);
1210
1261
  S.reactRoot = b, b.render(
1211
- i.createElement(a, {
1262
+ a.createElement(i, {
1212
1263
  theme: t,
1213
1264
  triggerLabel: o,
1214
1265
  container: e
1215
1266
  })
1216
1267
  ), console.log("[AriaCore] React UI mounted");
1217
- } catch (i) {
1218
- console.error("[AriaCore] Failed to mount React UI:", i), S.config?.onError?.(i instanceof Error ? i : new Error(String(i)));
1268
+ } catch (a) {
1269
+ console.error("[AriaCore] Failed to mount React UI:", a), S.config?.onError?.(a instanceof Error ? a : new Error(String(a)));
1219
1270
  }
1220
1271
  }
1221
1272
  /**
@@ -1232,7 +1283,7 @@ function Ie(r) {
1232
1283
  if (!Sr(r))
1233
1284
  return null;
1234
1285
  try {
1235
- const o = r.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), i = o.padEnd(o.length + (4 - o.length % 4) % 4, "="), l = atob(i);
1286
+ const o = r.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), a = o.padEnd(o.length + (4 - o.length % 4) % 4, "="), l = atob(a);
1236
1287
  return JSON.parse(l);
1237
1288
  } catch (e) {
1238
1289
  return console.error("Failed to decode JWT:", e), null;
@@ -1265,12 +1316,12 @@ function St(r) {
1265
1316
  exp: null,
1266
1317
  iat: null
1267
1318
  };
1268
- const t = Er(r), o = typeof e.exp == "number" ? e.exp : null, i = typeof e.iat == "number" ? e.iat : null;
1319
+ const t = Er(r), o = typeof e.exp == "number" ? e.exp : null, a = typeof e.iat == "number" ? e.iat : null;
1269
1320
  return {
1270
1321
  sessionId: t,
1271
1322
  payload: e,
1272
1323
  exp: o,
1273
- iat: i
1324
+ iat: a
1274
1325
  };
1275
1326
  }
1276
1327
  function Et(r) {
@@ -1285,33 +1336,33 @@ const Ke = ({
1285
1336
  styles: e = "",
1286
1337
  className: t,
1287
1338
  style: o,
1288
- as: i = "div"
1339
+ as: a = "div"
1289
1340
  }) => {
1290
- const l = me(null), [a, b] = I(null);
1341
+ const l = me(null), [i, b] = I(null);
1291
1342
  ee(() => {
1292
1343
  const f = l.current;
1293
1344
  if (!f) return;
1294
- let A = f.shadowRoot;
1295
- A || (A = f.attachShadow({ mode: "open" })), b(A);
1345
+ let x = f.shadowRoot;
1346
+ x || (x = f.attachShadow({ mode: "open" })), b(x);
1296
1347
  }, []), ee(() => {
1297
- if (!a || !e) return;
1298
- const f = a.querySelector("style[data-aria-styles]");
1348
+ if (!i || !e) return;
1349
+ const f = i.querySelector("style[data-aria-styles]");
1299
1350
  if (f) {
1300
1351
  f.textContent = e;
1301
1352
  return;
1302
1353
  }
1303
- const A = document.createElement("style");
1304
- return A.setAttribute("data-aria-styles", "true"), A.textContent = e, a.prepend(A), () => {
1305
- A.remove();
1354
+ const x = document.createElement("style");
1355
+ return x.setAttribute("data-aria-styles", "true"), x.textContent = e, i.prepend(x), () => {
1356
+ x.remove();
1306
1357
  };
1307
- }, [a, e]);
1358
+ }, [i, e]);
1308
1359
  const [d, m] = I(null);
1309
1360
  return ee(() => {
1310
- if (!a) return;
1311
- let f = a.querySelector(".aria-shadow-content");
1312
- f || (f = document.createElement("div"), f.className = "aria-shadow-content", a.appendChild(f)), m(f);
1313
- }, [a]), /* @__PURE__ */ n(
1314
- i,
1361
+ if (!i) return;
1362
+ let f = i.querySelector(".aria-shadow-content");
1363
+ f || (f = document.createElement("div"), f.className = "aria-shadow-content", i.appendChild(f)), m(f);
1364
+ }, [i]), /* @__PURE__ */ n(
1365
+ a,
1315
1366
  {
1316
1367
  ref: l,
1317
1368
  className: t,
@@ -1327,13 +1378,13 @@ function Xe(r) {
1327
1378
  var e, t, o = "";
1328
1379
  if (typeof r == "string" || typeof r == "number") o += r;
1329
1380
  else if (typeof r == "object") if (Array.isArray(r)) {
1330
- var i = r.length;
1331
- for (e = 0; e < i; e++) r[e] && (t = Xe(r[e])) && (o && (o += " "), o += t);
1381
+ var a = r.length;
1382
+ for (e = 0; e < a; e++) r[e] && (t = Xe(r[e])) && (o && (o += " "), o += t);
1332
1383
  } else for (t in r) r[t] && (o && (o += " "), o += t);
1333
1384
  return o;
1334
1385
  }
1335
1386
  function Cr() {
1336
- for (var r, e, t = 0, o = "", i = arguments.length; t < i; t++) (r = arguments[t]) && (e = Xe(r)) && (o && (o += " "), o += e);
1387
+ for (var r, e, t = 0, o = "", a = arguments.length; t < a; t++) (r = arguments[t]) && (e = Xe(r)) && (o && (o += " "), o += e);
1337
1388
  return o;
1338
1389
  }
1339
1390
  const Nr = (r, e) => {
@@ -1356,34 +1407,34 @@ const Nr = (r, e) => {
1356
1407
  conflictingClassGroupModifiers: o
1357
1408
  } = r;
1358
1409
  return {
1359
- getClassGroupId: (a) => {
1360
- if (a.startsWith("[") && a.endsWith("]"))
1361
- return zr(a);
1362
- const b = a.split(Ee), d = b[0] === "" && b.length > 1 ? 1 : 0;
1410
+ getClassGroupId: (i) => {
1411
+ if (i.startsWith("[") && i.endsWith("]"))
1412
+ return zr(i);
1413
+ const b = i.split(Ee), d = b[0] === "" && b.length > 1 ? 1 : 0;
1363
1414
  return Ye(b, d, e);
1364
1415
  },
1365
- getConflictingClassGroupIds: (a, b) => {
1416
+ getConflictingClassGroupIds: (i, b) => {
1366
1417
  if (b) {
1367
- const d = o[a], m = t[a];
1418
+ const d = o[i], m = t[i];
1368
1419
  return d ? m ? Nr(m, d) : d : m || Le;
1369
1420
  }
1370
- return t[a] || Le;
1421
+ return t[i] || Le;
1371
1422
  }
1372
1423
  };
1373
1424
  }, Ye = (r, e, t) => {
1374
1425
  if (r.length - e === 0)
1375
1426
  return t.classGroupId;
1376
- const i = r[e], l = t.nextPart.get(i);
1427
+ const a = r[e], l = t.nextPart.get(a);
1377
1428
  if (l) {
1378
1429
  const m = Ye(r, e + 1, l);
1379
1430
  if (m) return m;
1380
1431
  }
1381
- const a = t.validators;
1382
- if (a === null)
1432
+ const i = t.validators;
1433
+ if (i === null)
1383
1434
  return;
1384
- const b = e === 0 ? r.join(Ee) : r.slice(e).join(Ee), d = a.length;
1435
+ const b = e === 0 ? r.join(Ee) : r.slice(e).join(Ee), d = i.length;
1385
1436
  for (let m = 0; m < d; m++) {
1386
- const f = a[m];
1437
+ const f = i[m];
1387
1438
  if (f.validator(b))
1388
1439
  return f.classGroupId;
1389
1440
  }
@@ -1399,51 +1450,51 @@ const Nr = (r, e) => {
1399
1450
  }, Vr = (r, e) => {
1400
1451
  const t = Ze();
1401
1452
  for (const o in r) {
1402
- const i = r[o];
1403
- ze(i, t, o, e);
1453
+ const a = r[o];
1454
+ ze(a, t, o, e);
1404
1455
  }
1405
1456
  return t;
1406
1457
  }, ze = (r, e, t, o) => {
1407
- const i = r.length;
1408
- for (let l = 0; l < i; l++) {
1409
- const a = r[l];
1410
- jr(a, e, t, o);
1458
+ const a = r.length;
1459
+ for (let l = 0; l < a; l++) {
1460
+ const i = r[l];
1461
+ Hr(i, e, t, o);
1411
1462
  }
1412
- }, jr = (r, e, t, o) => {
1463
+ }, Hr = (r, e, t, o) => {
1413
1464
  if (typeof r == "string") {
1414
- Dr(r, e, t);
1465
+ jr(r, e, t);
1415
1466
  return;
1416
1467
  }
1417
1468
  if (typeof r == "function") {
1418
- Hr(r, e, t, o);
1469
+ Dr(r, e, t, o);
1419
1470
  return;
1420
1471
  }
1421
1472
  Wr(r, e, t, o);
1422
- }, Dr = (r, e, t) => {
1473
+ }, jr = (r, e, t) => {
1423
1474
  const o = r === "" ? e : $e(e, r);
1424
1475
  o.classGroupId = t;
1425
- }, Hr = (r, e, t, o) => {
1426
- if (Or(r)) {
1476
+ }, Dr = (r, e, t, o) => {
1477
+ if (Br(r)) {
1427
1478
  ze(r(o), e, t, o);
1428
1479
  return;
1429
1480
  }
1430
1481
  e.validators === null && (e.validators = []), e.validators.push(Rr(t, r));
1431
1482
  }, Wr = (r, e, t, o) => {
1432
- const i = Object.entries(r), l = i.length;
1433
- for (let a = 0; a < l; a++) {
1434
- const [b, d] = i[a];
1483
+ const a = Object.entries(r), l = a.length;
1484
+ for (let i = 0; i < l; i++) {
1485
+ const [b, d] = a[i];
1435
1486
  ze(d, $e(e, b), t, o);
1436
1487
  }
1437
1488
  }, $e = (r, e) => {
1438
1489
  let t = r;
1439
- const o = e.split(Ee), i = o.length;
1440
- for (let l = 0; l < i; l++) {
1441
- const a = o[l];
1442
- let b = t.nextPart.get(a);
1443
- b || (b = Ze(), t.nextPart.set(a, b)), t = b;
1490
+ const o = e.split(Ee), a = o.length;
1491
+ for (let l = 0; l < a; l++) {
1492
+ const i = o[l];
1493
+ let b = t.nextPart.get(i);
1494
+ b || (b = Ze(), t.nextPart.set(i, b)), t = b;
1444
1495
  }
1445
1496
  return t;
1446
- }, Or = (r) => "isThemeGetter" in r && r.isThemeGetter === !0, Br = (r) => {
1497
+ }, Br = (r) => "isThemeGetter" in r && r.isThemeGetter === !0, Or = (r) => {
1447
1498
  if (r < 1)
1448
1499
  return {
1449
1500
  get: () => {
@@ -1452,71 +1503,71 @@ const Nr = (r, e) => {
1452
1503
  }
1453
1504
  };
1454
1505
  let e = 0, t = /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ Object.create(null);
1455
- const i = (l, a) => {
1456
- t[l] = a, e++, e > r && (e = 0, o = t, t = /* @__PURE__ */ Object.create(null));
1506
+ const a = (l, i) => {
1507
+ t[l] = i, e++, e > r && (e = 0, o = t, t = /* @__PURE__ */ Object.create(null));
1457
1508
  };
1458
1509
  return {
1459
1510
  get(l) {
1460
- let a = t[l];
1461
- if (a !== void 0)
1462
- return a;
1463
- if ((a = o[l]) !== void 0)
1464
- return i(l, a), a;
1511
+ let i = t[l];
1512
+ if (i !== void 0)
1513
+ return i;
1514
+ if ((i = o[l]) !== void 0)
1515
+ return a(l, i), i;
1465
1516
  },
1466
- set(l, a) {
1467
- l in t ? t[l] = a : i(l, a);
1517
+ set(l, i) {
1518
+ l in t ? t[l] = i : a(l, i);
1468
1519
  }
1469
1520
  };
1470
- }, Re = "!", _e = ":", Fr = [], Ge = (r, e, t, o, i) => ({
1521
+ }, Re = "!", _e = ":", Fr = [], Ge = (r, e, t, o, a) => ({
1471
1522
  modifiers: r,
1472
1523
  hasImportantModifier: e,
1473
1524
  baseClassName: t,
1474
1525
  maybePostfixModifierPosition: o,
1475
- isExternal: i
1526
+ isExternal: a
1476
1527
  }), Ur = (r) => {
1477
1528
  const {
1478
1529
  prefix: e,
1479
1530
  experimentalParseClassName: t
1480
1531
  } = r;
1481
- let o = (i) => {
1532
+ let o = (a) => {
1482
1533
  const l = [];
1483
- let a = 0, b = 0, d = 0, m;
1484
- const f = i.length;
1485
- for (let H = 0; H < f; H++) {
1486
- const P = i[H];
1487
- if (a === 0 && b === 0) {
1534
+ let i = 0, b = 0, d = 0, m;
1535
+ const f = a.length;
1536
+ for (let D = 0; D < f; D++) {
1537
+ const P = a[D];
1538
+ if (i === 0 && b === 0) {
1488
1539
  if (P === _e) {
1489
- l.push(i.slice(d, H)), d = H + 1;
1540
+ l.push(a.slice(d, D)), d = D + 1;
1490
1541
  continue;
1491
1542
  }
1492
1543
  if (P === "/") {
1493
- m = H;
1544
+ m = D;
1494
1545
  continue;
1495
1546
  }
1496
1547
  }
1497
- P === "[" ? a++ : P === "]" ? a-- : P === "(" ? b++ : P === ")" && b--;
1548
+ P === "[" ? i++ : P === "]" ? i-- : P === "(" ? b++ : P === ")" && b--;
1498
1549
  }
1499
- const A = l.length === 0 ? i : i.slice(d);
1500
- let N = A, z = !1;
1501
- A.endsWith(Re) ? (N = A.slice(0, -1), z = !0) : (
1550
+ 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) : (
1502
1553
  /**
1503
1554
  * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
1504
1555
  * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
1505
1556
  */
1506
- A.startsWith(Re) && (N = A.slice(1), z = !0)
1557
+ x.startsWith(Re) && (N = x.slice(1), z = !0)
1507
1558
  );
1508
- const D = m && m > d ? m - d : void 0;
1509
- return Ge(l, z, N, D);
1559
+ const j = m && m > d ? m - d : void 0;
1560
+ return Ge(l, z, N, j);
1510
1561
  };
1511
1562
  if (e) {
1512
- const i = e + _e, l = o;
1513
- o = (a) => a.startsWith(i) ? l(a.slice(i.length)) : Ge(Fr, !1, a, void 0, !0);
1563
+ const a = e + _e, l = o;
1564
+ o = (i) => i.startsWith(a) ? l(i.slice(a.length)) : Ge(Fr, !1, i, void 0, !0);
1514
1565
  }
1515
1566
  if (t) {
1516
- const i = o;
1567
+ const a = o;
1517
1568
  o = (l) => t({
1518
1569
  className: l,
1519
- parseClassName: i
1570
+ parseClassName: a
1520
1571
  });
1521
1572
  }
1522
1573
  return o;
@@ -1526,15 +1577,15 @@ const Nr = (r, e) => {
1526
1577
  e.set(t, 1e6 + o);
1527
1578
  }), (t) => {
1528
1579
  const o = [];
1529
- let i = [];
1580
+ let a = [];
1530
1581
  for (let l = 0; l < t.length; l++) {
1531
- const a = t[l], b = a[0] === "[", d = e.has(a);
1532
- b || d ? (i.length > 0 && (i.sort(), o.push(...i), i = []), o.push(a)) : i.push(a);
1582
+ const i = t[l], b = i[0] === "[", d = e.has(i);
1583
+ b || d ? (a.length > 0 && (a.sort(), o.push(...a), a = []), o.push(i)) : a.push(i);
1533
1584
  }
1534
- return i.length > 0 && (i.sort(), o.push(...i)), o;
1585
+ return a.length > 0 && (a.sort(), o.push(...a)), o;
1535
1586
  };
1536
1587
  }, _r = (r) => ({
1537
- cache: Br(r.cacheSize),
1588
+ cache: Or(r.cacheSize),
1538
1589
  parseClassName: Ur(r),
1539
1590
  sortModifiers: Lr(r),
1540
1591
  ...Ir(r)
@@ -1542,51 +1593,51 @@ const Nr = (r, e) => {
1542
1593
  const {
1543
1594
  parseClassName: t,
1544
1595
  getClassGroupId: o,
1545
- getConflictingClassGroupIds: i,
1596
+ getConflictingClassGroupIds: a,
1546
1597
  sortModifiers: l
1547
- } = e, a = [], b = r.trim().split(Gr);
1598
+ } = e, i = [], b = r.trim().split(Gr);
1548
1599
  let d = "";
1549
1600
  for (let m = b.length - 1; m >= 0; m -= 1) {
1550
1601
  const f = b[m], {
1551
- isExternal: A,
1602
+ isExternal: x,
1552
1603
  modifiers: N,
1553
1604
  hasImportantModifier: z,
1554
- baseClassName: D,
1555
- maybePostfixModifierPosition: H
1605
+ baseClassName: j,
1606
+ maybePostfixModifierPosition: D
1556
1607
  } = t(f);
1557
- if (A) {
1608
+ if (x) {
1558
1609
  d = f + (d.length > 0 ? " " + d : d);
1559
1610
  continue;
1560
1611
  }
1561
- let P = !!H, G = o(P ? D.substring(0, H) : D);
1612
+ let P = !!D, G = o(P ? j.substring(0, D) : j);
1562
1613
  if (!G) {
1563
1614
  if (!P) {
1564
1615
  d = f + (d.length > 0 ? " " + d : d);
1565
1616
  continue;
1566
1617
  }
1567
- if (G = o(D), !G) {
1618
+ if (G = o(j), !G) {
1568
1619
  d = f + (d.length > 0 ? " " + d : d);
1569
1620
  continue;
1570
1621
  }
1571
1622
  P = !1;
1572
1623
  }
1573
1624
  const K = N.length === 0 ? "" : N.length === 1 ? N[0] : l(N).join(":"), Q = z ? K + Re : K, M = Q + G;
1574
- if (a.indexOf(M) > -1)
1625
+ if (i.indexOf(M) > -1)
1575
1626
  continue;
1576
- a.push(M);
1577
- const L = i(G, P);
1627
+ i.push(M);
1628
+ const L = a(G, P);
1578
1629
  for (let _ = 0; _ < L.length; ++_) {
1579
1630
  const q = L[_];
1580
- a.push(Q + q);
1631
+ i.push(Q + q);
1581
1632
  }
1582
1633
  d = f + (d.length > 0 ? " " + d : d);
1583
1634
  }
1584
1635
  return d;
1585
1636
  }, qr = (...r) => {
1586
- let e = 0, t, o, i = "";
1637
+ let e = 0, t, o, a = "";
1587
1638
  for (; e < r.length; )
1588
- (t = r[e++]) && (o = er(t)) && (i && (i += " "), i += o);
1589
- return i;
1639
+ (t = r[e++]) && (o = er(t)) && (a && (a += " "), a += o);
1640
+ return a;
1590
1641
  }, er = (r) => {
1591
1642
  if (typeof r == "string")
1592
1643
  return r;
@@ -1595,34 +1646,34 @@ const Nr = (r, e) => {
1595
1646
  r[o] && (e = er(r[o])) && (t && (t += " "), t += e);
1596
1647
  return t;
1597
1648
  }, Kr = (r, ...e) => {
1598
- let t, o, i, l;
1599
- const a = (d) => {
1600
- const m = e.reduce((f, A) => A(f), r());
1601
- return t = _r(m), o = t.cache.get, i = t.cache.set, l = b, b(d);
1649
+ let t, o, a, l;
1650
+ const i = (d) => {
1651
+ 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);
1602
1653
  }, b = (d) => {
1603
1654
  const m = o(d);
1604
1655
  if (m)
1605
1656
  return m;
1606
1657
  const f = Qr(d, t);
1607
- return i(d, f), f;
1658
+ return a(d, f), f;
1608
1659
  };
1609
- return l = a, (...d) => l(qr(...d));
1660
+ return l = i, (...d) => l(qr(...d));
1610
1661
  }, Jr = [], T = (r) => {
1611
1662
  const e = (t) => t[r] || Jr;
1612
1663
  return e.isThemeGetter = !0, e;
1613
- }, 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) => (
1664
+ }, 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) => (
1614
1665
  // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
1615
1666
  // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
1616
1667
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
1617
1668
  Yr.test(r) && !$r.test(r)
1618
- ), 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) => {
1669
+ ), 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) => {
1619
1670
  const o = rr.exec(r);
1620
1671
  return o ? o[1] ? e(o[1]) : t(o[2]) : !1;
1621
1672
  }, we = (r, e, t = !1) => {
1622
1673
  const o = tr.exec(r);
1623
1674
  return o ? o[1] ? e(o[1]) : t : !1;
1624
1675
  }, 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 = () => {
1625
- const r = T("color"), e = T("font"), t = T("text"), o = T("font-weight"), i = T("tracking"), l = T("leading"), a = T("breakpoint"), b = T("container"), d = T("spacing"), m = T("radius"), f = T("shadow"), A = T("inset-shadow"), N = T("text-shadow"), z = T("drop-shadow"), D = T("blur"), H = T("perspective"), P = T("aspect"), G = T("ease"), K = T("animate"), Q = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], M = () => [
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 = () => [
1626
1677
  "center",
1627
1678
  "top",
1628
1679
  "bottom",
@@ -1640,7 +1691,7 @@ const Nr = (r, e) => {
1640
1691
  "bottom-left",
1641
1692
  // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
1642
1693
  "left-bottom"
1643
- ], 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], O = () => ["auto", {
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", {
1644
1695
  span: ["full", te, h, g]
1645
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, {
1646
1697
  position: [h, g]
@@ -1656,14 +1707,14 @@ const Nr = (r, e) => {
1656
1707
  m,
1657
1708
  h,
1658
1709
  g
1659
- ], B = () => ["", 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 = () => [
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 = () => [
1660
1711
  // Deprecated since Tailwind CSS v4.0.0
1661
1712
  "",
1662
1713
  "none",
1663
- D,
1714
+ j,
1664
1715
  h,
1665
1716
  g
1666
- ], ie = () => ["none", x, h, g], he = () => ["none", x, h, g], be = () => [x, h, g], ue = () => [pe, "full", ...y()];
1717
+ ], ie = () => ["none", A, h, g], he = () => ["none", A, h, g], be = () => [A, h, g], ue = () => [pe, "full", ...y()];
1667
1718
  return {
1668
1719
  cacheSize: 500,
1669
1720
  theme: {
@@ -1682,7 +1733,7 @@ const Nr = (r, e) => {
1682
1733
  perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
1683
1734
  radius: [$],
1684
1735
  shadow: [$],
1685
- spacing: ["px", x],
1736
+ spacing: ["px", A],
1686
1737
  text: [$],
1687
1738
  "text-shadow": [$],
1688
1739
  tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
@@ -1709,7 +1760,7 @@ const Nr = (r, e) => {
1709
1760
  * @see https://tailwindcss.com/docs/columns
1710
1761
  */
1711
1762
  columns: [{
1712
- columns: [x, g, h, b]
1763
+ columns: [A, g, h, b]
1713
1764
  }],
1714
1765
  /**
1715
1766
  * Break After
@@ -1940,21 +1991,21 @@ const Nr = (r, e) => {
1940
1991
  * @see https://tailwindcss.com/docs/flex
1941
1992
  */
1942
1993
  flex: [{
1943
- flex: [x, pe, "auto", "initial", "none", g]
1994
+ flex: [A, pe, "auto", "initial", "none", g]
1944
1995
  }],
1945
1996
  /**
1946
1997
  * Flex Grow
1947
1998
  * @see https://tailwindcss.com/docs/flex-grow
1948
1999
  */
1949
2000
  grow: [{
1950
- grow: ["", x, h, g]
2001
+ grow: ["", A, h, g]
1951
2002
  }],
1952
2003
  /**
1953
2004
  * Flex Shrink
1954
2005
  * @see https://tailwindcss.com/docs/flex-shrink
1955
2006
  */
1956
2007
  shrink: [{
1957
- shrink: ["", x, h, g]
2008
+ shrink: ["", A, h, g]
1958
2009
  }],
1959
2010
  /**
1960
2011
  * Order
@@ -1975,7 +2026,7 @@ const Nr = (r, e) => {
1975
2026
  * @see https://tailwindcss.com/docs/grid-column
1976
2027
  */
1977
2028
  "col-start-end": [{
1978
- col: O()
2029
+ col: B()
1979
2030
  }],
1980
2031
  /**
1981
2032
  * Grid Column Start
@@ -2003,7 +2054,7 @@ const Nr = (r, e) => {
2003
2054
  * @see https://tailwindcss.com/docs/grid-row
2004
2055
  */
2005
2056
  "row-start-end": [{
2006
- row: O()
2057
+ row: B()
2007
2058
  }],
2008
2059
  /**
2009
2060
  * Grid Row Start
@@ -2322,7 +2373,7 @@ const Nr = (r, e) => {
2322
2373
  "prose",
2323
2374
  /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
2324
2375
  {
2325
- screen: [a]
2376
+ screen: [i]
2326
2377
  },
2327
2378
  ...V()
2328
2379
  ]
@@ -2424,14 +2475,14 @@ const Nr = (r, e) => {
2424
2475
  * @see https://tailwindcss.com/docs/letter-spacing
2425
2476
  */
2426
2477
  tracking: [{
2427
- tracking: [i, h, g]
2478
+ tracking: [a, h, g]
2428
2479
  }],
2429
2480
  /**
2430
2481
  * Line Clamp
2431
2482
  * @see https://tailwindcss.com/docs/line-clamp
2432
2483
  */
2433
2484
  "line-clamp": [{
2434
- "line-clamp": [x, "none", h, Ce]
2485
+ "line-clamp": [A, "none", h, Ce]
2435
2486
  }],
2436
2487
  /**
2437
2488
  * Line Height
@@ -2504,7 +2555,7 @@ const Nr = (r, e) => {
2504
2555
  * @see https://tailwindcss.com/docs/text-decoration-thickness
2505
2556
  */
2506
2557
  "text-decoration-thickness": [{
2507
- decoration: [x, "from-font", "auto", h, se]
2558
+ decoration: [A, "from-font", "auto", h, se]
2508
2559
  }],
2509
2560
  /**
2510
2561
  * Text Decoration Color
@@ -2518,7 +2569,7 @@ const Nr = (r, e) => {
2518
2569
  * @see https://tailwindcss.com/docs/text-underline-offset
2519
2570
  */
2520
2571
  "underline-offset": [{
2521
- "underline-offset": [x, "auto", h, g]
2572
+ "underline-offset": [A, "auto", h, g]
2522
2573
  }],
2523
2574
  /**
2524
2575
  * Text Transform
@@ -2806,70 +2857,70 @@ const Nr = (r, e) => {
2806
2857
  * @see https://tailwindcss.com/docs/border-width
2807
2858
  */
2808
2859
  "border-w": [{
2809
- border: B()
2860
+ border: O()
2810
2861
  }],
2811
2862
  /**
2812
2863
  * Border Width X
2813
2864
  * @see https://tailwindcss.com/docs/border-width
2814
2865
  */
2815
2866
  "border-w-x": [{
2816
- "border-x": B()
2867
+ "border-x": O()
2817
2868
  }],
2818
2869
  /**
2819
2870
  * Border Width Y
2820
2871
  * @see https://tailwindcss.com/docs/border-width
2821
2872
  */
2822
2873
  "border-w-y": [{
2823
- "border-y": B()
2874
+ "border-y": O()
2824
2875
  }],
2825
2876
  /**
2826
2877
  * Border Width Start
2827
2878
  * @see https://tailwindcss.com/docs/border-width
2828
2879
  */
2829
2880
  "border-w-s": [{
2830
- "border-s": B()
2881
+ "border-s": O()
2831
2882
  }],
2832
2883
  /**
2833
2884
  * Border Width End
2834
2885
  * @see https://tailwindcss.com/docs/border-width
2835
2886
  */
2836
2887
  "border-w-e": [{
2837
- "border-e": B()
2888
+ "border-e": O()
2838
2889
  }],
2839
2890
  /**
2840
2891
  * Border Width Top
2841
2892
  * @see https://tailwindcss.com/docs/border-width
2842
2893
  */
2843
2894
  "border-w-t": [{
2844
- "border-t": B()
2895
+ "border-t": O()
2845
2896
  }],
2846
2897
  /**
2847
2898
  * Border Width Right
2848
2899
  * @see https://tailwindcss.com/docs/border-width
2849
2900
  */
2850
2901
  "border-w-r": [{
2851
- "border-r": B()
2902
+ "border-r": O()
2852
2903
  }],
2853
2904
  /**
2854
2905
  * Border Width Bottom
2855
2906
  * @see https://tailwindcss.com/docs/border-width
2856
2907
  */
2857
2908
  "border-w-b": [{
2858
- "border-b": B()
2909
+ "border-b": O()
2859
2910
  }],
2860
2911
  /**
2861
2912
  * Border Width Left
2862
2913
  * @see https://tailwindcss.com/docs/border-width
2863
2914
  */
2864
2915
  "border-w-l": [{
2865
- "border-l": B()
2916
+ "border-l": O()
2866
2917
  }],
2867
2918
  /**
2868
2919
  * Divide Width X
2869
2920
  * @see https://tailwindcss.com/docs/border-width#between-children
2870
2921
  */
2871
2922
  "divide-x": [{
2872
- "divide-x": B()
2923
+ "divide-x": O()
2873
2924
  }],
2874
2925
  /**
2875
2926
  * Divide Width X Reverse
@@ -2881,7 +2932,7 @@ const Nr = (r, e) => {
2881
2932
  * @see https://tailwindcss.com/docs/border-width#between-children
2882
2933
  */
2883
2934
  "divide-y": [{
2884
- "divide-y": B()
2935
+ "divide-y": O()
2885
2936
  }],
2886
2937
  /**
2887
2938
  * Divide Width Y Reverse
@@ -2984,14 +3035,14 @@ const Nr = (r, e) => {
2984
3035
  * @see https://tailwindcss.com/docs/outline-offset
2985
3036
  */
2986
3037
  "outline-offset": [{
2987
- "outline-offset": [x, h, g]
3038
+ "outline-offset": [A, h, g]
2988
3039
  }],
2989
3040
  /**
2990
3041
  * Outline Width
2991
3042
  * @see https://tailwindcss.com/docs/outline-width
2992
3043
  */
2993
3044
  "outline-w": [{
2994
- outline: ["", x, ye, se]
3045
+ outline: ["", A, ye, se]
2995
3046
  }],
2996
3047
  /**
2997
3048
  * Outline Color
@@ -3029,7 +3080,7 @@ const Nr = (r, e) => {
3029
3080
  * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
3030
3081
  */
3031
3082
  "inset-shadow": [{
3032
- "inset-shadow": ["none", A, Se, ke]
3083
+ "inset-shadow": ["none", x, Se, ke]
3033
3084
  }],
3034
3085
  /**
3035
3086
  * Inset Box Shadow Color
@@ -3043,7 +3094,7 @@ const Nr = (r, e) => {
3043
3094
  * @see https://tailwindcss.com/docs/box-shadow#adding-a-ring
3044
3095
  */
3045
3096
  "ring-w": [{
3046
- ring: B()
3097
+ ring: O()
3047
3098
  }],
3048
3099
  /**
3049
3100
  * Ring Width Inset
@@ -3066,7 +3117,7 @@ const Nr = (r, e) => {
3066
3117
  * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
3067
3118
  */
3068
3119
  "ring-offset-w": [{
3069
- "ring-offset": [x, se]
3120
+ "ring-offset": [A, se]
3070
3121
  }],
3071
3122
  /**
3072
3123
  * Ring Offset Color
@@ -3082,7 +3133,7 @@ const Nr = (r, e) => {
3082
3133
  * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring
3083
3134
  */
3084
3135
  "inset-ring-w": [{
3085
- "inset-ring": B()
3136
+ "inset-ring": O()
3086
3137
  }],
3087
3138
  /**
3088
3139
  * Inset Ring Color
@@ -3110,7 +3161,7 @@ const Nr = (r, e) => {
3110
3161
  * @see https://tailwindcss.com/docs/opacity
3111
3162
  */
3112
3163
  opacity: [{
3113
- opacity: [x, h, g]
3164
+ opacity: [A, h, g]
3114
3165
  }],
3115
3166
  /**
3116
3167
  * Mix Blend Mode
@@ -3145,7 +3196,7 @@ const Nr = (r, e) => {
3145
3196
  * @see https://tailwindcss.com/docs/mask-image
3146
3197
  */
3147
3198
  "mask-image-linear-pos": [{
3148
- "mask-linear": [x]
3199
+ "mask-linear": [A]
3149
3200
  }],
3150
3201
  "mask-image-linear-from-pos": [{
3151
3202
  "mask-linear-from": C()
@@ -3259,7 +3310,7 @@ const Nr = (r, e) => {
3259
3310
  "mask-radial-at": M()
3260
3311
  }],
3261
3312
  "mask-image-conic-pos": [{
3262
- "mask-conic": [x]
3313
+ "mask-conic": [A]
3263
3314
  }],
3264
3315
  "mask-image-conic-from-pos": [{
3265
3316
  "mask-conic-from": C()
@@ -3350,14 +3401,14 @@ const Nr = (r, e) => {
3350
3401
  * @see https://tailwindcss.com/docs/brightness
3351
3402
  */
3352
3403
  brightness: [{
3353
- brightness: [x, h, g]
3404
+ brightness: [A, h, g]
3354
3405
  }],
3355
3406
  /**
3356
3407
  * Contrast
3357
3408
  * @see https://tailwindcss.com/docs/contrast
3358
3409
  */
3359
3410
  contrast: [{
3360
- contrast: [x, h, g]
3411
+ contrast: [A, h, g]
3361
3412
  }],
3362
3413
  /**
3363
3414
  * Drop Shadow
@@ -3385,35 +3436,35 @@ const Nr = (r, e) => {
3385
3436
  * @see https://tailwindcss.com/docs/grayscale
3386
3437
  */
3387
3438
  grayscale: [{
3388
- grayscale: ["", x, h, g]
3439
+ grayscale: ["", A, h, g]
3389
3440
  }],
3390
3441
  /**
3391
3442
  * Hue Rotate
3392
3443
  * @see https://tailwindcss.com/docs/hue-rotate
3393
3444
  */
3394
3445
  "hue-rotate": [{
3395
- "hue-rotate": [x, h, g]
3446
+ "hue-rotate": [A, h, g]
3396
3447
  }],
3397
3448
  /**
3398
3449
  * Invert
3399
3450
  * @see https://tailwindcss.com/docs/invert
3400
3451
  */
3401
3452
  invert: [{
3402
- invert: ["", x, h, g]
3453
+ invert: ["", A, h, g]
3403
3454
  }],
3404
3455
  /**
3405
3456
  * Saturate
3406
3457
  * @see https://tailwindcss.com/docs/saturate
3407
3458
  */
3408
3459
  saturate: [{
3409
- saturate: [x, h, g]
3460
+ saturate: [A, h, g]
3410
3461
  }],
3411
3462
  /**
3412
3463
  * Sepia
3413
3464
  * @see https://tailwindcss.com/docs/sepia
3414
3465
  */
3415
3466
  sepia: [{
3416
- sepia: ["", x, h, g]
3467
+ sepia: ["", A, h, g]
3417
3468
  }],
3418
3469
  /**
3419
3470
  * Backdrop Filter
@@ -3440,56 +3491,56 @@ const Nr = (r, e) => {
3440
3491
  * @see https://tailwindcss.com/docs/backdrop-brightness
3441
3492
  */
3442
3493
  "backdrop-brightness": [{
3443
- "backdrop-brightness": [x, h, g]
3494
+ "backdrop-brightness": [A, h, g]
3444
3495
  }],
3445
3496
  /**
3446
3497
  * Backdrop Contrast
3447
3498
  * @see https://tailwindcss.com/docs/backdrop-contrast
3448
3499
  */
3449
3500
  "backdrop-contrast": [{
3450
- "backdrop-contrast": [x, h, g]
3501
+ "backdrop-contrast": [A, h, g]
3451
3502
  }],
3452
3503
  /**
3453
3504
  * Backdrop Grayscale
3454
3505
  * @see https://tailwindcss.com/docs/backdrop-grayscale
3455
3506
  */
3456
3507
  "backdrop-grayscale": [{
3457
- "backdrop-grayscale": ["", x, h, g]
3508
+ "backdrop-grayscale": ["", A, h, g]
3458
3509
  }],
3459
3510
  /**
3460
3511
  * Backdrop Hue Rotate
3461
3512
  * @see https://tailwindcss.com/docs/backdrop-hue-rotate
3462
3513
  */
3463
3514
  "backdrop-hue-rotate": [{
3464
- "backdrop-hue-rotate": [x, h, g]
3515
+ "backdrop-hue-rotate": [A, h, g]
3465
3516
  }],
3466
3517
  /**
3467
3518
  * Backdrop Invert
3468
3519
  * @see https://tailwindcss.com/docs/backdrop-invert
3469
3520
  */
3470
3521
  "backdrop-invert": [{
3471
- "backdrop-invert": ["", x, h, g]
3522
+ "backdrop-invert": ["", A, h, g]
3472
3523
  }],
3473
3524
  /**
3474
3525
  * Backdrop Opacity
3475
3526
  * @see https://tailwindcss.com/docs/backdrop-opacity
3476
3527
  */
3477
3528
  "backdrop-opacity": [{
3478
- "backdrop-opacity": [x, h, g]
3529
+ "backdrop-opacity": [A, h, g]
3479
3530
  }],
3480
3531
  /**
3481
3532
  * Backdrop Saturate
3482
3533
  * @see https://tailwindcss.com/docs/backdrop-saturate
3483
3534
  */
3484
3535
  "backdrop-saturate": [{
3485
- "backdrop-saturate": [x, h, g]
3536
+ "backdrop-saturate": [A, h, g]
3486
3537
  }],
3487
3538
  /**
3488
3539
  * Backdrop Sepia
3489
3540
  * @see https://tailwindcss.com/docs/backdrop-sepia
3490
3541
  */
3491
3542
  "backdrop-sepia": [{
3492
- "backdrop-sepia": ["", x, h, g]
3543
+ "backdrop-sepia": ["", A, h, g]
3493
3544
  }],
3494
3545
  // --------------
3495
3546
  // --- Tables ---
@@ -3558,7 +3609,7 @@ const Nr = (r, e) => {
3558
3609
  * @see https://tailwindcss.com/docs/transition-duration
3559
3610
  */
3560
3611
  duration: [{
3561
- duration: [x, "initial", h, g]
3612
+ duration: [A, "initial", h, g]
3562
3613
  }],
3563
3614
  /**
3564
3615
  * Transition Timing Function
@@ -3572,7 +3623,7 @@ const Nr = (r, e) => {
3572
3623
  * @see https://tailwindcss.com/docs/transition-delay
3573
3624
  */
3574
3625
  delay: [{
3575
- delay: [x, h, g]
3626
+ delay: [A, h, g]
3576
3627
  }],
3577
3628
  /**
3578
3629
  * Animation
@@ -3596,7 +3647,7 @@ const Nr = (r, e) => {
3596
3647
  * @see https://tailwindcss.com/docs/perspective
3597
3648
  */
3598
3649
  perspective: [{
3599
- perspective: [H, h, g]
3650
+ perspective: [D, h, g]
3600
3651
  }],
3601
3652
  /**
3602
3653
  * Perspective Origin
@@ -4016,7 +4067,7 @@ const Nr = (r, e) => {
4016
4067
  * @see https://tailwindcss.com/docs/stroke-width
4017
4068
  */
4018
4069
  "stroke-w": [{
4019
- stroke: [x, ye, se, Ce]
4070
+ stroke: [A, ye, se, Ce]
4020
4071
  }],
4021
4072
  /**
4022
4073
  * Stroke
@@ -4100,11 +4151,11 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4100
4151
  triggerLabel: e,
4101
4152
  container: t
4102
4153
  }) => {
4103
- const [o, i] = I(!1), [l, a] = I(!1), [b, d] = I(!1), [m, f] = I(!1), [A, N] = I([]), [z, D] = I(""), [H, P] = I(!1), [G, K] = I(!1), [Q, M] = I(null), [, L] = I("user"), [_, q] = I("bottom-right"), [y, W] = I({
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({
4104
4155
  isActive: !1,
4105
4156
  toolName: null,
4106
4157
  toolData: null
4107
- }), [s, O] = I({
4158
+ }), [s, B] = I({
4108
4159
  session_id: null,
4109
4160
  token: null,
4110
4161
  expires_at: null,
@@ -4112,61 +4163,61 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4112
4163
  lastError: null,
4113
4164
  isPreloaded: !1,
4114
4165
  isRefreshing: !1
4115
- }), [Y, re] = I("idle"), [, J] = I(!1), w = me(null), p = me(null), V = j((u) => {
4166
+ }), [Y, re] = I("idle"), [, J] = I(!1), w = me(null), p = me(null), V = H((u) => {
4116
4167
  const { newStatus: k } = u.data;
4117
4168
  re(k), k === "preloading" || k === "connecting" ? o && f(!0) : k === "ready" ? (f(!1), d(!0)) : k === "error" && f(!1);
4118
- }, [o]), v = j((u) => {
4169
+ }, [o]), v = H((u) => {
4119
4170
  const k = u.data;
4120
4171
  if (console.log("[AriaStandaloneUI] Session ready event:", k), w.current) {
4121
4172
  const F = w.current.getSessionState();
4122
- O(F);
4173
+ B(F);
4123
4174
  const ne = k?.lazyInit === !0;
4124
4175
  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));
4125
4176
  }
4126
- }, []), le = j((u) => {
4177
+ }, []), le = H((u) => {
4127
4178
  const k = u.error?.message || "Session error";
4128
4179
  if (console.error("[AriaStandaloneUI] Session error:", k), M(k), f(!1), w.current) {
4129
4180
  const F = w.current.getSessionState();
4130
- O(F);
4181
+ B(F);
4131
4182
  }
4132
- }, []), ce = j((u) => {
4183
+ }, []), ce = H((u) => {
4133
4184
  const { connected: k } = u.data;
4134
4185
  if (d(k), !k && w.current) {
4135
4186
  const F = w.current.getSessionState();
4136
- O(F);
4187
+ B(F);
4137
4188
  }
4138
- }, []), de = j((u) => {
4189
+ }, []), de = H((u) => {
4139
4190
  const { messages: k } = u.data;
4140
4191
  k && N(k);
4141
- }, []), oe = j((u) => {
4192
+ }, []), oe = H((u) => {
4142
4193
  const { liveTranscript: k } = u.data;
4143
- k !== void 0 && D(k);
4144
- }, []), R = j((u) => {
4194
+ k !== void 0 && j(k);
4195
+ }, []), R = H((u) => {
4145
4196
  const k = u.data;
4146
4197
  W({
4147
4198
  isActive: k.isActive,
4148
4199
  toolName: k.toolName,
4149
4200
  toolData: k.toolData
4150
4201
  });
4151
- }, []), B = j((u) => {
4202
+ }, []), O = H((u) => {
4152
4203
  const k = p.current;
4153
4204
  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));
4154
- }, []), X = j((u = "user") => {
4155
- if (L(u), q(u === "websocket" ? "center" : "bottom-right"), i(!0), a(!1), M(null), !w.current) return;
4205
+ }, []), X = H((u = "user") => {
4206
+ if (L(u), q(u === "websocket" ? "center" : "bottom-right"), a(!0), i(!1), M(null), !w.current) return;
4156
4207
  const k = w.current.isSessionPaused();
4157
4208
  if (console.log("[AriaStandaloneUI] openAssistant called, isPaused:", k), k) {
4158
4209
  f(!0), w.current.resumeSession().then((Z) => {
4159
4210
  if (J(!1), Z) {
4160
4211
  f(!1), d(!0);
4161
4212
  const Pe = w.current.getSessionState();
4162
- O(Pe), N(w.current.getChatMessages()), p.current && w.current && (console.log("[AriaStandaloneUI] Attaching video stream after resume"), w.current.attachToVideoElement(p.current));
4213
+ B(Pe), N(w.current.getChatMessages()), p.current && w.current && (console.log("[AriaStandaloneUI] Attaching video stream after resume"), w.current.attachToVideoElement(p.current));
4163
4214
  } else
4164
4215
  w.current.hasSessionToken() ? w.current.initializeSessionOnDemand().then(() => {
4165
4216
  f(!1), d(!0);
4166
- const Ae = w.current.getSessionState();
4167
- O(Ae), p.current && w.current && (console.log("[AriaStandaloneUI] Attaching video stream after initialization (from resume)"), w.current.attachToVideoElement(p.current));
4168
- }).catch((Ae) => {
4169
- f(!1), M(Ae instanceof Error ? Ae.message : "Failed to start new session");
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");
4170
4221
  }) : w.current.isConnected() || w.current.connect();
4171
4222
  }).catch((Z) => {
4172
4223
  f(!1), J(!1), M(Z instanceof Error ? Z.message : "Failed to resume session");
@@ -4177,17 +4228,17 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4177
4228
  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(() => {
4178
4229
  f(!1), d(!0);
4179
4230
  const Z = w.current.getSessionState();
4180
- O(Z), p.current && w.current && (console.log("[AriaStandaloneUI] Attaching video stream after initialization"), w.current.attachToVideoElement(p.current));
4231
+ B(Z), p.current && w.current && (console.log("[AriaStandaloneUI] Attaching video stream after initialization"), w.current.attachToVideoElement(p.current));
4181
4232
  }).catch((Z) => {
4182
4233
  f(!1), M(Z instanceof Error ? Z.message : "Failed to initialize session");
4183
4234
  })) : (console.warn("[AriaStandaloneUI] No token available, button should have been disabled"), M("Session not ready. Please wait and try again."));
4184
- }, []), ae = j(() => {
4185
- a(!0);
4186
- }, []), C = j(() => {
4187
- a(!1);
4188
- }, []), ge = j(() => {
4189
- i(!1), a(!1), w.current && (p.current && w.current.detachFromVideoElement(p.current), D(""), console.log("[AriaStandaloneUI] Pausing session (widget closed)"), w.current.pauseSession(), J(!0));
4190
- }, []), ie = j(() => {
4235
+ }, []), ae = H(() => {
4236
+ i(!0);
4237
+ }, []), C = H(() => {
4238
+ i(!1);
4239
+ }, []), ge = H(() => {
4240
+ 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(() => {
4191
4242
  console.log("[AriaStandaloneUI] WebSocket trigger event"), X("websocket");
4192
4243
  }, [X]);
4193
4244
  ee(() => {
@@ -4197,7 +4248,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4197
4248
  }
4198
4249
  const u = U.getInstance({});
4199
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(() => {
4200
- O(u.getSessionState()), re(u.getStatus()), d(u.isConnected()), N(u.getChatMessages()), D(u.getLiveTranscript()), K(u.isMuted()), J(u.isSessionPaused());
4251
+ B(u.getSessionState()), re(u.getStatus()), d(u.isConnected()), N(u.getChatMessages()), j(u.getLiveTranscript()), K(u.isMuted()), J(u.isSessionPaused());
4201
4252
  const F = u.getToolCallState();
4202
4253
  W(F);
4203
4254
  }), () => {
@@ -4228,17 +4279,17 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4228
4279
  }, [X, ge, ae, C]), ee(() => {
4229
4280
  t.setAttribute("data-aria-open", String(o));
4230
4281
  }, [o, t]);
4231
- const he = j(() => {
4282
+ const he = H(() => {
4232
4283
  P((u) => !u);
4233
- }, []), be = j(async (u) => {
4284
+ }, []), be = H(async (u) => {
4234
4285
  if (!w.current || !b)
4235
4286
  throw new Error("Not connected to Aria");
4236
4287
  await w.current.sendMessage(u);
4237
- }, [b]), ue = j(() => {
4288
+ }, [b]), ue = H(() => {
4238
4289
  if (!w.current) return;
4239
4290
  const u = w.current.toggleMute();
4240
4291
  K(u);
4241
- }, []), cr = j(() => {
4292
+ }, []), cr = H(() => {
4242
4293
  w.current && (f(!0), M(null), w.current.refreshSession().catch((u) => {
4243
4294
  M(u instanceof Error ? u.message : "Failed to refresh session"), f(!1);
4244
4295
  }));
@@ -4294,14 +4345,14 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4294
4345
  displayMode: _,
4295
4346
  isConnected: b,
4296
4347
  isLoading: m,
4297
- chatMessages: A,
4348
+ chatMessages: x,
4298
4349
  liveTranscript: z,
4299
- isChatVisible: H,
4350
+ isChatVisible: D,
4300
4351
  isMuted: G,
4301
4352
  error: Q,
4302
4353
  toolCallState: y,
4303
4354
  sessionState: s,
4304
- setVideoElement: B,
4355
+ setVideoElement: O,
4305
4356
  toggleChat: he,
4306
4357
  sendMessage: be,
4307
4358
  toggleMute: ue,
@@ -4317,9 +4368,9 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4317
4368
  label: e,
4318
4369
  theme: t,
4319
4370
  isReady: o = !1,
4320
- onClick: i
4371
+ onClick: a
4321
4372
  }) => {
4322
- const l = t === "dark", a = e || "Talk to Aria";
4373
+ const l = t === "dark", i = e || "Talk to Aria";
4323
4374
  return /* @__PURE__ */ n(
4324
4375
  Ke,
4325
4376
  {
@@ -4334,7 +4385,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4334
4385
  "button",
4335
4386
  {
4336
4387
  onClick: (b) => {
4337
- b.preventDefault(), o && i();
4388
+ b.preventDefault(), o && a();
4338
4389
  },
4339
4390
  disabled: !o,
4340
4391
  className: c(
@@ -4367,7 +4418,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4367
4418
  "img",
4368
4419
  {
4369
4420
  src: Te,
4370
- alt: a,
4421
+ alt: i,
4371
4422
  className: "w-full h-full object-cover",
4372
4423
  onError: (b) => {
4373
4424
  b.currentTarget.style.display = "none";
@@ -4399,7 +4450,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4399
4450
  /* @__PURE__ */ n("span", { className: c(
4400
4451
  "font-bold text-[13px] tracking-tight leading-none",
4401
4452
  l ? "text-white" : "text-gray-900"
4402
- ), children: a }),
4453
+ ), children: i }),
4403
4454
  /* @__PURE__ */ n("span", { className: c(
4404
4455
  "text-[10px] font-medium mt-1 leading-none",
4405
4456
  l ? "text-gray-400" : "text-gray-500",
@@ -4416,32 +4467,32 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4416
4467
  isMinimized: e,
4417
4468
  onMinimize: t,
4418
4469
  onMaximize: o,
4419
- theme: i,
4470
+ theme: a,
4420
4471
  displayMode: l,
4421
- isConnected: a,
4472
+ isConnected: i,
4422
4473
  isLoading: b,
4423
4474
  chatMessages: d,
4424
4475
  liveTranscript: m,
4425
4476
  isChatVisible: f,
4426
- isMuted: A,
4477
+ isMuted: x,
4427
4478
  error: N,
4428
4479
  toolCallState: z,
4429
- setVideoElement: D,
4430
- toggleChat: H,
4480
+ setVideoElement: j,
4481
+ toggleChat: D,
4431
4482
  sendMessage: P,
4432
4483
  toggleMute: G,
4433
4484
  refreshSession: K
4434
4485
  }) => {
4435
- const Q = me(null), M = me(null), [L, _] = I(""), [q, y] = I(!1), W = me(null), s = i === "dark", O = l === "bottom-right", Y = l === "center";
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";
4436
4487
  ee(() => {
4437
4488
  M.current && (M.current.scrollTop = M.current.scrollHeight);
4438
- }, [m]), ee(() => (Q.current && (console.log("[AriaWidgetStandalone] Registering video element, minimized:", e), D(Q.current)), () => {
4439
- D(null);
4440
- }), [D, e]), ee(() => {
4489
+ }, [m]), ee(() => (Q.current && (console.log("[AriaWidgetStandalone] Registering video element, minimized:", e), j(Q.current)), () => {
4490
+ j(null);
4491
+ }), [j, e]), ee(() => {
4441
4492
  W.current?.scrollIntoView({ behavior: "smooth" });
4442
4493
  }, [d]);
4443
4494
  const re = async () => {
4444
- if (!L.trim() || !a || q) return;
4495
+ if (!L.trim() || !i || q) return;
4445
4496
  const p = L.trim();
4446
4497
  _(""), y(!0);
4447
4498
  try {
@@ -4487,7 +4538,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4487
4538
  className: "w-full h-full object-cover"
4488
4539
  }
4489
4540
  ),
4490
- z.isActive && a && /* @__PURE__ */ E(
4541
+ z.isActive && i && /* @__PURE__ */ E(
4491
4542
  "div",
4492
4543
  {
4493
4544
  className: c(
@@ -4501,7 +4552,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4501
4552
  /* @__PURE__ */ n("div", { className: c(
4502
4553
  "w-5 h-5 rounded-full flex items-center justify-center",
4503
4554
  s ? "bg-amber-800/50" : "bg-amber-100"
4504
- ), children: /* @__PURE__ */ n(je, { className: c(
4555
+ ), children: /* @__PURE__ */ n(He, { className: c(
4505
4556
  "w-3 h-3 animate-pulse",
4506
4557
  s ? "text-amber-400" : "text-amber-600"
4507
4558
  ) }) }),
@@ -4512,7 +4563,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4512
4563
  ]
4513
4564
  }
4514
4565
  ),
4515
- a && !N && /* @__PURE__ */ E(
4566
+ i && !N && /* @__PURE__ */ E(
4516
4567
  "div",
4517
4568
  {
4518
4569
  className: c(
@@ -4530,10 +4581,10 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4530
4581
  className: c(
4531
4582
  "w-8 h-8 rounded-full flex items-center justify-center transition-all duration-200",
4532
4583
  "border-0 outline-none focus:outline-none shadow-sm",
4533
- 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"
4584
+ 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"
4534
4585
  ),
4535
- title: A ? "Unmute" : "Mute",
4536
- children: A ? /* @__PURE__ */ n(De, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(He, { className: "h-3.5 w-3.5" })
4586
+ title: x ? "Unmute" : "Mute",
4587
+ children: x ? /* @__PURE__ */ n(je, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(De, { className: "h-3.5 w-3.5" })
4537
4588
  }
4538
4589
  ),
4539
4590
  /* @__PURE__ */ n(
@@ -4597,7 +4648,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4597
4648
  "absolute inset-0 flex flex-col items-center justify-center z-10 p-4",
4598
4649
  s ? "bg-gray-950/90" : "bg-white/90"
4599
4650
  ), children: [
4600
- /* @__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" }) }),
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" }) }),
4601
4652
  /* @__PURE__ */ n("p", { className: c(
4602
4653
  "text-xs font-medium text-center mb-2",
4603
4654
  s ? "text-red-300" : "text-red-700"
@@ -4612,7 +4663,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4612
4663
  s ? "bg-indigo-600 hover:bg-indigo-700 text-white" : "bg-indigo-500 hover:bg-indigo-600 text-white"
4613
4664
  ),
4614
4665
  children: [
4615
- /* @__PURE__ */ n(Be, { className: "w-3 h-3" }),
4666
+ /* @__PURE__ */ n(Oe, { className: "w-3 h-3" }),
4616
4667
  "Retry"
4617
4668
  ]
4618
4669
  }
@@ -4629,9 +4680,9 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4629
4680
  "shadow-2xl",
4630
4681
  !s && "bg-white/95 border border-gray-200/80",
4631
4682
  s && "bg-gray-950/95 border border-gray-800/50",
4632
- O && "fixed bottom-6 right-6 rounded-xl",
4633
- O && (f ? "w-[960px]" : "w-[640px]"),
4634
- O && "h-[500px]",
4683
+ B && "fixed bottom-6 right-6 rounded-xl",
4684
+ B && (f ? "w-[960px]" : "w-[640px]"),
4685
+ B && "h-[500px]",
4635
4686
  Y && "fixed inset-8 md:inset-16 lg:inset-20 rounded-2xl"
4636
4687
  ),
4637
4688
  style: {
@@ -4727,7 +4778,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4727
4778
  "rounded-lg p-6 max-w-sm w-full shadow-lg border",
4728
4779
  s ? "bg-gray-900 border-red-900/30" : "bg-white border-red-100"
4729
4780
  ), children: /* @__PURE__ */ E("div", { className: "flex flex-col items-center text-center gap-3", children: [
4730
- /* @__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" }) }),
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" }) }),
4731
4782
  /* @__PURE__ */ E("div", { children: [
4732
4783
  /* @__PURE__ */ n("p", { className: c(
4733
4784
  "text-base font-bold mb-2",
@@ -4747,7 +4798,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4747
4798
  s ? "bg-indigo-600 hover:bg-indigo-700 text-white" : "bg-indigo-500 hover:bg-indigo-600 text-white"
4748
4799
  ),
4749
4800
  children: [
4750
- /* @__PURE__ */ n(Be, { className: "w-4 h-4" }),
4801
+ /* @__PURE__ */ n(Oe, { className: "w-4 h-4" }),
4751
4802
  "Try Again"
4752
4803
  ]
4753
4804
  }
@@ -4765,7 +4816,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4765
4816
  className: "w-full h-full object-contain"
4766
4817
  }
4767
4818
  ),
4768
- z.isActive && a && /* @__PURE__ */ E(
4819
+ z.isActive && i && /* @__PURE__ */ E(
4769
4820
  "div",
4770
4821
  {
4771
4822
  className: c(
@@ -4779,7 +4830,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4779
4830
  /* @__PURE__ */ n("div", { className: c(
4780
4831
  "w-6 h-6 rounded-full flex items-center justify-center",
4781
4832
  s ? "bg-amber-800/50" : "bg-amber-100"
4782
- ), children: /* @__PURE__ */ n(je, { className: c(
4833
+ ), children: /* @__PURE__ */ n(He, { className: c(
4783
4834
  "w-3.5 h-3.5 animate-pulse",
4784
4835
  s ? "text-amber-400" : "text-amber-600"
4785
4836
  ) }) }),
@@ -4810,7 +4861,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4810
4861
  ]
4811
4862
  }
4812
4863
  ),
4813
- m && a && !z.isActive && /* @__PURE__ */ n(
4864
+ m && i && !z.isActive && /* @__PURE__ */ n(
4814
4865
  "div",
4815
4866
  {
4816
4867
  className: c(
@@ -4825,7 +4876,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4825
4876
  ] })
4826
4877
  }
4827
4878
  ),
4828
- a && !N && /* @__PURE__ */ E(
4879
+ i && !N && /* @__PURE__ */ E(
4829
4880
  "div",
4830
4881
  {
4831
4882
  className: c(
@@ -4839,7 +4890,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4839
4890
  /* @__PURE__ */ n(
4840
4891
  "button",
4841
4892
  {
4842
- onClick: H,
4893
+ onClick: D,
4843
4894
  className: c(
4844
4895
  "w-9 h-9 rounded-full flex items-center justify-center transition-all duration-200",
4845
4896
  "border-0 outline-none focus:outline-none shadow-sm",
@@ -4856,10 +4907,10 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4856
4907
  className: c(
4857
4908
  "w-9 h-9 rounded-full flex items-center justify-center transition-all duration-200",
4858
4909
  "border-0 outline-none focus:outline-none shadow-sm",
4859
- 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"
4910
+ 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"
4860
4911
  ),
4861
- title: A ? "Unmute" : "Mute",
4862
- children: A ? /* @__PURE__ */ n(De, { className: "h-4 w-4" }) : /* @__PURE__ */ n(He, { className: "h-4 w-4" })
4912
+ title: x ? "Unmute" : "Mute",
4913
+ children: x ? /* @__PURE__ */ n(je, { className: "h-4 w-4" }) : /* @__PURE__ */ n(De, { className: "h-4 w-4" })
4863
4914
  }
4864
4915
  ),
4865
4916
  /* @__PURE__ */ n(
@@ -4890,7 +4941,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4890
4941
  ] }),
4891
4942
  f && /* @__PURE__ */ E("div", { className: c(
4892
4943
  "flex flex-col shrink-0 border-l",
4893
- O ? "w-[320px]" : "w-[360px]",
4944
+ B ? "w-[320px]" : "w-[360px]",
4894
4945
  s ? "bg-gray-900 border-gray-800" : "bg-white border-gray-100"
4895
4946
  ), children: [
4896
4947
  /* @__PURE__ */ n("div", { className: c(
@@ -4995,8 +5046,8 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
4995
5046
  value: L,
4996
5047
  onChange: (p) => _(p.target.value),
4997
5048
  onKeyDown: J,
4998
- placeholder: a ? "Message Aria..." : "Connecting...",
4999
- disabled: !a || q,
5049
+ placeholder: i ? "Message Aria..." : "Connecting...",
5050
+ disabled: !i || q,
5000
5051
  className: c(
5001
5052
  "flex-1 border-0 bg-transparent shadow-none focus:outline-none px-2 h-8 text-xs",
5002
5053
  s ? "placeholder:text-gray-500 text-white" : "placeholder:text-gray-400 text-gray-900"
@@ -5007,7 +5058,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
5007
5058
  "button",
5008
5059
  {
5009
5060
  onClick: re,
5010
- disabled: !a || !L.trim() || q,
5061
+ disabled: !i || !L.trim() || q,
5011
5062
  className: c(
5012
5063
  "h-7 w-7 rounded-md shrink-0 transition-all duration-200 flex items-center justify-center",
5013
5064
  "bg-indigo-500 hover:bg-indigo-600 disabled:opacity-40 text-white"
@@ -5025,7 +5076,7 @@ const Te = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AK
5025
5076
  AriaStandaloneUI: ft
5026
5077
  }, Symbol.toStringTag, { value: "Module" }));
5027
5078
  export {
5028
- xe as Aria,
5079
+ Ae as Aria,
5029
5080
  Ie as decodeJWT,
5030
5081
  Er as extractSessionIdFromToken,
5031
5082
  St as getTokenInfo,