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