@eloquentai/chat-sdk 0.34.4-dev.3 → 0.35.0-dev.1

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,20 +1,20 @@
1
1
  "use client";
2
- import { L as xt, c as Ge, u as kt, g as tt, X as _t, d as Ae, e as Ct, f as St, h as It, A as Et, E as zt, i as Tt, S as Rt, C as Ot, T as Pt } from "./skeleton-Dn06SgHU.js";
3
- import { jsx as b, jsxs as Se, Fragment as ot } from "react/jsx-runtime";
4
- import { useState as _, useEffect as Z, useMemo as We, useRef as L, useCallback as y } from "react";
2
+ import { L as Ct, c as Ge, u as St, g as rt, X as It, i as zt, A as Et, d as Y, e as je, f as Rt, h as Tt, r as Pt, t as Mt, j as Ot, N as Xe, k as Oe, l as At, H as Ut, w as nt, m as jt, s as Dt, n as $t, o as Bt, E as Nt, p as Lt, S as Zt, C as Kt, T as Ht } from "./skeleton-BciF90eZ.js";
3
+ import { jsx as q, jsxs as ze, Fragment as at } from "react/jsx-runtime";
4
+ import { useState as S, useEffect as W, useMemo as Fe, useCallback as v, useRef as V } from "react";
5
5
  import { createPortal as Je } from "react-dom";
6
- import Mt from "react-dom/client";
6
+ import Vt from "react-dom/client";
7
7
  try {
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] = "6eeead66-4463-420e-a2e3-3ce974332981", e._sentryDebugIdIdentifier = "sentry-dbid-6eeead66-4463-420e-a2e3-3ce974332981");
8
+ let t = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, e = new t.Error().stack;
9
+ e && (t._sentryDebugIds = t._sentryDebugIds || {}, t._sentryDebugIds[e] = "48bee203-c453-4379-a55a-1df1b9f85bd6", t._sentryDebugIdIdentifier = "sentry-dbid-48bee203-c453-4379-a55a-1df1b9f85bd6");
10
10
  } catch {
11
11
  }
