@eloquentai/chat-sdk 0.37.0-dev.1 → 0.37.0-dev.3
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/components/chat/history-reconciliation.d.ts +33 -0
- package/dist/components/chat/hooks/use-realtime-socket.d.ts +9 -4
- package/dist/components/chat/message-mapping.d.ts +0 -8
- package/dist/index.css +1 -1
- package/dist/index.mjs +1026 -996
- package/dist/index.mjs.map +1 -1
- package/dist/lib/message-key.d.ts +6 -0
- package/dist/{skeleton-DuY4ejhj.js → skeleton-DJDQ11eO.js} +2396 -2386
- package/dist/skeleton-DJDQ11eO.js.map +1 -0
- package/dist/types/message.d.ts +8 -0
- package/dist/ui.mjs +1 -1
- package/package.json +1 -1
- package/dist/skeleton-DuY4ejhj.js.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { L as Tt, c as
|
|
3
|
-
import { jsx as I, jsxs as
|
|
4
|
-
import { useState as C, useCallback as v, useEffect as
|
|
2
|
+
import { L as Tt, c as Be, u as Mt, g as At, X as Pt, i as Ot, A as Ut, d as F, e as Ke, f as jt, h as Dt, r as $t, t as Bt, j as Lt, N as at, k as Le, l as Nt, H as Zt, w as ct, m as Kt, s as Ht, n as Vt, o as Wt, E as Ft, p as Jt, S as Gt, C as Yt, T as Xt } from "./skeleton-DJDQ11eO.js";
|
|
3
|
+
import { jsx as I, jsxs as ke, Fragment as Qt } from "react/jsx-runtime";
|
|
4
|
+
import { useState as C, useCallback as v, useEffect as V, useMemo as tt, useRef as $ } from "react";
|
|
5
5
|
import { createPortal as ot, flushSync as eo } from "react-dom";
|
|
6
6
|
import to from "react-dom/client";
|
|
7
7
|
try {
|
|
8
8
|
let e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, t = new e.Error().stack;
|
|
9
|
-
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "
|
|
9
|
+
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "3ac09d81-72f9-4510-abbd-25060624b74f", e._sentryDebugIdIdentifier = "sentry-dbid-3ac09d81-72f9-4510-abbd-25060624b74f");
|
|
10
10
|
} catch {
|
|
11
11
|
}
|
|
12
12
|
if (typeof window < "u") {
|
|
@@ -33,7 +33,7 @@ if (typeof window < "u") {
|
|
|
33
33
|
});
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
const Je = '/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--eloq-aura-angle:0deg}}}@layer theme{:root,:host{--eloq-font-sans:system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--eloq-font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--eloq-color-red-50:oklch(97.1% .013 17.38);--eloq-color-red-200:oklch(88.5% .062 18.334);--eloq-color-red-400:oklch(70.4% .191 22.216);--eloq-color-red-500:oklch(63.7% .237 25.331);--eloq-color-red-800:oklch(44.4% .177 26.899);--eloq-color-amber-50:oklch(98.7% .022 95.277);--eloq-color-amber-200:oklch(92.4% .12 95.746);--eloq-color-amber-400:oklch(82.8% .189 84.429);--eloq-color-amber-500:oklch(76.9% .188 70.08);--eloq-color-amber-800:oklch(47.3% .137 46.201);--eloq-color-yellow-400:oklch(85.2% .199 91.936);--eloq-color-green-50:oklch(98.2% .018 155.826);--eloq-color-green-200:oklch(92.5% .084 155.995);--eloq-color-green-400:oklch(79.2% .209 151.711);--eloq-color-green-500:oklch(72.3% .219 149.579);--eloq-color-green-800:oklch(44.8% .119 151.328);--eloq-color-blue-50:oklch(97% .014 254.604);--eloq-color-blue-200:oklch(88.2% .059 254.128);--eloq-color-blue-400:oklch(70.7% .165 254.624);--eloq-color-blue-500:oklch(62.3% .214 259.815);--eloq-color-blue-800:oklch(42.4% .199 265.638);--eloq-color-gray-100:oklch(96.7% .003 264.542);--eloq-color-gray-200:oklch(92.8% .006 264.531);--eloq-color-gray-300:oklch(87.2% .01 258.338);--eloq-color-gray-400:oklch(70.7% .022 261.325);--eloq-color-gray-500:oklch(55.1% .027 264.364);--eloq-color-gray-600:oklch(44.6% .03 256.802);--eloq-color-gray-900:oklch(21% .034 264.665);--eloq-color-black:#000;--eloq-color-white:#fff;--eloq-spacing:.25rem;--eloq-container-xs:20rem;--eloq-text-xs:.75rem;--eloq-text-xs--line-height:calc(1 / .75);--eloq-text-sm:.875rem;--eloq-text-sm--line-height:calc(1.25 / .875);--eloq-text-base:1rem;--eloq-text-base--line-height: 1.5 ;--eloq-text-2xl:1.5rem;--eloq-text-2xl--line-height:calc(2 / 1.5);--eloq-font-weight-medium:500;--eloq-font-weight-semibold:600;--eloq-tracking-tight:-.025em;--eloq-leading-relaxed:1.625;--eloq-radius-sm:calc(var(--radius) - 4px);--eloq-radius-md:calc(var(--radius) - 2px);--eloq-radius-lg:var(--radius);--eloq-radius-xl:.75rem;--eloq-radius-2xl:1rem;--eloq-radius-3xl:1.5rem;--eloq-drop-shadow-lg:0 4px 4px #00000026;--eloq-drop-shadow-xl:0 9px 7px #0000001a;--eloq-ease-out:cubic-bezier(0, 0, .2, 1);--eloq-animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--eloq-default-transition-duration:.15s;--eloq-default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--eloq-default-font-family:var(--eloq-font-sans);--eloq-default-mono-font-family:var(--eloq-font-mono);--eloq-animate-panel-in:panel-in .35s cubic-bezier(.16, 1, .3, 1) both;--eloq-animate-panel-out:panel-out .25s cubic-bezier(.4, 0, 1, 1) both;--eloq-animate-thinking-dot:thinking-dot 1.2s ease-in-out infinite;--eloq-animate-thinking-shimmer:thinking-shimmer 1.8s linear infinite;--eloq-animate-regenerating:regenerating-sweep 1.2s linear infinite;--eloq-animate-text-in:text-in .35s ease-out both;--eloq-animate-message-in:message-in .3s ease-out both;--eloq-animate-slide-up-in:slide-up-in .3s ease-out both}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--eloq-default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--eloq-default-font-feature-settings,normal);font-variation-settings:var(--eloq-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--eloq-default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--eloq-default-mono-font-feature-settings,normal);font-variation-settings:var(--eloq-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:root{--background:0 0% 100%;--foreground:0 0% 3.9%;--card:0 0% 100%;--card-foreground:0 0% 3.9%;--popover:0 0% 100%;--popover-foreground:0 0% 3.9%;--primary:267 56% 46%;--primary-foreground:0 0% 98%;--secondary:0 0% 96.1%;--secondary-foreground:0 0% 9%;--muted:0 0% 96.1%;--muted-foreground:0 0% 45.1%;--accent:0 0% 96.1%;--accent-foreground:0 0% 9%;--destructive:0 84.2% 60.2%;--destructive-foreground:0 0% 98%;--border:0 0% 89.8%;--input:0 0% 89.8%;--ring:0 0% 3.9%;--cream:37.5 44% 96.5%;--chart-1:12 76% 61%;--chart-2:173 58% 39%;--chart-3:197 37% 24%;--chart-4:43 74% 66%;--chart-5:27 87% 67%;--radius:.5rem}.dark{--background:262 50% 10%;--foreground:262 5% 90%;--card:262 50% 10%;--card-foreground:262 5% 90%;--popover:262 50% 5%;--popover-foreground:262 5% 90%;--primary:262 62% 70%;--primary-foreground:0 0% 100%;--primary-dark:262 62% 60%;--secondary:262 30% 30%;--secondary-foreground:0 0% 100%;--secondary-dark:262 30% 20%;--secondary-light:262 30% 40%;--tertiary:267 56% 46%;--tertiary-foreground:0 0% 100%;--tertiary-dark:267 38% 25%;--tertiary-light:263 100% 85%;--muted:224 30% 25%;--muted-foreground:262 5% 90%;--accent:224 30% 25%;--accent-foreground:262 5% 100%;--accent-dark:224 30% 15%;--destructive:0 100% 30%;--destructive-foreground:262 5% 90%;--border:0 0% 30%;--input:262 30% 25%;--ring:262 62% 71%;--cream:257 28% 20%;--radius:.5rem;--sidebar-background:var(--background);--sidebar-foreground:var(--foreground);--sidebar-primary:var(--primary);--sidebar-primary-foreground:var(--primary-foreground);--sidebar-accent:var(--accent);--sidebar-accent-foreground:var(--accent-foreground);--sidebar-border:var(--border);--sidebar-ring:var(--ring)}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}}@layer components;@layer utilities{.eloq\\:pointer-events-none{pointer-events:none}.eloq\\:invisible{visibility:hidden}.eloq\\:sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.eloq\\:absolute{position:absolute}.eloq\\:relative{position:relative}.eloq\\:inset-0{inset:0}.eloq\\:inset-0\\.5{inset:calc(var(--eloq-spacing) * .5)}.eloq\\:inset-x-0{inset-inline:0}.eloq\\:end-full{inset-inline-end:100%}.eloq\\:top-0{top:0}.eloq\\:top-0\\.5{top:calc(var(--eloq-spacing) * .5)}.eloq\\:top-1\\/2{top:50%}.eloq\\:top-\\[2px\\]{top:2px}.eloq\\:-right-\\[9px\\]{right:-9px}.eloq\\:right-0\\.5{right:calc(var(--eloq-spacing) * .5)}.eloq\\:right-2{right:calc(var(--eloq-spacing) * 2)}.eloq\\:right-16{right:calc(var(--eloq-spacing) * 16)}.eloq\\:right-\\[2px\\]{right:2px}.eloq\\:bottom-0{bottom:0}.eloq\\:bottom-1{bottom:var(--eloq-spacing)}.eloq\\:bottom-2{bottom:calc(var(--eloq-spacing) * 2)}.eloq\\:bottom-10{bottom:calc(var(--eloq-spacing) * 10)}.eloq\\:left-0{left:0}.eloq\\:left-2{left:calc(var(--eloq-spacing) * 2)}.eloq\\:left-\\[calc\\(50\\%-0\\.75rem\\)\\]{left:calc(50% - .75rem)}.eloq\\:z-10{z-index:10}.eloq\\:z-20{z-index:20}.eloq\\:z-30{z-index:30}.eloq\\:m-0{margin:0}.eloq\\:m-auto{margin:auto}.eloq\\:mx-1{margin-inline:var(--eloq-spacing)}.eloq\\:mx-auto{margin-inline:auto}.eloq\\:my-2{margin-block:calc(var(--eloq-spacing) * 2)}.eloq\\:my-4{margin-block:calc(var(--eloq-spacing) * 4)}.eloq\\:me-1{margin-inline-end:var(--eloq-spacing)}.eloq\\:-mt-2{margin-top:calc(var(--eloq-spacing) * -2)}.eloq\\:-mt-6{margin-top:calc(var(--eloq-spacing) * -6)}.eloq\\:-mt-20{margin-top:calc(var(--eloq-spacing) * -20)}.eloq\\:mt-1{margin-top:var(--eloq-spacing)}.eloq\\:mt-2{margin-top:calc(var(--eloq-spacing) * 2)}.eloq\\:mt-10{margin-top:calc(var(--eloq-spacing) * 10)}.eloq\\:mr-1{margin-right:var(--eloq-spacing)}.eloq\\:mr-\\[2px\\]{margin-right:2px}.eloq\\:mb-1{margin-bottom:var(--eloq-spacing)}.eloq\\:mb-3{margin-bottom:calc(var(--eloq-spacing) * 3)}.eloq\\:mb-4{margin-bottom:calc(var(--eloq-spacing) * 4)}.eloq\\:mb-10{margin-bottom:calc(var(--eloq-spacing) * 10)}.eloq\\:ml-0{margin-left:0}.eloq\\:ml-1{margin-left:var(--eloq-spacing)}.eloq\\:ml-5{margin-left:calc(var(--eloq-spacing) * 5)}.eloq\\:box-content{box-sizing:content-box}.eloq\\:block{display:block}.eloq\\:flex{display:flex}.eloq\\:hidden{display:none}.eloq\\:inline-flex{display:inline-flex}.eloq\\:field-sizing-content{field-sizing:content}.eloq\\:aspect-square{aspect-ratio:1}.eloq\\:h-1{height:var(--eloq-spacing)}.eloq\\:h-2\\.5{height:calc(var(--eloq-spacing) * 2.5)}.eloq\\:h-3{height:calc(var(--eloq-spacing) * 3)}.eloq\\:h-4{height:calc(var(--eloq-spacing) * 4)}.eloq\\:h-5{height:calc(var(--eloq-spacing) * 5)}.eloq\\:h-6{height:calc(var(--eloq-spacing) * 6)}.eloq\\:h-8{height:calc(var(--eloq-spacing) * 8)}.eloq\\:h-10{height:calc(var(--eloq-spacing) * 10)}.eloq\\:h-12{height:calc(var(--eloq-spacing) * 12)}.eloq\\:h-14{height:calc(var(--eloq-spacing) * 14)}.eloq\\:h-16{height:calc(var(--eloq-spacing) * 16)}.eloq\\:h-\\[0\\.42em\\]{height:.42em}.eloq\\:h-\\[160px\\]{height:160px}.eloq\\:h-\\[220px\\]{height:220px}.eloq\\:h-\\[560px\\]{height:560px}.eloq\\:h-\\[600px\\]{height:600px}.eloq\\:h-full{height:100%}.eloq\\:max-h-\\[132px\\]{max-height:132px}.eloq\\:min-h-6{min-height:calc(var(--eloq-spacing) * 6)}.eloq\\:min-h-\\[48px\\]{min-height:48px}.eloq\\:min-h-\\[80px\\]{min-height:80px}.eloq\\:w-2\\.5{width:calc(var(--eloq-spacing) * 2.5)}.eloq\\:w-2\\/3{width:66.6667%}.eloq\\:w-3{width:calc(var(--eloq-spacing) * 3)}.eloq\\:w-4{width:calc(var(--eloq-spacing) * 4)}.eloq\\:w-5{width:calc(var(--eloq-spacing) * 5)}.eloq\\:w-6{width:calc(var(--eloq-spacing) * 6)}.eloq\\:w-8{width:calc(var(--eloq-spacing) * 8)}.eloq\\:w-10{width:calc(var(--eloq-spacing) * 10)}.eloq\\:w-12{width:calc(var(--eloq-spacing) * 12)}.eloq\\:w-14{width:calc(var(--eloq-spacing) * 14)}.eloq\\:w-16{width:calc(var(--eloq-spacing) * 16)}.eloq\\:w-24{width:calc(var(--eloq-spacing) * 24)}.eloq\\:w-32{width:calc(var(--eloq-spacing) * 32)}.eloq\\:w-48{width:calc(var(--eloq-spacing) * 48)}.eloq\\:w-\\[0\\.42em\\]{width:.42em}.eloq\\:w-\\[70\\%\\]{width:70%}.eloq\\:w-\\[320px\\]{width:320px}.eloq\\:w-\\[340px\\]{width:340px}.eloq\\:w-\\[348px\\]{width:348px}.eloq\\:w-\\[380px\\]{width:380px}.eloq\\:w-\\[420px\\]{width:420px}.eloq\\:w-full{width:100%}.eloq\\:max-w-\\[75\\%\\]{max-width:75%}.eloq\\:max-w-\\[88\\%\\]{max-width:88%}.eloq\\:max-w-full{max-width:100%}.eloq\\:max-w-xs{max-width:var(--eloq-container-xs)}.eloq\\:min-w-0{min-width:0}.eloq\\:min-w-6{min-width:calc(var(--eloq-spacing) * 6)}.eloq\\:min-w-min{min-width:min-content}.eloq\\:flex-1{flex:1}.eloq\\:flex-none{flex:none}.eloq\\:flex-shrink-0,.eloq\\:shrink-0{flex-shrink:0}.eloq\\:flex-grow{flex-grow:1}.eloq\\:origin-bottom-right{transform-origin:100% 100%}.eloq\\:translate-x-0{--tw-translate-x:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.eloq\\:translate-x-8{--tw-translate-x:calc(var(--eloq-spacing) * 8);translate:var(--tw-translate-x) var(--tw-translate-y)}.eloq\\:-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.eloq\\:scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.eloq\\:scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.eloq\\:-scale-x-100{--tw-scale-x: -100% ;scale:var(--tw-scale-x) var(--tw-scale-y)}.eloq\\:scale-\\[0\\.05\\]{scale:.05}.eloq\\:transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.eloq\\:animate-message-in{animation:var(--eloq-animate-message-in)}.eloq\\:animate-panel-in{animation:var(--eloq-animate-panel-in)}.eloq\\:animate-panel-out{animation:var(--eloq-animate-panel-out)}.eloq\\:animate-pulse{animation:var(--eloq-animate-pulse)}.eloq\\:animate-regenerating{animation:var(--eloq-animate-regenerating)}.eloq\\:animate-slide-up-in{animation:var(--eloq-animate-slide-up-in)}.eloq\\:animate-text-in{animation:var(--eloq-animate-text-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-row{flex-direction:row}.eloq\\:flex-wrap{flex-wrap:wrap}.eloq\\:items-center{align-items:center}.eloq\\:items-end{align-items:flex-end}.eloq\\:items-start{align-items:flex-start}.eloq\\:justify-between{justify-content:space-between}.eloq\\:justify-center{justify-content:center}.eloq\\:justify-end{justify-content:flex-end}.eloq\\:justify-start{justify-content:flex-start}.eloq\\:gap-1{gap:var(--eloq-spacing)}.eloq\\:gap-1\\.5{gap:calc(var(--eloq-spacing) * 1.5)}.eloq\\:gap-2{gap:calc(var(--eloq-spacing) * 2)}.eloq\\:gap-3{gap:calc(var(--eloq-spacing) * 3)}.eloq\\:gap-\\[0\\.25em\\]{gap:.25em}:where(.eloq\\:space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block:0}:where(.eloq\\:space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--eloq-spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--eloq-spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--eloq-spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--eloq-spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--eloq-spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--eloq-spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--eloq-spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--eloq-spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--eloq-spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--eloq-spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(var(--eloq-spacing) * var(--tw-space-x-reverse));margin-inline-end:calc(var(--eloq-spacing) * calc(1 - var(--tw-space-x-reverse)))}:where(.eloq\\:space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--eloq-spacing) * 2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--eloq-spacing) * 2) * calc(1 - var(--tw-space-x-reverse)))}:where(.eloq\\:space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--eloq-spacing) * 3) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--eloq-spacing) * 3) * calc(1 - var(--tw-space-x-reverse)))}.eloq\\:self-end{align-self:flex-end}.eloq\\:self-stretch{align-self:stretch}.eloq\\:overflow-hidden{overflow:hidden}.eloq\\:overflow-x-auto{overflow-x:auto}.eloq\\:overscroll-contain{overscroll-behavior:contain}.eloq\\:rounded{border-radius:.25rem}.eloq\\:rounded-2xl{border-radius:var(--eloq-radius-2xl)}.eloq\\:rounded-3xl{border-radius:var(--eloq-radius-3xl)}.eloq\\:rounded-\\[inherit\\]{border-radius:inherit}.eloq\\:rounded-full{border-radius:3.40282e38px}.eloq\\:rounded-lg{border-radius:var(--eloq-radius-lg)}.eloq\\:rounded-md{border-radius:var(--eloq-radius-md)}.eloq\\:rounded-none{border-radius:0}.eloq\\:rounded-sm{border-radius:var(--eloq-radius-sm)}.eloq\\:rounded-xl{border-radius:var(--eloq-radius-xl)}.eloq\\:rounded-t-2xl{border-top-left-radius:var(--eloq-radius-2xl);border-top-right-radius:var(--eloq-radius-2xl)}.eloq\\:border{border-style:var(--tw-border-style);border-width:1px}.eloq\\:border-0{border-style:var(--tw-border-style);border-width:0}.eloq\\:border-2{border-style:var(--tw-border-style);border-width:2px}.eloq\\:border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.eloq\\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.eloq\\:border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.eloq\\:border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.eloq\\:border-dashed{--tw-border-style:dashed;border-style:dashed}.eloq\\:border-amber-400{border-color:var(--eloq-color-amber-400)}.eloq\\:border-blue-500{border-color:var(--eloq-color-blue-500)}.eloq\\:border-border{border-color:hsl(var(--border))}.eloq\\:border-current{border-color:currentColor}.eloq\\:border-green-500{border-color:var(--eloq-color-green-500)}.eloq\\:border-input{border-color:hsl(var(--input))}.eloq\\:border-red-500{border-color:var(--eloq-color-red-500)}.eloq\\:border-t-transparent{border-top-color:#0000}.eloq\\:border-l-transparent{border-left-color:#0000}.eloq\\:bg-\\[\\#0a0a0a\\]{background-color:#0a0a0a}.eloq\\:bg-\\[\\#000\\]{background-color:#000}.eloq\\:bg-\\[\\#fff\\]{background-color:#fff}.eloq\\:bg-amber-50{background-color:var(--eloq-color-amber-50)}.eloq\\:bg-background{background-color:hsl(var(--background))}.eloq\\:bg-black\\/20{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:bg-black\\/20{background-color:color-mix(in oklab,var(--eloq-color-black) 20%,transparent)}}.eloq\\:bg-black\\/60{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:bg-black\\/60{background-color:color-mix(in oklab,var(--eloq-color-black) 60%,transparent)}}.eloq\\:bg-blue-50{background-color:var(--eloq-color-blue-50)}.eloq\\:bg-border{background-color:hsl(var(--border))}.eloq\\:bg-card{background-color:hsl(var(--card))}.eloq\\:bg-cream{background-color:hsl(var(--cream))}.eloq\\:bg-gray-400{background-color:var(--eloq-color-gray-400)}.eloq\\:bg-gray-900{background-color:var(--eloq-color-gray-900)}.eloq\\:bg-green-50{background-color:var(--eloq-color-green-50)}.eloq\\:bg-muted{background-color:hsl(var(--muted))}.eloq\\:bg-muted-foreground{background-color:hsl(var(--muted-foreground))}.eloq\\:bg-primary{background-color:hsl(var(--primary))}.eloq\\:bg-red-50{background-color:var(--eloq-color-red-50)}.eloq\\:bg-white,.eloq\\:bg-white\\/20{background-color:var(--eloq-color-white)}@supports (color:color-mix(in lab,red,red)){.eloq\\:bg-white\\/20{background-color:color-mix(in oklab,var(--eloq-color-white) 20%,transparent)}}.eloq\\:fill-none{fill:none}.eloq\\:fill-yellow-400{fill:var(--eloq-color-yellow-400)}.eloq\\:object-contain{object-fit:contain}.eloq\\:object-cover{object-fit:cover}.eloq\\:p-0{padding:0}.eloq\\:p-0\\.5{padding:calc(var(--eloq-spacing) * .5)}.eloq\\:p-1{padding:var(--eloq-spacing)}.eloq\\:p-2{padding:calc(var(--eloq-spacing) * 2)}.eloq\\:p-3{padding:calc(var(--eloq-spacing) * 3)}.eloq\\:p-4{padding:calc(var(--eloq-spacing) * 4)}.eloq\\:p-6{padding:calc(var(--eloq-spacing) * 6)}.eloq\\:p-\\[1px\\]{padding:1px}.eloq\\:p-\\[7px\\]{padding:7px}.eloq\\:px-0{padding-inline:0}.eloq\\:px-1\\.5{padding-inline:calc(var(--eloq-spacing) * 1.5)}.eloq\\:px-2{padding-inline:calc(var(--eloq-spacing) * 2)}.eloq\\:px-3{padding-inline:calc(var(--eloq-spacing) * 3)}.eloq\\:px-4{padding-inline:calc(var(--eloq-spacing) * 4)}.eloq\\:px-5{padding-inline:calc(var(--eloq-spacing) * 5)}.eloq\\:px-\\[12px\\]{padding-inline:12px}.eloq\\:px-\\[16px\\]{padding-inline:16px}.eloq\\:py-0\\.5{padding-block:calc(var(--eloq-spacing) * .5)}.eloq\\:py-1{padding-block:var(--eloq-spacing)}.eloq\\:py-1\\.5{padding-block:calc(var(--eloq-spacing) * 1.5)}.eloq\\:py-2{padding-block:calc(var(--eloq-spacing) * 2)}.eloq\\:py-3{padding-block:calc(var(--eloq-spacing) * 3)}.eloq\\:py-3\\.5{padding-block:calc(var(--eloq-spacing) * 3.5)}.eloq\\:py-\\[8px\\]{padding-block:8px}.eloq\\:py-\\[12px\\]{padding-block:12px}.eloq\\:pt-0{padding-top:0}.eloq\\:pt-2{padding-top:calc(var(--eloq-spacing) * 2)}.eloq\\:pt-4{padding-top:calc(var(--eloq-spacing) * 4)}.eloq\\:pt-5{padding-top:calc(var(--eloq-spacing) * 5)}.eloq\\:pt-6{padding-top:calc(var(--eloq-spacing) * 6)}.eloq\\:pt-10{padding-top:calc(var(--eloq-spacing) * 10)}.eloq\\:pt-24{padding-top:calc(var(--eloq-spacing) * 24)}.eloq\\:pr-2{padding-right:calc(var(--eloq-spacing) * 2)}.eloq\\:pr-4{padding-right:calc(var(--eloq-spacing) * 4)}.eloq\\:pr-12{padding-right:calc(var(--eloq-spacing) * 12)}.eloq\\:pb-2{padding-bottom:calc(var(--eloq-spacing) * 2)}.eloq\\:pb-4{padding-bottom:calc(var(--eloq-spacing) * 4)}.eloq\\:pb-10{padding-bottom:calc(var(--eloq-spacing) * 10)}.eloq\\:pb-14{padding-bottom:calc(var(--eloq-spacing) * 14)}.eloq\\:pl-3{padding-left:calc(var(--eloq-spacing) * 3)}.eloq\\:pl-4{padding-left:calc(var(--eloq-spacing) * 4)}.eloq\\:pl-11{padding-left:calc(var(--eloq-spacing) * 11)}.eloq\\:text-center{text-align:center}.eloq\\:text-left{text-align:left}.eloq\\:text-2xl{font-size:var(--eloq-text-2xl);line-height:var(--tw-leading,var(--eloq-text-2xl--line-height))}.eloq\\:text-base{font-size:var(--eloq-text-base);line-height:var(--tw-leading,var(--eloq-text-base--line-height))}.eloq\\:text-sm{font-size:var(--eloq-text-sm);line-height:var(--tw-leading,var(--eloq-text-sm--line-height))}.eloq\\:text-xs{font-size:var(--eloq-text-xs);line-height:var(--tw-leading,var(--eloq-text-xs--line-height))}.eloq\\:text-\\[10px\\]{font-size:10px}.eloq\\:leading-5{--tw-leading:calc(var(--eloq-spacing) * 5);line-height:calc(var(--eloq-spacing) * 5)}.eloq\\:leading-none{--tw-leading:1;line-height:1}.eloq\\:leading-relaxed{--tw-leading:var(--eloq-leading-relaxed);line-height:var(--eloq-leading-relaxed)}.eloq\\:font-medium{--tw-font-weight:var(--eloq-font-weight-medium);font-weight:var(--eloq-font-weight-medium)}.eloq\\:font-semibold{--tw-font-weight:var(--eloq-font-weight-semibold);font-weight:var(--eloq-font-weight-semibold)}.eloq\\:tracking-tight{--tw-tracking:var(--eloq-tracking-tight);letter-spacing:var(--eloq-tracking-tight)}.eloq\\:whitespace-nowrap{white-space:nowrap}.eloq\\:text-\\[\\#000\\]{color:#000}.eloq\\:text-\\[\\#fff\\]{color:#fff}.eloq\\:text-amber-500{color:var(--eloq-color-amber-500)}.eloq\\:text-amber-800{color:var(--eloq-color-amber-800)}.eloq\\:text-blue-500{color:var(--eloq-color-blue-500)}.eloq\\:text-blue-800{color:var(--eloq-color-blue-800)}.eloq\\:text-card-foreground{color:hsl(var(--card-foreground))}.eloq\\:text-destructive{color:hsl(var(--destructive))}.eloq\\:text-foreground{color:hsl(var(--foreground))}.eloq\\:text-gray-300{color:var(--eloq-color-gray-300)}.eloq\\:text-gray-400{color:var(--eloq-color-gray-400)}.eloq\\:text-gray-500{color:var(--eloq-color-gray-500)}.eloq\\:text-green-500{color:var(--eloq-color-green-500)}.eloq\\:text-green-800{color:var(--eloq-color-green-800)}.eloq\\:text-muted{color:hsl(var(--muted))}.eloq\\:text-muted-foreground{color:hsl(var(--muted-foreground))}.eloq\\:text-primary{color:hsl(var(--primary))}.eloq\\:text-primary-foreground{color:hsl(var(--primary-foreground))}.eloq\\:text-red-500{color:var(--eloq-color-red-500)}.eloq\\:text-red-800{color:var(--eloq-color-red-800)}.eloq\\:text-white{color:var(--eloq-color-white)}.eloq\\:text-yellow-400{color:var(--eloq-color-yellow-400)}.eloq\\:italic{font-style:italic}.eloq\\:underline{text-decoration-line:underline}.eloq\\:opacity-0{opacity:0}.eloq\\:opacity-50{opacity:.5}.eloq\\:opacity-70{opacity:.7}.eloq\\:opacity-75{opacity:.75}.eloq\\:opacity-100{opacity:1}.eloq\\:shadow-\\[0_-8px_24px_rgba\\(0\\,0\\,0\\,0\\.08\\)\\]{--tw-shadow:0 -8px 24px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:shadow-\\[0_0_4px_0_rgba\\(0\\,0\\,0\\,0\\.20\\)\\]{--tw-shadow:0 0 4px 0 var(--tw-shadow-color,#0003);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:shadow-\\[0_3px_4px_-2px_rgba\\(0\\,0\\,0\\,0\\.04\\)\\]{--tw-shadow:0 3px 4px -2px var(--tw-shadow-color,#0000000a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.eloq\\:outline-2{outline-style:var(--tw-outline-style);outline-width:2px}.eloq\\:outline-offset-2{outline-offset:2px}.eloq\\:outline-transparent{outline-color:#0000}.eloq\\:drop-shadow-lg{--tw-drop-shadow-size:drop-shadow(0 4px 4px var(--tw-drop-shadow-color,#00000026));--tw-drop-shadow:drop-shadow(var(--eloq-drop-shadow-lg));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.eloq\\:transition-\\[outline-color\\]{transition-property:outline-color;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-\\[visibility\\]{transition-property:visibility;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-\\[width\\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:delay-100{transition-delay:.1s}.eloq\\:duration-0{--tw-duration:0s;transition-duration:0s}.eloq\\:duration-150{--tw-duration:.15s;transition-duration:.15s}.eloq\\:duration-200{--tw-duration:.2s;transition-duration:.2s}.eloq\\:duration-300{--tw-duration:.3s;transition-duration:.3s}.eloq\\:duration-500{--tw-duration:.5s;transition-duration:.5s}.eloq\\:ease-out{--tw-ease:var(--eloq-ease-out);transition-timing-function:var(--eloq-ease-out)}.eloq\\:outline-none{--tw-outline-style:none;outline-style:none}.eloq\\:select-none{-webkit-user-select:none;user-select:none}.eloq\\:group-focus-visible\\:block:is(:where(.eloq\\:group):focus-visible *){display:block}.eloq\\:placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.eloq\\:last\\:mb-0:last-child{margin-bottom:0}@media(hover:hover){.eloq\\:hover\\:bg-black\\/5:hover{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:hover\\:bg-black\\/5:hover{background-color:color-mix(in oklab,var(--eloq-color-black) 5%,transparent)}}.eloq\\:hover\\:bg-black\\/80:hover{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:hover\\:bg-black\\/80:hover{background-color:color-mix(in oklab,var(--eloq-color-black) 80%,transparent)}}.eloq\\:hover\\:bg-muted:hover{background-color:hsl(var(--muted))}.eloq\\:hover\\:text-foreground:hover{color:hsl(var(--foreground))}.eloq\\:hover\\:text-gray-600:hover{color:var(--eloq-color-gray-600)}.eloq\\:hover\\:text-primary:hover{color:hsl(var(--primary))}.eloq\\:hover\\:opacity-80:hover{opacity:.8}.eloq\\:hover\\:opacity-90:hover{opacity:.9}.eloq\\:hover\\:opacity-100:hover{opacity:1}.eloq\\:hover\\:drop-shadow-xl:hover{--tw-drop-shadow-size:drop-shadow(0 9px 7px var(--tw-drop-shadow-color,#0000001a));--tw-drop-shadow:drop-shadow(var(--eloq-drop-shadow-xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}.eloq\\:focus-visible\\:opacity-100:focus-visible{opacity:1}.eloq\\:focus-visible\\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:focus-visible\\:ring-muted:focus-visible{--tw-ring-color:hsl(var(--muted))}.eloq\\:focus-visible\\:ring-primary:focus-visible{--tw-ring-color:hsl(var(--primary))}.eloq\\:focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.eloq\\:focus-visible\\:outline-hidden:focus-visible{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.eloq\\:focus-visible\\:outline-hidden:focus-visible{outline-offset:2px;outline:2px solid #0000}}.eloq\\:focus-visible\\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.eloq\\:focus-visible\\:-outline-offset-4:focus-visible{outline-offset:-4px}.eloq\\:focus-visible\\:outline-current:focus-visible{outline-color:currentColor}.eloq\\:focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.eloq\\:focus-visible\\:outline-solid:focus-visible{--tw-outline-style:solid;outline-style:solid}.eloq\\:active\\:cursor-grabbing:active{cursor:grabbing}.eloq\\:disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.eloq\\:disabled\\:opacity-50:disabled{opacity:.5}.eloq\\:has-focus-visible\\:outline-2:has(:focus-visible){outline-style:var(--tw-outline-style);outline-width:2px}.eloq\\:has-focus-visible\\:outline-offset-1:has(:focus-visible){outline-offset:1px}.eloq\\:has-focus-visible\\:outline-ring:has(:focus-visible){outline-color:hsl(var(--ring))}@media(prefers-reduced-motion:reduce){.eloq\\:motion-reduce\\:animate-none{animation:none}.eloq\\:motion-reduce\\:opacity-70{opacity:.7}}@media(min-width:40rem){.eloq\\:sm\\:text-sm{font-size:var(--eloq-text-sm);line-height:var(--tw-leading,var(--eloq-text-sm--line-height))}}@media(min-width:48rem){.eloq\\:md\\:text-sm{font-size:var(--eloq-text-sm);line-height:var(--tw-leading,var(--eloq-text-sm--line-height))}}.eloq\\:dark\\:border:is(.dark *){border-style:var(--tw-border-style);border-width:1px}.eloq\\:dark\\:border-b:is(.dark *){border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.eloq\\:dark\\:border-border:is(.dark *){border-color:hsl(var(--border))}.eloq\\:dark\\:bg-amber-400\\/10:is(.dark *){background-color:var(--eloq-color-amber-400)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-amber-400\\/10:is(.dark *){background-color:color-mix(in oklab,var(--eloq-color-amber-400) 10%,transparent)}}.eloq\\:dark\\:bg-blue-500\\/10:is(.dark *){background-color:var(--eloq-color-blue-500)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-blue-500\\/10:is(.dark *){background-color:color-mix(in oklab,var(--eloq-color-blue-500) 10%,transparent)}}.eloq\\:dark\\:bg-card:is(.dark *){background-color:hsl(var(--card))}.eloq\\:dark\\:bg-gray-100:is(.dark *){background-color:var(--eloq-color-gray-100)}.eloq\\:dark\\:bg-gray-200:is(.dark *){background-color:var(--eloq-color-gray-200)}.eloq\\:dark\\:bg-green-500\\/10:is(.dark *){background-color:var(--eloq-color-green-500)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-green-500\\/10:is(.dark *){background-color:color-mix(in oklab,var(--eloq-color-green-500) 10%,transparent)}}.eloq\\:dark\\:bg-muted:is(.dark *){background-color:hsl(var(--muted))}.eloq\\:dark\\:bg-red-500\\/10:is(.dark *){background-color:var(--eloq-color-red-500)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-red-500\\/10:is(.dark *){background-color:color-mix(in oklab,var(--eloq-color-red-500) 10%,transparent)}}.eloq\\:dark\\:text-amber-200:is(.dark *){color:var(--eloq-color-amber-200)}.eloq\\:dark\\:text-amber-400:is(.dark *){color:var(--eloq-color-amber-400)}.eloq\\:dark\\:text-blue-200:is(.dark *){color:var(--eloq-color-blue-200)}.eloq\\:dark\\:text-blue-400:is(.dark *){color:var(--eloq-color-blue-400)}.eloq\\:dark\\:text-gray-500:is(.dark *){color:var(--eloq-color-gray-500)}.eloq\\:dark\\:text-gray-900:is(.dark *){color:var(--eloq-color-gray-900)}.eloq\\:dark\\:text-green-200:is(.dark *){color:var(--eloq-color-green-200)}.eloq\\:dark\\:text-green-400:is(.dark *){color:var(--eloq-color-green-400)}.eloq\\:dark\\:text-muted-foreground:is(.dark *),.eloq\\:dark\\:text-muted-foreground\\/50:is(.dark *){color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:text-muted-foreground\\/50:is(.dark *){color:color-mix(in oklab,hsl(var(--muted-foreground)) 50%,transparent)}}.eloq\\:dark\\:text-red-200:is(.dark *){color:var(--eloq-color-red-200)}.eloq\\:dark\\:text-red-400:is(.dark *){color:var(--eloq-color-red-400)}.eloq\\:dark\\:shadow-none:is(.dark *){--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}@media(hover:hover){.eloq\\:dark\\:hover\\:bg-white\\/10:is(.dark *):hover{background-color:var(--eloq-color-white)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:hover\\:bg-white\\/10:is(.dark *):hover{background-color:color-mix(in oklab,var(--eloq-color-white) 10%,transparent)}}.eloq\\:dark\\:hover\\:text-gray-300:is(.dark *):hover{color:var(--eloq-color-gray-300)}.eloq\\:dark\\:hover\\:text-primary:is(.dark *):hover{color:hsl(var(--primary))}}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}}body{background-color:#0000}.eloquent-chat{font-family:system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol}.collapse{visibility:unset!important}.eloq-wrap-anywhere{overflow-wrap:anywhere}.eloq-thin-scrollbar{scrollbar-width:thin;scrollbar-color:hsl(var(--border)) transparent}.eloq-thin-scrollbar::-webkit-scrollbar{width:8px;height:8px}.eloq-thin-scrollbar::-webkit-scrollbar-thumb{background-color:hsl(var(--border));border-radius:9999px}.eloq-thin-scrollbar::-webkit-scrollbar-track{background-color:#0000}.eloq-test-mode-stripe{background:repeating-linear-gradient(-45deg,#f6e05e,#f6e05e 10px,#000 10px 20px)}.eloq-thinking-shimmer{--eloq-thinking-base:#9ca3af;--eloq-thinking-highlight:#4b5563;background:linear-gradient(90deg,var(--eloq-thinking-base) 0%,var(--eloq-thinking-base) 35%,var(--eloq-thinking-highlight) 50%,var(--eloq-thinking-base) 65%,var(--eloq-thinking-base) 100%);color:#0000;background-size:200% 100%;-webkit-background-clip:text;background-clip:text}.dark .eloq-thinking-shimmer{--eloq-thinking-base:#6b7280;--eloq-thinking-highlight:#e5e7eb}@media(prefers-reduced-motion:reduce){.eloq-thinking-shimmer{color:var(--eloq-thinking-base);background:0 0}}.eloq-regenerating-text{opacity:.4;transition:opacity .25s ease-out}.eloq-regenerating-sweep{border-radius:inherit;pointer-events:none;background:linear-gradient(100deg,#0000 30%,#ffffff8c,#0000 70%) 0 0/200% 100%;position:absolute;inset:0}.dark .eloq-regenerating-sweep{background-image:linear-gradient(100deg,#0000 30%,#ffffff1f,#0000 70%)}@media(prefers-reduced-motion:reduce){.eloq-regenerating-sweep{display:none}}@property --eloq-aura-angle{syntax:"<angle>";inherits:false;initial-value:0deg}.eloq-aura{--eloq-aura-strong:#9e9e9e;--eloq-aura-soft:#d1d1d1;background:conic-gradient(from var(--eloq-aura-angle),var(--eloq-aura-strong),var(--eloq-aura-soft),var(--eloq-aura-strong));border-radius:9999px;padding:2px;animation:2.6s linear infinite eloq-aura-spin;position:relative}@keyframes eloq-aura-spin{to{--eloq-aura-angle:360deg}}.eloq-aura-shine{border-radius:inherit;pointer-events:none;position:absolute;inset:0;overflow:hidden}.eloq-aura-shine:after{content:"";background:linear-gradient(90deg,#0000,#fffc,#0000);width:18%;position:absolute;top:-20%;bottom:-20%;left:0;transform:translate(-200%)skew(-20deg)}.eloq-aura-shine--active:after{animation:1.1s ease-in-out both eloq-aura-shine-sweep}@keyframes eloq-aura-shine-sweep{0%{transform:translate(-200%)skew(-20deg)}to{transform:translate(700%)skew(-20deg)}}@media(prefers-reduced-motion:reduce){.eloq-aura{animation:none}.eloq-aura-shine:after,.eloq-aura-shine--active:after{opacity:0;animation:none}}@keyframes panel-in{0%{opacity:0;transform:scale(.05)}to{opacity:1;transform:scale(1)}}@keyframes thinking-dot{0%,60%,to{opacity:.45;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}@keyframes regenerating-sweep{0%{background-position:150% 0}to{background-position:-50% 0}}@keyframes text-in{0%{opacity:0}to{opacity:1}}@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)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}', oo = ".eloquentai-chat-launcher{transition:transform .2s ease-in-out}.eloquentai-chat-launcher:hover{transform:scale(1.1)}", ro = [
|
|
36
|
+
const Je = '/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--eloq-aura-angle:0deg}}}@layer theme{:root,:host{--eloq-font-sans:system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--eloq-font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--eloq-color-red-50:oklch(97.1% .013 17.38);--eloq-color-red-200:oklch(88.5% .062 18.334);--eloq-color-red-400:oklch(70.4% .191 22.216);--eloq-color-red-500:oklch(63.7% .237 25.331);--eloq-color-red-800:oklch(44.4% .177 26.899);--eloq-color-amber-50:oklch(98.7% .022 95.277);--eloq-color-amber-200:oklch(92.4% .12 95.746);--eloq-color-amber-400:oklch(82.8% .189 84.429);--eloq-color-amber-500:oklch(76.9% .188 70.08);--eloq-color-amber-800:oklch(47.3% .137 46.201);--eloq-color-yellow-400:oklch(85.2% .199 91.936);--eloq-color-green-50:oklch(98.2% .018 155.826);--eloq-color-green-200:oklch(92.5% .084 155.995);--eloq-color-green-400:oklch(79.2% .209 151.711);--eloq-color-green-500:oklch(72.3% .219 149.579);--eloq-color-green-800:oklch(44.8% .119 151.328);--eloq-color-blue-50:oklch(97% .014 254.604);--eloq-color-blue-200:oklch(88.2% .059 254.128);--eloq-color-blue-400:oklch(70.7% .165 254.624);--eloq-color-blue-500:oklch(62.3% .214 259.815);--eloq-color-blue-800:oklch(42.4% .199 265.638);--eloq-color-gray-100:oklch(96.7% .003 264.542);--eloq-color-gray-200:oklch(92.8% .006 264.531);--eloq-color-gray-300:oklch(87.2% .01 258.338);--eloq-color-gray-400:oklch(70.7% .022 261.325);--eloq-color-gray-500:oklch(55.1% .027 264.364);--eloq-color-gray-600:oklch(44.6% .03 256.802);--eloq-color-gray-900:oklch(21% .034 264.665);--eloq-color-black:#000;--eloq-color-white:#fff;--eloq-spacing:.25rem;--eloq-container-xs:20rem;--eloq-text-xs:.75rem;--eloq-text-xs--line-height:calc(1 / .75);--eloq-text-sm:.875rem;--eloq-text-sm--line-height:calc(1.25 / .875);--eloq-text-base:1rem;--eloq-text-base--line-height: 1.5 ;--eloq-text-2xl:1.5rem;--eloq-text-2xl--line-height:calc(2 / 1.5);--eloq-font-weight-medium:500;--eloq-font-weight-semibold:600;--eloq-tracking-tight:-.025em;--eloq-leading-relaxed:1.625;--eloq-radius-sm:calc(var(--radius) - 4px);--eloq-radius-md:calc(var(--radius) - 2px);--eloq-radius-lg:var(--radius);--eloq-radius-xl:.75rem;--eloq-radius-2xl:1rem;--eloq-radius-3xl:1.5rem;--eloq-drop-shadow-lg:0 4px 4px #00000026;--eloq-drop-shadow-xl:0 9px 7px #0000001a;--eloq-ease-out:cubic-bezier(0, 0, .2, 1);--eloq-animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--eloq-default-transition-duration:.15s;--eloq-default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--eloq-default-font-family:var(--eloq-font-sans);--eloq-default-mono-font-family:var(--eloq-font-mono);--eloq-animate-panel-in:panel-in .35s cubic-bezier(.16, 1, .3, 1) both;--eloq-animate-panel-out:panel-out .25s cubic-bezier(.4, 0, 1, 1) both;--eloq-animate-panel-fade-in:fade-in .35s ease-out both;--eloq-animate-panel-fade-out:fade-out .25s ease-in both;--eloq-animate-message-fade-in:fade-in .3s ease-out both;--eloq-animate-thinking-dot:thinking-dot 1.2s ease-in-out infinite;--eloq-animate-thinking-shimmer:thinking-shimmer 1.8s linear infinite;--eloq-animate-regenerating:regenerating-sweep 1.2s linear infinite;--eloq-animate-text-in:fade-in .35s ease-out both;--eloq-animate-message-in:message-in .3s ease-out both;--eloq-animate-slide-up-in:slide-up-in .3s ease-out both}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--eloq-default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--eloq-default-font-feature-settings,normal);font-variation-settings:var(--eloq-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--eloq-default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--eloq-default-mono-font-feature-settings,normal);font-variation-settings:var(--eloq-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:root{--background:0 0% 100%;--foreground:0 0% 3.9%;--card:0 0% 100%;--card-foreground:0 0% 3.9%;--popover:0 0% 100%;--popover-foreground:0 0% 3.9%;--primary:267 56% 46%;--primary-foreground:0 0% 98%;--secondary:0 0% 96.1%;--secondary-foreground:0 0% 9%;--muted:0 0% 96.1%;--muted-foreground:0 0% 45.1%;--accent:0 0% 96.1%;--accent-foreground:0 0% 9%;--destructive:0 84.2% 60.2%;--destructive-foreground:0 0% 98%;--border:0 0% 89.8%;--input:0 0% 89.8%;--ring:0 0% 3.9%;--cream:37.5 44% 96.5%;--chart-1:12 76% 61%;--chart-2:173 58% 39%;--chart-3:197 37% 24%;--chart-4:43 74% 66%;--chart-5:27 87% 67%;--radius:.5rem}.dark{--background:262 50% 10%;--foreground:262 5% 90%;--card:262 50% 10%;--card-foreground:262 5% 90%;--popover:262 50% 5%;--popover-foreground:262 5% 90%;--primary:262 62% 70%;--primary-foreground:0 0% 100%;--primary-dark:262 62% 60%;--secondary:262 30% 30%;--secondary-foreground:0 0% 100%;--secondary-dark:262 30% 20%;--secondary-light:262 30% 40%;--tertiary:267 56% 46%;--tertiary-foreground:0 0% 100%;--tertiary-dark:267 38% 25%;--tertiary-light:263 100% 85%;--muted:224 30% 25%;--muted-foreground:262 5% 90%;--accent:224 30% 25%;--accent-foreground:262 5% 100%;--accent-dark:224 30% 15%;--destructive:0 100% 30%;--destructive-foreground:262 5% 90%;--border:0 0% 30%;--input:262 30% 25%;--ring:262 62% 71%;--cream:257 28% 20%;--radius:.5rem;--sidebar-background:var(--background);--sidebar-foreground:var(--foreground);--sidebar-primary:var(--primary);--sidebar-primary-foreground:var(--primary-foreground);--sidebar-accent:var(--accent);--sidebar-accent-foreground:var(--accent-foreground);--sidebar-border:var(--border);--sidebar-ring:var(--ring)}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}}@layer components;@layer utilities{.eloq\\:pointer-events-none{pointer-events:none}.eloq\\:invisible{visibility:hidden}.eloq\\:sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.eloq\\:absolute{position:absolute}.eloq\\:relative{position:relative}.eloq\\:inset-0{inset:0}.eloq\\:inset-0\\.5{inset:calc(var(--eloq-spacing) * .5)}.eloq\\:inset-x-0{inset-inline:0}.eloq\\:end-full{inset-inline-end:100%}.eloq\\:top-0{top:0}.eloq\\:top-0\\.5{top:calc(var(--eloq-spacing) * .5)}.eloq\\:top-1\\/2{top:50%}.eloq\\:top-\\[2px\\]{top:2px}.eloq\\:-right-\\[9px\\]{right:-9px}.eloq\\:right-0\\.5{right:calc(var(--eloq-spacing) * .5)}.eloq\\:right-2{right:calc(var(--eloq-spacing) * 2)}.eloq\\:right-16{right:calc(var(--eloq-spacing) * 16)}.eloq\\:right-\\[2px\\]{right:2px}.eloq\\:bottom-0{bottom:0}.eloq\\:bottom-1{bottom:var(--eloq-spacing)}.eloq\\:bottom-2{bottom:calc(var(--eloq-spacing) * 2)}.eloq\\:bottom-10{bottom:calc(var(--eloq-spacing) * 10)}.eloq\\:left-0{left:0}.eloq\\:left-2{left:calc(var(--eloq-spacing) * 2)}.eloq\\:left-\\[calc\\(50\\%-0\\.75rem\\)\\]{left:calc(50% - .75rem)}.eloq\\:z-10{z-index:10}.eloq\\:z-20{z-index:20}.eloq\\:z-30{z-index:30}.eloq\\:m-0{margin:0}.eloq\\:m-auto{margin:auto}.eloq\\:mx-1{margin-inline:var(--eloq-spacing)}.eloq\\:mx-auto{margin-inline:auto}.eloq\\:my-2{margin-block:calc(var(--eloq-spacing) * 2)}.eloq\\:my-4{margin-block:calc(var(--eloq-spacing) * 4)}.eloq\\:me-1{margin-inline-end:var(--eloq-spacing)}.eloq\\:-mt-2{margin-top:calc(var(--eloq-spacing) * -2)}.eloq\\:-mt-6{margin-top:calc(var(--eloq-spacing) * -6)}.eloq\\:-mt-20{margin-top:calc(var(--eloq-spacing) * -20)}.eloq\\:mt-1{margin-top:var(--eloq-spacing)}.eloq\\:mt-2{margin-top:calc(var(--eloq-spacing) * 2)}.eloq\\:mt-10{margin-top:calc(var(--eloq-spacing) * 10)}.eloq\\:mr-1{margin-right:var(--eloq-spacing)}.eloq\\:mr-\\[2px\\]{margin-right:2px}.eloq\\:mb-1{margin-bottom:var(--eloq-spacing)}.eloq\\:mb-3{margin-bottom:calc(var(--eloq-spacing) * 3)}.eloq\\:mb-4{margin-bottom:calc(var(--eloq-spacing) * 4)}.eloq\\:mb-10{margin-bottom:calc(var(--eloq-spacing) * 10)}.eloq\\:ml-0{margin-left:0}.eloq\\:ml-1{margin-left:var(--eloq-spacing)}.eloq\\:ml-5{margin-left:calc(var(--eloq-spacing) * 5)}.eloq\\:box-content{box-sizing:content-box}.eloq\\:block{display:block}.eloq\\:flex{display:flex}.eloq\\:hidden{display:none}.eloq\\:inline-flex{display:inline-flex}.eloq\\:field-sizing-content{field-sizing:content}.eloq\\:aspect-square{aspect-ratio:1}.eloq\\:h-1{height:var(--eloq-spacing)}.eloq\\:h-2\\.5{height:calc(var(--eloq-spacing) * 2.5)}.eloq\\:h-3{height:calc(var(--eloq-spacing) * 3)}.eloq\\:h-4{height:calc(var(--eloq-spacing) * 4)}.eloq\\:h-5{height:calc(var(--eloq-spacing) * 5)}.eloq\\:h-6{height:calc(var(--eloq-spacing) * 6)}.eloq\\:h-8{height:calc(var(--eloq-spacing) * 8)}.eloq\\:h-10{height:calc(var(--eloq-spacing) * 10)}.eloq\\:h-12{height:calc(var(--eloq-spacing) * 12)}.eloq\\:h-14{height:calc(var(--eloq-spacing) * 14)}.eloq\\:h-16{height:calc(var(--eloq-spacing) * 16)}.eloq\\:h-\\[0\\.42em\\]{height:.42em}.eloq\\:h-\\[160px\\]{height:160px}.eloq\\:h-\\[220px\\]{height:220px}.eloq\\:h-\\[560px\\]{height:560px}.eloq\\:h-\\[600px\\]{height:600px}.eloq\\:h-full{height:100%}.eloq\\:max-h-\\[132px\\]{max-height:132px}.eloq\\:min-h-6{min-height:calc(var(--eloq-spacing) * 6)}.eloq\\:min-h-\\[48px\\]{min-height:48px}.eloq\\:min-h-\\[80px\\]{min-height:80px}.eloq\\:w-2\\.5{width:calc(var(--eloq-spacing) * 2.5)}.eloq\\:w-2\\/3{width:66.6667%}.eloq\\:w-3{width:calc(var(--eloq-spacing) * 3)}.eloq\\:w-4{width:calc(var(--eloq-spacing) * 4)}.eloq\\:w-5{width:calc(var(--eloq-spacing) * 5)}.eloq\\:w-6{width:calc(var(--eloq-spacing) * 6)}.eloq\\:w-8{width:calc(var(--eloq-spacing) * 8)}.eloq\\:w-10{width:calc(var(--eloq-spacing) * 10)}.eloq\\:w-12{width:calc(var(--eloq-spacing) * 12)}.eloq\\:w-14{width:calc(var(--eloq-spacing) * 14)}.eloq\\:w-16{width:calc(var(--eloq-spacing) * 16)}.eloq\\:w-24{width:calc(var(--eloq-spacing) * 24)}.eloq\\:w-32{width:calc(var(--eloq-spacing) * 32)}.eloq\\:w-48{width:calc(var(--eloq-spacing) * 48)}.eloq\\:w-\\[0\\.42em\\]{width:.42em}.eloq\\:w-\\[70\\%\\]{width:70%}.eloq\\:w-\\[320px\\]{width:320px}.eloq\\:w-\\[340px\\]{width:340px}.eloq\\:w-\\[348px\\]{width:348px}.eloq\\:w-\\[380px\\]{width:380px}.eloq\\:w-\\[420px\\]{width:420px}.eloq\\:w-full{width:100%}.eloq\\:max-w-\\[75\\%\\]{max-width:75%}.eloq\\:max-w-\\[88\\%\\]{max-width:88%}.eloq\\:max-w-full{max-width:100%}.eloq\\:max-w-xs{max-width:var(--eloq-container-xs)}.eloq\\:min-w-0{min-width:0}.eloq\\:min-w-6{min-width:calc(var(--eloq-spacing) * 6)}.eloq\\:min-w-min{min-width:min-content}.eloq\\:flex-1{flex:1}.eloq\\:flex-none{flex:none}.eloq\\:flex-shrink-0,.eloq\\:shrink-0{flex-shrink:0}.eloq\\:flex-grow{flex-grow:1}.eloq\\:origin-bottom-right{transform-origin:100% 100%}.eloq\\:translate-x-0{--tw-translate-x:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.eloq\\:translate-x-8{--tw-translate-x:calc(var(--eloq-spacing) * 8);translate:var(--tw-translate-x) var(--tw-translate-y)}.eloq\\:-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.eloq\\:scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.eloq\\:scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.eloq\\:-scale-x-100{--tw-scale-x: -100% ;scale:var(--tw-scale-x) var(--tw-scale-y)}.eloq\\:scale-\\[0\\.05\\]{scale:.05}.eloq\\:transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.eloq\\:animate-message-in{animation:var(--eloq-animate-message-in)}.eloq\\:animate-panel-in{animation:var(--eloq-animate-panel-in)}.eloq\\:animate-panel-out{animation:var(--eloq-animate-panel-out)}.eloq\\:animate-pulse{animation:var(--eloq-animate-pulse)}.eloq\\:animate-regenerating{animation:var(--eloq-animate-regenerating)}.eloq\\:animate-text-in{animation:var(--eloq-animate-text-in)}.eloq\\:animate-thinking-shimmer{animation:var(--eloq-animate-thinking-shimmer)}.eloq\\:cursor-default{cursor:default}.eloq\\:cursor-grab{cursor:grab}.eloq\\:cursor-pointer{cursor:pointer}.eloq\\:touch-none{touch-action:none}.eloq\\:resize-none{resize:none}.eloq\\:list-decimal{list-style-type:decimal}.eloq\\:list-disc{list-style-type:disc}.eloq\\:flex-col{flex-direction:column}.eloq\\:flex-row{flex-direction:row}.eloq\\:flex-wrap{flex-wrap:wrap}.eloq\\:items-center{align-items:center}.eloq\\:items-end{align-items:flex-end}.eloq\\:items-start{align-items:flex-start}.eloq\\:justify-between{justify-content:space-between}.eloq\\:justify-center{justify-content:center}.eloq\\:justify-end{justify-content:flex-end}.eloq\\:justify-start{justify-content:flex-start}.eloq\\:gap-1{gap:var(--eloq-spacing)}.eloq\\:gap-1\\.5{gap:calc(var(--eloq-spacing) * 1.5)}.eloq\\:gap-2{gap:calc(var(--eloq-spacing) * 2)}.eloq\\:gap-3{gap:calc(var(--eloq-spacing) * 3)}.eloq\\:gap-\\[0\\.25em\\]{gap:.25em}:where(.eloq\\:space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block:0}:where(.eloq\\:space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--eloq-spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--eloq-spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--eloq-spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--eloq-spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--eloq-spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--eloq-spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--eloq-spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--eloq-spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--eloq-spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--eloq-spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(var(--eloq-spacing) * var(--tw-space-x-reverse));margin-inline-end:calc(var(--eloq-spacing) * calc(1 - var(--tw-space-x-reverse)))}:where(.eloq\\:space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--eloq-spacing) * 2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--eloq-spacing) * 2) * calc(1 - var(--tw-space-x-reverse)))}:where(.eloq\\:space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--eloq-spacing) * 3) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--eloq-spacing) * 3) * calc(1 - var(--tw-space-x-reverse)))}.eloq\\:self-end{align-self:flex-end}.eloq\\:self-stretch{align-self:stretch}.eloq\\:overflow-hidden{overflow:hidden}.eloq\\:overflow-x-auto{overflow-x:auto}.eloq\\:overscroll-contain{overscroll-behavior:contain}.eloq\\:rounded{border-radius:.25rem}.eloq\\:rounded-2xl{border-radius:var(--eloq-radius-2xl)}.eloq\\:rounded-3xl{border-radius:var(--eloq-radius-3xl)}.eloq\\:rounded-\\[inherit\\]{border-radius:inherit}.eloq\\:rounded-full{border-radius:3.40282e38px}.eloq\\:rounded-lg{border-radius:var(--eloq-radius-lg)}.eloq\\:rounded-md{border-radius:var(--eloq-radius-md)}.eloq\\:rounded-none{border-radius:0}.eloq\\:rounded-sm{border-radius:var(--eloq-radius-sm)}.eloq\\:rounded-xl{border-radius:var(--eloq-radius-xl)}.eloq\\:rounded-t-2xl{border-top-left-radius:var(--eloq-radius-2xl);border-top-right-radius:var(--eloq-radius-2xl)}.eloq\\:border{border-style:var(--tw-border-style);border-width:1px}.eloq\\:border-0{border-style:var(--tw-border-style);border-width:0}.eloq\\:border-2{border-style:var(--tw-border-style);border-width:2px}.eloq\\:border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.eloq\\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.eloq\\:border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.eloq\\:border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.eloq\\:border-dashed{--tw-border-style:dashed;border-style:dashed}.eloq\\:border-amber-400{border-color:var(--eloq-color-amber-400)}.eloq\\:border-blue-500{border-color:var(--eloq-color-blue-500)}.eloq\\:border-border{border-color:hsl(var(--border))}.eloq\\:border-current{border-color:currentColor}.eloq\\:border-green-500{border-color:var(--eloq-color-green-500)}.eloq\\:border-input{border-color:hsl(var(--input))}.eloq\\:border-red-500{border-color:var(--eloq-color-red-500)}.eloq\\:border-t-transparent{border-top-color:#0000}.eloq\\:border-l-transparent{border-left-color:#0000}.eloq\\:bg-\\[\\#0a0a0a\\]{background-color:#0a0a0a}.eloq\\:bg-\\[\\#000\\]{background-color:#000}.eloq\\:bg-\\[\\#fff\\]{background-color:#fff}.eloq\\:bg-amber-50{background-color:var(--eloq-color-amber-50)}.eloq\\:bg-background{background-color:hsl(var(--background))}.eloq\\:bg-black\\/20{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:bg-black\\/20{background-color:color-mix(in oklab,var(--eloq-color-black) 20%,transparent)}}.eloq\\:bg-black\\/60{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:bg-black\\/60{background-color:color-mix(in oklab,var(--eloq-color-black) 60%,transparent)}}.eloq\\:bg-blue-50{background-color:var(--eloq-color-blue-50)}.eloq\\:bg-border{background-color:hsl(var(--border))}.eloq\\:bg-card{background-color:hsl(var(--card))}.eloq\\:bg-cream{background-color:hsl(var(--cream))}.eloq\\:bg-gray-400{background-color:var(--eloq-color-gray-400)}.eloq\\:bg-gray-900{background-color:var(--eloq-color-gray-900)}.eloq\\:bg-green-50{background-color:var(--eloq-color-green-50)}.eloq\\:bg-muted{background-color:hsl(var(--muted))}.eloq\\:bg-muted-foreground{background-color:hsl(var(--muted-foreground))}.eloq\\:bg-primary{background-color:hsl(var(--primary))}.eloq\\:bg-red-50{background-color:var(--eloq-color-red-50)}.eloq\\:bg-white,.eloq\\:bg-white\\/20{background-color:var(--eloq-color-white)}@supports (color:color-mix(in lab,red,red)){.eloq\\:bg-white\\/20{background-color:color-mix(in oklab,var(--eloq-color-white) 20%,transparent)}}.eloq\\:fill-none{fill:none}.eloq\\:fill-yellow-400{fill:var(--eloq-color-yellow-400)}.eloq\\:object-contain{object-fit:contain}.eloq\\:object-cover{object-fit:cover}.eloq\\:p-0{padding:0}.eloq\\:p-0\\.5{padding:calc(var(--eloq-spacing) * .5)}.eloq\\:p-1{padding:var(--eloq-spacing)}.eloq\\:p-2{padding:calc(var(--eloq-spacing) * 2)}.eloq\\:p-3{padding:calc(var(--eloq-spacing) * 3)}.eloq\\:p-4{padding:calc(var(--eloq-spacing) * 4)}.eloq\\:p-6{padding:calc(var(--eloq-spacing) * 6)}.eloq\\:p-\\[1px\\]{padding:1px}.eloq\\:p-\\[7px\\]{padding:7px}.eloq\\:px-0{padding-inline:0}.eloq\\:px-1\\.5{padding-inline:calc(var(--eloq-spacing) * 1.5)}.eloq\\:px-2{padding-inline:calc(var(--eloq-spacing) * 2)}.eloq\\:px-3{padding-inline:calc(var(--eloq-spacing) * 3)}.eloq\\:px-4{padding-inline:calc(var(--eloq-spacing) * 4)}.eloq\\:px-5{padding-inline:calc(var(--eloq-spacing) * 5)}.eloq\\:px-\\[12px\\]{padding-inline:12px}.eloq\\:px-\\[16px\\]{padding-inline:16px}.eloq\\:py-0\\.5{padding-block:calc(var(--eloq-spacing) * .5)}.eloq\\:py-1{padding-block:var(--eloq-spacing)}.eloq\\:py-1\\.5{padding-block:calc(var(--eloq-spacing) * 1.5)}.eloq\\:py-2{padding-block:calc(var(--eloq-spacing) * 2)}.eloq\\:py-3{padding-block:calc(var(--eloq-spacing) * 3)}.eloq\\:py-3\\.5{padding-block:calc(var(--eloq-spacing) * 3.5)}.eloq\\:py-\\[8px\\]{padding-block:8px}.eloq\\:py-\\[12px\\]{padding-block:12px}.eloq\\:pt-0{padding-top:0}.eloq\\:pt-2{padding-top:calc(var(--eloq-spacing) * 2)}.eloq\\:pt-4{padding-top:calc(var(--eloq-spacing) * 4)}.eloq\\:pt-5{padding-top:calc(var(--eloq-spacing) * 5)}.eloq\\:pt-6{padding-top:calc(var(--eloq-spacing) * 6)}.eloq\\:pt-10{padding-top:calc(var(--eloq-spacing) * 10)}.eloq\\:pt-24{padding-top:calc(var(--eloq-spacing) * 24)}.eloq\\:pr-2{padding-right:calc(var(--eloq-spacing) * 2)}.eloq\\:pr-4{padding-right:calc(var(--eloq-spacing) * 4)}.eloq\\:pr-12{padding-right:calc(var(--eloq-spacing) * 12)}.eloq\\:pb-2{padding-bottom:calc(var(--eloq-spacing) * 2)}.eloq\\:pb-4{padding-bottom:calc(var(--eloq-spacing) * 4)}.eloq\\:pb-10{padding-bottom:calc(var(--eloq-spacing) * 10)}.eloq\\:pb-14{padding-bottom:calc(var(--eloq-spacing) * 14)}.eloq\\:pl-3{padding-left:calc(var(--eloq-spacing) * 3)}.eloq\\:pl-4{padding-left:calc(var(--eloq-spacing) * 4)}.eloq\\:pl-11{padding-left:calc(var(--eloq-spacing) * 11)}.eloq\\:text-center{text-align:center}.eloq\\:text-left{text-align:left}.eloq\\:text-2xl{font-size:var(--eloq-text-2xl);line-height:var(--tw-leading,var(--eloq-text-2xl--line-height))}.eloq\\:text-base{font-size:var(--eloq-text-base);line-height:var(--tw-leading,var(--eloq-text-base--line-height))}.eloq\\:text-sm{font-size:var(--eloq-text-sm);line-height:var(--tw-leading,var(--eloq-text-sm--line-height))}.eloq\\:text-xs{font-size:var(--eloq-text-xs);line-height:var(--tw-leading,var(--eloq-text-xs--line-height))}.eloq\\:text-\\[10px\\]{font-size:10px}.eloq\\:leading-5{--tw-leading:calc(var(--eloq-spacing) * 5);line-height:calc(var(--eloq-spacing) * 5)}.eloq\\:leading-none{--tw-leading:1;line-height:1}.eloq\\:leading-relaxed{--tw-leading:var(--eloq-leading-relaxed);line-height:var(--eloq-leading-relaxed)}.eloq\\:font-medium{--tw-font-weight:var(--eloq-font-weight-medium);font-weight:var(--eloq-font-weight-medium)}.eloq\\:font-semibold{--tw-font-weight:var(--eloq-font-weight-semibold);font-weight:var(--eloq-font-weight-semibold)}.eloq\\:tracking-tight{--tw-tracking:var(--eloq-tracking-tight);letter-spacing:var(--eloq-tracking-tight)}.eloq\\:whitespace-nowrap{white-space:nowrap}.eloq\\:text-\\[\\#000\\]{color:#000}.eloq\\:text-\\[\\#fff\\]{color:#fff}.eloq\\:text-amber-500{color:var(--eloq-color-amber-500)}.eloq\\:text-amber-800{color:var(--eloq-color-amber-800)}.eloq\\:text-blue-500{color:var(--eloq-color-blue-500)}.eloq\\:text-blue-800{color:var(--eloq-color-blue-800)}.eloq\\:text-card-foreground{color:hsl(var(--card-foreground))}.eloq\\:text-destructive{color:hsl(var(--destructive))}.eloq\\:text-foreground{color:hsl(var(--foreground))}.eloq\\:text-gray-300{color:var(--eloq-color-gray-300)}.eloq\\:text-gray-400{color:var(--eloq-color-gray-400)}.eloq\\:text-gray-500{color:var(--eloq-color-gray-500)}.eloq\\:text-green-500{color:var(--eloq-color-green-500)}.eloq\\:text-green-800{color:var(--eloq-color-green-800)}.eloq\\:text-muted{color:hsl(var(--muted))}.eloq\\:text-muted-foreground{color:hsl(var(--muted-foreground))}.eloq\\:text-primary{color:hsl(var(--primary))}.eloq\\:text-primary-foreground{color:hsl(var(--primary-foreground))}.eloq\\:text-red-500{color:var(--eloq-color-red-500)}.eloq\\:text-red-800{color:var(--eloq-color-red-800)}.eloq\\:text-white{color:var(--eloq-color-white)}.eloq\\:text-yellow-400{color:var(--eloq-color-yellow-400)}.eloq\\:italic{font-style:italic}.eloq\\:underline{text-decoration-line:underline}.eloq\\:opacity-0{opacity:0}.eloq\\:opacity-50{opacity:.5}.eloq\\:opacity-70{opacity:.7}.eloq\\:opacity-75{opacity:.75}.eloq\\:opacity-100{opacity:1}.eloq\\:shadow-\\[0_-8px_24px_rgba\\(0\\,0\\,0\\,0\\.08\\)\\]{--tw-shadow:0 -8px 24px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:shadow-\\[0_0_4px_0_rgba\\(0\\,0\\,0\\,0\\.20\\)\\]{--tw-shadow:0 0 4px 0 var(--tw-shadow-color,#0003);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:shadow-\\[0_3px_4px_-2px_rgba\\(0\\,0\\,0\\,0\\.04\\)\\]{--tw-shadow:0 3px 4px -2px var(--tw-shadow-color,#0000000a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.eloq\\:outline-2{outline-style:var(--tw-outline-style);outline-width:2px}.eloq\\:outline-offset-2{outline-offset:2px}.eloq\\:outline-transparent{outline-color:#0000}.eloq\\:drop-shadow-lg{--tw-drop-shadow-size:drop-shadow(0 4px 4px var(--tw-drop-shadow-color,#00000026));--tw-drop-shadow:drop-shadow(var(--eloq-drop-shadow-lg));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.eloq\\:transition-\\[outline-color\\]{transition-property:outline-color;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-\\[visibility\\]{transition-property:visibility;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-\\[width\\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:delay-100{transition-delay:.1s}.eloq\\:duration-0{--tw-duration:0s;transition-duration:0s}.eloq\\:duration-150{--tw-duration:.15s;transition-duration:.15s}.eloq\\:duration-200{--tw-duration:.2s;transition-duration:.2s}.eloq\\:duration-300{--tw-duration:.3s;transition-duration:.3s}.eloq\\:duration-500{--tw-duration:.5s;transition-duration:.5s}.eloq\\:ease-out{--tw-ease:var(--eloq-ease-out);transition-timing-function:var(--eloq-ease-out)}.eloq\\:outline-none{--tw-outline-style:none;outline-style:none}.eloq\\:select-none{-webkit-user-select:none;user-select:none}.eloq\\:group-focus-visible\\:block:is(:where(.eloq\\:group):focus-visible *){display:block}.eloq\\:placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.eloq\\:last\\:mb-0:last-child{margin-bottom:0}@media(hover:hover){.eloq\\:hover\\:bg-black\\/5:hover{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:hover\\:bg-black\\/5:hover{background-color:color-mix(in oklab,var(--eloq-color-black) 5%,transparent)}}.eloq\\:hover\\:bg-black\\/80:hover{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:hover\\:bg-black\\/80:hover{background-color:color-mix(in oklab,var(--eloq-color-black) 80%,transparent)}}.eloq\\:hover\\:bg-muted:hover{background-color:hsl(var(--muted))}.eloq\\:hover\\:bg-red-500:hover{background-color:var(--eloq-color-red-500)}.eloq\\:hover\\:text-foreground:hover{color:hsl(var(--foreground))}.eloq\\:hover\\:text-gray-600:hover{color:var(--eloq-color-gray-600)}.eloq\\:hover\\:text-primary:hover{color:hsl(var(--primary))}.eloq\\:hover\\:opacity-80:hover{opacity:.8}.eloq\\:hover\\:opacity-90:hover{opacity:.9}.eloq\\:hover\\:opacity-100:hover{opacity:1}.eloq\\:hover\\:drop-shadow-xl:hover{--tw-drop-shadow-size:drop-shadow(0 9px 7px var(--tw-drop-shadow-color,#0000001a));--tw-drop-shadow:drop-shadow(var(--eloq-drop-shadow-xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}.eloq\\:focus-visible\\:opacity-100:focus-visible{opacity:1}.eloq\\:focus-visible\\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:focus-visible\\:ring-muted:focus-visible{--tw-ring-color:hsl(var(--muted))}.eloq\\:focus-visible\\:ring-primary:focus-visible{--tw-ring-color:hsl(var(--primary))}.eloq\\:focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.eloq\\:focus-visible\\:outline-hidden:focus-visible{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.eloq\\:focus-visible\\:outline-hidden:focus-visible{outline-offset:2px;outline:2px solid #0000}}.eloq\\:focus-visible\\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.eloq\\:focus-visible\\:-outline-offset-4:focus-visible{outline-offset:-4px}.eloq\\:focus-visible\\:outline-current:focus-visible{outline-color:currentColor}.eloq\\:focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.eloq\\:focus-visible\\:outline-solid:focus-visible{--tw-outline-style:solid;outline-style:solid}.eloq\\:active\\:cursor-grabbing:active{cursor:grabbing}.eloq\\:disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.eloq\\:disabled\\:opacity-50:disabled{opacity:.5}.eloq\\:has-focus-visible\\:outline-2:has(:focus-visible){outline-style:var(--tw-outline-style);outline-width:2px}.eloq\\:has-focus-visible\\:outline-offset-1:has(:focus-visible){outline-offset:1px}.eloq\\:has-focus-visible\\:outline-ring:has(:focus-visible){outline-color:hsl(var(--ring))}@media(prefers-reduced-motion:no-preference){.eloq\\:motion-safe\\:translate-x-8{--tw-translate-x:calc(var(--eloq-spacing) * 8);translate:var(--tw-translate-x) var(--tw-translate-y)}.eloq\\:motion-safe\\:scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.eloq\\:motion-safe\\:animate-slide-up-in{animation:var(--eloq-animate-slide-up-in)}.eloq\\:motion-safe\\:animate-thinking-dot{animation:var(--eloq-animate-thinking-dot)}}@media(prefers-reduced-motion:reduce){.eloq\\:motion-reduce\\:animate-message-fade-in{animation:var(--eloq-animate-message-fade-in)}.eloq\\:motion-reduce\\:animate-none{animation:none}.eloq\\:motion-reduce\\:animate-panel-fade-in{animation:var(--eloq-animate-panel-fade-in)}.eloq\\:motion-reduce\\:animate-panel-fade-out{animation:var(--eloq-animate-panel-fade-out)}.eloq\\:motion-reduce\\:opacity-70{opacity:.7}}@media(min-width:40rem){.eloq\\:sm\\:text-sm{font-size:var(--eloq-text-sm);line-height:var(--tw-leading,var(--eloq-text-sm--line-height))}}@media(min-width:48rem){.eloq\\:md\\:text-sm{font-size:var(--eloq-text-sm);line-height:var(--tw-leading,var(--eloq-text-sm--line-height))}}.eloq\\:dark\\:border:is(.dark *){border-style:var(--tw-border-style);border-width:1px}.eloq\\:dark\\:border-b:is(.dark *){border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.eloq\\:dark\\:border-border:is(.dark *){border-color:hsl(var(--border))}.eloq\\:dark\\:bg-amber-400\\/10:is(.dark *){background-color:var(--eloq-color-amber-400)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-amber-400\\/10:is(.dark *){background-color:color-mix(in oklab,var(--eloq-color-amber-400) 10%,transparent)}}.eloq\\:dark\\:bg-blue-500\\/10:is(.dark *){background-color:var(--eloq-color-blue-500)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-blue-500\\/10:is(.dark *){background-color:color-mix(in oklab,var(--eloq-color-blue-500) 10%,transparent)}}.eloq\\:dark\\:bg-card:is(.dark *){background-color:hsl(var(--card))}.eloq\\:dark\\:bg-gray-100:is(.dark *){background-color:var(--eloq-color-gray-100)}.eloq\\:dark\\:bg-gray-200:is(.dark *){background-color:var(--eloq-color-gray-200)}.eloq\\:dark\\:bg-green-500\\/10:is(.dark *){background-color:var(--eloq-color-green-500)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-green-500\\/10:is(.dark *){background-color:color-mix(in oklab,var(--eloq-color-green-500) 10%,transparent)}}.eloq\\:dark\\:bg-muted:is(.dark *){background-color:hsl(var(--muted))}.eloq\\:dark\\:bg-red-500\\/10:is(.dark *){background-color:var(--eloq-color-red-500)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-red-500\\/10:is(.dark *){background-color:color-mix(in oklab,var(--eloq-color-red-500) 10%,transparent)}}.eloq\\:dark\\:text-amber-200:is(.dark *){color:var(--eloq-color-amber-200)}.eloq\\:dark\\:text-amber-400:is(.dark *){color:var(--eloq-color-amber-400)}.eloq\\:dark\\:text-blue-200:is(.dark *){color:var(--eloq-color-blue-200)}.eloq\\:dark\\:text-blue-400:is(.dark *){color:var(--eloq-color-blue-400)}.eloq\\:dark\\:text-gray-500:is(.dark *){color:var(--eloq-color-gray-500)}.eloq\\:dark\\:text-gray-900:is(.dark *){color:var(--eloq-color-gray-900)}.eloq\\:dark\\:text-green-200:is(.dark *){color:var(--eloq-color-green-200)}.eloq\\:dark\\:text-green-400:is(.dark *){color:var(--eloq-color-green-400)}.eloq\\:dark\\:text-muted-foreground:is(.dark *),.eloq\\:dark\\:text-muted-foreground\\/50:is(.dark *){color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:text-muted-foreground\\/50:is(.dark *){color:color-mix(in oklab,hsl(var(--muted-foreground)) 50%,transparent)}}.eloq\\:dark\\:text-red-200:is(.dark *){color:var(--eloq-color-red-200)}.eloq\\:dark\\:text-red-400:is(.dark *){color:var(--eloq-color-red-400)}.eloq\\:dark\\:shadow-none:is(.dark *){--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}@media(hover:hover){.eloq\\:dark\\:hover\\:bg-white\\/10:is(.dark *):hover{background-color:var(--eloq-color-white)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:hover\\:bg-white\\/10:is(.dark *):hover{background-color:color-mix(in oklab,var(--eloq-color-white) 10%,transparent)}}.eloq\\:dark\\:hover\\:text-gray-300:is(.dark *):hover{color:var(--eloq-color-gray-300)}.eloq\\:dark\\:hover\\:text-primary:is(.dark *):hover{color:hsl(var(--primary))}}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}}body{background-color:#0000}.eloquent-chat{font-family:system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol}.collapse{visibility:unset!important}.eloq-wrap-anywhere{overflow-wrap:anywhere}.eloq-thin-scrollbar{scrollbar-width:thin;scrollbar-color:hsl(var(--border)) transparent}.eloq-thin-scrollbar::-webkit-scrollbar{width:8px;height:8px}.eloq-thin-scrollbar::-webkit-scrollbar-thumb{background-color:hsl(var(--border));border-radius:9999px}.eloq-thin-scrollbar::-webkit-scrollbar-track{background-color:#0000}.eloq-test-mode-stripe{background:repeating-linear-gradient(-45deg,#f6e05e,#f6e05e 10px,#000 10px 20px)}.eloq-thinking-shimmer{--eloq-thinking-base:#9ca3af;--eloq-thinking-highlight:#4b5563;background:linear-gradient(90deg,var(--eloq-thinking-base) 0%,var(--eloq-thinking-base) 35%,var(--eloq-thinking-highlight) 50%,var(--eloq-thinking-base) 65%,var(--eloq-thinking-base) 100%);color:#0000;background-size:200% 100%;-webkit-background-clip:text;background-clip:text}.dark .eloq-thinking-shimmer{--eloq-thinking-base:#6b7280;--eloq-thinking-highlight:#e5e7eb}@media(prefers-reduced-motion:reduce){.eloq-thinking-shimmer{color:var(--eloq-thinking-base);background:0 0}}.eloq-regenerating-text{opacity:.4;transition:opacity .25s ease-out}.eloq-regenerating-sweep{border-radius:inherit;pointer-events:none;background:linear-gradient(100deg,#0000 30%,#ffffff8c,#0000 70%) 0 0/200% 100%;position:absolute;inset:0}.dark .eloq-regenerating-sweep{background-image:linear-gradient(100deg,#0000 30%,#ffffff1f,#0000 70%)}@media(prefers-reduced-motion:reduce){.eloq-regenerating-sweep{display:none}}@property --eloq-aura-angle{syntax:"<angle>";inherits:false;initial-value:0deg}.eloq-aura{--eloq-aura-strong:#9e9e9e;--eloq-aura-soft:#d1d1d1;background:conic-gradient(from var(--eloq-aura-angle),var(--eloq-aura-strong),var(--eloq-aura-soft),var(--eloq-aura-strong));border-radius:9999px;padding:2px;animation:2.6s linear infinite eloq-aura-spin;position:relative}@keyframes eloq-aura-spin{to{--eloq-aura-angle:360deg}}.eloq-aura-shine{border-radius:inherit;pointer-events:none;position:absolute;inset:0;overflow:hidden}.eloq-aura-shine:after{content:"";background:linear-gradient(90deg,#0000,#fffc,#0000);width:18%;position:absolute;top:-20%;bottom:-20%;left:0;transform:translate(-200%)skew(-20deg)}.eloq-aura-shine--active:after{animation:1.1s ease-in-out both eloq-aura-shine-sweep}@keyframes eloq-aura-shine-sweep{0%{transform:translate(-200%)skew(-20deg)}to{transform:translate(700%)skew(-20deg)}}@media(prefers-reduced-motion:reduce){.eloq-aura{animation:none}.eloq-aura-shine:after,.eloq-aura-shine--active:after{opacity:0;animation:none}}@keyframes panel-in{0%{opacity:0;transform:scale(.05)}to{opacity:1;transform:scale(1)}}@keyframes thinking-dot{0%,60%,to{opacity:.45;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}@keyframes regenerating-sweep{0%{background-position:150% 0}to{background-position:-50% 0}}@keyframes thinking-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@keyframes panel-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.05)}}@keyframes message-in{0%{opacity:0;transform:translateY(.5rem)}to{opacity:1;transform:translateY(0)}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{0%{opacity:1}to{opacity:0}}@keyframes slide-up-in{0%{transform:translateY(100%)}to{transform:translateY(0)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}', oo = "@media(prefers-reduced-motion:no-preference){.eloquentai-chat-launcher{transition:transform .2s ease-in-out}.eloquentai-chat-launcher:hover{transform:scale(1.1)}}", ro = [
|
|
37
37
|
"button",
|
|
38
38
|
"a[href]",
|
|
39
39
|
"input",
|
|
@@ -51,13 +51,13 @@ function ao({
|
|
|
51
51
|
isDarkMode: o = !1
|
|
52
52
|
}) {
|
|
53
53
|
const r = o ? "#fff" : "#000", n = o ? "#000000" : "#ffffff";
|
|
54
|
-
return /* @__PURE__ */ I("div", { className: "eloq:absolute eloq:inset-0 eloq:m-auto eloq:flex eloq:items-center eloq:justify-center eloq:overflow-hidden", children: /* @__PURE__ */
|
|
54
|
+
return /* @__PURE__ */ I("div", { className: "eloq:absolute eloq:inset-0 eloq:m-auto eloq:flex eloq:items-center eloq:justify-center eloq:overflow-hidden", children: /* @__PURE__ */ ke(
|
|
55
55
|
"button",
|
|
56
56
|
{
|
|
57
57
|
type: "button",
|
|
58
58
|
"aria-label": "Open chat",
|
|
59
59
|
"aria-expanded": e,
|
|
60
|
-
className:
|
|
60
|
+
className: Be(
|
|
61
61
|
"eloq:group 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",
|
|
62
62
|
// The ring below replaces the UA outline, which would be drawn
|
|
63
63
|
// outside the circle and clipped by the 48px launcher iframe.
|
|
@@ -92,15 +92,15 @@ function ao({
|
|
|
92
92
|
) });
|
|
93
93
|
}
|
|
94
94
|
function Ge({ children: e, head: t, frameRef: o, ...r }) {
|
|
95
|
-
const [n, a] = C(null),
|
|
95
|
+
const [n, a] = C(null), l = v(
|
|
96
96
|
(i) => {
|
|
97
97
|
a(i), o && (o.current = i);
|
|
98
98
|
},
|
|
99
99
|
[o]
|
|
100
|
-
), s = n?.contentWindow?.document?.head,
|
|
101
|
-
return /* @__PURE__ */
|
|
100
|
+
), s = n?.contentWindow?.document?.head, c = n?.contentWindow?.document?.body;
|
|
101
|
+
return /* @__PURE__ */ ke("iframe", { ...r, ref: l, children: [
|
|
102
102
|
s && ot(t, s),
|
|
103
|
-
|
|
103
|
+
c && ot(e, c)
|
|
104
104
|
] });
|
|
105
105
|
}
|
|
106
106
|
function io({ children: e, container: t }) {
|
|
@@ -113,60 +113,62 @@ function so({
|
|
|
113
113
|
onMessageClick: r,
|
|
114
114
|
autoHideDelay: n
|
|
115
115
|
}) {
|
|
116
|
-
const [a,
|
|
117
|
-
if (
|
|
116
|
+
const [a, l] = C(!1), [s, c] = C("entering"), [i, u] = C(!1), p = Mt();
|
|
117
|
+
if (V(() => {
|
|
118
118
|
if (t) {
|
|
119
|
-
|
|
119
|
+
l(!0), c("entering");
|
|
120
120
|
const h = setTimeout(() => {
|
|
121
|
-
|
|
121
|
+
c("visible");
|
|
122
122
|
}, 50);
|
|
123
123
|
return () => clearTimeout(h);
|
|
124
124
|
} else {
|
|
125
|
-
|
|
125
|
+
c("exiting");
|
|
126
126
|
const h = setTimeout(() => {
|
|
127
|
-
|
|
127
|
+
l(!1), c("entering");
|
|
128
128
|
}, 300);
|
|
129
129
|
return () => clearTimeout(h);
|
|
130
130
|
}
|
|
131
|
-
}, [t]),
|
|
131
|
+
}, [t]), V(() => {
|
|
132
132
|
if (!t || i) return;
|
|
133
133
|
let h = !1, f;
|
|
134
134
|
const g = setTimeout(() => {
|
|
135
|
-
h = !0,
|
|
135
|
+
h = !0, c("exiting"), f = setTimeout(() => {
|
|
136
136
|
o();
|
|
137
137
|
}, 300);
|
|
138
138
|
}, n);
|
|
139
139
|
return () => {
|
|
140
|
-
clearTimeout(g), clearTimeout(f), h &&
|
|
140
|
+
clearTimeout(g), clearTimeout(f), h && c("visible");
|
|
141
141
|
};
|
|
142
142
|
}, [t, i, o, n]), !a)
|
|
143
143
|
return null;
|
|
144
|
-
const
|
|
144
|
+
const d = p.botBubbleTextColor || At(p.botBubbleColor);
|
|
145
145
|
return /* @__PURE__ */ I(
|
|
146
146
|
"div",
|
|
147
147
|
{
|
|
148
|
-
className:
|
|
148
|
+
className: Be(
|
|
149
149
|
// right-16 leaves a ~7px gap between the tail tip and the launcher
|
|
150
150
|
// circle's edge — the tail points at it without sliding underneath.
|
|
151
151
|
"eloq:absolute eloq:right-16 eloq:bottom-0 eloq:max-w-xs eloq:transform eloq:transition-all eloq:duration-500 eloq:ease-out",
|
|
152
|
-
|
|
152
|
+
// The slide-and-grow is opt-in (motion-safe): with reduced motion the
|
|
153
|
+
// bubble only fades, on the same timers.
|
|
154
|
+
s === "entering" && "eloq:opacity-0 eloq:motion-safe:translate-x-8 eloq:motion-safe:scale-95",
|
|
153
155
|
s === "visible" && "eloq:translate-x-0 eloq:opacity-100 eloq:scale-100",
|
|
154
|
-
s === "exiting" && "eloq:translate-x-8 eloq:
|
|
156
|
+
s === "exiting" && "eloq:opacity-0 eloq:motion-safe:translate-x-8 eloq:motion-safe:scale-95"
|
|
155
157
|
),
|
|
156
|
-
children: /* @__PURE__ */
|
|
158
|
+
children: /* @__PURE__ */ ke(
|
|
157
159
|
"div",
|
|
158
160
|
{
|
|
159
161
|
className: "eloq:relative eloq:drop-shadow-lg eloq:hover:drop-shadow-xl eloq:transition-all eloq:duration-300",
|
|
160
|
-
onFocus: () =>
|
|
162
|
+
onFocus: () => u(!0),
|
|
161
163
|
onBlur: (h) => {
|
|
162
|
-
h.currentTarget.contains(h.relatedTarget) ||
|
|
164
|
+
h.currentTarget.contains(h.relatedTarget) || u(!1);
|
|
163
165
|
},
|
|
164
166
|
children: [
|
|
165
|
-
/* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ ke(
|
|
166
168
|
"button",
|
|
167
169
|
{
|
|
168
170
|
type: "button",
|
|
169
|
-
className:
|
|
171
|
+
className: Be(
|
|
170
172
|
// block/w-full/text-left undo the UA button's inline-block,
|
|
171
173
|
// centred layout so it lays out like the div it replaced.
|
|
172
174
|
"eloq:relative eloq:block eloq:w-full eloq:rounded-lg eloq:border eloq:p-3 eloq:text-left eloq:cursor-pointer",
|
|
@@ -176,12 +178,12 @@ function so({
|
|
|
176
178
|
"eloq:focus-visible:outline-2 eloq:focus-visible:outline-solid eloq:focus-visible:outline-current eloq:focus-visible:-outline-offset-4"
|
|
177
179
|
),
|
|
178
180
|
style: {
|
|
179
|
-
backgroundColor:
|
|
180
|
-
color:
|
|
181
|
+
backgroundColor: p.botBubbleColor,
|
|
182
|
+
color: d
|
|
181
183
|
},
|
|
182
184
|
onClick: r,
|
|
183
185
|
children: [
|
|
184
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ ke(
|
|
185
187
|
"svg",
|
|
186
188
|
{
|
|
187
189
|
"aria-hidden": !0,
|
|
@@ -192,7 +194,7 @@ function so({
|
|
|
192
194
|
"path",
|
|
193
195
|
{
|
|
194
196
|
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",
|
|
195
|
-
fill:
|
|
197
|
+
fill: p.botBubbleColor,
|
|
196
198
|
strokeWidth: 2,
|
|
197
199
|
vectorEffect: "non-scaling-stroke",
|
|
198
200
|
style: { stroke: "hsl(var(--border))" }
|
|
@@ -205,13 +207,13 @@ function so({
|
|
|
205
207
|
y: "-1",
|
|
206
208
|
width: "6",
|
|
207
209
|
height: "14",
|
|
208
|
-
fill:
|
|
210
|
+
fill: p.botBubbleColor
|
|
209
211
|
}
|
|
210
212
|
)
|
|
211
213
|
]
|
|
212
214
|
}
|
|
213
215
|
),
|
|
214
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ ke("span", { className: "eloq:block eloq:text-sm eloq:leading-relaxed eloq:pr-4", children: [
|
|
215
217
|
e,
|
|
216
218
|
/* @__PURE__ */ I("span", { className: "eloq:sr-only", children: " (open chat)" })
|
|
217
219
|
] })
|
|
@@ -228,7 +230,7 @@ function so({
|
|
|
228
230
|
style: {
|
|
229
231
|
// Follows the bubble's computed text colour, so the X blends
|
|
230
232
|
// with the message on any bubble background (and dark mode).
|
|
231
|
-
color:
|
|
233
|
+
color: d
|
|
232
234
|
},
|
|
233
235
|
children: /* @__PURE__ */ I(Pt, { "aria-hidden": !0, className: "eloq:w-2.5 eloq:h-2.5", strokeWidth: 1.75 })
|
|
234
236
|
}
|
|
@@ -292,7 +294,7 @@ function po() {
|
|
|
292
294
|
t[r] = o;
|
|
293
295
|
}), t;
|
|
294
296
|
}
|
|
295
|
-
const ho = "eloquent-ai::conversation-data",
|
|
297
|
+
const ho = "eloquent-ai::conversation-data", Me = typeof window < "u", fo = 1800 * 1e3;
|
|
296
298
|
function it({ appId: e }) {
|
|
297
299
|
const t = tt(() => `${ho}-${e}`, [e]), o = tt(
|
|
298
300
|
() => ({
|
|
@@ -304,7 +306,7 @@ function it({ appId: e }) {
|
|
|
304
306
|
[]
|
|
305
307
|
), r = v(() => {
|
|
306
308
|
try {
|
|
307
|
-
if (!
|
|
309
|
+
if (!Me) return o;
|
|
308
310
|
const i = localStorage.getItem(t);
|
|
309
311
|
return i ? JSON.parse(i) : o;
|
|
310
312
|
} catch (i) {
|
|
@@ -321,14 +323,14 @@ function it({ appId: e }) {
|
|
|
321
323
|
return console.error("Error checking conversation expiration:", i), !0;
|
|
322
324
|
}
|
|
323
325
|
}, [r]), a = v(
|
|
324
|
-
(i,
|
|
326
|
+
(i, u, p, d, h) => {
|
|
325
327
|
try {
|
|
326
|
-
if (!
|
|
328
|
+
if (!Me) return;
|
|
327
329
|
const f = {
|
|
328
330
|
conversationId: i,
|
|
329
|
-
userId:
|
|
330
|
-
deviceId:
|
|
331
|
-
messages: go(
|
|
331
|
+
userId: u,
|
|
332
|
+
deviceId: d,
|
|
333
|
+
messages: go(p),
|
|
332
334
|
lastActivity: Date.now(),
|
|
333
335
|
chatToken: h
|
|
334
336
|
};
|
|
@@ -338,9 +340,9 @@ function it({ appId: e }) {
|
|
|
338
340
|
}
|
|
339
341
|
},
|
|
340
342
|
[t]
|
|
341
|
-
),
|
|
343
|
+
), l = v(() => {
|
|
342
344
|
try {
|
|
343
|
-
if (!
|
|
345
|
+
if (!Me) return;
|
|
344
346
|
const i = r();
|
|
345
347
|
localStorage.setItem(
|
|
346
348
|
t,
|
|
@@ -354,16 +356,16 @@ function it({ appId: e }) {
|
|
|
354
356
|
}
|
|
355
357
|
}, [t, r]), s = v(() => {
|
|
356
358
|
try {
|
|
357
|
-
if (!
|
|
359
|
+
if (!Me) return;
|
|
358
360
|
const i = localStorage.getItem(t);
|
|
359
361
|
if (i) {
|
|
360
|
-
const
|
|
362
|
+
const u = JSON.parse(i);
|
|
361
363
|
localStorage.setItem(
|
|
362
364
|
t,
|
|
363
365
|
JSON.stringify({
|
|
364
366
|
...o,
|
|
365
|
-
deviceId:
|
|
366
|
-
userId:
|
|
367
|
+
deviceId: u.deviceId,
|
|
368
|
+
userId: u.userId
|
|
367
369
|
})
|
|
368
370
|
);
|
|
369
371
|
}
|
|
@@ -373,9 +375,9 @@ function it({ appId: e }) {
|
|
|
373
375
|
i
|
|
374
376
|
);
|
|
375
377
|
}
|
|
376
|
-
}, [t, o]),
|
|
378
|
+
}, [t, o]), c = v(() => {
|
|
377
379
|
try {
|
|
378
|
-
if (!
|
|
380
|
+
if (!Me) return;
|
|
379
381
|
const i = r();
|
|
380
382
|
i.conversationId && (i.lastActivity = Date.now(), localStorage.setItem(t, JSON.stringify(i)));
|
|
381
383
|
} catch (i) {
|
|
@@ -387,8 +389,8 @@ function it({ appId: e }) {
|
|
|
387
389
|
saveChatData: a,
|
|
388
390
|
clearChatData: s,
|
|
389
391
|
getSavedChatData: r,
|
|
390
|
-
updateLastActivity:
|
|
391
|
-
markChatClosed:
|
|
392
|
+
updateLastActivity: c,
|
|
393
|
+
markChatClosed: l
|
|
392
394
|
};
|
|
393
395
|
}
|
|
394
396
|
function go(e) {
|
|
@@ -423,114 +425,114 @@ function _o(e) {
|
|
|
423
425
|
channel: r,
|
|
424
426
|
onEvent: n,
|
|
425
427
|
onDisconnect: a,
|
|
426
|
-
createWebSocket:
|
|
427
|
-
} = e, s = xo(t, o),
|
|
428
|
-
return new Promise((
|
|
429
|
-
let
|
|
428
|
+
createWebSocket: l = (u, p) => new WebSocket(u, p)
|
|
429
|
+
} = e, s = xo(t, o), c = yo(t), i = crypto.randomUUID();
|
|
430
|
+
return new Promise((u, p) => {
|
|
431
|
+
let d;
|
|
430
432
|
try {
|
|
431
|
-
|
|
433
|
+
d = l(c, [
|
|
432
434
|
mo,
|
|
433
435
|
ko(s)
|
|
434
436
|
]);
|
|
435
|
-
} catch (
|
|
436
|
-
|
|
437
|
+
} catch (m) {
|
|
438
|
+
p(m instanceof Error ? m : new Error(String(m)));
|
|
437
439
|
return;
|
|
438
440
|
}
|
|
439
|
-
let h = "connecting", f = !1, g = vo,
|
|
440
|
-
const
|
|
441
|
-
|
|
442
|
-
},
|
|
441
|
+
let h = "connecting", f = !1, g = vo, R = Date.now(), q = null, z = null;
|
|
442
|
+
const P = () => {
|
|
443
|
+
q && (clearTimeout(q), q = null), z && (clearInterval(z), z = null);
|
|
444
|
+
}, E = (m) => {
|
|
443
445
|
if (h === "closed") return;
|
|
444
|
-
const
|
|
445
|
-
h = "closed",
|
|
446
|
+
const y = h === "established";
|
|
447
|
+
h = "closed", P();
|
|
446
448
|
try {
|
|
447
|
-
|
|
449
|
+
d.close();
|
|
448
450
|
} catch {
|
|
449
451
|
}
|
|
450
|
-
f || (
|
|
451
|
-
}, j = (
|
|
452
|
-
|
|
453
|
-
},
|
|
454
|
-
|
|
455
|
-
|
|
452
|
+
f || (y ? a(m) : p(new Error(m)));
|
|
453
|
+
}, j = (m) => {
|
|
454
|
+
d.readyState === qo && d.send(JSON.stringify(m));
|
|
455
|
+
}, O = (m) => {
|
|
456
|
+
q && clearTimeout(q), q = setTimeout(() => {
|
|
457
|
+
E(`Timed out waiting for ${m}`);
|
|
456
458
|
}, bo);
|
|
457
459
|
};
|
|
458
|
-
|
|
459
|
-
h !== "closed" && (j({ type: "connection_init" }),
|
|
460
|
-
}),
|
|
460
|
+
d.addEventListener("open", () => {
|
|
461
|
+
h !== "closed" && (j({ type: "connection_init" }), O("connection_ack"));
|
|
462
|
+
}), d.addEventListener("message", (m) => {
|
|
461
463
|
if (h === "closed") return;
|
|
462
|
-
let
|
|
464
|
+
let y;
|
|
463
465
|
try {
|
|
464
|
-
|
|
466
|
+
y = JSON.parse(String(m.data));
|
|
465
467
|
} catch {
|
|
466
468
|
console.warn("[EloquentChatSDK] Unparseable realtime frame ignored");
|
|
467
469
|
return;
|
|
468
470
|
}
|
|
469
|
-
switch (
|
|
471
|
+
switch (y.type) {
|
|
470
472
|
case "connection_ack": {
|
|
471
473
|
if (h !== "connecting") return;
|
|
472
|
-
h = "subscribing", typeof
|
|
474
|
+
h = "subscribing", typeof y.connectionTimeoutMs == "number" && (g = y.connectionTimeoutMs), j({
|
|
473
475
|
type: "subscribe",
|
|
474
476
|
id: i,
|
|
475
477
|
channel: r,
|
|
476
478
|
authorization: s
|
|
477
|
-
}),
|
|
479
|
+
}), O("subscribe_success");
|
|
478
480
|
return;
|
|
479
481
|
}
|
|
480
482
|
case "connection_error": {
|
|
481
|
-
|
|
483
|
+
E(`Connection error: ${Ye(y.errors)}`);
|
|
482
484
|
return;
|
|
483
485
|
}
|
|
484
486
|
case "subscribe_success": {
|
|
485
|
-
if (h !== "subscribing" ||
|
|
486
|
-
h = "established",
|
|
487
|
-
Date.now() -
|
|
488
|
-
}, wo),
|
|
487
|
+
if (h !== "subscribing" || y.id !== i) return;
|
|
488
|
+
h = "established", q && (clearTimeout(q), q = null), R = Date.now(), z = setInterval(() => {
|
|
489
|
+
Date.now() - R > g && E("Keep-alive timeout");
|
|
490
|
+
}, wo), u({
|
|
489
491
|
close: () => {
|
|
490
|
-
f = !0, j({ type: "unsubscribe", id: i }),
|
|
492
|
+
f = !0, j({ type: "unsubscribe", id: i }), E("Closed by client");
|
|
491
493
|
}
|
|
492
494
|
});
|
|
493
495
|
return;
|
|
494
496
|
}
|
|
495
497
|
case "subscribe_error": {
|
|
496
|
-
if (
|
|
497
|
-
|
|
498
|
+
if (y.id !== i) return;
|
|
499
|
+
E(`Subscribe error: ${Ye(y.errors)}`);
|
|
498
500
|
return;
|
|
499
501
|
}
|
|
500
502
|
case "ka": {
|
|
501
|
-
|
|
503
|
+
R = Date.now();
|
|
502
504
|
return;
|
|
503
505
|
}
|
|
504
506
|
case "data": {
|
|
505
|
-
if (
|
|
506
|
-
|
|
507
|
-
let
|
|
508
|
-
if (typeof
|
|
507
|
+
if (y.id !== i) return;
|
|
508
|
+
R = Date.now();
|
|
509
|
+
let _ = y.event;
|
|
510
|
+
if (typeof _ == "string")
|
|
509
511
|
try {
|
|
510
|
-
|
|
512
|
+
_ = JSON.parse(_);
|
|
511
513
|
} catch {
|
|
512
514
|
console.warn(
|
|
513
515
|
"[EloquentChatSDK] Unparseable realtime event ignored"
|
|
514
516
|
);
|
|
515
517
|
return;
|
|
516
518
|
}
|
|
517
|
-
n(
|
|
519
|
+
n(_);
|
|
518
520
|
return;
|
|
519
521
|
}
|
|
520
522
|
case "broadcast_error": {
|
|
521
523
|
console.warn(
|
|
522
524
|
"[EloquentChatSDK] Realtime broadcast error:",
|
|
523
|
-
Ye(
|
|
525
|
+
Ye(y.errors)
|
|
524
526
|
);
|
|
525
527
|
return;
|
|
526
528
|
}
|
|
527
529
|
default:
|
|
528
530
|
return;
|
|
529
531
|
}
|
|
530
|
-
}),
|
|
531
|
-
|
|
532
|
-
}),
|
|
533
|
-
|
|
532
|
+
}), d.addEventListener("close", () => {
|
|
533
|
+
E("WebSocket closed");
|
|
534
|
+
}), d.addEventListener("error", () => {
|
|
535
|
+
E("WebSocket error");
|
|
534
536
|
});
|
|
535
537
|
});
|
|
536
538
|
}
|
|
@@ -553,7 +555,7 @@ function Ct(e) {
|
|
|
553
555
|
const t = e.startsWith("^") ? 1 : 0, o = e.endsWith("$") ? e.length - 1 : e.length;
|
|
554
556
|
return e.slice(t, o);
|
|
555
557
|
}
|
|
556
|
-
function
|
|
558
|
+
function Ro(e, t, o) {
|
|
557
559
|
Object.defineProperty(e, t, {
|
|
558
560
|
value: o,
|
|
559
561
|
writable: !0,
|
|
@@ -566,7 +568,7 @@ const St = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
|
566
568
|
function rt(e) {
|
|
567
569
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
568
570
|
}
|
|
569
|
-
function
|
|
571
|
+
function Eo(e) {
|
|
570
572
|
if (rt(e) === !1)
|
|
571
573
|
return !1;
|
|
572
574
|
const t = e.constructor;
|
|
@@ -582,7 +584,7 @@ function zo(e, t, o) {
|
|
|
582
584
|
const r = new e._zod.constr(t ?? e._zod.def);
|
|
583
585
|
return (!t || o?.parent) && (r._zod.parent = e), r;
|
|
584
586
|
}
|
|
585
|
-
function
|
|
587
|
+
function Ce(e) {
|
|
586
588
|
const t = e;
|
|
587
589
|
if (!t)
|
|
588
590
|
return {};
|
|
@@ -598,7 +600,7 @@ function Ie(e) {
|
|
|
598
600
|
function To(e) {
|
|
599
601
|
return Object.keys(e).filter((t) => e[t]._zod.optin !== void 0 && e[t]._zod.optout === "optional");
|
|
600
602
|
}
|
|
601
|
-
function
|
|
603
|
+
function _e(e, t = 0) {
|
|
602
604
|
if (e.aborted === !0)
|
|
603
605
|
return !0;
|
|
604
606
|
for (let o = t; o < e.issues.length; o++)
|
|
@@ -614,13 +616,13 @@ function Mo(e, t = 0) {
|
|
|
614
616
|
return !0;
|
|
615
617
|
return !1;
|
|
616
618
|
}
|
|
617
|
-
function
|
|
619
|
+
function Pe(e, t) {
|
|
618
620
|
return t.map((o) => {
|
|
619
621
|
var r;
|
|
620
622
|
return (r = o).path ?? (r.path = []), o.path.unshift(e), o;
|
|
621
623
|
});
|
|
622
624
|
}
|
|
623
|
-
function
|
|
625
|
+
function Ae(e) {
|
|
624
626
|
return typeof e == "string" ? e : e?.message;
|
|
625
627
|
}
|
|
626
628
|
function pt(e, t, o) {
|
|
@@ -628,14 +630,14 @@ function pt(e, t, o) {
|
|
|
628
630
|
for (let n = t; n < e.length; n++)
|
|
629
631
|
(r = e[n]).schema ?? (r.schema = o);
|
|
630
632
|
}
|
|
631
|
-
function
|
|
633
|
+
function Se(e, t, o) {
|
|
632
634
|
var r;
|
|
633
635
|
const n = e.inst?._zod?.traits;
|
|
634
636
|
n?.has("$ZodType") && (n.has("$ZodCheck") ? (r = e).schema ?? (r.schema = e.inst) : e.schema = e.inst);
|
|
635
|
-
const a = e.schema !== e.inst ? e.schema?._zod.def?.error : void 0,
|
|
636
|
-
for (const
|
|
637
|
-
|
|
638
|
-
return s.path ?? (s.path = []), s.message =
|
|
637
|
+
const a = e.schema !== e.inst ? e.schema?._zod.def?.error : void 0, l = e.message ? e.message : Ae(e.inst?._zod.def?.error?.(e)) ?? Ae(a?.(e)) ?? Ae(t?.error?.(e)) ?? Ae(o.customError?.(e)) ?? Ae(o.localeError?.(e)) ?? "Invalid input", s = {};
|
|
638
|
+
for (const c of Object.keys(e))
|
|
639
|
+
c === "inst" || c === "schema" || c === "continue" || c === "input" || c === "__proto__" || (s[c] = e[c]);
|
|
640
|
+
return s.path ?? (s.path = []), s.message = l, t?.reportInput && (s.input = e.input), s;
|
|
639
641
|
}
|
|
640
642
|
function Ao(e, t) {
|
|
641
643
|
for (const o in t) {
|
|
@@ -643,20 +645,20 @@ function Ao(e, t) {
|
|
|
643
645
|
r.get ? Object.defineProperty(e, o, { ...r, enumerable: !1 }) : Oo(e, o, r.value);
|
|
644
646
|
}
|
|
645
647
|
}
|
|
646
|
-
function
|
|
648
|
+
function Ue(e, t, o, r = !0) {
|
|
647
649
|
return Object.defineProperty(e, t, { configurable: !0, writable: !0, enumerable: r, value: o }), o;
|
|
648
650
|
}
|
|
649
651
|
function Po(e, t, o) {
|
|
650
|
-
return
|
|
652
|
+
return Ue(e, t, o, !1);
|
|
651
653
|
}
|
|
652
654
|
function Oo(e, t, o) {
|
|
653
655
|
Object.defineProperty(e, t, {
|
|
654
656
|
configurable: !0,
|
|
655
657
|
get() {
|
|
656
|
-
return this == null ? o :
|
|
658
|
+
return this == null ? o : Ue(this, t, o.bind(this));
|
|
657
659
|
},
|
|
658
660
|
set(r) {
|
|
659
|
-
|
|
661
|
+
Ue(this, t, r);
|
|
660
662
|
}
|
|
661
663
|
});
|
|
662
664
|
}
|
|
@@ -664,14 +666,14 @@ function Uo(e, t) {
|
|
|
664
666
|
const o = Object.getPrototypeOf(e);
|
|
665
667
|
return t in o ? void 0 : o;
|
|
666
668
|
}
|
|
667
|
-
let Xe,
|
|
669
|
+
let Xe, qe = !1;
|
|
668
670
|
const jo = {
|
|
669
671
|
configurable: !0,
|
|
670
672
|
get() {
|
|
671
|
-
|
|
673
|
+
qe = !0;
|
|
672
674
|
}
|
|
673
675
|
};
|
|
674
|
-
function
|
|
676
|
+
function be(e, t, o) {
|
|
675
677
|
const r = Object.getPrototypeOf(e._zod);
|
|
676
678
|
if (t in r && Xe !== e._zod) {
|
|
677
679
|
Xe = void 0;
|
|
@@ -681,13 +683,13 @@ function me(e, t, o) {
|
|
|
681
683
|
configurable: !0,
|
|
682
684
|
get() {
|
|
683
685
|
Object.defineProperty(this, t, jo);
|
|
684
|
-
const n =
|
|
685
|
-
|
|
686
|
+
const n = qe;
|
|
687
|
+
qe = !1;
|
|
686
688
|
try {
|
|
687
689
|
const a = o(this);
|
|
688
|
-
return
|
|
690
|
+
return qe ? delete this[t] : Object.defineProperty(this, t, { configurable: !0, writable: !0, value: a }), qe = qe || n, a;
|
|
689
691
|
} catch (a) {
|
|
690
|
-
throw delete this[t],
|
|
692
|
+
throw delete this[t], qe = qe || n, a;
|
|
691
693
|
}
|
|
692
694
|
},
|
|
693
695
|
set(n) {
|
|
@@ -732,64 +734,64 @@ function $o(e) {
|
|
|
732
734
|
}
|
|
733
735
|
function Q(e, t, o, r) {
|
|
734
736
|
const n = {};
|
|
735
|
-
function a(
|
|
736
|
-
this.def =
|
|
737
|
+
function a(d) {
|
|
738
|
+
this.def = d, this.constr = p, this.traits = /* @__PURE__ */ new Set();
|
|
737
739
|
}
|
|
738
740
|
a.prototype = n;
|
|
739
|
-
const
|
|
740
|
-
function
|
|
741
|
-
if (
|
|
742
|
-
if (
|
|
741
|
+
const l = o, s = l && /* @__PURE__ */ new WeakSet();
|
|
742
|
+
function c(d, h) {
|
|
743
|
+
if (d._zod) {
|
|
744
|
+
if (d._zod.traits.has(e))
|
|
743
745
|
return;
|
|
744
746
|
} else {
|
|
745
747
|
Qe.value = new a(h);
|
|
746
748
|
try {
|
|
747
|
-
Object.defineProperty(
|
|
749
|
+
Object.defineProperty(d, "_zod", Qe);
|
|
748
750
|
} finally {
|
|
749
751
|
Qe.value = void 0;
|
|
750
752
|
}
|
|
751
753
|
}
|
|
752
|
-
if (
|
|
753
|
-
const g = Object.getPrototypeOf(
|
|
754
|
-
let
|
|
755
|
-
for (;
|
|
756
|
-
|
|
757
|
-
const z =
|
|
758
|
-
s.has(z) || (s.add(z), Ao(z,
|
|
754
|
+
if (d._zod.traits.add(e), t(d, h), s) {
|
|
755
|
+
const g = Object.getPrototypeOf(d), R = d._zod.constr.prototype;
|
|
756
|
+
let q = g;
|
|
757
|
+
for (; q && q !== R; )
|
|
758
|
+
q = Object.getPrototypeOf(q);
|
|
759
|
+
const z = q ?? g;
|
|
760
|
+
s.has(z) || (s.add(z), Ao(z, l));
|
|
759
761
|
}
|
|
760
|
-
const f =
|
|
762
|
+
const f = p.prototype;
|
|
761
763
|
for (const g in f)
|
|
762
|
-
Object.prototype.hasOwnProperty.call(f, g) && (g in
|
|
764
|
+
Object.prototype.hasOwnProperty.call(f, g) && (g in d || (d[g] = f[g].bind(d)));
|
|
763
765
|
}
|
|
764
766
|
const i = r?.Parent ?? Object;
|
|
765
|
-
class
|
|
767
|
+
class u extends i {
|
|
766
768
|
}
|
|
767
|
-
Object.defineProperty(
|
|
768
|
-
function d
|
|
769
|
-
const h = r?.Parent ? $o(
|
|
770
|
-
|
|
769
|
+
Object.defineProperty(u, "name", { value: e });
|
|
770
|
+
function p(d) {
|
|
771
|
+
const h = r?.Parent ? $o(u) : this;
|
|
772
|
+
c(h, d);
|
|
771
773
|
const f = h._zod.deferred;
|
|
772
774
|
if (f) {
|
|
773
|
-
for (const
|
|
774
|
-
|
|
775
|
+
for (const R of f)
|
|
776
|
+
R();
|
|
775
777
|
h._zod.deferred = void 0;
|
|
776
778
|
}
|
|
777
779
|
const g = globalThis.__zod_globalConfig?.postProcessor;
|
|
778
780
|
return g && g(h), h;
|
|
779
781
|
}
|
|
780
|
-
return Object.defineProperty(
|
|
781
|
-
value: (
|
|
782
|
-
}), Object.defineProperty(
|
|
782
|
+
return Object.defineProperty(p, "init", { value: c }), Object.defineProperty(p, Symbol.hasInstance, {
|
|
783
|
+
value: (d) => r?.Parent && d instanceof r.Parent ? !0 : d?._zod?.traits?.has(e)
|
|
784
|
+
}), Object.defineProperty(p, "name", { value: e }), p;
|
|
783
785
|
}
|
|
784
|
-
class
|
|
786
|
+
class Oe extends Error {
|
|
785
787
|
constructor() {
|
|
786
788
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
787
789
|
}
|
|
788
790
|
}
|
|
789
791
|
(ht = globalThis).__zod_globalConfig ?? (ht.__zod_globalConfig = {});
|
|
790
|
-
const
|
|
791
|
-
function
|
|
792
|
-
return e && Object.assign(
|
|
792
|
+
const Ne = globalThis.__zod_globalConfig;
|
|
793
|
+
function ye(e) {
|
|
794
|
+
return e && Object.assign(Ne, e), Ne;
|
|
793
795
|
}
|
|
794
796
|
function Bo() {
|
|
795
797
|
const e = this._zod;
|
|
@@ -817,43 +819,43 @@ const No = {
|
|
|
817
819
|
Object.defineProperty(this, "toString", { value: r, configurable: !0, writable: !0 });
|
|
818
820
|
}
|
|
819
821
|
}));
|
|
820
|
-
},
|
|
822
|
+
}, He = Q("$ZodError", Zo, void 0, {
|
|
821
823
|
Parent: Error
|
|
822
824
|
}), Ko = (e) => {
|
|
823
825
|
const t = (o, r, n, a) => {
|
|
824
|
-
const
|
|
826
|
+
const l = n ? { ...n, async: !1 } : { async: !1 }, s = o._zod.run({ value: r, issues: [] }, l);
|
|
825
827
|
if (s instanceof Promise)
|
|
826
|
-
throw new
|
|
828
|
+
throw new Oe();
|
|
827
829
|
if (s.issues.length) {
|
|
828
|
-
const
|
|
829
|
-
throw St(
|
|
830
|
+
const c = new (a?.Err ?? e)(s.issues.map((i) => Se(i, l, ye())));
|
|
831
|
+
throw St(c, a?.callee ?? t), c;
|
|
830
832
|
}
|
|
831
833
|
return s.value;
|
|
832
834
|
};
|
|
833
835
|
return t;
|
|
834
|
-
},
|
|
836
|
+
}, Ho = /* @__PURE__ */ Ko(He), Vo = (e) => {
|
|
835
837
|
const t = async (o, r, n, a) => {
|
|
836
|
-
const
|
|
837
|
-
let s = o._zod.run({ value: r, issues: [] },
|
|
838
|
+
const l = n ? { ...n, async: !0 } : { async: !0 };
|
|
839
|
+
let s = o._zod.run({ value: r, issues: [] }, l);
|
|
838
840
|
if (s instanceof Promise && (s = await s), s.issues.length) {
|
|
839
|
-
const
|
|
840
|
-
throw St(
|
|
841
|
+
const c = new (a?.Err ?? e)(s.issues.map((i) => Se(i, l, ye())));
|
|
842
|
+
throw St(c, a?.callee ?? t), c;
|
|
841
843
|
}
|
|
842
844
|
return s.value;
|
|
843
845
|
};
|
|
844
846
|
return t;
|
|
845
|
-
},
|
|
847
|
+
}, Wo = /* @__PURE__ */ Vo(He), Fo = (e) => (t, o, r) => {
|
|
846
848
|
const n = r ? { ...r, async: !1 } : { async: !1 }, a = t._zod.run({ value: o, issues: [] }, n);
|
|
847
849
|
if (a instanceof Promise)
|
|
848
|
-
throw new
|
|
850
|
+
throw new Oe();
|
|
849
851
|
return a.issues.length ? It(e, a.issues, n) : { success: !0, data: a.value };
|
|
850
|
-
}, Jo = /* @__PURE__ */
|
|
852
|
+
}, Jo = /* @__PURE__ */ Fo(He);
|
|
851
853
|
function It(e, t, o) {
|
|
852
854
|
let r;
|
|
853
855
|
return {
|
|
854
856
|
success: !1,
|
|
855
857
|
get error() {
|
|
856
|
-
return r || (r = new e(t.map((n) =>
|
|
858
|
+
return r || (r = new e(t.map((n) => Se(n, o, ye()))), t = void 0, o = void 0), r;
|
|
857
859
|
},
|
|
858
860
|
set error(n) {
|
|
859
861
|
r = n, t = void 0, o = void 0;
|
|
@@ -864,71 +866,71 @@ const Go = (e) => async (t, o, r) => {
|
|
|
864
866
|
const n = r ? { ...r, async: !0 } : { async: !0 };
|
|
865
867
|
let a = t._zod.run({ value: o, issues: [] }, n);
|
|
866
868
|
return a instanceof Promise && (a = await a), a.issues.length ? It(e, a.issues, n) : { success: !0, data: a.value };
|
|
867
|
-
}, Yo = /* @__PURE__ */ Go(
|
|
869
|
+
}, Yo = /* @__PURE__ */ Go(He), Xo = /^[\s\S]{0,}$/, Qo = /^-?\d+(?:\.\d+)?$/, er = /^null$/i, tr = {
|
|
868
870
|
major: 4,
|
|
869
871
|
minor: 6,
|
|
870
872
|
patch: 7
|
|
871
|
-
},
|
|
873
|
+
}, xe = /* @__PURE__ */ Q("$ZodType", (e, t) => {
|
|
872
874
|
var o;
|
|
873
875
|
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = tr;
|
|
874
876
|
const r = e._zod.def.checks, n = e._zod.traits.has("$ZodCheck") ? [e, ...r ?? []] : r?.length ? [...r] : [];
|
|
875
877
|
for (const a of n)
|
|
876
|
-
for (const
|
|
877
|
-
|
|
878
|
+
for (const l of a._zod.onattach)
|
|
879
|
+
l(e);
|
|
878
880
|
if (n.length === 0)
|
|
879
881
|
(o = e._zod).deferred ?? (o.deferred = []), e._zod.deferred?.push(() => {
|
|
880
882
|
e._zod.run = e._zod.parse;
|
|
881
883
|
});
|
|
882
884
|
else {
|
|
883
|
-
const a = (s,
|
|
885
|
+
const a = (s, c, i) => {
|
|
884
886
|
if (s.memo)
|
|
885
887
|
return s;
|
|
886
|
-
let
|
|
887
|
-
for (const
|
|
888
|
-
if (
|
|
889
|
-
if (Mo(s) || !
|
|
888
|
+
let u = _e(s), p;
|
|
889
|
+
for (const d of c) {
|
|
890
|
+
if (d._zod.def.when) {
|
|
891
|
+
if (Mo(s) || !d._zod.def.when(s))
|
|
890
892
|
continue;
|
|
891
|
-
} else if (
|
|
893
|
+
} else if (u)
|
|
892
894
|
continue;
|
|
893
|
-
const h = s.issues.length, f =
|
|
895
|
+
const h = s.issues.length, f = d._zod.check(s);
|
|
894
896
|
if (f instanceof Promise && i?.async === !1)
|
|
895
|
-
throw new
|
|
896
|
-
if (
|
|
897
|
-
|
|
898
|
-
await f, s.issues.length !== h && (pt(s.issues, h, e),
|
|
897
|
+
throw new Oe();
|
|
898
|
+
if (p || f instanceof Promise)
|
|
899
|
+
p = (p ?? Promise.resolve()).then(async () => {
|
|
900
|
+
await f, s.issues.length !== h && (pt(s.issues, h, e), u || (u = _e(s, h)));
|
|
899
901
|
});
|
|
900
902
|
else {
|
|
901
903
|
if (s.issues.length === h)
|
|
902
904
|
continue;
|
|
903
|
-
pt(s.issues, h, e),
|
|
905
|
+
pt(s.issues, h, e), u || (u = _e(s, h));
|
|
904
906
|
}
|
|
905
907
|
}
|
|
906
|
-
return
|
|
907
|
-
},
|
|
908
|
-
if (
|
|
908
|
+
return p ? p.then(() => s) : s;
|
|
909
|
+
}, l = (s, c, i) => {
|
|
910
|
+
if (_e(s))
|
|
909
911
|
return s.aborted = !0, s;
|
|
910
|
-
const
|
|
911
|
-
if (
|
|
912
|
+
const u = a(c, n, i);
|
|
913
|
+
if (u instanceof Promise) {
|
|
912
914
|
if (i.async === !1)
|
|
913
|
-
throw new
|
|
914
|
-
return
|
|
915
|
+
throw new Oe();
|
|
916
|
+
return u.then((p) => e._zod.parse(p, i));
|
|
915
917
|
}
|
|
916
|
-
return e._zod.parse(
|
|
918
|
+
return e._zod.parse(u, i);
|
|
917
919
|
};
|
|
918
|
-
e._zod.run = (s,
|
|
919
|
-
if (
|
|
920
|
-
return e._zod.parse(s,
|
|
921
|
-
if (
|
|
922
|
-
const
|
|
923
|
-
return
|
|
920
|
+
e._zod.run = (s, c) => {
|
|
921
|
+
if (c.skipChecks)
|
|
922
|
+
return e._zod.parse(s, c);
|
|
923
|
+
if (c.direction === "backward") {
|
|
924
|
+
const u = e._zod.parse({ value: s.value, issues: [] }, { ...c, skipChecks: !0 });
|
|
925
|
+
return u instanceof Promise ? u.then((p) => l(p, s, c)) : l(u, s, c);
|
|
924
926
|
}
|
|
925
|
-
const i = e._zod.parse(s,
|
|
927
|
+
const i = e._zod.parse(s, c);
|
|
926
928
|
if (i instanceof Promise) {
|
|
927
|
-
if (
|
|
928
|
-
throw new
|
|
929
|
-
return i.then((
|
|
929
|
+
if (c.async === !1)
|
|
930
|
+
throw new Oe();
|
|
931
|
+
return i.then((u) => a(u, n, c));
|
|
930
932
|
}
|
|
931
|
-
return a(i, n,
|
|
933
|
+
return a(i, n, c);
|
|
932
934
|
};
|
|
933
935
|
}
|
|
934
936
|
}, {
|
|
@@ -937,12 +939,12 @@ const Go = (e) => async (t, o, r) => {
|
|
|
937
939
|
return Po(this, "~standard", rr(this));
|
|
938
940
|
},
|
|
939
941
|
set "~standard"(e) {
|
|
940
|
-
|
|
942
|
+
Ue(this, "~standard", e);
|
|
941
943
|
}
|
|
942
|
-
}),
|
|
944
|
+
}), Rt = (e, t) => e.issues.length ? { issues: e.issues.map((o) => Se(o, t, ye())) } : { value: e.value };
|
|
943
945
|
async function or(e, t) {
|
|
944
946
|
const o = { async: !0 };
|
|
945
|
-
return
|
|
947
|
+
return Rt(await e._zod.run({ value: t, issues: [] }, o), o);
|
|
946
948
|
}
|
|
947
949
|
function rr(e) {
|
|
948
950
|
return {
|
|
@@ -951,7 +953,7 @@ function rr(e) {
|
|
|
951
953
|
try {
|
|
952
954
|
const r = e._zod.run({ value: t, issues: [] }, o);
|
|
953
955
|
if (!(r instanceof Promise))
|
|
954
|
-
return
|
|
956
|
+
return Rt(r, o);
|
|
955
957
|
} catch {
|
|
956
958
|
}
|
|
957
959
|
return or(e, t);
|
|
@@ -961,7 +963,7 @@ function rr(e) {
|
|
|
961
963
|
};
|
|
962
964
|
}
|
|
963
965
|
const nr = /* @__PURE__ */ Q("$ZodString", (e, t) => {
|
|
964
|
-
|
|
966
|
+
xe.init(e, t), e._zod.pattern = t.pattern ?? Xo, e._zod.parse = (o, r) => {
|
|
965
967
|
if (t.coerce)
|
|
966
968
|
try {
|
|
967
969
|
o.value = String(o.value);
|
|
@@ -975,7 +977,7 @@ const nr = /* @__PURE__ */ Q("$ZodString", (e, t) => {
|
|
|
975
977
|
}), o;
|
|
976
978
|
};
|
|
977
979
|
}), ar = /* @__PURE__ */ Q("$ZodNull", (e, t) => {
|
|
978
|
-
|
|
980
|
+
xe.init(e, t), e._zod.pattern = er, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (o, r) => {
|
|
979
981
|
const n = o.value;
|
|
980
982
|
return n === null || o.issues.push({
|
|
981
983
|
expected: "null",
|
|
@@ -985,15 +987,15 @@ const nr = /* @__PURE__ */ Q("$ZodString", (e, t) => {
|
|
|
985
987
|
}), o;
|
|
986
988
|
};
|
|
987
989
|
});
|
|
988
|
-
function
|
|
989
|
-
const
|
|
990
|
-
if (!(!
|
|
990
|
+
function Ze(e, t, o, r, n, a) {
|
|
991
|
+
const l = o in r, s = a === "optional";
|
|
992
|
+
if (!(!l && s && n === "optional")) {
|
|
991
993
|
if (e.issues.length) {
|
|
992
|
-
if (n !== void 0 && s && !
|
|
994
|
+
if (n !== void 0 && s && !l)
|
|
993
995
|
return;
|
|
994
|
-
t.issues.push(...
|
|
996
|
+
t.issues.push(...Pe(o, e.issues));
|
|
995
997
|
}
|
|
996
|
-
if (!
|
|
998
|
+
if (!l && n === void 0) {
|
|
997
999
|
e.issues.length || t.issues.push({
|
|
998
1000
|
code: "invalid_type",
|
|
999
1001
|
expected: "nonoptional",
|
|
@@ -1002,15 +1004,15 @@ function Ke(e, t, o, r, n, a) {
|
|
|
1002
1004
|
});
|
|
1003
1005
|
return;
|
|
1004
1006
|
}
|
|
1005
|
-
e.value === void 0 ? (
|
|
1007
|
+
e.value === void 0 ? (l || n === "defaulted" && !s) && (t.value[o] = void 0) : t.value[o] = e.value;
|
|
1006
1008
|
}
|
|
1007
1009
|
}
|
|
1008
1010
|
const ir = [];
|
|
1009
1011
|
function sr(e) {
|
|
1010
1012
|
const t = Object.keys(e.shape), o = Object.getOwnPropertySymbols(e.shape), r = o.length ? o : ir, n = r.length ? [...t, ...r] : t;
|
|
1011
|
-
for (const
|
|
1012
|
-
if (!e.shape?.[
|
|
1013
|
-
throw new Error(`Invalid element at key "${String(
|
|
1013
|
+
for (const l of n)
|
|
1014
|
+
if (!e.shape?.[l]?._zod?.traits?.has("$ZodType"))
|
|
1015
|
+
throw new Error(`Invalid element at key "${String(l)}": expected a Zod schema`);
|
|
1014
1016
|
const a = To(e.shape);
|
|
1015
1017
|
return {
|
|
1016
1018
|
...e,
|
|
@@ -1022,27 +1024,27 @@ function sr(e) {
|
|
|
1022
1024
|
optionalKeys: new Set(a)
|
|
1023
1025
|
};
|
|
1024
1026
|
}
|
|
1025
|
-
function lr(e, t, o, r, n, a,
|
|
1026
|
-
const s = [],
|
|
1027
|
+
function lr(e, t, o, r, n, a, l) {
|
|
1028
|
+
const s = [], c = n.keySet, i = n.catchall._zod, u = i.def.type, p = i.optin, d = i.optout;
|
|
1027
1029
|
let h = 0;
|
|
1028
1030
|
for (const f in t) {
|
|
1029
|
-
if (
|
|
1030
|
-
if (
|
|
1031
|
+
if (l && o.issues.length !== h) {
|
|
1032
|
+
if (_e(o, h))
|
|
1031
1033
|
break;
|
|
1032
1034
|
h = o.issues.length;
|
|
1033
1035
|
}
|
|
1034
|
-
if (
|
|
1036
|
+
if (c.has(f))
|
|
1035
1037
|
continue;
|
|
1036
1038
|
if (f === "__proto__") {
|
|
1037
|
-
|
|
1039
|
+
u === "never" && s.push(f);
|
|
1038
1040
|
continue;
|
|
1039
1041
|
}
|
|
1040
|
-
if (
|
|
1042
|
+
if (u === "never") {
|
|
1041
1043
|
s.push(f);
|
|
1042
1044
|
continue;
|
|
1043
1045
|
}
|
|
1044
1046
|
const g = i.run({ value: t[f], issues: [] }, r);
|
|
1045
|
-
g instanceof Promise ? e.push(g.then((
|
|
1047
|
+
g instanceof Promise ? e.push(g.then((R) => Ze(R, o, f, t, p, d))) : Ze(g, o, f, t, p, d);
|
|
1046
1048
|
}
|
|
1047
1049
|
return s.length && o.issues.push({
|
|
1048
1050
|
code: "unrecognized_keys",
|
|
@@ -1054,76 +1056,76 @@ function lr(e, t, o, r, n, a, u) {
|
|
|
1054
1056
|
}), e.length ? Promise.all(e).then(() => o) : o;
|
|
1055
1057
|
}
|
|
1056
1058
|
const cr = /* @__PURE__ */ Q("$ZodObject", (e, t) => {
|
|
1057
|
-
|
|
1059
|
+
xe.init(e, t);
|
|
1058
1060
|
const o = Object.getOwnPropertyDescriptor(t, "shape"), r = o?.get ? o.get.raw : t.shape ?? {};
|
|
1059
1061
|
if (r) {
|
|
1060
1062
|
const i = () => {
|
|
1061
|
-
const
|
|
1062
|
-
return Object.defineProperty(t, "shape", { value:
|
|
1063
|
+
const u = { ...r };
|
|
1064
|
+
return Object.defineProperty(t, "shape", { value: u }), i.raw = u, u;
|
|
1063
1065
|
};
|
|
1064
1066
|
i.raw = r, Object.defineProperty(t, "shape", { get: i });
|
|
1065
1067
|
}
|
|
1066
1068
|
const n = Io(() => sr(t));
|
|
1067
|
-
|
|
1068
|
-
const
|
|
1069
|
-
for (const
|
|
1070
|
-
const h =
|
|
1069
|
+
be(e, "propValues", (i) => {
|
|
1070
|
+
const u = i.def.shape, p = {};
|
|
1071
|
+
for (const d in u) {
|
|
1072
|
+
const h = u[d]._zod;
|
|
1071
1073
|
if (h.values) {
|
|
1072
|
-
Object.prototype.hasOwnProperty.call(
|
|
1074
|
+
Object.prototype.hasOwnProperty.call(p, d) || Ro(p, d, /* @__PURE__ */ new Set());
|
|
1073
1075
|
for (const f of h.values)
|
|
1074
|
-
d
|
|
1075
|
-
h.optin !== void 0 && d
|
|
1076
|
+
p[d].add(f);
|
|
1077
|
+
h.optin !== void 0 && p[d].add(void 0);
|
|
1076
1078
|
}
|
|
1077
1079
|
}
|
|
1078
|
-
return
|
|
1080
|
+
return p;
|
|
1079
1081
|
});
|
|
1080
|
-
const a = rt,
|
|
1082
|
+
const a = rt, l = t.catchall;
|
|
1081
1083
|
let s;
|
|
1082
|
-
const
|
|
1083
|
-
|
|
1084
|
+
const c = Ne.memoizer;
|
|
1085
|
+
c?.attach(e), e._zod.parse = (i, u) => {
|
|
1084
1086
|
s ?? (s = n.value);
|
|
1085
|
-
const
|
|
1086
|
-
if (!a(
|
|
1087
|
+
const p = i.value;
|
|
1088
|
+
if (!a(p))
|
|
1087
1089
|
return i.issues.push({
|
|
1088
1090
|
expected: "object",
|
|
1089
1091
|
code: "invalid_type",
|
|
1090
|
-
input:
|
|
1092
|
+
input: p,
|
|
1091
1093
|
inst: e
|
|
1092
1094
|
}), i;
|
|
1093
|
-
i.value =
|
|
1094
|
-
const
|
|
1095
|
+
i.value = c ? c.alloc(e, i, {}, u) : {};
|
|
1096
|
+
const d = [], h = s.shape, f = u?.abortEarly;
|
|
1095
1097
|
let g = i.issues.length;
|
|
1096
|
-
for (const
|
|
1098
|
+
for (const R of s.allKeys) {
|
|
1097
1099
|
if (f && i.issues.length !== g) {
|
|
1098
|
-
if (
|
|
1100
|
+
if (_e(i, g))
|
|
1099
1101
|
break;
|
|
1100
1102
|
g = i.issues.length;
|
|
1101
1103
|
}
|
|
1102
|
-
if (
|
|
1104
|
+
if (R === "__proto__")
|
|
1103
1105
|
continue;
|
|
1104
|
-
const
|
|
1105
|
-
|
|
1106
|
+
const q = h[R], z = q._zod.optin, P = q._zod.optout, E = q._zod.run({ value: p[R], issues: [] }, u);
|
|
1107
|
+
E instanceof Promise ? d.push(E.then((j) => Ze(j, i, R, p, z, P))) : Ze(E, i, R, p, z, P);
|
|
1106
1108
|
}
|
|
1107
|
-
return
|
|
1109
|
+
return l ? lr(d, p, i, u, n.value, e, f === !0) : d.length ? Promise.all(d).then(() => i) : i;
|
|
1108
1110
|
};
|
|
1109
1111
|
});
|
|
1110
1112
|
function mt(e, t, o, r) {
|
|
1111
1113
|
for (const a of e)
|
|
1112
1114
|
if (a.issues.length === 0)
|
|
1113
1115
|
return t.value = a.value, t;
|
|
1114
|
-
const n = e.filter((a) => !
|
|
1116
|
+
const n = e.filter((a) => !_e(a));
|
|
1115
1117
|
return n.length === 1 ? (t.value = n[0].value, n[0]) : (t.issues.push({
|
|
1116
1118
|
code: "invalid_union",
|
|
1117
1119
|
input: t.value,
|
|
1118
1120
|
inst: o,
|
|
1119
|
-
errors: e.map((a) => a.issues.map((
|
|
1121
|
+
errors: e.map((a) => a.issues.map((l) => Se(l, r, ye())))
|
|
1120
1122
|
}), t);
|
|
1121
1123
|
}
|
|
1122
1124
|
const ur = /* @__PURE__ */ Q("$ZodUnion", (e, t) => {
|
|
1123
|
-
|
|
1125
|
+
xe.init(e, t), be(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), be(e, "optout", (r) => r.def.options.some((n) => n._zod.optout === "optional") ? "optional" : void 0), be(e, "values", (r) => {
|
|
1124
1126
|
if (r.def.options.every((n) => n._zod.values))
|
|
1125
1127
|
return new Set(r.def.options.flatMap((n) => Array.from(n._zod.values)));
|
|
1126
|
-
}),
|
|
1128
|
+
}), be(e, "pattern", (r) => {
|
|
1127
1129
|
if (r.def.options.every((n) => n._zod.pattern)) {
|
|
1128
1130
|
const n = r.def.options.map((a) => a._zod.pattern);
|
|
1129
1131
|
return new RegExp(`^(${n.map((a) => Ct(a.source)).join("|")})$`);
|
|
@@ -1134,73 +1136,73 @@ const ur = /* @__PURE__ */ Q("$ZodUnion", (e, t) => {
|
|
|
1134
1136
|
if (o)
|
|
1135
1137
|
return o(r, n);
|
|
1136
1138
|
let a = !1;
|
|
1137
|
-
const
|
|
1139
|
+
const l = [];
|
|
1138
1140
|
for (const s of t.options) {
|
|
1139
|
-
const
|
|
1141
|
+
const c = s._zod.run({
|
|
1140
1142
|
value: r.value,
|
|
1141
1143
|
issues: []
|
|
1142
1144
|
}, n);
|
|
1143
|
-
if (
|
|
1144
|
-
|
|
1145
|
+
if (c instanceof Promise)
|
|
1146
|
+
l.push(c), a = !0;
|
|
1145
1147
|
else {
|
|
1146
|
-
if (
|
|
1147
|
-
return
|
|
1148
|
-
|
|
1148
|
+
if (c.issues.length === 0)
|
|
1149
|
+
return c;
|
|
1150
|
+
l.push(c);
|
|
1149
1151
|
}
|
|
1150
1152
|
}
|
|
1151
|
-
return a ? Promise.all(
|
|
1153
|
+
return a ? Promise.all(l).then((s) => mt(s, r, e, n)) : mt(l, r, e, n);
|
|
1152
1154
|
};
|
|
1153
1155
|
}), dr = /* @__PURE__ */ Q("$ZodRecord", (e, t) => {
|
|
1154
|
-
|
|
1155
|
-
const o =
|
|
1156
|
+
xe.init(e, t);
|
|
1157
|
+
const o = Ne.memoizer;
|
|
1156
1158
|
o?.attach(e), e._zod.parse = (r, n) => {
|
|
1157
1159
|
const a = r.value;
|
|
1158
|
-
if (!
|
|
1160
|
+
if (!Eo(a))
|
|
1159
1161
|
return r.issues.push({
|
|
1160
1162
|
expected: "record",
|
|
1161
1163
|
code: "invalid_type",
|
|
1162
1164
|
input: a,
|
|
1163
1165
|
inst: e
|
|
1164
1166
|
}), r;
|
|
1165
|
-
const
|
|
1167
|
+
const l = [], s = t.keyType._zod.values;
|
|
1166
1168
|
if (s && !t.partial) {
|
|
1167
1169
|
r.value = o ? o.alloc(e, r, {}, n) : {};
|
|
1168
|
-
const
|
|
1169
|
-
for (const
|
|
1170
|
-
if (typeof
|
|
1171
|
-
if (
|
|
1170
|
+
const c = /* @__PURE__ */ new Set();
|
|
1171
|
+
for (const u of s)
|
|
1172
|
+
if (typeof u == "string" || typeof u == "number" || typeof u == "symbol") {
|
|
1173
|
+
if (c.add(typeof u == "number" ? u.toString() : u), u === "__proto__")
|
|
1172
1174
|
continue;
|
|
1173
|
-
const
|
|
1174
|
-
if (
|
|
1175
|
+
const p = t.keyType._zod.run({ value: u, issues: [] }, n);
|
|
1176
|
+
if (p instanceof Promise)
|
|
1175
1177
|
throw new Error("Async schemas not supported in object keys currently");
|
|
1176
|
-
if (
|
|
1178
|
+
if (p.issues.length) {
|
|
1177
1179
|
r.issues.push({
|
|
1178
1180
|
code: "invalid_key",
|
|
1179
1181
|
origin: "record",
|
|
1180
|
-
issues:
|
|
1181
|
-
input:
|
|
1182
|
-
path: [
|
|
1182
|
+
issues: p.issues.map((f) => Se(f, n, ye())),
|
|
1183
|
+
input: u,
|
|
1184
|
+
path: [u],
|
|
1183
1185
|
inst: e
|
|
1184
1186
|
});
|
|
1185
1187
|
continue;
|
|
1186
1188
|
}
|
|
1187
|
-
const
|
|
1188
|
-
if (
|
|
1189
|
+
const d = p.value;
|
|
1190
|
+
if (d === "__proto__")
|
|
1189
1191
|
continue;
|
|
1190
|
-
const h = t.valueType._zod.run({ value: a[
|
|
1191
|
-
h instanceof Promise ?
|
|
1192
|
-
f.issues.length && r.issues.push(...
|
|
1193
|
-
})) : (h.issues.length && r.issues.push(...
|
|
1192
|
+
const h = t.valueType._zod.run({ value: a[u], issues: [] }, n);
|
|
1193
|
+
h instanceof Promise ? l.push(h.then((f) => {
|
|
1194
|
+
f.issues.length && r.issues.push(...Pe(u, f.issues)), r.value[d] = f.value;
|
|
1195
|
+
})) : (h.issues.length && r.issues.push(...Pe(u, h.issues)), r.value[d] = h.value);
|
|
1194
1196
|
}
|
|
1195
1197
|
let i;
|
|
1196
|
-
for (const
|
|
1197
|
-
if (!
|
|
1198
|
+
for (const u in a)
|
|
1199
|
+
if (!c.has(u))
|
|
1198
1200
|
if (t.mode === "loose") {
|
|
1199
|
-
if (
|
|
1201
|
+
if (u === "__proto__")
|
|
1200
1202
|
continue;
|
|
1201
|
-
r.value[
|
|
1203
|
+
r.value[u] = a[u];
|
|
1202
1204
|
} else
|
|
1203
|
-
i = i ?? [], i.push(
|
|
1205
|
+
i = i ?? [], i.push(u);
|
|
1204
1206
|
i && i.length > 0 && r.issues.push({
|
|
1205
1207
|
code: "unrecognized_keys",
|
|
1206
1208
|
input: a,
|
|
@@ -1210,52 +1212,52 @@ const ur = /* @__PURE__ */ Q("$ZodUnion", (e, t) => {
|
|
|
1210
1212
|
});
|
|
1211
1213
|
} else {
|
|
1212
1214
|
r.value = o ? o.alloc(e, r, {}, n) : {};
|
|
1213
|
-
let
|
|
1215
|
+
let c;
|
|
1214
1216
|
for (const i of Reflect.ownKeys(a)) {
|
|
1215
1217
|
if (i === "__proto__" || !Object.prototype.propertyIsEnumerable.call(a, i))
|
|
1216
1218
|
continue;
|
|
1217
|
-
let
|
|
1218
|
-
if (
|
|
1219
|
+
let u = t.keyType._zod.run({ value: i, issues: [] }, n);
|
|
1220
|
+
if (u instanceof Promise)
|
|
1219
1221
|
throw new Error("Async schemas not supported in object keys currently");
|
|
1220
|
-
if (typeof i == "string" && Qo.test(i) &&
|
|
1222
|
+
if (typeof i == "string" && Qo.test(i) && u.issues.length) {
|
|
1221
1223
|
const f = t.keyType._zod.run({ value: Number(i), issues: [] }, n);
|
|
1222
1224
|
if (f instanceof Promise)
|
|
1223
1225
|
throw new Error("Async schemas not supported in object keys currently");
|
|
1224
|
-
f.issues.length === 0 && (
|
|
1226
|
+
f.issues.length === 0 && (u = f);
|
|
1225
1227
|
}
|
|
1226
|
-
if (
|
|
1227
|
-
t.mode === "loose" ? r.value[i] = a[i] : s ? (
|
|
1228
|
+
if (u.issues.length) {
|
|
1229
|
+
t.mode === "loose" ? r.value[i] = a[i] : s ? (c = c ?? [], c.push(i)) : r.issues.push({
|
|
1228
1230
|
code: "invalid_key",
|
|
1229
1231
|
origin: "record",
|
|
1230
|
-
issues:
|
|
1232
|
+
issues: u.issues.map((f) => Se(f, n, ye())),
|
|
1231
1233
|
input: i,
|
|
1232
1234
|
path: [i],
|
|
1233
1235
|
inst: e
|
|
1234
1236
|
});
|
|
1235
1237
|
continue;
|
|
1236
1238
|
}
|
|
1237
|
-
const
|
|
1238
|
-
if (
|
|
1239
|
+
const d = u.value;
|
|
1240
|
+
if (d === "__proto__")
|
|
1239
1241
|
continue;
|
|
1240
1242
|
const h = t.valueType._zod.run({ value: a[i], issues: [] }, n);
|
|
1241
|
-
h instanceof Promise ?
|
|
1242
|
-
f.issues.length && r.issues.push(...
|
|
1243
|
-
})) : (h.issues.length && r.issues.push(...
|
|
1243
|
+
h instanceof Promise ? l.push(h.then((f) => {
|
|
1244
|
+
f.issues.length && r.issues.push(...Pe(i, f.issues)), r.value[d] = f.value;
|
|
1245
|
+
})) : (h.issues.length && r.issues.push(...Pe(i, h.issues)), r.value[d] = h.value);
|
|
1244
1246
|
}
|
|
1245
|
-
|
|
1247
|
+
c && c.length > 0 && r.issues.push({
|
|
1246
1248
|
code: "unrecognized_keys",
|
|
1247
1249
|
input: a,
|
|
1248
1250
|
inst: e,
|
|
1249
|
-
keys:
|
|
1251
|
+
keys: c,
|
|
1250
1252
|
continue: !0
|
|
1251
1253
|
});
|
|
1252
1254
|
}
|
|
1253
|
-
return
|
|
1255
|
+
return l.length ? Promise.all(l).then(() => r) : r;
|
|
1254
1256
|
};
|
|
1255
1257
|
}), pr = /* @__PURE__ */ Q("$ZodLiteral", (e, t) => {
|
|
1256
|
-
|
|
1258
|
+
xe.init(e, t);
|
|
1257
1259
|
const o = new Set(t.values);
|
|
1258
|
-
e._zod.values = o,
|
|
1260
|
+
e._zod.values = o, be(e, "pattern", (r) => {
|
|
1259
1261
|
const n = r.def.values;
|
|
1260
1262
|
return new RegExp(n.length ? `^(${n.map((a) => typeof a == "string" ? dt(a) : a ? dt(a.toString()) : String(a)).join("|")})$` : "^[^\\s\\S]$");
|
|
1261
1263
|
}), e._zod.parse = (r, n) => {
|
|
@@ -1268,42 +1270,42 @@ const ur = /* @__PURE__ */ Q("$ZodUnion", (e, t) => {
|
|
|
1268
1270
|
}), r;
|
|
1269
1271
|
};
|
|
1270
1272
|
}), hr = /* @__PURE__ */ Q("$ZodNullable", (e, t) => {
|
|
1271
|
-
|
|
1273
|
+
xe.init(e, t), be(e, "optin", (o) => o.def.innerType._zod.optin), be(e, "optout", (o) => o.def.innerType._zod.optout), be(e, "pattern", (o) => {
|
|
1272
1274
|
const r = o.def.innerType._zod.pattern;
|
|
1273
1275
|
return r ? new RegExp(`^(${Ct(r.source)}|null)$`) : void 0;
|
|
1274
|
-
}),
|
|
1276
|
+
}), be(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);
|
|
1275
1277
|
});
|
|
1276
1278
|
function fr(e) {
|
|
1277
1279
|
return e.checks && (e.checks = [...e.checks]), e;
|
|
1278
1280
|
}
|
|
1279
1281
|
// @__NO_SIDE_EFFECTS__
|
|
1280
1282
|
function gr(e, t) {
|
|
1281
|
-
return new e(fr({ type: "string", ...
|
|
1283
|
+
return new e(fr({ type: "string", ...Ce(t) }));
|
|
1282
1284
|
}
|
|
1283
1285
|
// @__NO_SIDE_EFFECTS__
|
|
1284
1286
|
function mr(e, t) {
|
|
1285
1287
|
return new e({
|
|
1286
1288
|
type: "null",
|
|
1287
|
-
...
|
|
1289
|
+
...Ce(t)
|
|
1288
1290
|
});
|
|
1289
1291
|
}
|
|
1290
|
-
const
|
|
1292
|
+
const Ie = /* @__PURE__ */ Q("ZodMiniType", (e, t) => {
|
|
1291
1293
|
if (!e._zod)
|
|
1292
1294
|
throw new Error("Uninitialized schema in ZodMiniType.");
|
|
1293
|
-
|
|
1295
|
+
xe.init(e, t), e.def = t, e.type = t.type;
|
|
1294
1296
|
}, {
|
|
1295
1297
|
// `with` is an alias for `check`: the same function object, not a wrapper.
|
|
1296
1298
|
get with() {
|
|
1297
1299
|
return this.check;
|
|
1298
1300
|
},
|
|
1299
1301
|
set with(e) {
|
|
1300
|
-
|
|
1302
|
+
Ue(this, "with", e);
|
|
1301
1303
|
},
|
|
1302
1304
|
parse(e, t) {
|
|
1303
|
-
return
|
|
1305
|
+
return Ho(this, e, t, { callee: this.parse });
|
|
1304
1306
|
},
|
|
1305
1307
|
parseAsync(e, t) {
|
|
1306
|
-
return
|
|
1308
|
+
return Wo(this, e, t, { callee: this.parseAsync });
|
|
1307
1309
|
},
|
|
1308
1310
|
safeParse(e, t) {
|
|
1309
1311
|
return Jo(this, e, t);
|
|
@@ -1334,44 +1336,44 @@ const Re = /* @__PURE__ */ Q("ZodMiniType", (e, t) => {
|
|
|
1334
1336
|
return t.length === 0 ? e(this) : e(this, ...t);
|
|
1335
1337
|
}
|
|
1336
1338
|
}), br = /* @__PURE__ */ Q("ZodMiniString", (e, t) => {
|
|
1337
|
-
nr.init(e, t),
|
|
1339
|
+
nr.init(e, t), Ie.init(e, t);
|
|
1338
1340
|
});
|
|
1339
1341
|
// @__NO_SIDE_EFFECTS__
|
|
1340
1342
|
function T(e) {
|
|
1341
1343
|
return /* @__PURE__ */ gr(br, e);
|
|
1342
1344
|
}
|
|
1343
1345
|
const vr = /* @__PURE__ */ Q("ZodMiniNull", (e, t) => {
|
|
1344
|
-
ar.init(e, t),
|
|
1346
|
+
ar.init(e, t), Ie.init(e, t);
|
|
1345
1347
|
});
|
|
1346
1348
|
// @__NO_SIDE_EFFECTS__
|
|
1347
1349
|
function wr(e) {
|
|
1348
1350
|
return /* @__PURE__ */ mr(vr, e);
|
|
1349
1351
|
}
|
|
1350
1352
|
const qr = /* @__PURE__ */ Q("ZodMiniObject", (e, t) => {
|
|
1351
|
-
cr.init(e, t),
|
|
1353
|
+
cr.init(e, t), Ie.init(e, t), Do(e, "shape", (o) => o._zod.def.shape, !1);
|
|
1352
1354
|
});
|
|
1353
1355
|
// @__NO_SIDE_EFFECTS__
|
|
1354
1356
|
function B(e, t) {
|
|
1355
1357
|
const o = {
|
|
1356
1358
|
type: "object",
|
|
1357
1359
|
shape: e ?? {},
|
|
1358
|
-
...
|
|
1360
|
+
...Ce(t)
|
|
1359
1361
|
};
|
|
1360
1362
|
return new qr(o);
|
|
1361
1363
|
}
|
|
1362
1364
|
const yr = /* @__PURE__ */ Q("ZodMiniUnion", (e, t) => {
|
|
1363
|
-
ur.init(e, t),
|
|
1365
|
+
ur.init(e, t), Ie.init(e, t);
|
|
1364
1366
|
});
|
|
1365
1367
|
// @__NO_SIDE_EFFECTS__
|
|
1366
1368
|
function xr(e, t) {
|
|
1367
1369
|
return new yr({
|
|
1368
1370
|
type: "union",
|
|
1369
1371
|
options: e,
|
|
1370
|
-
...
|
|
1372
|
+
...Ce(t)
|
|
1371
1373
|
});
|
|
1372
1374
|
}
|
|
1373
1375
|
const bt = /* @__PURE__ */ Q("ZodMiniRecord", (e, t) => {
|
|
1374
|
-
dr.init(e, t),
|
|
1376
|
+
dr.init(e, t), Ie.init(e, t);
|
|
1375
1377
|
});
|
|
1376
1378
|
// @__NO_SIDE_EFFECTS__
|
|
1377
1379
|
function kr(e, t, o) {
|
|
@@ -1379,27 +1381,27 @@ function kr(e, t, o) {
|
|
|
1379
1381
|
type: "record",
|
|
1380
1382
|
keyType: /* @__PURE__ */ T(),
|
|
1381
1383
|
valueType: e,
|
|
1382
|
-
...
|
|
1384
|
+
...Ce(t)
|
|
1383
1385
|
}) : new bt({
|
|
1384
1386
|
type: "record",
|
|
1385
1387
|
keyType: e,
|
|
1386
1388
|
valueType: t,
|
|
1387
|
-
...
|
|
1389
|
+
...Ce(o)
|
|
1388
1390
|
});
|
|
1389
1391
|
}
|
|
1390
1392
|
const _r = /* @__PURE__ */ Q("ZodMiniLiteral", (e, t) => {
|
|
1391
|
-
pr.init(e, t),
|
|
1393
|
+
pr.init(e, t), Ie.init(e, t);
|
|
1392
1394
|
});
|
|
1393
1395
|
// @__NO_SIDE_EFFECTS__
|
|
1394
|
-
function
|
|
1396
|
+
function ge(e, t) {
|
|
1395
1397
|
return new _r({
|
|
1396
1398
|
type: "literal",
|
|
1397
1399
|
values: Array.isArray(e) ? e : [e],
|
|
1398
|
-
...
|
|
1400
|
+
...Ce(t)
|
|
1399
1401
|
});
|
|
1400
1402
|
}
|
|
1401
1403
|
const Cr = /* @__PURE__ */ Q("ZodMiniNullable", (e, t) => {
|
|
1402
|
-
hr.init(e, t),
|
|
1404
|
+
hr.init(e, t), Ie.init(e, t);
|
|
1403
1405
|
});
|
|
1404
1406
|
// @__NO_SIDE_EFFECTS__
|
|
1405
1407
|
function st(e) {
|
|
@@ -1408,37 +1410,37 @@ function st(e) {
|
|
|
1408
1410
|
innerType: e
|
|
1409
1411
|
});
|
|
1410
1412
|
}
|
|
1411
|
-
|
|
1413
|
+
ye({ jitless: !0 });
|
|
1412
1414
|
const Sr = /* @__PURE__ */ B({
|
|
1413
|
-
type: /* @__PURE__ */
|
|
1415
|
+
type: /* @__PURE__ */ ge("utterance"),
|
|
1414
1416
|
content: /* @__PURE__ */ T(),
|
|
1415
1417
|
role: /* @__PURE__ */ T()
|
|
1416
1418
|
}), Ir = /* @__PURE__ */ B({
|
|
1417
|
-
type: /* @__PURE__ */
|
|
1418
|
-
content: /* @__PURE__ */ T()
|
|
1419
|
-
}), Er = /* @__PURE__ */ B({
|
|
1420
|
-
type: /* @__PURE__ */ fe("chat_closed_expired"),
|
|
1419
|
+
type: /* @__PURE__ */ ge("agent_cognition"),
|
|
1421
1420
|
content: /* @__PURE__ */ T()
|
|
1422
1421
|
}), Rr = /* @__PURE__ */ B({
|
|
1423
|
-
type: /* @__PURE__ */
|
|
1422
|
+
type: /* @__PURE__ */ ge("chat_closed_expired"),
|
|
1423
|
+
content: /* @__PURE__ */ T()
|
|
1424
|
+
}), Er = /* @__PURE__ */ B({
|
|
1425
|
+
type: /* @__PURE__ */ ge("agent_captured_url"),
|
|
1424
1426
|
content: /* @__PURE__ */ T()
|
|
1425
1427
|
}), zr = /* @__PURE__ */ B({
|
|
1426
|
-
type: /* @__PURE__ */
|
|
1428
|
+
type: /* @__PURE__ */ ge("agent_topic"),
|
|
1427
1429
|
content: /* @__PURE__ */ T()
|
|
1428
1430
|
}), Tr = /* @__PURE__ */ B({
|
|
1429
|
-
type: /* @__PURE__ */
|
|
1431
|
+
type: /* @__PURE__ */ ge("agent_summary"),
|
|
1430
1432
|
content: /* @__PURE__ */ T()
|
|
1431
1433
|
}), Mr = /* @__PURE__ */ B({
|
|
1432
|
-
type: /* @__PURE__ */
|
|
1434
|
+
type: /* @__PURE__ */ ge("chat_rating"),
|
|
1433
1435
|
content: /* @__PURE__ */ T()
|
|
1434
1436
|
}), Ar = /* @__PURE__ */ B({
|
|
1435
|
-
type: /* @__PURE__ */
|
|
1437
|
+
type: /* @__PURE__ */ ge("breadcrumb"),
|
|
1436
1438
|
content: /* @__PURE__ */ T()
|
|
1437
1439
|
}), Pr = /* @__PURE__ */ B({
|
|
1438
|
-
type: /* @__PURE__ */
|
|
1440
|
+
type: /* @__PURE__ */ ge("chat_escalated"),
|
|
1439
1441
|
content: /* @__PURE__ */ wr()
|
|
1440
1442
|
}), Or = /* @__PURE__ */ B({
|
|
1441
|
-
type: /* @__PURE__ */
|
|
1443
|
+
type: /* @__PURE__ */ ge("error"),
|
|
1442
1444
|
code: /* @__PURE__ */ T()
|
|
1443
1445
|
}), Ur = /* @__PURE__ */ B({
|
|
1444
1446
|
message_id: /* @__PURE__ */ st(/* @__PURE__ */ T()),
|
|
@@ -1453,10 +1455,10 @@ const Sr = /* @__PURE__ */ B({
|
|
|
1453
1455
|
}), $r = /* @__PURE__ */ B({
|
|
1454
1456
|
message_id: /* @__PURE__ */ st(/* @__PURE__ */ T()),
|
|
1455
1457
|
created_at: /* @__PURE__ */ T(),
|
|
1456
|
-
data:
|
|
1458
|
+
data: Rr
|
|
1457
1459
|
}), Br = /* @__PURE__ */ B({
|
|
1458
1460
|
created_at: /* @__PURE__ */ T(),
|
|
1459
|
-
data:
|
|
1461
|
+
data: Er
|
|
1460
1462
|
}), Lr = /* @__PURE__ */ B({
|
|
1461
1463
|
created_at: /* @__PURE__ */ T(),
|
|
1462
1464
|
data: zr
|
|
@@ -1469,11 +1471,11 @@ const Sr = /* @__PURE__ */ B({
|
|
|
1469
1471
|
}), Kr = /* @__PURE__ */ B({
|
|
1470
1472
|
created_at: /* @__PURE__ */ T(),
|
|
1471
1473
|
data: Ar
|
|
1472
|
-
}),
|
|
1474
|
+
}), Hr = /* @__PURE__ */ B({
|
|
1473
1475
|
message_id: /* @__PURE__ */ st(/* @__PURE__ */ T()),
|
|
1474
1476
|
created_at: /* @__PURE__ */ T(),
|
|
1475
1477
|
data: Pr
|
|
1476
|
-
}),
|
|
1478
|
+
}), Vr = /* @__PURE__ */ xr([
|
|
1477
1479
|
Ur,
|
|
1478
1480
|
jr,
|
|
1479
1481
|
Dr,
|
|
@@ -1483,13 +1485,13 @@ const Sr = /* @__PURE__ */ B({
|
|
|
1483
1485
|
$r,
|
|
1484
1486
|
Zr,
|
|
1485
1487
|
Kr,
|
|
1486
|
-
|
|
1487
|
-
]),
|
|
1488
|
+
Hr
|
|
1489
|
+
]), Wr = /* @__PURE__ */ B({
|
|
1488
1490
|
url: /* @__PURE__ */ T(),
|
|
1489
|
-
mimeType: /* @__PURE__ */
|
|
1491
|
+
mimeType: /* @__PURE__ */ ge(Ut),
|
|
1490
1492
|
name: /* @__PURE__ */ T()
|
|
1491
|
-
}),
|
|
1492
|
-
data:
|
|
1493
|
+
}), Fr = /* @__PURE__ */ B({
|
|
1494
|
+
data: Wr
|
|
1493
1495
|
}), Jr = /* @__PURE__ */ B({
|
|
1494
1496
|
data: /* @__PURE__ */ B({ urls: /* @__PURE__ */ kr(/* @__PURE__ */ T(), /* @__PURE__ */ T()) })
|
|
1495
1497
|
}), Gr = 500, Yr = 3e4, Xr = 6e4, Qr = 1e4, en = 12e4;
|
|
@@ -1498,105 +1500,105 @@ function tn({
|
|
|
1498
1500
|
chatId: t,
|
|
1499
1501
|
messages: o,
|
|
1500
1502
|
onMessage: r,
|
|
1501
|
-
|
|
1503
|
+
onHistory: n,
|
|
1502
1504
|
onCognition: a,
|
|
1503
|
-
onCognitionComplete:
|
|
1505
|
+
onCognitionComplete: l,
|
|
1504
1506
|
onError: s,
|
|
1505
|
-
onChatClosed:
|
|
1507
|
+
onChatClosed: c,
|
|
1506
1508
|
onAgentCapturedUrl: i,
|
|
1507
|
-
onAgentTopic:
|
|
1508
|
-
onAgentSummary:
|
|
1509
|
-
onRatingRequest:
|
|
1509
|
+
onAgentTopic: u,
|
|
1510
|
+
onAgentSummary: p,
|
|
1511
|
+
onRatingRequest: d,
|
|
1510
1512
|
onBreadcrumb: h,
|
|
1511
1513
|
fetchHistory: f,
|
|
1512
1514
|
getChatToken: g,
|
|
1513
|
-
backupPollingInterval:
|
|
1515
|
+
backupPollingInterval: R = Xr
|
|
1514
1516
|
}) {
|
|
1515
|
-
const
|
|
1516
|
-
|
|
1517
|
-
for (const
|
|
1518
|
-
|
|
1517
|
+
const q = $(/* @__PURE__ */ new Set());
|
|
1518
|
+
V(() => {
|
|
1519
|
+
for (const A of o)
|
|
1520
|
+
A.id && q.current.add(A.id);
|
|
1519
1521
|
}, [o]);
|
|
1520
|
-
const z = $(null),
|
|
1522
|
+
const z = $(null), P = $(null), E = $(0), j = $(null), O = $(null), m = $(null), y = $(null), _ = $(0), oe = $(!1), ee = $(!1), de = F(r), ae = F(n), D = F(a), J = F(l), N = F(s), W = F(c), re = F(i), le = F(u), G = F(p), ie = F(d), Y = F(h), ce = F(f), ve = F(g), { publishError: pe } = Ke(), ne = e?.app_sync_url, he = e?.app_sync_api_key, b = !!(ne && he), x = F(ne), U = F(he), M = v(() => {
|
|
1521
1523
|
z.current && (z.current.close(), z.current = null);
|
|
1522
|
-
}, []),
|
|
1523
|
-
|
|
1524
|
-
}, []),
|
|
1525
|
-
|
|
1526
|
-
}, []),
|
|
1527
|
-
|
|
1528
|
-
}, [
|
|
1524
|
+
}, []), k = v(() => {
|
|
1525
|
+
O.current && (clearInterval(O.current), O.current = null);
|
|
1526
|
+
}, []), S = v(() => {
|
|
1527
|
+
_.current = 0, m.current && (clearInterval(m.current), m.current = null), y.current && (clearTimeout(y.current), y.current = null);
|
|
1528
|
+
}, []), w = v(() => {
|
|
1529
|
+
_.current = Math.max(0, _.current - 1), _.current === 0 && S();
|
|
1530
|
+
}, [S]), Z = v(() => {
|
|
1529
1531
|
j.current && (clearTimeout(j.current), j.current = null);
|
|
1530
|
-
}, []),
|
|
1531
|
-
}),
|
|
1532
|
-
async (
|
|
1533
|
-
|
|
1534
|
-
const
|
|
1535
|
-
if (!
|
|
1532
|
+
}, []), X = $(() => {
|
|
1533
|
+
}), K = v(
|
|
1534
|
+
async (A) => {
|
|
1535
|
+
M();
|
|
1536
|
+
const se = x.current, we = U.current;
|
|
1537
|
+
if (!se || !we)
|
|
1536
1538
|
throw new Error("Cannot connect: AppSync settings not available");
|
|
1537
|
-
const
|
|
1538
|
-
httpEndpoint:
|
|
1539
|
-
auth:
|
|
1540
|
-
channel: `/default/chat/${
|
|
1539
|
+
const te = ve.current(), Fe = await _o({
|
|
1540
|
+
httpEndpoint: se,
|
|
1541
|
+
auth: te ? { authorizationToken: te } : { apiKey: we },
|
|
1542
|
+
channel: `/default/chat/${A}`,
|
|
1541
1543
|
onDisconnect: () => {
|
|
1542
|
-
z.current = null,
|
|
1544
|
+
z.current = null, X.current();
|
|
1543
1545
|
},
|
|
1544
|
-
onEvent: (
|
|
1545
|
-
const
|
|
1546
|
-
if (!
|
|
1547
|
-
console.error("Invalid conversation response:",
|
|
1546
|
+
onEvent: (je) => {
|
|
1547
|
+
const Te = Vr.safeParse(je);
|
|
1548
|
+
if (!Te.success) {
|
|
1549
|
+
console.error("Invalid conversation response:", Te.error);
|
|
1548
1550
|
return;
|
|
1549
1551
|
}
|
|
1550
|
-
const
|
|
1551
|
-
switch (
|
|
1552
|
+
const me = Te.data;
|
|
1553
|
+
switch (me.data.type) {
|
|
1552
1554
|
case "utterance": {
|
|
1553
|
-
const
|
|
1554
|
-
if (
|
|
1555
|
+
const L = me, ue = L.message_id ?? crypto.randomUUID();
|
|
1556
|
+
if (q.current.has(ue))
|
|
1555
1557
|
return;
|
|
1556
|
-
|
|
1558
|
+
q.current.add(ue), w(), J.current(), de.current(
|
|
1557
1559
|
{
|
|
1558
|
-
message_id:
|
|
1560
|
+
message_id: ue,
|
|
1559
1561
|
response: {
|
|
1560
|
-
id:
|
|
1561
|
-
type:
|
|
1562
|
-
content:
|
|
1562
|
+
id: ue,
|
|
1563
|
+
type: L.data.type,
|
|
1564
|
+
content: L.data.content
|
|
1563
1565
|
}
|
|
1564
1566
|
},
|
|
1565
|
-
|
|
1567
|
+
A
|
|
1566
1568
|
);
|
|
1567
1569
|
return;
|
|
1568
1570
|
}
|
|
1569
1571
|
case "error": {
|
|
1570
|
-
const
|
|
1571
|
-
pe({ code:
|
|
1572
|
+
const ue = parseInt(me.data.code);
|
|
1573
|
+
pe({ code: ue, message: jt(ue) }), N.current?.();
|
|
1572
1574
|
return;
|
|
1573
1575
|
}
|
|
1574
1576
|
case "agent_cognition": {
|
|
1575
|
-
const
|
|
1576
|
-
D.current(
|
|
1577
|
+
const L = me;
|
|
1578
|
+
D.current(L.data.content);
|
|
1577
1579
|
return;
|
|
1578
1580
|
}
|
|
1579
1581
|
case "agent_captured_url": {
|
|
1580
|
-
const
|
|
1581
|
-
|
|
1582
|
+
const L = me;
|
|
1583
|
+
re.current?.(L.data.content);
|
|
1582
1584
|
return;
|
|
1583
1585
|
}
|
|
1584
1586
|
case "agent_topic": {
|
|
1585
|
-
const
|
|
1586
|
-
|
|
1587
|
+
const L = me;
|
|
1588
|
+
le.current?.(L.data.content);
|
|
1587
1589
|
return;
|
|
1588
1590
|
}
|
|
1589
1591
|
case "agent_summary": {
|
|
1590
|
-
const
|
|
1591
|
-
G.current?.(
|
|
1592
|
+
const L = me;
|
|
1593
|
+
G.current?.(L.data.content);
|
|
1592
1594
|
return;
|
|
1593
1595
|
}
|
|
1594
1596
|
case "chat_closed_expired": {
|
|
1595
|
-
|
|
1597
|
+
W.current?.(), ie.current?.();
|
|
1596
1598
|
return;
|
|
1597
1599
|
}
|
|
1598
1600
|
case "chat_rating": {
|
|
1599
|
-
|
|
1601
|
+
ie.current?.();
|
|
1600
1602
|
return;
|
|
1601
1603
|
}
|
|
1602
1604
|
case "breadcrumb": {
|
|
@@ -1604,133 +1606,121 @@ function tn({
|
|
|
1604
1606
|
return;
|
|
1605
1607
|
}
|
|
1606
1608
|
case "chat_escalated": {
|
|
1607
|
-
|
|
1609
|
+
W.current?.(), ie.current?.();
|
|
1608
1610
|
return;
|
|
1609
1611
|
}
|
|
1610
1612
|
default:
|
|
1611
1613
|
console.warn(
|
|
1612
1614
|
"Unknown notification type:",
|
|
1613
|
-
|
|
1615
|
+
me.data.type
|
|
1614
1616
|
);
|
|
1615
1617
|
}
|
|
1616
1618
|
}
|
|
1617
1619
|
});
|
|
1618
|
-
z.current =
|
|
1620
|
+
z.current = Fe;
|
|
1619
1621
|
},
|
|
1620
1622
|
// The *Ref entries are latest-refs (stable identities); listed to satisfy
|
|
1621
1623
|
// exhaustive-deps, which can't see that useLatestRef returns a ref.
|
|
1622
1624
|
[
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
+
M,
|
|
1626
|
+
w,
|
|
1625
1627
|
pe,
|
|
1626
1628
|
x,
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1629
|
+
U,
|
|
1630
|
+
ve,
|
|
1631
|
+
de,
|
|
1630
1632
|
D,
|
|
1631
1633
|
J,
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1634
|
+
N,
|
|
1635
|
+
W,
|
|
1636
|
+
re,
|
|
1637
|
+
le,
|
|
1636
1638
|
G,
|
|
1637
|
-
|
|
1639
|
+
ie,
|
|
1638
1640
|
Y
|
|
1639
1641
|
]
|
|
1640
|
-
),
|
|
1641
|
-
async (
|
|
1642
|
-
let
|
|
1642
|
+
), H = v(
|
|
1643
|
+
async (A) => {
|
|
1644
|
+
let se;
|
|
1643
1645
|
try {
|
|
1644
|
-
|
|
1645
|
-
} catch (
|
|
1646
|
-
console.warn("Backup poll failed:",
|
|
1646
|
+
se = await ce.current(A);
|
|
1647
|
+
} catch (te) {
|
|
1648
|
+
console.warn("Backup poll failed:", te);
|
|
1647
1649
|
return;
|
|
1648
1650
|
}
|
|
1649
|
-
if (
|
|
1650
|
-
const we =
|
|
1651
|
-
(
|
|
1651
|
+
if (P.current !== A) return;
|
|
1652
|
+
const we = se.filter(
|
|
1653
|
+
(te) => (te.role === "user" || te.role === "assistant") && !!te.message_id
|
|
1652
1654
|
);
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
const _e = we[Ae - 1]?.message_id ?? null, qe = { message_id: F.message_id, response: F.response };
|
|
1657
|
-
if (F.role === "user") {
|
|
1658
|
-
ie.current?.(
|
|
1659
|
-
qe,
|
|
1660
|
-
M,
|
|
1661
|
-
_e,
|
|
1662
|
-
F.created_at
|
|
1663
|
-
);
|
|
1664
|
-
return;
|
|
1665
|
-
}
|
|
1666
|
-
w.current.add(F.message_id), L(), ae.current(qe, M, _e);
|
|
1667
|
-
});
|
|
1655
|
+
for (const te of we)
|
|
1656
|
+
te.role !== "assistant" || q.current.has(te.message_id) || (q.current.add(te.message_id), w());
|
|
1657
|
+
ae.current(we, A);
|
|
1668
1658
|
},
|
|
1669
|
-
[
|
|
1670
|
-
),
|
|
1671
|
-
(
|
|
1672
|
-
|
|
1673
|
-
() =>
|
|
1674
|
-
|
|
1659
|
+
[ce, ae, w]
|
|
1660
|
+
), fe = v(
|
|
1661
|
+
(A) => {
|
|
1662
|
+
k(), O.current = setInterval(
|
|
1663
|
+
() => H(A),
|
|
1664
|
+
R
|
|
1675
1665
|
);
|
|
1676
1666
|
},
|
|
1677
|
-
[
|
|
1678
|
-
),
|
|
1679
|
-
function
|
|
1680
|
-
if (!
|
|
1667
|
+
[k, H, R]
|
|
1668
|
+
), Re = v(
|
|
1669
|
+
function A() {
|
|
1670
|
+
if (!oe.current || ee.current || j.current)
|
|
1681
1671
|
return;
|
|
1682
|
-
const
|
|
1683
|
-
if (!
|
|
1672
|
+
const se = P.current;
|
|
1673
|
+
if (!se) return;
|
|
1684
1674
|
const we = Math.min(
|
|
1685
|
-
Gr * Math.pow(2,
|
|
1675
|
+
Gr * Math.pow(2, E.current),
|
|
1686
1676
|
Yr
|
|
1687
1677
|
);
|
|
1688
|
-
|
|
1678
|
+
E.current += 1, j.current = setTimeout(async () => {
|
|
1689
1679
|
j.current = null, ee.current = !0;
|
|
1690
1680
|
try {
|
|
1691
|
-
await
|
|
1681
|
+
await K(se), E.current = 0, ee.current = !1, await H(se);
|
|
1692
1682
|
} catch {
|
|
1693
|
-
ee.current = !1,
|
|
1683
|
+
ee.current = !1, A();
|
|
1694
1684
|
}
|
|
1695
1685
|
}, we);
|
|
1696
1686
|
},
|
|
1697
|
-
[
|
|
1687
|
+
[K, H]
|
|
1698
1688
|
);
|
|
1699
|
-
|
|
1700
|
-
|
|
1689
|
+
V(() => {
|
|
1690
|
+
X.current = Re;
|
|
1701
1691
|
});
|
|
1702
|
-
const
|
|
1703
|
-
async (
|
|
1704
|
-
if (!
|
|
1692
|
+
const Ee = v(
|
|
1693
|
+
async (A) => {
|
|
1694
|
+
if (!b || !A)
|
|
1705
1695
|
throw new Error(
|
|
1706
1696
|
"Cannot connect: AppSync settings not ready or missing chatId"
|
|
1707
1697
|
);
|
|
1708
|
-
|
|
1698
|
+
Z(), oe.current = !0, P.current = A, E.current = 0, fe(A), await K(A);
|
|
1709
1699
|
},
|
|
1710
|
-
[
|
|
1711
|
-
),
|
|
1712
|
-
|
|
1713
|
-
}, [
|
|
1714
|
-
const
|
|
1715
|
-
if (!
|
|
1716
|
-
const
|
|
1717
|
-
|
|
1718
|
-
() =>
|
|
1700
|
+
[b, Z, K, fe]
|
|
1701
|
+
), ze = v(() => {
|
|
1702
|
+
oe.current = !1, P.current = null, E.current = 0, Z(), k(), S(), M();
|
|
1703
|
+
}, [Z, k, S, M]), Ve = v(() => {
|
|
1704
|
+
const A = P.current;
|
|
1705
|
+
if (!A) return;
|
|
1706
|
+
const se = _.current + 1;
|
|
1707
|
+
S(), _.current = se, m.current = setInterval(
|
|
1708
|
+
() => H(A),
|
|
1719
1709
|
Qr
|
|
1720
|
-
),
|
|
1721
|
-
|
|
1710
|
+
), y.current = setTimeout(
|
|
1711
|
+
S,
|
|
1722
1712
|
en
|
|
1723
1713
|
);
|
|
1724
|
-
}, [
|
|
1725
|
-
|
|
1714
|
+
}, [H, S]), We = v(() => {
|
|
1715
|
+
q.current.clear();
|
|
1726
1716
|
}, []);
|
|
1727
|
-
return
|
|
1728
|
-
!t || !
|
|
1729
|
-
console.error("Failed to eagerly connect:",
|
|
1730
|
-
}).then(() =>
|
|
1731
|
-
}, [t,
|
|
1732
|
-
|
|
1733
|
-
}, [
|
|
1717
|
+
return V(() => {
|
|
1718
|
+
!t || !b || P.current === t || Ee(t).catch((A) => {
|
|
1719
|
+
console.error("Failed to eagerly connect:", A), P.current === t && (oe.current = !0, X.current());
|
|
1720
|
+
}).then(() => H(t));
|
|
1721
|
+
}, [t, b, Ee, H]), V(() => () => {
|
|
1722
|
+
ze();
|
|
1723
|
+
}, [ze]), { connect: Ee, disconnect: ze, clearProcessedIds: We, expectReply: Ve };
|
|
1734
1724
|
}
|
|
1735
1725
|
function on(e) {
|
|
1736
1726
|
return {
|
|
@@ -1740,30 +1730,7 @@ function on(e) {
|
|
|
1740
1730
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
1741
1731
|
};
|
|
1742
1732
|
}
|
|
1743
|
-
function rn(e
|
|
1744
|
-
return {
|
|
1745
|
-
id: e.message_id,
|
|
1746
|
-
content: e.response.content,
|
|
1747
|
-
sender: "user",
|
|
1748
|
-
timestamp: t
|
|
1749
|
-
};
|
|
1750
|
-
}
|
|
1751
|
-
function vt(e, t, o) {
|
|
1752
|
-
const r = (a) => [
|
|
1753
|
-
...e.slice(0, a),
|
|
1754
|
-
t,
|
|
1755
|
-
...e.slice(a)
|
|
1756
|
-
];
|
|
1757
|
-
if (o === null) {
|
|
1758
|
-
const a = e.findIndex(
|
|
1759
|
-
(u) => !u.isWelcomeMessage
|
|
1760
|
-
);
|
|
1761
|
-
return r(a === -1 ? e.length : a);
|
|
1762
|
-
}
|
|
1763
|
-
const n = o ? e.findIndex((a) => a.id === o) : -1;
|
|
1764
|
-
return n === -1 ? [...e, t] : r(n + 1);
|
|
1765
|
-
}
|
|
1766
|
-
function nn(e) {
|
|
1733
|
+
function rn(e) {
|
|
1767
1734
|
return {
|
|
1768
1735
|
id: crypto.randomUUID(),
|
|
1769
1736
|
content: e,
|
|
@@ -1772,7 +1739,7 @@ function nn(e) {
|
|
|
1772
1739
|
isWelcomeMessage: !0
|
|
1773
1740
|
};
|
|
1774
1741
|
}
|
|
1775
|
-
function
|
|
1742
|
+
function nn() {
|
|
1776
1743
|
return {
|
|
1777
1744
|
id: crypto.randomUUID(),
|
|
1778
1745
|
content: "",
|
|
@@ -1781,15 +1748,16 @@ function an() {
|
|
|
1781
1748
|
isRatingRequest: !0
|
|
1782
1749
|
};
|
|
1783
1750
|
}
|
|
1784
|
-
function
|
|
1751
|
+
function an() {
|
|
1785
1752
|
return {
|
|
1786
1753
|
id: crypto.randomUUID(),
|
|
1787
1754
|
content: "This conversation is closed, please start a new chat.",
|
|
1788
1755
|
sender: "assistant",
|
|
1789
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
1756
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1757
|
+
isNotice: !0
|
|
1790
1758
|
};
|
|
1791
1759
|
}
|
|
1792
|
-
function
|
|
1760
|
+
function sn(e, t) {
|
|
1793
1761
|
return {
|
|
1794
1762
|
...e,
|
|
1795
1763
|
id: crypto.randomUUID(),
|
|
@@ -1806,12 +1774,12 @@ function ln(e, t) {
|
|
|
1806
1774
|
} : {}
|
|
1807
1775
|
};
|
|
1808
1776
|
}
|
|
1809
|
-
function
|
|
1777
|
+
function vt(e, t, o) {
|
|
1810
1778
|
return e.map(
|
|
1811
1779
|
(r) => r.id === t ? o(r) : r
|
|
1812
1780
|
);
|
|
1813
1781
|
}
|
|
1814
|
-
function
|
|
1782
|
+
function ln(e, t, o) {
|
|
1815
1783
|
return {
|
|
1816
1784
|
...e,
|
|
1817
1785
|
attachments: e.attachments?.map(
|
|
@@ -1819,53 +1787,102 @@ function cn(e, t, o) {
|
|
|
1819
1787
|
)
|
|
1820
1788
|
};
|
|
1821
1789
|
}
|
|
1822
|
-
function
|
|
1790
|
+
function cn(e, t) {
|
|
1823
1791
|
return e.flatMap((o) => o.id !== t ? [o] : o.content ? [{ ...o, attachments: void 0 }] : []);
|
|
1824
1792
|
}
|
|
1825
|
-
function
|
|
1793
|
+
function un(e) {
|
|
1794
|
+
return !!e.isWelcomeMessage || !!e.isThinking || !!e.isRatingRequest || !!e.isNotice;
|
|
1795
|
+
}
|
|
1796
|
+
function dn(e) {
|
|
1797
|
+
return {
|
|
1798
|
+
id: e.message_id,
|
|
1799
|
+
content: e.response.content,
|
|
1800
|
+
sender: e.role,
|
|
1801
|
+
timestamp: e.created_at
|
|
1802
|
+
};
|
|
1803
|
+
}
|
|
1804
|
+
function wt(e, t) {
|
|
1805
|
+
const o = new Set(t.map((s) => s.message_id)), r = [...e], n = [], a = [];
|
|
1806
|
+
let l = -1;
|
|
1807
|
+
for (const s of t) {
|
|
1808
|
+
const c = r.findIndex(({ id: d }) => d === s.message_id);
|
|
1809
|
+
if (c !== -1) {
|
|
1810
|
+
l = c;
|
|
1811
|
+
continue;
|
|
1812
|
+
}
|
|
1813
|
+
const i = pn(r, l, s.role, o);
|
|
1814
|
+
if (i !== -1) {
|
|
1815
|
+
const d = r[i];
|
|
1816
|
+
r[i] = {
|
|
1817
|
+
...d,
|
|
1818
|
+
id: s.message_id,
|
|
1819
|
+
localId: d.localId ?? d.id,
|
|
1820
|
+
...d.sender === "user" && { isNew: !1 }
|
|
1821
|
+
}, a.push([d.id, s.message_id]), l = i;
|
|
1822
|
+
continue;
|
|
1823
|
+
}
|
|
1824
|
+
const u = l === -1 ? hn(r) : l + 1, p = dn(s);
|
|
1825
|
+
r.splice(u, 0, p), s.role === "assistant" && n.push(p), l = u;
|
|
1826
|
+
}
|
|
1827
|
+
return { messages: r, addedReplies: n, confirmedIds: a };
|
|
1828
|
+
}
|
|
1829
|
+
function pn(e, t, o, r) {
|
|
1830
|
+
for (let n = t + 1; n < e.length; n++) {
|
|
1831
|
+
const a = e[n];
|
|
1832
|
+
if (!un(a)) {
|
|
1833
|
+
if (r.has(a.id)) return -1;
|
|
1834
|
+
if (a.sender === o && !a.isFailed) return n;
|
|
1835
|
+
}
|
|
1836
|
+
}
|
|
1837
|
+
return -1;
|
|
1838
|
+
}
|
|
1839
|
+
function hn(e) {
|
|
1840
|
+
const t = e.findIndex((o) => !o.isWelcomeMessage);
|
|
1841
|
+
return t === -1 ? e.length : t;
|
|
1842
|
+
}
|
|
1843
|
+
function fn({
|
|
1826
1844
|
appId: e,
|
|
1827
1845
|
userId: t,
|
|
1828
1846
|
userName: o,
|
|
1829
1847
|
userData: r,
|
|
1830
1848
|
externalId: n,
|
|
1831
1849
|
deviceId: a,
|
|
1832
|
-
apiClient:
|
|
1850
|
+
apiClient: l,
|
|
1833
1851
|
chatSettings: s,
|
|
1834
|
-
messages:
|
|
1852
|
+
messages: c,
|
|
1835
1853
|
setMessages: i,
|
|
1836
|
-
currentChat:
|
|
1837
|
-
setCurrentChat:
|
|
1838
|
-
onChatClosed:
|
|
1854
|
+
currentChat: u,
|
|
1855
|
+
setCurrentChat: p,
|
|
1856
|
+
onChatClosed: d,
|
|
1839
1857
|
isChatClosed: h,
|
|
1840
1858
|
onAgentMessage: f
|
|
1841
1859
|
}) {
|
|
1842
|
-
const { saveChatData: g, clearChatData:
|
|
1860
|
+
const { saveChatData: g, clearChatData: R, updateLastActivity: q, markChatClosed: z } = it({
|
|
1843
1861
|
appId: e
|
|
1844
|
-
}), { publishApiError:
|
|
1845
|
-
(
|
|
1846
|
-
if (!
|
|
1847
|
-
const U = !!s?.welcome_message &&
|
|
1848
|
-
(
|
|
1849
|
-
),
|
|
1850
|
-
(
|
|
1862
|
+
}), { publishApiError: P, publishNetworkError: E } = Ke(), { showCognition: j, hideCognition: O } = Dt(), m = F(l), y = F(c), _ = $(0), oe = v(
|
|
1863
|
+
(b, x) => {
|
|
1864
|
+
if (!b.response.content) return;
|
|
1865
|
+
const U = !!s?.welcome_message && b.response.content === s.welcome_message, M = y.current.some(
|
|
1866
|
+
(w) => w.isRatingRequest
|
|
1867
|
+
), k = y.current.some(
|
|
1868
|
+
(w) => w.id === b.message_id
|
|
1851
1869
|
);
|
|
1852
|
-
!U && !
|
|
1853
|
-
const
|
|
1854
|
-
i((
|
|
1855
|
-
if (
|
|
1856
|
-
return
|
|
1857
|
-
const
|
|
1858
|
-
|
|
1859
|
-
on(
|
|
1860
|
-
|
|
1861
|
-
);
|
|
1870
|
+
!U && !M && !k && f?.();
|
|
1871
|
+
const S = _.current;
|
|
1872
|
+
i((w) => {
|
|
1873
|
+
if (_.current !== S || w.some((K) => K.isRatingRequest) || w.some((K) => K.id === b.message_id) || s?.welcome_message && b.response.content === s.welcome_message)
|
|
1874
|
+
return w;
|
|
1875
|
+
const X = [
|
|
1876
|
+
...w.filter((K) => !K.isThinking),
|
|
1877
|
+
on(b)
|
|
1878
|
+
];
|
|
1862
1879
|
return g(
|
|
1863
1880
|
x,
|
|
1864
1881
|
t,
|
|
1865
|
-
|
|
1882
|
+
X,
|
|
1866
1883
|
a,
|
|
1867
|
-
|
|
1868
|
-
),
|
|
1884
|
+
m.current?.getChatToken()
|
|
1885
|
+
), X;
|
|
1869
1886
|
});
|
|
1870
1887
|
},
|
|
1871
1888
|
[
|
|
@@ -1874,78 +1891,90 @@ function dn({
|
|
|
1874
1891
|
g,
|
|
1875
1892
|
i,
|
|
1876
1893
|
t,
|
|
1877
|
-
|
|
1878
|
-
|
|
1894
|
+
m,
|
|
1895
|
+
y,
|
|
1879
1896
|
f
|
|
1880
1897
|
]
|
|
1881
1898
|
), ee = v(
|
|
1882
|
-
(
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1899
|
+
(b, x) => {
|
|
1900
|
+
const U = y.current.some(
|
|
1901
|
+
(w) => w.isRatingRequest
|
|
1902
|
+
), M = b.filter(
|
|
1903
|
+
(w) => !(w.role === "assistant" && (U || s?.welcome_message && w.response.content === s.welcome_message))
|
|
1904
|
+
);
|
|
1905
|
+
wt(y.current, M).addedReplies.length > 0 && f?.();
|
|
1906
|
+
const S = _.current;
|
|
1907
|
+
i((w) => {
|
|
1908
|
+
if (_.current !== S) return w;
|
|
1909
|
+
const { messages: Z, addedReplies: X, confirmedIds: K } = wt(
|
|
1910
|
+
w,
|
|
1911
|
+
M
|
|
1894
1912
|
);
|
|
1913
|
+
if (X.length === 0 && K.length === 0) return w;
|
|
1914
|
+
const H = X.length > 0 ? Z.filter((fe) => !fe.isThinking) : Z;
|
|
1895
1915
|
return g(
|
|
1896
1916
|
x,
|
|
1897
1917
|
t,
|
|
1898
|
-
|
|
1918
|
+
H,
|
|
1899
1919
|
a,
|
|
1900
|
-
|
|
1901
|
-
),
|
|
1920
|
+
m.current?.getChatToken()
|
|
1921
|
+
), H;
|
|
1902
1922
|
});
|
|
1903
1923
|
},
|
|
1904
|
-
[
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1924
|
+
[
|
|
1925
|
+
s,
|
|
1926
|
+
a,
|
|
1927
|
+
g,
|
|
1928
|
+
i,
|
|
1929
|
+
t,
|
|
1930
|
+
m,
|
|
1931
|
+
y,
|
|
1932
|
+
f
|
|
1933
|
+
]
|
|
1934
|
+
), de = v(() => {
|
|
1935
|
+
O(), i((b) => b.filter((x) => !x.isThinking));
|
|
1936
|
+
}, [i, O]), ae = v(() => {
|
|
1937
|
+
i((b) => [...b.filter((U) => !U.isRatingRequest), nn()]);
|
|
1909
1938
|
}, [i]);
|
|
1910
|
-
|
|
1911
|
-
}, [
|
|
1939
|
+
V(() => {
|
|
1940
|
+
}, [ae]);
|
|
1912
1941
|
const D = v(
|
|
1913
|
-
(
|
|
1914
|
-
[
|
|
1915
|
-
), J = v(() =>
|
|
1916
|
-
z(),
|
|
1917
|
-
}, [z,
|
|
1942
|
+
(b) => m.current ? m.current.getChatHistory(b) : Promise.resolve([]),
|
|
1943
|
+
[m]
|
|
1944
|
+
), J = v(() => m.current?.getChatToken() ?? null, [m]), N = v(() => {
|
|
1945
|
+
z(), d?.();
|
|
1946
|
+
}, [z, d]), { connect: W, disconnect: re, clearProcessedIds: le, expectReply: G } = tn({
|
|
1918
1947
|
chatSettings: s,
|
|
1919
|
-
chatId:
|
|
1920
|
-
messages:
|
|
1921
|
-
onMessage:
|
|
1922
|
-
|
|
1948
|
+
chatId: u?.id ?? null,
|
|
1949
|
+
messages: c,
|
|
1950
|
+
onMessage: oe,
|
|
1951
|
+
onHistory: ee,
|
|
1923
1952
|
onCognition: j,
|
|
1924
|
-
onCognitionComplete:
|
|
1925
|
-
onError:
|
|
1926
|
-
onChatClosed:
|
|
1927
|
-
onRatingRequest:
|
|
1928
|
-
onBreadcrumb:
|
|
1953
|
+
onCognitionComplete: O,
|
|
1954
|
+
onError: de,
|
|
1955
|
+
onChatClosed: N,
|
|
1956
|
+
onRatingRequest: ae,
|
|
1957
|
+
onBreadcrumb: N,
|
|
1929
1958
|
fetchHistory: D,
|
|
1930
1959
|
getChatToken: J
|
|
1931
|
-
}),
|
|
1932
|
-
|
|
1933
|
-
(
|
|
1934
|
-
),
|
|
1960
|
+
}), ie = v(() => {
|
|
1961
|
+
_.current += 1, O(), re(), le(), $t(c), i(
|
|
1962
|
+
(b) => b.filter((x) => Array.isArray(x) ? !1 : x.isWelcomeMessage)
|
|
1963
|
+
), R(), p(null);
|
|
1935
1964
|
}, [
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1965
|
+
O,
|
|
1966
|
+
re,
|
|
1967
|
+
le,
|
|
1968
|
+
c,
|
|
1969
|
+
R,
|
|
1941
1970
|
i,
|
|
1942
|
-
|
|
1971
|
+
p
|
|
1943
1972
|
]), Y = v(
|
|
1944
|
-
(
|
|
1973
|
+
(b, x) => i((U) => vt(U, b, x)),
|
|
1945
1974
|
[i]
|
|
1946
|
-
),
|
|
1947
|
-
async (
|
|
1948
|
-
const x = await
|
|
1975
|
+
), ce = v(
|
|
1976
|
+
async (b) => {
|
|
1977
|
+
const x = await b.createConversation({
|
|
1949
1978
|
userId: n || t,
|
|
1950
1979
|
deviceId: a,
|
|
1951
1980
|
userName: o,
|
|
@@ -1954,121 +1983,122 @@ function dn({
|
|
|
1954
1983
|
searchParams: po()
|
|
1955
1984
|
}
|
|
1956
1985
|
});
|
|
1957
|
-
|
|
1986
|
+
p({ id: x.chat_id });
|
|
1958
1987
|
try {
|
|
1959
|
-
await
|
|
1960
|
-
} catch (
|
|
1988
|
+
await W(x.chat_id);
|
|
1989
|
+
} catch (U) {
|
|
1961
1990
|
console.warn(
|
|
1962
1991
|
"Failed to connect realtime channel, continuing with REST-only delivery:",
|
|
1963
|
-
|
|
1992
|
+
U
|
|
1964
1993
|
);
|
|
1965
1994
|
}
|
|
1966
1995
|
return x.chat_id;
|
|
1967
1996
|
},
|
|
1968
|
-
[n, t, a, o, r,
|
|
1969
|
-
),
|
|
1970
|
-
(
|
|
1971
|
-
|
|
1972
|
-
({ file:
|
|
1997
|
+
[n, t, a, o, r, p, W]
|
|
1998
|
+
), ve = v(
|
|
1999
|
+
(b, x, U, M) => Promise.all(
|
|
2000
|
+
U.map(
|
|
2001
|
+
({ file: k }, S) => b.uploadAttachment({
|
|
1973
2002
|
conversationId: x,
|
|
1974
|
-
file:
|
|
1975
|
-
onProgress: (
|
|
1976
|
-
|
|
1977
|
-
(
|
|
2003
|
+
file: k,
|
|
2004
|
+
onProgress: (w) => Y(
|
|
2005
|
+
M,
|
|
2006
|
+
(Z) => ln(Z, S, w)
|
|
1978
2007
|
)
|
|
1979
|
-
}).catch((
|
|
1980
|
-
throw Bt(
|
|
2008
|
+
}).catch((w) => {
|
|
2009
|
+
throw Bt(w, k.name);
|
|
1981
2010
|
})
|
|
1982
2011
|
)
|
|
1983
2012
|
),
|
|
1984
2013
|
[Y]
|
|
1985
2014
|
), pe = v(
|
|
1986
|
-
(
|
|
1987
|
-
|
|
1988
|
-
const
|
|
1989
|
-
if (
|
|
1990
|
-
|
|
2015
|
+
(b, x, U, M) => {
|
|
2016
|
+
O(), M && i((S) => cn(S, U)), i((S) => S.filter((w) => !w.isThinking));
|
|
2017
|
+
const k = () => Y(U, (S) => ({ ...S, isFailed: !0 }));
|
|
2018
|
+
if (b instanceof Lt) {
|
|
2019
|
+
k();
|
|
1991
2020
|
return;
|
|
1992
2021
|
}
|
|
1993
|
-
if (
|
|
1994
|
-
|
|
2022
|
+
if (b instanceof at || b instanceof Le && b.status === 403) {
|
|
2023
|
+
E();
|
|
1995
2024
|
return;
|
|
1996
2025
|
}
|
|
1997
|
-
|
|
2026
|
+
P(b), b instanceof Le && // A 401 means an expired or closed chat token: drop the session so
|
|
1998
2027
|
// the next send starts a fresh one, as for a client-side expiry.
|
|
1999
|
-
(
|
|
2028
|
+
(b.status >= 500 || b.status === 401) ? (p(null), R(), i((S) => S.filter((w) => w.id !== U)), x.reset()) : k();
|
|
2000
2029
|
},
|
|
2001
2030
|
[
|
|
2002
|
-
|
|
2031
|
+
O,
|
|
2003
2032
|
i,
|
|
2004
2033
|
Y,
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2034
|
+
E,
|
|
2035
|
+
P,
|
|
2036
|
+
p,
|
|
2037
|
+
R
|
|
2009
2038
|
]
|
|
2010
|
-
),
|
|
2011
|
-
async (
|
|
2012
|
-
if (!
|
|
2039
|
+
), ne = v(
|
|
2040
|
+
async (b, x = []) => {
|
|
2041
|
+
if (!l || c.some((k) => k.isRatingRequest)) return;
|
|
2013
2042
|
if (h) {
|
|
2014
|
-
i((
|
|
2043
|
+
i((k) => [...k, an()]);
|
|
2015
2044
|
return;
|
|
2016
2045
|
}
|
|
2017
|
-
const
|
|
2018
|
-
i((
|
|
2046
|
+
const U = _.current, M = sn(b, x);
|
|
2047
|
+
i((k) => [...k, M]), q();
|
|
2019
2048
|
try {
|
|
2020
|
-
const
|
|
2021
|
-
|
|
2022
|
-
|
|
2049
|
+
const k = u?.id || await ce(l), S = await ve(
|
|
2050
|
+
l,
|
|
2051
|
+
k,
|
|
2023
2052
|
x,
|
|
2024
|
-
|
|
2053
|
+
M.id
|
|
2025
2054
|
);
|
|
2026
|
-
|
|
2027
|
-
...
|
|
2028
|
-
attachments: Nt(
|
|
2055
|
+
S.length > 0 && Y(M.id, (Z) => ({
|
|
2056
|
+
...Z,
|
|
2057
|
+
attachments: Nt(S, x)
|
|
2029
2058
|
}));
|
|
2030
|
-
const
|
|
2031
|
-
text:
|
|
2032
|
-
attachments:
|
|
2033
|
-
conversationId:
|
|
2059
|
+
const w = await l.replyToConversation({
|
|
2060
|
+
text: b.content,
|
|
2061
|
+
attachments: S,
|
|
2062
|
+
conversationId: k,
|
|
2034
2063
|
userId: n || t,
|
|
2035
2064
|
deviceId: a,
|
|
2036
2065
|
userName: o,
|
|
2037
2066
|
userData: r
|
|
2038
2067
|
});
|
|
2039
|
-
i((
|
|
2040
|
-
if (
|
|
2041
|
-
const
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2068
|
+
i((Z) => {
|
|
2069
|
+
if (_.current !== U) return Z;
|
|
2070
|
+
const X = Z.some((H) => H.id === M.id) ? M.id : w.message_id, K = vt(Z, X, (H) => ({
|
|
2071
|
+
...H,
|
|
2072
|
+
id: w.message_id,
|
|
2073
|
+
localId: H.localId ?? H.id,
|
|
2074
|
+
isNew: !1
|
|
2075
|
+
}));
|
|
2046
2076
|
return g(
|
|
2047
|
-
|
|
2077
|
+
k,
|
|
2048
2078
|
t,
|
|
2049
|
-
|
|
2079
|
+
K,
|
|
2050
2080
|
a,
|
|
2051
|
-
|
|
2052
|
-
),
|
|
2081
|
+
l.getChatToken()
|
|
2082
|
+
), K;
|
|
2053
2083
|
}), G();
|
|
2054
|
-
} catch (
|
|
2084
|
+
} catch (k) {
|
|
2055
2085
|
throw pe(
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2086
|
+
k,
|
|
2087
|
+
l,
|
|
2088
|
+
M.id,
|
|
2059
2089
|
x.length > 0
|
|
2060
|
-
),
|
|
2090
|
+
), k;
|
|
2061
2091
|
}
|
|
2062
2092
|
},
|
|
2063
2093
|
[
|
|
2064
|
-
u,
|
|
2065
2094
|
l,
|
|
2095
|
+
c,
|
|
2066
2096
|
h,
|
|
2067
2097
|
i,
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2098
|
+
q,
|
|
2099
|
+
u?.id,
|
|
2100
|
+
ce,
|
|
2101
|
+
ve,
|
|
2072
2102
|
Y,
|
|
2073
2103
|
g,
|
|
2074
2104
|
G,
|
|
@@ -2080,30 +2110,30 @@ function dn({
|
|
|
2080
2110
|
r
|
|
2081
2111
|
]
|
|
2082
2112
|
), he = v(
|
|
2083
|
-
async (
|
|
2084
|
-
const x =
|
|
2085
|
-
!
|
|
2113
|
+
async (b) => {
|
|
2114
|
+
const x = u?.id;
|
|
2115
|
+
!m.current || !x || await m.current.addRating(x, b);
|
|
2086
2116
|
},
|
|
2087
|
-
[
|
|
2117
|
+
[u?.id, m]
|
|
2088
2118
|
);
|
|
2089
2119
|
return {
|
|
2090
|
-
onCleanMessages:
|
|
2091
|
-
onSendMessage:
|
|
2120
|
+
onCleanMessages: ie,
|
|
2121
|
+
onSendMessage: ne,
|
|
2092
2122
|
onRateChat: he
|
|
2093
2123
|
};
|
|
2094
2124
|
}
|
|
2095
|
-
const
|
|
2096
|
-
function
|
|
2097
|
-
return typeof window > "u" || typeof import.meta > "u" ? "" :
|
|
2125
|
+
const gn = { BASE_URL: "/", DEV: !1, MODE: "dev", PROD: !0, SSR: !1, VITE_API_URL: "https://chat.eloquentai.dev", VITE_CDN_URL: "https://cdn.eloquentai.dev", VITE_ENVIRONMENT: "dev", VITE_REGION_API_URL: "https://region.eloquentai.dev" };
|
|
2126
|
+
function Et(e) {
|
|
2127
|
+
return typeof window > "u" || typeof import.meta > "u" ? "" : gn[e] || "";
|
|
2098
2128
|
}
|
|
2099
|
-
const
|
|
2100
|
-
function
|
|
2101
|
-
return
|
|
2129
|
+
const mn = Et("VITE_API_URL"), bn = Et("VITE_REGION_API_URL");
|
|
2130
|
+
function vn() {
|
|
2131
|
+
return mn || "";
|
|
2102
2132
|
}
|
|
2103
|
-
function
|
|
2104
|
-
return
|
|
2133
|
+
function wn() {
|
|
2134
|
+
return bn || "";
|
|
2105
2135
|
}
|
|
2106
|
-
class
|
|
2136
|
+
class qn {
|
|
2107
2137
|
httpClient;
|
|
2108
2138
|
userId = null;
|
|
2109
2139
|
conversationId = null;
|
|
@@ -2135,7 +2165,7 @@ class bn {
|
|
|
2135
2165
|
* Get organization data by app ID
|
|
2136
2166
|
*/
|
|
2137
2167
|
async getOrganizationByAppId(t) {
|
|
2138
|
-
const o =
|
|
2168
|
+
const o = wn();
|
|
2139
2169
|
return await this.httpClient.getExternal(
|
|
2140
2170
|
`${o}/by-app-id/${t}`
|
|
2141
2171
|
);
|
|
@@ -2182,7 +2212,7 @@ class bn {
|
|
|
2182
2212
|
o,
|
|
2183
2213
|
t.onProgress
|
|
2184
2214
|
);
|
|
2185
|
-
return
|
|
2215
|
+
return Fr.parse(r).data;
|
|
2186
2216
|
}
|
|
2187
2217
|
async getAttachmentUrls(t, o) {
|
|
2188
2218
|
const r = await this.httpClient.post(
|
|
@@ -2207,60 +2237,60 @@ class bn {
|
|
|
2207
2237
|
)).data;
|
|
2208
2238
|
}
|
|
2209
2239
|
}
|
|
2210
|
-
const
|
|
2240
|
+
const yn = {
|
|
2211
2241
|
retries: 3,
|
|
2212
2242
|
minDelayMs: 200,
|
|
2213
2243
|
maxDelayMs: 1e3,
|
|
2214
2244
|
factor: 2
|
|
2215
2245
|
};
|
|
2216
|
-
function
|
|
2217
|
-
return e instanceof at ? !0 : e instanceof
|
|
2246
|
+
function xn(e) {
|
|
2247
|
+
return e instanceof at ? !0 : e instanceof Le ? e.status === 429 || e.status >= 500 : !1;
|
|
2218
2248
|
}
|
|
2219
|
-
function
|
|
2249
|
+
function kn(e, t) {
|
|
2220
2250
|
const o = t.minDelayMs * t.factor ** e, r = Math.min(o, t.maxDelayMs);
|
|
2221
2251
|
return Math.random() * r;
|
|
2222
2252
|
}
|
|
2223
2253
|
async function qt(e, t = {}) {
|
|
2224
|
-
const o = { ...
|
|
2254
|
+
const o = { ...yn, ...t };
|
|
2225
2255
|
for (let r = 0; ; r++)
|
|
2226
2256
|
try {
|
|
2227
2257
|
return await e();
|
|
2228
2258
|
} catch (n) {
|
|
2229
|
-
if (r >= o.retries || !
|
|
2259
|
+
if (r >= o.retries || !xn(n))
|
|
2230
2260
|
throw n;
|
|
2231
2261
|
await new Promise(
|
|
2232
|
-
(a) => setTimeout(a,
|
|
2262
|
+
(a) => setTimeout(a, kn(r, o))
|
|
2233
2263
|
);
|
|
2234
2264
|
}
|
|
2235
2265
|
}
|
|
2236
|
-
const
|
|
2237
|
-
function
|
|
2266
|
+
const De = /* @__PURE__ */ new Map(), $e = /* @__PURE__ */ new Map();
|
|
2267
|
+
function _n(e, t, o) {
|
|
2238
2268
|
const r = o?.dedupe !== !1, [n, a] = C(
|
|
2239
|
-
() =>
|
|
2240
|
-
), { publishApiError:
|
|
2241
|
-
$(() => (
|
|
2242
|
-
|
|
2269
|
+
() => De.get(e)
|
|
2270
|
+
), { publishApiError: l, publishNetworkError: s } = Ke(), [c, i] = C(void 0), [u, p] = C(!1), d = $(!0);
|
|
2271
|
+
$(() => (d.current = !0, () => {
|
|
2272
|
+
d.current = !1;
|
|
2243
2273
|
}));
|
|
2244
2274
|
const h = v(async () => {
|
|
2245
|
-
if (
|
|
2246
|
-
const f =
|
|
2275
|
+
if (De.has(e)) {
|
|
2276
|
+
const f = De.get(e);
|
|
2247
2277
|
return a(f), f;
|
|
2248
2278
|
}
|
|
2249
|
-
|
|
2279
|
+
p(!0), i(void 0);
|
|
2250
2280
|
try {
|
|
2251
|
-
if (r &&
|
|
2252
|
-
return await
|
|
2281
|
+
if (r && $e.has(e))
|
|
2282
|
+
return await $e.get(e);
|
|
2253
2283
|
const f = t();
|
|
2254
|
-
r &&
|
|
2284
|
+
r && $e.set(e, f);
|
|
2255
2285
|
const g = await f;
|
|
2256
|
-
return
|
|
2286
|
+
return De.set(e, g), d.current && a(g), g;
|
|
2257
2287
|
} catch (f) {
|
|
2258
|
-
throw f instanceof at || f instanceof
|
|
2288
|
+
throw f instanceof at || f instanceof Le && f.status === 403 ? s() : l(f), d.current && i(f), f;
|
|
2259
2289
|
} finally {
|
|
2260
|
-
|
|
2290
|
+
$e.delete(e), d.current && p(!1);
|
|
2261
2291
|
}
|
|
2262
|
-
}, [e, r, t,
|
|
2263
|
-
return { data: n, error:
|
|
2292
|
+
}, [e, r, t, l, s]);
|
|
2293
|
+
return { data: n, error: c, isLoading: u, fetch: h };
|
|
2264
2294
|
}
|
|
2265
2295
|
function yt(e, t) {
|
|
2266
2296
|
const o = e?.deviceId || crypto.randomUUID();
|
|
@@ -2270,11 +2300,11 @@ function yt(e, t) {
|
|
|
2270
2300
|
deviceId: o
|
|
2271
2301
|
} : t ? { userId: t, externalId: t, deviceId: o } : { userId: crypto.randomUUID(), externalId: null, deviceId: o };
|
|
2272
2302
|
}
|
|
2273
|
-
function
|
|
2303
|
+
function Cn(e) {
|
|
2274
2304
|
const { appId: t, initialUserId: o } = e, { getSavedChatData: r } = it({ appId: t }), [n, a] = C(
|
|
2275
2305
|
() => yt(r(), o)
|
|
2276
|
-
), [
|
|
2277
|
-
return
|
|
2306
|
+
), [l, s] = C(o);
|
|
2307
|
+
return l !== o && (s(o), a(yt(r(), o))), {
|
|
2278
2308
|
// Identity is available synchronously; kept in the contract because
|
|
2279
2309
|
// consumers (SDK boot) still key off it.
|
|
2280
2310
|
isReady: !0,
|
|
@@ -2283,7 +2313,7 @@ function xn(e) {
|
|
|
2283
2313
|
externalId: n.externalId
|
|
2284
2314
|
};
|
|
2285
2315
|
}
|
|
2286
|
-
function
|
|
2316
|
+
function Sn({
|
|
2287
2317
|
apiUrl: e,
|
|
2288
2318
|
appId: t,
|
|
2289
2319
|
initialUserId: o,
|
|
@@ -2292,120 +2322,120 @@ function kn({
|
|
|
2292
2322
|
}) {
|
|
2293
2323
|
const {
|
|
2294
2324
|
userId: a,
|
|
2295
|
-
externalId:
|
|
2325
|
+
externalId: l,
|
|
2296
2326
|
deviceId: s,
|
|
2297
|
-
isReady:
|
|
2298
|
-
} =
|
|
2327
|
+
isReady: c
|
|
2328
|
+
} = Cn({ appId: t, initialUserId: o }), { isChatExpired: i, clearChatData: u, getSavedChatData: p } = it({
|
|
2299
2329
|
appId: t
|
|
2300
|
-
}), { current:
|
|
2301
|
-
new
|
|
2302
|
-
baseURL:
|
|
2330
|
+
}), { current: d } = $(e || vn()), [h] = C(
|
|
2331
|
+
new qn({
|
|
2332
|
+
baseURL: d,
|
|
2303
2333
|
appId: t
|
|
2304
2334
|
})
|
|
2305
|
-
), [f, g] = C(null), [
|
|
2306
|
-
|
|
2335
|
+
), [f, g] = C(null), [R, q] = C(null), [z, P] = C([]), [E, j] = C(!1), [O, m] = C(!1), [y, _] = C(!0), ee = _n(`sdk-boot-${t}`, () => h.boot()).fetch;
|
|
2336
|
+
V(() => {
|
|
2307
2337
|
if (i())
|
|
2308
|
-
|
|
2338
|
+
u();
|
|
2309
2339
|
else {
|
|
2310
2340
|
const {
|
|
2311
|
-
conversationId:
|
|
2341
|
+
conversationId: ae,
|
|
2312
2342
|
userId: D,
|
|
2313
2343
|
messages: J,
|
|
2314
|
-
isChatClosed:
|
|
2315
|
-
chatToken:
|
|
2316
|
-
} =
|
|
2317
|
-
|
|
2318
|
-
id:
|
|
2319
|
-
}), h.setChatToken(
|
|
2344
|
+
isChatClosed: N,
|
|
2345
|
+
chatToken: W
|
|
2346
|
+
} = p();
|
|
2347
|
+
ae && D && (q({
|
|
2348
|
+
id: ae
|
|
2349
|
+
}), h.setChatToken(W ?? null), J && J.length > 0 && P(J), N && m(!0));
|
|
2320
2350
|
}
|
|
2321
|
-
}, [
|
|
2322
|
-
const
|
|
2323
|
-
return
|
|
2324
|
-
if (
|
|
2325
|
-
|
|
2351
|
+
}, [p, i, u, h]);
|
|
2352
|
+
const de = $(!1);
|
|
2353
|
+
return V(() => {
|
|
2354
|
+
if (de.current) return;
|
|
2355
|
+
de.current = !0, (async () => {
|
|
2326
2356
|
const [D, J] = await ct(
|
|
2327
2357
|
qt(() => h.getOrganizationByAppId(t))
|
|
2328
2358
|
);
|
|
2329
2359
|
if (J) {
|
|
2330
|
-
console.error("Failed to fetch organization data:", J),
|
|
2360
|
+
console.error("Failed to fetch organization data:", J), _(!1), j(!0);
|
|
2331
2361
|
return;
|
|
2332
2362
|
}
|
|
2333
2363
|
h.setRegion(D.region);
|
|
2334
|
-
const [
|
|
2335
|
-
if (
|
|
2336
|
-
|
|
2364
|
+
const [N, W] = await ct(qt(ee));
|
|
2365
|
+
if (W) {
|
|
2366
|
+
_(!1), j(!0);
|
|
2337
2367
|
return;
|
|
2338
2368
|
}
|
|
2339
2369
|
const {
|
|
2340
|
-
conversationId:
|
|
2341
|
-
userId:
|
|
2370
|
+
conversationId: re,
|
|
2371
|
+
userId: le,
|
|
2342
2372
|
messages: G
|
|
2343
|
-
} =
|
|
2344
|
-
|
|
2345
|
-
await
|
|
2373
|
+
} = p();
|
|
2374
|
+
re && le && G.some(Kt) && P(
|
|
2375
|
+
await Ht(h, re, G)
|
|
2346
2376
|
);
|
|
2347
|
-
const
|
|
2348
|
-
g(
|
|
2377
|
+
const ie = N.chat_settings.welcome_message;
|
|
2378
|
+
g(N.chat_settings), _(N.chat_settings.is_active ?? !0), ie && P((Y) => Y.length > 0 || Y.some((ce) => ce.isWelcomeMessage) ? Y : [rn(ie)]), j(!0);
|
|
2349
2379
|
})();
|
|
2350
|
-
}, [
|
|
2380
|
+
}, [c, h, t, ee, p]), {
|
|
2351
2381
|
userId: a,
|
|
2352
2382
|
userName: r,
|
|
2353
2383
|
userData: n,
|
|
2354
|
-
externalId:
|
|
2384
|
+
externalId: l,
|
|
2355
2385
|
deviceId: s,
|
|
2356
2386
|
apiClient: h,
|
|
2357
2387
|
chatSettings: f,
|
|
2358
|
-
currentChat:
|
|
2388
|
+
currentChat: R,
|
|
2359
2389
|
messages: z,
|
|
2360
|
-
isReady:
|
|
2361
|
-
isChatClosed:
|
|
2362
|
-
isChatActive:
|
|
2390
|
+
isReady: E,
|
|
2391
|
+
isChatClosed: O,
|
|
2392
|
+
isChatActive: y
|
|
2363
2393
|
};
|
|
2364
2394
|
}
|
|
2365
2395
|
const zt = "(max-width: 640px)";
|
|
2366
|
-
function
|
|
2396
|
+
function In() {
|
|
2367
2397
|
return typeof window > "u" ? !1 : window.matchMedia(zt).matches;
|
|
2368
2398
|
}
|
|
2369
|
-
function
|
|
2370
|
-
const [t, o] = C(
|
|
2399
|
+
function Rn(e) {
|
|
2400
|
+
const [t, o] = C(In), [r, n] = C(
|
|
2371
2401
|
null
|
|
2372
|
-
), a = e ?? t,
|
|
2373
|
-
return
|
|
2374
|
-
if (
|
|
2375
|
-
const s = window.matchMedia(zt),
|
|
2402
|
+
), a = e ?? t, l = typeof window > "u";
|
|
2403
|
+
return V(() => {
|
|
2404
|
+
if (l) return;
|
|
2405
|
+
const s = window.matchMedia(zt), c = (i) => {
|
|
2376
2406
|
o(i.matches);
|
|
2377
2407
|
};
|
|
2378
|
-
return
|
|
2379
|
-
}, [
|
|
2380
|
-
if (
|
|
2408
|
+
return c(s), s.addEventListener("change", c), () => s.removeEventListener("change", c);
|
|
2409
|
+
}, [l]), V(() => {
|
|
2410
|
+
if (l) return;
|
|
2381
2411
|
const s = document.createElement("div");
|
|
2382
2412
|
return s.className = "eloquent-ai-chat-portal", s.style.position = "relative", s.style.zIndex = "30", document.body.appendChild(s), n(s), () => {
|
|
2383
2413
|
s.parentElement && s.parentElement.removeChild(s);
|
|
2384
2414
|
};
|
|
2385
|
-
}, [
|
|
2415
|
+
}, [l]), {
|
|
2386
2416
|
isMobileScreen: t,
|
|
2387
2417
|
isMobile: a,
|
|
2388
2418
|
portalContainer: r
|
|
2389
2419
|
};
|
|
2390
2420
|
}
|
|
2391
|
-
const xt = 1245,
|
|
2421
|
+
const xt = 1245, En = [
|
|
2392
2422
|
[2.32, 0.4],
|
|
2393
2423
|
[4.25, 0.18]
|
|
2394
|
-
],
|
|
2424
|
+
], zn = [
|
|
2395
2425
|
{ start: 0, duration: 0.22, level: 0.45 },
|
|
2396
2426
|
{ start: 0.16, duration: 0.2, level: 0.25 }
|
|
2397
|
-
],
|
|
2427
|
+
], Tn = 0.3, Mn = 3e-3, kt = 1e-4;
|
|
2398
2428
|
function _t(e, t, o, r, n, a) {
|
|
2399
|
-
const
|
|
2400
|
-
|
|
2429
|
+
const l = e.createOscillator(), s = e.createGain();
|
|
2430
|
+
l.type = "sine", l.frequency.setValueAtTime(o, n), s.gain.setValueAtTime(kt, n), s.gain.exponentialRampToValueAtTime(r, n + Mn), s.gain.exponentialRampToValueAtTime(kt, n + a), l.connect(s).connect(t), l.start(n), l.stop(n + a + 0.05);
|
|
2401
2431
|
}
|
|
2402
|
-
function
|
|
2432
|
+
function An(e) {
|
|
2403
2433
|
const t = e.createGain();
|
|
2404
|
-
t.gain.value =
|
|
2434
|
+
t.gain.value = Tn;
|
|
2405
2435
|
const o = e.createBiquadFilter();
|
|
2406
2436
|
o.type = "lowpass", o.frequency.value = 6e3, t.connect(o).connect(e.destination);
|
|
2407
2437
|
const r = e.currentTime + 0.02;
|
|
2408
|
-
|
|
2438
|
+
zn.forEach((n) => {
|
|
2409
2439
|
_t(
|
|
2410
2440
|
e,
|
|
2411
2441
|
t,
|
|
@@ -2413,229 +2443,229 @@ function zn(e) {
|
|
|
2413
2443
|
n.level,
|
|
2414
2444
|
r + n.start,
|
|
2415
2445
|
n.duration
|
|
2416
|
-
),
|
|
2446
|
+
), En.forEach(([a, l]) => {
|
|
2417
2447
|
_t(
|
|
2418
2448
|
e,
|
|
2419
2449
|
t,
|
|
2420
2450
|
xt * a,
|
|
2421
|
-
n.level *
|
|
2451
|
+
n.level * l,
|
|
2422
2452
|
r + n.start,
|
|
2423
2453
|
n.duration * 0.35
|
|
2424
2454
|
);
|
|
2425
2455
|
});
|
|
2426
2456
|
});
|
|
2427
2457
|
}
|
|
2428
|
-
const nt = "eloquentai:notification-sound-muted",
|
|
2429
|
-
function
|
|
2458
|
+
const nt = "eloquentai:notification-sound-muted", Pn = 3e3;
|
|
2459
|
+
function On() {
|
|
2430
2460
|
try {
|
|
2431
2461
|
return window.localStorage.getItem(nt) === "true";
|
|
2432
2462
|
} catch {
|
|
2433
2463
|
return !1;
|
|
2434
2464
|
}
|
|
2435
2465
|
}
|
|
2436
|
-
function
|
|
2466
|
+
function Un(e) {
|
|
2437
2467
|
try {
|
|
2438
2468
|
e ? window.localStorage.setItem(nt, "true") : window.localStorage.removeItem(nt);
|
|
2439
2469
|
} catch {
|
|
2440
2470
|
}
|
|
2441
2471
|
}
|
|
2442
|
-
function
|
|
2472
|
+
function jn(e) {
|
|
2443
2473
|
return document.visibilityState === "visible" && document.hasFocus() && e;
|
|
2444
2474
|
}
|
|
2445
|
-
function
|
|
2475
|
+
function Dn() {
|
|
2446
2476
|
const e = window.webkitAudioContext;
|
|
2447
2477
|
return window.AudioContext ?? e ?? null;
|
|
2448
2478
|
}
|
|
2449
|
-
function
|
|
2479
|
+
function $n({
|
|
2450
2480
|
isEnabled: e,
|
|
2451
2481
|
isOpen: t
|
|
2452
2482
|
}) {
|
|
2453
|
-
const [o, r] = C(
|
|
2483
|
+
const [o, r] = C(On), n = $(null), a = $(0), l = F(t), s = F(o), c = v(() => {
|
|
2454
2484
|
if (!e) return;
|
|
2455
|
-
const
|
|
2456
|
-
if (!
|
|
2485
|
+
const p = Dn();
|
|
2486
|
+
if (!p) return;
|
|
2457
2487
|
try {
|
|
2458
|
-
n.current ??= new
|
|
2488
|
+
n.current ??= new p();
|
|
2459
2489
|
} catch {
|
|
2460
2490
|
return;
|
|
2461
2491
|
}
|
|
2462
|
-
const
|
|
2463
|
-
(
|
|
2492
|
+
const d = n.current.state;
|
|
2493
|
+
(d === "suspended" || d === "interrupted") && n.current.resume().catch(() => {
|
|
2464
2494
|
});
|
|
2465
2495
|
}, [e]);
|
|
2466
|
-
|
|
2496
|
+
V(() => {
|
|
2467
2497
|
if (!e) return;
|
|
2468
|
-
const
|
|
2469
|
-
return window.addEventListener("pointerdown",
|
|
2470
|
-
window.removeEventListener("pointerdown",
|
|
2498
|
+
const p = { capture: !0 }, d = () => c();
|
|
2499
|
+
return window.addEventListener("pointerdown", d, p), window.addEventListener("keydown", d, p), () => {
|
|
2500
|
+
window.removeEventListener("pointerdown", d, p), window.removeEventListener("keydown", d, p);
|
|
2471
2501
|
};
|
|
2472
|
-
}, [e,
|
|
2502
|
+
}, [e, c]);
|
|
2473
2503
|
const i = v(() => {
|
|
2474
|
-
if (!e || s.current ||
|
|
2475
|
-
const
|
|
2476
|
-
if (!
|
|
2477
|
-
const
|
|
2478
|
-
|
|
2479
|
-
}, [e, s,
|
|
2480
|
-
r((
|
|
2504
|
+
if (!e || s.current || jn(l.current)) return;
|
|
2505
|
+
const p = n.current;
|
|
2506
|
+
if (!p || p.state !== "running") return;
|
|
2507
|
+
const d = Date.now();
|
|
2508
|
+
d - a.current < Pn || (a.current = d, An(p));
|
|
2509
|
+
}, [e, s, l]), u = v(() => {
|
|
2510
|
+
r((p) => !p);
|
|
2481
2511
|
}, []);
|
|
2482
|
-
return
|
|
2483
|
-
|
|
2484
|
-
}, [o]), { notify: i, unlock:
|
|
2512
|
+
return V(() => {
|
|
2513
|
+
Un(o);
|
|
2514
|
+
}, [o]), { notify: i, unlock: c, isMuted: o, toggleMuted: u };
|
|
2485
2515
|
}
|
|
2486
|
-
const
|
|
2487
|
-
function
|
|
2516
|
+
const Bn = 2, Ln = (e) => `eloquent-ai:chat-widget-closed-${e}`;
|
|
2517
|
+
function Nn({
|
|
2488
2518
|
environment: e,
|
|
2489
2519
|
apiUrl: t,
|
|
2490
2520
|
appId: o,
|
|
2491
2521
|
userId: r,
|
|
2492
2522
|
userName: n,
|
|
2493
2523
|
userData: a,
|
|
2494
|
-
chatProps:
|
|
2524
|
+
chatProps: l,
|
|
2495
2525
|
isMobile: s,
|
|
2496
|
-
isInitiallyOpen:
|
|
2526
|
+
isInitiallyOpen: c,
|
|
2497
2527
|
hasCloseButton: i,
|
|
2498
|
-
hasCleanChatButton:
|
|
2528
|
+
hasCleanChatButton: u,
|
|
2499
2529
|
// Deprecated aliases, kept until hosts migrate to the is/has names above.
|
|
2500
|
-
initialOpen:
|
|
2501
|
-
closeButton:
|
|
2530
|
+
initialOpen: p,
|
|
2531
|
+
closeButton: d,
|
|
2502
2532
|
cleanChatButton: h,
|
|
2503
2533
|
proactiveMessageHideDelay: f = 5e3,
|
|
2504
2534
|
isAlwaysOpen: g = !1,
|
|
2505
|
-
hasCleanChatButtonOverride:
|
|
2535
|
+
hasCleanChatButtonOverride: R
|
|
2506
2536
|
}) {
|
|
2507
|
-
const { isMobile:
|
|
2508
|
-
userId:
|
|
2509
|
-
externalId:
|
|
2537
|
+
const { isMobile: q, portalContainer: z } = Rn(s), {
|
|
2538
|
+
userId: P,
|
|
2539
|
+
externalId: E,
|
|
2510
2540
|
deviceId: j,
|
|
2511
|
-
apiClient:
|
|
2512
|
-
chatSettings:
|
|
2513
|
-
currentChat:
|
|
2514
|
-
messages:
|
|
2515
|
-
isReady:
|
|
2541
|
+
apiClient: O,
|
|
2542
|
+
chatSettings: m,
|
|
2543
|
+
currentChat: y,
|
|
2544
|
+
messages: _,
|
|
2545
|
+
isReady: oe,
|
|
2516
2546
|
isChatClosed: ee,
|
|
2517
|
-
isChatActive:
|
|
2518
|
-
} =
|
|
2547
|
+
isChatActive: de
|
|
2548
|
+
} = Sn({
|
|
2519
2549
|
apiUrl: t,
|
|
2520
2550
|
appId: o,
|
|
2521
2551
|
initialUserId: r,
|
|
2522
2552
|
userName: n,
|
|
2523
2553
|
userData: a
|
|
2524
|
-
}),
|
|
2525
|
-
|
|
2526
|
-
if (!
|
|
2527
|
-
const
|
|
2528
|
-
|
|
2554
|
+
}), ae = uo({ chatProps: l, chatSettings: m }), D = c ?? p ?? !1, J = i ?? d ?? !0, N = u ?? h ?? !0, W = Ln(o), [re, le] = C(() => g ? !0 : ut(W) === "true" || q ? !1 : D ?? q), [G, ie] = C(!1);
|
|
2555
|
+
V(() => {
|
|
2556
|
+
if (!oe || G || (ie(!0), g)) return;
|
|
2557
|
+
const L = m?.initial_open;
|
|
2558
|
+
L != null && (q || L && ut(W) === "true" || le(L));
|
|
2529
2559
|
}, [
|
|
2530
|
-
|
|
2560
|
+
oe,
|
|
2531
2561
|
G,
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2562
|
+
m?.initial_open,
|
|
2563
|
+
q,
|
|
2564
|
+
W,
|
|
2535
2565
|
g
|
|
2536
2566
|
]);
|
|
2537
|
-
const Y =
|
|
2538
|
-
isEnabled:
|
|
2539
|
-
isOpen:
|
|
2540
|
-
}), { unlock: he } =
|
|
2541
|
-
(
|
|
2542
|
-
g || (he(),
|
|
2543
|
-
const lt = typeof
|
|
2544
|
-
return lt ? co(
|
|
2567
|
+
const Y = m?.initial_open ?? D, ce = m?.close_button ?? J, ve = R ?? m?.clean_chat_button ?? N, pe = m?.proactive_message_hide_delay ?? f, ne = $n({
|
|
2568
|
+
isEnabled: m?.notification_sound !== !1,
|
|
2569
|
+
isOpen: re
|
|
2570
|
+
}), { unlock: he } = ne, b = v(
|
|
2571
|
+
(L) => {
|
|
2572
|
+
g || (he(), le((ue) => {
|
|
2573
|
+
const lt = typeof L == "function" ? L(ue) : L;
|
|
2574
|
+
return lt ? co(W) : lo(W, "true", Bn), lt;
|
|
2545
2575
|
}));
|
|
2546
2576
|
},
|
|
2547
|
-
[
|
|
2548
|
-
), x =
|
|
2549
|
-
|
|
2550
|
-
), [
|
|
2551
|
-
|
|
2552
|
-
const [
|
|
2553
|
-
|
|
2554
|
-
const [
|
|
2555
|
-
|
|
2556
|
-
const
|
|
2557
|
-
|
|
2558
|
-
}, []), [
|
|
2559
|
-
text:
|
|
2560
|
-
isVisible:
|
|
2577
|
+
[W, g, he]
|
|
2578
|
+
), x = Vt(re, 400), [U, M] = C(
|
|
2579
|
+
l?.messages ?? []
|
|
2580
|
+
), [k, S] = C(y), [w, Z] = C(!1), [X, K] = C(_);
|
|
2581
|
+
X !== _ && (K(_), _.length > 0 && M(_));
|
|
2582
|
+
const [H, fe] = C(y);
|
|
2583
|
+
H !== y && (fe(y), y && S(y));
|
|
2584
|
+
const [Re, Ee] = C(ee);
|
|
2585
|
+
Re !== ee && (Ee(ee), ee && Z(!0));
|
|
2586
|
+
const ze = v(() => {
|
|
2587
|
+
Z(!0);
|
|
2588
|
+
}, []), [Ve, We] = C(!1), A = oe && m?.auto_display_welcome_message && m?.welcome_message ? m.welcome_message : "", se = {
|
|
2589
|
+
text: A,
|
|
2590
|
+
isVisible: A !== "" && !Ve,
|
|
2561
2591
|
autoHideDelay: pe
|
|
2562
|
-
}, { onSendMessage: we, onCleanMessages:
|
|
2592
|
+
}, { onSendMessage: we, onCleanMessages: te, onRateChat: Fe } = fn({
|
|
2563
2593
|
appId: o,
|
|
2564
|
-
userId:
|
|
2594
|
+
userId: P,
|
|
2565
2595
|
userName: n,
|
|
2566
2596
|
userData: a,
|
|
2567
|
-
externalId:
|
|
2597
|
+
externalId: E,
|
|
2568
2598
|
deviceId: j,
|
|
2569
|
-
apiClient:
|
|
2570
|
-
chatSettings:
|
|
2571
|
-
setMessages:
|
|
2572
|
-
messages:
|
|
2573
|
-
currentChat:
|
|
2574
|
-
setCurrentChat:
|
|
2575
|
-
onChatClosed:
|
|
2576
|
-
isChatClosed:
|
|
2577
|
-
onAgentMessage:
|
|
2599
|
+
apiClient: O,
|
|
2600
|
+
chatSettings: m,
|
|
2601
|
+
setMessages: M,
|
|
2602
|
+
messages: U,
|
|
2603
|
+
currentChat: k,
|
|
2604
|
+
setCurrentChat: S,
|
|
2605
|
+
onChatClosed: ze,
|
|
2606
|
+
isChatClosed: w,
|
|
2607
|
+
onAgentMessage: ne.notify
|
|
2578
2608
|
});
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
}, [
|
|
2582
|
-
|
|
2583
|
-
}, [
|
|
2584
|
-
const
|
|
2585
|
-
|
|
2586
|
-
if (!
|
|
2587
|
-
const
|
|
2588
|
-
userId:
|
|
2609
|
+
V(() => {
|
|
2610
|
+
_.length > 0 && M(_);
|
|
2611
|
+
}, [_]), V(() => {
|
|
2612
|
+
y && S(y);
|
|
2613
|
+
}, [y]);
|
|
2614
|
+
const je = $(null);
|
|
2615
|
+
V(() => {
|
|
2616
|
+
if (!k || !E || !O) return;
|
|
2617
|
+
const L = {
|
|
2618
|
+
userId: P,
|
|
2589
2619
|
userName: n,
|
|
2590
2620
|
userData: a,
|
|
2591
|
-
externalId:
|
|
2621
|
+
externalId: E,
|
|
2592
2622
|
deviceId: j,
|
|
2593
|
-
conversationId:
|
|
2594
|
-
},
|
|
2595
|
-
|
|
2623
|
+
conversationId: k.id
|
|
2624
|
+
}, ue = JSON.stringify(L);
|
|
2625
|
+
je.current !== ue && (je.current = ue, O.identifyUser(L));
|
|
2596
2626
|
}, [
|
|
2597
|
-
|
|
2598
|
-
|
|
2627
|
+
E,
|
|
2628
|
+
P,
|
|
2599
2629
|
n,
|
|
2600
2630
|
a,
|
|
2601
2631
|
j,
|
|
2602
|
-
|
|
2603
|
-
|
|
2632
|
+
k,
|
|
2633
|
+
O
|
|
2604
2634
|
]);
|
|
2605
|
-
const
|
|
2606
|
-
|
|
2607
|
-
}, [
|
|
2608
|
-
|
|
2635
|
+
const Te = v(() => {
|
|
2636
|
+
te(), Z(!1);
|
|
2637
|
+
}, [te]), me = v(() => {
|
|
2638
|
+
We(!0);
|
|
2609
2639
|
}, []);
|
|
2610
2640
|
return {
|
|
2611
|
-
isReady:
|
|
2612
|
-
isChatActive:
|
|
2641
|
+
isReady: oe,
|
|
2642
|
+
isChatActive: de,
|
|
2613
2643
|
isInitiallyOpen: Y,
|
|
2614
|
-
hasCloseButton:
|
|
2615
|
-
hasCleanChatButton:
|
|
2616
|
-
isMobile:
|
|
2617
|
-
chatId:
|
|
2618
|
-
chatInterfaceProps:
|
|
2619
|
-
chatOpen:
|
|
2644
|
+
hasCloseButton: ce,
|
|
2645
|
+
hasCleanChatButton: ve,
|
|
2646
|
+
isMobile: q,
|
|
2647
|
+
chatId: k?.id ?? null,
|
|
2648
|
+
chatInterfaceProps: ae,
|
|
2649
|
+
chatOpen: re,
|
|
2620
2650
|
chatOpenDebounced: x,
|
|
2621
|
-
messages:
|
|
2651
|
+
messages: U,
|
|
2622
2652
|
portalContainer: z,
|
|
2623
2653
|
onSendMessage: we,
|
|
2624
|
-
setChatOpen:
|
|
2625
|
-
onCleanMessages:
|
|
2626
|
-
proactiveMessage:
|
|
2627
|
-
hideProactiveMessage:
|
|
2628
|
-
isChatClosed:
|
|
2629
|
-
onStartNewChat:
|
|
2630
|
-
onRateChat:
|
|
2654
|
+
setChatOpen: b,
|
|
2655
|
+
onCleanMessages: te,
|
|
2656
|
+
proactiveMessage: se,
|
|
2657
|
+
hideProactiveMessage: me,
|
|
2658
|
+
isChatClosed: w,
|
|
2659
|
+
onStartNewChat: Te,
|
|
2660
|
+
onRateChat: Fe,
|
|
2631
2661
|
unlockSound: he,
|
|
2632
|
-
isSoundMuted:
|
|
2633
|
-
toggleSound:
|
|
2662
|
+
isSoundMuted: ne.isMuted,
|
|
2663
|
+
toggleSound: ne.toggleMuted
|
|
2634
2664
|
};
|
|
2635
2665
|
}
|
|
2636
|
-
function
|
|
2666
|
+
function Zn(e) {
|
|
2637
2667
|
const [t, o] = C(0);
|
|
2638
|
-
return
|
|
2668
|
+
return V(() => {
|
|
2639
2669
|
const r = window.visualViewport;
|
|
2640
2670
|
if (!e || !r) {
|
|
2641
2671
|
o(0);
|
|
@@ -2650,8 +2680,8 @@ function Bn(e) {
|
|
|
2650
2680
|
};
|
|
2651
2681
|
}, [e]), t;
|
|
2652
2682
|
}
|
|
2653
|
-
function
|
|
2654
|
-
|
|
2683
|
+
function Kn(e) {
|
|
2684
|
+
V(() => {
|
|
2655
2685
|
if (!e) return;
|
|
2656
2686
|
const { body: t } = document, o = window.scrollY, r = {
|
|
2657
2687
|
position: t.style.position,
|
|
@@ -2665,122 +2695,122 @@ function Ln(e) {
|
|
|
2665
2695
|
};
|
|
2666
2696
|
}, [e]);
|
|
2667
2697
|
}
|
|
2668
|
-
function
|
|
2669
|
-
const [e, t] = C(!1), [o, r] = C(null), n = $(null), a = $(null),
|
|
2670
|
-
const i = (
|
|
2671
|
-
r(
|
|
2698
|
+
function Hn() {
|
|
2699
|
+
const [e, t] = C(!1), [o, r] = C(null), n = $(null), a = $(null), l = v((c) => {
|
|
2700
|
+
const i = (u) => {
|
|
2701
|
+
r(u), t(!0), a.current = null, n.current && clearTimeout(n.current), n.current = setTimeout(() => {
|
|
2672
2702
|
n.current = null;
|
|
2673
|
-
const
|
|
2674
|
-
|
|
2703
|
+
const p = a.current;
|
|
2704
|
+
p && i(p);
|
|
2675
2705
|
}, 1e3);
|
|
2676
2706
|
};
|
|
2677
|
-
n.current ? a.current =
|
|
2707
|
+
n.current ? a.current = c : i(c);
|
|
2678
2708
|
}, []), s = v(() => {
|
|
2679
2709
|
n.current && (clearTimeout(n.current), n.current = null), a.current = null, t(!1), r(null);
|
|
2680
2710
|
}, []);
|
|
2681
2711
|
return {
|
|
2682
2712
|
isVisible: e,
|
|
2683
2713
|
content: o,
|
|
2684
|
-
showCognition:
|
|
2714
|
+
showCognition: l,
|
|
2685
2715
|
hideCognition: s
|
|
2686
2716
|
};
|
|
2687
2717
|
}
|
|
2688
|
-
function
|
|
2718
|
+
function Vn({
|
|
2689
2719
|
children: e
|
|
2690
2720
|
}) {
|
|
2691
|
-
const t =
|
|
2692
|
-
return /* @__PURE__ */ I(
|
|
2721
|
+
const t = Hn();
|
|
2722
|
+
return /* @__PURE__ */ I(Wt.Provider, { value: t, children: e });
|
|
2693
2723
|
}
|
|
2694
|
-
const
|
|
2724
|
+
const Wn = ({ children: e }) => {
|
|
2695
2725
|
const [t, o] = C(null), [r, n] = C(!1), a = Jt(o), i = {
|
|
2696
2726
|
error: t,
|
|
2697
2727
|
hideSdk: r,
|
|
2698
2728
|
publishApiError: a,
|
|
2699
|
-
publishError: (
|
|
2729
|
+
publishError: (u) => o(u),
|
|
2700
2730
|
publishNetworkError: () => n(!0),
|
|
2701
2731
|
clearError: () => o(null)
|
|
2702
2732
|
};
|
|
2703
|
-
return /* @__PURE__ */ I(
|
|
2704
|
-
},
|
|
2705
|
-
function
|
|
2733
|
+
return /* @__PURE__ */ I(Ft.Provider, { value: i, children: e });
|
|
2734
|
+
}, Fn = 100;
|
|
2735
|
+
function Jn({
|
|
2706
2736
|
appId: e,
|
|
2707
2737
|
userId: t,
|
|
2708
2738
|
userName: o,
|
|
2709
2739
|
userData: r,
|
|
2710
2740
|
chatProps: n,
|
|
2711
2741
|
proactiveMessageHideDelay: a = 5e3,
|
|
2712
|
-
isMobile:
|
|
2742
|
+
isMobile: l,
|
|
2713
2743
|
hasCloseButton: s,
|
|
2714
|
-
hasCleanChatButton:
|
|
2744
|
+
hasCleanChatButton: c,
|
|
2715
2745
|
isInitiallyOpen: i,
|
|
2716
2746
|
// Deprecated aliases, resolved in useChat (new name wins).
|
|
2717
|
-
closeButton:
|
|
2718
|
-
cleanChatButton:
|
|
2719
|
-
initialOpen:
|
|
2747
|
+
closeButton: u,
|
|
2748
|
+
cleanChatButton: p,
|
|
2749
|
+
initialOpen: d,
|
|
2720
2750
|
INTERNAL_ONLY_CHAT_INTERFACE_ONLY: h = !1,
|
|
2721
2751
|
INTERNAL_ONLY_SHOW_CLEAN_CHAT_BUTTON: f = void 0,
|
|
2722
2752
|
INTERNAL_ONLY_BLOCK_STYLE: g = !1,
|
|
2723
|
-
INTERNAL_ONLY_FEATURE_MESSAGE_CLICK:
|
|
2724
|
-
INTERNAL_ONLY_FEATURE_CLEAR_CHAT_CLICK:
|
|
2753
|
+
INTERNAL_ONLY_FEATURE_MESSAGE_CLICK: R = void 0,
|
|
2754
|
+
INTERNAL_ONLY_FEATURE_CLEAR_CHAT_CLICK: q = void 0,
|
|
2725
2755
|
INTERNAL_ONLY_ON_CHAT_ID: z = void 0,
|
|
2726
|
-
INTERNAL_ONLY_HIGHLIGHTED_MESSAGE_ID:
|
|
2727
|
-
INTERNAL_ONLY_ON_MESSAGE_SENT:
|
|
2756
|
+
INTERNAL_ONLY_HIGHLIGHTED_MESSAGE_ID: P = null,
|
|
2757
|
+
INTERNAL_ONLY_ON_MESSAGE_SENT: E = void 0,
|
|
2728
2758
|
INTERNAL_ONLY_SHOW_COPY_BUTTON: j = !1,
|
|
2729
|
-
INTERNAL_ONLY_ENVIRONMENT:
|
|
2730
|
-
INTERNAL_ONLY_API_URL:
|
|
2759
|
+
INTERNAL_ONLY_ENVIRONMENT: O = "live",
|
|
2760
|
+
INTERNAL_ONLY_API_URL: m
|
|
2731
2761
|
}) {
|
|
2732
|
-
const { hideSdk:
|
|
2733
|
-
isReady:
|
|
2734
|
-
isChatActive:
|
|
2762
|
+
const { hideSdk: y } = Ke(), {
|
|
2763
|
+
isReady: _,
|
|
2764
|
+
isChatActive: oe,
|
|
2735
2765
|
isInitiallyOpen: ee,
|
|
2736
|
-
hasCloseButton:
|
|
2737
|
-
hasCleanChatButton:
|
|
2766
|
+
hasCloseButton: de,
|
|
2767
|
+
hasCleanChatButton: ae,
|
|
2738
2768
|
isMobile: D,
|
|
2739
2769
|
chatId: J,
|
|
2740
|
-
chatOpen:
|
|
2741
|
-
unlockSound:
|
|
2742
|
-
isSoundMuted:
|
|
2743
|
-
toggleSound:
|
|
2770
|
+
chatOpen: N,
|
|
2771
|
+
unlockSound: W,
|
|
2772
|
+
isSoundMuted: re,
|
|
2773
|
+
toggleSound: le,
|
|
2744
2774
|
chatInterfaceProps: G,
|
|
2745
|
-
chatOpenDebounced:
|
|
2775
|
+
chatOpenDebounced: ie,
|
|
2746
2776
|
messages: Y,
|
|
2747
|
-
portalContainer:
|
|
2748
|
-
onSendMessage:
|
|
2777
|
+
portalContainer: ce,
|
|
2778
|
+
onSendMessage: ve,
|
|
2749
2779
|
setChatOpen: pe,
|
|
2750
|
-
proactiveMessage:
|
|
2780
|
+
proactiveMessage: ne,
|
|
2751
2781
|
hideProactiveMessage: he,
|
|
2752
|
-
isChatClosed:
|
|
2782
|
+
isChatClosed: b,
|
|
2753
2783
|
onStartNewChat: x,
|
|
2754
|
-
onRateChat:
|
|
2755
|
-
} =
|
|
2756
|
-
environment:
|
|
2757
|
-
apiUrl:
|
|
2784
|
+
onRateChat: U
|
|
2785
|
+
} = Nn({
|
|
2786
|
+
environment: O,
|
|
2787
|
+
apiUrl: m,
|
|
2758
2788
|
appId: e,
|
|
2759
2789
|
userId: t,
|
|
2760
2790
|
userName: o,
|
|
2761
2791
|
userData: r,
|
|
2762
2792
|
chatProps: n,
|
|
2763
|
-
isMobile:
|
|
2793
|
+
isMobile: l,
|
|
2764
2794
|
isInitiallyOpen: i,
|
|
2765
2795
|
hasCloseButton: s,
|
|
2766
|
-
hasCleanChatButton:
|
|
2767
|
-
initialOpen:
|
|
2768
|
-
closeButton:
|
|
2769
|
-
cleanChatButton:
|
|
2796
|
+
hasCleanChatButton: c,
|
|
2797
|
+
initialOpen: d,
|
|
2798
|
+
closeButton: u,
|
|
2799
|
+
cleanChatButton: p,
|
|
2770
2800
|
proactiveMessageHideDelay: a,
|
|
2771
2801
|
// Embedded: the interface is the page content with no launcher to reopen
|
|
2772
2802
|
// it, so nothing (boot initial_open, closed-cookie, props) may close it.
|
|
2773
2803
|
isAlwaysOpen: h,
|
|
2774
2804
|
hasCleanChatButtonOverride: f
|
|
2775
|
-
}),
|
|
2776
|
-
|
|
2777
|
-
!z ||
|
|
2805
|
+
}), M = $(void 0);
|
|
2806
|
+
V(() => {
|
|
2807
|
+
!z || M.current === J || (M.current = J, z(J));
|
|
2778
2808
|
}, [J, z]);
|
|
2779
|
-
const
|
|
2780
|
-
|
|
2781
|
-
const
|
|
2782
|
-
if (
|
|
2783
|
-
const
|
|
2809
|
+
const k = $(null), [S, w] = C(!1), Z = Zn(D && N);
|
|
2810
|
+
Kn(D && N);
|
|
2811
|
+
const X = !_;
|
|
2812
|
+
if (y || X && !h || !X && !oe) return null;
|
|
2813
|
+
const K = () => /* @__PURE__ */ ke(
|
|
2784
2814
|
"div",
|
|
2785
2815
|
{
|
|
2786
2816
|
style: {
|
|
@@ -2804,12 +2834,12 @@ function Wn({
|
|
|
2804
2834
|
title: "Chat",
|
|
2805
2835
|
head: /* @__PURE__ */ I("style", { children: Je }),
|
|
2806
2836
|
style: {
|
|
2807
|
-
display:
|
|
2837
|
+
display: N || ie ? "block" : "none",
|
|
2808
2838
|
width: D ? "100vw" : "400px",
|
|
2809
2839
|
// 100dvh accounts for mobile browser chrome (e.g. address bar); 100vh fallback for older browsers
|
|
2810
2840
|
"--chat-mobile-viewport-height": "100dvh",
|
|
2811
2841
|
height: D ? "var(--chat-mobile-viewport-height, 100vh)" : "700px",
|
|
2812
|
-
maxHeight: D ? "var(--chat-mobile-viewport-height, 100vh)" : `calc(100% - ${
|
|
2842
|
+
maxHeight: D ? "var(--chat-mobile-viewport-height, 100vh)" : `calc(100% - ${Fn}px)`,
|
|
2813
2843
|
border: "none",
|
|
2814
2844
|
zIndex: 2147483e3,
|
|
2815
2845
|
position: "fixed",
|
|
@@ -2829,7 +2859,7 @@ function Wn({
|
|
|
2829
2859
|
zIndex: 0
|
|
2830
2860
|
} : {}
|
|
2831
2861
|
},
|
|
2832
|
-
children:
|
|
2862
|
+
children: X ? (
|
|
2833
2863
|
// Only reachable in embedded mode (the launcher returns null while
|
|
2834
2864
|
// booting): hold the widget's frame with a skeleton so a remount —
|
|
2835
2865
|
// project/environment switch in the host app — doesn't flash an
|
|
@@ -2841,28 +2871,28 @@ function Wn({
|
|
|
2841
2871
|
...G,
|
|
2842
2872
|
hasIntroAnimation: !h,
|
|
2843
2873
|
isDialog: !h,
|
|
2844
|
-
shouldFocusOnOpen:
|
|
2845
|
-
isTestMode:
|
|
2846
|
-
isOpen:
|
|
2847
|
-
keyboardInset:
|
|
2874
|
+
shouldFocusOnOpen: S,
|
|
2875
|
+
isTestMode: O === "test",
|
|
2876
|
+
isOpen: N,
|
|
2877
|
+
keyboardInset: Z,
|
|
2848
2878
|
messages: Y,
|
|
2849
|
-
onSendMessage: (
|
|
2850
|
-
onMessageClick:
|
|
2851
|
-
highlightedMessageId:
|
|
2879
|
+
onSendMessage: (fe, Re) => (W(), E?.(fe), ve(fe, Re)),
|
|
2880
|
+
onMessageClick: R,
|
|
2881
|
+
highlightedMessageId: P,
|
|
2852
2882
|
isMobile: D,
|
|
2853
|
-
hasCloseButton:
|
|
2854
|
-
hasCleanChatButton:
|
|
2883
|
+
hasCloseButton: de,
|
|
2884
|
+
hasCleanChatButton: ae,
|
|
2855
2885
|
hasCopyButton: j,
|
|
2856
|
-
isChatClosed:
|
|
2886
|
+
isChatClosed: b,
|
|
2857
2887
|
onStartNewChat: x,
|
|
2858
|
-
onRateChat:
|
|
2859
|
-
isSoundMuted:
|
|
2860
|
-
onToggleSound:
|
|
2888
|
+
onRateChat: U,
|
|
2889
|
+
isSoundMuted: re,
|
|
2890
|
+
onToggleSound: le,
|
|
2861
2891
|
onClose: () => {
|
|
2862
|
-
eo(() => pe(!1)), no(
|
|
2892
|
+
eo(() => pe(!1)), no(k.current);
|
|
2863
2893
|
},
|
|
2864
2894
|
onCleanChat: () => {
|
|
2865
|
-
x(),
|
|
2895
|
+
x(), q?.();
|
|
2866
2896
|
}
|
|
2867
2897
|
}
|
|
2868
2898
|
)
|
|
@@ -2873,7 +2903,7 @@ function Wn({
|
|
|
2873
2903
|
{
|
|
2874
2904
|
className: "eloquentai-chat-launcher",
|
|
2875
2905
|
title: "Chat launcher",
|
|
2876
|
-
frameRef:
|
|
2906
|
+
frameRef: k,
|
|
2877
2907
|
head: /* @__PURE__ */ I("style", { children: Je }),
|
|
2878
2908
|
style: {
|
|
2879
2909
|
position: "fixed",
|
|
@@ -2884,16 +2914,16 @@ function Wn({
|
|
|
2884
2914
|
height: 48,
|
|
2885
2915
|
border: "none",
|
|
2886
2916
|
zIndex: D ? 2147482999 : 2147483e3,
|
|
2887
|
-
opacity:
|
|
2888
|
-
pointerEvents:
|
|
2889
|
-
transition:
|
|
2917
|
+
opacity: N ? 0 : 1,
|
|
2918
|
+
pointerEvents: N ? "none" : "auto",
|
|
2919
|
+
transition: N ? "opacity 100ms ease-in" : "opacity 200ms ease-out 320ms"
|
|
2890
2920
|
},
|
|
2891
2921
|
children: /* @__PURE__ */ I(
|
|
2892
2922
|
ao,
|
|
2893
2923
|
{
|
|
2894
|
-
isOpen:
|
|
2924
|
+
isOpen: N,
|
|
2895
2925
|
toggleBubble: () => {
|
|
2896
|
-
|
|
2926
|
+
w(!0), pe((fe) => !fe);
|
|
2897
2927
|
},
|
|
2898
2928
|
isDarkMode: G?.theme?.mode === "dark"
|
|
2899
2929
|
}
|
|
@@ -2917,19 +2947,19 @@ function Wn({
|
|
|
2917
2947
|
children: /* @__PURE__ */ I(Xt, { ...G?.theme ?? {}, children: /* @__PURE__ */ I(
|
|
2918
2948
|
"div",
|
|
2919
2949
|
{
|
|
2920
|
-
className:
|
|
2950
|
+
className: Be("eloq:w-full eloq:h-full", {
|
|
2921
2951
|
dark: G?.theme?.mode === "dark"
|
|
2922
2952
|
}),
|
|
2923
|
-
children:
|
|
2953
|
+
children: ne && !ee && /* @__PURE__ */ I(
|
|
2924
2954
|
so,
|
|
2925
2955
|
{
|
|
2926
|
-
message:
|
|
2927
|
-
isVisible:
|
|
2956
|
+
message: ne.text,
|
|
2957
|
+
isVisible: ne.isVisible,
|
|
2928
2958
|
onDismiss: he,
|
|
2929
2959
|
onMessageClick: () => {
|
|
2930
|
-
|
|
2960
|
+
w(!0), pe(!0), he();
|
|
2931
2961
|
},
|
|
2932
|
-
autoHideDelay:
|
|
2962
|
+
autoHideDelay: ne.autoHideDelay
|
|
2933
2963
|
}
|
|
2934
2964
|
)
|
|
2935
2965
|
}
|
|
@@ -2939,21 +2969,21 @@ function Wn({
|
|
|
2939
2969
|
]
|
|
2940
2970
|
}
|
|
2941
2971
|
);
|
|
2942
|
-
return /* @__PURE__ */ I(Qt, { children: g ?
|
|
2972
|
+
return /* @__PURE__ */ I(Qt, { children: g ? K() : ce ? /* @__PURE__ */ I(io, { container: ce, children: K() }) : null });
|
|
2943
2973
|
}
|
|
2944
|
-
function
|
|
2945
|
-
return /* @__PURE__ */ I(
|
|
2974
|
+
function Gn(e) {
|
|
2975
|
+
return /* @__PURE__ */ I(Wn, { children: /* @__PURE__ */ I(Vn, { children: /* @__PURE__ */ I(Jn, { ...e }) }) });
|
|
2946
2976
|
}
|
|
2947
|
-
function
|
|
2977
|
+
function oa(e, t) {
|
|
2948
2978
|
return ((r, n, a) => {
|
|
2949
|
-
const
|
|
2950
|
-
return
|
|
2951
|
-
})(
|
|
2979
|
+
const l = to.createRoot(n);
|
|
2980
|
+
return l.render(/* @__PURE__ */ I(r, { ...a })), l.unmount;
|
|
2981
|
+
})(Gn, e, t);
|
|
2952
2982
|
}
|
|
2953
2983
|
export {
|
|
2954
|
-
|
|
2984
|
+
Gn as Chat,
|
|
2955
2985
|
Yt as ChatInterface,
|
|
2956
|
-
|
|
2986
|
+
oa as renderChat,
|
|
2957
2987
|
tn as useRealtimeSocket
|
|
2958
2988
|
};
|
|
2959
2989
|
//# sourceMappingURL=index.mjs.map
|