@eloquentai/chat-sdk 0.37.0-dev.3 → 0.37.0-dev.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,38 +1,14 @@
1
1
  "use client";
2
- import { L as Tt, c as Be, u as Mt, g as At, X as Pt, i as Ot, A as Ut, d as F, e as Ke, f as jt, h as Dt, r as $t, t as Bt, j as Lt, N as at, k as Le, l as Nt, H as Zt, w as ct, m as Kt, s as Ht, n as Vt, o as Wt, E as Ft, p as Jt, S as Gt, C as Yt, T as Xt } from "./skeleton-DJDQ11eO.js";
3
- import { jsx as I, jsxs as ke, Fragment as Qt } from "react/jsx-runtime";
4
- import { useState as C, useCallback as v, useEffect as V, useMemo as tt, useRef as $ } from "react";
5
- import { createPortal as ot, flushSync as eo } from "react-dom";
2
+ import { jsx as I, jsxs as ke, Fragment as Tt } from "react/jsx-runtime";
3
+ import { useState as C, useCallback as v, useEffect as K, useMemo as tt, useRef as $ } from "react";
4
+ import { createPortal as ot, flushSync as Mt } from "react-dom";
5
+ import { L as At, c as Be, u as Pt, g as Ot, X as Ut, i as jt, A as Dt, d as F, e as Ke, f as $t, h as Bt, r as Lt, t as Nt, j as Zt, N as at, k as Le, l as Kt, H as Vt, w as ct, m as Wt, s as Ht, n as Ft, o as Jt, E as Gt, p as Yt, S as Xt, C as Qt, T as eo } from "./skeleton-DW1aw7Tu.js";
6
6
  import to from "react-dom/client";
7
7
  try {
8
8
  let e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, t = new e.Error().stack;
9
- t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "3ac09d81-72f9-4510-abbd-25060624b74f", e._sentryDebugIdIdentifier = "sentry-dbid-3ac09d81-72f9-4510-abbd-25060624b74f");
9
+ t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "581abdff-289a-451e-abf3-6b54231017ba", e._sentryDebugIdIdentifier = "sentry-dbid-581abdff-289a-451e-abf3-6b54231017ba");
10
10
  } catch {
11
11
  }