12
12
  if (typeof window < "u") {
13
- const e = "development";
14
- import("./index-hFbiYJI3.js").then(({ init: t }) => {
15
- t({
13
+ const t = "development";
14
+ import("./index-hFbiYJI3.js").then(({ init: e }) => {
15
+ e({
16
16
  dsn: void 0,
17
- environment: e,
17
+ environment: t,
18
18
  sendDefaultPii: !1,
19
19
  debug: !1,
20
20
  enabled: !0,
@@ -26,73 +26,73 @@ if (typeof window < "u") {
26
26
  "x-auth-token"
27
27
  ]), n = o.request?.headers;
28
28
  if (n)
29
- for (const a of Object.keys(n))
30
- r.has(a.toLowerCase()) && (n[a] = "[Filtered]");
29
+ for (const i of Object.keys(n))
30
+ r.has(i.toLowerCase()) && (n[i] = "[Filtered]");
31
31
  return o.request && (o.request.data = "[Filtered]"), o;
32
32
  }
33
33
  });
34
34
  });
35
35
  }
36
- const Ne = '/*! 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-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-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-black:#000;--eloq-color-white:#fff;--eloq-spacing:.25rem;--eloq-container-xs:20rem;--eloq-container-lg:32rem;--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-lg:1.125rem;--eloq-text-lg--line-height:calc(1.75 / 1.125);--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-thinking-dot:thinking-dot 1.2s ease-in-out infinite;--eloq-animate-thinking-shimmer:thinking-shimmer 1.8s linear infinite;--eloq-animate-message-in:message-in .3s ease-out both;--eloq-animate-slide-up-in:slide-up-in .3s ease-out both;--eloq-animate-dialog-overlay-in:dialog-overlay-in .2s ease-out both;--eloq-animate-dialog-overlay-out:dialog-overlay-out .2s ease-in both;--eloq-animate-dialog-content-in:dialog-content-in .2s ease-out both;--eloq-animate-dialog-content-out:dialog-content-out .2s ease-in 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\\: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\\:fixed{position:fixed}.eloq\\:relative{position:relative}.eloq\\:inset-0{inset:0}.eloq\\:top-0{top:0}.eloq\\:top-0\\.5{top:calc(var(--eloq-spacing) * .5)}.eloq\\:top-4{top:calc(var(--eloq-spacing) * 4)}.eloq\\:top-\\[50\\%\\]{top:50%}.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-4{right:calc(var(--eloq-spacing) * 4)}.eloq\\:right-16{right:calc(var(--eloq-spacing) * 16)}.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-\\[50\\%\\]{left:50%}.eloq\\:left-\\[calc\\(50\\%-0\\.75rem\\)\\]{left:calc(50% - .75rem)}.eloq\\:z-10{z-index:10}.eloq\\:z-20{z-index:20}.eloq\\:z-50{z-index:50}.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\\:-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\\:grid{display:grid}.eloq\\:hidden{display:none}.eloq\\:inline-flex{display:inline-flex}.eloq\\:aspect-square{aspect-ratio:1}.eloq\\:h-2\\.5{height:calc(var(--eloq-spacing) * 2.5)}.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-\\[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-\\[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-\\[90vw\\]{max-width:90vw}.eloq\\:max-w-full{max-width:100%}.eloq\\:max-w-lg{max-width:var(--eloq-container-lg)}.eloq\\:max-w-xs{max-width:var(--eloq-container-xs)}.eloq\\:min-w-0{min-width:0}.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-x-\\[-50\\%\\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.eloq\\:translate-y-\\[-50\\%\\]{--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-slide-up-in{animation:var(--eloq-animate-slide-up-in)}.eloq\\:animate-thinking-dot{animation:var(--eloq-animate-thinking-dot)}.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-col-reverse{flex-direction:column-reverse}.eloq\\:flex-row{flex-direction:row}.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-4{gap:calc(var(--eloq-spacing) * 4)}.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\\: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-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-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-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\\/80{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:bg-black\\/80{background-color:color-mix(in oklab,var(--eloq-color-black) 80%,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-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-red-50{background-color:var(--eloq-color-red-50)}.eloq\\:bg-transparent{background-color:#0000}.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\\:bg-white\\/90{background-color:var(--eloq-color-white)}@supports (color:color-mix(in lab,red,red)){.eloq\\:bg-white\\/90{background-color:color-mix(in oklab,var(--eloq-color-white) 90%,transparent)}}.eloq\\:fill-none{fill:none}.eloq\\:fill-yellow-400{fill:var(--eloq-color-yellow-400)}.eloq\\:object-contain{object-fit:contain}.eloq\\:p-0{padding:0}.eloq\\:p-0\\.5{padding:calc(var(--eloq-spacing) * .5)}.eloq\\:p-1{padding:var(--eloq-spacing)}.eloq\\:p-1\\.5{padding:calc(var(--eloq-spacing) * 1.5)}.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\\:px-0{padding-inline:0}.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-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\\: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-lg{font-size:var(--eloq-text-lg);line-height:var(--tw-leading,var(--eloq-text-lg--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-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-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px 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\\: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\\: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-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\\: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\\:select-none{-webkit-user-select:none;user-select:none}.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-muted:hover{background-color:hsl(var(--muted))}.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\\:ring-2:focus{--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\\:ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.eloq\\:focus\\:ring-offset-2:focus{--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\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.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-none:focus-visible{--tw-outline-style:none;outline-style:none}.eloq\\:active\\:cursor-grabbing:active{cursor:grabbing}.eloq\\:disabled\\:pointer-events-none:disabled{pointer-events:none}.eloq\\:disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.eloq\\:disabled\\:opacity-50:disabled{opacity:.5}.eloq\\:data-\\[state\\=closed\\]\\:animate-dialog-content-out[data-state=closed]{animation:var(--eloq-animate-dialog-content-out)}.eloq\\:data-\\[state\\=closed\\]\\:animate-dialog-overlay-out[data-state=closed]{animation:var(--eloq-animate-dialog-overlay-out)}.eloq\\:data-\\[state\\=open\\]\\:animate-dialog-content-in[data-state=open]{animation:var(--eloq-animate-dialog-content-in)}.eloq\\:data-\\[state\\=open\\]\\:animate-dialog-overlay-in[data-state=open]{animation:var(--eloq-animate-dialog-overlay-in)}.eloq\\:data-\\[state\\=open\\]\\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.eloq\\:data-\\[state\\=open\\]\\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}@media(prefers-reduced-motion:reduce){.eloq\\:motion-reduce\\:animate-none{animation:none}.eloq\\:motion-reduce\\:opacity-70{opacity:.7}}@media(min-width:40rem){.eloq\\:sm\\:flex-row{flex-direction:row}.eloq\\:sm\\:justify-end{justify-content:flex-end}:where(.eloq\\:sm\\: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)))}.eloq\\:sm\\:rounded-lg{border-radius:var(--eloq-radius-lg)}.eloq\\:sm\\:text-left{text-align:left}.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 *),.eloq\\:dark\\:bg-card\\/90:is(.dark *){background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-card\\/90:is(.dark *){background-color:color-mix(in oklab,hsl(var(--card)) 90%,transparent)}}.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-foreground:is(.dark *){color:hsl(var(--foreground))}.eloq\\:dark\\:text-gray-500:is(.dark *){color:var(--eloq-color-gray-500)}.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}}@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 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 slide-up-in{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes dialog-overlay-in{0%{opacity:0}to{opacity:1}}@keyframes dialog-overlay-out{0%{opacity:1}to{opacity:0}}@keyframes dialog-content-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes dialog-content-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}@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-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}}', At = ".eloquentai-chat-launcher{transition:transform .2s ease-in-out}.eloquentai-chat-launcher:hover{transform:scale(1.1)}";
37
- function Ut({
38
- toggleBubble: e,
39
- isDarkMode: t = !1
36
+ const Le = '/*! 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-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-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-black:#000;--eloq-color-white:#fff;--eloq-spacing:.25rem;--eloq-container-xs:20rem;--eloq-container-lg:32rem;--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-lg:1.125rem;--eloq-text-lg--line-height:calc(1.75 / 1.125);--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-thinking-dot:thinking-dot 1.2s ease-in-out infinite;--eloq-animate-thinking-shimmer:thinking-shimmer 1.8s linear infinite;--eloq-animate-message-in:message-in .3s ease-out both;--eloq-animate-slide-up-in:slide-up-in .3s ease-out both;--eloq-animate-dialog-overlay-in:dialog-overlay-in .2s ease-out both;--eloq-animate-dialog-overlay-out:dialog-overlay-out .2s ease-in both;--eloq-animate-dialog-content-in:dialog-content-in .2s ease-out both;--eloq-animate-dialog-content-out:dialog-content-out .2s ease-in 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\\: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\\:fixed{position:fixed}.eloq\\:relative{position:relative}.eloq\\:inset-0{inset:0}.eloq\\:inset-x-0{inset-inline:0}.eloq\\:top-0{top:0}.eloq\\:top-0\\.5{top:calc(var(--eloq-spacing) * .5)}.eloq\\:top-4{top:calc(var(--eloq-spacing) * 4)}.eloq\\:top-\\[50\\%\\]{top:50%}.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-4{right:calc(var(--eloq-spacing) * 4)}.eloq\\:right-16{right:calc(var(--eloq-spacing) * 16)}.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-\\[50\\%\\]{left:50%}.eloq\\:left-\\[calc\\(50\\%-0\\.75rem\\)\\]{left:calc(50% - .75rem)}.eloq\\:z-10{z-index:10}.eloq\\:z-20{z-index:20}.eloq\\:z-50{z-index:50}.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\\:-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\\:grid{display:grid}.eloq\\:hidden{display:none}.eloq\\:inline-flex{display:inline-flex}.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-\\[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-\\[90vw\\]{max-width:90vw}.eloq\\:max-w-full{max-width:100%}.eloq\\:max-w-lg{max-width:var(--eloq-container-lg)}.eloq\\:max-w-xs{max-width:var(--eloq-container-xs)}.eloq\\:min-w-0{min-width:0}.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-x-\\[-50\\%\\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.eloq\\:translate-y-\\[-50\\%\\]{--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-slide-up-in{animation:var(--eloq-animate-slide-up-in)}.eloq\\:animate-thinking-dot{animation:var(--eloq-animate-thinking-dot)}.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-col-reverse{flex-direction:column-reverse}.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-4{gap:calc(var(--eloq-spacing) * 4)}.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\\: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-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-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-black\\/80{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:bg-black\\/80{background-color:color-mix(in oklab,var(--eloq-color-black) 80%,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-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-transparent{background-color:#0000}.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\\:bg-white\\/90{background-color:var(--eloq-color-white)}@supports (color:color-mix(in lab,red,red)){.eloq\\:bg-white\\/90{background-color:color-mix(in oklab,var(--eloq-color-white) 90%,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-1\\.5{padding:calc(var(--eloq-spacing) * 1.5)}.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\\:px-0{padding-inline:0}.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-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-lg{font-size:var(--eloq-text-lg);line-height:var(--tw-leading,var(--eloq-text-lg--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-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px 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\\: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\\: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-\\[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\\: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\\:select-none{-webkit-user-select:none;user-select:none}.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\\: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\\:ring-2:focus{--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\\:ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.eloq\\:focus\\:ring-offset-2:focus{--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\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.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-none:focus-visible{--tw-outline-style:none;outline-style:none}.eloq\\:active\\:cursor-grabbing:active{cursor:grabbing}.eloq\\:disabled\\:pointer-events-none:disabled{pointer-events:none}.eloq\\:disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.eloq\\:disabled\\:opacity-50:disabled{opacity:.5}.eloq\\:data-\\[state\\=closed\\]\\:animate-dialog-content-out[data-state=closed]{animation:var(--eloq-animate-dialog-content-out)}.eloq\\:data-\\[state\\=closed\\]\\:animate-dialog-overlay-out[data-state=closed]{animation:var(--eloq-animate-dialog-overlay-out)}.eloq\\:data-\\[state\\=open\\]\\:animate-dialog-content-in[data-state=open]{animation:var(--eloq-animate-dialog-content-in)}.eloq\\:data-\\[state\\=open\\]\\:animate-dialog-overlay-in[data-state=open]{animation:var(--eloq-animate-dialog-overlay-in)}.eloq\\:data-\\[state\\=open\\]\\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.eloq\\:data-\\[state\\=open\\]\\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}@media(prefers-reduced-motion:reduce){.eloq\\:motion-reduce\\:animate-none{animation:none}.eloq\\:motion-reduce\\:opacity-70{opacity:.7}}@media(min-width:40rem){.eloq\\:sm\\:flex-row{flex-direction:row}.eloq\\:sm\\:justify-end{justify-content:flex-end}:where(.eloq\\:sm\\: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)))}.eloq\\:sm\\:rounded-lg{border-radius:var(--eloq-radius-lg)}.eloq\\:sm\\:text-left{text-align:left}.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 *),.eloq\\:dark\\:bg-card\\/90:is(.dark *){background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-card\\/90:is(.dark *){background-color:color-mix(in oklab,hsl(var(--card)) 90%,transparent)}}.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-foreground:is(.dark *){color:hsl(var(--foreground))}.eloq\\:dark\\:text-gray-500:is(.dark *){color:var(--eloq-color-gray-500)}.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}}@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 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 slide-up-in{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes dialog-overlay-in{0%{opacity:0}to{opacity:1}}@keyframes dialog-overlay-out{0%{opacity:1}to{opacity:0}}@keyframes dialog-content-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes dialog-content-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}@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-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}}', Wt = ".eloquentai-chat-launcher{transition:transform .2s ease-in-out}.eloquentai-chat-launcher:hover{transform:scale(1.1)}";
37
+ function Ft({
38
+ toggleBubble: t,
39
+ isDarkMode: e = !1
40
40
  }) {
41
- const o = t ? "#fff" : "#000", r = t ? "#000000" : "#ffffff";
42
- return /* @__PURE__ */ b("div", { className: "eloq:absolute eloq:inset-0 eloq:m-auto eloq:flex eloq:items-center eloq:justify-center eloq:overflow-hidden", children: /* @__PURE__ */ b(
41
+ const o = e ? "#fff" : "#000", r = e ? "#000000" : "#ffffff";
42
+ return /* @__PURE__ */ q("div", { className: "eloq:absolute eloq:inset-0 eloq:m-auto eloq:flex eloq:items-center eloq:justify-center eloq:overflow-hidden", children: /* @__PURE__ */ q(
43
43
  "div",
44
44
  {
45
45
  className: Ge(
46
46
  "eloq:chat-bubble eloq:relative eloq:flex eloq:items-center eloq:justify-center eloq:w-12 eloq:h-12 eloq:rounded-full eloq:cursor-pointer",
47
47
  // Inverted in dark mode: a black launcher disappears on dark pages.
48
- t ? "eloq:bg-[#fff] eloq:text-[#000]" : "eloq:bg-[#000] eloq:text-[#fff]"
48
+ e ? "eloq:bg-[#fff] eloq:text-[#000]" : "eloq:bg-[#000] eloq:text-[#fff]"
49
49
  ),
50
- onClick: e,
51
- children: /* @__PURE__ */ b("div", { className: "eloq:absolute eloq:inset-0 eloq:flex eloq:justify-center eloq:items-center eloq:m-auto", children: /* @__PURE__ */ b(xt, { bgColor: o, fgColor: r }) })
50
+ onClick: t,
51
+ children: /* @__PURE__ */ q("div", { className: "eloq:absolute eloq:inset-0 eloq:flex eloq:justify-center eloq:items-center eloq:m-auto", children: /* @__PURE__ */ q(Ct, { bgColor: o, fgColor: r }) })
52
52
  }
53
53
  ) });
54
54
  }
55
- function Le({ children: e, head: t, ...o }) {
56
- const [r, n] = _(null), a = r?.contentWindow?.document?.head, c = r?.contentWindow?.document?.body;
57
- return /* @__PURE__ */ Se("iframe", { ...o, ref: n, children: [
58
- a && Je(t, a),
59
- c && Je(e, c)
55
+ function Ze({ children: t, head: e, ...o }) {
56
+ const [r, n] = S(null), i = r?.contentWindow?.document?.head, d = r?.contentWindow?.document?.body;
57
+ return /* @__PURE__ */ ze("iframe", { ...o, ref: n, children: [
58
+ i && Je(e, i),
59
+ d && Je(t, d)
60
60
  ] });
61
61
  }
62
- function jt({ children: e, container: t }) {
63
- return Je(e, t);
62
+ function Jt({ children: t, container: e }) {
63
+ return Je(t, e);
64
64
  }
65
- function Dt({
66
- message: e,
67
- isVisible: t,
65
+ function Yt({
66
+ message: t,
67
+ isVisible: e,
68
68
  onDismiss: o,
69
69
  onMessageClick: r,
70
70
  autoHideDelay: n
71
71
  }) {
72
- const [a, c] = _(!1), [s, l] = _("entering"), i = kt();
73
- return Z(() => {
74
- if (t) {
75
- c(!0), l("entering");
76
- const d = setTimeout(() => {
77
- l("visible");
72
+ const [i, d] = S(!1), [s, c] = S("entering"), a = St();
73
+ return W(() => {
74
+ if (e) {
75
+ d(!0), c("entering");
76
+ const l = setTimeout(() => {
77
+ c("visible");
78
78
  }, 50);
79
- let h;
79
+ let g;
80
80
  const u = setTimeout(() => {
81
- l("exiting"), h = setTimeout(() => {
81
+ c("exiting"), g = setTimeout(() => {
82
82
  o();
83
83
  }, 300);
84
84
  }, n);
85
85
  return () => {
86
- clearTimeout(d), clearTimeout(u), clearTimeout(h);
86
+ clearTimeout(l), clearTimeout(u), clearTimeout(g);
87
87
  };
88
88
  } else {
89
- l("exiting");
90
- const d = setTimeout(() => {
91
- c(!1), l("entering");
89
+ c("exiting");
90
+ const l = setTimeout(() => {
91
+ d(!1), c("entering");
92
92
  }, 300);
93
- return () => clearTimeout(d);
93
+ return () => clearTimeout(l);
94
94
  }
95
- }, [t, o, n]), a ? /* @__PURE__ */ b(
95
+ }, [e, o, n]), i ? /* @__PURE__ */ q(
96
96
  "div",
97
97
  {
98
98
  className: Ge(
@@ -103,69 +103,69 @@ function Dt({
103
103
  s === "visible" && "eloq:translate-x-0 eloq:opacity-100 eloq:scale-100",
104
104
  s === "exiting" && "eloq:translate-x-8 eloq:opacity-0 eloq:scale-95"
105
105
  ),
106
- children: /* @__PURE__ */ b("div", { className: "eloq:relative eloq:drop-shadow-lg eloq:hover:drop-shadow-xl eloq:transition-all eloq:duration-300", children: /* @__PURE__ */ Se(
106
+ children: /* @__PURE__ */ q("div", { className: "eloq:relative eloq:drop-shadow-lg eloq:hover:drop-shadow-xl eloq:transition-all eloq:duration-300", children: /* @__PURE__ */ ze(
107
107
  "div",
108
108
  {
109
109
  className: "eloq:relative eloq:rounded-lg eloq:border eloq:p-3 eloq:cursor-pointer",
110
110
  style: {
111
- backgroundColor: i.botBubbleColor
111
+ backgroundColor: a.botBubbleColor
112
112
  },
113
113
  onClick: r,
114
114
  children: [
115
- /* @__PURE__ */ Se(
115
+ /* @__PURE__ */ ze(
116
116
  "svg",
117
117
  {
118
118
  "aria-hidden": !0,
119
119
  className: "eloq:absolute eloq:bottom-1 eloq:-right-[9px] eloq:h-4 eloq:w-4 eloq:-scale-x-100",
120
120
  viewBox: "0 0 10.54 11.14",
121
121
  children: [
122
- /* @__PURE__ */ b(
122
+ /* @__PURE__ */ q(
123
123
  "path",
124
124
  {
125
125
  d: "M5.75,0s0,.36,0,.51c-.09,4.52-5.74,10.64-5.74,10.64,8.19.02,10.54-2.26,10.54-2.26h0c-1.6-2.96-3.19-5.92-4.79-8.88Z",
126
- fill: i.botBubbleColor,
126
+ fill: a.botBubbleColor,
127
127
  strokeWidth: 2,
128
128
  vectorEffect: "non-scaling-stroke",
129
129
  style: { stroke: "hsl(var(--border))" }
130
130
  }
131
131
  ),
132
- /* @__PURE__ */ b(
132
+ /* @__PURE__ */ q(
133
133
  "rect",
134
134
  {
135
135
  x: "6.2",
136
136
  y: "-1",
137
137
  width: "6",
138
138
  height: "14",
139
- fill: i.botBubbleColor
139
+ fill: a.botBubbleColor
140
140
  }
141
141
  )
142
142
  ]
143
143
  }
144
144
  ),
145
- /* @__PURE__ */ b(
145
+ /* @__PURE__ */ q(
146
146
  "p",
147
147
  {
148
148
  className: "eloq:text-sm eloq:leading-relaxed eloq:pr-4",
149
149
  style: {
150
- color: i.botBubbleTextColor || tt(i.botBubbleColor)
150
+ color: a.botBubbleTextColor || rt(a.botBubbleColor)
151
151
  },
152
- children: e
152
+ children: t
153
153
  }
154
154
  ),
155
- /* @__PURE__ */ b(
155
+ /* @__PURE__ */ q(
156
156
  "button",
157
157
  {
158
158
  "aria-label": "Dismiss message",
159
- onClick: (d) => {
160
- d.stopPropagation(), o();
159
+ onClick: (l) => {
160
+ l.stopPropagation(), o();
161
161
  },
162
162
  className: "eloq:absolute eloq:top-0.5 eloq:right-0.5 eloq:p-1.5 eloq:opacity-50 eloq:hover:opacity-100 eloq:hover:bg-black/5 eloq:dark:hover:bg-white/10 eloq:rounded-full eloq:transition-all eloq:duration-200",
163
163
  style: {
164
164
  // Follows the bubble's computed text colour, so the X blends
165
165
  // with the message on any bubble background (and dark mode).
166
- color: i.botBubbleTextColor || tt(i.botBubbleColor)
166
+ color: a.botBubbleTextColor || rt(a.botBubbleColor)
167
167
  },
168
- children: /* @__PURE__ */ b(_t, { className: "eloq:w-2.5 eloq:h-2.5", strokeWidth: 1.75 })
168
+ children: /* @__PURE__ */ q(It, { className: "eloq:w-2.5 eloq:h-2.5", strokeWidth: 1.75 })
169
169
  }
170
170
  )
171
171
  ]
@@ -174,164 +174,62 @@ function Dt({
174
174
  }
175
175
  ) : null;
176
176
  }
177
- function rt(e) {
177
+ function it(t) {
178
178
  if (typeof document > "u") return null;
179
- const t = document.cookie.match(new RegExp(`(?:^|; )${e}=([^;]*)`));
180
- return t ? decodeURIComponent(t[1]) : null;
179
+ const e = document.cookie.match(new RegExp(`(?:^|; )${t}=([^;]*)`));
180
+ return e ? decodeURIComponent(e[1]) : null;
181
181
  }
182
- function $t(e, t, o) {
182
+ function Gt(t, e, o) {
183
183
  if (typeof document > "u") return;
184
184
  const r = new Date(Date.now() + o * 60 * 60 * 1e3).toUTCString();
185
- document.cookie = `${e}=${encodeURIComponent(t)}; expires=${r}; path=/; SameSite=Lax`;
185
+ document.cookie = `${t}=${encodeURIComponent(e)}; expires=${r}; path=/; SameSite=Lax`;
186
186
  }
187
- function Bt(e) {
188
- typeof document > "u" || (document.cookie = `${e}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/`);
187
+ function Xt(t) {
188
+ typeof document > "u" || (document.cookie = `${t}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/`);
189
189
  }
190
- function Nt({
191
- chatProps: e,
192
- chatSettings: t
190
+ function Qt({
191
+ chatProps: t,
192
+ chatSettings: e
193
193
  }) {
194
- return We(() => t ? {
195
- assistantName: t.agent_name,
196
- assistantLogo: t.avatar_url || void 0,
194
+ return Fe(() => e ? {
195
+ assistantName: e.agent_name,
196
+ assistantLogo: e.avatar_url || void 0,
197
197
  theme: {
198
- ...e?.theme,
199
- mode: t.theme ?? "light",
200
- userBubbleColor: t.user_bubble_color || e?.theme?.userBubbleColor,
201
- botBubbleColor: t.bot_bubble_color || e?.theme?.botBubbleColor,
202
- suggestedMessageBubbleColor: t.suggested_message_bubble_color || e?.theme?.suggestedMessageBubbleColor,
203
- userBubbleTextColor: t.user_bubble_text_color || e?.theme?.userBubbleTextColor,
204
- botBubbleTextColor: t.bot_bubble_text_color || e?.theme?.botBubbleTextColor,
205
- suggestedMessageBubbleTextColor: t.suggested_message_bubble_text_color || e?.theme?.suggestedMessageBubbleTextColor
198
+ ...t?.theme,
199
+ mode: e.theme ?? "light",
200
+ userBubbleColor: e.user_bubble_color || t?.theme?.userBubbleColor,
201
+ botBubbleColor: e.bot_bubble_color || t?.theme?.botBubbleColor,
202
+ suggestedMessageBubbleColor: e.suggested_message_bubble_color || t?.theme?.suggestedMessageBubbleColor,
203
+ userBubbleTextColor: e.user_bubble_text_color || t?.theme?.userBubbleTextColor,
204
+ botBubbleTextColor: e.bot_bubble_text_color || t?.theme?.botBubbleTextColor,
205
+ suggestedMessageBubbleTextColor: e.suggested_message_bubble_text_color || t?.theme?.suggestedMessageBubbleTextColor
206
206
  },
207
- welcomeMessage: t.welcome_message || void 0,
208
- legalText: t.footer_html || void 0,
209
- suggestedMessages: t.suggested_messages,
210
- suggestedMessageTexts: t.suggested_message_texts ?? void 0,
207
+ welcomeMessage: e.welcome_message || void 0,
208
+ legalText: e.footer_html || void 0,
209
+ suggestedMessages: e.suggested_messages,
210
+ suggestedMessageTexts: e.suggested_message_texts ?? void 0,
211
211
  // Boot value wins when the server sends one (?? so an explicit false
212
212
  // still wins); the host-app prop is the fallback.
213
- hasSuggestedMessageAura: t.suggested_message_aura ?? e?.hasSuggestedMessageAura,
214
- hasSuggestedMessageShine: t.suggested_message_shine ?? e?.hasSuggestedMessageShine,
215
- displayWelcomeMessages: t.auto_display_welcome_message,
216
- collectUserFeedback: t.collect_user_feedback,
217
- title: t.title || "responds instantly",
218
- subtitle: t.subtitle || "Ask me anything"
219
- } : e, [e, t]);
220
- }
221
- function V(e) {
222
- const t = L(e);
223
- return Z(() => {
224
- t.current = e;
225
- }), t;
226
- }
227
- class Ue extends Error {
228
- constructor(t) {
229
- super(t), this.name = "NetworkError";
230
- }
231
- }
232
- class ue extends Error {
233
- status;
234
- response;
235
- constructor(t, o, r) {
236
- super(o), this.name = "ServerError", this.status = t, this.response = r;
237
- }
238
- }
239
- const Lt = "x-elo-chat-token", Zt = "x-elo-chat-token-renewed";
240
- class Ht {
241
- baseURL;
242
- headers;
243
- region = null;
244
- chatToken = null;
245
- constructor(t) {
246
- this.baseURL = t.baseURL, this.headers = {
247
- "Content-Type": "application/json",
248
- "ELO-APP-ID": t.appId,
249
- Origin: typeof window < "u" ? window.location.origin : ""
250
- };
251
- }
252
- setRegion(t) {
253
- this.region = t;
254
- }
255
- setChatToken(t) {
256
- this.chatToken = t;
257
- }
258
- getChatToken() {
259
- return this.chatToken;
260
- }
261
- async request(t, o = {}) {
262
- const r = this.region ? { "X-Region": this.region } : {}, n = this.chatToken ? { [Lt]: this.chatToken } : {};
263
- let a;
264
- try {
265
- a = await fetch(`${this.baseURL}${t}`, {
266
- ...o,
267
- headers: {
268
- ...this.headers,
269
- ...r,
270
- ...n,
271
- ...o.headers
272
- }
273
- });
274
- } catch (l) {
275
- throw l instanceof TypeError ? new Ue(l.message) : l;
276
- }
277
- const c = a.headers.get(Zt);
278
- c && (this.chatToken = c);
279
- let s;
280
- try {
281
- s = await a.json();
282
- } catch (l) {
283
- console.error("Error parsing JSON response:", l);
284
- }
285
- if (!a.ok)
286
- throw a.status >= 500 ? new ue(a.status, "API error", s) : new ue(a.status, "HTTP error", s);
287
- return s;
288
- }
289
- async get(t) {
290
- return this.request(t, { method: "GET" });
291
- }
292
- async post(t, o) {
293
- return this.request(t, {
294
- method: "POST",
295
- body: JSON.stringify(o)
296
- });
297
- }
298
- async put(t, o) {
299
- return this.request(t, {
300
- method: "PUT",
301
- body: JSON.stringify(o)
302
- });
303
- }
304
- /**
305
- * External GET request without default headers or credentials
306
- * Used for cross-origin requests that don't need authentication
307
- */
308
- async getExternal(t) {
309
- const o = await fetch(t, {
310
- method: "GET",
311
- credentials: "omit"
312
- });
313
- let r;
314
- try {
315
- r = await o.json();
316
- } catch (n) {
317
- console.error("Error parsing JSON response:", n);
318
- }
319
- if (!o.ok)
320
- throw o.status >= 500 ? new ue(o.status, "API error", r) : new ue(o.status, "HTTP error", r);
321
- return r;
322
- }
323
- }
324
- function Kt() {
213
+ hasSuggestedMessageAura: e.suggested_message_aura ?? t?.hasSuggestedMessageAura,
214
+ hasSuggestedMessageShine: e.suggested_message_shine ?? t?.hasSuggestedMessageShine,
215
+ hasAttachments: e.attachments_enabled ?? t?.hasAttachments,
216
+ displayWelcomeMessages: e.auto_display_welcome_message,
217
+ collectUserFeedback: e.collect_user_feedback,
218
+ title: e.title || "responds instantly",
219
+ subtitle: e.subtitle || "Ask me anything"
220
+ } : t, [t, e]);
221
+ }
222
+ function eo() {
325
223
  if (typeof window > "u")
326
224
  return {};
327
- const e = new URLSearchParams(window.location.search), t = {};
328
- return e.forEach((o, r) => {
329
- t[r] = o;
330
- }), t;
331
- }
332
- const Vt = "eloquent-ai::conversation-data", ke = typeof window < "u", Wt = 1800 * 1e3;
333
- function Xe({ appId: e }) {
334
- const t = We(() => `${Vt}-${e}`, [e]), o = We(
225
+ const t = new URLSearchParams(window.location.search), e = {};
226
+ return t.forEach((o, r) => {
227
+ e[r] = o;
228
+ }), e;
229
+ }
230
+ const to = "eloquent-ai::conversation-data", _e = typeof window < "u", oo = 1800 * 1e3;
231
+ function Qe({ appId: t }) {
232
+ const e = Fe(() => `${to}-${t}`, [t]), o = Fe(
335
233
  () => ({
336
234
  conversationId: null,
337
235
  userId: null,
@@ -339,218 +237,225 @@ function Xe({ appId: e }) {
339
237
  messages: []
340
238
  }),
341
239
  []
342
- ), r = y(() => {
240
+ ), r = v(() => {
343
241
  try {
344
- if (!ke) return o;
345
- const i = localStorage.getItem(t);
346
- return i ? JSON.parse(i) : o;
347
- } catch (i) {
242
+ if (!_e) return o;
243
+ const a = localStorage.getItem(e);
244
+ return a ? JSON.parse(a) : o;
245
+ } catch (a) {
348
246
  return console.error(
349
247
  "Error retrieving conversation data from localStorage:",
350
- i
248
+ a
351
249
  ), o;
352
250
  }
353
- }, [t, o]), n = y(() => {
251
+ }, [e, o]), n = v(() => {
354
252
  try {
355
- const i = r();
356
- return i.lastActivity ? Date.now() - i.lastActivity > Wt : !0;
357
- } catch (i) {
358
- return console.error("Error checking conversation expiration:", i), !0;
253
+ const a = r();
254
+ return a.lastActivity ? Date.now() - a.lastActivity > oo : !0;
255
+ } catch (a) {
256
+ return console.error("Error checking conversation expiration:", a), !0;
359
257
  }
360
- }, [r]), a = y(
361
- (i, d, h, u, p) => {
258
+ }, [r]), i = v(
259
+ (a, l, g, u, h) => {
362
260
  try {
363
- if (!ke) return;
364
- const g = {
365
- conversationId: i,
366
- userId: d,
261
+ if (!_e) return;
262
+ const p = {
263
+ conversationId: a,
264
+ userId: l,
367
265
  deviceId: u,
368
- messages: h,
266
+ messages: ro(g),
369
267
  lastActivity: Date.now(),
370
- chatToken: p
268
+ chatToken: h
371
269
  };
372
- localStorage.setItem(t, JSON.stringify(g));
373
- } catch (g) {
374
- console.error("Error saving conversation data to localStorage:", g);
270
+ localStorage.setItem(e, JSON.stringify(p));
271
+ } catch (p) {
272
+ console.error("Error saving conversation data to localStorage:", p);
375
273
  }
376
274
  },
377
- [t]
378
- ), c = y(() => {
275
+ [e]
276
+ ), d = v(() => {
379
277
  try {
380
- if (!ke) return;
381
- const i = r();
278
+ if (!_e) return;
279
+ const a = r();
382
280
  localStorage.setItem(
383
- t,
384
- JSON.stringify({ ...i, isChatClosed: !0 })
281
+ e,
282
+ JSON.stringify({ ...a, isChatClosed: !0 })
385
283
  );
386
- } catch (i) {
284
+ } catch (a) {
387
285
  console.error(
388
286
  "Error marking conversation as closed in localStorage:",
389
- i
287
+ a
390
288
  );
391
289
  }
392
- }, [t, r]), s = y(() => {
290
+ }, [e, r]), s = v(() => {
393
291
  try {
394
- if (!ke) return;
395
- const i = localStorage.getItem(t);
396
- if (i) {
397
- const d = JSON.parse(i);
292
+ if (!_e) return;
293
+ const a = localStorage.getItem(e);
294
+ if (a) {
295
+ const l = JSON.parse(a);
398
296
  localStorage.setItem(
399
- t,
297
+ e,
400
298
  JSON.stringify({
401
299
  ...o,
402
- deviceId: d.deviceId,
403
- userId: d.userId
300
+ deviceId: l.deviceId,
301
+ userId: l.userId
404
302
  })
405
303
  );
406
304
  }
407
- } catch (i) {
305
+ } catch (a) {
408
306
  console.error(
409
307
  "Error clearing conversation data from localStorage:",
410
- i
308
+ a
411
309
  );
412
310
  }
413
- }, [t, o]), l = y(() => {
311
+ }, [e, o]), c = v(() => {
414
312
  try {
415
- if (!ke) return;
416
- const i = r();
417
- i.conversationId && (i.lastActivity = Date.now(), localStorage.setItem(t, JSON.stringify(i)));
418
- } catch (i) {
419
- console.error("Error updating last activity timestamp:", i);
313
+ if (!_e) return;
314
+ const a = r();
315
+ a.conversationId && (a.lastActivity = Date.now(), localStorage.setItem(e, JSON.stringify(a)));
316
+ } catch (a) {
317
+ console.error("Error updating last activity timestamp:", a);
420
318
  }
421
- }, [r, t]);
319
+ }, [r, e]);
422
320
  return {
423
321
  isChatExpired: n,
424
- saveChatData: a,
322
+ saveChatData: i,
425
323
  clearChatData: s,
426
324
  getSavedChatData: r,
427
- updateLastActivity: l,
428
- markChatClosed: c
325
+ updateLastActivity: c,
326
+ markChatClosed: d
429
327
  };
430
328
  }
431
- const Jt = "aws-appsync-event-ws", Ft = 15e3, Gt = 3e5, Xt = 5e3, Yt = 1;
432
- function Qt(e) {
433
- const t = new URL(e);
434
- return /\.appsync-api\.[\w-]+\.amazonaws\.com(\.cn)?$/.test(t.hostname) && (t.hostname = t.hostname.replace(
329
+ function ro(t) {
330
+ return t.flatMap((e) => {
331
+ if (!e.attachments) return [e];
332
+ const o = e.attachments.filter((r) => zt(r.url)).map(({ url: r, mimeType: n, name: i }) => ({ url: r, mimeType: n, name: i }));
333
+ return o.length > 0 ? [{ ...e, attachments: o }] : e.content ? [{ ...e, attachments: void 0 }] : [];
334
+ });
335
+ }
336
+ const no = "aws-appsync-event-ws", ao = 15e3, io = 3e5, so = 5e3, lo = 1;
337
+ function co(t) {
338
+ const e = new URL(t);
339
+ return /\.appsync-api\.[\w-]+\.amazonaws\.com(\.cn)?$/.test(e.hostname) && (e.hostname = e.hostname.replace(
435
340
  ".appsync-api.",
436
341
  ".appsync-realtime-api."
437
- )), t.protocol = "wss:", t.pathname = `${t.pathname.replace(/\/$/, "")}/realtime`, t.toString();
342
+ )), e.protocol = "wss:", e.pathname = `${e.pathname.replace(/\/$/, "")}/realtime`, e.toString();
438
343
  }
439
- function eo(e, t) {
440
- const o = new URL(e).host;
441
- return "authorizationToken" in t ? { Authorization: t.authorizationToken, host: o } : { "x-api-key": t.apiKey, host: o };
344
+ function uo(t, e) {
345
+ const o = new URL(t).host;
346
+ return "authorizationToken" in e ? { Authorization: e.authorizationToken, host: o } : { "x-api-key": e.apiKey, host: o };
442
347
  }
443
- function to(e) {
444
- return `header-${btoa(JSON.stringify(e)).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "")}`;
348
+ function ho(t) {
349
+ return `header-${btoa(JSON.stringify(t)).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "")}`;
445
350
  }
446
- function Ze(e) {
447
- return !e || e.length === 0 ? "unknown error" : e.map((t) => `${t.errorType ?? "Error"}: ${t.message ?? ""}`).join("; ");
351
+ function Ke(t) {
352
+ return !t || t.length === 0 ? "unknown error" : t.map((e) => `${e.errorType ?? "Error"}: ${e.message ?? ""}`).join("; ");
448
353
  }
449
- function oo(e) {
354
+ function po(t) {
450
355
  const {
451
- httpEndpoint: t,
356
+ httpEndpoint: e,
452
357
  auth: o,
453
358
  channel: r,
454
359
  onEvent: n,
455
- onDisconnect: a,
456
- createWebSocket: c = (d, h) => new WebSocket(d, h)
457
- } = e, s = eo(t, o), l = Qt(t), i = crypto.randomUUID();
458
- return new Promise((d, h) => {
360
+ onDisconnect: i,
361
+ createWebSocket: d = (l, g) => new WebSocket(l, g)
362
+ } = t, s = uo(e, o), c = co(e), a = crypto.randomUUID();
363
+ return new Promise((l, g) => {
459
364
  let u;
460
365
  try {
461
- u = c(l, [
462
- Jt,
463
- to(s)
366
+ u = d(c, [
367
+ no,
368
+ ho(s)
464
369
  ]);
465
370
  } catch (w) {
466
- h(w instanceof Error ? w : new Error(String(w)));
371
+ g(w instanceof Error ? w : new Error(String(w)));
467
372
  return;
468
373
  }
469
- let p = "connecting", g = !1, f = Gt, q = Date.now(), m = null, E = null;
374
+ let h = "connecting", p = !1, f = io, x = Date.now(), b = null, R = null;
470
375
  const O = () => {
471
- m && (clearTimeout(m), m = null), E && (clearInterval(E), E = null);
472
- }, x = (w) => {
473
- if (p === "closed") return;
474
- const v = p === "established";
475
- p = "closed", O();
376
+ b && (clearTimeout(b), b = null), R && (clearInterval(R), R = null);
377
+ }, _ = (w) => {
378
+ if (h === "closed") return;
379
+ const y = h === "established";
380
+ h = "closed", O();
476
381
  try {
477
382
  u.close();
478
383
  } catch {
479
384
  }
480
- g || (v ? a(w) : h(new Error(w)));
481
- }, C = (w) => {
482
- u.readyState === Yt && u.send(JSON.stringify(w));
385
+ p || (y ? i(w) : g(new Error(w)));
483
386
  }, I = (w) => {
484
- m && clearTimeout(m), m = setTimeout(() => {
485
- x(`Timed out waiting for ${w}`);
486
- }, Ft);
387
+ u.readyState === lo && u.send(JSON.stringify(w));
388
+ }, E = (w) => {
389
+ b && clearTimeout(b), b = setTimeout(() => {
390
+ _(`Timed out waiting for ${w}`);
391
+ }, ao);
487
392
  };
488
393
  u.addEventListener("open", () => {
489
- p !== "closed" && (C({ type: "connection_init" }), I("connection_ack"));
394
+ h !== "closed" && (I({ type: "connection_init" }), E("connection_ack"));
490
395
  }), u.addEventListener("message", (w) => {
491
- if (p === "closed") return;
492
- let v;
396
+ if (h === "closed") return;
397
+ let y;
493
398
  try {
494
- v = JSON.parse(String(w.data));
399
+ y = JSON.parse(String(w.data));
495
400
  } catch {
496
401
  console.warn("[EloquentChatSDK] Unparseable realtime frame ignored");
497
402
  return;
498
403
  }
499
- switch (v.type) {
404
+ switch (y.type) {
500
405
  case "connection_ack": {
501
- if (p !== "connecting") return;
502
- p = "subscribing", typeof v.connectionTimeoutMs == "number" && (f = v.connectionTimeoutMs), C({
406
+ if (h !== "connecting") return;
407
+ h = "subscribing", typeof y.connectionTimeoutMs == "number" && (f = y.connectionTimeoutMs), I({
503
408
  type: "subscribe",
504
- id: i,
409
+ id: a,
505
410
  channel: r,
506
411
  authorization: s
507
- }), I("subscribe_success");
412
+ }), E("subscribe_success");
508
413
  return;
509
414
  }
510
415
  case "connection_error": {
511
- x(`Connection error: ${Ze(v.errors)}`);
416
+ _(`Connection error: ${Ke(y.errors)}`);
512
417
  return;
513
418
  }
514
419
  case "subscribe_success": {
515
- if (p !== "subscribing" || v.id !== i) return;
516
- p = "established", m && (clearTimeout(m), m = null), q = Date.now(), E = setInterval(() => {
517
- Date.now() - q > f && x("Keep-alive timeout");
518
- }, Xt), d({
420
+ if (h !== "subscribing" || y.id !== a) return;
421
+ h = "established", b && (clearTimeout(b), b = null), x = Date.now(), R = setInterval(() => {
422
+ Date.now() - x > f && _("Keep-alive timeout");
423
+ }, so), l({
519
424
  close: () => {
520
- g = !0, C({ type: "unsubscribe", id: i }), x("Closed by client");
425
+ p = !0, I({ type: "unsubscribe", id: a }), _("Closed by client");
521
426
  }
522
427
  });
523
428
  return;
524
429
  }
525
430
  case "subscribe_error": {
526
- if (v.id !== i) return;
527
- x(`Subscribe error: ${Ze(v.errors)}`);
431
+ if (y.id !== a) return;
432
+ _(`Subscribe error: ${Ke(y.errors)}`);
528
433
  return;
529
434
  }
530
435
  case "ka": {
531
- q = Date.now();
436
+ x = Date.now();
532
437
  return;
533
438
  }
534
439
  case "data": {
535
- if (v.id !== i) return;
536
- q = Date.now();
537
- let z = v.event;
538
- if (typeof z == "string")
440
+ if (y.id !== a) return;
441
+ x = Date.now();
442
+ let T = y.event;
443
+ if (typeof T == "string")
539
444
  try {
540
- z = JSON.parse(z);
445
+ T = JSON.parse(T);
541
446
  } catch {
542
447
  console.warn(
543
448
  "[EloquentChatSDK] Unparseable realtime event ignored"
544
449
  );
545
450
  return;
546
451
  }
547
- n(z);
452
+ n(T);
548
453
  return;
549
454
  }
550
455
  case "broadcast_error": {
551
456
  console.warn(
552
457
  "[EloquentChatSDK] Realtime broadcast error:",
553
- Ze(v.errors)
458
+ Ke(y.errors)
554
459
  );
555
460
  return;
556
461
  }
@@ -558,266 +463,285 @@ function oo(e) {
558
463
  return;
559
464
  }
560
465
  }), u.addEventListener("close", () => {
561
- x("WebSocket closed");
466
+ _("WebSocket closed");
562
467
  }), u.addEventListener("error", () => {
563
- x("WebSocket error");
468
+ _("WebSocket error");
564
469
  });
565
470
  });
566
471
  }
567
- function ro(e, t) {
568
- return typeof t == "bigint" ? t.toString() : t;
472
+ function go(t, e) {
473
+ return typeof e == "bigint" ? e.toString() : e;
569
474
  }
570
- class no {
571
- constructor(t) {
572
- this._getter = t, this._value = void 0;
475
+ class fo {
476
+ constructor(e) {
477
+ this._getter = e, this._value = void 0;
573
478
  }
574
479
  get value() {
575
- const t = this._getter;
576
- return t !== void 0 && (this._value = t(), this._getter = void 0), this._value;
480
+ const e = this._getter;
481
+ return e !== void 0 && (this._value = e(), this._getter = void 0), this._value;
577
482
  }
578
483
  }
579
- function ao(e) {
580
- return new no(e);
484
+ function mo(t) {
485
+ return new fo(t);
581
486
  }
582
- function pt(e) {
583
- const t = e.startsWith("^") ? 1 : 0, o = e.endsWith("$") ? e.length - 1 : e.length;
584
- return e.slice(t, o);
487
+ function mt(t) {
488
+ const e = t.startsWith("^") ? 1 : 0, o = t.endsWith("$") ? t.length - 1 : t.length;
489
+ return t.slice(e, o);
585
490
  }
586
- function io(e, t, o) {
587
- Object.defineProperty(e, t, {
491
+ function bo(t, e, o) {
492
+ Object.defineProperty(t, e, {
588
493
  value: o,
589
494
  writable: !0,
590
495
  enumerable: !0,
591
496
  configurable: !0
592
497
  });
593
498
  }
594
- const gt = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
499
+ const bt = "captureStackTrace" in Error ? Error.captureStackTrace : (...t) => {
595
500
  };
596
- function so(e) {
597
- return typeof e == "object" && e !== null && !Array.isArray(e);
501
+ function Ye(t) {
502
+ return typeof t == "object" && t !== null && !Array.isArray(t);
503
+ }
504
+ function vo(t) {
505
+ if (Ye(t) === !1)
506
+ return !1;
507
+ const e = t.constructor;
508
+ if (e === void 0 || typeof e != "function")
509
+ return !0;
510
+ const o = e.prototype;
511
+ return !(Ye(o) === !1 || Object.prototype.hasOwnProperty.call(o, "isPrototypeOf") === !1);
598
512
  }
599
- function nt(e) {
600
- return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
513
+ function st(t) {
514
+ return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
601
515
  }
602
- function lo(e, t, o) {
603
- const r = new e._zod.constr(t ?? e._zod.def);
604
- return (!t || o?.parent) && (r._zod.parent = e), r;
516
+ function wo(t, e, o) {
517
+ const r = new t._zod.constr(e ?? t._zod.def);
518
+ return (!e || o?.parent) && (r._zod.parent = t), r;
605
519
  }
606
- function Ee(e) {
607
- return {};
520
+ function me(t) {
521
+ const e = t;
522
+ if (!e)
523
+ return {};
524
+ if (typeof e == "string")
525
+ return { error: () => e };
526
+ if (e?.message !== void 0) {
527
+ if (e?.error !== void 0)
528
+ throw new Error("Cannot specify both `message` and `error` params");
529
+ e.error = e.message;
530
+ }
531
+ return delete e.message, typeof e.error == "string" ? { ...e, error: () => e.error } : e;
608
532
  }
609
- function co(e) {
610
- return Object.keys(e).filter((t) => e[t]._zod.optin !== void 0 && e[t]._zod.optout === "optional");
533
+ function qo(t) {
534
+ return Object.keys(t).filter((e) => t[e]._zod.optin !== void 0 && t[e]._zod.optout === "optional");
611
535
  }
612
- function ge(e, t = 0) {
613
- if (e.aborted === !0)
536
+ function fe(t, e = 0) {
537
+ if (t.aborted === !0)
614
538
  return !0;
615
- for (let o = t; o < e.issues.length; o++)
616
- if (e.issues[o]?.continue !== !0)
539
+ for (let o = e; o < t.issues.length; o++)
540
+ if (t.issues[o]?.continue !== !0)
617
541
  return !0;
618
542
  return !1;
619
543
  }
620
- function uo(e, t = 0) {
621
- if (e.aborted === !0)
544
+ function yo(t, e = 0) {
545
+ if (t.aborted === !0)
622
546
  return !0;
623
- for (let o = t; o < e.issues.length; o++)
624
- if (e.issues[o]?.continue === !1)
547
+ for (let o = e; o < t.issues.length; o++)
548
+ if (t.issues[o]?.continue === !1)
625
549
  return !0;
626
550
  return !1;
627
551
  }
628
- function ho(e, t) {
629
- return t.map((o) => {
552
+ function Se(t, e) {
553
+ return e.map((o) => {
630
554
  var r;
631
- return (r = o).path ?? (r.path = []), o.path.unshift(e), o;
555
+ return (r = o).path ?? (r.path = []), o.path.unshift(t), o;
632
556
  });
633
557
  }
634
- function _e(e) {
635
- return typeof e == "string" ? e : e?.message;
558
+ function Ce(t) {
559
+ return typeof t == "string" ? t : t?.message;
636
560
  }
637
- function at(e, t, o) {
561
+ function lt(t, e, o) {
638
562
  var r;
639
- for (let n = t; n < e.length; n++)
640
- (r = e[n]).schema ?? (r.schema = o);
563
+ for (let n = e; n < t.length; n++)
564
+ (r = t[n]).schema ?? (r.schema = o);
641
565
  }
642
- function ze(e, t, o) {
566
+ function be(t, e, o) {
643
567
  var r;
644
- const n = e.inst?._zod?.traits;
645
- n?.has("$ZodType") && (n.has("$ZodCheck") ? (r = e).schema ?? (r.schema = e.inst) : e.schema = e.inst);
646
- const a = e.schema !== e.inst ? e.schema?._zod.def?.error : void 0, c = e.message ? e.message : _e(e.inst?._zod.def?.error?.(e)) ?? _e(a?.(e)) ?? _e(t?.error?.(e)) ?? _e(o.customError?.(e)) ?? _e(o.localeError?.(e)) ?? "Invalid input", s = {};
647
- for (const l of Object.keys(e))
648
- l === "inst" || l === "schema" || l === "continue" || l === "input" || l === "__proto__" || (s[l] = e[l]);
649
- return s.path ?? (s.path = []), s.message = c, t?.reportInput && (s.input = e.input), s;
650
- }
651
- function po(e, t) {
652
- for (const o in t) {
653
- const r = Object.getOwnPropertyDescriptor(t, o);
654
- r.get ? Object.defineProperty(e, o, { ...r, enumerable: !1 }) : fo(e, o, r.value);
568
+ const n = t.inst?._zod?.traits;
569
+ n?.has("$ZodType") && (n.has("$ZodCheck") ? (r = t).schema ?? (r.schema = t.inst) : t.schema = t.inst);
570
+ const i = t.schema !== t.inst ? t.schema?._zod.def?.error : void 0, d = t.message ? t.message : Ce(t.inst?._zod.def?.error?.(t)) ?? Ce(i?.(t)) ?? Ce(e?.error?.(t)) ?? Ce(o.customError?.(t)) ?? Ce(o.localeError?.(t)) ?? "Invalid input", s = {};
571
+ for (const c of Object.keys(t))
572
+ c === "inst" || c === "schema" || c === "continue" || c === "input" || c === "__proto__" || (s[c] = t[c]);
573
+ return s.path ?? (s.path = []), s.message = d, e?.reportInput && (s.input = t.input), s;
574
+ }
575
+ function xo(t, e) {
576
+ for (const o in e) {
577
+ const r = Object.getOwnPropertyDescriptor(e, o);
578
+ r.get ? Object.defineProperty(t, o, { ...r, enumerable: !1 }) : _o(t, o, r.value);
655
579
  }
656
580
  }
657
- function Ie(e, t, o, r = !0) {
658
- return Object.defineProperty(e, t, { configurable: !0, writable: !0, enumerable: r, value: o }), o;
581
+ function Ee(t, e, o, r = !0) {
582
+ return Object.defineProperty(t, e, { configurable: !0, writable: !0, enumerable: r, value: o }), o;
659
583
  }
660
- function go(e, t, o) {
661
- return Ie(e, t, o, !1);
584
+ function ko(t, e, o) {
585
+ return Ee(t, e, o, !1);
662
586
  }
663
- function fo(e, t, o) {
664
- Object.defineProperty(e, t, {
587
+ function _o(t, e, o) {
588
+ Object.defineProperty(t, e, {
665
589
  configurable: !0,
666
590
  get() {
667
- return this == null ? o : Ie(this, t, o.bind(this));
591
+ return this == null ? o : Ee(this, e, o.bind(this));
668
592
  },
669
593
  set(r) {
670
- Ie(this, t, r);
594
+ Ee(this, e, r);
671
595
  }
672
596
  });
673
597
  }
674
- function mo(e, t) {
675
- const o = Object.getPrototypeOf(e);
676
- return t in o ? void 0 : o;
598
+ function Co(t, e) {
599
+ const o = Object.getPrototypeOf(t);
600
+ return e in o ? void 0 : o;
677
601
  }
678
- let He, de = !1;
679
- const wo = {
602
+ let He, he = !1;
603
+ const So = {
680
604
  configurable: !0,
681
605
  get() {
682
- de = !0;
606
+ he = !0;
683
607
  }
684
608
  };
685
- function ne(e, t, o) {
686
- const r = Object.getPrototypeOf(e._zod);
687
- if (t in r && He !== e._zod) {
609
+ function de(t, e, o) {
610
+ const r = Object.getPrototypeOf(t._zod);
611
+ if (e in r && He !== t._zod) {
688
612
  He = void 0;
689
613
  return;
690
614
  }
691
- He = e._zod, Object.defineProperty(r, t, {
615
+ He = t._zod, Object.defineProperty(r, e, {
692
616
  configurable: !0,
693
617
  get() {
694
- Object.defineProperty(this, t, wo);
695
- const n = de;
696
- de = !1;
618
+ Object.defineProperty(this, e, So);
619
+ const n = he;
620
+ he = !1;
697
621
  try {
698
- const a = o(this);
699
- return de ? delete this[t] : Object.defineProperty(this, t, { configurable: !0, writable: !0, value: a }), de = de || n, a;
700
- } catch (a) {
701
- throw delete this[t], de = de || n, a;
622
+ const i = o(this);
623
+ return he ? delete this[e] : Object.defineProperty(this, e, { configurable: !0, writable: !0, value: i }), he = he || n, i;
624
+ } catch (i) {
625
+ throw delete this[e], he = he || n, i;
702
626
  }
703
627
  },
704
628
  set(n) {
705
- Object.defineProperty(this, t, { configurable: !0, writable: !0, value: n });
629
+ Object.defineProperty(this, e, { configurable: !0, writable: !0, value: n });
706
630
  }
707
631
  });
708
632
  }
709
- function bo(e, t, o, r) {
710
- const n = mo(e, t);
711
- n && Object.defineProperty(n, t, {
633
+ function Io(t, e, o, r) {
634
+ const n = Co(t, e);
635
+ n && Object.defineProperty(n, e, {
712
636
  configurable: !0,
713
637
  get() {
714
- const a = { configurable: !0, writable: !0, enumerable: r, value: void 0 };
715
- return Object.defineProperty(this, t, a), a.value = o(this), Object.defineProperty(this, t, a), a.value;
638
+ const i = { configurable: !0, writable: !0, enumerable: r, value: void 0 };
639
+ return Object.defineProperty(this, e, i), i.value = o(this), Object.defineProperty(this, e, i), i.value;
716
640
  },
717
- set(a) {
718
- Object.defineProperty(this, t, { configurable: !0, writable: !0, enumerable: r, value: a });
641
+ set(i) {
642
+ Object.defineProperty(this, e, { configurable: !0, writable: !0, enumerable: r, value: i });
719
643
  }
720
644
  });
721
645
  }
722
- var it;
723
- const Ke = { value: void 0, enumerable: !1 };
724
- let st = "captureStackTrace" in Error ? Error : null;
725
- function vo(e) {
726
- const t = st;
727
- if (t) {
728
- const o = t.stackTraceLimit;
646
+ var ct;
647
+ const Ve = { value: void 0, enumerable: !1 };
648
+ let dt = "captureStackTrace" in Error ? Error : null;
649
+ function zo(t) {
650
+ const e = dt;
651
+ if (e) {
652
+ const o = e.stackTraceLimit;
729
653
  if (typeof o == "number") {
730
654
  try {
731
- t.stackTraceLimit = 0;
655
+ e.stackTraceLimit = 0;
732
656
  } catch {
733
- return st = null, new e();
657
+ return dt = null, new t();
734
658
  }
735
659
  try {
736
- return new e();
660
+ return new t();
737
661
  } finally {
738
- t.stackTraceLimit = o;
662
+ e.stackTraceLimit = o;
739
663
  }
740
664
  }
741
665
  }
742
- return new e();
666
+ return new t();
743
667
  }
744
- function W(e, t, o, r) {
668
+ function K(t, e, o, r) {
745
669
  const n = {};
746
- function a(u) {
747
- this.def = u, this.constr = h, this.traits = /* @__PURE__ */ new Set();
670
+ function i(u) {
671
+ this.def = u, this.constr = g, this.traits = /* @__PURE__ */ new Set();
748
672
  }
749
- a.prototype = n;
750
- const c = o, s = c && /* @__PURE__ */ new WeakSet();
751
- function l(u, p) {
673
+ i.prototype = n;
674
+ const d = o, s = d && /* @__PURE__ */ new WeakSet();
675
+ function c(u, h) {
752
676
  if (u._zod) {
753
- if (u._zod.traits.has(e))
677
+ if (u._zod.traits.has(t))
754
678
  return;
755
679
  } else {
756
- Ke.value = new a(p);
680
+ Ve.value = new i(h);
757
681
  try {
758
- Object.defineProperty(u, "_zod", Ke);
682
+ Object.defineProperty(u, "_zod", Ve);
759
683
  } finally {
760
- Ke.value = void 0;
684
+ Ve.value = void 0;
761
685
  }
762
686
  }
763
- if (u._zod.traits.add(e), t(u, p), s) {
764
- const f = Object.getPrototypeOf(u), q = u._zod.constr.prototype;
765
- let m = f;
766
- for (; m && m !== q; )
767
- m = Object.getPrototypeOf(m);
768
- const E = m ?? f;
769
- s.has(E) || (s.add(E), po(E, c));
687
+ if (u._zod.traits.add(t), e(u, h), s) {
688
+ const f = Object.getPrototypeOf(u), x = u._zod.constr.prototype;
689
+ let b = f;
690
+ for (; b && b !== x; )
691
+ b = Object.getPrototypeOf(b);
692
+ const R = b ?? f;
693
+ s.has(R) || (s.add(R), xo(R, d));
770
694
  }
771
- const g = h.prototype;
772
- for (const f in g)
773
- Object.prototype.hasOwnProperty.call(g, f) && (f in u || (u[f] = g[f].bind(u)));
695
+ const p = g.prototype;
696
+ for (const f in p)
697
+ Object.prototype.hasOwnProperty.call(p, f) && (f in u || (u[f] = p[f].bind(u)));
774
698
  }
775
- const i = r?.Parent ?? Object;
776
- class d extends i {
699
+ const a = r?.Parent ?? Object;
700
+ class l extends a {
777
701
  }
778
- Object.defineProperty(d, "name", { value: e });
779
- function h(u) {
780
- const p = r?.Parent ? vo(d) : this;
781
- l(p, u);
782
- const g = p._zod.deferred;
783
- if (g) {
784
- for (const q of g)
785
- q();
786
- p._zod.deferred = void 0;
702
+ Object.defineProperty(l, "name", { value: t });
703
+ function g(u) {
704
+ const h = r?.Parent ? zo(l) : this;
705
+ c(h, u);
706
+ const p = h._zod.deferred;
707
+ if (p) {
708
+ for (const x of p)
709
+ x();
710
+ h._zod.deferred = void 0;
787
711
  }
788
712
  const f = globalThis.__zod_globalConfig?.postProcessor;
789
- return f && f(p), p;
713
+ return f && f(h), h;
790
714
  }
791
- return Object.defineProperty(h, "init", { value: l }), Object.defineProperty(h, Symbol.hasInstance, {
792
- value: (u) => r?.Parent && u instanceof r.Parent ? !0 : u?._zod?.traits?.has(e)
793
- }), Object.defineProperty(h, "name", { value: e }), h;
715
+ return Object.defineProperty(g, "init", { value: c }), Object.defineProperty(g, Symbol.hasInstance, {
716
+ value: (u) => r?.Parent && u instanceof r.Parent ? !0 : u?._zod?.traits?.has(t)
717
+ }), Object.defineProperty(g, "name", { value: t }), g;
794
718
  }
795
- class Ce extends Error {
719
+ class Ie extends Error {
796
720
  constructor() {
797
721
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
798
722
  }
799
723
  }
800
- (it = globalThis).__zod_globalConfig ?? (it.__zod_globalConfig = {});
801
- const Fe = globalThis.__zod_globalConfig;
802
- function we(e) {
803
- return e && Object.assign(Fe, e), Fe;
724
+ (ct = globalThis).__zod_globalConfig ?? (ct.__zod_globalConfig = {});
725
+ const Ae = globalThis.__zod_globalConfig;
726
+ function pe(t) {
727
+ return t && Object.assign(Ae, t), Ae;
804
728
  }
805
- function qo() {
806
- const e = this._zod;
807
- return e.message ?? (e.message = JSON.stringify(e.def, ro, 2)), e.message;
729
+ function Eo() {
730
+ const t = this._zod;
731
+ return t.message ?? (t.message = JSON.stringify(t.def, go, 2)), t.message;
808
732
  }
809
- function yo(e) {
810
- this._zod.message = e;
733
+ function Ro(t) {
734
+ this._zod.message = t;
811
735
  }
812
- const xo = {
813
- get: qo,
814
- set: yo,
736
+ const To = {
737
+ get: Eo,
738
+ set: Ro,
815
739
  enumerable: !0,
816
740
  configurable: !0
817
- }, Ve = { value: void 0, enumerable: !1 }, lt = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]), ko = (e, t) => {
818
- e.name = "$ZodError", Ve.value = t, Object.defineProperty(e, "issues", Ve), Ve.value = void 0, Object.defineProperty(e, "message", xo);
819
- const o = Object.getPrototypeOf(e);
820
- lt.has(o) || (lt.add(o), Object.defineProperty(o, "toString", {
741
+ }, We = { value: void 0, enumerable: !1 }, ut = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]), Po = (t, e) => {
742
+ t.name = "$ZodError", We.value = e, Object.defineProperty(t, "issues", We), We.value = void 0, Object.defineProperty(t, "message", To);
743
+ const o = Object.getPrototypeOf(t);
744
+ ut.has(o) || (ut.add(o), Object.defineProperty(o, "toString", {
821
745
  configurable: !0,
822
746
  enumerable: !1,
823
747
  get() {
@@ -828,152 +752,152 @@ const xo = {
828
752
  Object.defineProperty(this, "toString", { value: r, configurable: !0, writable: !0 });
829
753
  }
830
754
  }));
831
- }, je = W("$ZodError", ko, void 0, {
755
+ }, De = K("$ZodError", Po, void 0, {
832
756
  Parent: Error
833
- }), _o = (e) => {
834
- const t = (o, r, n, a) => {
835
- const c = n ? { ...n, async: !1 } : { async: !1 }, s = o._zod.run({ value: r, issues: [] }, c);
757
+ }), Mo = (t) => {
758
+ const e = (o, r, n, i) => {
759
+ const d = n ? { ...n, async: !1 } : { async: !1 }, s = o._zod.run({ value: r, issues: [] }, d);
836
760
  if (s instanceof Promise)
837
- throw new Ce();
761
+ throw new Ie();
838
762
  if (s.issues.length) {
839
- const l = new (a?.Err ?? e)(s.issues.map((i) => ze(i, c, we())));
840
- throw gt(l, a?.callee ?? t), l;
763
+ const c = new (i?.Err ?? t)(s.issues.map((a) => be(a, d, pe())));
764
+ throw bt(c, i?.callee ?? e), c;
841
765
  }
842
766
  return s.value;
843
767
  };
844
- return t;
845
- }, Co = /* @__PURE__ */ _o(je), So = (e) => {
846
- const t = async (o, r, n, a) => {
847
- const c = n ? { ...n, async: !0 } : { async: !0 };
848
- let s = o._zod.run({ value: r, issues: [] }, c);
768
+ return e;
769
+ }, Oo = /* @__PURE__ */ Mo(De), Ao = (t) => {
770
+ const e = async (o, r, n, i) => {
771
+ const d = n ? { ...n, async: !0 } : { async: !0 };
772
+ let s = o._zod.run({ value: r, issues: [] }, d);
849
773
  if (s instanceof Promise && (s = await s), s.issues.length) {
850
- const l = new (a?.Err ?? e)(s.issues.map((i) => ze(i, c, we())));
851
- throw gt(l, a?.callee ?? t), l;
774
+ const c = new (i?.Err ?? t)(s.issues.map((a) => be(a, d, pe())));
775
+ throw bt(c, i?.callee ?? e), c;
852
776
  }
853
777
  return s.value;
854
778
  };
855
- return t;
856
- }, Io = /* @__PURE__ */ So(je), Eo = (e) => (t, o, r) => {
857
- const n = r ? { ...r, async: !1 } : { async: !1 }, a = t._zod.run({ value: o, issues: [] }, n);
858
- if (a instanceof Promise)
859
- throw new Ce();
860
- return a.issues.length ? ft(e, a.issues, n) : { success: !0, data: a.value };
861
- }, zo = /* @__PURE__ */ Eo(je);
862
- function ft(e, t, o) {
779
+ return e;
780
+ }, Uo = /* @__PURE__ */ Ao(De), jo = (t) => (e, o, r) => {
781
+ const n = r ? { ...r, async: !1 } : { async: !1 }, i = e._zod.run({ value: o, issues: [] }, n);
782
+ if (i instanceof Promise)
783
+ throw new Ie();
784
+ return i.issues.length ? vt(t, i.issues, n) : { success: !0, data: i.value };
785
+ }, Do = /* @__PURE__ */ jo(De);
786
+ function vt(t, e, o) {
863
787
  let r;
864
788
  return {
865
789
  success: !1,
866
790
  get error() {
867
- return r || (r = new e(t.map((n) => ze(n, o, we()))), t = void 0, o = void 0), r;
791
+ return r || (r = new t(e.map((n) => be(n, o, pe()))), e = void 0, o = void 0), r;
868
792
  },
869
793
  set error(n) {
870
- r = n, t = void 0, o = void 0;
794
+ r = n, e = void 0, o = void 0;
871
795
  }
872
796
  };
873
797
  }
874
- const To = (e) => async (t, o, r) => {
798
+ const $o = (t) => async (e, o, r) => {
875
799
  const n = r ? { ...r, async: !0 } : { async: !0 };
876
- let a = t._zod.run({ value: o, issues: [] }, n);
877
- return a instanceof Promise && (a = await a), a.issues.length ? ft(e, a.issues, n) : { success: !0, data: a.value };
878
- }, Ro = /* @__PURE__ */ To(je), Oo = /^[\s\S]{0,}$/, Po = /^null$/i, Mo = {
800
+ let i = e._zod.run({ value: o, issues: [] }, n);
801
+ return i instanceof Promise && (i = await i), i.issues.length ? vt(t, i.issues, n) : { success: !0, data: i.value };
802
+ }, Bo = /* @__PURE__ */ $o(De), No = /^[\s\S]{0,}$/, Lo = /^-?\d+(?:\.\d+)?$/, Zo = /^null$/i, Ko = {
879
803
  major: 4,
880
804
  minor: 6,
881
805
  patch: 7
882
- }, fe = /* @__PURE__ */ W("$ZodType", (e, t) => {
806
+ }, ge = /* @__PURE__ */ K("$ZodType", (t, e) => {
883
807
  var o;
884
- e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Mo;
885
- const r = e._zod.def.checks, n = e._zod.traits.has("$ZodCheck") ? [e, ...r ?? []] : r?.length ? [...r] : [];
886
- for (const a of n)
887
- for (const c of a._zod.onattach)
888
- c(e);
808
+ t ?? (t = {}), t._zod.def = e, t._zod.bag = t._zod.bag || {}, t._zod.version = Ko;
809
+ const r = t._zod.def.checks, n = t._zod.traits.has("$ZodCheck") ? [t, ...r ?? []] : r?.length ? [...r] : [];
810
+ for (const i of n)
811
+ for (const d of i._zod.onattach)
812
+ d(t);
889
813
  if (n.length === 0)
890
- (o = e._zod).deferred ?? (o.deferred = []), e._zod.deferred?.push(() => {
891
- e._zod.run = e._zod.parse;
814
+ (o = t._zod).deferred ?? (o.deferred = []), t._zod.deferred?.push(() => {
815
+ t._zod.run = t._zod.parse;
892
816
  });
893
817
  else {
894
- const a = (s, l, i) => {
818
+ const i = (s, c, a) => {
895
819
  if (s.memo)
896
820
  return s;
897
- let d = ge(s), h;
898
- for (const u of l) {
821
+ let l = fe(s), g;
822
+ for (const u of c) {
899
823
  if (u._zod.def.when) {
900
- if (uo(s) || !u._zod.def.when(s))
824
+ if (yo(s) || !u._zod.def.when(s))
901
825
  continue;
902
- } else if (d)
826
+ } else if (l)
903
827
  continue;
904
- const p = s.issues.length, g = u._zod.check(s);
905
- if (g instanceof Promise && i?.async === !1)
906
- throw new Ce();
907
- if (h || g instanceof Promise)
908
- h = (h ?? Promise.resolve()).then(async () => {
909
- await g, s.issues.length !== p && (at(s.issues, p, e), d || (d = ge(s, p)));
828
+ const h = s.issues.length, p = u._zod.check(s);
829
+ if (p instanceof Promise && a?.async === !1)
830
+ throw new Ie();
831
+ if (g || p instanceof Promise)
832
+ g = (g ?? Promise.resolve()).then(async () => {
833
+ await p, s.issues.length !== h && (lt(s.issues, h, t), l || (l = fe(s, h)));
910
834
  });
911
835
  else {
912
- if (s.issues.length === p)
836
+ if (s.issues.length === h)
913
837
  continue;
914
- at(s.issues, p, e), d || (d = ge(s, p));
838
+ lt(s.issues, h, t), l || (l = fe(s, h));
915
839
  }
916
840
  }
917
- return h ? h.then(() => s) : s;
918
- }, c = (s, l, i) => {
919
- if (ge(s))
841
+ return g ? g.then(() => s) : s;
842
+ }, d = (s, c, a) => {
843
+ if (fe(s))
920
844
  return s.aborted = !0, s;
921
- const d = a(l, n, i);
922
- if (d instanceof Promise) {
923
- if (i.async === !1)
924
- throw new Ce();
925
- return d.then((h) => e._zod.parse(h, i));
845
+ const l = i(c, n, a);
846
+ if (l instanceof Promise) {
847
+ if (a.async === !1)
848
+ throw new Ie();
849
+ return l.then((g) => t._zod.parse(g, a));
926
850
  }
927
- return e._zod.parse(d, i);
851
+ return t._zod.parse(l, a);
928
852
  };
929
- e._zod.run = (s, l) => {
930
- if (l.skipChecks)
931
- return e._zod.parse(s, l);
932
- if (l.direction === "backward") {
933
- const d = e._zod.parse({ value: s.value, issues: [] }, { ...l, skipChecks: !0 });
934
- return d instanceof Promise ? d.then((h) => c(h, s, l)) : c(d, s, l);
853
+ t._zod.run = (s, c) => {
854
+ if (c.skipChecks)
855
+ return t._zod.parse(s, c);
856
+ if (c.direction === "backward") {
857
+ const l = t._zod.parse({ value: s.value, issues: [] }, { ...c, skipChecks: !0 });
858
+ return l instanceof Promise ? l.then((g) => d(g, s, c)) : d(l, s, c);
935
859
  }
936
- const i = e._zod.parse(s, l);
937
- if (i instanceof Promise) {
938
- if (l.async === !1)
939
- throw new Ce();
940
- return i.then((d) => a(d, n, l));
860
+ const a = t._zod.parse(s, c);
861
+ if (a instanceof Promise) {
862
+ if (c.async === !1)
863
+ throw new Ie();
864
+ return a.then((l) => i(l, n, c));
941
865
  }
942
- return a(i, n, l);
866
+ return i(a, n, c);
943
867
  };
944
868
  }
945
869
  }, {
946
870
  // Wrappers extend this by installing a richer factory over it; reading it eagerly would defeat the laziness.
947
871
  get "~standard"() {
948
- return go(this, "~standard", Uo(this));
872
+ return ko(this, "~standard", Vo(this));
949
873
  },
950
- set "~standard"(e) {
951
- Ie(this, "~standard", e);
874
+ set "~standard"(t) {
875
+ Ee(this, "~standard", t);
952
876
  }
953
- }), mt = (e, t) => e.issues.length ? { issues: e.issues.map((o) => ze(o, t, we())) } : { value: e.value };
954
- async function Ao(e, t) {
877
+ }), wt = (t, e) => t.issues.length ? { issues: t.issues.map((o) => be(o, e, pe())) } : { value: t.value };
878
+ async function Ho(t, e) {
955
879
  const o = { async: !0 };
956
- return mt(await e._zod.run({ value: t, issues: [] }, o), o);
880
+ return wt(await t._zod.run({ value: e, issues: [] }, o), o);
957
881
  }
958
- function Uo(e) {
882
+ function Vo(t) {
959
883
  return {
960
- validate: (t) => {
884
+ validate: (e) => {
961
885
  const o = { async: !1 };
962
886
  try {
963
- const r = e._zod.run({ value: t, issues: [] }, o);
887
+ const r = t._zod.run({ value: e, issues: [] }, o);
964
888
  if (!(r instanceof Promise))
965
- return mt(r, o);
889
+ return wt(r, o);
966
890
  } catch {
967
891
  }
968
- return Ao(e, t);
892
+ return Ho(t, e);
969
893
  },
970
894
  vendor: "zod",
971
895
  version: 1
972
896
  };
973
897
  }
974
- const jo = /* @__PURE__ */ W("$ZodString", (e, t) => {
975
- fe.init(e, t), e._zod.pattern = t.pattern ?? Oo, e._zod.parse = (o, r) => {
976
- if (t.coerce)
898
+ const Wo = /* @__PURE__ */ K("$ZodString", (t, e) => {
899
+ ge.init(t, e), t._zod.pattern = e.pattern ?? No, t._zod.parse = (o, r) => {
900
+ if (e.coerce)
977
901
  try {
978
902
  o.value = String(o.value);
979
903
  } catch {
@@ -982,30 +906,30 @@ const jo = /* @__PURE__ */ W("$ZodString", (e, t) => {
982
906
  expected: "string",
983
907
  code: "invalid_type",
984
908
  input: o.value,
985
- inst: e
909
+ inst: t
986
910
  }), o;
987
911
  };
988
- }), Do = /* @__PURE__ */ W("$ZodNull", (e, t) => {
989
- fe.init(e, t), e._zod.pattern = Po, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (o, r) => {
912
+ }), Fo = /* @__PURE__ */ K("$ZodNull", (t, e) => {
913
+ ge.init(t, e), t._zod.pattern = Zo, t._zod.values = /* @__PURE__ */ new Set([null]), t._zod.parse = (o, r) => {
990
914
  const n = o.value;
991
915
  return n === null || o.issues.push({
992
916
  expected: "null",
993
917
  code: "invalid_type",
994
918
  input: n,
995
- inst: e
919
+ inst: t
996
920
  }), o;
997
921
  };
998
922
  });
999
- function Me(e, t, o, r, n, a) {
1000
- const c = o in r, s = a === "optional";
1001
- if (!(!c && s && n === "optional")) {
1002
- if (e.issues.length) {
1003
- if (n !== void 0 && s && !c)
923
+ function Ue(t, e, o, r, n, i) {
924
+ const d = o in r, s = i === "optional";
925
+ if (!(!d && s && n === "optional")) {
926
+ if (t.issues.length) {
927
+ if (n !== void 0 && s && !d)
1004
928
  return;
1005
- t.issues.push(...ho(o, e.issues));
929
+ e.issues.push(...Se(o, t.issues));
1006
930
  }
1007
- if (!c && n === void 0) {
1008
- e.issues.length || t.issues.push({
931
+ if (!d && n === void 0) {
932
+ t.issues.length || e.issues.push({
1009
933
  code: "invalid_type",
1010
934
  expected: "nonoptional",
1011
935
  input: void 0,
@@ -1013,594 +937,721 @@ function Me(e, t, o, r, n, a) {
1013
937
  });
1014
938
  return;
1015
939
  }
1016
- e.value === void 0 ? (c || n === "defaulted" && !s) && (t.value[o] = void 0) : t.value[o] = e.value;
940
+ t.value === void 0 ? (d || n === "defaulted" && !s) && (e.value[o] = void 0) : e.value[o] = t.value;
1017
941
  }
1018
942
  }
1019
- const $o = [];
1020
- function Bo(e) {
1021
- const t = Object.keys(e.shape), o = Object.getOwnPropertySymbols(e.shape), r = o.length ? o : $o, n = r.length ? [...t, ...r] : t;
1022
- for (const c of n)
1023
- if (!e.shape?.[c]?._zod?.traits?.has("$ZodType"))
1024
- throw new Error(`Invalid element at key "${String(c)}": expected a Zod schema`);
1025
- const a = co(e.shape);
943
+ const Jo = [];
944
+ function Yo(t) {
945
+ const e = Object.keys(t.shape), o = Object.getOwnPropertySymbols(t.shape), r = o.length ? o : Jo, n = r.length ? [...e, ...r] : e;
946
+ for (const d of n)
947
+ if (!t.shape?.[d]?._zod?.traits?.has("$ZodType"))
948
+ throw new Error(`Invalid element at key "${String(d)}": expected a Zod schema`);
949
+ const i = qo(t.shape);
1026
950
  return {
1027
- ...e,
951
+ ...t,
1028
952
  allKeys: n,
1029
953
  symbolKeys: r,
1030
954
  // string-only: handleCatchall matches it against `for...in`, which never yields a symbol
1031
- keySet: new Set(t),
1032
- numKeys: t.length,
1033
- optionalKeys: new Set(a)
955
+ keySet: new Set(e),
956
+ numKeys: e.length,
957
+ optionalKeys: new Set(i)
1034
958
  };
1035
959
  }
1036
- function No(e, t, o, r, n, a, c) {
1037
- const s = [], l = n.keySet, i = n.catchall._zod, d = i.def.type, h = i.optin, u = i.optout;
1038
- let p = 0;
1039
- for (const g in t) {
1040
- if (c && o.issues.length !== p) {
1041
- if (ge(o, p))
960
+ function Go(t, e, o, r, n, i, d) {
961
+ const s = [], c = n.keySet, a = n.catchall._zod, l = a.def.type, g = a.optin, u = a.optout;
962
+ let h = 0;
963
+ for (const p in e) {
964
+ if (d && o.issues.length !== h) {
965
+ if (fe(o, h))
1042
966
  break;
1043
- p = o.issues.length;
967
+ h = o.issues.length;
1044
968
  }
1045
- if (l.has(g))
969
+ if (c.has(p))
1046
970
  continue;
1047
- if (g === "__proto__") {
1048
- d === "never" && s.push(g);
971
+ if (p === "__proto__") {
972
+ l === "never" && s.push(p);
1049
973
  continue;
1050
974
  }
1051
- if (d === "never") {
1052
- s.push(g);
975
+ if (l === "never") {
976
+ s.push(p);
1053
977
  continue;
1054
978
  }
1055
- const f = i.run({ value: t[g], issues: [] }, r);
1056
- f instanceof Promise ? e.push(f.then((q) => Me(q, o, g, t, h, u))) : Me(f, o, g, t, h, u);
979
+ const f = a.run({ value: e[p], issues: [] }, r);
980
+ f instanceof Promise ? t.push(f.then((x) => Ue(x, o, p, e, g, u))) : Ue(f, o, p, e, g, u);
1057
981
  }
1058
982
  return s.length && o.issues.push({
1059
983
  code: "unrecognized_keys",
1060
984
  keys: s,
1061
- input: t,
1062
- inst: a,
985
+ input: e,
986
+ inst: i,
1063
987
  // Describes the shape of the input, not the validity of the parsed value, so it never aborts. The parse still fails; the schema's own checks just get to run first, and an enclosing intersection can reconcile the key against a sibling operand.
1064
988
  continue: !0
1065
- }), e.length ? Promise.all(e).then(() => o) : o;
989
+ }), t.length ? Promise.all(t).then(() => o) : o;
1066
990
  }
1067
- const Lo = /* @__PURE__ */ W("$ZodObject", (e, t) => {
1068
- fe.init(e, t);
1069
- const o = Object.getOwnPropertyDescriptor(t, "shape"), r = o?.get ? o.get.raw : t.shape ?? {};
991
+ const Xo = /* @__PURE__ */ K("$ZodObject", (t, e) => {
992
+ ge.init(t, e);
993
+ const o = Object.getOwnPropertyDescriptor(e, "shape"), r = o?.get ? o.get.raw : e.shape ?? {};
1070
994
  if (r) {
1071
- const i = () => {
1072
- const d = { ...r };
1073
- return Object.defineProperty(t, "shape", { value: d }), i.raw = d, d;
995
+ const a = () => {
996
+ const l = { ...r };
997
+ return Object.defineProperty(e, "shape", { value: l }), a.raw = l, l;
1074
998
  };
1075
- i.raw = r, Object.defineProperty(t, "shape", { get: i });
999
+ a.raw = r, Object.defineProperty(e, "shape", { get: a });
1076
1000
  }
1077
- const n = ao(() => Bo(t));
1078
- ne(e, "propValues", (i) => {
1079
- const d = i.def.shape, h = {};
1080
- for (const u in d) {
1081
- const p = d[u]._zod;
1082
- if (p.values) {
1083
- Object.prototype.hasOwnProperty.call(h, u) || io(h, u, /* @__PURE__ */ new Set());
1084
- for (const g of p.values)
1085
- h[u].add(g);
1086
- p.optin !== void 0 && h[u].add(void 0);
1001
+ const n = mo(() => Yo(e));
1002
+ de(t, "propValues", (a) => {
1003
+ const l = a.def.shape, g = {};
1004
+ for (const u in l) {
1005
+ const h = l[u]._zod;
1006
+ if (h.values) {
1007
+ Object.prototype.hasOwnProperty.call(g, u) || bo(g, u, /* @__PURE__ */ new Set());
1008
+ for (const p of h.values)
1009
+ g[u].add(p);
1010
+ h.optin !== void 0 && g[u].add(void 0);
1087
1011
  }
1088
1012
  }
1089
- return h;
1013
+ return g;
1090
1014
  });
1091
- const a = so, c = t.catchall;
1015
+ const i = Ye, d = e.catchall;
1092
1016
  let s;
1093
- const l = Fe.memoizer;
1094
- l?.attach(e), e._zod.parse = (i, d) => {
1017
+ const c = Ae.memoizer;
1018
+ c?.attach(t), t._zod.parse = (a, l) => {
1095
1019
  s ?? (s = n.value);
1096
- const h = i.value;
1097
- if (!a(h))
1098
- return i.issues.push({
1020
+ const g = a.value;
1021
+ if (!i(g))
1022
+ return a.issues.push({
1099
1023
  expected: "object",
1100
1024
  code: "invalid_type",
1101
- input: h,
1102
- inst: e
1103
- }), i;
1104
- i.value = l ? l.alloc(e, i, {}, d) : {};
1105
- const u = [], p = s.shape, g = d?.abortEarly;
1106
- let f = i.issues.length;
1107
- for (const q of s.allKeys) {
1108
- if (g && i.issues.length !== f) {
1109
- if (ge(i, f))
1025
+ input: g,
1026
+ inst: t
1027
+ }), a;
1028
+ a.value = c ? c.alloc(t, a, {}, l) : {};
1029
+ const u = [], h = s.shape, p = l?.abortEarly;
1030
+ let f = a.issues.length;
1031
+ for (const x of s.allKeys) {
1032
+ if (p && a.issues.length !== f) {
1033
+ if (fe(a, f))
1110
1034
  break;
1111
- f = i.issues.length;
1035
+ f = a.issues.length;
1112
1036
  }
1113
- if (q === "__proto__")
1037
+ if (x === "__proto__")
1114
1038
  continue;
1115
- const m = p[q], E = m._zod.optin, O = m._zod.optout, x = m._zod.run({ value: h[q], issues: [] }, d);
1116
- x instanceof Promise ? u.push(x.then((C) => Me(C, i, q, h, E, O))) : Me(x, i, q, h, E, O);
1039
+ const b = h[x], R = b._zod.optin, O = b._zod.optout, _ = b._zod.run({ value: g[x], issues: [] }, l);
1040
+ _ instanceof Promise ? u.push(_.then((I) => Ue(I, a, x, g, R, O))) : Ue(_, a, x, g, R, O);
1117
1041
  }
1118
- return c ? No(u, h, i, d, n.value, e, g === !0) : u.length ? Promise.all(u).then(() => i) : i;
1042
+ return d ? Go(u, g, a, l, n.value, t, p === !0) : u.length ? Promise.all(u).then(() => a) : a;
1119
1043
  };
1120
1044
  });
1121
- function ct(e, t, o, r) {
1122
- for (const a of e)
1123
- if (a.issues.length === 0)
1124
- return t.value = a.value, t;
1125
- const n = e.filter((a) => !ge(a));
1126
- return n.length === 1 ? (t.value = n[0].value, n[0]) : (t.issues.push({
1045
+ function ht(t, e, o, r) {
1046
+ for (const i of t)
1047
+ if (i.issues.length === 0)
1048
+ return e.value = i.value, e;
1049
+ const n = t.filter((i) => !fe(i));
1050
+ return n.length === 1 ? (e.value = n[0].value, n[0]) : (e.issues.push({
1127
1051
  code: "invalid_union",
1128
- input: t.value,
1052
+ input: e.value,
1129
1053
  inst: o,
1130
- errors: e.map((a) => a.issues.map((c) => ze(c, r, we())))
1131
- }), t);
1054
+ errors: t.map((i) => i.issues.map((d) => be(d, r, pe())))
1055
+ }), e);
1132
1056
  }
1133
- const Zo = /* @__PURE__ */ W("$ZodUnion", (e, t) => {
1134
- fe.init(e, t), ne(e, "optin", (r) => r.def.options.some((n) => n._zod.optin === "defaulted") ? "defaulted" : r.def.options.some((n) => n._zod.optin !== void 0) ? "optional" : void 0), ne(e, "optout", (r) => r.def.options.some((n) => n._zod.optout === "optional") ? "optional" : void 0), ne(e, "values", (r) => {
1057
+ const Qo = /* @__PURE__ */ K("$ZodUnion", (t, e) => {
1058
+ ge.init(t, e), de(t, "optin", (r) => r.def.options.some((n) => n._zod.optin === "defaulted") ? "defaulted" : r.def.options.some((n) => n._zod.optin !== void 0) ? "optional" : void 0), de(t, "optout", (r) => r.def.options.some((n) => n._zod.optout === "optional") ? "optional" : void 0), de(t, "values", (r) => {
1135
1059
  if (r.def.options.every((n) => n._zod.values))
1136
1060
  return new Set(r.def.options.flatMap((n) => Array.from(n._zod.values)));
1137
- }), ne(e, "pattern", (r) => {
1061
+ }), de(t, "pattern", (r) => {
1138
1062
  if (r.def.options.every((n) => n._zod.pattern)) {
1139
- const n = r.def.options.map((a) => a._zod.pattern);
1140
- return new RegExp(`^(${n.map((a) => pt(a.source)).join("|")})$`);
1063
+ const n = r.def.options.map((i) => i._zod.pattern);
1064
+ return new RegExp(`^(${n.map((i) => mt(i.source)).join("|")})$`);
1141
1065
  }
1142
1066
  });
1143
- const o = t.options.length === 1 ? t.options[0]._zod.run : null;
1144
- e._zod.parse = (r, n) => {
1067
+ const o = e.options.length === 1 ? e.options[0]._zod.run : null;
1068
+ t._zod.parse = (r, n) => {
1145
1069
  if (o)
1146
1070
  return o(r, n);
1147
- let a = !1;
1148
- const c = [];
1149
- for (const s of t.options) {
1150
- const l = s._zod.run({
1071
+ let i = !1;
1072
+ const d = [];
1073
+ for (const s of e.options) {
1074
+ const c = s._zod.run({
1151
1075
  value: r.value,
1152
1076
  issues: []
1153
1077
  }, n);
1154
- if (l instanceof Promise)
1155
- c.push(l), a = !0;
1078
+ if (c instanceof Promise)
1079
+ d.push(c), i = !0;
1156
1080
  else {
1157
- if (l.issues.length === 0)
1158
- return l;
1159
- c.push(l);
1081
+ if (c.issues.length === 0)
1082
+ return c;
1083
+ d.push(c);
1160
1084
  }
1161
1085
  }
1162
- return a ? Promise.all(c).then((s) => ct(s, r, e, n)) : ct(c, r, e, n);
1086
+ return i ? Promise.all(d).then((s) => ht(s, r, t, n)) : ht(d, r, t, n);
1163
1087
  };
1164
- }), Ho = /* @__PURE__ */ W("$ZodLiteral", (e, t) => {
1165
- fe.init(e, t);
1166
- const o = new Set(t.values);
1167
- e._zod.values = o, ne(e, "pattern", (r) => {
1088
+ }), er = /* @__PURE__ */ K("$ZodRecord", (t, e) => {
1089
+ ge.init(t, e);
1090
+ const o = Ae.memoizer;
1091
+ o?.attach(t), t._zod.parse = (r, n) => {
1092
+ const i = r.value;
1093
+ if (!vo(i))
1094
+ return r.issues.push({
1095
+ expected: "record",
1096
+ code: "invalid_type",
1097
+ input: i,
1098
+ inst: t
1099
+ }), r;
1100
+ const d = [], s = e.keyType._zod.values;
1101
+ if (s && !e.partial) {
1102
+ r.value = o ? o.alloc(t, r, {}, n) : {};
1103
+ const c = /* @__PURE__ */ new Set();
1104
+ for (const l of s)
1105
+ if (typeof l == "string" || typeof l == "number" || typeof l == "symbol") {
1106
+ if (c.add(typeof l == "number" ? l.toString() : l), l === "__proto__")
1107
+ continue;
1108
+ const g = e.keyType._zod.run({ value: l, issues: [] }, n);
1109
+ if (g instanceof Promise)
1110
+ throw new Error("Async schemas not supported in object keys currently");
1111
+ if (g.issues.length) {
1112
+ r.issues.push({
1113
+ code: "invalid_key",
1114
+ origin: "record",
1115
+ issues: g.issues.map((p) => be(p, n, pe())),
1116
+ input: l,
1117
+ path: [l],
1118
+ inst: t
1119
+ });
1120
+ continue;
1121
+ }
1122
+ const u = g.value;
1123
+ if (u === "__proto__")
1124
+ continue;
1125
+ const h = e.valueType._zod.run({ value: i[l], issues: [] }, n);
1126
+ h instanceof Promise ? d.push(h.then((p) => {
1127
+ p.issues.length && r.issues.push(...Se(l, p.issues)), r.value[u] = p.value;
1128
+ })) : (h.issues.length && r.issues.push(...Se(l, h.issues)), r.value[u] = h.value);
1129
+ }
1130
+ let a;
1131
+ for (const l in i)
1132
+ if (!c.has(l))
1133
+ if (e.mode === "loose") {
1134
+ if (l === "__proto__")
1135
+ continue;
1136
+ r.value[l] = i[l];
1137
+ } else
1138
+ a = a ?? [], a.push(l);
1139
+ a && a.length > 0 && r.issues.push({
1140
+ code: "unrecognized_keys",
1141
+ input: i,
1142
+ inst: t,
1143
+ keys: a,
1144
+ continue: !0
1145
+ });
1146
+ } else {
1147
+ r.value = o ? o.alloc(t, r, {}, n) : {};
1148
+ let c;
1149
+ for (const a of Reflect.ownKeys(i)) {
1150
+ if (a === "__proto__" || !Object.prototype.propertyIsEnumerable.call(i, a))
1151
+ continue;
1152
+ let l = e.keyType._zod.run({ value: a, issues: [] }, n);
1153
+ if (l instanceof Promise)
1154
+ throw new Error("Async schemas not supported in object keys currently");
1155
+ if (typeof a == "string" && Lo.test(a) && l.issues.length) {
1156
+ const p = e.keyType._zod.run({ value: Number(a), issues: [] }, n);
1157
+ if (p instanceof Promise)
1158
+ throw new Error("Async schemas not supported in object keys currently");
1159
+ p.issues.length === 0 && (l = p);
1160
+ }
1161
+ if (l.issues.length) {
1162
+ e.mode === "loose" ? r.value[a] = i[a] : s ? (c = c ?? [], c.push(a)) : r.issues.push({
1163
+ code: "invalid_key",
1164
+ origin: "record",
1165
+ issues: l.issues.map((p) => be(p, n, pe())),
1166
+ input: a,
1167
+ path: [a],
1168
+ inst: t
1169
+ });
1170
+ continue;
1171
+ }
1172
+ const u = l.value;
1173
+ if (u === "__proto__")
1174
+ continue;
1175
+ const h = e.valueType._zod.run({ value: i[a], issues: [] }, n);
1176
+ h instanceof Promise ? d.push(h.then((p) => {
1177
+ p.issues.length && r.issues.push(...Se(a, p.issues)), r.value[u] = p.value;
1178
+ })) : (h.issues.length && r.issues.push(...Se(a, h.issues)), r.value[u] = h.value);
1179
+ }
1180
+ c && c.length > 0 && r.issues.push({
1181
+ code: "unrecognized_keys",
1182
+ input: i,
1183
+ inst: t,
1184
+ keys: c,
1185
+ continue: !0
1186
+ });
1187
+ }
1188
+ return d.length ? Promise.all(d).then(() => r) : r;
1189
+ };
1190
+ }), tr = /* @__PURE__ */ K("$ZodLiteral", (t, e) => {
1191
+ ge.init(t, e);
1192
+ const o = new Set(e.values);
1193
+ t._zod.values = o, de(t, "pattern", (r) => {
1168
1194
  const n = r.def.values;
1169
- return new RegExp(n.length ? `^(${n.map((a) => typeof a == "string" ? nt(a) : a ? nt(a.toString()) : String(a)).join("|")})$` : "^[^\\s\\S]$");
1170
- }), e._zod.parse = (r, n) => {
1171
- const a = r.value;
1172
- return o.has(a) || r.issues.push({
1195
+ return new RegExp(n.length ? `^(${n.map((i) => typeof i == "string" ? st(i) : i ? st(i.toString()) : String(i)).join("|")})$` : "^[^\\s\\S]$");
1196
+ }), t._zod.parse = (r, n) => {
1197
+ const i = r.value;
1198
+ return o.has(i) || r.issues.push({
1173
1199
  code: "invalid_value",
1174
- values: t.values,
1175
- input: a,
1176
- inst: e
1200
+ values: e.values,
1201
+ input: i,
1202
+ inst: t
1177
1203
  }), r;
1178
1204
  };
1179
- }), Ko = /* @__PURE__ */ W("$ZodNullable", (e, t) => {
1180
- fe.init(e, t), ne(e, "optin", (o) => o.def.innerType._zod.optin), ne(e, "optout", (o) => o.def.innerType._zod.optout), ne(e, "pattern", (o) => {
1205
+ }), or = /* @__PURE__ */ K("$ZodNullable", (t, e) => {
1206
+ ge.init(t, e), de(t, "optin", (o) => o.def.innerType._zod.optin), de(t, "optout", (o) => o.def.innerType._zod.optout), de(t, "pattern", (o) => {
1181
1207
  const r = o.def.innerType._zod.pattern;
1182
- return r ? new RegExp(`^(${pt(r.source)}|null)$`) : void 0;
1183
- }), ne(e, "values", (o) => o.def.innerType._zod.values ? /* @__PURE__ */ new Set([...o.def.innerType._zod.values, null]) : void 0), e._zod.parse = (o, r) => o.value === null ? o : t.innerType._zod.run(o, r);
1208
+ return r ? new RegExp(`^(${mt(r.source)}|null)$`) : void 0;
1209
+ }), de(t, "values", (o) => o.def.innerType._zod.values ? /* @__PURE__ */ new Set([...o.def.innerType._zod.values, null]) : void 0), t._zod.parse = (o, r) => o.value === null ? o : e.innerType._zod.run(o, r);
1184
1210
  });
1185
- function Vo(e) {
1186
- return e.checks && (e.checks = [...e.checks]), e;
1211
+ function rr(t) {
1212
+ return t.checks && (t.checks = [...t.checks]), t;
1187
1213
  }
1188
1214
  // @__NO_SIDE_EFFECTS__
1189
- function Wo(e, t) {
1190
- return new e(Vo({ type: "string", ...Ee() }));
1215
+ function nr(t, e) {
1216
+ return new t(rr({ type: "string", ...me(e) }));
1191
1217
  }
1192
1218
  // @__NO_SIDE_EFFECTS__
1193
- function Jo(e, t) {
1194
- return new e({
1219
+ function ar(t, e) {
1220
+ return new t({
1195
1221
  type: "null",
1196
- ...Ee()
1222
+ ...me(e)
1197
1223
  });
1198
1224
  }
1199
- const be = /* @__PURE__ */ W("ZodMiniType", (e, t) => {
1200
- if (!e._zod)
1225
+ const ve = /* @__PURE__ */ K("ZodMiniType", (t, e) => {
1226
+ if (!t._zod)
1201
1227
  throw new Error("Uninitialized schema in ZodMiniType.");
1202
- fe.init(e, t), e.def = t, e.type = t.type;
1228
+ ge.init(t, e), t.def = e, t.type = e.type;
1203
1229
  }, {
1204
1230
  // `with` is an alias for `check`: the same function object, not a wrapper.
1205
1231
  get with() {
1206
1232
  return this.check;
1207
1233
  },
1208
- set with(e) {
1209
- Ie(this, "with", e);
1234
+ set with(t) {
1235
+ Ee(this, "with", t);
1210
1236
  },
1211
- parse(e, t) {
1212
- return Co(this, e, t, { callee: this.parse });
1237
+ parse(t, e) {
1238
+ return Oo(this, t, e, { callee: this.parse });
1213
1239
  },
1214
- parseAsync(e, t) {
1215
- return Io(this, e, t, { callee: this.parseAsync });
1240
+ parseAsync(t, e) {
1241
+ return Uo(this, t, e, { callee: this.parseAsync });
1216
1242
  },
1217
- safeParse(e, t) {
1218
- return zo(this, e, t);
1243
+ safeParse(t, e) {
1244
+ return Do(this, t, e);
1219
1245
  },
1220
- safeParseAsync(e, t) {
1221
- return Ro(this, e, t);
1246
+ safeParseAsync(t, e) {
1247
+ return Bo(this, t, e);
1222
1248
  },
1223
- check(...e) {
1224
- const t = this.def;
1249
+ check(...t) {
1250
+ const e = this.def;
1225
1251
  return this.clone({
1226
- ...t,
1252
+ ...e,
1227
1253
  checks: [
1228
- ...t.checks ?? [],
1229
- ...e.map((o) => typeof o == "function" ? { _zod: { check: o, def: { check: "custom" }, onattach: [] } } : o)
1254
+ ...e.checks ?? [],
1255
+ ...t.map((o) => typeof o == "function" ? { _zod: { check: o, def: { check: "custom" }, onattach: [] } } : o)
1230
1256
  ]
1231
1257
  }, { parent: !0 });
1232
1258
  },
1233
- clone(e, t) {
1234
- return lo(this, e, t);
1259
+ clone(t, e) {
1260
+ return wo(this, t, e);
1235
1261
  },
1236
1262
  brand() {
1237
1263
  return this;
1238
1264
  },
1239
- register(e, t) {
1240
- return e.add(this, t), this;
1265
+ register(t, e) {
1266
+ return t.add(this, e), this;
1241
1267
  },
1242
- apply(e, ...t) {
1243
- return t.length === 0 ? e(this) : e(this, ...t);
1268
+ apply(t, ...e) {
1269
+ return e.length === 0 ? t(this) : t(this, ...e);
1244
1270
  }
1245
- }), Fo = /* @__PURE__ */ W("ZodMiniString", (e, t) => {
1246
- jo.init(e, t), be.init(e, t);
1271
+ }), ir = /* @__PURE__ */ K("ZodMiniString", (t, e) => {
1272
+ Wo.init(t, e), ve.init(t, e);
1247
1273
  });
1248
1274
  // @__NO_SIDE_EFFECTS__
1249
- function P(e) {
1250
- return /* @__PURE__ */ Wo(Fo);
1275
+ function z(t) {
1276
+ return /* @__PURE__ */ nr(ir, t);
1251
1277
  }
1252
- const Go = /* @__PURE__ */ W("ZodMiniNull", (e, t) => {
1253
- Do.init(e, t), be.init(e, t);
1278
+ const sr = /* @__PURE__ */ K("ZodMiniNull", (t, e) => {
1279
+ Fo.init(t, e), ve.init(t, e);
1254
1280
  });
1255
1281
  // @__NO_SIDE_EFFECTS__
1256
- function Xo(e) {
1257
- return /* @__PURE__ */ Jo(Go);
1282
+ function lr(t) {
1283
+ return /* @__PURE__ */ ar(sr, t);
1258
1284
  }
1259
- const Yo = /* @__PURE__ */ W("ZodMiniObject", (e, t) => {
1260
- Lo.init(e, t), be.init(e, t), bo(e, "shape", (o) => o._zod.def.shape, !1);
1285
+ const cr = /* @__PURE__ */ K("ZodMiniObject", (t, e) => {
1286
+ Xo.init(t, e), ve.init(t, e), Io(t, "shape", (o) => o._zod.def.shape, !1);
1261
1287
  });
1262
1288
  // @__NO_SIDE_EFFECTS__
1263
- function U(e, t) {
1289
+ function U(t, e) {
1264
1290
  const o = {
1265
1291
  type: "object",
1266
- shape: e ?? {},
1267
- ...Ee()
1292
+ shape: t ?? {},
1293
+ ...me(e)
1268
1294
  };
1269
- return new Yo(o);
1295
+ return new cr(o);
1270
1296
  }
1271
- const Qo = /* @__PURE__ */ W("ZodMiniUnion", (e, t) => {
1272
- Zo.init(e, t), be.init(e, t);
1297
+ const dr = /* @__PURE__ */ K("ZodMiniUnion", (t, e) => {
1298
+ Qo.init(t, e), ve.init(t, e);
1273
1299
  });
1274
1300
  // @__NO_SIDE_EFFECTS__
1275
- function er(e, t) {
1276
- return new Qo({
1301
+ function ur(t, e) {
1302
+ return new dr({
1277
1303
  type: "union",
1278
- options: e,
1279
- ...Ee()
1304
+ options: t,
1305
+ ...me(e)
1306
+ });
1307
+ }
1308
+ const pt = /* @__PURE__ */ K("ZodMiniRecord", (t, e) => {
1309
+ er.init(t, e), ve.init(t, e);
1310
+ });
1311
+ // @__NO_SIDE_EFFECTS__
1312
+ function hr(t, e, o) {
1313
+ return !e || !e._zod ? new pt({
1314
+ type: "record",
1315
+ keyType: /* @__PURE__ */ z(),
1316
+ valueType: t,
1317
+ ...me(e)
1318
+ }) : new pt({
1319
+ type: "record",
1320
+ keyType: t,
1321
+ valueType: e,
1322
+ ...me(o)
1280
1323
  });
1281
1324
  }
1282
- const tr = /* @__PURE__ */ W("ZodMiniLiteral", (e, t) => {
1283
- Ho.init(e, t), be.init(e, t);
1325
+ const pr = /* @__PURE__ */ K("ZodMiniLiteral", (t, e) => {
1326
+ tr.init(t, e), ve.init(t, e);
1284
1327
  });
1285
1328
  // @__NO_SIDE_EFFECTS__
1286
- function ae(e, t) {
1287
- return new tr({
1329
+ function se(t, e) {
1330
+ return new pr({
1288
1331
  type: "literal",
1289
- values: Array.isArray(e) ? e : [e],
1290
- ...Ee()
1332
+ values: Array.isArray(t) ? t : [t],
1333
+ ...me(e)
1291
1334
  });
1292
1335
  }
1293
- const or = /* @__PURE__ */ W("ZodMiniNullable", (e, t) => {
1294
- Ko.init(e, t), be.init(e, t);
1336
+ const gr = /* @__PURE__ */ K("ZodMiniNullable", (t, e) => {
1337
+ or.init(t, e), ve.init(t, e);
1295
1338
  });
1296
1339
  // @__NO_SIDE_EFFECTS__
1297
- function Ye(e) {
1298
- return new or({
1340
+ function et(t) {
1341
+ return new gr({
1299
1342
  type: "nullable",
1300
- innerType: e
1343
+ innerType: t
1301
1344
  });
1302
1345
  }
1303
- we({ jitless: !0 });
1304
- const rr = /* @__PURE__ */ U({
1305
- type: /* @__PURE__ */ ae("utterance"),
1306
- content: /* @__PURE__ */ P(),
1307
- role: /* @__PURE__ */ P()
1308
- }), nr = /* @__PURE__ */ U({
1309
- type: /* @__PURE__ */ ae("agent_cognition"),
1310
- content: /* @__PURE__ */ P()
1311
- }), ar = /* @__PURE__ */ U({
1312
- type: /* @__PURE__ */ ae("chat_closed_expired"),
1313
- content: /* @__PURE__ */ P()
1314
- }), ir = /* @__PURE__ */ U({
1315
- type: /* @__PURE__ */ ae("agent_captured_url"),
1316
- content: /* @__PURE__ */ P()
1317
- }), sr = /* @__PURE__ */ U({
1318
- type: /* @__PURE__ */ ae("agent_topic"),
1319
- content: /* @__PURE__ */ P()
1320
- }), lr = /* @__PURE__ */ U({
1321
- type: /* @__PURE__ */ ae("agent_summary"),
1322
- content: /* @__PURE__ */ P()
1323
- }), cr = /* @__PURE__ */ U({
1324
- type: /* @__PURE__ */ ae("chat_rating"),
1325
- content: /* @__PURE__ */ P()
1326
- }), dr = /* @__PURE__ */ U({
1327
- type: /* @__PURE__ */ ae("breadcrumb"),
1328
- content: /* @__PURE__ */ P()
1329
- }), ur = /* @__PURE__ */ U({
1330
- type: /* @__PURE__ */ ae("chat_escalated"),
1331
- content: /* @__PURE__ */ Xo()
1332
- }), hr = /* @__PURE__ */ U({
1333
- type: /* @__PURE__ */ ae("error"),
1334
- code: /* @__PURE__ */ P()
1335
- }), pr = /* @__PURE__ */ U({
1336
- message_id: /* @__PURE__ */ Ye(/* @__PURE__ */ P()),
1337
- created_at: /* @__PURE__ */ P(),
1338
- data: rr
1339
- }), gr = /* @__PURE__ */ U({
1340
- created_at: /* @__PURE__ */ P(),
1341
- data: hr
1342
- }), fr = /* @__PURE__ */ U({
1343
- created_at: /* @__PURE__ */ P(),
1344
- data: nr
1346
+ pe({ jitless: !0 });
1347
+ const fr = /* @__PURE__ */ U({
1348
+ type: /* @__PURE__ */ se("utterance"),
1349
+ content: /* @__PURE__ */ z(),
1350
+ role: /* @__PURE__ */ z()
1345
1351
  }), mr = /* @__PURE__ */ U({
1346
- message_id: /* @__PURE__ */ Ye(/* @__PURE__ */ P()),
1347
- created_at: /* @__PURE__ */ P(),
1348
- data: ar
1349
- }), wr = /* @__PURE__ */ U({
1350
- created_at: /* @__PURE__ */ P(),
1351
- data: ir
1352
+ type: /* @__PURE__ */ se("agent_cognition"),
1353
+ content: /* @__PURE__ */ z()
1352
1354
  }), br = /* @__PURE__ */ U({
1353
- created_at: /* @__PURE__ */ P(),
1354
- data: sr
1355
+ type: /* @__PURE__ */ se("chat_closed_expired"),
1356
+ content: /* @__PURE__ */ z()
1355
1357
  }), vr = /* @__PURE__ */ U({
1356
- created_at: /* @__PURE__ */ P(),
1357
- data: lr
1358
+ type: /* @__PURE__ */ se("agent_captured_url"),
1359
+ content: /* @__PURE__ */ z()
1360
+ }), wr = /* @__PURE__ */ U({
1361
+ type: /* @__PURE__ */ se("agent_topic"),
1362
+ content: /* @__PURE__ */ z()
1358
1363
  }), qr = /* @__PURE__ */ U({
1359
- created_at: /* @__PURE__ */ P(),
1360
- data: cr
1364
+ type: /* @__PURE__ */ se("agent_summary"),
1365
+ content: /* @__PURE__ */ z()
1361
1366
  }), yr = /* @__PURE__ */ U({
1362
- created_at: /* @__PURE__ */ P(),
1363
- data: dr
1367
+ type: /* @__PURE__ */ se("chat_rating"),
1368
+ content: /* @__PURE__ */ z()
1364
1369
  }), xr = /* @__PURE__ */ U({
1365
- message_id: /* @__PURE__ */ Ye(/* @__PURE__ */ P()),
1366
- created_at: /* @__PURE__ */ P(),
1367
- data: ur
1368
- }), kr = /* @__PURE__ */ er([
1369
- pr,
1370
- gr,
1371
- fr,
1372
- wr,
1373
- br,
1374
- vr,
1375
- mr,
1376
- qr,
1377
- yr,
1378
- xr
1379
- ]), _r = 500, Cr = 3e4, Sr = 6e4;
1380
- function Ir({
1381
- chatSettings: e,
1382
- chatId: t,
1370
+ type: /* @__PURE__ */ se("breadcrumb"),
1371
+ content: /* @__PURE__ */ z()
1372
+ }), kr = /* @__PURE__ */ U({
1373
+ type: /* @__PURE__ */ se("chat_escalated"),
1374
+ content: /* @__PURE__ */ lr()
1375
+ }), _r = /* @__PURE__ */ U({
1376
+ type: /* @__PURE__ */ se("error"),
1377
+ code: /* @__PURE__ */ z()
1378
+ }), Cr = /* @__PURE__ */ U({
1379
+ message_id: /* @__PURE__ */ et(/* @__PURE__ */ z()),
1380
+ created_at: /* @__PURE__ */ z(),
1381
+ data: fr
1382
+ }), Sr = /* @__PURE__ */ U({
1383
+ created_at: /* @__PURE__ */ z(),
1384
+ data: _r
1385
+ }), Ir = /* @__PURE__ */ U({
1386
+ created_at: /* @__PURE__ */ z(),
1387
+ data: mr
1388
+ }), zr = /* @__PURE__ */ U({
1389
+ message_id: /* @__PURE__ */ et(/* @__PURE__ */ z()),
1390
+ created_at: /* @__PURE__ */ z(),
1391
+ data: br
1392
+ }), Er = /* @__PURE__ */ U({
1393
+ created_at: /* @__PURE__ */ z(),
1394
+ data: vr
1395
+ }), Rr = /* @__PURE__ */ U({
1396
+ created_at: /* @__PURE__ */ z(),
1397
+ data: wr
1398
+ }), Tr = /* @__PURE__ */ U({
1399
+ created_at: /* @__PURE__ */ z(),
1400
+ data: qr
1401
+ }), Pr = /* @__PURE__ */ U({
1402
+ created_at: /* @__PURE__ */ z(),
1403
+ data: yr
1404
+ }), Mr = /* @__PURE__ */ U({
1405
+ created_at: /* @__PURE__ */ z(),
1406
+ data: xr
1407
+ }), Or = /* @__PURE__ */ U({
1408
+ message_id: /* @__PURE__ */ et(/* @__PURE__ */ z()),
1409
+ created_at: /* @__PURE__ */ z(),
1410
+ data: kr
1411
+ }), Ar = /* @__PURE__ */ ur([
1412
+ Cr,
1413
+ Sr,
1414
+ Ir,
1415
+ Er,
1416
+ Rr,
1417
+ Tr,
1418
+ zr,
1419
+ Pr,
1420
+ Mr,
1421
+ Or
1422
+ ]), Ur = /* @__PURE__ */ U({
1423
+ url: /* @__PURE__ */ z(),
1424
+ mimeType: /* @__PURE__ */ se(Et),
1425
+ name: /* @__PURE__ */ z()
1426
+ }), jr = /* @__PURE__ */ U({
1427
+ data: Ur
1428
+ }), Dr = /* @__PURE__ */ U({
1429
+ data: /* @__PURE__ */ U({ urls: /* @__PURE__ */ hr(/* @__PURE__ */ z(), /* @__PURE__ */ z()) })
1430
+ }), $r = 500, Br = 3e4, Nr = 6e4;
1431
+ function Lr({
1432
+ chatSettings: t,
1433
+ chatId: e,
1383
1434
  messages: o,
1384
1435
  onMessage: r,
1385
1436
  onCognition: n,
1386
- onCognitionComplete: a,
1387
- onError: c,
1437
+ onCognitionComplete: i,
1438
+ onError: d,
1388
1439
  onChatClosed: s,
1389
- onAgentCapturedUrl: l,
1390
- onAgentTopic: i,
1391
- onAgentSummary: d,
1392
- onRatingRequest: h,
1440
+ onAgentCapturedUrl: c,
1441
+ onAgentTopic: a,
1442
+ onAgentSummary: l,
1443
+ onRatingRequest: g,
1393
1444
  onBreadcrumb: u,
1394
- fetchHistory: p,
1395
- getChatToken: g,
1396
- backupPollingInterval: f = Sr
1445
+ fetchHistory: h,
1446
+ getChatToken: p,
1447
+ backupPollingInterval: f = Nr
1397
1448
  }) {
1398
- const q = L(/* @__PURE__ */ new Set());
1399
- Z(() => {
1400
- for (const M of o)
1401
- M.id && q.current.add(M.id);
1449
+ const x = V(/* @__PURE__ */ new Set());
1450
+ W(() => {
1451
+ for (const D of o)
1452
+ D.id && x.current.add(D.id);
1402
1453
  }, [o]);
1403
- const m = L(null), E = L(null), O = L(0), x = L(null), C = L(null), I = L(!1), w = L(!1), v = V(r), z = V(n), Q = V(a), T = V(c), A = V(s), $ = V(l), J = V(i), H = V(d), B = V(h), N = V(u), F = V(p), k = V(g), { publishError: R } = Ae(), K = e?.app_sync_url, S = e?.app_sync_api_key, j = !!(K && S), D = V(K), G = V(S), ie = y(() => {
1404
- m.current && (m.current.close(), m.current = null);
1405
- }, []), he = y(() => {
1406
- C.current && (clearInterval(C.current), C.current = null);
1407
- }, []), se = y(() => {
1408
- x.current && (clearTimeout(x.current), x.current = null);
1409
- }, []), pe = L(() => {
1410
- }), le = y(
1411
- async (M) => {
1412
- ie();
1413
- const ee = D.current, Y = G.current;
1414
- if (!ee || !Y)
1454
+ const b = V(null), R = V(null), O = V(0), _ = V(null), I = V(null), E = V(!1), w = V(!1), y = Y(r), T = Y(n), oe = Y(i), P = Y(d), $ = Y(s), L = Y(c), G = Y(a), H = Y(l), Z = Y(g), j = Y(u), F = Y(h), J = Y(p), { publishError: X } = je(), ne = t?.app_sync_url, ee = t?.app_sync_api_key, m = !!(ne && ee), k = Y(ne), C = Y(ee), A = v(() => {
1455
+ b.current && (b.current.close(), b.current = null);
1456
+ }, []), B = v(() => {
1457
+ I.current && (clearInterval(I.current), I.current = null);
1458
+ }, []), M = v(() => {
1459
+ _.current && (clearTimeout(_.current), _.current = null);
1460
+ }, []), N = V(() => {
1461
+ }), ae = v(
1462
+ async (D) => {
1463
+ A();
1464
+ const re = k.current, te = C.current;
1465
+ if (!re || !te)
1415
1466
  throw new Error("Cannot connect: AppSync settings not available");
1416
- const Te = k.current(), $e = await oo({
1417
- httpEndpoint: ee,
1418
- auth: Te ? { authorizationToken: Te } : { apiKey: Y },
1419
- channel: `/default/chat/${M}`,
1467
+ const Re = J.current(), Be = await po({
1468
+ httpEndpoint: re,
1469
+ auth: Re ? { authorizationToken: Re } : { apiKey: te },
1470
+ channel: `/default/chat/${D}`,
1420
1471
  onDisconnect: () => {
1421
- m.current = null, pe.current();
1472
+ b.current = null, N.current();
1422
1473
  },
1423
- onEvent: (Be) => {
1424
- const me = kr.safeParse(Be);
1425
- if (!me.success) {
1426
- console.error("Invalid conversation response:", me.error);
1474
+ onEvent: (Ne) => {
1475
+ const we = Ar.safeParse(Ne);
1476
+ if (!we.success) {
1477
+ console.error("Invalid conversation response:", we.error);
1427
1478
  return;
1428
1479
  }
1429
- const oe = me.data;
1430
- switch (oe.data.type) {
1480
+ const le = we.data;
1481
+ switch (le.data.type) {
1431
1482
  case "utterance": {
1432
- const X = oe, te = X.message_id ?? crypto.randomUUID();
1433
- if (q.current.has(te))
1483
+ const Q = le, ie = Q.message_id ?? crypto.randomUUID();
1484
+ if (x.current.has(ie))
1434
1485
  return;
1435
- q.current.add(te), Q.current(), v.current(
1486
+ x.current.add(ie), oe.current(), y.current(
1436
1487
  {
1437
- message_id: te,
1488
+ message_id: ie,
1438
1489
  response: {
1439
- id: te,
1440
- type: X.data.type,
1441
- content: X.data.content
1490
+ id: ie,
1491
+ type: Q.data.type,
1492
+ content: Q.data.content
1442
1493
  }
1443
1494
  },
1444
- M
1495
+ D
1445
1496
  );
1446
1497
  return;
1447
1498
  }
1448
1499
  case "error": {
1449
- const te = parseInt(oe.data.code);
1450
- R({ code: te, message: Ct(te) }), T.current?.();
1500
+ const ie = parseInt(le.data.code);
1501
+ X({ code: ie, message: Rt(ie) }), P.current?.();
1451
1502
  return;
1452
1503
  }
1453
1504
  case "agent_cognition": {
1454
- const X = oe;
1455
- z.current(X.data.content);
1505
+ const Q = le;
1506
+ T.current(Q.data.content);
1456
1507
  return;
1457
1508
  }
1458
1509
  case "agent_captured_url": {
1459
- const X = oe;
1460
- $.current?.(X.data.content);
1510
+ const Q = le;
1511
+ L.current?.(Q.data.content);
1461
1512
  return;
1462
1513
  }
1463
1514
  case "agent_topic": {
1464
- const X = oe;
1465
- J.current?.(X.data.content);
1515
+ const Q = le;
1516
+ G.current?.(Q.data.content);
1466
1517
  return;
1467
1518
  }
1468
1519
  case "agent_summary": {
1469
- const X = oe;
1470
- H.current?.(X.data.content);
1520
+ const Q = le;
1521
+ H.current?.(Q.data.content);
1471
1522
  return;
1472
1523
  }
1473
1524
  case "chat_closed_expired": {
1474
- A.current?.(), B.current?.();
1525
+ $.current?.(), Z.current?.();
1475
1526
  return;
1476
1527
  }
1477
1528
  case "chat_rating": {
1478
- B.current?.();
1529
+ Z.current?.();
1479
1530
  return;
1480
1531
  }
1481
1532
  case "breadcrumb": {
1482
- N.current?.();
1533
+ j.current?.();
1483
1534
  return;
1484
1535
  }
1485
1536
  case "chat_escalated": {
1486
- A.current?.(), B.current?.();
1537
+ $.current?.(), Z.current?.();
1487
1538
  return;
1488
1539
  }
1489
1540
  default:
1490
1541
  console.warn(
1491
1542
  "Unknown notification type:",
1492
- oe.data.type
1543
+ le.data.type
1493
1544
  );
1494
1545
  }
1495
1546
  }
1496
1547
  });
1497
- m.current = $e;
1548
+ b.current = Be;
1498
1549
  },
1499
1550
  // The *Ref entries are latest-refs (stable identities); listed to satisfy
1500
1551
  // exhaustive-deps, which can't see that useLatestRef returns a ref.
1501
1552
  [
1502
- ie,
1503
- R,
1504
- D,
1505
- G,
1553
+ A,
1554
+ X,
1506
1555
  k,
1507
- v,
1508
- z,
1509
- Q,
1556
+ C,
1557
+ J,
1558
+ y,
1510
1559
  T,
1511
- A,
1560
+ oe,
1561
+ P,
1512
1562
  $,
1513
- J,
1563
+ L,
1564
+ G,
1514
1565
  H,
1515
- B,
1516
- N
1566
+ Z,
1567
+ j
1517
1568
  ]
1518
- ), ce = y(
1519
- async (M) => {
1569
+ ), ue = v(
1570
+ async (D) => {
1520
1571
  try {
1521
- const ee = await F.current(M);
1522
- for (const Y of ee)
1523
- Y.role !== "assistant" || !Y.message_id || q.current.has(Y.message_id) || (q.current.add(Y.message_id), v.current(
1524
- { message_id: Y.message_id, response: Y.response },
1525
- M
1572
+ const re = await F.current(D);
1573
+ for (const te of re)
1574
+ te.role !== "assistant" || !te.message_id || x.current.has(te.message_id) || (x.current.add(te.message_id), y.current(
1575
+ { message_id: te.message_id, response: te.response },
1576
+ D
1526
1577
  ));
1527
- } catch (ee) {
1528
- console.warn("Backup poll failed:", ee);
1578
+ } catch (re) {
1579
+ console.warn("Backup poll failed:", re);
1529
1580
  }
1530
1581
  },
1531
- [F, v]
1532
- ), ve = y(
1533
- (M) => {
1534
- he(), C.current = setInterval(
1535
- () => ce(M),
1582
+ [F, y]
1583
+ ), qe = v(
1584
+ (D) => {
1585
+ B(), I.current = setInterval(
1586
+ () => ue(D),
1536
1587
  f
1537
1588
  );
1538
1589
  },
1539
- [he, ce, f]
1540
- ), qe = y(
1541
- function M() {
1542
- if (!I.current || w.current || x.current)
1590
+ [B, ue, f]
1591
+ ), ye = v(
1592
+ function D() {
1593
+ if (!E.current || w.current || _.current)
1543
1594
  return;
1544
- const ee = E.current;
1545
- if (!ee) return;
1546
- const Y = Math.min(
1547
- _r * Math.pow(2, O.current),
1548
- Cr
1595
+ const re = R.current;
1596
+ if (!re) return;
1597
+ const te = Math.min(
1598
+ $r * Math.pow(2, O.current),
1599
+ Br
1549
1600
  );
1550
- O.current += 1, x.current = setTimeout(async () => {
1551
- x.current = null, w.current = !0;
1601
+ O.current += 1, _.current = setTimeout(async () => {
1602
+ _.current = null, w.current = !0;
1552
1603
  try {
1553
- await le(ee), O.current = 0, w.current = !1, await ce(ee);
1604
+ await ae(re), O.current = 0, w.current = !1, await ue(re);
1554
1605
  } catch {
1555
- w.current = !1, M();
1606
+ w.current = !1, D();
1556
1607
  }
1557
- }, Y);
1608
+ }, te);
1558
1609
  },
1559
- [le, ce]
1610
+ [ae, ue]
1560
1611
  );
1561
- Z(() => {
1562
- pe.current = qe;
1612
+ W(() => {
1613
+ N.current = ye;
1563
1614
  });
1564
- const ye = y(
1565
- async (M) => {
1566
- if (!j || !M)
1615
+ const xe = v(
1616
+ async (D) => {
1617
+ if (!m || !D)
1567
1618
  throw new Error(
1568
1619
  "Cannot connect: AppSync settings not ready or missing chatId"
1569
1620
  );
1570
- se(), I.current = !0, E.current = M, O.current = 0, ve(M), await le(M);
1621
+ M(), E.current = !0, R.current = D, O.current = 0, qe(D), await ae(D);
1571
1622
  },
1572
- [j, se, le, ve]
1573
- ), xe = y(() => {
1574
- I.current = !1, E.current = null, O.current = 0, se(), he(), ie();
1575
- }, [se, he, ie]), De = y(() => {
1576
- q.current.clear();
1623
+ [m, M, ae, qe]
1624
+ ), ke = v(() => {
1625
+ E.current = !1, R.current = null, O.current = 0, M(), B(), A();
1626
+ }, [M, B, A]), $e = v(() => {
1627
+ x.current.clear();
1577
1628
  }, []);
1578
- return Z(() => {
1579
- !t || !j || E.current === t || ye(t).catch((M) => {
1580
- console.error("Failed to eagerly connect:", M), E.current = t, I.current = !0, pe.current();
1629
+ return W(() => {
1630
+ !e || !m || R.current === e || xe(e).catch((D) => {
1631
+ console.error("Failed to eagerly connect:", D), R.current = e, E.current = !0, N.current();
1581
1632
  });
1582
- }, [t, j, ye]), Z(() => () => {
1583
- xe();
1584
- }, [xe]), { connect: ye, disconnect: xe, clearProcessedIds: De };
1633
+ }, [e, m, xe]), W(() => () => {
1634
+ ke();
1635
+ }, [ke]), { connect: xe, disconnect: ke, clearProcessedIds: $e };
1585
1636
  }
1586
- function Er(e) {
1637
+ function Zr(t) {
1587
1638
  return {
1588
- id: e.message_id,
1589
- content: e.response.content ?? "",
1639
+ id: t.message_id,
1640
+ content: t.response.content ?? "",
1590
1641
  sender: "assistant",
1591
1642
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
1592
1643
  };
1593
1644
  }
1594
- function zr(e) {
1645
+ function Kr(t) {
1595
1646
  return {
1596
1647
  id: crypto.randomUUID(),
1597
- content: e,
1648
+ content: t,
1598
1649
  sender: "assistant",
1599
1650
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
1600
1651
  isWelcomeMessage: !0
1601
1652
  };
1602
1653
  }
1603
- function Tr() {
1654
+ function Hr() {
1604
1655
  return {
1605
1656
  id: crypto.randomUUID(),
1606
1657
  content: "",
@@ -1609,7 +1660,7 @@ function Tr() {
1609
1660
  isRatingRequest: !0
1610
1661
  };
1611
1662
  }
1612
- function Rr() {
1663
+ function Vr() {
1613
1664
  return {
1614
1665
  id: crypto.randomUUID(),
1615
1666
  content: "This conversation is closed, please start a new chat.",
@@ -1617,190 +1668,271 @@ function Rr() {
1617
1668
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
1618
1669
  };
1619
1670
  }
1620
- function Or({
1621
- appId: e,
1622
- userId: t,
1671
+ function Wr(t, e) {
1672
+ return {
1673
+ ...t,
1674
+ id: crypto.randomUUID(),
1675
+ isNew: !0,
1676
+ ...e.length > 0 ? {
1677
+ attachments: e.map(
1678
+ ({ file: o, mimeType: r, previewUrl: n }) => ({
1679
+ url: n,
1680
+ mimeType: r,
1681
+ name: o.name,
1682
+ uploadProgress: 0
1683
+ })
1684
+ )
1685
+ } : {}
1686
+ };
1687
+ }
1688
+ function Fr(t, e, o) {
1689
+ return t.map(
1690
+ (r) => r.id === e ? o(r) : r
1691
+ );
1692
+ }
1693
+ function Jr(t, e, o) {
1694
+ return {
1695
+ ...t,
1696
+ attachments: t.attachments?.map(
1697
+ (r, n) => n === e ? { ...r, uploadProgress: o } : r
1698
+ )
1699
+ };
1700
+ }
1701
+ function Yr(t, e) {
1702
+ return t.flatMap((o) => o.id !== e ? [o] : o.content ? [{ ...o, attachments: void 0 }] : []);
1703
+ }
1704
+ function Gr({
1705
+ appId: t,
1706
+ userId: e,
1623
1707
  userName: o,
1624
1708
  userData: r,
1625
1709
  externalId: n,
1626
- deviceId: a,
1627
- apiClient: c,
1710
+ deviceId: i,
1711
+ apiClient: d,
1628
1712
  chatSettings: s,
1629
- messages: l,
1630
- setMessages: i,
1631
- currentChat: d,
1632
- setCurrentChat: h,
1713
+ messages: c,
1714
+ setMessages: a,
1715
+ currentChat: l,
1716
+ setCurrentChat: g,
1633
1717
  onChatClosed: u,
1634
- isChatClosed: p
1718
+ isChatClosed: h
1635
1719
  }) {
1636
- const { saveChatData: g, clearChatData: f, updateLastActivity: q, markChatClosed: m } = Xe({
1637
- appId: e
1638
- }), { publishApiError: E, publishNetworkError: O } = Ae(), { showCognition: x, hideCognition: C } = St(), I = V(c), w = y(
1639
- (k, R) => {
1640
- k.response.content && i((K) => {
1641
- if (K.some((D) => D.isRatingRequest) || s?.welcome_message && k.response.content === s.welcome_message)
1642
- return K;
1643
- const j = [
1644
- ...K.filter((D) => !D.isThinking),
1645
- Er(k)
1720
+ const { saveChatData: p, clearChatData: f, updateLastActivity: x, markChatClosed: b } = Qe({
1721
+ appId: t
1722
+ }), { publishApiError: R, publishNetworkError: O } = je(), { showCognition: _, hideCognition: I } = Tt(), E = Y(d), w = v(
1723
+ (m, k) => {
1724
+ m.response.content && a((C) => {
1725
+ if (C.some((M) => M.isRatingRequest) || s?.welcome_message && m.response.content === s.welcome_message)
1726
+ return C;
1727
+ const B = [
1728
+ ...C.filter((M) => !M.isThinking),
1729
+ Zr(m)
1646
1730
  ];
1647
- return g(
1648
- R,
1649
- t,
1650
- j,
1651
- a,
1652
- I.current?.getChatToken()
1653
- ), j;
1731
+ return p(
1732
+ k,
1733
+ e,
1734
+ B,
1735
+ i,
1736
+ E.current?.getChatToken()
1737
+ ), B;
1654
1738
  });
1655
1739
  },
1656
- [s, a, g, i, t, I]
1657
- ), v = y(() => {
1658
- C(), i((k) => k.filter((R) => !R.isThinking));
1659
- }, [i, C]), z = y(() => {
1660
- i((k) => [...k.filter((K) => !K.isRatingRequest), Tr()]);
1661
- }, [i]);
1662
- Z(() => {
1663
- }, [z]);
1664
- const Q = y(
1665
- (k) => I.current ? I.current.getChatHistory(k) : Promise.resolve([]),
1666
- [I]
1667
- ), T = y(() => I.current?.getChatToken() ?? null, [I]), A = y(() => {
1668
- m(), u?.();
1669
- }, [m, u]), { connect: $, disconnect: J, clearProcessedIds: H } = Ir({
1740
+ [s, i, p, a, e, E]
1741
+ ), y = v(() => {
1742
+ I(), a((m) => m.filter((k) => !k.isThinking));
1743
+ }, [a, I]), T = v(() => {
1744
+ a((m) => [...m.filter((C) => !C.isRatingRequest), Hr()]);
1745
+ }, [a]);
1746
+ W(() => {
1747
+ }, [T]);
1748
+ const oe = v(
1749
+ (m) => E.current ? E.current.getChatHistory(m) : Promise.resolve([]),
1750
+ [E]
1751
+ ), P = v(() => E.current?.getChatToken() ?? null, [E]), $ = v(() => {
1752
+ b(), u?.();
1753
+ }, [b, u]), { connect: L, disconnect: G, clearProcessedIds: H } = Lr({
1670
1754
  chatSettings: s,
1671
- chatId: d?.id ?? null,
1672
- messages: l,
1755
+ chatId: l?.id ?? null,
1756
+ messages: c,
1673
1757
  onMessage: w,
1674
- onCognition: x,
1675
- onCognitionComplete: C,
1676
- onError: v,
1677
- onChatClosed: A,
1678
- onRatingRequest: z,
1679
- onBreadcrumb: A,
1680
- fetchHistory: Q,
1681
- getChatToken: T
1682
- }), B = y(() => {
1683
- C(), J(), H(), i(
1684
- (k) => k.filter((R) => Array.isArray(R) ? !1 : R.isWelcomeMessage)
1685
- ), f(), h(null);
1758
+ onCognition: _,
1759
+ onCognitionComplete: I,
1760
+ onError: y,
1761
+ onChatClosed: $,
1762
+ onRatingRequest: T,
1763
+ onBreadcrumb: $,
1764
+ fetchHistory: oe,
1765
+ getChatToken: P
1766
+ }), Z = v(() => {
1767
+ I(), G(), H(), Pt(c), a(
1768
+ (m) => m.filter((k) => Array.isArray(k) ? !1 : k.isWelcomeMessage)
1769
+ ), f(), g(null);
1686
1770
  }, [
1687
- C,
1688
- J,
1771
+ I,
1772
+ G,
1689
1773
  H,
1774
+ c,
1690
1775
  f,
1691
- i,
1692
- h
1693
- ]), N = y(
1694
- async (k) => {
1695
- if (!c || l.some((S) => S.isRatingRequest)) return;
1696
- if (p) {
1697
- i((S) => [...S, Rr()]);
1776
+ a,
1777
+ g
1778
+ ]), j = v(
1779
+ (m, k) => a((C) => Fr(C, m, k)),
1780
+ [a]
1781
+ ), F = v(
1782
+ async (m) => {
1783
+ const k = await m.createConversation({
1784
+ userId: n || e,
1785
+ deviceId: i,
1786
+ userName: o,
1787
+ userData: r,
1788
+ externalMetadata: {
1789
+ searchParams: eo()
1790
+ }
1791
+ });
1792
+ g({ id: k.chat_id });
1793
+ try {
1794
+ await L(k.chat_id);
1795
+ } catch (C) {
1796
+ console.warn(
1797
+ "Failed to connect realtime channel, continuing with REST-only delivery:",
1798
+ C
1799
+ );
1800
+ }
1801
+ return k.chat_id;
1802
+ },
1803
+ [n, e, i, o, r, g, L]
1804
+ ), J = v(
1805
+ (m, k, C, A) => Promise.all(
1806
+ C.map(
1807
+ ({ file: B }, M) => m.uploadAttachment({
1808
+ conversationId: k,
1809
+ file: B,
1810
+ onProgress: (N) => j(
1811
+ A,
1812
+ (ae) => Jr(ae, M, N)
1813
+ )
1814
+ }).catch((N) => {
1815
+ throw Mt(N, B.name);
1816
+ })
1817
+ )
1818
+ ),
1819
+ [j]
1820
+ ), X = v(
1821
+ (m, k, C, A) => {
1822
+ I(), A && a((M) => Yr(M, C)), a((M) => M.filter((N) => !N.isThinking));
1823
+ const B = () => j(C, (M) => ({ ...M, isFailed: !0 }));
1824
+ if (m instanceof Ot) {
1825
+ B();
1698
1826
  return;
1699
1827
  }
1700
- const R = {
1701
- ...k,
1702
- id: crypto.randomUUID(),
1703
- isNew: !0
1704
- };
1705
- x();
1706
- const K = [...l, R];
1707
- i(K), q();
1828
+ if (m instanceof Xe || m instanceof Oe && m.status === 403) {
1829
+ O();
1830
+ return;
1831
+ }
1832
+ R(m), m instanceof Oe && // A 401 means an expired or closed chat token: drop the session so
1833
+ // the next send starts a fresh one, as for a client-side expiry.
1834
+ (m.status >= 500 || m.status === 401) ? (g(null), f(), a((M) => M.filter((N) => N.id !== C)), k.reset()) : B();
1835
+ },
1836
+ [
1837
+ I,
1838
+ a,
1839
+ j,
1840
+ O,
1841
+ R,
1842
+ g,
1843
+ f
1844
+ ]
1845
+ ), ne = v(
1846
+ async (m, k = []) => {
1847
+ if (!d || c.some((A) => A.isRatingRequest)) return;
1848
+ if (h) {
1849
+ a((A) => [...A, Vr()]);
1850
+ return;
1851
+ }
1852
+ const C = Wr(m, k);
1853
+ _(), a([...c, C]), x();
1708
1854
  try {
1709
- let S = d?.id;
1710
- if (!S) {
1711
- S = (await c.createConversation({
1712
- userId: n || t,
1713
- deviceId: a,
1714
- userName: o,
1715
- userData: r,
1716
- externalMetadata: {
1717
- searchParams: Kt()
1718
- }
1719
- })).chat_id, h({ id: S });
1720
- try {
1721
- await $(S);
1722
- } catch (G) {
1723
- console.warn(
1724
- "Failed to connect realtime channel, continuing with REST-only delivery:",
1725
- G
1726
- );
1727
- }
1728
- }
1729
- const j = await c.replyToConversation({
1730
- text: k.content,
1731
- conversationId: S,
1732
- userId: n || t,
1733
- deviceId: a,
1855
+ const A = l?.id || await F(d), B = await J(
1856
+ d,
1857
+ A,
1858
+ k,
1859
+ C.id
1860
+ );
1861
+ B.length > 0 && j(C.id, (N) => ({
1862
+ ...N,
1863
+ attachments: At(B, k)
1864
+ }));
1865
+ const M = await d.replyToConversation({
1866
+ text: m.content,
1867
+ attachments: B,
1868
+ conversationId: A,
1869
+ userId: n || e,
1870
+ deviceId: i,
1734
1871
  userName: o,
1735
1872
  userData: r
1736
1873
  });
1737
- i(
1738
- (D) => D.map(
1739
- (G) => G.id === R.id ? { ...G, id: j.message_id, isNew: !1 } : G
1740
- )
1741
- );
1742
- } catch (S) {
1743
- throw C(), i((j) => j.filter((D) => !D.isThinking)), S instanceof Ue || S instanceof ue && S.status === 403 ? (O(), S) : (E(S), S instanceof ue && // A 401 here means the chat's session token is invalid/expired
1744
- // (or the chat closed) — treat it the same as a client-side
1745
- // expired chat: drop the stale session and let the next send
1746
- // start a fresh one, instead of surfacing an error.
1747
- (S.status >= 500 || S.status === 401) ? (h(null), f(), i((j) => j.slice(0, -1)), c.reset()) : i(
1748
- (j) => j.map(
1749
- (D) => D.id === R.id ? { ...D, isFailed: !0 } : D
1750
- )
1751
- ), S);
1874
+ j(C.id, (N) => ({
1875
+ ...N,
1876
+ id: M.message_id,
1877
+ isNew: !1
1878
+ }));
1879
+ } catch (A) {
1880
+ throw X(
1881
+ A,
1882
+ d,
1883
+ C.id,
1884
+ k.length > 0
1885
+ ), A;
1752
1886
  }
1753
1887
  },
1754
1888
  [
1889
+ d,
1755
1890
  c,
1756
- p,
1891
+ h,
1892
+ a,
1893
+ _,
1757
1894
  x,
1758
- l,
1759
- i,
1760
- q,
1761
- d?.id,
1895
+ l?.id,
1896
+ F,
1897
+ J,
1898
+ j,
1899
+ X,
1762
1900
  n,
1763
- t,
1764
- a,
1765
- h,
1766
- $,
1767
- C,
1768
- E,
1769
- O,
1770
- f,
1901
+ e,
1902
+ i,
1771
1903
  o,
1772
1904
  r
1773
1905
  ]
1774
- ), F = y(
1775
- async (k) => {
1776
- const R = d?.id;
1777
- !I.current || !R || await I.current.addRating(R, k);
1906
+ ), ee = v(
1907
+ async (m) => {
1908
+ const k = l?.id;
1909
+ !E.current || !k || await E.current.addRating(k, m);
1778
1910
  },
1779
- [d?.id, I]
1911
+ [l?.id, E]
1780
1912
  );
1781
1913
  return {
1782
- onCleanMessages: B,
1783
- onSendMessage: N,
1784
- onRateChat: F
1914
+ onCleanMessages: Z,
1915
+ onSendMessage: ne,
1916
+ onRateChat: ee
1785
1917
  };
1786
1918
  }
1787
- const Pr = { 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" };
1788
- function wt(e) {
1789
- return typeof window > "u" || typeof import.meta > "u" ? "" : Pr[e] || "";
1919
+ const Xr = { 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" };
1920
+ function qt(t) {
1921
+ return typeof window > "u" || typeof import.meta > "u" ? "" : Xr[t] || "";
1790
1922
  }
1791
- const Mr = wt("VITE_API_URL"), Ar = wt("VITE_REGION_API_URL");
1792
- function Ur() {
1793
- return Mr || "";
1923
+ const Qr = qt("VITE_API_URL"), en = qt("VITE_REGION_API_URL");
1924
+ function tn() {
1925
+ return Qr || "";
1794
1926
  }
1795
- function jr() {
1796
- return Ar || "";
1927
+ function on() {
1928
+ return en || "";
1797
1929
  }
1798
- class Dr {
1930
+ class rn {
1799
1931
  httpClient;
1800
1932
  userId = null;
1801
1933
  conversationId = null;
1802
- constructor(t) {
1803
- this.userId = t.userId || null, this.httpClient = new Ht(t);
1934
+ constructor(e) {
1935
+ this.userId = e.userId || null, this.httpClient = new Ut(e);
1804
1936
  }
1805
1937
  getUserData() {
1806
1938
  return {
@@ -1814,22 +1946,22 @@ class Dr {
1814
1946
  reset() {
1815
1947
  this.conversationId = null, this.httpClient.setChatToken(null);
1816
1948
  }
1817
- setRegion(t) {
1818
- this.httpClient.setRegion(t);
1949
+ setRegion(e) {
1950
+ this.httpClient.setRegion(e);
1819
1951
  }
1820
1952
  getChatToken() {
1821
1953
  return this.httpClient.getChatToken();
1822
1954
  }
1823
- setChatToken(t) {
1824
- this.httpClient.setChatToken(t);
1955
+ setChatToken(e) {
1956
+ this.httpClient.setChatToken(e);
1825
1957
  }
1826
1958
  /**
1827
1959
  * Get organization data by app ID
1828
1960
  */
1829
- async getOrganizationByAppId(t) {
1830
- const o = jr();
1961
+ async getOrganizationByAppId(e) {
1962
+ const o = on();
1831
1963
  return await this.httpClient.getExternal(
1832
- `${o}/by-app-id/${t}`
1964
+ `${o}/by-app-id/${e}`
1833
1965
  );
1834
1966
  }
1835
1967
  async boot() {
@@ -1837,125 +1969,136 @@ class Dr {
1837
1969
  "/v1/sdk/boot"
1838
1970
  )).data;
1839
1971
  }
1840
- async addRating(t, o) {
1841
- return (await this.httpClient.put(`/v1/chat/${t}/rating`, { rating: o })).data;
1972
+ async addRating(e, o) {
1973
+ return (await this.httpClient.put(`/v1/chat/${e}/rating`, { rating: o })).data;
1842
1974
  }
1843
- async createConversation(t) {
1975
+ async createConversation(e) {
1844
1976
  const o = await this.httpClient.post("/v2/chat", {
1845
1977
  user_data: {
1846
- user_id: t.userId,
1847
- device_id: t.deviceId,
1848
- user_name: t.userName,
1849
- external_id: t.externalId,
1850
- user_data: t.userData
1978
+ user_id: e.userId,
1979
+ device_id: e.deviceId,
1980
+ user_name: e.userName,
1981
+ external_id: e.externalId,
1982
+ user_data: e.userData
1851
1983
  },
1852
- ...t.externalMetadata && Object.keys(t.externalMetadata).length > 0 ? { external_metadata: t.externalMetadata } : {}
1984
+ ...e.externalMetadata && Object.keys(e.externalMetadata).length > 0 ? { external_metadata: e.externalMetadata } : {}
1853
1985
  }), { data: r } = o;
1854
1986
  return this.httpClient.setChatToken(r.chat_token), r;
1855
1987
  }
1856
- async replyToConversation(t) {
1988
+ async replyToConversation(e) {
1857
1989
  const o = {
1858
- text: t.text,
1990
+ ...e.text ? { text: e.text } : {},
1991
+ ...e.attachments?.length ? { attachments: e.attachments } : {},
1859
1992
  user_data: {
1860
- device_id: t.deviceId,
1861
- user_id: t.userId,
1862
- user_name: t.userName,
1863
- user_data: t.userData
1993
+ device_id: e.deviceId,
1994
+ user_id: e.userId,
1995
+ user_name: e.userName,
1996
+ user_data: e.userData
1864
1997
  }
1865
- }, { data: r } = await this.httpClient.post(`/v3/chat/${t.conversationId}`, o);
1998
+ }, { data: r } = await this.httpClient.post(`/v3/chat/${e.conversationId}`, o);
1866
1999
  return r;
1867
2000
  }
1868
- async identifyUser(t) {
2001
+ async uploadAttachment(e) {
2002
+ const o = new FormData();
2003
+ o.append("file", e.file);
2004
+ const r = await this.httpClient.upload(
2005
+ `/v1/chat/${e.conversationId}/attachments`,
2006
+ o,
2007
+ e.onProgress
2008
+ );
2009
+ return jr.parse(r).data;
2010
+ }
2011
+ async getAttachmentUrls(e, o) {
2012
+ const r = await this.httpClient.post(
2013
+ `/v1/chat/${e}/attachments/urls`,
2014
+ { urls: o }
2015
+ );
2016
+ return Dr.parse(r).data.urls;
2017
+ }
2018
+ async identifyUser(e) {
1869
2019
  const o = {
1870
- device_id: t.deviceId,
1871
- user_id: t.userId,
1872
- user_name: t.userName,
1873
- external_id: t.externalId,
1874
- user_data: t.userData
1875
- }, { data: r } = await this.httpClient.post(`/v1/chat/${t.conversationId}/identify`, o);
2020
+ device_id: e.deviceId,
2021
+ user_id: e.userId,
2022
+ user_name: e.userName,
2023
+ external_id: e.externalId,
2024
+ user_data: e.userData
2025
+ }, { data: r } = await this.httpClient.post(`/v1/chat/${e.conversationId}/identify`, o);
1876
2026
  return r;
1877
2027
  }
1878
- async getChatHistory(t) {
2028
+ async getChatHistory(e) {
1879
2029
  return (await this.httpClient.get(
1880
- `/v1/chat/${t}/history`
2030
+ `/v1/chat/${e}/history`
1881
2031
  )).data;
1882
2032
  }
1883
2033
  }
1884
- async function dt(e) {
1885
- try {
1886
- return [await e, null];
1887
- } catch (t) {
1888
- return [null, t];
1889
- }
1890
- }
1891
- const $r = {
2034
+ const nn = {
1892
2035
  retries: 3,
1893
2036
  minDelayMs: 200,
1894
2037
  maxDelayMs: 1e3,
1895
2038
  factor: 2
1896
2039
  };
1897
- function Br(e) {
1898
- return e instanceof Ue ? !0 : e instanceof ue ? e.status === 429 || e.status >= 500 : !1;
2040
+ function an(t) {
2041
+ return t instanceof Xe ? !0 : t instanceof Oe ? t.status === 429 || t.status >= 500 : !1;
1899
2042
  }
1900
- function Nr(e, t) {
1901
- const o = t.minDelayMs * t.factor ** e, r = Math.min(o, t.maxDelayMs);
2043
+ function sn(t, e) {
2044
+ const o = e.minDelayMs * e.factor ** t, r = Math.min(o, e.maxDelayMs);
1902
2045
  return Math.random() * r;
1903
2046
  }
1904
- async function ut(e, t = {}) {
1905
- const o = { ...$r, ...t };
2047
+ async function gt(t, e = {}) {
2048
+ const o = { ...nn, ...e };
1906
2049
  for (let r = 0; ; r++)
1907
2050
  try {
1908
- return await e();
2051
+ return await t();
1909
2052
  } catch (n) {
1910
- if (r >= o.retries || !Br(n))
2053
+ if (r >= o.retries || !an(n))
1911
2054
  throw n;
1912
2055
  await new Promise(
1913
- (a) => setTimeout(a, Nr(r, o))
2056
+ (i) => setTimeout(i, sn(r, o))
1914
2057
  );
1915
2058
  }
1916
2059
  }
1917
- const Oe = /* @__PURE__ */ new Map(), Pe = /* @__PURE__ */ new Map();
1918
- function Lr(e, t, o) {
1919
- const r = o?.dedupe !== !1, [n, a] = _(
1920
- () => Oe.get(e)
1921
- ), { publishApiError: c, publishNetworkError: s } = Ae(), [l, i] = _(void 0), [d, h] = _(!1), u = L(!0);
1922
- L(() => (u.current = !0, () => {
2060
+ const Pe = /* @__PURE__ */ new Map(), Me = /* @__PURE__ */ new Map();
2061
+ function ln(t, e, o) {
2062
+ const r = o?.dedupe !== !1, [n, i] = S(
2063
+ () => Pe.get(t)
2064
+ ), { publishApiError: d, publishNetworkError: s } = je(), [c, a] = S(void 0), [l, g] = S(!1), u = V(!0);
2065
+ V(() => (u.current = !0, () => {
1923
2066
  u.current = !1;
1924
2067
  }));
1925
- const p = y(async () => {
1926
- if (Oe.has(e)) {
1927
- const g = Oe.get(e);
1928
- return a(g), g;
2068
+ const h = v(async () => {
2069
+ if (Pe.has(t)) {
2070
+ const p = Pe.get(t);
2071
+ return i(p), p;
1929
2072
  }
1930
- h(!0), i(void 0);
2073
+ g(!0), a(void 0);
1931
2074
  try {
1932
- if (r && Pe.has(e))
1933
- return await Pe.get(e);
1934
- const g = t();
1935
- r && Pe.set(e, g);
1936
- const f = await g;
1937
- return Oe.set(e, f), u.current && a(f), f;
1938
- } catch (g) {
1939
- throw g instanceof Ue || g instanceof ue && g.status === 403 ? s() : c(g), u.current && i(g), g;
2075
+ if (r && Me.has(t))
2076
+ return await Me.get(t);
2077
+ const p = e();
2078
+ r && Me.set(t, p);
2079
+ const f = await p;
2080
+ return Pe.set(t, f), u.current && i(f), f;
2081
+ } catch (p) {
2082
+ throw p instanceof Xe || p instanceof Oe && p.status === 403 ? s() : d(p), u.current && a(p), p;
1940
2083
  } finally {
1941
- Pe.delete(e), u.current && h(!1);
2084
+ Me.delete(t), u.current && g(!1);
1942
2085
  }
1943
- }, [e, r, t, c, s]);
1944
- return { data: n, error: l, isLoading: d, fetch: p };
1945
- }
1946
- function ht(e, t) {
1947
- const o = e?.deviceId || crypto.randomUUID();
1948
- return e?.userId ? e.externalId !== t ? { userId: e.userId, externalId: t, deviceId: o } : {
1949
- userId: e.userId,
1950
- externalId: e.externalId,
2086
+ }, [t, r, e, d, s]);
2087
+ return { data: n, error: c, isLoading: l, fetch: h };
2088
+ }
2089
+ function ft(t, e) {
2090
+ const o = t?.deviceId || crypto.randomUUID();
2091
+ return t?.userId ? t.externalId !== e ? { userId: t.userId, externalId: e, deviceId: o } : {
2092
+ userId: t.userId,
2093
+ externalId: t.externalId,
1951
2094
  deviceId: o
1952
- } : t ? { userId: t, externalId: t, deviceId: o } : { userId: crypto.randomUUID(), externalId: null, deviceId: o };
2095
+ } : e ? { userId: e, externalId: e, deviceId: o } : { userId: crypto.randomUUID(), externalId: null, deviceId: o };
1953
2096
  }
1954
- function Zr(e) {
1955
- const { appId: t, initialUserId: o } = e, { getSavedChatData: r } = Xe({ appId: t }), [n, a] = _(
1956
- () => ht(r(), o)
1957
- ), [c, s] = _(o);
1958
- return c !== o && (s(o), a(ht(r(), o))), {
2097
+ function cn(t) {
2098
+ const { appId: e, initialUserId: o } = t, { getSavedChatData: r } = Qe({ appId: e }), [n, i] = S(
2099
+ () => ft(r(), o)
2100
+ ), [d, s] = S(o);
2101
+ return d !== o && (s(o), i(ft(r(), o))), {
1959
2102
  // Identity is available synchronously; kept in the contract because
1960
2103
  // consumers (SDK boot) still key off it.
1961
2104
  isReady: !0,
@@ -1964,380 +2107,388 @@ function Zr(e) {
1964
2107
  externalId: n.externalId
1965
2108
  };
1966
2109
  }
1967
- function Hr({
1968
- apiUrl: e,
1969
- appId: t,
2110
+ function dn({
2111
+ apiUrl: t,
2112
+ appId: e,
1970
2113
  initialUserId: o,
1971
2114
  userName: r,
1972
2115
  userData: n
1973
2116
  }) {
1974
2117
  const {
1975
- userId: a,
1976
- externalId: c,
2118
+ userId: i,
2119
+ externalId: d,
1977
2120
  deviceId: s,
1978
- isReady: l
1979
- } = Zr({ appId: t, initialUserId: o }), { isChatExpired: i, clearChatData: d, getSavedChatData: h } = Xe({
1980
- appId: t
1981
- }), { current: u } = L(e || Ur()), [p] = _(
1982
- new Dr({
2121
+ isReady: c
2122
+ } = cn({ appId: e, initialUserId: o }), { isChatExpired: a, clearChatData: l, getSavedChatData: g } = Qe({
2123
+ appId: e
2124
+ }), { current: u } = V(t || tn()), [h] = S(
2125
+ new rn({
1983
2126
  baseURL: u,
1984
- appId: t
2127
+ appId: e
1985
2128
  })
1986
- ), [g, f] = _(null), [q, m] = _(null), [E, O] = _([]), [x, C] = _(!1), [I, w] = _(!1), [v, z] = _(!0), T = Lr(`sdk-boot-${t}`, () => p.boot()).fetch;
1987
- Z(() => {
1988
- if (i())
1989
- d();
2129
+ ), [p, f] = S(null), [x, b] = S(null), [R, O] = S([]), [_, I] = S(!1), [E, w] = S(!1), [y, T] = S(!0), P = ln(`sdk-boot-${e}`, () => h.boot()).fetch;
2130
+ W(() => {
2131
+ if (a())
2132
+ l();
1990
2133
  else {
1991
2134
  const {
1992
- conversationId: $,
1993
- userId: J,
2135
+ conversationId: L,
2136
+ userId: G,
1994
2137
  messages: H,
1995
- isChatClosed: B,
1996
- chatToken: N
1997
- } = h();
1998
- $ && J && (m({
1999
- id: $
2000
- }), p.setChatToken(N ?? null), H && H.length > 0 && O(H), B && w(!0));
2138
+ isChatClosed: Z,
2139
+ chatToken: j
2140
+ } = g();
2141
+ L && G && (b({
2142
+ id: L
2143
+ }), h.setChatToken(j ?? null), H && H.length > 0 && O(H), Z && w(!0));
2001
2144
  }
2002
- }, [h, i, d, p]);
2003
- const A = L(!1);
2004
- return Z(() => {
2005
- if (A.current) return;
2006
- A.current = !0, (async () => {
2007
- const [J, H] = await dt(
2008
- ut(() => p.getOrganizationByAppId(t))
2145
+ }, [g, a, l, h]);
2146
+ const $ = V(!1);
2147
+ return W(() => {
2148
+ if ($.current) return;
2149
+ $.current = !0, (async () => {
2150
+ const [G, H] = await nt(
2151
+ gt(() => h.getOrganizationByAppId(e))
2009
2152
  );
2010
2153
  if (H) {
2011
- console.error("Failed to fetch organization data:", H), z(!1), C(!0);
2154
+ console.error("Failed to fetch organization data:", H), T(!1), I(!0);
2012
2155
  return;
2013
2156
  }
2014
- p.setRegion(J.region);
2015
- const [B, N] = await dt(ut(T));
2016
- if (N) {
2017
- z(!1), C(!0);
2157
+ h.setRegion(G.region);
2158
+ const [Z, j] = await nt(gt(P));
2159
+ if (j) {
2160
+ T(!1), I(!0);
2018
2161
  return;
2019
2162
  }
2020
- const F = B.chat_settings.welcome_message;
2021
- f(B.chat_settings), z(B.chat_settings.is_active ?? !0), F && O((k) => k.length > 0 || k.some((R) => R.isWelcomeMessage) ? k : [zr(F)]), C(!0);
2163
+ const {
2164
+ conversationId: F,
2165
+ userId: J,
2166
+ messages: X
2167
+ } = g();
2168
+ F && J && X.some(jt) && O(
2169
+ await Dt(h, F, X)
2170
+ );
2171
+ const ne = Z.chat_settings.welcome_message;
2172
+ f(Z.chat_settings), T(Z.chat_settings.is_active ?? !0), ne && O((ee) => ee.length > 0 || ee.some((m) => m.isWelcomeMessage) ? ee : [Kr(ne)]), I(!0);
2022
2173
  })();
2023
- }, [l, p, t, T]), {
2024
- userId: a,
2174
+ }, [c, h, e, P, g]), {
2175
+ userId: i,
2025
2176
  userName: r,
2026
2177
  userData: n,
2027
- externalId: c,
2178
+ externalId: d,
2028
2179
  deviceId: s,
2029
- apiClient: p,
2030
- chatSettings: g,
2031
- currentChat: q,
2032
- messages: E,
2033
- isReady: x,
2034
- isChatClosed: I,
2035
- isChatActive: v
2180
+ apiClient: h,
2181
+ chatSettings: p,
2182
+ currentChat: x,
2183
+ messages: R,
2184
+ isReady: _,
2185
+ isChatClosed: E,
2186
+ isChatActive: y
2036
2187
  };
2037
2188
  }
2038
- const bt = "(max-width: 640px)";
2039
- function Kr() {
2040
- return typeof window > "u" ? !1 : window.matchMedia(bt).matches;
2189
+ const yt = "(max-width: 640px)";
2190
+ function un() {
2191
+ return typeof window > "u" ? !1 : window.matchMedia(yt).matches;
2041
2192
  }
2042
- function Vr(e) {
2043
- const [t, o] = _(Kr), [r, n] = _(
2193
+ function hn(t) {
2194
+ const [e, o] = S(un), [r, n] = S(
2044
2195
  null
2045
- ), a = e ?? t, c = typeof window > "u";
2046
- return Z(() => {
2047
- if (c) return;
2048
- const s = window.matchMedia(bt), l = (i) => {
2049
- o(i.matches);
2196
+ ), i = t ?? e, d = typeof window > "u";
2197
+ return W(() => {
2198
+ if (d) return;
2199
+ const s = window.matchMedia(yt), c = (a) => {
2200
+ o(a.matches);
2050
2201
  };
2051
- return l(s), s.addEventListener("change", l), () => s.removeEventListener("change", l);
2052
- }, [c]), Z(() => {
2053
- if (c) return;
2202
+ return c(s), s.addEventListener("change", c), () => s.removeEventListener("change", c);
2203
+ }, [d]), W(() => {
2204
+ if (d) return;
2054
2205
  const s = document.createElement("div");
2055
2206
  return s.className = "eloquent-ai-chat-portal", s.style.position = "relative", s.style.zIndex = "30", document.body.appendChild(s), n(s), () => {
2056
2207
  s.parentElement && s.parentElement.removeChild(s);
2057
2208
  };
2058
- }, [c]), {
2059
- isMobileScreen: t,
2060
- isMobile: a,
2209
+ }, [d]), {
2210
+ isMobileScreen: e,
2211
+ isMobile: i,
2061
2212
  portalContainer: r
2062
2213
  };
2063
2214
  }
2064
- const Wr = 2, Jr = (e) => `eloquent-ai:chat-widget-closed-${e}`;
2065
- function Fr({
2066
- environment: e,
2067
- apiUrl: t,
2215
+ const pn = 2, gn = (t) => `eloquent-ai:chat-widget-closed-${t}`;
2216
+ function fn({
2217
+ environment: t,
2218
+ apiUrl: e,
2068
2219
  appId: o,
2069
2220
  userId: r,
2070
2221
  userName: n,
2071
- userData: a,
2072
- chatProps: c,
2222
+ userData: i,
2223
+ chatProps: d,
2073
2224
  isMobile: s,
2074
- isInitiallyOpen: l,
2075
- hasCloseButton: i,
2076
- hasCleanChatButton: d,
2225
+ isInitiallyOpen: c,
2226
+ hasCloseButton: a,
2227
+ hasCleanChatButton: l,
2077
2228
  // Deprecated aliases, kept until hosts migrate to the is/has names above.
2078
- initialOpen: h,
2229
+ initialOpen: g,
2079
2230
  closeButton: u,
2080
- cleanChatButton: p,
2081
- proactiveMessageHideDelay: g = 5e3,
2231
+ cleanChatButton: h,
2232
+ proactiveMessageHideDelay: p = 5e3,
2082
2233
  isAlwaysOpen: f = !1,
2083
- hasCleanChatButtonOverride: q
2234
+ hasCleanChatButtonOverride: x
2084
2235
  }) {
2085
- const { isMobile: m, portalContainer: E } = Vr(s), {
2236
+ const { isMobile: b, portalContainer: R } = hn(s), {
2086
2237
  userId: O,
2087
- externalId: x,
2088
- deviceId: C,
2089
- apiClient: I,
2238
+ externalId: _,
2239
+ deviceId: I,
2240
+ apiClient: E,
2090
2241
  chatSettings: w,
2091
- currentChat: v,
2092
- messages: z,
2093
- isReady: Q,
2094
- isChatClosed: T,
2095
- isChatActive: A
2096
- } = Hr({
2097
- apiUrl: t,
2242
+ currentChat: y,
2243
+ messages: T,
2244
+ isReady: oe,
2245
+ isChatClosed: P,
2246
+ isChatActive: $
2247
+ } = dn({
2248
+ apiUrl: e,
2098
2249
  appId: o,
2099
2250
  initialUserId: r,
2100
2251
  userName: n,
2101
- userData: a
2102
- }), $ = Nt({ chatProps: c, chatSettings: w }), J = l ?? h ?? !1, H = i ?? u ?? !0, B = d ?? p ?? !0, N = Jr(o), [F, k] = _(() => f ? !0 : rt(N) === "true" || m ? !1 : J ?? m), [R, K] = _(!1);
2103
- Z(() => {
2104
- if (!Q || R || (K(!0), f)) return;
2105
- const re = w?.initial_open;
2106
- re != null && (m || re && rt(N) === "true" || k(re));
2252
+ userData: i
2253
+ }), L = Qt({ chatProps: d, chatSettings: w }), G = c ?? g ?? !1, H = a ?? u ?? !0, Z = l ?? h ?? !0, j = gn(o), [F, J] = S(() => f ? !0 : it(j) === "true" || b ? !1 : G ?? b), [X, ne] = S(!1);
2254
+ W(() => {
2255
+ if (!oe || X || (ne(!0), f)) return;
2256
+ const ce = w?.initial_open;
2257
+ ce != null && (b || ce && it(j) === "true" || J(ce));
2107
2258
  }, [
2108
- Q,
2109
- R,
2259
+ oe,
2260
+ X,
2110
2261
  w?.initial_open,
2111
- m,
2112
- N,
2262
+ b,
2263
+ j,
2113
2264
  f
2114
2265
  ]);
2115
- const S = w?.initial_open ?? J, j = w?.close_button ?? H, D = q ?? w?.clean_chat_button ?? B, G = w?.proactive_message_hide_delay ?? g, ie = y(
2116
- (re) => {
2117
- f || k((Re) => {
2118
- const et = typeof re == "function" ? re(Re) : re;
2119
- return et ? Bt(N) : $t(N, "true", Wr), et;
2266
+ const ee = w?.initial_open ?? G, m = w?.close_button ?? H, k = x ?? w?.clean_chat_button ?? Z, C = w?.proactive_message_hide_delay ?? p, A = v(
2267
+ (ce) => {
2268
+ f || J((Te) => {
2269
+ const ot = typeof ce == "function" ? ce(Te) : ce;
2270
+ return ot ? Xt(j) : Gt(j, "true", pn), ot;
2120
2271
  });
2121
2272
  },
2122
- [N, f]
2123
- ), he = It(F, 400), [se, pe] = _(
2124
- c?.messages ?? []
2125
- ), [le, ce] = _(v), [ve, qe] = _(!1), [ye, xe] = _(z);
2126
- ye !== z && (xe(z), z.length > 0 && pe(z));
2127
- const [De, M] = _(v);
2128
- De !== v && (M(v), v && ce(v));
2129
- const [ee, Y] = _(T);
2130
- ee !== T && (Y(T), T && qe(!0));
2131
- const Te = y(() => {
2132
- qe(!0);
2133
- }, []), [$e, Be] = _(!1), me = Q && w?.auto_display_welcome_message && w?.welcome_message ? w.welcome_message : "", oe = {
2134
- text: me,
2135
- isVisible: me !== "" && !$e,
2136
- autoHideDelay: G
2137
- }, { onSendMessage: X, onCleanMessages: te, onRateChat: vt } = Or({
2273
+ [j, f]
2274
+ ), B = $t(F, 400), [M, N] = S(
2275
+ d?.messages ?? []
2276
+ ), [ae, ue] = S(y), [qe, ye] = S(!1), [xe, ke] = S(T);
2277
+ xe !== T && (ke(T), T.length > 0 && N(T));
2278
+ const [$e, D] = S(y);
2279
+ $e !== y && (D(y), y && ue(y));
2280
+ const [re, te] = S(P);
2281
+ re !== P && (te(P), P && ye(!0));
2282
+ const Re = v(() => {
2283
+ ye(!0);
2284
+ }, []), [Be, Ne] = S(!1), we = oe && w?.auto_display_welcome_message && w?.welcome_message ? w.welcome_message : "", le = {
2285
+ text: we,
2286
+ isVisible: we !== "" && !Be,
2287
+ autoHideDelay: C
2288
+ }, { onSendMessage: Q, onCleanMessages: ie, onRateChat: xt } = Gr({
2138
2289
  appId: o,
2139
2290
  userId: O,
2140
2291
  userName: n,
2141
- userData: a,
2142
- externalId: x,
2143
- deviceId: C,
2144
- apiClient: I,
2292
+ userData: i,
2293
+ externalId: _,
2294
+ deviceId: I,
2295
+ apiClient: E,
2145
2296
  chatSettings: w,
2146
- setMessages: pe,
2147
- messages: se,
2148
- currentChat: le,
2149
- setCurrentChat: ce,
2150
- onChatClosed: Te,
2151
- isChatClosed: ve
2297
+ setMessages: N,
2298
+ messages: M,
2299
+ currentChat: ae,
2300
+ setCurrentChat: ue,
2301
+ onChatClosed: Re,
2302
+ isChatClosed: qe
2152
2303
  });
2153
- Z(() => {
2154
- z.length > 0 && pe(z);
2155
- }, [z]), Z(() => {
2156
- v && ce(v);
2157
- }, [v]);
2158
- const Qe = L(null);
2159
- Z(() => {
2160
- if (!le || !x || !I) return;
2161
- const re = {
2304
+ W(() => {
2305
+ T.length > 0 && N(T);
2306
+ }, [T]), W(() => {
2307
+ y && ue(y);
2308
+ }, [y]);
2309
+ const tt = V(null);
2310
+ W(() => {
2311
+ if (!ae || !_ || !E) return;
2312
+ const ce = {
2162
2313
  userId: O,
2163
2314
  userName: n,
2164
- userData: a,
2165
- externalId: x,
2166
- deviceId: C,
2167
- conversationId: le.id
2168
- }, Re = JSON.stringify(re);
2169
- Qe.current !== Re && (Qe.current = Re, I.identifyUser(re));
2315
+ userData: i,
2316
+ externalId: _,
2317
+ deviceId: I,
2318
+ conversationId: ae.id
2319
+ }, Te = JSON.stringify(ce);
2320
+ tt.current !== Te && (tt.current = Te, E.identifyUser(ce));
2170
2321
  }, [
2171
- x,
2322
+ _,
2172
2323
  O,
2173
2324
  n,
2174
- a,
2175
- C,
2176
- le,
2177
- I
2325
+ i,
2326
+ I,
2327
+ ae,
2328
+ E
2178
2329
  ]);
2179
- const qt = y(() => {
2180
- te(), qe(!1);
2181
- }, [te]), yt = y(() => {
2182
- Be(!0);
2330
+ const kt = v(() => {
2331
+ ie(), ye(!1);
2332
+ }, [ie]), _t = v(() => {
2333
+ Ne(!0);
2183
2334
  }, []);
2184
2335
  return {
2185
- isReady: Q,
2186
- isChatActive: A,
2187
- isInitiallyOpen: S,
2188
- hasCloseButton: j,
2189
- hasCleanChatButton: D,
2190
- isMobile: m,
2191
- chatInterfaceProps: $,
2336
+ isReady: oe,
2337
+ isChatActive: $,
2338
+ isInitiallyOpen: ee,
2339
+ hasCloseButton: m,
2340
+ hasCleanChatButton: k,
2341
+ isMobile: b,
2342
+ chatInterfaceProps: L,
2192
2343
  chatOpen: F,
2193
- chatOpenDebounced: he,
2194
- messages: se,
2195
- portalContainer: E,
2196
- onSendMessage: X,
2197
- setChatOpen: ie,
2198
- onCleanMessages: te,
2199
- proactiveMessage: oe,
2200
- hideProactiveMessage: yt,
2201
- isChatClosed: ve,
2202
- onStartNewChat: qt,
2203
- onRateChat: vt
2344
+ chatOpenDebounced: B,
2345
+ messages: M,
2346
+ portalContainer: R,
2347
+ onSendMessage: Q,
2348
+ setChatOpen: A,
2349
+ onCleanMessages: ie,
2350
+ proactiveMessage: le,
2351
+ hideProactiveMessage: _t,
2352
+ isChatClosed: qe,
2353
+ onStartNewChat: kt,
2354
+ onRateChat: xt
2204
2355
  };
2205
2356
  }
2206
- function Gr(e) {
2207
- const [t, o] = _(0);
2208
- return Z(() => {
2357
+ function mn(t) {
2358
+ const [e, o] = S(0);
2359
+ return W(() => {
2209
2360
  const r = window.visualViewport;
2210
- if (!e || !r) {
2361
+ if (!t || !r) {
2211
2362
  o(0);
2212
2363
  return;
2213
2364
  }
2214
2365
  const n = () => {
2215
- const a = window.innerHeight - r.height - r.offsetTop;
2216
- o(Math.max(0, Math.round(a)));
2366
+ const i = window.innerHeight - r.height - r.offsetTop;
2367
+ o(Math.max(0, Math.round(i)));
2217
2368
  };
2218
2369
  return n(), r.addEventListener("resize", n), r.addEventListener("scroll", n), () => {
2219
2370
  r.removeEventListener("resize", n), r.removeEventListener("scroll", n), o(0);
2220
2371
  };
2221
- }, [e]), t;
2222
- }
2223
- function Xr(e) {
2224
- Z(() => {
2225
- if (!e) return;
2226
- const { body: t } = document, o = window.scrollY, r = {
2227
- position: t.style.position,
2228
- top: t.style.top,
2229
- left: t.style.left,
2230
- right: t.style.right,
2231
- overflow: t.style.overflow
2372
+ }, [t]), e;
2373
+ }
2374
+ function bn(t) {
2375
+ W(() => {
2376
+ if (!t) return;
2377
+ const { body: e } = document, o = window.scrollY, r = {
2378
+ position: e.style.position,
2379
+ top: e.style.top,
2380
+ left: e.style.left,
2381
+ right: e.style.right,
2382
+ overflow: e.style.overflow
2232
2383
  };
2233
- return t.style.position = "fixed", t.style.top = `-${o}px`, t.style.left = "0", t.style.right = "0", t.style.overflow = "hidden", () => {
2234
- t.style.position = r.position, t.style.top = r.top, t.style.left = r.left, t.style.right = r.right, t.style.overflow = r.overflow, window.scrollTo(0, o);
2384
+ return e.style.position = "fixed", e.style.top = `-${o}px`, e.style.left = "0", e.style.right = "0", e.style.overflow = "hidden", () => {
2385
+ e.style.position = r.position, e.style.top = r.top, e.style.left = r.left, e.style.right = r.right, e.style.overflow = r.overflow, window.scrollTo(0, o);
2235
2386
  };
2236
- }, [e]);
2387
+ }, [t]);
2237
2388
  }
2238
- function Yr() {
2239
- const [e, t] = _(!1), [o, r] = _(null), n = L(null), a = L(null), c = y((l = "...") => {
2240
- const i = () => {
2241
- r(l), t(!0), a.current = null, n.current && clearTimeout(n.current), n.current = setTimeout(() => {
2242
- n.current = null, a.current && i();
2389
+ function vn() {
2390
+ const [t, e] = S(!1), [o, r] = S(null), n = V(null), i = V(null), d = v((c = "...") => {
2391
+ const a = () => {
2392
+ r(c), e(!0), i.current = null, n.current && clearTimeout(n.current), n.current = setTimeout(() => {
2393
+ n.current = null, i.current && a();
2243
2394
  }, 1e3);
2244
2395
  };
2245
- n.current ? a.current = l : i();
2246
- }, []), s = y(() => {
2247
- n.current && (clearTimeout(n.current), n.current = null), a.current = null, t(!1), r(null);
2396
+ n.current ? i.current = c : a();
2397
+ }, []), s = v(() => {
2398
+ n.current && (clearTimeout(n.current), n.current = null), i.current = null, e(!1), r(null);
2248
2399
  }, []);
2249
2400
  return {
2250
- isVisible: e,
2401
+ isVisible: t,
2251
2402
  content: o,
2252
- showCognition: c,
2403
+ showCognition: d,
2253
2404
  hideCognition: s
2254
2405
  };
2255
2406
  }
2256
- function Qr({
2257
- children: e
2407
+ function wn({
2408
+ children: t
2258
2409
  }) {
2259
- const t = Yr();
2260
- return /* @__PURE__ */ b(Et.Provider, { value: t, children: e });
2410
+ const e = vn();
2411
+ return /* @__PURE__ */ q(Bt.Provider, { value: e, children: t });
2261
2412
  }
2262
- const en = ({ children: e }) => {
2263
- const [t, o] = _(null), [r, n] = _(!1), a = Tt(o), i = {
2264
- error: t,
2413
+ const qn = ({ children: t }) => {
2414
+ const [e, o] = S(null), [r, n] = S(!1), i = Lt(o), a = {
2415
+ error: e,
2265
2416
  hideSdk: r,
2266
- publishApiError: a,
2267
- publishError: (d) => o(d),
2417
+ publishApiError: i,
2418
+ publishError: (l) => o(l),
2268
2419
  publishNetworkError: () => n(!0),
2269
2420
  clearError: () => o(null)
2270
2421
  };
2271
- return /* @__PURE__ */ b(zt.Provider, { value: i, children: e });
2272
- }, tn = 100;
2273
- function on({
2274
- appId: e,
2275
- userId: t,
2422
+ return /* @__PURE__ */ q(Nt.Provider, { value: a, children: t });
2423
+ }, yn = 100;
2424
+ function xn({
2425
+ appId: t,
2426
+ userId: e,
2276
2427
  userName: o,
2277
2428
  userData: r,
2278
2429
  chatProps: n,
2279
- proactiveMessageHideDelay: a = 5e3,
2280
- isMobile: c,
2430
+ proactiveMessageHideDelay: i = 5e3,
2431
+ isMobile: d,
2281
2432
  hasCloseButton: s,
2282
- hasCleanChatButton: l,
2283
- isInitiallyOpen: i,
2433
+ hasCleanChatButton: c,
2434
+ isInitiallyOpen: a,
2284
2435
  // Deprecated aliases, resolved in useChat (new name wins).
2285
- closeButton: d,
2286
- cleanChatButton: h,
2436
+ closeButton: l,
2437
+ cleanChatButton: g,
2287
2438
  initialOpen: u,
2288
- INTERNAL_ONLY_CHAT_INTERFACE_ONLY: p = !1,
2289
- INTERNAL_ONLY_SHOW_CLEAN_CHAT_BUTTON: g = void 0,
2439
+ INTERNAL_ONLY_CHAT_INTERFACE_ONLY: h = !1,
2440
+ INTERNAL_ONLY_SHOW_CLEAN_CHAT_BUTTON: p = void 0,
2290
2441
  INTERNAL_ONLY_BLOCK_STYLE: f = !1,
2291
- INTERNAL_ONLY_FEATURE_MESSAGE_CLICK: q = void 0,
2292
- INTERNAL_ONLY_FEATURE_CLEAR_CHAT_CLICK: m = void 0,
2293
- INTERNAL_ONLY_SHOW_COPY_BUTTON: E = !1,
2442
+ INTERNAL_ONLY_FEATURE_MESSAGE_CLICK: x = void 0,
2443
+ INTERNAL_ONLY_FEATURE_CLEAR_CHAT_CLICK: b = void 0,
2444
+ INTERNAL_ONLY_SHOW_COPY_BUTTON: R = !1,
2294
2445
  INTERNAL_ONLY_ENVIRONMENT: O = "live",
2295
- INTERNAL_ONLY_API_URL: x
2446
+ INTERNAL_ONLY_API_URL: _
2296
2447
  }) {
2297
- const { hideSdk: C } = Ae(), {
2298
- isReady: I,
2448
+ const { hideSdk: I } = je(), {
2449
+ isReady: E,
2299
2450
  isChatActive: w,
2300
- isInitiallyOpen: v,
2301
- hasCloseButton: z,
2302
- hasCleanChatButton: Q,
2303
- isMobile: T,
2304
- chatOpen: A,
2305
- chatInterfaceProps: $,
2306
- chatOpenDebounced: J,
2451
+ isInitiallyOpen: y,
2452
+ hasCloseButton: T,
2453
+ hasCleanChatButton: oe,
2454
+ isMobile: P,
2455
+ chatOpen: $,
2456
+ chatInterfaceProps: L,
2457
+ chatOpenDebounced: G,
2307
2458
  messages: H,
2308
- portalContainer: B,
2309
- onSendMessage: N,
2459
+ portalContainer: Z,
2460
+ onSendMessage: j,
2310
2461
  setChatOpen: F,
2311
- proactiveMessage: k,
2312
- hideProactiveMessage: R,
2313
- isChatClosed: K,
2314
- onStartNewChat: S,
2315
- onRateChat: j
2316
- } = Fr({
2462
+ proactiveMessage: J,
2463
+ hideProactiveMessage: X,
2464
+ isChatClosed: ne,
2465
+ onStartNewChat: ee,
2466
+ onRateChat: m
2467
+ } = fn({
2317
2468
  environment: O,
2318
- apiUrl: x,
2319
- appId: e,
2320
- userId: t,
2469
+ apiUrl: _,
2470
+ appId: t,
2471
+ userId: e,
2321
2472
  userName: o,
2322
2473
  userData: r,
2323
2474
  chatProps: n,
2324
- isMobile: c,
2325
- isInitiallyOpen: i,
2475
+ isMobile: d,
2476
+ isInitiallyOpen: a,
2326
2477
  hasCloseButton: s,
2327
- hasCleanChatButton: l,
2478
+ hasCleanChatButton: c,
2328
2479
  initialOpen: u,
2329
- closeButton: d,
2330
- cleanChatButton: h,
2331
- proactiveMessageHideDelay: a,
2480
+ closeButton: l,
2481
+ cleanChatButton: g,
2482
+ proactiveMessageHideDelay: i,
2332
2483
  // Embedded: the interface is the page content with no launcher to reopen
2333
2484
  // it, so nothing (boot initial_open, closed-cookie, props) may close it.
2334
- isAlwaysOpen: p,
2335
- hasCleanChatButtonOverride: g
2336
- }), D = Gr(T && A);
2337
- Xr(T && A);
2338
- const G = !I;
2339
- if (C || G && !p || !G && !w) return null;
2340
- const ie = () => /* @__PURE__ */ Se(
2485
+ isAlwaysOpen: h,
2486
+ hasCleanChatButtonOverride: p
2487
+ }), k = mn(P && $);
2488
+ bn(P && $);
2489
+ const C = !E;
2490
+ if (I || C && !h || !C && !w) return null;
2491
+ const A = () => /* @__PURE__ */ ze(
2341
2492
  "div",
2342
2493
  {
2343
2494
  style: {
@@ -2353,37 +2504,37 @@ function on({
2353
2504
  ...f ? { position: "relative", inset: 0, width: "100%", height: "100%" } : {}
2354
2505
  },
2355
2506
  children: [
2356
- /* @__PURE__ */ b("style", { children: At }),
2357
- /* @__PURE__ */ b(
2358
- Le,
2507
+ /* @__PURE__ */ q("style", { children: Wt }),
2508
+ /* @__PURE__ */ q(
2509
+ Ze,
2359
2510
  {
2360
2511
  className: "eloquentai-chat-messaging",
2361
- head: /* @__PURE__ */ Se(ot, { children: [
2362
- /* @__PURE__ */ b("link", { rel: "preconnect", href: "https://fonts.googleapis.com" }),
2363
- /* @__PURE__ */ b("link", { rel: "preconnect", href: "https://fonts.gstatic.com" }),
2364
- /* @__PURE__ */ b(
2512
+ head: /* @__PURE__ */ ze(at, { children: [
2513
+ /* @__PURE__ */ q("link", { rel: "preconnect", href: "https://fonts.googleapis.com" }),
2514
+ /* @__PURE__ */ q("link", { rel: "preconnect", href: "https://fonts.gstatic.com" }),
2515
+ /* @__PURE__ */ q(
2365
2516
  "link",
2366
2517
  {
2367
2518
  href: "https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap",
2368
2519
  rel: "stylesheet"
2369
2520
  }
2370
2521
  ),
2371
- /* @__PURE__ */ b("style", { children: Ne })
2522
+ /* @__PURE__ */ q("style", { children: Le })
2372
2523
  ] }),
2373
2524
  style: {
2374
- display: A || J ? "block" : "none",
2375
- width: T ? "100vw" : "400px",
2525
+ display: $ || G ? "block" : "none",
2526
+ width: P ? "100vw" : "400px",
2376
2527
  // 100dvh accounts for mobile browser chrome (e.g. address bar); 100vh fallback for older browsers
2377
2528
  "--chat-mobile-viewport-height": "100dvh",
2378
- height: T ? "var(--chat-mobile-viewport-height, 100vh)" : "700px",
2379
- maxHeight: T ? "var(--chat-mobile-viewport-height, 100vh)" : `calc(100% - ${tn}px)`,
2529
+ height: P ? "var(--chat-mobile-viewport-height, 100vh)" : "700px",
2530
+ maxHeight: P ? "var(--chat-mobile-viewport-height, 100vh)" : `calc(100% - ${yn}px)`,
2380
2531
  border: "none",
2381
2532
  zIndex: 2147483e3,
2382
2533
  position: "fixed",
2383
- top: T ? 0 : void 0,
2384
- left: T ? 0 : void 0,
2385
- right: T ? 0 : 16,
2386
- bottom: T ? 0 : 16,
2534
+ top: P ? 0 : void 0,
2535
+ left: P ? 0 : void 0,
2536
+ right: P ? 0 : 16,
2537
+ bottom: P ? 0 : 16,
2387
2538
  ...f ? {
2388
2539
  position: "relative",
2389
2540
  top: 0,
@@ -2396,43 +2547,43 @@ function on({
2396
2547
  zIndex: 0
2397
2548
  } : {}
2398
2549
  },
2399
- children: G ? (
2550
+ children: C ? (
2400
2551
  // Only reachable in embedded mode (the launcher returns null while
2401
2552
  // booting): hold the widget's frame with a skeleton so a remount —
2402
2553
  // project/environment switch in the host app — doesn't flash an
2403
2554
  // empty hole where the chat was.
2404
- /* @__PURE__ */ b(Rt, { isOpen: !0, isMobile: T, skipAnimation: !0 })
2405
- ) : /* @__PURE__ */ b(
2406
- Ot,
2555
+ /* @__PURE__ */ q(Zt, { isOpen: !0, isMobile: P, skipAnimation: !0 })
2556
+ ) : /* @__PURE__ */ q(
2557
+ Kt,
2407
2558
  {
2408
- ...$,
2409
- hasIntroAnimation: !p,
2559
+ ...L,
2560
+ hasIntroAnimation: !h,
2410
2561
  isTestMode: O === "test",
2411
- isOpen: A,
2412
- keyboardInset: D,
2562
+ isOpen: $,
2563
+ keyboardInset: k,
2413
2564
  messages: H,
2414
- onSendMessage: N,
2415
- onMessageClick: q,
2416
- isMobile: T,
2417
- hasCloseButton: z,
2418
- hasCleanChatButton: Q,
2419
- hasCopyButton: E,
2420
- isChatClosed: K,
2421
- onStartNewChat: S,
2422
- onRateChat: j,
2565
+ onSendMessage: j,
2566
+ onMessageClick: x,
2567
+ isMobile: P,
2568
+ hasCloseButton: T,
2569
+ hasCleanChatButton: oe,
2570
+ hasCopyButton: R,
2571
+ isChatClosed: ne,
2572
+ onStartNewChat: ee,
2573
+ onRateChat: m,
2423
2574
  onClose: () => F(!1),
2424
2575
  onCleanChat: () => {
2425
- S(), m?.();
2576
+ ee(), b?.();
2426
2577
  }
2427
2578
  }
2428
2579
  )
2429
2580
  }
2430
2581
  ),
2431
- !p && /* @__PURE__ */ b(
2432
- Le,
2582
+ !h && /* @__PURE__ */ q(
2583
+ Ze,
2433
2584
  {
2434
2585
  className: "eloquentai-chat-launcher",
2435
- head: /* @__PURE__ */ b("style", { children: Ne }),
2586
+ head: /* @__PURE__ */ q("style", { children: Le }),
2436
2587
  style: {
2437
2588
  position: "fixed",
2438
2589
  bottom: 17,
@@ -2441,26 +2592,26 @@ function on({
2441
2592
  width: 48,
2442
2593
  height: 48,
2443
2594
  border: "none",
2444
- zIndex: T ? 2147482999 : 2147483e3,
2445
- opacity: A ? 0 : 1,
2446
- pointerEvents: A ? "none" : "auto",
2447
- transition: A ? "opacity 100ms ease-in" : "opacity 200ms ease-out 320ms"
2595
+ zIndex: P ? 2147482999 : 2147483e3,
2596
+ opacity: $ ? 0 : 1,
2597
+ pointerEvents: $ ? "none" : "auto",
2598
+ transition: $ ? "opacity 100ms ease-in" : "opacity 200ms ease-out 320ms"
2448
2599
  },
2449
- children: /* @__PURE__ */ b(
2450
- Ut,
2600
+ children: /* @__PURE__ */ q(
2601
+ Ft,
2451
2602
  {
2452
- isOpen: A,
2453
- toggleBubble: () => F((se) => !se),
2454
- isDarkMode: $?.theme?.mode === "dark"
2603
+ isOpen: $,
2604
+ toggleBubble: () => F((M) => !M),
2605
+ isDarkMode: L?.theme?.mode === "dark"
2455
2606
  }
2456
2607
  )
2457
2608
  }
2458
2609
  ),
2459
- $?.displayWelcomeMessages ? /* @__PURE__ */ b(
2460
- Le,
2610
+ L?.displayWelcomeMessages ? /* @__PURE__ */ q(
2611
+ Ze,
2461
2612
  {
2462
2613
  className: "eloquentai-chat-proactive-message",
2463
- head: /* @__PURE__ */ b("style", { children: Ne }),
2614
+ head: /* @__PURE__ */ q("style", { children: Le }),
2464
2615
  style: {
2465
2616
  position: "fixed",
2466
2617
  // Aligns the bubble's tail with the launcher's center: the
@@ -2469,22 +2620,22 @@ function on({
2469
2620
  bottom: 24,
2470
2621
  right: 17
2471
2622
  },
2472
- children: /* @__PURE__ */ b(Pt, { ...$?.theme ?? {}, children: /* @__PURE__ */ b(
2623
+ children: /* @__PURE__ */ q(Ht, { ...L?.theme ?? {}, children: /* @__PURE__ */ q(
2473
2624
  "div",
2474
2625
  {
2475
2626
  className: Ge("eloq:w-full eloq:h-full", {
2476
- dark: $?.theme?.mode === "dark"
2627
+ dark: L?.theme?.mode === "dark"
2477
2628
  }),
2478
- children: k && !v && /* @__PURE__ */ b(
2479
- Dt,
2629
+ children: J && !y && /* @__PURE__ */ q(
2630
+ Yt,
2480
2631
  {
2481
- message: k.text,
2482
- isVisible: k.isVisible,
2483
- onDismiss: R,
2632
+ message: J.text,
2633
+ isVisible: J.isVisible,
2634
+ onDismiss: X,
2484
2635
  onMessageClick: () => {
2485
- F(!0), R();
2636
+ F(!0), X();
2486
2637
  },
2487
- autoHideDelay: k.autoHideDelay
2638
+ autoHideDelay: J.autoHideDelay
2488
2639
  }
2489
2640
  )
2490
2641
  }
@@ -2494,21 +2645,21 @@ function on({
2494
2645
  ]
2495
2646
  }
2496
2647
  );
2497
- return /* @__PURE__ */ b(ot, { children: f ? ie() : B ? /* @__PURE__ */ b(jt, { container: B, children: ie() }) : null });
2648
+ return /* @__PURE__ */ q(at, { children: f ? A() : Z ? /* @__PURE__ */ q(Jt, { container: Z, children: A() }) : null });
2498
2649
  }
2499
- function rn(e) {
2500
- return /* @__PURE__ */ b(en, { children: /* @__PURE__ */ b(Qr, { children: /* @__PURE__ */ b(on, { ...e }) }) });
2650
+ function kn(t) {
2651
+ return /* @__PURE__ */ q(qn, { children: /* @__PURE__ */ q(wn, { children: /* @__PURE__ */ q(xn, { ...t }) }) });
2501
2652
  }
2502
- function dn(e, t) {
2503
- return ((r, n, a) => {
2504
- const c = Mt.createRoot(n);
2505
- return c.render(/* @__PURE__ */ b(r, { ...a })), c.unmount;
2506
- })(rn, e, t);
2653
+ function En(t, e) {
2654
+ return ((r, n, i) => {
2655
+ const d = Vt.createRoot(n);
2656
+ return d.render(/* @__PURE__ */ q(r, { ...i })), d.unmount;
2657
+ })(kn, t, e);
2507
2658
  }
2508
2659
  export {
2509
- rn as Chat,
2510
- Ot as ChatInterface,
2511
- dn as renderChat,
2512
- Ir as useRealtimeSocket
2660
+ kn as Chat,
2661
+ Kt as ChatInterface,
2662
+ En as renderChat,
2663
+ Lr as useRealtimeSocket
2513
2664
  };
2514
2665
  //# sourceMappingURL=index.mjs.map