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