12
- if (typeof window < "u") {
13
- const e = "development";
14
- import("./index-hFbiYJI3.js").then(({ init: t }) => {
15
- t({
16
- dsn: void 0,
17
- environment: e,
18
- sendDefaultPii: !1,
19
- debug: !1,
20
- enabled: !0,
21
- beforeSend(o) {
22
- const r = /* @__PURE__ */ new Set([
23
- "authorization",
24
- "cookie",
25
- "x-api-key",
26
- "x-auth-token"
27
- ]), n = o.request?.headers;
28
- if (n)
29
- for (const a of Object.keys(n))
30
- r.has(a.toLowerCase()) && (n[a] = "[Filtered]");
31
- return o.request && (o.request.data = "[Filtered]"), o;
32
- }
33
- });
34
- });
35
- }
36
12
  const Je = '/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--eloq-aura-angle:0deg}}}@layer theme{:root,:host{--eloq-font-sans:system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--eloq-font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--eloq-color-red-50:oklch(97.1% .013 17.38);--eloq-color-red-200:oklch(88.5% .062 18.334);--eloq-color-red-400:oklch(70.4% .191 22.216);--eloq-color-red-500:oklch(63.7% .237 25.331);--eloq-color-red-800:oklch(44.4% .177 26.899);--eloq-color-amber-50:oklch(98.7% .022 95.277);--eloq-color-amber-200:oklch(92.4% .12 95.746);--eloq-color-amber-400:oklch(82.8% .189 84.429);--eloq-color-amber-500:oklch(76.9% .188 70.08);--eloq-color-amber-800:oklch(47.3% .137 46.201);--eloq-color-yellow-400:oklch(85.2% .199 91.936);--eloq-color-green-50:oklch(98.2% .018 155.826);--eloq-color-green-200:oklch(92.5% .084 155.995);--eloq-color-green-400:oklch(79.2% .209 151.711);--eloq-color-green-500:oklch(72.3% .219 149.579);--eloq-color-green-800:oklch(44.8% .119 151.328);--eloq-color-blue-50:oklch(97% .014 254.604);--eloq-color-blue-200:oklch(88.2% .059 254.128);--eloq-color-blue-400:oklch(70.7% .165 254.624);--eloq-color-blue-500:oklch(62.3% .214 259.815);--eloq-color-blue-800:oklch(42.4% .199 265.638);--eloq-color-gray-100:oklch(96.7% .003 264.542);--eloq-color-gray-200:oklch(92.8% .006 264.531);--eloq-color-gray-300:oklch(87.2% .01 258.338);--eloq-color-gray-400:oklch(70.7% .022 261.325);--eloq-color-gray-500:oklch(55.1% .027 264.364);--eloq-color-gray-600:oklch(44.6% .03 256.802);--eloq-color-gray-900:oklch(21% .034 264.665);--eloq-color-black:#000;--eloq-color-white:#fff;--eloq-spacing:.25rem;--eloq-container-xs:20rem;--eloq-text-xs:.75rem;--eloq-text-xs--line-height:calc(1 / .75);--eloq-text-sm:.875rem;--eloq-text-sm--line-height:calc(1.25 / .875);--eloq-text-base:1rem;--eloq-text-base--line-height: 1.5 ;--eloq-text-2xl:1.5rem;--eloq-text-2xl--line-height:calc(2 / 1.5);--eloq-font-weight-medium:500;--eloq-font-weight-semibold:600;--eloq-tracking-tight:-.025em;--eloq-leading-relaxed:1.625;--eloq-radius-sm:calc(var(--radius) - 4px);--eloq-radius-md:calc(var(--radius) - 2px);--eloq-radius-lg:var(--radius);--eloq-radius-xl:.75rem;--eloq-radius-2xl:1rem;--eloq-radius-3xl:1.5rem;--eloq-drop-shadow-lg:0 4px 4px #00000026;--eloq-drop-shadow-xl:0 9px 7px #0000001a;--eloq-ease-out:cubic-bezier(0, 0, .2, 1);--eloq-animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--eloq-default-transition-duration:.15s;--eloq-default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--eloq-default-font-family:var(--eloq-font-sans);--eloq-default-mono-font-family:var(--eloq-font-mono);--eloq-animate-panel-in:panel-in .35s cubic-bezier(.16, 1, .3, 1) both;--eloq-animate-panel-out:panel-out .25s cubic-bezier(.4, 0, 1, 1) both;--eloq-animate-panel-fade-in:fade-in .35s ease-out both;--eloq-animate-panel-fade-out:fade-out .25s ease-in both;--eloq-animate-message-fade-in:fade-in .3s ease-out both;--eloq-animate-thinking-dot:thinking-dot 1.2s ease-in-out infinite;--eloq-animate-thinking-shimmer:thinking-shimmer 1.8s linear infinite;--eloq-animate-regenerating:regenerating-sweep 1.2s linear infinite;--eloq-animate-text-in:fade-in .35s ease-out both;--eloq-animate-message-in:message-in .3s ease-out both;--eloq-animate-slide-up-in:slide-up-in .3s ease-out both}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--eloq-default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--eloq-default-font-feature-settings,normal);font-variation-settings:var(--eloq-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--eloq-default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--eloq-default-mono-font-feature-settings,normal);font-variation-settings:var(--eloq-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:root{--background:0 0% 100%;--foreground:0 0% 3.9%;--card:0 0% 100%;--card-foreground:0 0% 3.9%;--popover:0 0% 100%;--popover-foreground:0 0% 3.9%;--primary:267 56% 46%;--primary-foreground:0 0% 98%;--secondary:0 0% 96.1%;--secondary-foreground:0 0% 9%;--muted:0 0% 96.1%;--muted-foreground:0 0% 45.1%;--accent:0 0% 96.1%;--accent-foreground:0 0% 9%;--destructive:0 84.2% 60.2%;--destructive-foreground:0 0% 98%;--border:0 0% 89.8%;--input:0 0% 89.8%;--ring:0 0% 3.9%;--cream:37.5 44% 96.5%;--chart-1:12 76% 61%;--chart-2:173 58% 39%;--chart-3:197 37% 24%;--chart-4:43 74% 66%;--chart-5:27 87% 67%;--radius:.5rem}.dark{--background:262 50% 10%;--foreground:262 5% 90%;--card:262 50% 10%;--card-foreground:262 5% 90%;--popover:262 50% 5%;--popover-foreground:262 5% 90%;--primary:262 62% 70%;--primary-foreground:0 0% 100%;--primary-dark:262 62% 60%;--secondary:262 30% 30%;--secondary-foreground:0 0% 100%;--secondary-dark:262 30% 20%;--secondary-light:262 30% 40%;--tertiary:267 56% 46%;--tertiary-foreground:0 0% 100%;--tertiary-dark:267 38% 25%;--tertiary-light:263 100% 85%;--muted:224 30% 25%;--muted-foreground:262 5% 90%;--accent:224 30% 25%;--accent-foreground:262 5% 100%;--accent-dark:224 30% 15%;--destructive:0 100% 30%;--destructive-foreground:262 5% 90%;--border:0 0% 30%;--input:262 30% 25%;--ring:262 62% 71%;--cream:257 28% 20%;--radius:.5rem;--sidebar-background:var(--background);--sidebar-foreground:var(--foreground);--sidebar-primary:var(--primary);--sidebar-primary-foreground:var(--primary-foreground);--sidebar-accent:var(--accent);--sidebar-accent-foreground:var(--accent-foreground);--sidebar-border:var(--border);--sidebar-ring:var(--ring)}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}}@layer components;@layer utilities{.eloq\\:pointer-events-none{pointer-events:none}.eloq\\:invisible{visibility:hidden}.eloq\\:sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.eloq\\:absolute{position:absolute}.eloq\\:relative{position:relative}.eloq\\:inset-0{inset:0}.eloq\\:inset-0\\.5{inset:calc(var(--eloq-spacing) * .5)}.eloq\\:inset-x-0{inset-inline:0}.eloq\\:end-full{inset-inline-end:100%}.eloq\\:top-0{top:0}.eloq\\:top-0\\.5{top:calc(var(--eloq-spacing) * .5)}.eloq\\:top-1\\/2{top:50%}.eloq\\:top-\\[2px\\]{top:2px}.eloq\\:-right-\\[9px\\]{right:-9px}.eloq\\:right-0\\.5{right:calc(var(--eloq-spacing) * .5)}.eloq\\:right-2{right:calc(var(--eloq-spacing) * 2)}.eloq\\:right-16{right:calc(var(--eloq-spacing) * 16)}.eloq\\:right-\\[2px\\]{right:2px}.eloq\\:bottom-0{bottom:0}.eloq\\:bottom-1{bottom:var(--eloq-spacing)}.eloq\\:bottom-2{bottom:calc(var(--eloq-spacing) * 2)}.eloq\\:bottom-10{bottom:calc(var(--eloq-spacing) * 10)}.eloq\\:left-0{left:0}.eloq\\:left-2{left:calc(var(--eloq-spacing) * 2)}.eloq\\:left-\\[calc\\(50\\%-0\\.75rem\\)\\]{left:calc(50% - .75rem)}.eloq\\:z-10{z-index:10}.eloq\\:z-20{z-index:20}.eloq\\:z-30{z-index:30}.eloq\\:m-0{margin:0}.eloq\\:m-auto{margin:auto}.eloq\\:mx-1{margin-inline:var(--eloq-spacing)}.eloq\\:mx-auto{margin-inline:auto}.eloq\\:my-2{margin-block:calc(var(--eloq-spacing) * 2)}.eloq\\:my-4{margin-block:calc(var(--eloq-spacing) * 4)}.eloq\\:me-1{margin-inline-end:var(--eloq-spacing)}.eloq\\:-mt-2{margin-top:calc(var(--eloq-spacing) * -2)}.eloq\\:-mt-6{margin-top:calc(var(--eloq-spacing) * -6)}.eloq\\:-mt-20{margin-top:calc(var(--eloq-spacing) * -20)}.eloq\\:mt-1{margin-top:var(--eloq-spacing)}.eloq\\:mt-2{margin-top:calc(var(--eloq-spacing) * 2)}.eloq\\:mt-10{margin-top:calc(var(--eloq-spacing) * 10)}.eloq\\:mr-1{margin-right:var(--eloq-spacing)}.eloq\\:mr-\\[2px\\]{margin-right:2px}.eloq\\:mb-1{margin-bottom:var(--eloq-spacing)}.eloq\\:mb-3{margin-bottom:calc(var(--eloq-spacing) * 3)}.eloq\\:mb-4{margin-bottom:calc(var(--eloq-spacing) * 4)}.eloq\\:mb-10{margin-bottom:calc(var(--eloq-spacing) * 10)}.eloq\\:ml-0{margin-left:0}.eloq\\:ml-1{margin-left:var(--eloq-spacing)}.eloq\\:ml-5{margin-left:calc(var(--eloq-spacing) * 5)}.eloq\\:box-content{box-sizing:content-box}.eloq\\:block{display:block}.eloq\\:flex{display:flex}.eloq\\:hidden{display:none}.eloq\\:inline-flex{display:inline-flex}.eloq\\:field-sizing-content{field-sizing:content}.eloq\\:aspect-square{aspect-ratio:1}.eloq\\:h-1{height:var(--eloq-spacing)}.eloq\\:h-2\\.5{height:calc(var(--eloq-spacing) * 2.5)}.eloq\\:h-3{height:calc(var(--eloq-spacing) * 3)}.eloq\\:h-4{height:calc(var(--eloq-spacing) * 4)}.eloq\\:h-5{height:calc(var(--eloq-spacing) * 5)}.eloq\\:h-6{height:calc(var(--eloq-spacing) * 6)}.eloq\\:h-8{height:calc(var(--eloq-spacing) * 8)}.eloq\\:h-10{height:calc(var(--eloq-spacing) * 10)}.eloq\\:h-12{height:calc(var(--eloq-spacing) * 12)}.eloq\\:h-14{height:calc(var(--eloq-spacing) * 14)}.eloq\\:h-16{height:calc(var(--eloq-spacing) * 16)}.eloq\\:h-\\[0\\.42em\\]{height:.42em}.eloq\\:h-\\[160px\\]{height:160px}.eloq\\:h-\\[220px\\]{height:220px}.eloq\\:h-\\[560px\\]{height:560px}.eloq\\:h-\\[600px\\]{height:600px}.eloq\\:h-full{height:100%}.eloq\\:max-h-\\[132px\\]{max-height:132px}.eloq\\:min-h-6{min-height:calc(var(--eloq-spacing) * 6)}.eloq\\:min-h-\\[48px\\]{min-height:48px}.eloq\\:min-h-\\[80px\\]{min-height:80px}.eloq\\:w-2\\.5{width:calc(var(--eloq-spacing) * 2.5)}.eloq\\:w-2\\/3{width:66.6667%}.eloq\\:w-3{width:calc(var(--eloq-spacing) * 3)}.eloq\\:w-4{width:calc(var(--eloq-spacing) * 4)}.eloq\\:w-5{width:calc(var(--eloq-spacing) * 5)}.eloq\\:w-6{width:calc(var(--eloq-spacing) * 6)}.eloq\\:w-8{width:calc(var(--eloq-spacing) * 8)}.eloq\\:w-10{width:calc(var(--eloq-spacing) * 10)}.eloq\\:w-12{width:calc(var(--eloq-spacing) * 12)}.eloq\\:w-14{width:calc(var(--eloq-spacing) * 14)}.eloq\\:w-16{width:calc(var(--eloq-spacing) * 16)}.eloq\\:w-24{width:calc(var(--eloq-spacing) * 24)}.eloq\\:w-32{width:calc(var(--eloq-spacing) * 32)}.eloq\\:w-48{width:calc(var(--eloq-spacing) * 48)}.eloq\\:w-\\[0\\.42em\\]{width:.42em}.eloq\\:w-\\[70\\%\\]{width:70%}.eloq\\:w-\\[320px\\]{width:320px}.eloq\\:w-\\[340px\\]{width:340px}.eloq\\:w-\\[348px\\]{width:348px}.eloq\\:w-\\[380px\\]{width:380px}.eloq\\:w-\\[420px\\]{width:420px}.eloq\\:w-full{width:100%}.eloq\\:max-w-\\[75\\%\\]{max-width:75%}.eloq\\:max-w-\\[88\\%\\]{max-width:88%}.eloq\\:max-w-full{max-width:100%}.eloq\\:max-w-xs{max-width:var(--eloq-container-xs)}.eloq\\:min-w-0{min-width:0}.eloq\\:min-w-6{min-width:calc(var(--eloq-spacing) * 6)}.eloq\\:min-w-min{min-width:min-content}.eloq\\:flex-1{flex:1}.eloq\\:flex-none{flex:none}.eloq\\:flex-shrink-0,.eloq\\:shrink-0{flex-shrink:0}.eloq\\:flex-grow{flex-grow:1}.eloq\\:origin-bottom-right{transform-origin:100% 100%}.eloq\\:translate-x-0{--tw-translate-x:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.eloq\\:translate-x-8{--tw-translate-x:calc(var(--eloq-spacing) * 8);translate:var(--tw-translate-x) var(--tw-translate-y)}.eloq\\:-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.eloq\\:scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.eloq\\:scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.eloq\\:-scale-x-100{--tw-scale-x: -100% ;scale:var(--tw-scale-x) var(--tw-scale-y)}.eloq\\:scale-\\[0\\.05\\]{scale:.05}.eloq\\:transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.eloq\\:animate-message-in{animation:var(--eloq-animate-message-in)}.eloq\\:animate-panel-in{animation:var(--eloq-animate-panel-in)}.eloq\\:animate-panel-out{animation:var(--eloq-animate-panel-out)}.eloq\\:animate-pulse{animation:var(--eloq-animate-pulse)}.eloq\\:animate-regenerating{animation:var(--eloq-animate-regenerating)}.eloq\\:animate-text-in{animation:var(--eloq-animate-text-in)}.eloq\\:animate-thinking-shimmer{animation:var(--eloq-animate-thinking-shimmer)}.eloq\\:cursor-default{cursor:default}.eloq\\:cursor-grab{cursor:grab}.eloq\\:cursor-pointer{cursor:pointer}.eloq\\:touch-none{touch-action:none}.eloq\\:resize-none{resize:none}.eloq\\:list-decimal{list-style-type:decimal}.eloq\\:list-disc{list-style-type:disc}.eloq\\:flex-col{flex-direction:column}.eloq\\:flex-row{flex-direction:row}.eloq\\:flex-wrap{flex-wrap:wrap}.eloq\\:items-center{align-items:center}.eloq\\:items-end{align-items:flex-end}.eloq\\:items-start{align-items:flex-start}.eloq\\:justify-between{justify-content:space-between}.eloq\\:justify-center{justify-content:center}.eloq\\:justify-end{justify-content:flex-end}.eloq\\:justify-start{justify-content:flex-start}.eloq\\:gap-1{gap:var(--eloq-spacing)}.eloq\\:gap-1\\.5{gap:calc(var(--eloq-spacing) * 1.5)}.eloq\\:gap-2{gap:calc(var(--eloq-spacing) * 2)}.eloq\\:gap-3{gap:calc(var(--eloq-spacing) * 3)}.eloq\\:gap-\\[0\\.25em\\]{gap:.25em}:where(.eloq\\:space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block:0}:where(.eloq\\:space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--eloq-spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--eloq-spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--eloq-spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--eloq-spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--eloq-spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--eloq-spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--eloq-spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--eloq-spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--eloq-spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--eloq-spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(var(--eloq-spacing) * var(--tw-space-x-reverse));margin-inline-end:calc(var(--eloq-spacing) * calc(1 - var(--tw-space-x-reverse)))}:where(.eloq\\:space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--eloq-spacing) * 2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--eloq-spacing) * 2) * calc(1 - var(--tw-space-x-reverse)))}:where(.eloq\\:space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--eloq-spacing) * 3) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--eloq-spacing) * 3) * calc(1 - var(--tw-space-x-reverse)))}.eloq\\:self-end{align-self:flex-end}.eloq\\:self-stretch{align-self:stretch}.eloq\\:overflow-hidden{overflow:hidden}.eloq\\:overflow-x-auto{overflow-x:auto}.eloq\\:overscroll-contain{overscroll-behavior:contain}.eloq\\:rounded{border-radius:.25rem}.eloq\\:rounded-2xl{border-radius:var(--eloq-radius-2xl)}.eloq\\:rounded-3xl{border-radius:var(--eloq-radius-3xl)}.eloq\\:rounded-\\[inherit\\]{border-radius:inherit}.eloq\\:rounded-full{border-radius:3.40282e38px}.eloq\\:rounded-lg{border-radius:var(--eloq-radius-lg)}.eloq\\:rounded-md{border-radius:var(--eloq-radius-md)}.eloq\\:rounded-none{border-radius:0}.eloq\\:rounded-sm{border-radius:var(--eloq-radius-sm)}.eloq\\:rounded-xl{border-radius:var(--eloq-radius-xl)}.eloq\\:rounded-t-2xl{border-top-left-radius:var(--eloq-radius-2xl);border-top-right-radius:var(--eloq-radius-2xl)}.eloq\\:border{border-style:var(--tw-border-style);border-width:1px}.eloq\\:border-0{border-style:var(--tw-border-style);border-width:0}.eloq\\:border-2{border-style:var(--tw-border-style);border-width:2px}.eloq\\:border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.eloq\\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.eloq\\:border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.eloq\\:border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.eloq\\:border-dashed{--tw-border-style:dashed;border-style:dashed}.eloq\\:border-amber-400{border-color:var(--eloq-color-amber-400)}.eloq\\:border-blue-500{border-color:var(--eloq-color-blue-500)}.eloq\\:border-border{border-color:hsl(var(--border))}.eloq\\:border-current{border-color:currentColor}.eloq\\:border-green-500{border-color:var(--eloq-color-green-500)}.eloq\\:border-input{border-color:hsl(var(--input))}.eloq\\:border-red-500{border-color:var(--eloq-color-red-500)}.eloq\\:border-t-transparent{border-top-color:#0000}.eloq\\:border-l-transparent{border-left-color:#0000}.eloq\\:bg-\\[\\#0a0a0a\\]{background-color:#0a0a0a}.eloq\\:bg-\\[\\#000\\]{background-color:#000}.eloq\\:bg-\\[\\#fff\\]{background-color:#fff}.eloq\\:bg-amber-50{background-color:var(--eloq-color-amber-50)}.eloq\\:bg-background{background-color:hsl(var(--background))}.eloq\\:bg-black\\/20{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:bg-black\\/20{background-color:color-mix(in oklab,var(--eloq-color-black) 20%,transparent)}}.eloq\\:bg-black\\/60{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:bg-black\\/60{background-color:color-mix(in oklab,var(--eloq-color-black) 60%,transparent)}}.eloq\\:bg-blue-50{background-color:var(--eloq-color-blue-50)}.eloq\\:bg-border{background-color:hsl(var(--border))}.eloq\\:bg-card{background-color:hsl(var(--card))}.eloq\\:bg-cream{background-color:hsl(var(--cream))}.eloq\\:bg-gray-400{background-color:var(--eloq-color-gray-400)}.eloq\\:bg-gray-900{background-color:var(--eloq-color-gray-900)}.eloq\\:bg-green-50{background-color:var(--eloq-color-green-50)}.eloq\\:bg-muted{background-color:hsl(var(--muted))}.eloq\\:bg-muted-foreground{background-color:hsl(var(--muted-foreground))}.eloq\\:bg-primary{background-color:hsl(var(--primary))}.eloq\\:bg-red-50{background-color:var(--eloq-color-red-50)}.eloq\\:bg-white,.eloq\\:bg-white\\/20{background-color:var(--eloq-color-white)}@supports (color:color-mix(in lab,red,red)){.eloq\\:bg-white\\/20{background-color:color-mix(in oklab,var(--eloq-color-white) 20%,transparent)}}.eloq\\:fill-none{fill:none}.eloq\\:fill-yellow-400{fill:var(--eloq-color-yellow-400)}.eloq\\:object-contain{object-fit:contain}.eloq\\:object-cover{object-fit:cover}.eloq\\:p-0{padding:0}.eloq\\:p-0\\.5{padding:calc(var(--eloq-spacing) * .5)}.eloq\\:p-1{padding:var(--eloq-spacing)}.eloq\\:p-2{padding:calc(var(--eloq-spacing) * 2)}.eloq\\:p-3{padding:calc(var(--eloq-spacing) * 3)}.eloq\\:p-4{padding:calc(var(--eloq-spacing) * 4)}.eloq\\:p-6{padding:calc(var(--eloq-spacing) * 6)}.eloq\\:p-\\[1px\\]{padding:1px}.eloq\\:p-\\[7px\\]{padding:7px}.eloq\\:px-0{padding-inline:0}.eloq\\:px-1\\.5{padding-inline:calc(var(--eloq-spacing) * 1.5)}.eloq\\:px-2{padding-inline:calc(var(--eloq-spacing) * 2)}.eloq\\:px-3{padding-inline:calc(var(--eloq-spacing) * 3)}.eloq\\:px-4{padding-inline:calc(var(--eloq-spacing) * 4)}.eloq\\:px-5{padding-inline:calc(var(--eloq-spacing) * 5)}.eloq\\:px-\\[12px\\]{padding-inline:12px}.eloq\\:px-\\[16px\\]{padding-inline:16px}.eloq\\:py-0\\.5{padding-block:calc(var(--eloq-spacing) * .5)}.eloq\\:py-1{padding-block:var(--eloq-spacing)}.eloq\\:py-1\\.5{padding-block:calc(var(--eloq-spacing) * 1.5)}.eloq\\:py-2{padding-block:calc(var(--eloq-spacing) * 2)}.eloq\\:py-3{padding-block:calc(var(--eloq-spacing) * 3)}.eloq\\:py-3\\.5{padding-block:calc(var(--eloq-spacing) * 3.5)}.eloq\\:py-\\[8px\\]{padding-block:8px}.eloq\\:py-\\[12px\\]{padding-block:12px}.eloq\\:pt-0{padding-top:0}.eloq\\:pt-2{padding-top:calc(var(--eloq-spacing) * 2)}.eloq\\:pt-4{padding-top:calc(var(--eloq-spacing) * 4)}.eloq\\:pt-5{padding-top:calc(var(--eloq-spacing) * 5)}.eloq\\:pt-6{padding-top:calc(var(--eloq-spacing) * 6)}.eloq\\:pt-10{padding-top:calc(var(--eloq-spacing) * 10)}.eloq\\:pt-24{padding-top:calc(var(--eloq-spacing) * 24)}.eloq\\:pr-2{padding-right:calc(var(--eloq-spacing) * 2)}.eloq\\:pr-4{padding-right:calc(var(--eloq-spacing) * 4)}.eloq\\:pr-12{padding-right:calc(var(--eloq-spacing) * 12)}.eloq\\:pb-2{padding-bottom:calc(var(--eloq-spacing) * 2)}.eloq\\:pb-4{padding-bottom:calc(var(--eloq-spacing) * 4)}.eloq\\:pb-10{padding-bottom:calc(var(--eloq-spacing) * 10)}.eloq\\:pb-14{padding-bottom:calc(var(--eloq-spacing) * 14)}.eloq\\:pl-3{padding-left:calc(var(--eloq-spacing) * 3)}.eloq\\:pl-4{padding-left:calc(var(--eloq-spacing) * 4)}.eloq\\:pl-11{padding-left:calc(var(--eloq-spacing) * 11)}.eloq\\:text-center{text-align:center}.eloq\\:text-left{text-align:left}.eloq\\:text-2xl{font-size:var(--eloq-text-2xl);line-height:var(--tw-leading,var(--eloq-text-2xl--line-height))}.eloq\\:text-base{font-size:var(--eloq-text-base);line-height:var(--tw-leading,var(--eloq-text-base--line-height))}.eloq\\:text-sm{font-size:var(--eloq-text-sm);line-height:var(--tw-leading,var(--eloq-text-sm--line-height))}.eloq\\:text-xs{font-size:var(--eloq-text-xs);line-height:var(--tw-leading,var(--eloq-text-xs--line-height))}.eloq\\:text-\\[10px\\]{font-size:10px}.eloq\\:leading-5{--tw-leading:calc(var(--eloq-spacing) * 5);line-height:calc(var(--eloq-spacing) * 5)}.eloq\\:leading-none{--tw-leading:1;line-height:1}.eloq\\:leading-relaxed{--tw-leading:var(--eloq-leading-relaxed);line-height:var(--eloq-leading-relaxed)}.eloq\\:font-medium{--tw-font-weight:var(--eloq-font-weight-medium);font-weight:var(--eloq-font-weight-medium)}.eloq\\:font-semibold{--tw-font-weight:var(--eloq-font-weight-semibold);font-weight:var(--eloq-font-weight-semibold)}.eloq\\:tracking-tight{--tw-tracking:var(--eloq-tracking-tight);letter-spacing:var(--eloq-tracking-tight)}.eloq\\:whitespace-nowrap{white-space:nowrap}.eloq\\:text-\\[\\#000\\]{color:#000}.eloq\\:text-\\[\\#fff\\]{color:#fff}.eloq\\:text-amber-500{color:var(--eloq-color-amber-500)}.eloq\\:text-amber-800{color:var(--eloq-color-amber-800)}.eloq\\:text-blue-500{color:var(--eloq-color-blue-500)}.eloq\\:text-blue-800{color:var(--eloq-color-blue-800)}.eloq\\:text-card-foreground{color:hsl(var(--card-foreground))}.eloq\\:text-destructive{color:hsl(var(--destructive))}.eloq\\:text-foreground{color:hsl(var(--foreground))}.eloq\\:text-gray-300{color:var(--eloq-color-gray-300)}.eloq\\:text-gray-400{color:var(--eloq-color-gray-400)}.eloq\\:text-gray-500{color:var(--eloq-color-gray-500)}.eloq\\:text-green-500{color:var(--eloq-color-green-500)}.eloq\\:text-green-800{color:var(--eloq-color-green-800)}.eloq\\:text-muted{color:hsl(var(--muted))}.eloq\\:text-muted-foreground{color:hsl(var(--muted-foreground))}.eloq\\:text-primary{color:hsl(var(--primary))}.eloq\\:text-primary-foreground{color:hsl(var(--primary-foreground))}.eloq\\:text-red-500{color:var(--eloq-color-red-500)}.eloq\\:text-red-800{color:var(--eloq-color-red-800)}.eloq\\:text-white{color:var(--eloq-color-white)}.eloq\\:text-yellow-400{color:var(--eloq-color-yellow-400)}.eloq\\:italic{font-style:italic}.eloq\\:underline{text-decoration-line:underline}.eloq\\:opacity-0{opacity:0}.eloq\\:opacity-50{opacity:.5}.eloq\\:opacity-70{opacity:.7}.eloq\\:opacity-75{opacity:.75}.eloq\\:opacity-100{opacity:1}.eloq\\:shadow-\\[0_-8px_24px_rgba\\(0\\,0\\,0\\,0\\.08\\)\\]{--tw-shadow:0 -8px 24px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:shadow-\\[0_0_4px_0_rgba\\(0\\,0\\,0\\,0\\.20\\)\\]{--tw-shadow:0 0 4px 0 var(--tw-shadow-color,#0003);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:shadow-\\[0_3px_4px_-2px_rgba\\(0\\,0\\,0\\,0\\.04\\)\\]{--tw-shadow:0 3px 4px -2px var(--tw-shadow-color,#0000000a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.eloq\\:outline-2{outline-style:var(--tw-outline-style);outline-width:2px}.eloq\\:outline-offset-2{outline-offset:2px}.eloq\\:outline-transparent{outline-color:#0000}.eloq\\:drop-shadow-lg{--tw-drop-shadow-size:drop-shadow(0 4px 4px var(--tw-drop-shadow-color,#00000026));--tw-drop-shadow:drop-shadow(var(--eloq-drop-shadow-lg));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.eloq\\:transition-\\[outline-color\\]{transition-property:outline-color;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-\\[visibility\\]{transition-property:visibility;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-\\[width\\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:delay-100{transition-delay:.1s}.eloq\\:duration-0{--tw-duration:0s;transition-duration:0s}.eloq\\:duration-150{--tw-duration:.15s;transition-duration:.15s}.eloq\\:duration-200{--tw-duration:.2s;transition-duration:.2s}.eloq\\:duration-300{--tw-duration:.3s;transition-duration:.3s}.eloq\\:duration-500{--tw-duration:.5s;transition-duration:.5s}.eloq\\:ease-out{--tw-ease:var(--eloq-ease-out);transition-timing-function:var(--eloq-ease-out)}.eloq\\:outline-none{--tw-outline-style:none;outline-style:none}.eloq\\:select-none{-webkit-user-select:none;user-select:none}.eloq\\:group-focus-visible\\:block:is(:where(.eloq\\:group):focus-visible *){display:block}.eloq\\:placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.eloq\\:last\\:mb-0:last-child{margin-bottom:0}@media(hover:hover){.eloq\\:hover\\:bg-black\\/5:hover{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:hover\\:bg-black\\/5:hover{background-color:color-mix(in oklab,var(--eloq-color-black) 5%,transparent)}}.eloq\\:hover\\:bg-black\\/80:hover{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:hover\\:bg-black\\/80:hover{background-color:color-mix(in oklab,var(--eloq-color-black) 80%,transparent)}}.eloq\\:hover\\:bg-muted:hover{background-color:hsl(var(--muted))}.eloq\\:hover\\:bg-red-500:hover{background-color:var(--eloq-color-red-500)}.eloq\\:hover\\:text-foreground:hover{color:hsl(var(--foreground))}.eloq\\:hover\\:text-gray-600:hover{color:var(--eloq-color-gray-600)}.eloq\\:hover\\:text-primary:hover{color:hsl(var(--primary))}.eloq\\:hover\\:opacity-80:hover{opacity:.8}.eloq\\:hover\\:opacity-90:hover{opacity:.9}.eloq\\:hover\\:opacity-100:hover{opacity:1}.eloq\\:hover\\:drop-shadow-xl:hover{--tw-drop-shadow-size:drop-shadow(0 9px 7px var(--tw-drop-shadow-color,#0000001a));--tw-drop-shadow:drop-shadow(var(--eloq-drop-shadow-xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}.eloq\\:focus-visible\\:opacity-100:focus-visible{opacity:1}.eloq\\:focus-visible\\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:focus-visible\\:ring-muted:focus-visible{--tw-ring-color:hsl(var(--muted))}.eloq\\:focus-visible\\:ring-primary:focus-visible{--tw-ring-color:hsl(var(--primary))}.eloq\\:focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.eloq\\:focus-visible\\:outline-hidden:focus-visible{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.eloq\\:focus-visible\\:outline-hidden:focus-visible{outline-offset:2px;outline:2px solid #0000}}.eloq\\:focus-visible\\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.eloq\\:focus-visible\\:-outline-offset-4:focus-visible{outline-offset:-4px}.eloq\\:focus-visible\\:outline-current:focus-visible{outline-color:currentColor}.eloq\\:focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.eloq\\:focus-visible\\:outline-solid:focus-visible{--tw-outline-style:solid;outline-style:solid}.eloq\\:active\\:cursor-grabbing:active{cursor:grabbing}.eloq\\:disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.eloq\\:disabled\\:opacity-50:disabled{opacity:.5}.eloq\\:has-focus-visible\\:outline-2:has(:focus-visible){outline-style:var(--tw-outline-style);outline-width:2px}.eloq\\:has-focus-visible\\:outline-offset-1:has(:focus-visible){outline-offset:1px}.eloq\\:has-focus-visible\\:outline-ring:has(:focus-visible){outline-color:hsl(var(--ring))}@media(prefers-reduced-motion:no-preference){.eloq\\:motion-safe\\:translate-x-8{--tw-translate-x:calc(var(--eloq-spacing) * 8);translate:var(--tw-translate-x) var(--tw-translate-y)}.eloq\\:motion-safe\\:scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.eloq\\:motion-safe\\:animate-slide-up-in{animation:var(--eloq-animate-slide-up-in)}.eloq\\:motion-safe\\:animate-thinking-dot{animation:var(--eloq-animate-thinking-dot)}}@media(prefers-reduced-motion:reduce){.eloq\\:motion-reduce\\:animate-message-fade-in{animation:var(--eloq-animate-message-fade-in)}.eloq\\:motion-reduce\\:animate-none{animation:none}.eloq\\:motion-reduce\\:animate-panel-fade-in{animation:var(--eloq-animate-panel-fade-in)}.eloq\\:motion-reduce\\:animate-panel-fade-out{animation:var(--eloq-animate-panel-fade-out)}.eloq\\:motion-reduce\\:opacity-70{opacity:.7}}@media(min-width:40rem){.eloq\\:sm\\:text-sm{font-size:var(--eloq-text-sm);line-height:var(--tw-leading,var(--eloq-text-sm--line-height))}}@media(min-width:48rem){.eloq\\:md\\:text-sm{font-size:var(--eloq-text-sm);line-height:var(--tw-leading,var(--eloq-text-sm--line-height))}}.eloq\\:dark\\:border:is(.dark *){border-style:var(--tw-border-style);border-width:1px}.eloq\\:dark\\:border-b:is(.dark *){border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.eloq\\:dark\\:border-border:is(.dark *){border-color:hsl(var(--border))}.eloq\\:dark\\:bg-amber-400\\/10:is(.dark *){background-color:var(--eloq-color-amber-400)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-amber-400\\/10:is(.dark *){background-color:color-mix(in oklab,var(--eloq-color-amber-400) 10%,transparent)}}.eloq\\:dark\\:bg-blue-500\\/10:is(.dark *){background-color:var(--eloq-color-blue-500)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-blue-500\\/10:is(.dark *){background-color:color-mix(in oklab,var(--eloq-color-blue-500) 10%,transparent)}}.eloq\\:dark\\:bg-card:is(.dark *){background-color:hsl(var(--card))}.eloq\\:dark\\:bg-gray-100:is(.dark *){background-color:var(--eloq-color-gray-100)}.eloq\\:dark\\:bg-gray-200:is(.dark *){background-color:var(--eloq-color-gray-200)}.eloq\\:dark\\:bg-green-500\\/10:is(.dark *){background-color:var(--eloq-color-green-500)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-green-500\\/10:is(.dark *){background-color:color-mix(in oklab,var(--eloq-color-green-500) 10%,transparent)}}.eloq\\:dark\\:bg-muted:is(.dark *){background-color:hsl(var(--muted))}.eloq\\:dark\\:bg-red-500\\/10:is(.dark *){background-color:var(--eloq-color-red-500)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-red-500\\/10:is(.dark *){background-color:color-mix(in oklab,var(--eloq-color-red-500) 10%,transparent)}}.eloq\\:dark\\:text-amber-200:is(.dark *){color:var(--eloq-color-amber-200)}.eloq\\:dark\\:text-amber-400:is(.dark *){color:var(--eloq-color-amber-400)}.eloq\\:dark\\:text-blue-200:is(.dark *){color:var(--eloq-color-blue-200)}.eloq\\:dark\\:text-blue-400:is(.dark *){color:var(--eloq-color-blue-400)}.eloq\\:dark\\:text-gray-500:is(.dark *){color:var(--eloq-color-gray-500)}.eloq\\:dark\\:text-gray-900:is(.dark *){color:var(--eloq-color-gray-900)}.eloq\\:dark\\:text-green-200:is(.dark *){color:var(--eloq-color-green-200)}.eloq\\:dark\\:text-green-400:is(.dark *){color:var(--eloq-color-green-400)}.eloq\\:dark\\:text-muted-foreground:is(.dark *),.eloq\\:dark\\:text-muted-foreground\\/50:is(.dark *){color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:text-muted-foreground\\/50:is(.dark *){color:color-mix(in oklab,hsl(var(--muted-foreground)) 50%,transparent)}}.eloq\\:dark\\:text-red-200:is(.dark *){color:var(--eloq-color-red-200)}.eloq\\:dark\\:text-red-400:is(.dark *){color:var(--eloq-color-red-400)}.eloq\\:dark\\:shadow-none:is(.dark *){--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}@media(hover:hover){.eloq\\:dark\\:hover\\:bg-white\\/10:is(.dark *):hover{background-color:var(--eloq-color-white)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:hover\\:bg-white\\/10:is(.dark *):hover{background-color:color-mix(in oklab,var(--eloq-color-white) 10%,transparent)}}.eloq\\:dark\\:hover\\:text-gray-300:is(.dark *):hover{color:var(--eloq-color-gray-300)}.eloq\\:dark\\:hover\\:text-primary:is(.dark *):hover{color:hsl(var(--primary))}}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}}body{background-color:#0000}.eloquent-chat{font-family:system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol}.collapse{visibility:unset!important}.eloq-wrap-anywhere{overflow-wrap:anywhere}.eloq-thin-scrollbar{scrollbar-width:thin;scrollbar-color:hsl(var(--border)) transparent}.eloq-thin-scrollbar::-webkit-scrollbar{width:8px;height:8px}.eloq-thin-scrollbar::-webkit-scrollbar-thumb{background-color:hsl(var(--border));border-radius:9999px}.eloq-thin-scrollbar::-webkit-scrollbar-track{background-color:#0000}.eloq-test-mode-stripe{background:repeating-linear-gradient(-45deg,#f6e05e,#f6e05e 10px,#000 10px 20px)}.eloq-thinking-shimmer{--eloq-thinking-base:#9ca3af;--eloq-thinking-highlight:#4b5563;background:linear-gradient(90deg,var(--eloq-thinking-base) 0%,var(--eloq-thinking-base) 35%,var(--eloq-thinking-highlight) 50%,var(--eloq-thinking-base) 65%,var(--eloq-thinking-base) 100%);color:#0000;background-size:200% 100%;-webkit-background-clip:text;background-clip:text}.dark .eloq-thinking-shimmer{--eloq-thinking-base:#6b7280;--eloq-thinking-highlight:#e5e7eb}@media(prefers-reduced-motion:reduce){.eloq-thinking-shimmer{color:var(--eloq-thinking-base);background:0 0}}.eloq-regenerating-text{opacity:.4;transition:opacity .25s ease-out}.eloq-regenerating-sweep{border-radius:inherit;pointer-events:none;background:linear-gradient(100deg,#0000 30%,#ffffff8c,#0000 70%) 0 0/200% 100%;position:absolute;inset:0}.dark .eloq-regenerating-sweep{background-image:linear-gradient(100deg,#0000 30%,#ffffff1f,#0000 70%)}@media(prefers-reduced-motion:reduce){.eloq-regenerating-sweep{display:none}}@property --eloq-aura-angle{syntax:"<angle>";inherits:false;initial-value:0deg}.eloq-aura{--eloq-aura-strong:#9e9e9e;--eloq-aura-soft:#d1d1d1;background:conic-gradient(from var(--eloq-aura-angle),var(--eloq-aura-strong),var(--eloq-aura-soft),var(--eloq-aura-strong));border-radius:9999px;padding:2px;animation:2.6s linear infinite eloq-aura-spin;position:relative}@keyframes eloq-aura-spin{to{--eloq-aura-angle:360deg}}.eloq-aura-shine{border-radius:inherit;pointer-events:none;position:absolute;inset:0;overflow:hidden}.eloq-aura-shine:after{content:"";background:linear-gradient(90deg,#0000,#fffc,#0000);width:18%;position:absolute;top:-20%;bottom:-20%;left:0;transform:translate(-200%)skew(-20deg)}.eloq-aura-shine--active:after{animation:1.1s ease-in-out both eloq-aura-shine-sweep}@keyframes eloq-aura-shine-sweep{0%{transform:translate(-200%)skew(-20deg)}to{transform:translate(700%)skew(-20deg)}}@media(prefers-reduced-motion:reduce){.eloq-aura{animation:none}.eloq-aura-shine:after,.eloq-aura-shine--active:after{opacity:0;animation:none}}@keyframes panel-in{0%{opacity:0;transform:scale(.05)}to{opacity:1;transform:scale(1)}}@keyframes thinking-dot{0%,60%,to{opacity:.45;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}@keyframes regenerating-sweep{0%{background-position:150% 0}to{background-position:-50% 0}}@keyframes thinking-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@keyframes panel-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.05)}}@keyframes message-in{0%{opacity:0;transform:translateY(.5rem)}to{opacity:1;transform:translateY(0)}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{0%{opacity:1}to{opacity:0}}@keyframes slide-up-in{0%{transform:translateY(100%)}to{transform:translateY(0)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}', oo = "@media(prefers-reduced-motion:no-preference){.eloquentai-chat-launcher{transition:transform .2s ease-in-out}.eloquentai-chat-launcher:hover{transform:scale(1.1)}}", ro = [
37
13
  "button",
38
14
  "a[href]",
@@ -77,7 +53,7 @@ function ao({
77
53
  {
78
54
  "aria-hidden": !0,
79
55
  className: "eloq:absolute eloq:inset-0 eloq:flex eloq:justify-center eloq:items-center eloq:m-auto",
80
- children: /* @__PURE__ */ I(Tt, { bgColor: r, fgColor: n })
56
+ children: /* @__PURE__ */ I(At, { bgColor: r, fgColor: n })
81
57
  }
82
58
  ),
83
59
  /* @__PURE__ */ I(
@@ -97,10 +73,10 @@ function Ge({ children: e, head: t, frameRef: o, ...r }) {
97
73
  a(i), o && (o.current = i);
98
74
  },
99
75
  [o]
100
- ), s = n?.contentWindow?.document?.head, c = n?.contentWindow?.document?.body;
76
+ ), s = n?.contentWindow?.document?.head, u = n?.contentWindow?.document?.body;
101
77
  return /* @__PURE__ */ ke("iframe", { ...r, ref: l, children: [
102
78
  s && ot(t, s),
103
- c && ot(e, c)
79
+ u && ot(e, u)
104
80
  ] });
105
81
  }
106
82
  function io({ children: e, container: t }) {
@@ -113,35 +89,35 @@ function so({
113
89
  onMessageClick: r,
114
90
  autoHideDelay: n
115
91
  }) {
116
- const [a, l] = C(!1), [s, c] = C("entering"), [i, u] = C(!1), p = Mt();
117
- if (V(() => {
92
+ const [a, l] = C(!1), [s, u] = C("entering"), [i, d] = C(!1), p = Pt();
93
+ if (K(() => {
118
94
  if (t) {
119
- l(!0), c("entering");
95
+ l(!0), u("entering");
120
96
  const h = setTimeout(() => {
121
- c("visible");
97
+ u("visible");
122
98
  }, 50);
123
99
  return () => clearTimeout(h);
124
100
  } else {
125
- c("exiting");
101
+ u("exiting");
126
102
  const h = setTimeout(() => {
127
- l(!1), c("entering");
103
+ l(!1), u("entering");
128
104
  }, 300);
129
105
  return () => clearTimeout(h);
130
106
  }
131
- }, [t]), V(() => {
107
+ }, [t]), K(() => {
132
108
  if (!t || i) return;
133
109
  let h = !1, f;
134
110
  const g = setTimeout(() => {
135
- h = !0, c("exiting"), f = setTimeout(() => {
111
+ h = !0, u("exiting"), f = setTimeout(() => {
136
112
  o();
137
113
  }, 300);
138
114
  }, n);
139
115
  return () => {
140
- clearTimeout(g), clearTimeout(f), h && c("visible");
116
+ clearTimeout(g), clearTimeout(f), h && u("visible");
141
117
  };
142
118
  }, [t, i, o, n]), !a)
143
119
  return null;
144
- const d = p.botBubbleTextColor || At(p.botBubbleColor);
120
+ const c = p.botBubbleTextColor || Ot(p.botBubbleColor);
145
121
  return /* @__PURE__ */ I(
146
122
  "div",
147
123
  {
@@ -159,9 +135,9 @@ function so({
159
135
  "div",
160
136
  {
161
137
  className: "eloq:relative eloq:drop-shadow-lg eloq:hover:drop-shadow-xl eloq:transition-all eloq:duration-300",
162
- onFocus: () => u(!0),
138
+ onFocus: () => d(!0),
163
139
  onBlur: (h) => {
164
- h.currentTarget.contains(h.relatedTarget) || u(!1);
140
+ h.currentTarget.contains(h.relatedTarget) || d(!1);
165
141
  },
166
142
  children: [
167
143
  /* @__PURE__ */ ke(
@@ -179,7 +155,7 @@ function so({
179
155
  ),
180
156
  style: {
181
157
  backgroundColor: p.botBubbleColor,
182
- color: d
158
+ color: c
183
159
  },
184
160
  onClick: r,
185
161
  children: [
@@ -230,9 +206,9 @@ function so({
230
206
  style: {
231
207
  // Follows the bubble's computed text colour, so the X blends
232
208
  // with the message on any bubble background (and dark mode).
233
- color: d
209
+ color: c
234
210
  },
235
- children: /* @__PURE__ */ I(Pt, { "aria-hidden": !0, className: "eloq:w-2.5 eloq:h-2.5", strokeWidth: 1.75 })
211
+ children: /* @__PURE__ */ I(Ut, { "aria-hidden": !0, className: "eloq:w-2.5 eloq:h-2.5", strokeWidth: 1.75 })
236
212
  }
237
213
  )
238
214
  ]
@@ -323,13 +299,13 @@ function it({ appId: e }) {
323
299
  return console.error("Error checking conversation expiration:", i), !0;
324
300
  }
325
301
  }, [r]), a = v(
326
- (i, u, p, d, h) => {
302
+ (i, d, p, c, h) => {
327
303
  try {
328
304
  if (!Me) return;
329
305
  const f = {
330
306
  conversationId: i,
331
- userId: u,
332
- deviceId: d,
307
+ userId: d,
308
+ deviceId: c,
333
309
  messages: go(p),
334
310
  lastActivity: Date.now(),
335
311
  chatToken: h
@@ -359,13 +335,13 @@ function it({ appId: e }) {
359
335
  if (!Me) return;
360
336
  const i = localStorage.getItem(t);
361
337
  if (i) {
362
- const u = JSON.parse(i);
338
+ const d = JSON.parse(i);
363
339
  localStorage.setItem(
364
340
  t,
365
341
  JSON.stringify({
366
342
  ...o,
367
- deviceId: u.deviceId,
368
- userId: u.userId
343
+ deviceId: d.deviceId,
344
+ userId: d.userId
369
345
  })
370
346
  );
371
347
  }
@@ -375,7 +351,7 @@ function it({ appId: e }) {
375
351
  i
376
352
  );
377
353
  }
378
- }, [t, o]), c = v(() => {
354
+ }, [t, o]), u = v(() => {
379
355
  try {
380
356
  if (!Me) return;
381
357
  const i = r();
@@ -389,14 +365,14 @@ function it({ appId: e }) {
389
365
  saveChatData: a,
390
366
  clearChatData: s,
391
367
  getSavedChatData: r,
392
- updateLastActivity: c,
368
+ updateLastActivity: u,
393
369
  markChatClosed: l
394
370
  };
395
371
  }
396
372
  function go(e) {
397
373
  return e.flatMap((t) => {
398
374
  if (!t.attachments) return [t];
399
- const o = t.attachments.filter((r) => Ot(r.url)).map(({ url: r, mimeType: n, name: a }) => ({ url: r, mimeType: n, name: a }));
375
+ const o = t.attachments.filter((r) => jt(r.url)).map(({ url: r, mimeType: n, name: a }) => ({ url: r, mimeType: n, name: a }));
400
376
  return o.length > 0 ? [{ ...t, attachments: o }] : t.content ? [{ ...t, attachments: void 0 }] : [];
401
377
  });
402
378
  }
@@ -425,12 +401,12 @@ function _o(e) {
425
401
  channel: r,
426
402
  onEvent: n,
427
403
  onDisconnect: a,
428
- createWebSocket: l = (u, p) => new WebSocket(u, p)
429
- } = e, s = xo(t, o), c = yo(t), i = crypto.randomUUID();
430
- return new Promise((u, p) => {
431
- let d;
404
+ createWebSocket: l = (d, p) => new WebSocket(d, p)
405
+ } = e, s = xo(t, o), u = yo(t), i = crypto.randomUUID();
406
+ return new Promise((d, p) => {
407
+ let c;
432
408
  try {
433
- d = l(c, [
409
+ c = l(u, [
434
410
  mo,
435
411
  ko(s)
436
412
  ]);
@@ -439,27 +415,27 @@ function _o(e) {
439
415
  return;
440
416
  }
441
417
  let h = "connecting", f = !1, g = vo, R = Date.now(), q = null, z = null;
442
- const P = () => {
418
+ const A = () => {
443
419
  q && (clearTimeout(q), q = null), z && (clearInterval(z), z = null);
444
420
  }, E = (m) => {
445
421
  if (h === "closed") return;
446
422
  const y = h === "established";
447
- h = "closed", P();
423
+ h = "closed", A();
448
424
  try {
449
- d.close();
425
+ c.close();
450
426
  } catch {
451
427
  }
452
428
  f || (y ? a(m) : p(new Error(m)));
453
- }, j = (m) => {
454
- d.readyState === qo && d.send(JSON.stringify(m));
455
429
  }, O = (m) => {
430
+ c.readyState === qo && c.send(JSON.stringify(m));
431
+ }, U = (m) => {
456
432
  q && clearTimeout(q), q = setTimeout(() => {
457
433
  E(`Timed out waiting for ${m}`);
458
434
  }, bo);
459
435
  };
460
- d.addEventListener("open", () => {
461
- h !== "closed" && (j({ type: "connection_init" }), O("connection_ack"));
462
- }), d.addEventListener("message", (m) => {
436
+ c.addEventListener("open", () => {
437
+ h !== "closed" && (O({ type: "connection_init" }), U("connection_ack"));
438
+ }), c.addEventListener("message", (m) => {
463
439
  if (h === "closed") return;
464
440
  let y;
465
441
  try {
@@ -471,12 +447,12 @@ function _o(e) {
471
447
  switch (y.type) {
472
448
  case "connection_ack": {
473
449
  if (h !== "connecting") return;
474
- h = "subscribing", typeof y.connectionTimeoutMs == "number" && (g = y.connectionTimeoutMs), j({
450
+ h = "subscribing", typeof y.connectionTimeoutMs == "number" && (g = y.connectionTimeoutMs), O({
475
451
  type: "subscribe",
476
452
  id: i,
477
453
  channel: r,
478
454
  authorization: s
479
- }), O("subscribe_success");
455
+ }), U("subscribe_success");
480
456
  return;
481
457
  }
482
458
  case "connection_error": {
@@ -487,9 +463,9 @@ function _o(e) {
487
463
  if (h !== "subscribing" || y.id !== i) return;
488
464
  h = "established", q && (clearTimeout(q), q = null), R = Date.now(), z = setInterval(() => {
489
465
  Date.now() - R > g && E("Keep-alive timeout");
490
- }, wo), u({
466
+ }, wo), d({
491
467
  close: () => {
492
- f = !0, j({ type: "unsubscribe", id: i }), E("Closed by client");
468
+ f = !0, O({ type: "unsubscribe", id: i }), E("Closed by client");
493
469
  }
494
470
  });
495
471
  return;
@@ -529,9 +505,9 @@ function _o(e) {
529
505
  default:
530
506
  return;
531
507
  }
532
- }), d.addEventListener("close", () => {
508
+ }), c.addEventListener("close", () => {
533
509
  E("WebSocket closed");
534
- }), d.addEventListener("error", () => {
510
+ }), c.addEventListener("error", () => {
535
511
  E("WebSocket error");
536
512
  });
537
513
  });
@@ -635,8 +611,8 @@ function Se(e, t, o) {
635
611
  const n = e.inst?._zod?.traits;
636
612
  n?.has("$ZodType") && (n.has("$ZodCheck") ? (r = e).schema ?? (r.schema = e.inst) : e.schema = e.inst);
637
613
  const a = e.schema !== e.inst ? e.schema?._zod.def?.error : void 0, l = e.message ? e.message : Ae(e.inst?._zod.def?.error?.(e)) ?? Ae(a?.(e)) ?? Ae(t?.error?.(e)) ?? Ae(o.customError?.(e)) ?? Ae(o.localeError?.(e)) ?? "Invalid input", s = {};
638
- for (const c of Object.keys(e))
639
- c === "inst" || c === "schema" || c === "continue" || c === "input" || c === "__proto__" || (s[c] = e[c]);
614
+ for (const u of Object.keys(e))
615
+ u === "inst" || u === "schema" || u === "continue" || u === "input" || u === "__proto__" || (s[u] = e[u]);
640
616
  return s.path ?? (s.path = []), s.message = l, t?.reportInput && (s.input = e.input), s;
641
617
  }
642
618
  function Ao(e, t) {
@@ -734,25 +710,25 @@ function $o(e) {
734
710
  }
735
711
  function Q(e, t, o, r) {
736
712
  const n = {};
737
- function a(d) {
738
- this.def = d, this.constr = p, this.traits = /* @__PURE__ */ new Set();
713
+ function a(c) {
714
+ this.def = c, this.constr = p, this.traits = /* @__PURE__ */ new Set();
739
715
  }
740
716
  a.prototype = n;
741
717
  const l = o, s = l && /* @__PURE__ */ new WeakSet();
742
- function c(d, h) {
743
- if (d._zod) {
744
- if (d._zod.traits.has(e))
718
+ function u(c, h) {
719
+ if (c._zod) {
720
+ if (c._zod.traits.has(e))
745
721
  return;
746
722
  } else {
747
723
  Qe.value = new a(h);
748
724
  try {
749
- Object.defineProperty(d, "_zod", Qe);
725
+ Object.defineProperty(c, "_zod", Qe);
750
726
  } finally {
751
727
  Qe.value = void 0;
752
728
  }
753
729
  }
754
- if (d._zod.traits.add(e), t(d, h), s) {
755
- const g = Object.getPrototypeOf(d), R = d._zod.constr.prototype;
730
+ if (c._zod.traits.add(e), t(c, h), s) {
731
+ const g = Object.getPrototypeOf(c), R = c._zod.constr.prototype;
756
732
  let q = g;
757
733
  for (; q && q !== R; )
758
734
  q = Object.getPrototypeOf(q);
@@ -761,15 +737,15 @@ function Q(e, t, o, r) {
761
737
  }
762
738
  const f = p.prototype;
763
739
  for (const g in f)
764
- Object.prototype.hasOwnProperty.call(f, g) && (g in d || (d[g] = f[g].bind(d)));
740
+ Object.prototype.hasOwnProperty.call(f, g) && (g in c || (c[g] = f[g].bind(c)));
765
741
  }
766
742
  const i = r?.Parent ?? Object;
767
- class u extends i {
743
+ class d extends i {
768
744
  }
769
- Object.defineProperty(u, "name", { value: e });
770
- function p(d) {
771
- const h = r?.Parent ? $o(u) : this;
772
- c(h, d);
745
+ Object.defineProperty(d, "name", { value: e });
746
+ function p(c) {
747
+ const h = r?.Parent ? $o(d) : this;
748
+ u(h, c);
773
749
  const f = h._zod.deferred;
774
750
  if (f) {
775
751
  for (const R of f)
@@ -779,8 +755,8 @@ function Q(e, t, o, r) {
779
755
  const g = globalThis.__zod_globalConfig?.postProcessor;
780
756
  return g && g(h), h;
781
757
  }
782
- return Object.defineProperty(p, "init", { value: c }), Object.defineProperty(p, Symbol.hasInstance, {
783
- value: (d) => r?.Parent && d instanceof r.Parent ? !0 : d?._zod?.traits?.has(e)
758
+ return Object.defineProperty(p, "init", { value: u }), Object.defineProperty(p, Symbol.hasInstance, {
759
+ value: (c) => r?.Parent && c instanceof r.Parent ? !0 : c?._zod?.traits?.has(e)
784
760
  }), Object.defineProperty(p, "name", { value: e }), p;
785
761
  }
786
762
  class Oe extends Error {
@@ -819,7 +795,7 @@ const No = {
819
795
  Object.defineProperty(this, "toString", { value: r, configurable: !0, writable: !0 });
820
796
  }
821
797
  }));
822
- }, He = Q("$ZodError", Zo, void 0, {
798
+ }, Ve = Q("$ZodError", Zo, void 0, {
823
799
  Parent: Error
824
800
  }), Ko = (e) => {
825
801
  const t = (o, r, n, a) => {
@@ -827,29 +803,29 @@ const No = {
827
803
  if (s instanceof Promise)
828
804
  throw new Oe();
829
805
  if (s.issues.length) {
830
- const c = new (a?.Err ?? e)(s.issues.map((i) => Se(i, l, ye())));
831
- throw St(c, a?.callee ?? t), c;
806
+ const u = new (a?.Err ?? e)(s.issues.map((i) => Se(i, l, ye())));
807
+ throw St(u, a?.callee ?? t), u;
832
808
  }
833
809
  return s.value;
834
810
  };
835
811
  return t;
836
- }, Ho = /* @__PURE__ */ Ko(He), Vo = (e) => {
812
+ }, Vo = /* @__PURE__ */ Ko(Ve), Wo = (e) => {
837
813
  const t = async (o, r, n, a) => {
838
814
  const l = n ? { ...n, async: !0 } : { async: !0 };
839
815
  let s = o._zod.run({ value: r, issues: [] }, l);
840
816
  if (s instanceof Promise && (s = await s), s.issues.length) {
841
- const c = new (a?.Err ?? e)(s.issues.map((i) => Se(i, l, ye())));
842
- throw St(c, a?.callee ?? t), c;
817
+ const u = new (a?.Err ?? e)(s.issues.map((i) => Se(i, l, ye())));
818
+ throw St(u, a?.callee ?? t), u;
843
819
  }
844
820
  return s.value;
845
821
  };
846
822
  return t;
847
- }, Wo = /* @__PURE__ */ Vo(He), Fo = (e) => (t, o, r) => {
823
+ }, Ho = /* @__PURE__ */ Wo(Ve), Fo = (e) => (t, o, r) => {
848
824
  const n = r ? { ...r, async: !1 } : { async: !1 }, a = t._zod.run({ value: o, issues: [] }, n);
849
825
  if (a instanceof Promise)
850
826
  throw new Oe();
851
827
  return a.issues.length ? It(e, a.issues, n) : { success: !0, data: a.value };
852
- }, Jo = /* @__PURE__ */ Fo(He);
828
+ }, Jo = /* @__PURE__ */ Fo(Ve);
853
829
  function It(e, t, o) {
854
830
  let r;
855
831
  return {
@@ -866,7 +842,7 @@ const Go = (e) => async (t, o, r) => {
866
842
  const n = r ? { ...r, async: !0 } : { async: !0 };
867
843
  let a = t._zod.run({ value: o, issues: [] }, n);
868
844
  return a instanceof Promise && (a = await a), a.issues.length ? It(e, a.issues, n) : { success: !0, data: a.value };
869
- }, Yo = /* @__PURE__ */ Go(He), Xo = /^[\s\S]{0,}$/, Qo = /^-?\d+(?:\.\d+)?$/, er = /^null$/i, tr = {
845
+ }, Yo = /* @__PURE__ */ Go(Ve), Xo = /^[\s\S]{0,}$/, Qo = /^-?\d+(?:\.\d+)?$/, er = /^null$/i, tr = {
870
846
  major: 4,
871
847
  minor: 6,
872
848
  patch: 7
@@ -882,55 +858,55 @@ const Go = (e) => async (t, o, r) => {
882
858
  e._zod.run = e._zod.parse;
883
859
  });
884
860
  else {
885
- const a = (s, c, i) => {
861
+ const a = (s, u, i) => {
886
862
  if (s.memo)
887
863
  return s;
888
- let u = _e(s), p;
889
- for (const d of c) {
890
- if (d._zod.def.when) {
891
- if (Mo(s) || !d._zod.def.when(s))
864
+ let d = _e(s), p;
865
+ for (const c of u) {
866
+ if (c._zod.def.when) {
867
+ if (Mo(s) || !c._zod.def.when(s))
892
868
  continue;
893
- } else if (u)
869
+ } else if (d)
894
870
  continue;
895
- const h = s.issues.length, f = d._zod.check(s);
871
+ const h = s.issues.length, f = c._zod.check(s);
896
872
  if (f instanceof Promise && i?.async === !1)
897
873
  throw new Oe();
898
874
  if (p || f instanceof Promise)
899
875
  p = (p ?? Promise.resolve()).then(async () => {
900
- await f, s.issues.length !== h && (pt(s.issues, h, e), u || (u = _e(s, h)));
876
+ await f, s.issues.length !== h && (pt(s.issues, h, e), d || (d = _e(s, h)));
901
877
  });
902
878
  else {
903
879
  if (s.issues.length === h)
904
880
  continue;
905
- pt(s.issues, h, e), u || (u = _e(s, h));
881
+ pt(s.issues, h, e), d || (d = _e(s, h));
906
882
  }
907
883
  }
908
884
  return p ? p.then(() => s) : s;
909
- }, l = (s, c, i) => {
885
+ }, l = (s, u, i) => {
910
886
  if (_e(s))
911
887
  return s.aborted = !0, s;
912
- const u = a(c, n, i);
913
- if (u instanceof Promise) {
888
+ const d = a(u, n, i);
889
+ if (d instanceof Promise) {
914
890
  if (i.async === !1)
915
891
  throw new Oe();
916
- return u.then((p) => e._zod.parse(p, i));
892
+ return d.then((p) => e._zod.parse(p, i));
917
893
  }
918
- return e._zod.parse(u, i);
894
+ return e._zod.parse(d, i);
919
895
  };
920
- e._zod.run = (s, c) => {
921
- if (c.skipChecks)
922
- return e._zod.parse(s, c);
923
- if (c.direction === "backward") {
924
- const u = e._zod.parse({ value: s.value, issues: [] }, { ...c, skipChecks: !0 });
925
- return u instanceof Promise ? u.then((p) => l(p, s, c)) : l(u, s, c);
896
+ e._zod.run = (s, u) => {
897
+ if (u.skipChecks)
898
+ return e._zod.parse(s, u);
899
+ if (u.direction === "backward") {
900
+ const d = e._zod.parse({ value: s.value, issues: [] }, { ...u, skipChecks: !0 });
901
+ return d instanceof Promise ? d.then((p) => l(p, s, u)) : l(d, s, u);
926
902
  }
927
- const i = e._zod.parse(s, c);
903
+ const i = e._zod.parse(s, u);
928
904
  if (i instanceof Promise) {
929
- if (c.async === !1)
905
+ if (u.async === !1)
930
906
  throw new Oe();
931
- return i.then((u) => a(u, n, c));
907
+ return i.then((d) => a(d, n, u));
932
908
  }
933
- return a(i, n, c);
909
+ return a(i, n, u);
934
910
  };
935
911
  }
936
912
  }, {
@@ -1025,7 +1001,7 @@ function sr(e) {
1025
1001
  };
1026
1002
  }
1027
1003
  function lr(e, t, o, r, n, a, l) {
1028
- const s = [], c = n.keySet, i = n.catchall._zod, u = i.def.type, p = i.optin, d = i.optout;
1004
+ const s = [], u = n.keySet, i = n.catchall._zod, d = i.def.type, p = i.optin, c = i.optout;
1029
1005
  let h = 0;
1030
1006
  for (const f in t) {
1031
1007
  if (l && o.issues.length !== h) {
@@ -1033,18 +1009,18 @@ function lr(e, t, o, r, n, a, l) {
1033
1009
  break;
1034
1010
  h = o.issues.length;
1035
1011
  }
1036
- if (c.has(f))
1012
+ if (u.has(f))
1037
1013
  continue;
1038
1014
  if (f === "__proto__") {
1039
- u === "never" && s.push(f);
1015
+ d === "never" && s.push(f);
1040
1016
  continue;
1041
1017
  }
1042
- if (u === "never") {
1018
+ if (d === "never") {
1043
1019
  s.push(f);
1044
1020
  continue;
1045
1021
  }
1046
1022
  const g = i.run({ value: t[f], issues: [] }, r);
1047
- g instanceof Promise ? e.push(g.then((R) => Ze(R, o, f, t, p, d))) : Ze(g, o, f, t, p, d);
1023
+ g instanceof Promise ? e.push(g.then((R) => Ze(R, o, f, t, p, c))) : Ze(g, o, f, t, p, c);
1048
1024
  }
1049
1025
  return s.length && o.issues.push({
1050
1026
  code: "unrecognized_keys",
@@ -1060,29 +1036,29 @@ const cr = /* @__PURE__ */ Q("$ZodObject", (e, t) => {
1060
1036
  const o = Object.getOwnPropertyDescriptor(t, "shape"), r = o?.get ? o.get.raw : t.shape ?? {};
1061
1037
  if (r) {
1062
1038
  const i = () => {
1063
- const u = { ...r };
1064
- return Object.defineProperty(t, "shape", { value: u }), i.raw = u, u;
1039
+ const d = { ...r };
1040
+ return Object.defineProperty(t, "shape", { value: d }), i.raw = d, d;
1065
1041
  };
1066
1042
  i.raw = r, Object.defineProperty(t, "shape", { get: i });
1067
1043
  }
1068
1044
  const n = Io(() => sr(t));
1069
1045
  be(e, "propValues", (i) => {
1070
- const u = i.def.shape, p = {};
1071
- for (const d in u) {
1072
- const h = u[d]._zod;
1046
+ const d = i.def.shape, p = {};
1047
+ for (const c in d) {
1048
+ const h = d[c]._zod;
1073
1049
  if (h.values) {
1074
- Object.prototype.hasOwnProperty.call(p, d) || Ro(p, d, /* @__PURE__ */ new Set());
1050
+ Object.prototype.hasOwnProperty.call(p, c) || Ro(p, c, /* @__PURE__ */ new Set());
1075
1051
  for (const f of h.values)
1076
- p[d].add(f);
1077
- h.optin !== void 0 && p[d].add(void 0);
1052
+ p[c].add(f);
1053
+ h.optin !== void 0 && p[c].add(void 0);
1078
1054
  }
1079
1055
  }
1080
1056
  return p;
1081
1057
  });
1082
1058
  const a = rt, l = t.catchall;
1083
1059
  let s;
1084
- const c = Ne.memoizer;
1085
- c?.attach(e), e._zod.parse = (i, u) => {
1060
+ const u = Ne.memoizer;
1061
+ u?.attach(e), e._zod.parse = (i, d) => {
1086
1062
  s ?? (s = n.value);
1087
1063
  const p = i.value;
1088
1064
  if (!a(p))
@@ -1092,8 +1068,8 @@ const cr = /* @__PURE__ */ Q("$ZodObject", (e, t) => {
1092
1068
  input: p,
1093
1069
  inst: e
1094
1070
  }), i;
1095
- i.value = c ? c.alloc(e, i, {}, u) : {};
1096
- const d = [], h = s.shape, f = u?.abortEarly;
1071
+ i.value = u ? u.alloc(e, i, {}, d) : {};
1072
+ const c = [], h = s.shape, f = d?.abortEarly;
1097
1073
  let g = i.issues.length;
1098
1074
  for (const R of s.allKeys) {
1099
1075
  if (f && i.issues.length !== g) {
@@ -1103,10 +1079,10 @@ const cr = /* @__PURE__ */ Q("$ZodObject", (e, t) => {
1103
1079
  }
1104
1080
  if (R === "__proto__")
1105
1081
  continue;
1106
- const q = h[R], z = q._zod.optin, P = q._zod.optout, E = q._zod.run({ value: p[R], issues: [] }, u);
1107
- E instanceof Promise ? d.push(E.then((j) => Ze(j, i, R, p, z, P))) : Ze(E, i, R, p, z, P);
1082
+ const q = h[R], z = q._zod.optin, A = q._zod.optout, E = q._zod.run({ value: p[R], issues: [] }, d);
1083
+ E instanceof Promise ? c.push(E.then((O) => Ze(O, i, R, p, z, A))) : Ze(E, i, R, p, z, A);
1108
1084
  }
1109
- return l ? lr(d, p, i, u, n.value, e, f === !0) : d.length ? Promise.all(d).then(() => i) : i;
1085
+ return l ? lr(c, p, i, d, n.value, e, f === !0) : c.length ? Promise.all(c).then(() => i) : i;
1110
1086
  };
1111
1087
  });
1112
1088
  function mt(e, t, o, r) {
@@ -1138,16 +1114,16 @@ const ur = /* @__PURE__ */ Q("$ZodUnion", (e, t) => {
1138
1114
  let a = !1;
1139
1115
  const l = [];
1140
1116
  for (const s of t.options) {
1141
- const c = s._zod.run({
1117
+ const u = s._zod.run({
1142
1118
  value: r.value,
1143
1119
  issues: []
1144
1120
  }, n);
1145
- if (c instanceof Promise)
1146
- l.push(c), a = !0;
1121
+ if (u instanceof Promise)
1122
+ l.push(u), a = !0;
1147
1123
  else {
1148
- if (c.issues.length === 0)
1149
- return c;
1150
- l.push(c);
1124
+ if (u.issues.length === 0)
1125
+ return u;
1126
+ l.push(u);
1151
1127
  }
1152
1128
  }
1153
1129
  return a ? Promise.all(l).then((s) => mt(s, r, e, n)) : mt(l, r, e, n);
@@ -1167,12 +1143,12 @@ const ur = /* @__PURE__ */ Q("$ZodUnion", (e, t) => {
1167
1143
  const l = [], s = t.keyType._zod.values;
1168
1144
  if (s && !t.partial) {
1169
1145
  r.value = o ? o.alloc(e, r, {}, n) : {};
1170
- const c = /* @__PURE__ */ new Set();
1171
- for (const u of s)
1172
- if (typeof u == "string" || typeof u == "number" || typeof u == "symbol") {
1173
- if (c.add(typeof u == "number" ? u.toString() : u), u === "__proto__")
1146
+ const u = /* @__PURE__ */ new Set();
1147
+ for (const d of s)
1148
+ if (typeof d == "string" || typeof d == "number" || typeof d == "symbol") {
1149
+ if (u.add(typeof d == "number" ? d.toString() : d), d === "__proto__")
1174
1150
  continue;
1175
- const p = t.keyType._zod.run({ value: u, issues: [] }, n);
1151
+ const p = t.keyType._zod.run({ value: d, issues: [] }, n);
1176
1152
  if (p instanceof Promise)
1177
1153
  throw new Error("Async schemas not supported in object keys currently");
1178
1154
  if (p.issues.length) {
@@ -1180,29 +1156,29 @@ const ur = /* @__PURE__ */ Q("$ZodUnion", (e, t) => {
1180
1156
  code: "invalid_key",
1181
1157
  origin: "record",
1182
1158
  issues: p.issues.map((f) => Se(f, n, ye())),
1183
- input: u,
1184
- path: [u],
1159
+ input: d,
1160
+ path: [d],
1185
1161
  inst: e
1186
1162
  });
1187
1163
  continue;
1188
1164
  }
1189
- const d = p.value;
1190
- if (d === "__proto__")
1165
+ const c = p.value;
1166
+ if (c === "__proto__")
1191
1167
  continue;
1192
- const h = t.valueType._zod.run({ value: a[u], issues: [] }, n);
1168
+ const h = t.valueType._zod.run({ value: a[d], issues: [] }, n);
1193
1169
  h instanceof Promise ? l.push(h.then((f) => {
1194
- f.issues.length && r.issues.push(...Pe(u, f.issues)), r.value[d] = f.value;
1195
- })) : (h.issues.length && r.issues.push(...Pe(u, h.issues)), r.value[d] = h.value);
1170
+ f.issues.length && r.issues.push(...Pe(d, f.issues)), r.value[c] = f.value;
1171
+ })) : (h.issues.length && r.issues.push(...Pe(d, h.issues)), r.value[c] = h.value);
1196
1172
  }
1197
1173
  let i;
1198
- for (const u in a)
1199
- if (!c.has(u))
1174
+ for (const d in a)
1175
+ if (!u.has(d))
1200
1176
  if (t.mode === "loose") {
1201
- if (u === "__proto__")
1177
+ if (d === "__proto__")
1202
1178
  continue;
1203
- r.value[u] = a[u];
1179
+ r.value[d] = a[d];
1204
1180
  } else
1205
- i = i ?? [], i.push(u);
1181
+ i = i ?? [], i.push(d);
1206
1182
  i && i.length > 0 && r.issues.push({
1207
1183
  code: "unrecognized_keys",
1208
1184
  input: a,
@@ -1212,43 +1188,43 @@ const ur = /* @__PURE__ */ Q("$ZodUnion", (e, t) => {
1212
1188
  });
1213
1189
  } else {
1214
1190
  r.value = o ? o.alloc(e, r, {}, n) : {};
1215
- let c;
1191
+ let u;
1216
1192
  for (const i of Reflect.ownKeys(a)) {
1217
1193
  if (i === "__proto__" || !Object.prototype.propertyIsEnumerable.call(a, i))
1218
1194
  continue;
1219
- let u = t.keyType._zod.run({ value: i, issues: [] }, n);
1220
- if (u instanceof Promise)
1195
+ let d = t.keyType._zod.run({ value: i, issues: [] }, n);
1196
+ if (d instanceof Promise)
1221
1197
  throw new Error("Async schemas not supported in object keys currently");
1222
- if (typeof i == "string" && Qo.test(i) && u.issues.length) {
1198
+ if (typeof i == "string" && Qo.test(i) && d.issues.length) {
1223
1199
  const f = t.keyType._zod.run({ value: Number(i), issues: [] }, n);
1224
1200
  if (f instanceof Promise)
1225
1201
  throw new Error("Async schemas not supported in object keys currently");
1226
- f.issues.length === 0 && (u = f);
1202
+ f.issues.length === 0 && (d = f);
1227
1203
  }
1228
- if (u.issues.length) {
1229
- t.mode === "loose" ? r.value[i] = a[i] : s ? (c = c ?? [], c.push(i)) : r.issues.push({
1204
+ if (d.issues.length) {
1205
+ t.mode === "loose" ? r.value[i] = a[i] : s ? (u = u ?? [], u.push(i)) : r.issues.push({
1230
1206
  code: "invalid_key",
1231
1207
  origin: "record",
1232
- issues: u.issues.map((f) => Se(f, n, ye())),
1208
+ issues: d.issues.map((f) => Se(f, n, ye())),
1233
1209
  input: i,
1234
1210
  path: [i],
1235
1211
  inst: e
1236
1212
  });
1237
1213
  continue;
1238
1214
  }
1239
- const d = u.value;
1240
- if (d === "__proto__")
1215
+ const c = d.value;
1216
+ if (c === "__proto__")
1241
1217
  continue;
1242
1218
  const h = t.valueType._zod.run({ value: a[i], issues: [] }, n);
1243
1219
  h instanceof Promise ? l.push(h.then((f) => {
1244
- f.issues.length && r.issues.push(...Pe(i, f.issues)), r.value[d] = f.value;
1245
- })) : (h.issues.length && r.issues.push(...Pe(i, h.issues)), r.value[d] = h.value);
1220
+ f.issues.length && r.issues.push(...Pe(i, f.issues)), r.value[c] = f.value;
1221
+ })) : (h.issues.length && r.issues.push(...Pe(i, h.issues)), r.value[c] = h.value);
1246
1222
  }
1247
- c && c.length > 0 && r.issues.push({
1223
+ u && u.length > 0 && r.issues.push({
1248
1224
  code: "unrecognized_keys",
1249
1225
  input: a,
1250
1226
  inst: e,
1251
- keys: c,
1227
+ keys: u,
1252
1228
  continue: !0
1253
1229
  });
1254
1230
  }
@@ -1302,10 +1278,10 @@ const Ie = /* @__PURE__ */ Q("ZodMiniType", (e, t) => {
1302
1278
  Ue(this, "with", e);
1303
1279
  },
1304
1280
  parse(e, t) {
1305
- return Ho(this, e, t, { callee: this.parse });
1281
+ return Vo(this, e, t, { callee: this.parse });
1306
1282
  },
1307
1283
  parseAsync(e, t) {
1308
- return Wo(this, e, t, { callee: this.parseAsync });
1284
+ return Ho(this, e, t, { callee: this.parseAsync });
1309
1285
  },
1310
1286
  safeParse(e, t) {
1311
1287
  return Jo(this, e, t);
@@ -1471,11 +1447,11 @@ const Sr = /* @__PURE__ */ B({
1471
1447
  }), Kr = /* @__PURE__ */ B({
1472
1448
  created_at: /* @__PURE__ */ T(),
1473
1449
  data: Ar
1474
- }), Hr = /* @__PURE__ */ B({
1450
+ }), Vr = /* @__PURE__ */ B({
1475
1451
  message_id: /* @__PURE__ */ st(/* @__PURE__ */ T()),
1476
1452
  created_at: /* @__PURE__ */ T(),
1477
1453
  data: Pr
1478
- }), Vr = /* @__PURE__ */ xr([
1454
+ }), Wr = /* @__PURE__ */ xr([
1479
1455
  Ur,
1480
1456
  jr,
1481
1457
  Dr,
@@ -1485,13 +1461,13 @@ const Sr = /* @__PURE__ */ B({
1485
1461
  $r,
1486
1462
  Zr,
1487
1463
  Kr,
1488
- Hr
1489
- ]), Wr = /* @__PURE__ */ B({
1464
+ Vr
1465
+ ]), Hr = /* @__PURE__ */ B({
1490
1466
  url: /* @__PURE__ */ T(),
1491
- mimeType: /* @__PURE__ */ ge(Ut),
1467
+ mimeType: /* @__PURE__ */ ge(Dt),
1492
1468
  name: /* @__PURE__ */ T()
1493
1469
  }), Fr = /* @__PURE__ */ B({
1494
- data: Wr
1470
+ data: Hr
1495
1471
  }), Jr = /* @__PURE__ */ B({
1496
1472
  data: /* @__PURE__ */ B({ urls: /* @__PURE__ */ kr(/* @__PURE__ */ T(), /* @__PURE__ */ T()) })
1497
1473
  }), Gr = 500, Yr = 3e4, Xr = 6e4, Qr = 1e4, en = 12e4;
@@ -1504,47 +1480,47 @@ function tn({
1504
1480
  onCognition: a,
1505
1481
  onCognitionComplete: l,
1506
1482
  onError: s,
1507
- onChatClosed: c,
1483
+ onChatClosed: u,
1508
1484
  onAgentCapturedUrl: i,
1509
- onAgentTopic: u,
1485
+ onAgentTopic: d,
1510
1486
  onAgentSummary: p,
1511
- onRatingRequest: d,
1487
+ onRatingRequest: c,
1512
1488
  onBreadcrumb: h,
1513
1489
  fetchHistory: f,
1514
1490
  getChatToken: g,
1515
1491
  backupPollingInterval: R = Xr
1516
1492
  }) {
1517
1493
  const q = $(/* @__PURE__ */ new Set());
1518
- V(() => {
1519
- for (const A of o)
1520
- A.id && q.current.add(A.id);
1494
+ K(() => {
1495
+ for (const P of o)
1496
+ P.id && q.current.add(P.id);
1521
1497
  }, [o]);
1522
- const z = $(null), P = $(null), E = $(0), j = $(null), O = $(null), m = $(null), y = $(null), _ = $(0), oe = $(!1), ee = $(!1), de = F(r), ae = F(n), D = F(a), J = F(l), N = F(s), W = F(c), re = F(i), le = F(u), G = F(p), ie = F(d), Y = F(h), ce = F(f), ve = F(g), { publishError: pe } = Ke(), ne = e?.app_sync_url, he = e?.app_sync_api_key, b = !!(ne && he), x = F(ne), U = F(he), M = v(() => {
1498
+ const z = $(null), A = $(null), E = $(0), O = $(null), U = $(null), m = $(null), y = $(null), _ = $(0), oe = $(!1), ee = $(!1), de = F(r), ae = F(n), D = F(a), J = F(l), N = F(s), H = F(u), re = F(i), le = F(d), G = F(p), ie = F(c), Y = F(h), ce = F(f), ve = F(g), { publishError: pe } = Ke(), ne = e?.app_sync_url, he = e?.app_sync_api_key, b = !!(ne && he), x = F(ne), j = F(he), M = v(() => {
1523
1499
  z.current && (z.current.close(), z.current = null);
1524
1500
  }, []), k = v(() => {
1525
- O.current && (clearInterval(O.current), O.current = null);
1501
+ U.current && (clearInterval(U.current), U.current = null);
1526
1502
  }, []), S = v(() => {
1527
1503
  _.current = 0, m.current && (clearInterval(m.current), m.current = null), y.current && (clearTimeout(y.current), y.current = null);
1528
1504
  }, []), w = v(() => {
1529
1505
  _.current = Math.max(0, _.current - 1), _.current === 0 && S();
1530
1506
  }, [S]), Z = v(() => {
1531
- j.current && (clearTimeout(j.current), j.current = null);
1507
+ O.current && (clearTimeout(O.current), O.current = null);
1532
1508
  }, []), X = $(() => {
1533
- }), K = v(
1534
- async (A) => {
1509
+ }), V = v(
1510
+ async (P) => {
1535
1511
  M();
1536
- const se = x.current, we = U.current;
1512
+ const se = x.current, we = j.current;
1537
1513
  if (!se || !we)
1538
1514
  throw new Error("Cannot connect: AppSync settings not available");
1539
1515
  const te = ve.current(), Fe = await _o({
1540
1516
  httpEndpoint: se,
1541
1517
  auth: te ? { authorizationToken: te } : { apiKey: we },
1542
- channel: `/default/chat/${A}`,
1518
+ channel: `/default/chat/${P}`,
1543
1519
  onDisconnect: () => {
1544
1520
  z.current = null, X.current();
1545
1521
  },
1546
1522
  onEvent: (je) => {
1547
- const Te = Vr.safeParse(je);
1523
+ const Te = Wr.safeParse(je);
1548
1524
  if (!Te.success) {
1549
1525
  console.error("Invalid conversation response:", Te.error);
1550
1526
  return;
@@ -1564,13 +1540,13 @@ function tn({
1564
1540
  content: L.data.content
1565
1541
  }
1566
1542
  },
1567
- A
1543
+ P
1568
1544
  );
1569
1545
  return;
1570
1546
  }
1571
1547
  case "error": {
1572
1548
  const ue = parseInt(me.data.code);
1573
- pe({ code: ue, message: jt(ue) }), N.current?.();
1549
+ pe({ code: ue, message: $t(ue) }), N.current?.();
1574
1550
  return;
1575
1551
  }
1576
1552
  case "agent_cognition": {
@@ -1594,7 +1570,7 @@ function tn({
1594
1570
  return;
1595
1571
  }
1596
1572
  case "chat_closed_expired": {
1597
- W.current?.(), ie.current?.();
1573
+ H.current?.(), ie.current?.();
1598
1574
  return;
1599
1575
  }
1600
1576
  case "chat_rating": {
@@ -1606,7 +1582,7 @@ function tn({
1606
1582
  return;
1607
1583
  }
1608
1584
  case "chat_escalated": {
1609
- W.current?.(), ie.current?.();
1585
+ H.current?.(), ie.current?.();
1610
1586
  return;
1611
1587
  }
1612
1588
  default:
@@ -1626,101 +1602,101 @@ function tn({
1626
1602
  w,
1627
1603
  pe,
1628
1604
  x,
1629
- U,
1605
+ j,
1630
1606
  ve,
1631
1607
  de,
1632
1608
  D,
1633
1609
  J,
1634
1610
  N,
1635
- W,
1611
+ H,
1636
1612
  re,
1637
1613
  le,
1638
1614
  G,
1639
1615
  ie,
1640
1616
  Y
1641
1617
  ]
1642
- ), H = v(
1643
- async (A) => {
1618
+ ), W = v(
1619
+ async (P) => {
1644
1620
  let se;
1645
1621
  try {
1646
- se = await ce.current(A);
1622
+ se = await ce.current(P);
1647
1623
  } catch (te) {
1648
1624
  console.warn("Backup poll failed:", te);
1649
1625
  return;
1650
1626
  }
1651
- if (P.current !== A) return;
1627
+ if (A.current !== P) return;
1652
1628
  const we = se.filter(
1653
1629
  (te) => (te.role === "user" || te.role === "assistant") && !!te.message_id
1654
1630
  );
1655
1631
  for (const te of we)
1656
1632
  te.role !== "assistant" || q.current.has(te.message_id) || (q.current.add(te.message_id), w());
1657
- ae.current(we, A);
1633
+ ae.current(we, P);
1658
1634
  },
1659
1635
  [ce, ae, w]
1660
1636
  ), fe = v(
1661
- (A) => {
1662
- k(), O.current = setInterval(
1663
- () => H(A),
1637
+ (P) => {
1638
+ k(), U.current = setInterval(
1639
+ () => W(P),
1664
1640
  R
1665
1641
  );
1666
1642
  },
1667
- [k, H, R]
1643
+ [k, W, R]
1668
1644
  ), Re = v(
1669
- function A() {
1670
- if (!oe.current || ee.current || j.current)
1645
+ function P() {
1646
+ if (!oe.current || ee.current || O.current)
1671
1647
  return;
1672
- const se = P.current;
1648
+ const se = A.current;
1673
1649
  if (!se) return;
1674
1650
  const we = Math.min(
1675
1651
  Gr * Math.pow(2, E.current),
1676
1652
  Yr
1677
1653
  );
1678
- E.current += 1, j.current = setTimeout(async () => {
1679
- j.current = null, ee.current = !0;
1654
+ E.current += 1, O.current = setTimeout(async () => {
1655
+ O.current = null, ee.current = !0;
1680
1656
  try {
1681
- await K(se), E.current = 0, ee.current = !1, await H(se);
1657
+ await V(se), E.current = 0, ee.current = !1, await W(se);
1682
1658
  } catch {
1683
- ee.current = !1, A();
1659
+ ee.current = !1, P();
1684
1660
  }
1685
1661
  }, we);
1686
1662
  },
1687
- [K, H]
1663
+ [V, W]
1688
1664
  );
1689
- V(() => {
1665
+ K(() => {
1690
1666
  X.current = Re;
1691
1667
  });
1692
1668
  const Ee = v(
1693
- async (A) => {
1694
- if (!b || !A)
1669
+ async (P) => {
1670
+ if (!b || !P)
1695
1671
  throw new Error(
1696
1672
  "Cannot connect: AppSync settings not ready or missing chatId"
1697
1673
  );
1698
- Z(), oe.current = !0, P.current = A, E.current = 0, fe(A), await K(A);
1674
+ Z(), oe.current = !0, A.current = P, E.current = 0, fe(P), await V(P);
1699
1675
  },
1700
- [b, Z, K, fe]
1676
+ [b, Z, V, fe]
1701
1677
  ), ze = v(() => {
1702
- oe.current = !1, P.current = null, E.current = 0, Z(), k(), S(), M();
1703
- }, [Z, k, S, M]), Ve = v(() => {
1704
- const A = P.current;
1705
- if (!A) return;
1678
+ oe.current = !1, A.current = null, E.current = 0, Z(), k(), S(), M();
1679
+ }, [Z, k, S, M]), We = v(() => {
1680
+ const P = A.current;
1681
+ if (!P) return;
1706
1682
  const se = _.current + 1;
1707
1683
  S(), _.current = se, m.current = setInterval(
1708
- () => H(A),
1684
+ () => W(P),
1709
1685
  Qr
1710
1686
  ), y.current = setTimeout(
1711
1687
  S,
1712
1688
  en
1713
1689
  );
1714
- }, [H, S]), We = v(() => {
1690
+ }, [W, S]), He = v(() => {
1715
1691
  q.current.clear();
1716
1692
  }, []);
1717
- return V(() => {
1718
- !t || !b || P.current === t || Ee(t).catch((A) => {
1719
- console.error("Failed to eagerly connect:", A), P.current === t && (oe.current = !0, X.current());
1720
- }).then(() => H(t));
1721
- }, [t, b, Ee, H]), V(() => () => {
1693
+ return K(() => {
1694
+ !t || !b || A.current === t || Ee(t).catch((P) => {
1695
+ console.error("Failed to eagerly connect:", P), A.current === t && (oe.current = !0, X.current());
1696
+ }).then(() => W(t));
1697
+ }, [t, b, Ee, W]), K(() => () => {
1722
1698
  ze();
1723
- }, [ze]), { connect: Ee, disconnect: ze, clearProcessedIds: We, expectReply: Ve };
1699
+ }, [ze]), { connect: Ee, disconnect: ze, clearProcessedIds: He, expectReply: We };
1724
1700
  }
1725
1701
  function on(e) {
1726
1702
  return {
@@ -1805,24 +1781,24 @@ function wt(e, t) {
1805
1781
  const o = new Set(t.map((s) => s.message_id)), r = [...e], n = [], a = [];
1806
1782
  let l = -1;
1807
1783
  for (const s of t) {
1808
- const c = r.findIndex(({ id: d }) => d === s.message_id);
1809
- if (c !== -1) {
1810
- l = c;
1784
+ const u = r.findIndex(({ id: c }) => c === s.message_id);
1785
+ if (u !== -1) {
1786
+ l = u;
1811
1787
  continue;
1812
1788
  }
1813
1789
  const i = pn(r, l, s.role, o);
1814
1790
  if (i !== -1) {
1815
- const d = r[i];
1791
+ const c = r[i];
1816
1792
  r[i] = {
1817
- ...d,
1793
+ ...c,
1818
1794
  id: s.message_id,
1819
- localId: d.localId ?? d.id,
1820
- ...d.sender === "user" && { isNew: !1 }
1821
- }, a.push([d.id, s.message_id]), l = i;
1795
+ localId: c.localId ?? c.id,
1796
+ ...c.sender === "user" && { isNew: !1 }
1797
+ }, a.push([c.id, s.message_id]), l = i;
1822
1798
  continue;
1823
1799
  }
1824
- const u = l === -1 ? hn(r) : l + 1, p = dn(s);
1825
- r.splice(u, 0, p), s.role === "assistant" && n.push(p), l = u;
1800
+ const d = l === -1 ? hn(r) : l + 1, p = dn(s);
1801
+ r.splice(d, 0, p), s.role === "assistant" && n.push(p), l = d;
1826
1802
  }
1827
1803
  return { messages: r, addedReplies: n, confirmedIds: a };
1828
1804
  }
@@ -1849,31 +1825,31 @@ function fn({
1849
1825
  deviceId: a,
1850
1826
  apiClient: l,
1851
1827
  chatSettings: s,
1852
- messages: c,
1828
+ messages: u,
1853
1829
  setMessages: i,
1854
- currentChat: u,
1830
+ currentChat: d,
1855
1831
  setCurrentChat: p,
1856
- onChatClosed: d,
1832
+ onChatClosed: c,
1857
1833
  isChatClosed: h,
1858
1834
  onAgentMessage: f
1859
1835
  }) {
1860
1836
  const { saveChatData: g, clearChatData: R, updateLastActivity: q, markChatClosed: z } = it({
1861
1837
  appId: e
1862
- }), { publishApiError: P, publishNetworkError: E } = Ke(), { showCognition: j, hideCognition: O } = Dt(), m = F(l), y = F(c), _ = $(0), oe = v(
1838
+ }), { publishApiError: A, publishNetworkError: E } = Ke(), { showCognition: O, hideCognition: U } = Bt(), m = F(l), y = F(u), _ = $(0), oe = v(
1863
1839
  (b, x) => {
1864
1840
  if (!b.response.content) return;
1865
- const U = !!s?.welcome_message && b.response.content === s.welcome_message, M = y.current.some(
1841
+ const j = !!s?.welcome_message && b.response.content === s.welcome_message, M = y.current.some(
1866
1842
  (w) => w.isRatingRequest
1867
1843
  ), k = y.current.some(
1868
1844
  (w) => w.id === b.message_id
1869
1845
  );
1870
- !U && !M && !k && f?.();
1846
+ !j && !M && !k && f?.();
1871
1847
  const S = _.current;
1872
1848
  i((w) => {
1873
- if (_.current !== S || w.some((K) => K.isRatingRequest) || w.some((K) => K.id === b.message_id) || s?.welcome_message && b.response.content === s.welcome_message)
1849
+ if (_.current !== S || w.some((V) => V.isRatingRequest) || w.some((V) => V.id === b.message_id) || s?.welcome_message && b.response.content === s.welcome_message)
1874
1850
  return w;
1875
1851
  const X = [
1876
- ...w.filter((K) => !K.isThinking),
1852
+ ...w.filter((V) => !V.isThinking),
1877
1853
  on(b)
1878
1854
  ];
1879
1855
  return g(
@@ -1897,28 +1873,28 @@ function fn({
1897
1873
  ]
1898
1874
  ), ee = v(
1899
1875
  (b, x) => {
1900
- const U = y.current.some(
1876
+ const j = y.current.some(
1901
1877
  (w) => w.isRatingRequest
1902
1878
  ), M = b.filter(
1903
- (w) => !(w.role === "assistant" && (U || s?.welcome_message && w.response.content === s.welcome_message))
1879
+ (w) => !(w.role === "assistant" && (j || s?.welcome_message && w.response.content === s.welcome_message))
1904
1880
  );
1905
1881
  wt(y.current, M).addedReplies.length > 0 && f?.();
1906
1882
  const S = _.current;
1907
1883
  i((w) => {
1908
1884
  if (_.current !== S) return w;
1909
- const { messages: Z, addedReplies: X, confirmedIds: K } = wt(
1885
+ const { messages: Z, addedReplies: X, confirmedIds: V } = wt(
1910
1886
  w,
1911
1887
  M
1912
1888
  );
1913
- if (X.length === 0 && K.length === 0) return w;
1914
- const H = X.length > 0 ? Z.filter((fe) => !fe.isThinking) : Z;
1889
+ if (X.length === 0 && V.length === 0) return w;
1890
+ const W = X.length > 0 ? Z.filter((fe) => !fe.isThinking) : Z;
1915
1891
  return g(
1916
1892
  x,
1917
1893
  t,
1918
- H,
1894
+ W,
1919
1895
  a,
1920
1896
  m.current?.getChatToken()
1921
- ), H;
1897
+ ), W;
1922
1898
  });
1923
1899
  },
1924
1900
  [
@@ -1932,25 +1908,25 @@ function fn({
1932
1908
  f
1933
1909
  ]
1934
1910
  ), de = v(() => {
1935
- O(), i((b) => b.filter((x) => !x.isThinking));
1936
- }, [i, O]), ae = v(() => {
1937
- i((b) => [...b.filter((U) => !U.isRatingRequest), nn()]);
1911
+ U(), i((b) => b.filter((x) => !x.isThinking));
1912
+ }, [i, U]), ae = v(() => {
1913
+ i((b) => [...b.filter((j) => !j.isRatingRequest), nn()]);
1938
1914
  }, [i]);
1939
- V(() => {
1915
+ K(() => {
1940
1916
  }, [ae]);
1941
1917
  const D = v(
1942
1918
  (b) => m.current ? m.current.getChatHistory(b) : Promise.resolve([]),
1943
1919
  [m]
1944
1920
  ), J = v(() => m.current?.getChatToken() ?? null, [m]), N = v(() => {
1945
- z(), d?.();
1946
- }, [z, d]), { connect: W, disconnect: re, clearProcessedIds: le, expectReply: G } = tn({
1921
+ z(), c?.();
1922
+ }, [z, c]), { connect: H, disconnect: re, clearProcessedIds: le, expectReply: G } = tn({
1947
1923
  chatSettings: s,
1948
- chatId: u?.id ?? null,
1949
- messages: c,
1924
+ chatId: d?.id ?? null,
1925
+ messages: u,
1950
1926
  onMessage: oe,
1951
1927
  onHistory: ee,
1952
- onCognition: j,
1953
- onCognitionComplete: O,
1928
+ onCognition: O,
1929
+ onCognitionComplete: U,
1954
1930
  onError: de,
1955
1931
  onChatClosed: N,
1956
1932
  onRatingRequest: ae,
@@ -1958,19 +1934,19 @@ function fn({
1958
1934
  fetchHistory: D,
1959
1935
  getChatToken: J
1960
1936
  }), ie = v(() => {
1961
- _.current += 1, O(), re(), le(), $t(c), i(
1937
+ _.current += 1, U(), re(), le(), Lt(u), i(
1962
1938
  (b) => b.filter((x) => Array.isArray(x) ? !1 : x.isWelcomeMessage)
1963
1939
  ), R(), p(null);
1964
1940
  }, [
1965
- O,
1941
+ U,
1966
1942
  re,
1967
1943
  le,
1968
- c,
1944
+ u,
1969
1945
  R,
1970
1946
  i,
1971
1947
  p
1972
1948
  ]), Y = v(
1973
- (b, x) => i((U) => vt(U, b, x)),
1949
+ (b, x) => i((j) => vt(j, b, x)),
1974
1950
  [i]
1975
1951
  ), ce = v(
1976
1952
  async (b) => {
@@ -1985,19 +1961,19 @@ function fn({
1985
1961
  });
1986
1962
  p({ id: x.chat_id });
1987
1963
  try {
1988
- await W(x.chat_id);
1989
- } catch (U) {
1964
+ await H(x.chat_id);
1965
+ } catch (j) {
1990
1966
  console.warn(
1991
1967
  "Failed to connect realtime channel, continuing with REST-only delivery:",
1992
- U
1968
+ j
1993
1969
  );
1994
1970
  }
1995
1971
  return x.chat_id;
1996
1972
  },
1997
- [n, t, a, o, r, p, W]
1973
+ [n, t, a, o, r, p, H]
1998
1974
  ), ve = v(
1999
- (b, x, U, M) => Promise.all(
2000
- U.map(
1975
+ (b, x, j, M) => Promise.all(
1976
+ j.map(
2001
1977
  ({ file: k }, S) => b.uploadAttachment({
2002
1978
  conversationId: x,
2003
1979
  file: k,
@@ -2006,16 +1982,16 @@ function fn({
2006
1982
  (Z) => ln(Z, S, w)
2007
1983
  )
2008
1984
  }).catch((w) => {
2009
- throw Bt(w, k.name);
1985
+ throw Nt(w, k.name);
2010
1986
  })
2011
1987
  )
2012
1988
  ),
2013
1989
  [Y]
2014
1990
  ), pe = v(
2015
- (b, x, U, M) => {
2016
- O(), M && i((S) => cn(S, U)), i((S) => S.filter((w) => !w.isThinking));
2017
- const k = () => Y(U, (S) => ({ ...S, isFailed: !0 }));
2018
- if (b instanceof Lt) {
1991
+ (b, x, j, M) => {
1992
+ U(), M && i((S) => cn(S, j)), i((S) => S.filter((w) => !w.isThinking));
1993
+ const k = () => Y(j, (S) => ({ ...S, isFailed: !0 }));
1994
+ if (b instanceof Zt) {
2019
1995
  k();
2020
1996
  return;
2021
1997
  }
@@ -2023,30 +1999,30 @@ function fn({
2023
1999
  E();
2024
2000
  return;
2025
2001
  }
2026
- P(b), b instanceof Le && // A 401 means an expired or closed chat token: drop the session so
2002
+ A(b), b instanceof Le && // A 401 means an expired or closed chat token: drop the session so
2027
2003
  // the next send starts a fresh one, as for a client-side expiry.
2028
- (b.status >= 500 || b.status === 401) ? (p(null), R(), i((S) => S.filter((w) => w.id !== U)), x.reset()) : k();
2004
+ (b.status >= 500 || b.status === 401) ? (p(null), R(), i((S) => S.filter((w) => w.id !== j)), x.reset()) : k();
2029
2005
  },
2030
2006
  [
2031
- O,
2007
+ U,
2032
2008
  i,
2033
2009
  Y,
2034
2010
  E,
2035
- P,
2011
+ A,
2036
2012
  p,
2037
2013
  R
2038
2014
  ]
2039
2015
  ), ne = v(
2040
2016
  async (b, x = []) => {
2041
- if (!l || c.some((k) => k.isRatingRequest)) return;
2017
+ if (!l || u.some((k) => k.isRatingRequest)) return;
2042
2018
  if (h) {
2043
2019
  i((k) => [...k, an()]);
2044
2020
  return;
2045
2021
  }
2046
- const U = _.current, M = sn(b, x);
2022
+ const j = _.current, M = sn(b, x);
2047
2023
  i((k) => [...k, M]), q();
2048
2024
  try {
2049
- const k = u?.id || await ce(l), S = await ve(
2025
+ const k = d?.id || await ce(l), S = await ve(
2050
2026
  l,
2051
2027
  k,
2052
2028
  x,
@@ -2054,7 +2030,7 @@ function fn({
2054
2030
  );
2055
2031
  S.length > 0 && Y(M.id, (Z) => ({
2056
2032
  ...Z,
2057
- attachments: Nt(S, x)
2033
+ attachments: Kt(S, x)
2058
2034
  }));
2059
2035
  const w = await l.replyToConversation({
2060
2036
  text: b.content,
@@ -2066,20 +2042,20 @@ function fn({
2066
2042
  userData: r
2067
2043
  });
2068
2044
  i((Z) => {
2069
- if (_.current !== U) return Z;
2070
- const X = Z.some((H) => H.id === M.id) ? M.id : w.message_id, K = vt(Z, X, (H) => ({
2071
- ...H,
2045
+ if (_.current !== j) return Z;
2046
+ const X = Z.some((W) => W.id === M.id) ? M.id : w.message_id, V = vt(Z, X, (W) => ({
2047
+ ...W,
2072
2048
  id: w.message_id,
2073
- localId: H.localId ?? H.id,
2049
+ localId: W.localId ?? W.id,
2074
2050
  isNew: !1
2075
2051
  }));
2076
2052
  return g(
2077
2053
  k,
2078
2054
  t,
2079
- K,
2055
+ V,
2080
2056
  a,
2081
2057
  l.getChatToken()
2082
- ), K;
2058
+ ), V;
2083
2059
  }), G();
2084
2060
  } catch (k) {
2085
2061
  throw pe(
@@ -2092,11 +2068,11 @@ function fn({
2092
2068
  },
2093
2069
  [
2094
2070
  l,
2095
- c,
2071
+ u,
2096
2072
  h,
2097
2073
  i,
2098
2074
  q,
2099
- u?.id,
2075
+ d?.id,
2100
2076
  ce,
2101
2077
  ve,
2102
2078
  Y,
@@ -2111,10 +2087,10 @@ function fn({
2111
2087
  ]
2112
2088
  ), he = v(
2113
2089
  async (b) => {
2114
- const x = u?.id;
2090
+ const x = d?.id;
2115
2091
  !m.current || !x || await m.current.addRating(x, b);
2116
2092
  },
2117
- [u?.id, m]
2093
+ [d?.id, m]
2118
2094
  );
2119
2095
  return {
2120
2096
  onCleanMessages: ie,
@@ -2122,7 +2098,7 @@ function fn({
2122
2098
  onRateChat: he
2123
2099
  };
2124
2100
  }
2125
- const gn = { BASE_URL: "/", DEV: !1, MODE: "dev", PROD: !0, SSR: !1, VITE_API_URL: "https://chat.eloquentai.dev", VITE_CDN_URL: "https://cdn.eloquentai.dev", VITE_ENVIRONMENT: "dev", VITE_REGION_API_URL: "https://region.eloquentai.dev" };
2101
+ const gn = { BASE_URL: "/", DEV: !1, MODE: "dev", PROD: !0, SSR: !1, VITE_API_URL: "https://chat.eloquentai.dev", VITE_CDN_URL: "https://cdn.eloquentai.dev", VITE_ENVIRONMENT: "dev", VITE_REGION_API_URL: "https://region.eloquentai.dev", VITE_SENTRY_DSN: "" };
2126
2102
  function Et(e) {
2127
2103
  return typeof window > "u" || typeof import.meta > "u" ? "" : gn[e] || "";
2128
2104
  }
@@ -2138,7 +2114,7 @@ class qn {
2138
2114
  userId = null;
2139
2115
  conversationId = null;
2140
2116
  constructor(t) {
2141
- this.userId = t.userId || null, this.httpClient = new Zt(t);
2117
+ this.userId = t.userId || null, this.httpClient = new Vt(t);
2142
2118
  }
2143
2119
  getUserData() {
2144
2120
  return {
@@ -2267,9 +2243,9 @@ const De = /* @__PURE__ */ new Map(), $e = /* @__PURE__ */ new Map();
2267
2243
  function _n(e, t, o) {
2268
2244
  const r = o?.dedupe !== !1, [n, a] = C(
2269
2245
  () => De.get(e)
2270
- ), { publishApiError: l, publishNetworkError: s } = Ke(), [c, i] = C(void 0), [u, p] = C(!1), d = $(!0);
2271
- $(() => (d.current = !0, () => {
2272
- d.current = !1;
2246
+ ), { publishApiError: l, publishNetworkError: s } = Ke(), [u, i] = C(void 0), [d, p] = C(!1), c = $(!0);
2247
+ $(() => (c.current = !0, () => {
2248
+ c.current = !1;
2273
2249
  }));
2274
2250
  const h = v(async () => {
2275
2251
  if (De.has(e)) {
@@ -2283,14 +2259,14 @@ function _n(e, t, o) {
2283
2259
  const f = t();
2284
2260
  r && $e.set(e, f);
2285
2261
  const g = await f;
2286
- return De.set(e, g), d.current && a(g), g;
2262
+ return De.set(e, g), c.current && a(g), g;
2287
2263
  } catch (f) {
2288
- throw f instanceof at || f instanceof Le && f.status === 403 ? s() : l(f), d.current && i(f), f;
2264
+ throw f instanceof at || f instanceof Le && f.status === 403 ? s() : l(f), c.current && i(f), f;
2289
2265
  } finally {
2290
- $e.delete(e), d.current && p(!1);
2266
+ $e.delete(e), c.current && p(!1);
2291
2267
  }
2292
2268
  }, [e, r, t, l, s]);
2293
- return { data: n, error: c, isLoading: u, fetch: h };
2269
+ return { data: n, error: u, isLoading: d, fetch: h };
2294
2270
  }
2295
2271
  function yt(e, t) {
2296
2272
  const o = e?.deviceId || crypto.randomUUID();
@@ -2324,46 +2300,46 @@ function Sn({
2324
2300
  userId: a,
2325
2301
  externalId: l,
2326
2302
  deviceId: s,
2327
- isReady: c
2328
- } = Cn({ appId: t, initialUserId: o }), { isChatExpired: i, clearChatData: u, getSavedChatData: p } = it({
2303
+ isReady: u
2304
+ } = Cn({ appId: t, initialUserId: o }), { isChatExpired: i, clearChatData: d, getSavedChatData: p } = it({
2329
2305
  appId: t
2330
- }), { current: d } = $(e || vn()), [h] = C(
2306
+ }), { current: c } = $(e || vn()), [h] = C(
2331
2307
  new qn({
2332
- baseURL: d,
2308
+ baseURL: c,
2333
2309
  appId: t
2334
2310
  })
2335
- ), [f, g] = C(null), [R, q] = C(null), [z, P] = C([]), [E, j] = C(!1), [O, m] = C(!1), [y, _] = C(!0), ee = _n(`sdk-boot-${t}`, () => h.boot()).fetch;
2336
- V(() => {
2311
+ ), [f, g] = C(null), [R, q] = C(null), [z, A] = C([]), [E, O] = C(!1), [U, m] = C(!1), [y, _] = C(!0), ee = _n(`sdk-boot-${t}`, () => h.boot()).fetch;
2312
+ K(() => {
2337
2313
  if (i())
2338
- u();
2314
+ d();
2339
2315
  else {
2340
2316
  const {
2341
2317
  conversationId: ae,
2342
2318
  userId: D,
2343
2319
  messages: J,
2344
2320
  isChatClosed: N,
2345
- chatToken: W
2321
+ chatToken: H
2346
2322
  } = p();
2347
2323
  ae && D && (q({
2348
2324
  id: ae
2349
- }), h.setChatToken(W ?? null), J && J.length > 0 && P(J), N && m(!0));
2325
+ }), h.setChatToken(H ?? null), J && J.length > 0 && A(J), N && m(!0));
2350
2326
  }
2351
- }, [p, i, u, h]);
2327
+ }, [p, i, d, h]);
2352
2328
  const de = $(!1);
2353
- return V(() => {
2329
+ return K(() => {
2354
2330
  if (de.current) return;
2355
2331
  de.current = !0, (async () => {
2356
2332
  const [D, J] = await ct(
2357
2333
  qt(() => h.getOrganizationByAppId(t))
2358
2334
  );
2359
2335
  if (J) {
2360
- console.error("Failed to fetch organization data:", J), _(!1), j(!0);
2336
+ console.error("Failed to fetch organization data:", J), _(!1), O(!0);
2361
2337
  return;
2362
2338
  }
2363
2339
  h.setRegion(D.region);
2364
- const [N, W] = await ct(qt(ee));
2365
- if (W) {
2366
- _(!1), j(!0);
2340
+ const [N, H] = await ct(qt(ee));
2341
+ if (H) {
2342
+ _(!1), O(!0);
2367
2343
  return;
2368
2344
  }
2369
2345
  const {
@@ -2371,13 +2347,13 @@ function Sn({
2371
2347
  userId: le,
2372
2348
  messages: G
2373
2349
  } = p();
2374
- re && le && G.some(Kt) && P(
2350
+ re && le && G.some(Wt) && A(
2375
2351
  await Ht(h, re, G)
2376
2352
  );
2377
2353
  const ie = N.chat_settings.welcome_message;
2378
- g(N.chat_settings), _(N.chat_settings.is_active ?? !0), ie && P((Y) => Y.length > 0 || Y.some((ce) => ce.isWelcomeMessage) ? Y : [rn(ie)]), j(!0);
2354
+ g(N.chat_settings), _(N.chat_settings.is_active ?? !0), ie && A((Y) => Y.length > 0 || Y.some((ce) => ce.isWelcomeMessage) ? Y : [rn(ie)]), O(!0);
2379
2355
  })();
2380
- }, [c, h, t, ee, p]), {
2356
+ }, [u, h, t, ee, p]), {
2381
2357
  userId: a,
2382
2358
  userName: r,
2383
2359
  userData: n,
@@ -2388,7 +2364,7 @@ function Sn({
2388
2364
  currentChat: R,
2389
2365
  messages: z,
2390
2366
  isReady: E,
2391
- isChatClosed: O,
2367
+ isChatClosed: U,
2392
2368
  isChatActive: y
2393
2369
  };
2394
2370
  }
@@ -2400,13 +2376,13 @@ function Rn(e) {
2400
2376
  const [t, o] = C(In), [r, n] = C(
2401
2377
  null
2402
2378
  ), a = e ?? t, l = typeof window > "u";
2403
- return V(() => {
2379
+ return K(() => {
2404
2380
  if (l) return;
2405
- const s = window.matchMedia(zt), c = (i) => {
2381
+ const s = window.matchMedia(zt), u = (i) => {
2406
2382
  o(i.matches);
2407
2383
  };
2408
- return c(s), s.addEventListener("change", c), () => s.removeEventListener("change", c);
2409
- }, [l]), V(() => {
2384
+ return u(s), s.addEventListener("change", u), () => s.removeEventListener("change", u);
2385
+ }, [l]), K(() => {
2410
2386
  if (l) return;
2411
2387
  const s = document.createElement("div");
2412
2388
  return s.className = "eloquent-ai-chat-portal", s.style.position = "relative", s.style.zIndex = "30", document.body.appendChild(s), n(s), () => {
@@ -2480,7 +2456,7 @@ function $n({
2480
2456
  isEnabled: e,
2481
2457
  isOpen: t
2482
2458
  }) {
2483
- const [o, r] = C(On), n = $(null), a = $(0), l = F(t), s = F(o), c = v(() => {
2459
+ const [o, r] = C(On), n = $(null), a = $(0), l = F(t), s = F(o), u = v(() => {
2484
2460
  if (!e) return;
2485
2461
  const p = Dn();
2486
2462
  if (!p) return;
@@ -2489,29 +2465,29 @@ function $n({
2489
2465
  } catch {
2490
2466
  return;
2491
2467
  }
2492
- const d = n.current.state;
2493
- (d === "suspended" || d === "interrupted") && n.current.resume().catch(() => {
2468
+ const c = n.current.state;
2469
+ (c === "suspended" || c === "interrupted") && n.current.resume().catch(() => {
2494
2470
  });
2495
2471
  }, [e]);
2496
- V(() => {
2472
+ K(() => {
2497
2473
  if (!e) return;
2498
- const p = { capture: !0 }, d = () => c();
2499
- return window.addEventListener("pointerdown", d, p), window.addEventListener("keydown", d, p), () => {
2500
- window.removeEventListener("pointerdown", d, p), window.removeEventListener("keydown", d, p);
2474
+ const p = { capture: !0 }, c = () => u();
2475
+ return window.addEventListener("pointerdown", c, p), window.addEventListener("keydown", c, p), () => {
2476
+ window.removeEventListener("pointerdown", c, p), window.removeEventListener("keydown", c, p);
2501
2477
  };
2502
- }, [e, c]);
2478
+ }, [e, u]);
2503
2479
  const i = v(() => {
2504
2480
  if (!e || s.current || jn(l.current)) return;
2505
2481
  const p = n.current;
2506
2482
  if (!p || p.state !== "running") return;
2507
- const d = Date.now();
2508
- d - a.current < Pn || (a.current = d, An(p));
2509
- }, [e, s, l]), u = v(() => {
2483
+ const c = Date.now();
2484
+ c - a.current < Pn || (a.current = c, An(p));
2485
+ }, [e, s, l]), d = v(() => {
2510
2486
  r((p) => !p);
2511
2487
  }, []);
2512
- return V(() => {
2488
+ return K(() => {
2513
2489
  Un(o);
2514
- }, [o]), { notify: i, unlock: c, isMuted: o, toggleMuted: u };
2490
+ }, [o]), { notify: i, unlock: u, isMuted: o, toggleMuted: d };
2515
2491
  }
2516
2492
  const Bn = 2, Ln = (e) => `eloquent-ai:chat-widget-closed-${e}`;
2517
2493
  function Nn({
@@ -2523,22 +2499,22 @@ function Nn({
2523
2499
  userData: a,
2524
2500
  chatProps: l,
2525
2501
  isMobile: s,
2526
- isInitiallyOpen: c,
2502
+ isInitiallyOpen: u,
2527
2503
  hasCloseButton: i,
2528
- hasCleanChatButton: u,
2504
+ hasCleanChatButton: d,
2529
2505
  // Deprecated aliases, kept until hosts migrate to the is/has names above.
2530
2506
  initialOpen: p,
2531
- closeButton: d,
2507
+ closeButton: c,
2532
2508
  cleanChatButton: h,
2533
2509
  proactiveMessageHideDelay: f = 5e3,
2534
2510
  isAlwaysOpen: g = !1,
2535
2511
  hasCleanChatButtonOverride: R
2536
2512
  }) {
2537
2513
  const { isMobile: q, portalContainer: z } = Rn(s), {
2538
- userId: P,
2514
+ userId: A,
2539
2515
  externalId: E,
2540
- deviceId: j,
2541
- apiClient: O,
2516
+ deviceId: O,
2517
+ apiClient: U,
2542
2518
  chatSettings: m,
2543
2519
  currentChat: y,
2544
2520
  messages: _,
@@ -2551,17 +2527,20 @@ function Nn({
2551
2527
  initialUserId: r,
2552
2528
  userName: n,
2553
2529
  userData: a
2554
- }), ae = uo({ chatProps: l, chatSettings: m }), D = c ?? p ?? !1, J = i ?? d ?? !0, N = u ?? h ?? !0, W = Ln(o), [re, le] = C(() => g ? !0 : ut(W) === "true" || q ? !1 : D ?? q), [G, ie] = C(!1);
2555
- V(() => {
2530
+ });
2531
+ K(() => {
2532
+ }, [E, A, O, e]);
2533
+ const ae = uo({ chatProps: l, chatSettings: m }), D = u ?? p ?? !1, J = i ?? c ?? !0, N = d ?? h ?? !0, H = Ln(o), [re, le] = C(() => g ? !0 : ut(H) === "true" || q ? !1 : D ?? q), [G, ie] = C(!1);
2534
+ K(() => {
2556
2535
  if (!oe || G || (ie(!0), g)) return;
2557
2536
  const L = m?.initial_open;
2558
- L != null && (q || L && ut(W) === "true" || le(L));
2537
+ L != null && (q || L && ut(H) === "true" || le(L));
2559
2538
  }, [
2560
2539
  oe,
2561
2540
  G,
2562
2541
  m?.initial_open,
2563
2542
  q,
2564
- W,
2543
+ H,
2565
2544
  g
2566
2545
  ]);
2567
2546
  const Y = m?.initial_open ?? D, ce = m?.close_button ?? J, ve = R ?? m?.clean_chat_button ?? N, pe = m?.proactive_message_hide_delay ?? f, ne = $n({
@@ -2571,71 +2550,71 @@ function Nn({
2571
2550
  (L) => {
2572
2551
  g || (he(), le((ue) => {
2573
2552
  const lt = typeof L == "function" ? L(ue) : L;
2574
- return lt ? co(W) : lo(W, "true", Bn), lt;
2553
+ return lt ? co(H) : lo(H, "true", Bn), lt;
2575
2554
  }));
2576
2555
  },
2577
- [W, g, he]
2578
- ), x = Vt(re, 400), [U, M] = C(
2556
+ [H, g, he]
2557
+ ), x = Ft(re, 400), [j, M] = C(
2579
2558
  l?.messages ?? []
2580
- ), [k, S] = C(y), [w, Z] = C(!1), [X, K] = C(_);
2581
- X !== _ && (K(_), _.length > 0 && M(_));
2582
- const [H, fe] = C(y);
2583
- H !== y && (fe(y), y && S(y));
2559
+ ), [k, S] = C(y), [w, Z] = C(!1), [X, V] = C(_);
2560
+ X !== _ && (V(_), _.length > 0 && M(_));
2561
+ const [W, fe] = C(y);
2562
+ W !== y && (fe(y), y && S(y));
2584
2563
  const [Re, Ee] = C(ee);
2585
2564
  Re !== ee && (Ee(ee), ee && Z(!0));
2586
2565
  const ze = v(() => {
2587
2566
  Z(!0);
2588
- }, []), [Ve, We] = C(!1), A = oe && m?.auto_display_welcome_message && m?.welcome_message ? m.welcome_message : "", se = {
2589
- text: A,
2590
- isVisible: A !== "" && !Ve,
2567
+ }, []), [We, He] = C(!1), P = oe && m?.auto_display_welcome_message && m?.welcome_message ? m.welcome_message : "", se = {
2568
+ text: P,
2569
+ isVisible: P !== "" && !We,
2591
2570
  autoHideDelay: pe
2592
2571
  }, { onSendMessage: we, onCleanMessages: te, onRateChat: Fe } = fn({
2593
2572
  appId: o,
2594
- userId: P,
2573
+ userId: A,
2595
2574
  userName: n,
2596
2575
  userData: a,
2597
2576
  externalId: E,
2598
- deviceId: j,
2599
- apiClient: O,
2577
+ deviceId: O,
2578
+ apiClient: U,
2600
2579
  chatSettings: m,
2601
2580
  setMessages: M,
2602
- messages: U,
2581
+ messages: j,
2603
2582
  currentChat: k,
2604
2583
  setCurrentChat: S,
2605
2584
  onChatClosed: ze,
2606
2585
  isChatClosed: w,
2607
2586
  onAgentMessage: ne.notify
2608
2587
  });
2609
- V(() => {
2588
+ K(() => {
2610
2589
  _.length > 0 && M(_);
2611
- }, [_]), V(() => {
2590
+ }, [_]), K(() => {
2612
2591
  y && S(y);
2613
2592
  }, [y]);
2614
2593
  const je = $(null);
2615
- V(() => {
2616
- if (!k || !E || !O) return;
2594
+ K(() => {
2595
+ if (!k || !E || !U) return;
2617
2596
  const L = {
2618
- userId: P,
2597
+ userId: A,
2619
2598
  userName: n,
2620
2599
  userData: a,
2621
2600
  externalId: E,
2622
- deviceId: j,
2601
+ deviceId: O,
2623
2602
  conversationId: k.id
2624
2603
  }, ue = JSON.stringify(L);
2625
- je.current !== ue && (je.current = ue, O.identifyUser(L));
2604
+ je.current !== ue && (je.current = ue, U.identifyUser(L));
2626
2605
  }, [
2627
2606
  E,
2628
- P,
2607
+ A,
2629
2608
  n,
2630
2609
  a,
2631
- j,
2610
+ O,
2632
2611
  k,
2633
- O
2612
+ U
2634
2613
  ]);
2635
2614
  const Te = v(() => {
2636
2615
  te(), Z(!1);
2637
2616
  }, [te]), me = v(() => {
2638
- We(!0);
2617
+ He(!0);
2639
2618
  }, []);
2640
2619
  return {
2641
2620
  isReady: oe,
@@ -2648,7 +2627,7 @@ function Nn({
2648
2627
  chatInterfaceProps: ae,
2649
2628
  chatOpen: re,
2650
2629
  chatOpenDebounced: x,
2651
- messages: U,
2630
+ messages: j,
2652
2631
  portalContainer: z,
2653
2632
  onSendMessage: we,
2654
2633
  setChatOpen: b,
@@ -2665,7 +2644,7 @@ function Nn({
2665
2644
  }
2666
2645
  function Zn(e) {
2667
2646
  const [t, o] = C(0);
2668
- return V(() => {
2647
+ return K(() => {
2669
2648
  const r = window.visualViewport;
2670
2649
  if (!e || !r) {
2671
2650
  o(0);
@@ -2681,7 +2660,7 @@ function Zn(e) {
2681
2660
  }, [e]), t;
2682
2661
  }
2683
2662
  function Kn(e) {
2684
- V(() => {
2663
+ K(() => {
2685
2664
  if (!e) return;
2686
2665
  const { body: t } = document, o = window.scrollY, r = {
2687
2666
  position: t.style.position,
@@ -2695,16 +2674,16 @@ function Kn(e) {
2695
2674
  };
2696
2675
  }, [e]);
2697
2676
  }
2698
- function Hn() {
2699
- const [e, t] = C(!1), [o, r] = C(null), n = $(null), a = $(null), l = v((c) => {
2700
- const i = (u) => {
2701
- r(u), t(!0), a.current = null, n.current && clearTimeout(n.current), n.current = setTimeout(() => {
2677
+ function Vn() {
2678
+ const [e, t] = C(!1), [o, r] = C(null), n = $(null), a = $(null), l = v((u) => {
2679
+ const i = (d) => {
2680
+ r(d), t(!0), a.current = null, n.current && clearTimeout(n.current), n.current = setTimeout(() => {
2702
2681
  n.current = null;
2703
2682
  const p = a.current;
2704
2683
  p && i(p);
2705
2684
  }, 1e3);
2706
2685
  };
2707
- n.current ? a.current = c : i(c);
2686
+ n.current ? a.current = u : i(u);
2708
2687
  }, []), s = v(() => {
2709
2688
  n.current && (clearTimeout(n.current), n.current = null), a.current = null, t(!1), r(null);
2710
2689
  }, []);
@@ -2715,22 +2694,27 @@ function Hn() {
2715
2694
  hideCognition: s
2716
2695
  };
2717
2696
  }
2718
- function Vn({
2697
+ function Wn({
2719
2698
  children: e
2720
2699
  }) {
2721
- const t = Hn();
2722
- return /* @__PURE__ */ I(Wt.Provider, { value: t, children: e });
2723
- }
2724
- const Wn = ({ children: e }) => {
2725
- const [t, o] = C(null), [r, n] = C(!1), a = Jt(o), i = {
2726
- error: t,
2727
- hideSdk: r,
2728
- publishApiError: a,
2729
- publishError: (u) => o(u),
2730
- publishNetworkError: () => n(!0),
2731
- clearError: () => o(null)
2700
+ const t = Vn();
2701
+ return /* @__PURE__ */ I(Jt.Provider, { value: t, children: e });
2702
+ }
2703
+ const Hn = ({
2704
+ appId: e,
2705
+ children: t
2706
+ }) => {
2707
+ const [o, r] = C(null), [n, a] = C(!1), l = (c, h) => {
2708
+ r(c);
2709
+ }, p = {
2710
+ error: o,
2711
+ hideSdk: n,
2712
+ publishApiError: (c) => l(Yt(c)),
2713
+ publishError: (c) => l(c),
2714
+ publishNetworkError: () => a(!0),
2715
+ clearError: () => r(null)
2732
2716
  };
2733
- return /* @__PURE__ */ I(Ft.Provider, { value: i, children: e });
2717
+ return /* @__PURE__ */ I(Gt.Provider, { value: p, children: t });
2734
2718
  }, Fn = 100;
2735
2719
  function Jn({
2736
2720
  appId: e,
@@ -2741,22 +2725,22 @@ function Jn({
2741
2725
  proactiveMessageHideDelay: a = 5e3,
2742
2726
  isMobile: l,
2743
2727
  hasCloseButton: s,
2744
- hasCleanChatButton: c,
2728
+ hasCleanChatButton: u,
2745
2729
  isInitiallyOpen: i,
2746
2730
  // Deprecated aliases, resolved in useChat (new name wins).
2747
- closeButton: u,
2731
+ closeButton: d,
2748
2732
  cleanChatButton: p,
2749
- initialOpen: d,
2733
+ initialOpen: c,
2750
2734
  INTERNAL_ONLY_CHAT_INTERFACE_ONLY: h = !1,
2751
2735
  INTERNAL_ONLY_SHOW_CLEAN_CHAT_BUTTON: f = void 0,
2752
2736
  INTERNAL_ONLY_BLOCK_STYLE: g = !1,
2753
2737
  INTERNAL_ONLY_FEATURE_MESSAGE_CLICK: R = void 0,
2754
2738
  INTERNAL_ONLY_FEATURE_CLEAR_CHAT_CLICK: q = void 0,
2755
2739
  INTERNAL_ONLY_ON_CHAT_ID: z = void 0,
2756
- INTERNAL_ONLY_HIGHLIGHTED_MESSAGE_ID: P = null,
2740
+ INTERNAL_ONLY_HIGHLIGHTED_MESSAGE_ID: A = null,
2757
2741
  INTERNAL_ONLY_ON_MESSAGE_SENT: E = void 0,
2758
- INTERNAL_ONLY_SHOW_COPY_BUTTON: j = !1,
2759
- INTERNAL_ONLY_ENVIRONMENT: O = "live",
2742
+ INTERNAL_ONLY_SHOW_COPY_BUTTON: O = !1,
2743
+ INTERNAL_ONLY_ENVIRONMENT: U = "live",
2760
2744
  INTERNAL_ONLY_API_URL: m
2761
2745
  }) {
2762
2746
  const { hideSdk: y } = Ke(), {
@@ -2768,7 +2752,7 @@ function Jn({
2768
2752
  isMobile: D,
2769
2753
  chatId: J,
2770
2754
  chatOpen: N,
2771
- unlockSound: W,
2755
+ unlockSound: H,
2772
2756
  isSoundMuted: re,
2773
2757
  toggleSound: le,
2774
2758
  chatInterfaceProps: G,
@@ -2781,9 +2765,9 @@ function Jn({
2781
2765
  hideProactiveMessage: he,
2782
2766
  isChatClosed: b,
2783
2767
  onStartNewChat: x,
2784
- onRateChat: U
2768
+ onRateChat: j
2785
2769
  } = Nn({
2786
- environment: O,
2770
+ environment: U,
2787
2771
  apiUrl: m,
2788
2772
  appId: e,
2789
2773
  userId: t,
@@ -2793,9 +2777,9 @@ function Jn({
2793
2777
  isMobile: l,
2794
2778
  isInitiallyOpen: i,
2795
2779
  hasCloseButton: s,
2796
- hasCleanChatButton: c,
2797
- initialOpen: d,
2798
- closeButton: u,
2780
+ hasCleanChatButton: u,
2781
+ initialOpen: c,
2782
+ closeButton: d,
2799
2783
  cleanChatButton: p,
2800
2784
  proactiveMessageHideDelay: a,
2801
2785
  // Embedded: the interface is the page content with no launcher to reopen
@@ -2803,14 +2787,14 @@ function Jn({
2803
2787
  isAlwaysOpen: h,
2804
2788
  hasCleanChatButtonOverride: f
2805
2789
  }), M = $(void 0);
2806
- V(() => {
2790
+ K(() => {
2807
2791
  !z || M.current === J || (M.current = J, z(J));
2808
2792
  }, [J, z]);
2809
2793
  const k = $(null), [S, w] = C(!1), Z = Zn(D && N);
2810
2794
  Kn(D && N);
2811
2795
  const X = !_;
2812
2796
  if (y || X && !h || !X && !oe) return null;
2813
- const K = () => /* @__PURE__ */ ke(
2797
+ const V = () => /* @__PURE__ */ ke(
2814
2798
  "div",
2815
2799
  {
2816
2800
  style: {
@@ -2864,32 +2848,32 @@ function Jn({
2864
2848
  // booting): hold the widget's frame with a skeleton so a remount —
2865
2849
  // project/environment switch in the host app — doesn't flash an
2866
2850
  // empty hole where the chat was.
2867
- /* @__PURE__ */ I(Gt, { isOpen: !0, isMobile: D, skipAnimation: !0 })
2851
+ /* @__PURE__ */ I(Xt, { isOpen: !0, isMobile: D, skipAnimation: !0 })
2868
2852
  ) : /* @__PURE__ */ I(
2869
- Yt,
2853
+ Qt,
2870
2854
  {
2871
2855
  ...G,
2872
2856
  hasIntroAnimation: !h,
2873
2857
  isDialog: !h,
2874
2858
  shouldFocusOnOpen: S,
2875
- isTestMode: O === "test",
2859
+ isTestMode: U === "test",
2876
2860
  isOpen: N,
2877
2861
  keyboardInset: Z,
2878
2862
  messages: Y,
2879
- onSendMessage: (fe, Re) => (W(), E?.(fe), ve(fe, Re)),
2863
+ onSendMessage: (fe, Re) => (H(), E?.(fe), ve(fe, Re)),
2880
2864
  onMessageClick: R,
2881
- highlightedMessageId: P,
2865
+ highlightedMessageId: A,
2882
2866
  isMobile: D,
2883
2867
  hasCloseButton: de,
2884
2868
  hasCleanChatButton: ae,
2885
- hasCopyButton: j,
2869
+ hasCopyButton: O,
2886
2870
  isChatClosed: b,
2887
2871
  onStartNewChat: x,
2888
- onRateChat: U,
2872
+ onRateChat: j,
2889
2873
  isSoundMuted: re,
2890
2874
  onToggleSound: le,
2891
2875
  onClose: () => {
2892
- eo(() => pe(!1)), no(k.current);
2876
+ Mt(() => pe(!1)), no(k.current);
2893
2877
  },
2894
2878
  onCleanChat: () => {
2895
2879
  x(), q?.();
@@ -2944,7 +2928,7 @@ function Jn({
2944
2928
  bottom: 24,
2945
2929
  right: 17
2946
2930
  },
2947
- children: /* @__PURE__ */ I(Xt, { ...G?.theme ?? {}, children: /* @__PURE__ */ I(
2931
+ children: /* @__PURE__ */ I(eo, { ...G?.theme ?? {}, children: /* @__PURE__ */ I(
2948
2932
  "div",
2949
2933
  {
2950
2934
  className: Be("eloq:w-full eloq:h-full", {
@@ -2969,10 +2953,10 @@ function Jn({
2969
2953
  ]
2970
2954
  }
2971
2955
  );
2972
- return /* @__PURE__ */ I(Qt, { children: g ? K() : ce ? /* @__PURE__ */ I(io, { container: ce, children: K() }) : null });
2956
+ return /* @__PURE__ */ I(Tt, { children: g ? V() : ce ? /* @__PURE__ */ I(io, { container: ce, children: V() }) : null });
2973
2957
  }
2974
2958
  function Gn(e) {
2975
- return /* @__PURE__ */ I(Wn, { children: /* @__PURE__ */ I(Vn, { children: /* @__PURE__ */ I(Jn, { ...e }) }) });
2959
+ return /* @__PURE__ */ I(Hn, { appId: e.appId, children: /* @__PURE__ */ I(Wn, { children: /* @__PURE__ */ I(Jn, { ...e }) }) });
2976
2960
  }
2977
2961
  function oa(e, t) {
2978
2962
  return ((r, n, a) => {
@@ -2982,7 +2966,7 @@ function oa(e, t) {
2982
2966
  }
2983
2967
  export {
2984
2968
  Gn as Chat,
2985
- Yt as ChatInterface,
2969
+ Qt as ChatInterface,
2986
2970
  oa as renderChat,
2987
2971
  tn as useRealtimeSocket
2988
2972
  };