reachat 2.1.0-alpha.1 → 2.1.0-alpha.10

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.
Files changed (53) hide show
  1. package/dist/AppBar/AppBar.d.ts +1 -1
  2. package/dist/{CSVFileRenderer-BAbkFZ2w.js → CSVFileRenderer-BJ6YmtEo.js} +15 -14
  3. package/dist/CSVFileRenderer-BJ6YmtEo.js.map +1 -0
  4. package/dist/Chat.d.ts +3 -3
  5. package/dist/ChatBubble/ChatBubble.d.ts +1 -1
  6. package/dist/ChatContext.d.ts +2 -2
  7. package/dist/ChatInput/ChatInput.d.ts +24 -0
  8. package/dist/ChatInput/FileInput.d.ts +1 -1
  9. package/dist/{DefaultFileRenderer-Bgc4Jadg.js → DefaultFileRenderer-BVeS3GS1.js} +2 -2
  10. package/dist/DefaultFileRenderer-BVeS3GS1.js.map +1 -0
  11. package/dist/ImageFileRenderer-C8tVW3I8.js.map +1 -1
  12. package/dist/Markdown/Markdown.d.ts +5 -0
  13. package/dist/Markdown/Table.d.ts +1 -1
  14. package/dist/Markdown/index.d.ts +2 -2
  15. package/dist/Markdown/plugins/remarkCve.d.ts +1 -1
  16. package/dist/PDFFileRenderer-BBn2EVrV.js +16 -0
  17. package/dist/PDFFileRenderer-BBn2EVrV.js.map +1 -0
  18. package/dist/SessionMessages/SessionEmpty.d.ts +1 -4
  19. package/dist/SessionMessages/SessionMessage/MessageFile/renderers/index.d.ts +1 -1
  20. package/dist/SessionMessages/SessionMessage/MessageFiles.d.ts +1 -1
  21. package/dist/SessionMessages/SessionMessage/MessageSources.d.ts +1 -1
  22. package/dist/SessionMessages/SessionMessage/SessionMessage.d.ts +4 -0
  23. package/dist/SessionMessages/SessionMessage/index.d.ts +2 -2
  24. package/dist/SessionMessages/SessionMessages.d.ts +9 -1
  25. package/dist/SessionMessages/index.d.ts +2 -2
  26. package/dist/SessionsList/index.d.ts +2 -2
  27. package/dist/docs.json +155 -20
  28. package/dist/{index-unCEyRCC.js → index-BIrmxgH5.js} +1325 -1302
  29. package/dist/index-BIrmxgH5.js.map +1 -0
  30. package/dist/index.css +6296 -738
  31. package/dist/index.d.ts +7 -6
  32. package/dist/index.js +32 -31
  33. package/dist/index.umd.cjs +1304 -1273
  34. package/dist/index.umd.cjs.map +1 -1
  35. package/dist/stories/Changelog.mdx +1 -1
  36. package/dist/stories/Chat.stories.tsx +5 -5
  37. package/dist/stories/ChatBubble.stories.tsx +3 -3
  38. package/dist/stories/Companion.stories.tsx +6 -6
  39. package/dist/stories/Console.stories.tsx +23 -23
  40. package/dist/stories/Integration.stories.tsx +2 -2
  41. package/dist/stories/Intro.mdx +1 -1
  42. package/dist/stories/assets/logo.svg +38 -19
  43. package/dist/stories/assets/paperclip.svg +4 -1
  44. package/dist/stories/assets/search.svg +5 -1
  45. package/dist/stories/examples.ts +20 -13
  46. package/dist/theme.d.ts +14 -0
  47. package/dist/utils/index.d.ts +1 -0
  48. package/package.json +63 -47
  49. package/dist/CSVFileRenderer-BAbkFZ2w.js.map +0 -1
  50. package/dist/DefaultFileRenderer-Bgc4Jadg.js.map +0 -1
  51. package/dist/PDFFileRenderer-DQdFS2l6.js +0 -9
  52. package/dist/PDFFileRenderer-DQdFS2l6.js.map +0 -1
  53. package/dist/index-unCEyRCC.js.map +0 -1
@@ -1,26 +1,290 @@
1
- import { jsxs, Fragment, jsx } from "react/jsx-runtime";
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import { cn, ConnectedOverlay, Button, Textarea, IconButton, Ellipsis, Card, Divider, useInfinityList, DateFormat, ListItem, List } from "reablocks";
3
+ import { AnimatePresence, motion } from "motion/react";
2
4
  import * as React from "react";
3
- import { createContext, useContext, useRef, forwardRef, useState, useEffect, useImperativeHandle, lazy, useMemo, Suspense, useCallback, memo } from "react";
4
- import { Button, cn, Textarea, Ellipsis, DateFormat, IconButton, Card, Divider, useInfinityList, ListItem, List, ConnectedOverlay } from "reablocks";
5
- import { Slot } from "@radix-ui/react-slot";
6
- import { motion, AnimatePresence } from "motion/react";
7
- import ReactMarkdown from "react-markdown";
8
- import { Prism } from "react-syntax-highlighter";
9
- import rehypeKatex from "rehype-katex";
10
- import { findAndReplace } from "mdast-util-find-and-replace";
5
+ import { createContext, useState, useCallback, useEffect, useMemo, memo, useRef, useContext, forwardRef, useImperativeHandle, lazy, Suspense } from "react";
11
6
  import { useHotkeys } from "reakeys";
12
7
  import remarkGfm from "remark-gfm";
13
- import remarkYoutube from "remark-youtube";
14
8
  import remarkMath from "remark-math";
15
- import { isToday, isYesterday, isThisWeek, differenceInYears, format } from "date-fns";
9
+ import remarkYoutube from "remark-youtube";
16
10
  import { offset } from "@floating-ui/react";
17
- const SvgSend = (props) => /* @__PURE__ */ React.createElement("svg", { width: 17, height: 17, viewBox: "0 0 17 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React.createElement("g", { id: "send" }, /* @__PURE__ */ React.createElement("path", { id: "Vector", d: "M14.6111 2.33327C14.5349 2.3339 14.4598 2.35194 14.3917 2.386L2.39168 8.386C2.31456 8.42456 2.24872 8.4824 2.20055 8.55391C2.15238 8.62543 2.12352 8.70818 2.11677 8.79414C2.11002 8.88009 2.12561 8.96634 2.16203 9.04449C2.19845 9.12264 2.25446 9.19005 2.32462 9.24017L4.52514 10.8124L5.47371 13.6581C5.50257 13.7447 5.55457 13.8217 5.62406 13.8808C5.69355 13.9399 5.7779 13.9789 5.86796 13.9935C5.95802 14.0082 6.05036 13.9979 6.13499 13.9638C6.21962 13.9297 6.2933 13.873 6.34806 13.8001L7.05249 12.8606L10.3207 15.2376C10.3843 15.2839 10.4579 15.3146 10.5355 15.3271C10.6132 15.3396 10.6927 15.3336 10.7676 15.3097C10.8425 15.2857 10.9107 15.2444 10.9667 15.1891C11.0226 15.1338 11.0647 15.0661 11.0896 14.9915L15.0896 2.99147C15.1148 2.91597 15.1216 2.83555 15.1094 2.7569C15.0972 2.67825 15.0665 2.60363 15.0197 2.53926C14.9729 2.47488 14.9114 2.42261 14.8403 2.38678C14.7693 2.35096 14.6907 2.33261 14.6111 2.33327ZM13.2478 5.35345L10.3565 14.0266L7.67293 12.0755L13.2478 5.35345ZM10.684 5.35801L4.934 9.87559L3.58113 8.90879L10.684 5.35801ZM11.2784 6.16205L6.56746 11.843C6.56681 11.8437 6.56616 11.8443 6.56551 11.845L6.56355 11.8476C6.55841 11.8538 6.55342 11.8601 6.54858 11.8665C6.54319 11.8733 6.53798 11.8802 6.53295 11.8873L6.12085 12.4361L5.53426 10.6751L11.2784 6.16205Z", fill: "currentColor" })));
18
- const SvgStop = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1, strokeLinecap: "round", strokeLinejoin: "round", className: "lucide lucide-octagon-x", ...props }, /* @__PURE__ */ React.createElement("path", { d: "m15 9-6 6" }), /* @__PURE__ */ React.createElement("path", { d: "M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z" }), /* @__PURE__ */ React.createElement("path", { d: "m9 9 6 6" }));
11
+ import { Prism } from "react-syntax-highlighter";
12
+ import ReactMarkdown from "react-markdown";
13
+ import rehypeKatex from "rehype-katex";
14
+ import { findAndReplace } from "mdast-util-find-and-replace";
15
+ import { Slot } from "@radix-ui/react-slot";
16
+ import { isToday, isYesterday, isThisWeek, differenceInYears, format } from "date-fns";
17
+ const chatTheme = {
18
+ base: "text-content-text-neutral-base",
19
+ console: "flex w-full gap-4 h-full",
20
+ companion: "w-full h-full overflow-hidden",
21
+ empty: "text-center flex-1",
22
+ appbar: "flex p-5",
23
+ sessions: {
24
+ base: "overflow-auto",
25
+ console: "min-w-[150px] w-[30%] max-w-[300px] bg-gradient-neutral-200 p-5 rounded-3xl",
26
+ companion: "w-full h-full",
27
+ group: "text-xs text-content-text-neutral-3 mt-4 hover:bg-transparent mb-1",
28
+ create: "relative mb-4 rounded-[10px] text-white",
29
+ session: {
30
+ base: "group my-1 rounded-[10px] p-2 text-content-text-neutral-1 border border-transparent",
31
+ active: "border-select-menu-items-color-item-stroke-row-hover [&_button]:opacity-100!",
32
+ delete: "[&>svg]:w-4 [&>svg]:h-4 opacity-0 group-hover:opacity-50!"
33
+ }
34
+ },
35
+ messages: {
36
+ base: "",
37
+ console: "flex flex-col mx-5 flex-1 overflow-hidden",
38
+ companion: "flex w-full h-full",
39
+ back: "self-start pl-0 my-2 ",
40
+ inner: "flex-1 h-full flex flex-col",
41
+ title: "text-base font-bold",
42
+ date: "text-xs whitespace-nowrap text-content-text-neutral-2",
43
+ content: "mt-2 flex-1 overflow-auto",
44
+ header: "flex justify-between items-center gap-2",
45
+ showMore: "mb-4",
46
+ message: {
47
+ base: "mt-4 mb-4 flex flex-col p-0 rounded-sm border-none bg-transparent",
48
+ question: "relative font-semibold mb-4 px-4 py-4 pb-2 rounded-3xl rounded-br-none text-typography border bg-(--background-neutral-raised-5) border-(--stroke-neutral-5)",
49
+ response: "relative data-[compact=false]:px-4 text-content-text-neutral-base",
50
+ overlay: "overflow-y-hidden max-h-[350px] after:content-[''] after:absolute after:inset-x-0 after:bottom-0 after:h-16 after:bg-linear-to-b after:from-transparent after:to-effects-shadows-base-2-xl",
51
+ cursor: "inline-block w-1 h-4 bg-current",
52
+ expand: "absolute bottom-0 right-1 z-10",
53
+ files: {
54
+ base: "mb-2 flex flex-wrap gap-3 ",
55
+ file: {
56
+ base: "flex items-center gap-2 border border-stroke-neutral-4 px-3 py-2 rounded-lg cursor-pointer",
57
+ name: "text-sm text-content-text-neutral-4"
58
+ }
59
+ },
60
+ sources: {
61
+ base: "my-4 flex flex-wrap gap-3",
62
+ source: {
63
+ base: "flex gap-2 border border-stroke-neutral-4 px-4 py-2 rounded-lg cursor-pointer",
64
+ companion: "flex-1 px-3 py-1.5",
65
+ image: "max-w-10 max-h-10 rounded-md w-full h-fit self-center",
66
+ title: "text-md block",
67
+ url: "text-sm text-buttons-colors-link-primary-text-resting underline"
68
+ }
69
+ },
70
+ markdown: {
71
+ hr: "my-4 border-t border-stroke-neutral-4",
72
+ copy: "sticky py-1 [&>svg]:w-4 [&>svg]:h-4 opacity-50",
73
+ p: "mb-2",
74
+ a: "text-buttons-colors-link-primary-text-resting underline",
75
+ table: "table-auto w-full m-2",
76
+ th: "px-4 py-2 text-left font-bold border-b border-stroke-neutral-4",
77
+ td: "px-4 py-2",
78
+ code: "m-2 rounded-b relative",
79
+ toolbar: "text-xs flex items-center justify-between px-2 py-1 rounded-t sticky top-0 backdrop-blur-md bg-gradient-neutral-500/50",
80
+ li: "mb-2 ml-6",
81
+ ul: "mb-4 list-disc",
82
+ ol: "mb-4 list-decimal"
83
+ },
84
+ csvPreview: {
85
+ base: "flex flex-col gap-2",
86
+ header: {
87
+ base: "flex justify-between items-center gap-4",
88
+ icon: "csv-icon flex items-center",
89
+ actions: "csv-actions flex items-center gap-6"
90
+ },
91
+ tableContainer: "flex justify-between",
92
+ dialog: {
93
+ base: "fixed inset-0 bg-background-neutral-canvas-base/70 flex justify-center items-center z-50",
94
+ container: "bg-background-neutral-canvas-base rounded-md w-11/12 h-5/6 overflow-auto"
95
+ }
96
+ },
97
+ footer: {
98
+ base: "mt-3 flex gap-1.5",
99
+ copy: "p-3 rounded-[10px] [&>svg]:size-4 opacity-50 hover:opacity-100!",
100
+ upvote: "p-3 rounded-[10px] [&>svg]:size-4 opacity-50 hover:opacity-100!",
101
+ downvote: "p-3 rounded-[10px] [&>svg]:size-4 opacity-50 hover:opacity-100!",
102
+ refresh: "p-3 rounded-[10px] [&>svg]:size-4 opacity-50 hover:opacity-100!"
103
+ }
104
+ }
105
+ },
106
+ input: {
107
+ base: "flex mt-4 relative",
108
+ upload: "px-5 py-2 size-10 text-content-text-neutral-2 hover:text-content-text-neutral-base",
109
+ input: "w-full border rounded-3xl px-3 py-2 pr-16 after:hidden after:mx-10! [&>textarea]:w-full [&>textarea]:flex-none [&>textarea]:outline-none [&>textarea]:resize-none",
110
+ actions: {
111
+ base: "absolute flex gap-2 items-center right-2 inset-y-1/2 -translate-y-1/2 z-10",
112
+ send: "px-3 py-3 hover:bg-primary-hover rounded-full size-8",
113
+ stop: "px-2 py-2 bg-content-assets-semantic-error-base text-white rounded-full hover:bg-content-assets-semantic-error-1 size-8"
114
+ }
115
+ }
116
+ };
117
+ const AppBar = ({ content, theme = chatTheme }) => {
118
+ return /* @__PURE__ */ jsx("div", { className: cn(theme.appbar), children: content });
119
+ };
19
120
  const ChatContext = createContext({
20
121
  sessions: [],
21
122
  activeSessionId: null
22
123
  });
23
- const SvgPaperclip = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1, strokeLinecap: "round", strokeLinejoin: "round", className: "lucide lucide-paperclip", ...props }, /* @__PURE__ */ React.createElement("path", { d: "m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48" }));
124
+ const useDimensions = () => {
125
+ const [ref, setRef] = useState(null);
126
+ const [width, setWidth] = useState(void 0);
127
+ const observe = useCallback((element) => {
128
+ if (element) setRef(element);
129
+ }, []);
130
+ useEffect(() => {
131
+ if (!ref) return;
132
+ const resizeObserver = new ResizeObserver((entries) => {
133
+ for (const entry of entries) {
134
+ setWidth(entry.contentRect.width);
135
+ }
136
+ });
137
+ resizeObserver.observe(ref);
138
+ return () => {
139
+ resizeObserver.disconnect();
140
+ };
141
+ }, [ref]);
142
+ return { width, observe };
143
+ };
144
+ const Chat = ({
145
+ children,
146
+ viewType = "console",
147
+ sessions,
148
+ onSelectSession,
149
+ onDeleteSession,
150
+ onSendMessage,
151
+ onStopMessage,
152
+ onFileUpload,
153
+ isLoading,
154
+ activeSessionId,
155
+ theme = chatTheme,
156
+ onNewSession,
157
+ remarkPlugins = [remarkGfm, remarkYoutube, remarkMath],
158
+ disabled,
159
+ style,
160
+ className
161
+ }) => {
162
+ const [internalActiveSessionID, setInternalActiveSessionID] = useState(activeSessionId);
163
+ const { width, observe } = useDimensions();
164
+ const isCompact = viewType === "companion" || width && width < 767;
165
+ useEffect(() => {
166
+ setInternalActiveSessionID(activeSessionId);
167
+ }, [activeSessionId]);
168
+ const handleSelectSession = useCallback(
169
+ (sessionId) => {
170
+ setInternalActiveSessionID(sessionId);
171
+ onSelectSession?.(sessionId);
172
+ },
173
+ [onSelectSession]
174
+ );
175
+ const handleDeleteSession = useCallback(
176
+ (sessionId) => {
177
+ setInternalActiveSessionID(void 0);
178
+ onDeleteSession?.(sessionId);
179
+ },
180
+ [onDeleteSession]
181
+ );
182
+ const handleCreateNewSession = useCallback(() => {
183
+ setInternalActiveSessionID(void 0);
184
+ onNewSession?.();
185
+ }, [onNewSession]);
186
+ useHotkeys([
187
+ {
188
+ name: "Create new session",
189
+ category: "Chat",
190
+ keys: "meta+shift+s",
191
+ callback: (event) => {
192
+ event.preventDefault();
193
+ handleCreateNewSession();
194
+ }
195
+ }
196
+ ]);
197
+ const activeSession = useMemo(
198
+ () => sessions.find((session) => session.id === internalActiveSessionID),
199
+ [sessions, internalActiveSessionID]
200
+ );
201
+ const contextValue = useMemo(
202
+ () => ({
203
+ sessions,
204
+ activeSession,
205
+ remarkPlugins,
206
+ theme,
207
+ disabled,
208
+ isLoading,
209
+ isCompact,
210
+ viewType,
211
+ activeSessionId: internalActiveSessionID,
212
+ selectSession: handleSelectSession,
213
+ deleteSession: handleDeleteSession,
214
+ createSession: handleCreateNewSession,
215
+ sendMessage: onSendMessage,
216
+ stopMessage: onStopMessage,
217
+ fileUpload: onFileUpload
218
+ }),
219
+ [
220
+ isLoading,
221
+ isCompact,
222
+ viewType,
223
+ disabled,
224
+ theme,
225
+ remarkPlugins,
226
+ sessions,
227
+ activeSession,
228
+ internalActiveSessionID,
229
+ handleSelectSession,
230
+ handleDeleteSession,
231
+ handleCreateNewSession,
232
+ onSendMessage,
233
+ onStopMessage,
234
+ onFileUpload
235
+ ]
236
+ );
237
+ return /* @__PURE__ */ jsx(ChatContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: /* @__PURE__ */ jsx(
238
+ "div",
239
+ {
240
+ ref: observe,
241
+ className: cn(className, theme.base, {
242
+ [theme.companion]: isCompact,
243
+ [theme.console]: !isCompact
244
+ }),
245
+ style,
246
+ children
247
+ }
248
+ ) }) });
249
+ };
250
+ const ChatBubble = memo(
251
+ ({
252
+ children,
253
+ bubbleContent,
254
+ position = "right-end",
255
+ modifiers = [offset({ mainAxis: 0, crossAxis: -40 })],
256
+ className
257
+ }) => {
258
+ const [isOpen, setIsOpen] = useState(false);
259
+ const ref = useRef(null);
260
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
261
+ /* @__PURE__ */ jsx(
262
+ ConnectedOverlay,
263
+ {
264
+ placement: position,
265
+ modifiers,
266
+ reference: ref.current,
267
+ open: isOpen,
268
+ onOpen: () => setIsOpen(true),
269
+ onClose: () => setIsOpen(false),
270
+ content: () => /* @__PURE__ */ jsx(Fragment, { children })
271
+ }
272
+ ),
273
+ /* @__PURE__ */ jsx(
274
+ "div",
275
+ {
276
+ ref,
277
+ className,
278
+ onClick: () => setIsOpen((prev) => !prev),
279
+ children: bubbleContent
280
+ }
281
+ )
282
+ ] });
283
+ }
284
+ );
285
+ const SvgSend = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M15.3451 0.654003C15.0011 0.310003 14.5001 0.191003 14.0401 0.339003L1.11712 4.493C0.626116 4.651 0.286116 5.067 0.230116 5.58C0.174116 6.092 0.417116 6.572 0.862116 6.831L5.43812 9.5L9.39112 5.546C9.68412 5.253 10.1591 5.253 10.4521 5.546C10.7451 5.839 10.7451 6.314 10.4521 6.607L6.49812 10.561L9.16712 15.137C9.40211 15.539 9.81712 15.776 10.2741 15.776C10.3221 15.776 10.3711 15.773 10.4201 15.768C10.9321 15.712 11.3491 15.372 11.5061 14.882L15.6611 1.96C15.8091 1.497 15.6881 0.997003 15.3451 0.654003Z", fill: "currentColor" }));
286
+ const SvgStop = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 50 50", width: "24px", height: "24px", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M 25 2 C 12.309534 2 2 12.309534 2 25 C 2 37.690466 12.309534 48 25 48 C 37.690466 48 48 37.690466 48 25 C 48 12.309534 37.690466 2 25 2 z M 25 4 C 36.609534 4 46 13.390466 46 25 C 46 36.609534 36.609534 46 25 46 C 13.390466 46 4 36.609534 4 25 C 4 13.390466 13.390466 4 25 4 z M 32.990234 15.986328 A 1.0001 1.0001 0 0 0 32.292969 16.292969 L 25 23.585938 L 17.707031 16.292969 A 1.0001 1.0001 0 0 0 16.990234 15.990234 A 1.0001 1.0001 0 0 0 16.292969 17.707031 L 23.585938 25 L 16.292969 32.292969 A 1.0001 1.0001 0 1 0 17.707031 33.707031 L 25 26.414062 L 32.292969 33.707031 A 1.0001 1.0001 0 1 0 33.707031 32.292969 L 26.414062 25 L 33.707031 17.707031 A 1.0001 1.0001 0 0 0 32.990234 15.986328 z", fill: "currentColor" }));
287
+ const SvgPaperclip = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 64 64", width: "24px", height: "24px", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M25.3,56.007c-3.409,0-6.818-1.297-9.414-3.893c-2.595-2.596-3.893-6.005-3.893-9.415c0-3.409,1.298-6.819,3.893-9.414 l20.4-20.4c1.847-1.847,4.302-2.864,6.914-2.864c2.611,0,5.067,1.017,6.914,2.864c3.812,3.813,3.812,10.016,0,13.829l-20.4,20.4 c-2.438,2.439-6.385,2.441-8.828,0c-2.434-2.435-2.434-6.395,0-8.829l13.7-13.7c0.781-0.781,2.047-0.781,2.828,0 c0.781,0.781,0.781,2.047,0,2.828l-13.7,13.7c-0.874,0.875-0.874,2.297,0.001,3.172c0.847,0.846,2.324,0.846,3.171,0l20.4-20.4 c2.252-2.253,2.252-5.919,0-8.172c-1.092-1.091-2.543-1.692-4.086-1.692c-1.544,0-2.994,0.601-4.086,1.692l-20.4,20.4 c-1.815,1.816-2.723,4.201-2.723,6.586c0,2.385,0.908,4.77,2.723,6.586c1.816,1.815,4.201,2.723,6.586,2.723 c2.385,0,4.771-0.907,6.586-2.723l12.7-12.7c0.781-0.781,2.047-0.781,2.828,0c0.781,0.781,0.781,2.047,0,2.828l-12.7,12.7 C32.119,54.709,28.71,56.007,25.3,56.007z", fill: "currentColor" }));
24
288
  const FileInput = ({
25
289
  allowedFiles,
26
290
  onFileUpload,
@@ -53,1171 +317,1132 @@ const FileInput = ({
53
317
  variant: "text",
54
318
  disabled: isLoading || disabled,
55
319
  className: cn(theme.input.upload),
56
- onClick: () => {
57
- var _a;
58
- return (_a = fileInputRef.current) == null ? void 0 : _a.click();
59
- },
320
+ onClick: () => fileInputRef.current?.click(),
60
321
  children: attachIcon
61
322
  }
62
323
  )
63
324
  ] });
64
325
  };
65
- const ChatInput = forwardRef(({
66
- allowedFiles,
67
- placeholder,
68
- defaultValue,
69
- sendIcon = /* @__PURE__ */ jsx(SvgSend, {}),
70
- stopIcon = /* @__PURE__ */ jsx(SvgStop, {}),
71
- attachIcon
72
- }, ref) => {
73
- const { theme, isLoading, disabled, sendMessage, stopMessage, fileUpload, activeSessionId } = useContext(ChatContext);
74
- const [message, setMessage] = useState("");
75
- const inputRef = useRef(null);
76
- useEffect(() => {
77
- if (inputRef.current) {
78
- inputRef.current.focus();
79
- }
80
- }, [activeSessionId, inputRef]);
81
- useImperativeHandle(ref, () => ({
82
- focus: () => {
83
- var _a;
84
- (_a = inputRef.current) == null ? void 0 : _a.focus();
85
- }
86
- }));
87
- const handleSendMessage = () => {
88
- if (message.trim()) {
89
- sendMessage == null ? void 0 : sendMessage(message);
90
- setMessage("");
91
- }
92
- };
93
- const handleKeyPress = (e) => {
94
- if (e.key === "Enter" && !e.shiftKey) {
95
- e.preventDefault();
96
- handleSendMessage();
97
- }
98
- };
99
- const handleFileUpload = (event) => {
100
- var _a;
101
- const file = (_a = event.target.files) == null ? void 0 : _a[0];
102
- if (file && fileUpload) {
103
- fileUpload(file);
104
- }
105
- };
106
- return /* @__PURE__ */ jsxs("div", { className: cn(theme.input.base), children: [
107
- /* @__PURE__ */ jsx(
108
- Textarea,
109
- {
110
- ref: inputRef,
111
- containerClassName: cn(theme.input.input),
112
- minRows: 1,
113
- autoFocus: true,
114
- value: message,
115
- defaultValue,
116
- onKeyPress: handleKeyPress,
117
- placeholder,
118
- disabled: isLoading || disabled,
119
- onChange: (e) => setMessage(e.target.value)
326
+ const ChatInput = forwardRef(
327
+ ({
328
+ allowedFiles,
329
+ placeholder,
330
+ defaultValue,
331
+ className,
332
+ message,
333
+ sendIcon = /* @__PURE__ */ jsx(SvgSend, {}),
334
+ stopIcon = /* @__PURE__ */ jsx(SvgStop, {}),
335
+ attachIcon,
336
+ onMessageChange
337
+ }, ref) => {
338
+ const {
339
+ theme,
340
+ isLoading,
341
+ disabled,
342
+ sendMessage,
343
+ stopMessage,
344
+ fileUpload,
345
+ activeSessionId
346
+ } = useContext(ChatContext);
347
+ const [internalMessage, setInternalMessage] = useState("");
348
+ const inputRef = useRef(null);
349
+ useEffect(() => {
350
+ setInternalMessage(message || "");
351
+ }, [message]);
352
+ useEffect(() => {
353
+ if (inputRef.current) {
354
+ inputRef.current.focus();
120
355
  }
121
- ),
122
- /* @__PURE__ */ jsxs("div", { className: cn(theme.input.actions.base), children: [
123
- (allowedFiles == null ? void 0 : allowedFiles.length) > 0 && /* @__PURE__ */ jsx(
124
- FileInput,
125
- {
126
- allowedFiles,
127
- onFileUpload: handleFileUpload,
128
- isLoading,
129
- disabled,
130
- attachIcon
131
- }
132
- ),
133
- isLoading && /* @__PURE__ */ jsx(
134
- Button,
135
- {
136
- title: "Stop",
137
- className: cn(theme.input.actions.stop),
138
- onClick: stopMessage,
139
- disabled,
140
- children: stopIcon
141
- }
142
- ),
356
+ }, [activeSessionId, inputRef]);
357
+ const handleSendMessage = () => {
358
+ if (internalMessage.trim()) {
359
+ sendMessage?.(internalMessage);
360
+ setInternalMessage("");
361
+ }
362
+ };
363
+ useImperativeHandle(ref, () => ({
364
+ focus: () => {
365
+ inputRef.current?.focus();
366
+ },
367
+ send: () => {
368
+ handleSendMessage();
369
+ },
370
+ setValue: (value) => {
371
+ setInternalMessage(value);
372
+ onMessageChange?.(value);
373
+ },
374
+ getValue: () => {
375
+ return internalMessage;
376
+ }
377
+ }));
378
+ const handleKeyPress = (e) => {
379
+ if (e.key === "Enter" && !e.shiftKey) {
380
+ e.preventDefault();
381
+ handleSendMessage();
382
+ }
383
+ };
384
+ const handleFileUpload = (event) => {
385
+ const file = event.target.files?.[0];
386
+ if (file && fileUpload) {
387
+ fileUpload(file);
388
+ }
389
+ };
390
+ const handleMessageChange = useCallback(
391
+ (event) => {
392
+ setInternalMessage(event.target.value);
393
+ onMessageChange?.(event.target.value);
394
+ },
395
+ [onMessageChange]
396
+ );
397
+ return /* @__PURE__ */ jsxs("div", { className: cn(theme.input.base, className), children: [
143
398
  /* @__PURE__ */ jsx(
144
- Button,
399
+ Textarea,
145
400
  {
146
- title: "Send",
147
- className: cn(theme.input.actions.send),
148
- onClick: handleSendMessage,
401
+ ref: inputRef,
402
+ containerClassName: cn(theme.input.input),
403
+ minRows: 1,
404
+ autoFocus: true,
405
+ value: internalMessage,
406
+ defaultValue,
407
+ onKeyPress: handleKeyPress,
408
+ placeholder,
149
409
  disabled: isLoading || disabled,
150
- children: sendIcon
151
- }
152
- )
153
- ] })
154
- ] });
155
- });
156
- const SessionEmpty = ({
157
- children
158
- }) => {
159
- const { theme } = useContext(ChatContext);
160
- return /* @__PURE__ */ jsx("div", { className: cn(theme.empty), children });
161
- };
162
- const SessionMessagesHeader = ({ children }) => {
163
- const { activeSession, theme } = useContext(ChatContext);
164
- const Comp = children ? Slot : "header";
165
- if (!activeSession) {
166
- return null;
167
- }
168
- return /* @__PURE__ */ jsx(Comp, { className: cn(theme.messages.header), children: children || /* @__PURE__ */ jsxs(Fragment, { children: [
169
- /* @__PURE__ */ jsx("h2", { className: cn(theme.messages.title), children: /* @__PURE__ */ jsx(Ellipsis, { limit: 125, value: activeSession.title }) }),
170
- /* @__PURE__ */ jsx(
171
- DateFormat,
172
- {
173
- className: cn(theme.messages.date),
174
- date: activeSession.createdAt
175
- }
176
- )
177
- ] }) });
178
- };
179
- const SvgBack = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1, strokeLinecap: "round", strokeLinejoin: "round", className: "lucide lucide-chevron-left", ...props }, /* @__PURE__ */ React.createElement("path", { d: "m15 18-6-6 6-6" }));
180
- const SessionMessagePanel = ({
181
- children,
182
- allowBack = true
183
- }) => {
184
- const { activeSessionId, theme, isCompact, selectSession, viewType } = useContext(ChatContext);
185
- const isVisible = isCompact && activeSessionId || viewType === "chat" || !isCompact;
186
- return isVisible && /* @__PURE__ */ jsx(
187
- motion.div,
188
- {
189
- initial: { translateX: "200%" },
190
- animate: {
191
- translateX: "0%",
192
- transition: {
193
- type: "tween",
194
- ease: "linear",
195
- duration: 0.2,
196
- when: "beforeChildren"
410
+ onChange: handleMessageChange
197
411
  }
198
- },
199
- exit: { translateX: "200%" },
200
- className: cn(theme.messages.base, {
201
- [theme.messages.companion]: isCompact,
202
- [theme.messages.console]: !isCompact
203
- }),
204
- children: /* @__PURE__ */ jsxs("div", { className: cn(theme.messages.inner), children: [
205
- allowBack && isCompact && viewType !== "chat" && /* @__PURE__ */ jsxs(
412
+ ),
413
+ /* @__PURE__ */ jsxs("div", { className: cn(theme.input.actions.base), children: [
414
+ allowedFiles?.length > 0 && /* @__PURE__ */ jsx(
415
+ FileInput,
416
+ {
417
+ allowedFiles,
418
+ onFileUpload: handleFileUpload,
419
+ isLoading,
420
+ disabled,
421
+ attachIcon
422
+ }
423
+ ),
424
+ isLoading && /* @__PURE__ */ jsx(
206
425
  Button,
207
426
  {
208
- variant: "text",
209
- size: "small",
210
- onClick: () => selectSession(null),
211
- className: cn(theme.messages.back),
212
- children: [
213
- /* @__PURE__ */ jsx(SvgBack, {}),
214
- "Back"
215
- ]
427
+ title: "Stop",
428
+ className: cn(theme.input.actions.stop),
429
+ onClick: stopMessage,
430
+ disabled,
431
+ children: stopIcon
216
432
  }
217
433
  ),
218
- children
434
+ /* @__PURE__ */ jsx(
435
+ Button,
436
+ {
437
+ title: "Send",
438
+ className: cn(theme.input.actions.send),
439
+ onClick: handleSendMessage,
440
+ disabled: isLoading || disabled,
441
+ children: sendIcon
442
+ }
443
+ )
219
444
  ] })
220
- }
221
- );
222
- };
223
- const SvgCopy = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1, strokeLinecap: "round", strokeLinejoin: "round", className: "lucide lucide-copy", ...props }, /* @__PURE__ */ React.createElement("rect", { width: 14, height: 14, x: 8, y: 8, rx: 2, ry: 2 }), /* @__PURE__ */ React.createElement("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" }));
445
+ ] });
446
+ }
447
+ );
448
+ const SvgCopy = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 18, height: 18, viewBox: "0 0 18 18", fill: "none", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M1.75 6C2.164 6 2.5 6.336 2.5 6.75V13.25C2.5 13.939 3.061 14.5 3.75 14.5H12.25C12.664 14.5 13 14.836 13 15.25C13 15.664 12.664 16 12.25 16H3.75C2.233 16 1 14.767 1 13.25V6.75C1 6.336 1.336 6 1.75 6ZM14.25 2C15.7688 2 17 3.23122 17 4.75V10.25C17 11.7688 15.7688 13 14.25 13H6.75C5.23122 13 4 11.7688 4 10.25V4.75C4 3.23122 5.23122 2 6.75 2H14.25Z", fill: "currentColor" }));
224
449
  const dark = {
225
450
  'code[class*="language-"]': {
226
- "background": "#11111f",
227
- "color": "#e2e8f0",
228
- "textShadow": "0 1px rgba(0, 0, 0, 0.3)",
229
- "fontFamily": '"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',
230
- "direction": "ltr",
231
- "textAlign": "left",
232
- "whiteSpace": "pre",
233
- "wordSpacing": "normal",
234
- "wordBreak": "normal",
235
- "lineHeight": "1.5",
236
- "MozTabSize": "2",
237
- "OTabSize": "2",
238
- "tabSize": "2",
239
- "WebkitHyphens": "none",
240
- "MozHyphens": "none",
241
- "msHyphens": "none",
242
- "hyphens": "none"
451
+ background: "#11111f",
452
+ color: "#e2e8f0",
453
+ textShadow: "0 1px rgba(0, 0, 0, 0.3)",
454
+ fontFamily: '"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',
455
+ direction: "ltr",
456
+ textAlign: "left",
457
+ whiteSpace: "pre",
458
+ wordSpacing: "normal",
459
+ wordBreak: "normal",
460
+ lineHeight: "1.5",
461
+ MozTabSize: "2",
462
+ OTabSize: "2",
463
+ tabSize: "2",
464
+ WebkitHyphens: "none",
465
+ MozHyphens: "none",
466
+ msHyphens: "none",
467
+ hyphens: "none"
243
468
  },
244
469
  'pre[class*="language-"]': {
245
- "background": "#11111f",
246
- "color": "#e2e8f0",
247
- "textShadow": "0 1px rgba(0, 0, 0, 0.3)",
248
- "fontFamily": '"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',
249
- "direction": "ltr",
250
- "textAlign": "left",
251
- "whiteSpace": "pre",
252
- "wordSpacing": "normal",
253
- "wordBreak": "normal",
254
- "lineHeight": "1.5",
255
- "MozTabSize": "2",
256
- "OTabSize": "2",
257
- "tabSize": "2",
258
- "WebkitHyphens": "none",
259
- "MozHyphens": "none",
260
- "msHyphens": "none",
261
- "hyphens": "none",
262
- "padding": "1em",
263
- "margin": "0",
264
- "overflow": "auto"
470
+ background: "#11111f",
471
+ color: "#e2e8f0",
472
+ textShadow: "0 1px rgba(0, 0, 0, 0.3)",
473
+ fontFamily: '"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',
474
+ direction: "ltr",
475
+ textAlign: "left",
476
+ whiteSpace: "pre",
477
+ wordSpacing: "normal",
478
+ wordBreak: "normal",
479
+ lineHeight: "1.5",
480
+ MozTabSize: "2",
481
+ OTabSize: "2",
482
+ tabSize: "2",
483
+ WebkitHyphens: "none",
484
+ MozHyphens: "none",
485
+ msHyphens: "none",
486
+ hyphens: "none",
487
+ padding: "1em",
488
+ margin: "0",
489
+ overflow: "auto"
265
490
  },
266
491
  'code[class*="language-"]::-moz-selection': {
267
- "background": "#1e293b",
268
- "color": "inherit",
269
- "textShadow": "none"
492
+ background: "#1e293b",
493
+ color: "inherit",
494
+ textShadow: "none"
270
495
  },
271
496
  'code[class*="language-"] *::-moz-selection': {
272
- "background": "#1e293b",
273
- "color": "inherit",
274
- "textShadow": "none"
497
+ background: "#1e293b",
498
+ color: "inherit",
499
+ textShadow: "none"
275
500
  },
276
501
  'pre[class*="language-"] *::-moz-selection': {
277
- "background": "#1e293b",
278
- "color": "inherit",
279
- "textShadow": "none"
502
+ background: "#1e293b",
503
+ color: "inherit",
504
+ textShadow: "none"
280
505
  },
281
506
  'code[class*="language-"]::selection': {
282
- "background": "#1e293b",
283
- "color": "inherit",
284
- "textShadow": "none"
507
+ background: "#1e293b",
508
+ color: "inherit",
509
+ textShadow: "none"
285
510
  },
286
511
  'code[class*="language-"] *::selection': {
287
- "background": "#1e293b",
288
- "color": "inherit",
289
- "textShadow": "none"
512
+ background: "#1e293b",
513
+ color: "inherit",
514
+ textShadow: "none"
290
515
  },
291
516
  'pre[class*="language-"] *::selection': {
292
- "background": "#1e293b",
293
- "color": "inherit",
294
- "textShadow": "none"
517
+ background: "#1e293b",
518
+ color: "inherit",
519
+ textShadow: "none"
295
520
  },
296
521
  ':not(pre) > code[class*="language-"]': {
297
- "padding": "0.2em 0.3em",
298
- "borderRadius": "0.3em",
299
- "whiteSpace": "normal"
522
+ padding: "0.2em 0.3em",
523
+ borderRadius: "0.3em",
524
+ whiteSpace: "normal"
300
525
  },
301
- "comment": {
302
- "color": "#64748b",
303
- "fontStyle": "italic"
526
+ comment: {
527
+ color: "#64748b",
528
+ fontStyle: "italic"
304
529
  },
305
- "prolog": {
306
- "color": "#64748b"
530
+ prolog: {
531
+ color: "#64748b"
307
532
  },
308
- "cdata": {
309
- "color": "#64748b"
533
+ cdata: {
534
+ color: "#64748b"
310
535
  },
311
- "doctype": {
312
- "color": "#e2e8f0"
536
+ doctype: {
537
+ color: "#e2e8f0"
313
538
  },
314
- "punctuation": {
315
- "color": "#e2e8f0"
539
+ punctuation: {
540
+ color: "#e2e8f0"
316
541
  },
317
- "entity": {
318
- "color": "#3b82f6",
319
- "cursor": "help"
542
+ entity: {
543
+ color: "#3b82f6",
544
+ cursor: "help"
320
545
  },
321
546
  "attr-name": {
322
- "color": "#f59e0b"
547
+ color: "#f59e0b"
323
548
  },
324
549
  "class-name": {
325
- "color": "#f59e0b"
550
+ color: "#f59e0b"
326
551
  },
327
- "boolean": {
328
- "color": "#3b82f6"
552
+ boolean: {
553
+ color: "#3b82f6"
329
554
  },
330
- "constant": {
331
- "color": "#3b82f6"
555
+ constant: {
556
+ color: "#3b82f6"
332
557
  },
333
- "number": {
334
- "color": "#3b82f6"
558
+ number: {
559
+ color: "#3b82f6"
335
560
  },
336
- "atrule": {
337
- "color": "#f59e0b"
561
+ atrule: {
562
+ color: "#f59e0b"
338
563
  },
339
- "keyword": {
340
- "color": "#f472b6"
564
+ keyword: {
565
+ color: "#f472b6"
341
566
  },
342
- "property": {
343
- "color": "#3b82f6"
567
+ property: {
568
+ color: "#3b82f6"
344
569
  },
345
- "tag": {
346
- "color": "#3b82f6"
570
+ tag: {
571
+ color: "#3b82f6"
347
572
  },
348
- "symbol": {
349
- "color": "#3b82f6"
573
+ symbol: {
574
+ color: "#3b82f6"
350
575
  },
351
- "deleted": {
352
- "color": "#ef4444"
576
+ deleted: {
577
+ color: "#ef4444"
353
578
  },
354
- "important": {
355
- "color": "#f472b6"
579
+ important: {
580
+ color: "#f472b6"
356
581
  },
357
- "selector": {
358
- "color": "#10b981"
582
+ selector: {
583
+ color: "#10b981"
359
584
  },
360
- "string": {
361
- "color": "#10b981"
585
+ string: {
586
+ color: "#10b981"
362
587
  },
363
- "char": {
364
- "color": "#10b981"
588
+ char: {
589
+ color: "#10b981"
365
590
  },
366
- "builtin": {
367
- "color": "#10b981"
591
+ builtin: {
592
+ color: "#10b981"
368
593
  },
369
- "inserted": {
370
- "color": "#10b981"
594
+ inserted: {
595
+ color: "#10b981"
371
596
  },
372
- "regex": {
373
- "color": "#10b981"
597
+ regex: {
598
+ color: "#10b981"
374
599
  },
375
600
  "attr-value": {
376
- "color": "#10b981"
601
+ color: "#10b981"
377
602
  },
378
603
  "attr-value > .token.punctuation": {
379
- "color": "#10b981"
604
+ color: "#10b981"
380
605
  },
381
- "variable": {
382
- "color": "#60a5fa"
606
+ variable: {
607
+ color: "#60a5fa"
383
608
  },
384
- "operator": {
385
- "color": "#60a5fa"
609
+ operator: {
610
+ color: "#60a5fa"
386
611
  },
387
- "function": {
388
- "color": "#60a5fa"
612
+ function: {
613
+ color: "#60a5fa"
389
614
  },
390
- "url": {
391
- "color": "#60a5fa"
615
+ url: {
616
+ color: "#60a5fa"
392
617
  },
393
618
  "attr-value > .token.punctuation.attr-equals": {
394
- "color": "#e2e8f0"
619
+ color: "#e2e8f0"
395
620
  },
396
621
  "special-attr > .token.attr-value > .token.value.css": {
397
- "color": "#e2e8f0"
622
+ color: "#e2e8f0"
398
623
  },
399
624
  ".language-css .token.selector": {
400
- "color": "#3b82f6"
625
+ color: "#3b82f6"
401
626
  },
402
627
  ".language-css .token.property": {
403
- "color": "#e2e8f0"
628
+ color: "#e2e8f0"
404
629
  },
405
630
  ".language-css .token.function": {
406
- "color": "#60a5fa"
631
+ color: "#60a5fa"
407
632
  },
408
633
  ".language-css .token.url > .token.function": {
409
- "color": "#60a5fa"
634
+ color: "#60a5fa"
410
635
  },
411
636
  ".language-css .token.url > .token.string.url": {
412
- "color": "#10b981"
637
+ color: "#10b981"
413
638
  },
414
639
  ".language-css .token.important": {
415
- "color": "#f472b6"
640
+ color: "#f472b6"
416
641
  },
417
642
  ".language-css .token.atrule .token.rule": {
418
- "color": "#f472b6"
643
+ color: "#f472b6"
419
644
  },
420
645
  ".language-javascript .token.operator": {
421
- "color": "#f472b6"
646
+ color: "#f472b6"
422
647
  },
423
648
  ".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation": {
424
- "color": "#ef4444"
649
+ color: "#ef4444"
425
650
  },
426
651
  ".language-json .token.operator": {
427
- "color": "#e2e8f0"
652
+ color: "#e2e8f0"
428
653
  },
429
654
  ".language-json .token.null.keyword": {
430
- "color": "#3b82f6"
655
+ color: "#3b82f6"
431
656
  },
432
657
  ".language-markdown .token.url": {
433
- "color": "#e2e8f0"
658
+ color: "#e2e8f0"
434
659
  },
435
660
  ".language-markdown .token.url > .token.operator": {
436
- "color": "#e2e8f0"
661
+ color: "#e2e8f0"
437
662
  },
438
663
  ".language-markdown .token.url-reference.url > .token.string": {
439
- "color": "#e2e8f0"
664
+ color: "#e2e8f0"
440
665
  },
441
666
  ".language-markdown .token.url > .token.content": {
442
- "color": "#60a5fa"
667
+ color: "#60a5fa"
443
668
  },
444
669
  ".language-markdown .token.url > .token.url": {
445
- "color": "#60a5fa"
670
+ color: "#60a5fa"
446
671
  },
447
672
  ".language-markdown .token.url-reference.url": {
448
- "color": "#60a5fa"
673
+ color: "#60a5fa"
449
674
  },
450
675
  ".language-markdown .token.blockquote.punctuation": {
451
- "color": "#64748b",
452
- "fontStyle": "italic"
676
+ color: "#64748b",
677
+ fontStyle: "italic"
453
678
  },
454
679
  ".language-markdown .token.hr.punctuation": {
455
- "color": "#64748b",
456
- "fontStyle": "italic"
680
+ color: "#64748b",
681
+ fontStyle: "italic"
457
682
  },
458
683
  ".language-markdown .token.code-snippet": {
459
- "color": "#10b981"
684
+ color: "#10b981"
460
685
  },
461
686
  ".language-markdown .token.bold .token.content": {
462
- "color": "#f59e0b"
687
+ color: "#f59e0b"
463
688
  },
464
689
  ".language-markdown .token.italic .token.content": {
465
- "color": "#f472b6"
690
+ color: "#f472b6"
466
691
  },
467
692
  ".language-markdown .token.strike .token.content": {
468
- "color": "#3b82f6"
693
+ color: "#3b82f6"
469
694
  },
470
695
  ".language-markdown .token.strike .token.punctuation": {
471
- "color": "#3b82f6"
696
+ color: "#3b82f6"
472
697
  },
473
698
  ".language-markdown .token.list.punctuation": {
474
- "color": "#3b82f6"
699
+ color: "#3b82f6"
475
700
  },
476
701
  ".language-markdown .token.title.important > .token.punctuation": {
477
- "color": "#3b82f6"
702
+ color: "#3b82f6"
478
703
  },
479
- "bold": {
480
- "fontWeight": "bold"
704
+ bold: {
705
+ fontWeight: "bold"
481
706
  },
482
- "italic": {
483
- "fontStyle": "italic"
707
+ italic: {
708
+ fontStyle: "italic"
484
709
  },
485
- "namespace": {
486
- "Opacity": "0.8"
710
+ namespace: {
711
+ Opacity: "0.8"
487
712
  },
488
713
  "token.tab:not(:empty):before": {
489
- "color": "#64748b",
490
- "textShadow": "none"
714
+ color: "#64748b",
715
+ textShadow: "none"
491
716
  },
492
717
  "token.cr:before": {
493
- "color": "#64748b",
494
- "textShadow": "none"
718
+ color: "#64748b",
719
+ textShadow: "none"
495
720
  },
496
721
  "token.lf:before": {
497
- "color": "#64748b",
498
- "textShadow": "none"
722
+ color: "#64748b",
723
+ textShadow: "none"
499
724
  },
500
725
  "token.space:before": {
501
- "color": "#64748b",
502
- "textShadow": "none"
726
+ color: "#64748b",
727
+ textShadow: "none"
503
728
  },
504
729
  "div.code-toolbar > .toolbar.toolbar > .toolbar-item": {
505
- "marginRight": "0.4em"
730
+ marginRight: "0.4em"
506
731
  },
507
732
  "div.code-toolbar > .toolbar.toolbar > .toolbar-item > button": {
508
- "background": "#1e293b",
509
- "color": "#94a3b8",
510
- "padding": "0.1em 0.4em",
511
- "borderRadius": "0.3em"
733
+ background: "#1e293b",
734
+ color: "#94a3b8",
735
+ padding: "0.1em 0.4em",
736
+ borderRadius: "0.3em"
512
737
  },
513
738
  "div.code-toolbar > .toolbar.toolbar > .toolbar-item > a": {
514
- "background": "#1e293b",
515
- "color": "#94a3b8",
516
- "padding": "0.1em 0.4em",
517
- "borderRadius": "0.3em"
739
+ background: "#1e293b",
740
+ color: "#94a3b8",
741
+ padding: "0.1em 0.4em",
742
+ borderRadius: "0.3em"
518
743
  },
519
744
  "div.code-toolbar > .toolbar.toolbar > .toolbar-item > span": {
520
- "background": "#1e293b",
521
- "color": "#94a3b8",
522
- "padding": "0.1em 0.4em",
523
- "borderRadius": "0.3em"
745
+ background: "#1e293b",
746
+ color: "#94a3b8",
747
+ padding: "0.1em 0.4em",
748
+ borderRadius: "0.3em"
524
749
  },
525
750
  "div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover": {
526
- "background": "#3b82f6",
527
- "color": "#ffffff"
751
+ background: "#3b82f6",
752
+ color: "#ffffff"
528
753
  },
529
754
  "div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus": {
530
- "background": "#3b82f6",
531
- "color": "#ffffff"
755
+ background: "#3b82f6",
756
+ color: "#ffffff"
532
757
  },
533
758
  "div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover": {
534
- "background": "#3b82f6",
535
- "color": "#ffffff"
759
+ background: "#3b82f6",
760
+ color: "#ffffff"
536
761
  },
537
762
  "div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus": {
538
- "background": "#3b82f6",
539
- "color": "#ffffff"
763
+ background: "#3b82f6",
764
+ color: "#ffffff"
540
765
  },
541
766
  "div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover": {
542
- "background": "#3b82f6",
543
- "color": "#ffffff"
767
+ background: "#3b82f6",
768
+ color: "#ffffff"
544
769
  },
545
770
  "div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus": {
546
- "background": "#3b82f6",
547
- "color": "#ffffff"
771
+ background: "#3b82f6",
772
+ color: "#ffffff"
548
773
  },
549
774
  ".line-highlight.line-highlight": {
550
- "background": "rgba(59, 130, 246, 0.08)"
775
+ background: "rgba(59, 130, 246, 0.08)"
551
776
  },
552
777
  ".line-highlight.line-highlight:before": {
553
- "background": "#1e293b",
554
- "color": "#e2e8f0",
555
- "padding": "0.1em 0.6em",
556
- "borderRadius": "0.3em",
557
- "boxShadow": "0 2px 0 0 rgba(0, 0, 0, 0.2)"
778
+ background: "#1e293b",
779
+ color: "#e2e8f0",
780
+ padding: "0.1em 0.6em",
781
+ borderRadius: "0.3em",
782
+ boxShadow: "0 2px 0 0 rgba(0, 0, 0, 0.2)"
558
783
  },
559
784
  ".line-highlight.line-highlight[data-end]:after": {
560
- "background": "#1e293b",
561
- "color": "#e2e8f0",
562
- "padding": "0.1em 0.6em",
563
- "borderRadius": "0.3em",
564
- "boxShadow": "0 2px 0 0 rgba(0, 0, 0, 0.2)"
785
+ background: "#1e293b",
786
+ color: "#e2e8f0",
787
+ padding: "0.1em 0.6em",
788
+ borderRadius: "0.3em",
789
+ boxShadow: "0 2px 0 0 rgba(0, 0, 0, 0.2)"
565
790
  },
566
791
  "pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before": {
567
- "backgroundColor": "rgba(59, 130, 246, 0.08)"
792
+ backgroundColor: "rgba(59, 130, 246, 0.08)"
568
793
  },
569
794
  ".line-numbers.line-numbers .line-numbers-rows": {
570
- "borderRightColor": "#1e293b"
795
+ borderRightColor: "#1e293b"
571
796
  },
572
797
  ".command-line .command-line-prompt": {
573
- "borderRightColor": "#1e293b"
798
+ borderRightColor: "#1e293b"
574
799
  },
575
800
  ".line-numbers .line-numbers-rows > span:before": {
576
- "color": "#64748b"
801
+ color: "#64748b"
577
802
  },
578
803
  ".command-line .command-line-prompt > span:before": {
579
- "color": "#64748b"
804
+ color: "#64748b"
580
805
  },
581
806
  ".rainbow-braces .token.token.punctuation.brace-level-1": {
582
- "color": "#3b82f6"
807
+ color: "#3b82f6"
583
808
  },
584
809
  ".rainbow-braces .token.token.punctuation.brace-level-5": {
585
- "color": "#3b82f6"
810
+ color: "#3b82f6"
586
811
  },
587
812
  ".rainbow-braces .token.token.punctuation.brace-level-9": {
588
- "color": "#3b82f6"
813
+ color: "#3b82f6"
589
814
  },
590
815
  ".rainbow-braces .token.token.punctuation.brace-level-2": {
591
- "color": "#10b981"
816
+ color: "#10b981"
592
817
  },
593
818
  ".rainbow-braces .token.token.punctuation.brace-level-6": {
594
- "color": "#10b981"
819
+ color: "#10b981"
595
820
  },
596
821
  ".rainbow-braces .token.token.punctuation.brace-level-10": {
597
- "color": "#10b981"
822
+ color: "#10b981"
598
823
  },
599
824
  ".rainbow-braces .token.token.punctuation.brace-level-3": {
600
- "color": "#60a5fa"
825
+ color: "#60a5fa"
601
826
  },
602
827
  ".rainbow-braces .token.token.punctuation.brace-level-7": {
603
- "color": "#60a5fa"
828
+ color: "#60a5fa"
604
829
  },
605
830
  ".rainbow-braces .token.token.punctuation.brace-level-11": {
606
- "color": "#60a5fa"
831
+ color: "#60a5fa"
607
832
  },
608
833
  ".rainbow-braces .token.token.punctuation.brace-level-4": {
609
- "color": "#f472b6"
834
+ color: "#f472b6"
610
835
  },
611
836
  ".rainbow-braces .token.token.punctuation.brace-level-8": {
612
- "color": "#f472b6"
837
+ color: "#f472b6"
613
838
  },
614
839
  ".rainbow-braces .token.token.punctuation.brace-level-12": {
615
- "color": "#f472b6"
840
+ color: "#f472b6"
616
841
  },
617
842
  "pre.diff-highlight > code .token.token.deleted:not(.prefix)": {
618
- "backgroundColor": "rgba(239, 68, 68, 0.15)"
843
+ backgroundColor: "rgba(239, 68, 68, 0.15)"
619
844
  },
620
845
  "pre > code.diff-highlight .token.token.deleted:not(.prefix)": {
621
- "backgroundColor": "rgba(239, 68, 68, 0.15)"
846
+ backgroundColor: "rgba(239, 68, 68, 0.15)"
622
847
  },
623
848
  "pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection": {
624
- "backgroundColor": "rgba(239, 68, 68, 0.25)"
849
+ backgroundColor: "rgba(239, 68, 68, 0.25)"
625
850
  },
626
851
  "pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection": {
627
- "backgroundColor": "rgba(239, 68, 68, 0.25)"
852
+ backgroundColor: "rgba(239, 68, 68, 0.25)"
628
853
  },
629
854
  "pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection": {
630
- "backgroundColor": "rgba(239, 68, 68, 0.25)"
855
+ backgroundColor: "rgba(239, 68, 68, 0.25)"
631
856
  },
632
857
  "pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection": {
633
- "backgroundColor": "rgba(239, 68, 68, 0.25)"
858
+ backgroundColor: "rgba(239, 68, 68, 0.25)"
634
859
  },
635
860
  "pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection": {
636
- "backgroundColor": "rgba(239, 68, 68, 0.25)"
861
+ backgroundColor: "rgba(239, 68, 68, 0.25)"
637
862
  },
638
863
  "pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection": {
639
- "backgroundColor": "rgba(239, 68, 68, 0.25)"
864
+ backgroundColor: "rgba(239, 68, 68, 0.25)"
640
865
  },
641
866
  "pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection": {
642
- "backgroundColor": "rgba(239, 68, 68, 0.25)"
867
+ backgroundColor: "rgba(239, 68, 68, 0.25)"
643
868
  },
644
869
  "pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection": {
645
- "backgroundColor": "rgba(239, 68, 68, 0.25)"
870
+ backgroundColor: "rgba(239, 68, 68, 0.25)"
646
871
  },
647
872
  "pre.diff-highlight > code .token.token.inserted:not(.prefix)": {
648
- "backgroundColor": "rgba(16, 185, 129, 0.15)"
873
+ backgroundColor: "rgba(16, 185, 129, 0.15)"
649
874
  },
650
875
  "pre > code.diff-highlight .token.token.inserted:not(.prefix)": {
651
- "backgroundColor": "rgba(16, 185, 129, 0.15)"
876
+ backgroundColor: "rgba(16, 185, 129, 0.15)"
652
877
  },
653
878
  "pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection": {
654
- "backgroundColor": "rgba(16, 185, 129, 0.25)"
879
+ backgroundColor: "rgba(16, 185, 129, 0.25)"
655
880
  },
656
881
  "pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection": {
657
- "backgroundColor": "rgba(16, 185, 129, 0.25)"
882
+ backgroundColor: "rgba(16, 185, 129, 0.25)"
658
883
  },
659
884
  "pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection": {
660
- "backgroundColor": "rgba(16, 185, 129, 0.25)"
885
+ backgroundColor: "rgba(16, 185, 129, 0.25)"
661
886
  },
662
887
  "pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection": {
663
- "backgroundColor": "rgba(16, 185, 129, 0.25)"
888
+ backgroundColor: "rgba(16, 185, 129, 0.25)"
664
889
  },
665
890
  "pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection": {
666
- "backgroundColor": "rgba(16, 185, 129, 0.25)"
891
+ backgroundColor: "rgba(16, 185, 129, 0.25)"
667
892
  },
668
893
  "pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection": {
669
- "backgroundColor": "rgba(16, 185, 129, 0.25)"
894
+ backgroundColor: "rgba(16, 185, 129, 0.25)"
670
895
  },
671
896
  "pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection": {
672
- "backgroundColor": "rgba(16, 185, 129, 0.25)"
897
+ backgroundColor: "rgba(16, 185, 129, 0.25)"
673
898
  },
674
899
  "pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection": {
675
- "backgroundColor": "rgba(16, 185, 129, 0.25)"
900
+ backgroundColor: "rgba(16, 185, 129, 0.25)"
676
901
  },
677
902
  ".prism-previewer.prism-previewer:before": {
678
- "borderColor": "#11111f"
903
+ borderColor: "#11111f"
679
904
  },
680
905
  ".prism-previewer-gradient.prism-previewer-gradient div": {
681
- "borderColor": "#11111f",
682
- "borderRadius": "0.3em"
906
+ borderColor: "#11111f",
907
+ borderRadius: "0.3em"
683
908
  },
684
909
  ".prism-previewer-color.prism-previewer-color:before": {
685
- "borderRadius": "0.3em"
910
+ borderRadius: "0.3em"
686
911
  },
687
912
  ".prism-previewer-easing.prism-previewer-easing:before": {
688
- "borderRadius": "0.3em"
913
+ borderRadius: "0.3em"
689
914
  },
690
915
  ".prism-previewer.prism-previewer:after": {
691
- "borderTopColor": "#11111f"
916
+ borderTopColor: "#11111f"
692
917
  },
693
918
  ".prism-previewer-flipped.prism-previewer-flipped.after": {
694
- "borderBottomColor": "#11111f"
919
+ borderBottomColor: "#11111f"
695
920
  },
696
921
  ".prism-previewer-angle.prism-previewer-angle:before": {
697
- "background": "#1e293b"
922
+ background: "#1e293b"
698
923
  },
699
924
  ".prism-previewer-time.prism-previewer-time:before": {
700
- "background": "#1e293b"
925
+ background: "#1e293b"
701
926
  },
702
927
  ".prism-previewer-easing.prism-previewer-easing": {
703
- "background": "#1e293b"
928
+ background: "#1e293b"
704
929
  },
705
930
  ".prism-previewer-angle.prism-previewer-angle circle": {
706
- "stroke": "#e2e8f0",
707
- "strokeOpacity": "1"
931
+ stroke: "#e2e8f0",
932
+ strokeOpacity: "1"
708
933
  },
709
934
  ".prism-previewer-time.prism-previewer-time circle": {
710
- "stroke": "#e2e8f0",
711
- "strokeOpacity": "1"
935
+ stroke: "#e2e8f0",
936
+ strokeOpacity: "1"
712
937
  },
713
938
  ".prism-previewer-easing.prism-previewer-easing circle": {
714
- "stroke": "#e2e8f0",
715
- "fill": "transparent"
939
+ stroke: "#e2e8f0",
940
+ fill: "transparent"
716
941
  },
717
942
  ".prism-previewer-easing.prism-previewer-easing path": {
718
- "stroke": "#e2e8f0"
943
+ stroke: "#e2e8f0"
719
944
  },
720
945
  ".prism-previewer-easing.prism-previewer-easing line": {
721
- "stroke": "#e2e8f0"
946
+ stroke: "#e2e8f0"
722
947
  }
723
948
  };
724
949
  const light = {
725
950
  'code[class*="language-"]': {
726
- "background": "#fff",
727
- "color": "#1e293b",
728
- "textShadow": "none",
729
- "fontFamily": '"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',
730
- "direction": "ltr",
731
- "textAlign": "left",
732
- "whiteSpace": "pre",
733
- "wordSpacing": "normal",
734
- "wordBreak": "normal",
735
- "lineHeight": "1.5",
736
- "MozTabSize": "2",
737
- "OTabSize": "2",
738
- "tabSize": "2",
739
- "WebkitHyphens": "none",
740
- "MozHyphens": "none",
741
- "msHyphens": "none",
742
- "hyphens": "none"
951
+ background: "#fff",
952
+ color: "#1e293b",
953
+ textShadow: "none",
954
+ fontFamily: '"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',
955
+ direction: "ltr",
956
+ textAlign: "left",
957
+ whiteSpace: "pre",
958
+ wordSpacing: "normal",
959
+ wordBreak: "normal",
960
+ lineHeight: "1.5",
961
+ MozTabSize: "2",
962
+ OTabSize: "2",
963
+ tabSize: "2",
964
+ WebkitHyphens: "none",
965
+ MozHyphens: "none",
966
+ msHyphens: "none",
967
+ hyphens: "none"
743
968
  },
744
969
  'pre[class*="language-"]': {
745
- "background": "#fff",
746
- "color": "#1e293b",
747
- "textShadow": "none",
748
- "fontFamily": '"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',
749
- "direction": "ltr",
750
- "textAlign": "left",
751
- "whiteSpace": "pre",
752
- "wordSpacing": "normal",
753
- "wordBreak": "normal",
754
- "lineHeight": "1.5",
755
- "MozTabSize": "2",
756
- "OTabSize": "2",
757
- "tabSize": "2",
758
- "WebkitHyphens": "none",
759
- "MozHyphens": "none",
760
- "msHyphens": "none",
761
- "hyphens": "none",
762
- "padding": "1em",
763
- "margin": "0.5em 0",
764
- "overflow": "auto",
765
- "borderRadius": "0.3em",
766
- "border": "1px solid #e2e8f0"
970
+ background: "#fff",
971
+ color: "#1e293b",
972
+ textShadow: "none",
973
+ fontFamily: '"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',
974
+ direction: "ltr",
975
+ textAlign: "left",
976
+ whiteSpace: "pre",
977
+ wordSpacing: "normal",
978
+ wordBreak: "normal",
979
+ lineHeight: "1.5",
980
+ MozTabSize: "2",
981
+ OTabSize: "2",
982
+ tabSize: "2",
983
+ WebkitHyphens: "none",
984
+ MozHyphens: "none",
985
+ msHyphens: "none",
986
+ hyphens: "none",
987
+ padding: "1em",
988
+ margin: "0.5em 0",
989
+ overflow: "auto",
990
+ borderRadius: "0.3em",
991
+ border: "1px solid #e2e8f0"
767
992
  },
768
993
  'code[class*="language-"]::-moz-selection': {
769
- "background": "#e2e8f0",
770
- "color": "inherit",
771
- "textShadow": "none"
994
+ background: "#e2e8f0",
995
+ color: "inherit",
996
+ textShadow: "none"
772
997
  },
773
998
  'code[class*="language-"] *::-moz-selection': {
774
- "background": "#e2e8f0",
775
- "color": "inherit",
776
- "textShadow": "none"
999
+ background: "#e2e8f0",
1000
+ color: "inherit",
1001
+ textShadow: "none"
777
1002
  },
778
1003
  'pre[class*="language-"] *::-moz-selection': {
779
- "background": "#e2e8f0",
780
- "color": "inherit",
781
- "textShadow": "none"
1004
+ background: "#e2e8f0",
1005
+ color: "inherit",
1006
+ textShadow: "none"
782
1007
  },
783
1008
  'code[class*="language-"]::selection': {
784
- "background": "#e2e8f0",
785
- "color": "inherit",
786
- "textShadow": "none"
1009
+ background: "#e2e8f0",
1010
+ color: "inherit",
1011
+ textShadow: "none"
787
1012
  },
788
1013
  'code[class*="language-"] *::selection': {
789
- "background": "#e2e8f0",
790
- "color": "inherit",
791
- "textShadow": "none"
1014
+ background: "#e2e8f0",
1015
+ color: "inherit",
1016
+ textShadow: "none"
792
1017
  },
793
1018
  'pre[class*="language-"] *::selection': {
794
- "background": "#e2e8f0",
795
- "color": "inherit",
796
- "textShadow": "none"
1019
+ background: "#e2e8f0",
1020
+ color: "inherit",
1021
+ textShadow: "none"
797
1022
  },
798
1023
  ':not(pre) > code[class*="language-"]': {
799
- "padding": "0.2em 0.3em",
800
- "borderRadius": "0.3em",
801
- "whiteSpace": "normal",
802
- "background": "#f1f5f9"
1024
+ padding: "0.2em 0.3em",
1025
+ borderRadius: "0.3em",
1026
+ whiteSpace: "normal",
1027
+ background: "#f1f5f9"
803
1028
  },
804
- "comment": {
805
- "color": "#64748b",
806
- "fontStyle": "italic"
1029
+ comment: {
1030
+ color: "#64748b",
1031
+ fontStyle: "italic"
807
1032
  },
808
- "prolog": {
809
- "color": "#64748b"
1033
+ prolog: {
1034
+ color: "#64748b"
810
1035
  },
811
- "cdata": {
812
- "color": "#64748b"
1036
+ cdata: {
1037
+ color: "#64748b"
813
1038
  },
814
- "doctype": {
815
- "color": "#1e293b"
1039
+ doctype: {
1040
+ color: "#1e293b"
816
1041
  },
817
- "punctuation": {
818
- "color": "#64748b"
1042
+ punctuation: {
1043
+ color: "#64748b"
819
1044
  },
820
- "entity": {
821
- "color": "#3b82f6",
822
- "cursor": "help"
1045
+ entity: {
1046
+ color: "#3b82f6",
1047
+ cursor: "help"
823
1048
  },
824
1049
  "attr-name": {
825
- "color": "#ea580c"
1050
+ color: "#ea580c"
826
1051
  },
827
1052
  "class-name": {
828
- "color": "#ea580c"
1053
+ color: "#ea580c"
829
1054
  },
830
- "boolean": {
831
- "color": "#3b82f6"
1055
+ boolean: {
1056
+ color: "#3b82f6"
832
1057
  },
833
- "constant": {
834
- "color": "#3b82f6"
1058
+ constant: {
1059
+ color: "#3b82f6"
835
1060
  },
836
- "number": {
837
- "color": "#3b82f6"
1061
+ number: {
1062
+ color: "#3b82f6"
838
1063
  },
839
- "atrule": {
840
- "color": "#ea580c"
1064
+ atrule: {
1065
+ color: "#ea580c"
841
1066
  },
842
- "keyword": {
843
- "color": "#9333ea"
1067
+ keyword: {
1068
+ color: "#9333ea"
844
1069
  },
845
- "property": {
846
- "color": "#3b82f6"
1070
+ property: {
1071
+ color: "#3b82f6"
847
1072
  },
848
- "tag": {
849
- "color": "#3b82f6"
1073
+ tag: {
1074
+ color: "#3b82f6"
850
1075
  },
851
- "symbol": {
852
- "color": "#3b82f6"
1076
+ symbol: {
1077
+ color: "#3b82f6"
853
1078
  },
854
- "deleted": {
855
- "color": "#dc2626"
1079
+ deleted: {
1080
+ color: "#dc2626"
856
1081
  },
857
- "important": {
858
- "color": "#9333ea"
1082
+ important: {
1083
+ color: "#9333ea"
859
1084
  },
860
- "selector": {
861
- "color": "#16a34a"
1085
+ selector: {
1086
+ color: "#16a34a"
862
1087
  },
863
- "string": {
864
- "color": "#16a34a"
1088
+ string: {
1089
+ color: "#16a34a"
865
1090
  },
866
- "char": {
867
- "color": "#16a34a"
1091
+ char: {
1092
+ color: "#16a34a"
868
1093
  },
869
- "builtin": {
870
- "color": "#16a34a"
1094
+ builtin: {
1095
+ color: "#16a34a"
871
1096
  },
872
- "inserted": {
873
- "color": "#16a34a"
1097
+ inserted: {
1098
+ color: "#16a34a"
874
1099
  },
875
- "regex": {
876
- "color": "#16a34a"
1100
+ regex: {
1101
+ color: "#16a34a"
877
1102
  },
878
1103
  "attr-value": {
879
- "color": "#16a34a"
1104
+ color: "#16a34a"
880
1105
  },
881
1106
  "attr-value > .token.punctuation": {
882
- "color": "#16a34a"
1107
+ color: "#16a34a"
883
1108
  },
884
- "variable": {
885
- "color": "#3b82f6"
1109
+ variable: {
1110
+ color: "#3b82f6"
886
1111
  },
887
- "operator": {
888
- "color": "#3b82f6"
1112
+ operator: {
1113
+ color: "#3b82f6"
889
1114
  },
890
- "function": {
891
- "color": "#3b82f6"
1115
+ function: {
1116
+ color: "#3b82f6"
892
1117
  },
893
- "url": {
894
- "color": "#3b82f6"
1118
+ url: {
1119
+ color: "#3b82f6"
895
1120
  },
896
1121
  "attr-value > .token.punctuation.attr-equals": {
897
- "color": "#64748b"
1122
+ color: "#64748b"
898
1123
  },
899
1124
  "special-attr > .token.attr-value > .token.value.css": {
900
- "color": "#1e293b"
1125
+ color: "#1e293b"
901
1126
  },
902
1127
  ".language-css .token.selector": {
903
- "color": "#3b82f6"
1128
+ color: "#3b82f6"
904
1129
  },
905
1130
  ".language-css .token.property": {
906
- "color": "#1e293b"
1131
+ color: "#1e293b"
907
1132
  },
908
1133
  ".language-css .token.function": {
909
- "color": "#3b82f6"
1134
+ color: "#3b82f6"
910
1135
  },
911
1136
  ".language-css .token.url > .token.function": {
912
- "color": "#3b82f6"
1137
+ color: "#3b82f6"
913
1138
  },
914
1139
  ".language-css .token.url > .token.string.url": {
915
- "color": "#16a34a"
1140
+ color: "#16a34a"
916
1141
  },
917
1142
  ".language-css .token.important": {
918
- "color": "#9333ea"
1143
+ color: "#9333ea"
919
1144
  },
920
1145
  ".language-css .token.atrule .token.rule": {
921
- "color": "#9333ea"
1146
+ color: "#9333ea"
922
1147
  },
923
1148
  ".language-javascript .token.operator": {
924
- "color": "#9333ea"
1149
+ color: "#9333ea"
925
1150
  },
926
1151
  ".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation": {
927
- "color": "#dc2626"
1152
+ color: "#dc2626"
928
1153
  },
929
1154
  ".language-json .token.operator": {
930
- "color": "#1e293b"
1155
+ color: "#1e293b"
931
1156
  },
932
1157
  ".language-json .token.null.keyword": {
933
- "color": "#3b82f6"
1158
+ color: "#3b82f6"
934
1159
  },
935
1160
  ".language-markdown .token.url": {
936
- "color": "#1e293b"
1161
+ color: "#1e293b"
937
1162
  },
938
1163
  ".language-markdown .token.url > .token.operator": {
939
- "color": "#1e293b"
1164
+ color: "#1e293b"
940
1165
  },
941
1166
  ".language-markdown .token.url-reference.url > .token.string": {
942
- "color": "#1e293b"
1167
+ color: "#1e293b"
943
1168
  },
944
1169
  ".language-markdown .token.url > .token.content": {
945
- "color": "#3b82f6"
1170
+ color: "#3b82f6"
946
1171
  },
947
1172
  ".language-markdown .token.url > .token.url": {
948
- "color": "#3b82f6"
1173
+ color: "#3b82f6"
949
1174
  },
950
1175
  ".language-markdown .token.url-reference.url": {
951
- "color": "#3b82f6"
1176
+ color: "#3b82f6"
952
1177
  },
953
1178
  ".language-markdown .token.blockquote.punctuation": {
954
- "color": "#64748b",
955
- "fontStyle": "italic"
1179
+ color: "#64748b",
1180
+ fontStyle: "italic"
956
1181
  },
957
1182
  ".language-markdown .token.hr.punctuation": {
958
- "color": "#64748b",
959
- "fontStyle": "italic"
1183
+ color: "#64748b",
1184
+ fontStyle: "italic"
960
1185
  },
961
1186
  ".language-markdown .token.code-snippet": {
962
- "color": "#16a34a"
1187
+ color: "#16a34a"
963
1188
  },
964
1189
  ".language-markdown .token.bold .token.content": {
965
- "color": "#ea580c"
1190
+ color: "#ea580c"
966
1191
  },
967
1192
  ".language-markdown .token.italic .token.content": {
968
- "color": "#9333ea"
1193
+ color: "#9333ea"
969
1194
  },
970
1195
  ".language-markdown .token.strike .token.content": {
971
- "color": "#3b82f6"
1196
+ color: "#3b82f6"
972
1197
  },
973
1198
  ".language-markdown .token.strike .token.punctuation": {
974
- "color": "#3b82f6"
1199
+ color: "#3b82f6"
975
1200
  },
976
1201
  ".language-markdown .token.list.punctuation": {
977
- "color": "#3b82f6"
1202
+ color: "#3b82f6"
978
1203
  },
979
1204
  ".language-markdown .token.title.important > .token.punctuation": {
980
- "color": "#3b82f6"
1205
+ color: "#3b82f6"
981
1206
  },
982
- "bold": {
983
- "fontWeight": "bold"
1207
+ bold: {
1208
+ fontWeight: "bold"
984
1209
  },
985
- "italic": {
986
- "fontStyle": "italic"
1210
+ italic: {
1211
+ fontStyle: "italic"
987
1212
  },
988
- "namespace": {
989
- "Opacity": "0.8"
1213
+ namespace: {
1214
+ Opacity: "0.8"
990
1215
  },
991
1216
  "token.tab:not(:empty):before": {
992
- "color": "#94a3b8"
1217
+ color: "#94a3b8"
993
1218
  },
994
1219
  "token.cr:before": {
995
- "color": "#94a3b8"
1220
+ color: "#94a3b8"
996
1221
  },
997
1222
  "token.lf:before": {
998
- "color": "#94a3b8"
1223
+ color: "#94a3b8"
999
1224
  },
1000
1225
  "token.space:before": {
1001
- "color": "#94a3b8"
1226
+ color: "#94a3b8"
1002
1227
  },
1003
1228
  "div.code-toolbar > .toolbar.toolbar > .toolbar-item": {
1004
- "marginRight": "0.4em"
1229
+ marginRight: "0.4em"
1005
1230
  },
1006
1231
  "div.code-toolbar > .toolbar.toolbar > .toolbar-item > button": {
1007
- "background": "#f1f5f9",
1008
- "color": "#475569",
1009
- "padding": "0.1em 0.4em",
1010
- "borderRadius": "0.3em"
1232
+ background: "#f1f5f9",
1233
+ color: "#475569",
1234
+ padding: "0.1em 0.4em",
1235
+ borderRadius: "0.3em"
1011
1236
  },
1012
1237
  "div.code-toolbar > .toolbar.toolbar > .toolbar-item > a": {
1013
- "background": "#f1f5f9",
1014
- "color": "#475569",
1015
- "padding": "0.1em 0.4em",
1016
- "borderRadius": "0.3em"
1238
+ background: "#f1f5f9",
1239
+ color: "#475569",
1240
+ padding: "0.1em 0.4em",
1241
+ borderRadius: "0.3em"
1017
1242
  },
1018
1243
  "div.code-toolbar > .toolbar.toolbar > .toolbar-item > span": {
1019
- "background": "#f1f5f9",
1020
- "color": "#475569",
1021
- "padding": "0.1em 0.4em",
1022
- "borderRadius": "0.3em"
1244
+ background: "#f1f5f9",
1245
+ color: "#475569",
1246
+ padding: "0.1em 0.4em",
1247
+ borderRadius: "0.3em"
1023
1248
  },
1024
1249
  "div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover": {
1025
- "background": "#3b82f6",
1026
- "color": "#ffffff"
1250
+ background: "#3b82f6",
1251
+ color: "#ffffff"
1027
1252
  },
1028
1253
  "div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus": {
1029
- "background": "#3b82f6",
1030
- "color": "#ffffff"
1254
+ background: "#3b82f6",
1255
+ color: "#ffffff"
1031
1256
  },
1032
1257
  "div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover": {
1033
- "background": "#3b82f6",
1034
- "color": "#ffffff"
1258
+ background: "#3b82f6",
1259
+ color: "#ffffff"
1035
1260
  },
1036
1261
  "div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus": {
1037
- "background": "#3b82f6",
1038
- "color": "#ffffff"
1262
+ background: "#3b82f6",
1263
+ color: "#ffffff"
1039
1264
  },
1040
1265
  "div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover": {
1041
- "background": "#3b82f6",
1042
- "color": "#ffffff"
1266
+ background: "#3b82f6",
1267
+ color: "#ffffff"
1043
1268
  },
1044
1269
  "div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus": {
1045
- "background": "#3b82f6",
1046
- "color": "#ffffff"
1270
+ background: "#3b82f6",
1271
+ color: "#ffffff"
1047
1272
  },
1048
1273
  ".line-highlight.line-highlight": {
1049
- "background": "rgba(59, 130, 246, 0.08)"
1274
+ background: "rgba(59, 130, 246, 0.08)"
1050
1275
  },
1051
1276
  ".line-highlight.line-highlight:before": {
1052
- "background": "#f1f5f9",
1053
- "color": "#1e293b",
1054
- "padding": "0.1em 0.6em",
1055
- "borderRadius": "0.3em",
1056
- "boxShadow": "0 2px 0 0 rgba(0, 0, 0, 0.1)"
1277
+ background: "#f1f5f9",
1278
+ color: "#1e293b",
1279
+ padding: "0.1em 0.6em",
1280
+ borderRadius: "0.3em",
1281
+ boxShadow: "0 2px 0 0 rgba(0, 0, 0, 0.1)"
1057
1282
  },
1058
1283
  ".line-highlight.line-highlight[data-end]:after": {
1059
- "background": "#f1f5f9",
1060
- "color": "#1e293b",
1061
- "padding": "0.1em 0.6em",
1062
- "borderRadius": "0.3em",
1063
- "boxShadow": "0 2px 0 0 rgba(0, 0, 0, 0.1)"
1284
+ background: "#f1f5f9",
1285
+ color: "#1e293b",
1286
+ padding: "0.1em 0.6em",
1287
+ borderRadius: "0.3em",
1288
+ boxShadow: "0 2px 0 0 rgba(0, 0, 0, 0.1)"
1064
1289
  },
1065
1290
  "pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before": {
1066
- "backgroundColor": "rgba(59, 130, 246, 0.08)"
1291
+ backgroundColor: "rgba(59, 130, 246, 0.08)"
1067
1292
  },
1068
1293
  ".line-numbers.line-numbers .line-numbers-rows": {
1069
- "borderRightColor": "#e2e8f0"
1294
+ borderRightColor: "#e2e8f0"
1070
1295
  },
1071
1296
  ".command-line .command-line-prompt": {
1072
- "borderRightColor": "#e2e8f0"
1297
+ borderRightColor: "#e2e8f0"
1073
1298
  },
1074
1299
  ".line-numbers .line-numbers-rows > span:before": {
1075
- "color": "#94a3b8"
1300
+ color: "#94a3b8"
1076
1301
  },
1077
1302
  ".command-line .command-line-prompt > span:before": {
1078
- "color": "#94a3b8"
1303
+ color: "#94a3b8"
1079
1304
  },
1080
1305
  ".rainbow-braces .token.token.punctuation.brace-level-1": {
1081
- "color": "#3b82f6"
1306
+ color: "#3b82f6"
1082
1307
  },
1083
1308
  ".rainbow-braces .token.token.punctuation.brace-level-5": {
1084
- "color": "#3b82f6"
1309
+ color: "#3b82f6"
1085
1310
  },
1086
1311
  ".rainbow-braces .token.token.punctuation.brace-level-9": {
1087
- "color": "#3b82f6"
1312
+ color: "#3b82f6"
1088
1313
  },
1089
1314
  ".rainbow-braces .token.token.punctuation.brace-level-2": {
1090
- "color": "#16a34a"
1315
+ color: "#16a34a"
1091
1316
  },
1092
1317
  ".rainbow-braces .token.token.punctuation.brace-level-6": {
1093
- "color": "#16a34a"
1318
+ color: "#16a34a"
1094
1319
  },
1095
1320
  ".rainbow-braces .token.token.punctuation.brace-level-10": {
1096
- "color": "#16a34a"
1321
+ color: "#16a34a"
1097
1322
  },
1098
1323
  ".rainbow-braces .token.token.punctuation.brace-level-3": {
1099
- "color": "#ea580c"
1324
+ color: "#ea580c"
1100
1325
  },
1101
1326
  ".rainbow-braces .token.token.punctuation.brace-level-7": {
1102
- "color": "#ea580c"
1327
+ color: "#ea580c"
1103
1328
  },
1104
1329
  ".rainbow-braces .token.token.punctuation.brace-level-11": {
1105
- "color": "#ea580c"
1330
+ color: "#ea580c"
1106
1331
  },
1107
1332
  ".rainbow-braces .token.token.punctuation.brace-level-4": {
1108
- "color": "#9333ea"
1333
+ color: "#9333ea"
1109
1334
  },
1110
1335
  ".rainbow-braces .token.token.punctuation.brace-level-8": {
1111
- "color": "#9333ea"
1336
+ color: "#9333ea"
1112
1337
  },
1113
1338
  ".rainbow-braces .token.token.punctuation.brace-level-12": {
1114
- "color": "#9333ea"
1339
+ color: "#9333ea"
1115
1340
  },
1116
1341
  "pre.diff-highlight > code .token.token.deleted:not(.prefix)": {
1117
- "backgroundColor": "rgba(220, 38, 38, 0.15)"
1342
+ backgroundColor: "rgba(220, 38, 38, 0.15)"
1118
1343
  },
1119
1344
  "pre > code.diff-highlight .token.token.deleted:not(.prefix)": {
1120
- "backgroundColor": "rgba(220, 38, 38, 0.15)"
1345
+ backgroundColor: "rgba(220, 38, 38, 0.15)"
1121
1346
  },
1122
1347
  "pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection": {
1123
- "backgroundColor": "rgba(220, 38, 38, 0.25)"
1348
+ backgroundColor: "rgba(220, 38, 38, 0.25)"
1124
1349
  },
1125
1350
  "pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection": {
1126
- "backgroundColor": "rgba(220, 38, 38, 0.25)"
1351
+ backgroundColor: "rgba(220, 38, 38, 0.25)"
1127
1352
  },
1128
1353
  "pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection": {
1129
- "backgroundColor": "rgba(220, 38, 38, 0.25)"
1354
+ backgroundColor: "rgba(220, 38, 38, 0.25)"
1130
1355
  },
1131
1356
  "pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection": {
1132
- "backgroundColor": "rgba(220, 38, 38, 0.25)"
1357
+ backgroundColor: "rgba(220, 38, 38, 0.25)"
1133
1358
  },
1134
1359
  "pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection": {
1135
- "backgroundColor": "rgba(220, 38, 38, 0.25)"
1360
+ backgroundColor: "rgba(220, 38, 38, 0.25)"
1136
1361
  },
1137
1362
  "pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection": {
1138
- "backgroundColor": "rgba(220, 38, 38, 0.25)"
1363
+ backgroundColor: "rgba(220, 38, 38, 0.25)"
1139
1364
  },
1140
1365
  "pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection": {
1141
- "backgroundColor": "rgba(220, 38, 38, 0.25)"
1366
+ backgroundColor: "rgba(220, 38, 38, 0.25)"
1142
1367
  },
1143
1368
  "pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection": {
1144
- "backgroundColor": "rgba(220, 38, 38, 0.25)"
1369
+ backgroundColor: "rgba(220, 38, 38, 0.25)"
1145
1370
  },
1146
1371
  "pre.diff-highlight > code .token.token.inserted:not(.prefix)": {
1147
- "backgroundColor": "rgba(22, 163, 74, 0.15)"
1372
+ backgroundColor: "rgba(22, 163, 74, 0.15)"
1148
1373
  },
1149
1374
  "pre > code.diff-highlight .token.token.inserted:not(.prefix)": {
1150
- "backgroundColor": "rgba(22, 163, 74, 0.15)"
1375
+ backgroundColor: "rgba(22, 163, 74, 0.15)"
1151
1376
  },
1152
1377
  "pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection": {
1153
- "backgroundColor": "rgba(22, 163, 74, 0.25)"
1378
+ backgroundColor: "rgba(22, 163, 74, 0.25)"
1154
1379
  },
1155
1380
  "pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection": {
1156
- "backgroundColor": "rgba(22, 163, 74, 0.25)"
1381
+ backgroundColor: "rgba(22, 163, 74, 0.25)"
1157
1382
  },
1158
1383
  "pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection": {
1159
- "backgroundColor": "rgba(22, 163, 74, 0.25)"
1384
+ backgroundColor: "rgba(22, 163, 74, 0.25)"
1160
1385
  },
1161
1386
  "pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection": {
1162
- "backgroundColor": "rgba(22, 163, 74, 0.25)"
1387
+ backgroundColor: "rgba(22, 163, 74, 0.25)"
1163
1388
  },
1164
1389
  "pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection": {
1165
- "backgroundColor": "rgba(22, 163, 74, 0.25)"
1390
+ backgroundColor: "rgba(22, 163, 74, 0.25)"
1166
1391
  },
1167
1392
  "pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection": {
1168
- "backgroundColor": "rgba(22, 163, 74, 0.25)"
1393
+ backgroundColor: "rgba(22, 163, 74, 0.25)"
1169
1394
  },
1170
1395
  "pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection": {
1171
- "backgroundColor": "rgba(22, 163, 74, 0.25)"
1396
+ backgroundColor: "rgba(22, 163, 74, 0.25)"
1172
1397
  },
1173
1398
  "pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection": {
1174
- "backgroundColor": "rgba(22, 163, 74, 0.25)"
1399
+ backgroundColor: "rgba(22, 163, 74, 0.25)"
1175
1400
  },
1176
1401
  ".prism-previewer.prism-previewer:before": {
1177
- "borderColor": "#fff"
1402
+ borderColor: "#fff"
1178
1403
  },
1179
1404
  ".prism-previewer-gradient.prism-previewer-gradient div": {
1180
- "borderColor": "#fff",
1181
- "borderRadius": "0.3em"
1405
+ borderColor: "#fff",
1406
+ borderRadius: "0.3em"
1182
1407
  },
1183
1408
  ".prism-previewer-color.prism-previewer-color:before": {
1184
- "borderRadius": "0.3em"
1409
+ borderRadius: "0.3em"
1185
1410
  },
1186
1411
  ".prism-previewer-easing.prism-previewer-easing:before": {
1187
- "borderRadius": "0.3em"
1412
+ borderRadius: "0.3em"
1188
1413
  },
1189
1414
  ".prism-previewer.prism-previewer:after": {
1190
- "borderTopColor": "#fff"
1415
+ borderTopColor: "#fff"
1191
1416
  },
1192
1417
  ".prism-previewer-flipped.prism-previewer-flipped.after": {
1193
- "borderBottomColor": "#fff"
1418
+ borderBottomColor: "#fff"
1194
1419
  },
1195
1420
  ".prism-previewer-angle.prism-previewer-angle:before": {
1196
- "background": "#f1f5f9"
1421
+ background: "#f1f5f9"
1197
1422
  },
1198
1423
  ".prism-previewer-time.prism-previewer-time:before": {
1199
- "background": "#f1f5f9"
1424
+ background: "#f1f5f9"
1200
1425
  },
1201
1426
  ".prism-previewer-easing.prism-previewer-easing": {
1202
- "background": "#f1f5f9"
1427
+ background: "#f1f5f9"
1203
1428
  },
1204
1429
  ".prism-previewer-angle.prism-previewer-angle circle": {
1205
- "stroke": "#1e293b",
1206
- "strokeOpacity": "1"
1430
+ stroke: "#1e293b",
1431
+ strokeOpacity: "1"
1207
1432
  },
1208
1433
  ".prism-previewer-time.prism-previewer-time circle": {
1209
- "stroke": "#1e293b",
1210
- "strokeOpacity": "1"
1434
+ stroke: "#1e293b",
1435
+ strokeOpacity: "1"
1211
1436
  },
1212
1437
  ".prism-previewer-easing.prism-previewer-easing circle": {
1213
- "stroke": "#1e293b",
1214
- "fill": "transparent"
1438
+ stroke: "#1e293b",
1439
+ fill: "transparent"
1215
1440
  },
1216
1441
  ".prism-previewer-easing.prism-previewer-easing path": {
1217
- "stroke": "#1e293b"
1442
+ stroke: "#1e293b"
1218
1443
  },
1219
1444
  ".prism-previewer-easing.prism-previewer-easing line": {
1220
- "stroke": "#1e293b"
1445
+ stroke: "#1e293b"
1221
1446
  }
1222
1447
  };
1223
1448
  const CodeHighlighter = ({
@@ -1229,7 +1454,7 @@ const CodeHighlighter = ({
1229
1454
  toolbarClassName,
1230
1455
  theme = dark
1231
1456
  }) => {
1232
- const match = language == null ? void 0 : language.match(/language-(\w+)/);
1457
+ const match = language?.match(/language-(\w+)/);
1233
1458
  const lang = match ? match[1] : "text";
1234
1459
  const handleCopy = (text) => {
1235
1460
  navigator.clipboard.writeText(text).then(() => {
@@ -1246,21 +1471,14 @@ const CodeHighlighter = ({
1246
1471
  {
1247
1472
  className: cn(copyClassName),
1248
1473
  size: "small",
1249
- variant: "text",
1474
+ variant: "ghost",
1250
1475
  title: "Copy code",
1251
1476
  onClick: () => handleCopy(children),
1252
1477
  children: copyIcon
1253
1478
  }
1254
1479
  )
1255
1480
  ] }),
1256
- /* @__PURE__ */ jsx(
1257
- Prism,
1258
- {
1259
- language: lang,
1260
- style: theme,
1261
- children
1262
- }
1263
- )
1481
+ /* @__PURE__ */ jsx(Prism, { language: lang, style: theme, children })
1264
1482
  ] });
1265
1483
  };
1266
1484
  const TableComponent = ({ children, ...props }) => /* @__PURE__ */ jsx("table", { ...props, children });
@@ -1269,81 +1487,159 @@ const TableDataCell = ({ children, ...props }) => /* @__PURE__ */ jsx("td", { ..
1269
1487
  const Markdown = ({
1270
1488
  children,
1271
1489
  remarkPlugins,
1272
- rehypePlugins = [rehypeKatex]
1273
- }) => {
1274
- const { theme } = useContext(ChatContext);
1275
- return /* @__PURE__ */ jsx(
1276
- ReactMarkdown,
1277
- {
1278
- remarkPlugins,
1279
- rehypePlugins,
1280
- components: {
1281
- code: ({ className, ...props }) => /* @__PURE__ */ jsx(
1282
- CodeHighlighter,
1283
- {
1284
- ...props,
1285
- language: className,
1286
- className: cn(theme.messages.message.markdown.code, className),
1287
- copyClassName: cn(theme.messages.message.markdown.copy),
1288
- toolbarClassName: cn(theme.messages.message.markdown.toolbar)
1289
- }
1290
- ),
1291
- table: (props) => /* @__PURE__ */ jsx(
1292
- TableComponent,
1293
- {
1294
- ...props,
1295
- className: cn(theme.messages.message.markdown.table)
1296
- }
1297
- ),
1298
- th: (props) => /* @__PURE__ */ jsx(
1299
- TableHeaderCell,
1300
- {
1301
- ...props,
1302
- className: cn(theme.messages.message.markdown.th)
1303
- }
1304
- ),
1305
- td: (props) => /* @__PURE__ */ jsx(
1306
- TableDataCell,
1307
- {
1308
- ...props,
1309
- className: cn(theme.messages.message.markdown.td)
1310
- }
1311
- ),
1312
- a: (props) => /* @__PURE__ */ jsx("a", { ...props, className: cn(theme.messages.message.markdown.a) }),
1313
- p: (props) => /* @__PURE__ */ jsx("p", { ...props, className: cn(theme.messages.message.markdown.p) }),
1314
- li: (props) => /* @__PURE__ */ jsx("li", { ...props, className: cn(theme.messages.message.markdown.li) }),
1315
- ul: (props) => /* @__PURE__ */ jsx("ul", { ...props, className: cn(theme.messages.message.markdown.ul) }),
1316
- ol: (props) => /* @__PURE__ */ jsx("ol", { ...props, className: cn(theme.messages.message.markdown.ol) })
1317
- },
1318
- children
1319
- }
1320
- );
1321
- };
1490
+ rehypePlugins = [rehypeKatex],
1491
+ theme
1492
+ }) => /* @__PURE__ */ jsx(
1493
+ ReactMarkdown,
1494
+ {
1495
+ remarkPlugins,
1496
+ rehypePlugins,
1497
+ components: {
1498
+ code: ({ className, ...props }) => /* @__PURE__ */ jsx(
1499
+ CodeHighlighter,
1500
+ {
1501
+ ...props,
1502
+ language: className,
1503
+ className: cn(theme.messages.message.markdown.code, className),
1504
+ copyClassName: cn(theme.messages.message.markdown.copy),
1505
+ toolbarClassName: cn(theme.messages.message.markdown.toolbar)
1506
+ }
1507
+ ),
1508
+ table: (props) => /* @__PURE__ */ jsx(
1509
+ TableComponent,
1510
+ {
1511
+ ...props,
1512
+ className: cn(theme.messages.message.markdown.table)
1513
+ }
1514
+ ),
1515
+ th: (props) => /* @__PURE__ */ jsx(
1516
+ TableHeaderCell,
1517
+ {
1518
+ ...props,
1519
+ className: cn(theme.messages.message.markdown.th)
1520
+ }
1521
+ ),
1522
+ td: (props) => /* @__PURE__ */ jsx(
1523
+ TableDataCell,
1524
+ {
1525
+ ...props,
1526
+ className: cn(theme.messages.message.markdown.td)
1527
+ }
1528
+ ),
1529
+ a: (props) => /* @__PURE__ */ jsx("a", { ...props, className: cn(theme.messages.message.markdown.a) }),
1530
+ hr: (props) => /* @__PURE__ */ jsx("hr", { ...props, className: cn(theme.messages.message.markdown.hr) }),
1531
+ p: (props) => /* @__PURE__ */ jsx("p", { ...props, className: cn(theme.messages.message.markdown.p) }),
1532
+ li: (props) => /* @__PURE__ */ jsx("li", { ...props, className: cn(theme.messages.message.markdown.li) }),
1533
+ ul: (props) => /* @__PURE__ */ jsx("ul", { ...props, className: cn(theme.messages.message.markdown.ul) }),
1534
+ ol: (props) => /* @__PURE__ */ jsx("ol", { ...props, className: cn(theme.messages.message.markdown.ol) })
1535
+ },
1536
+ children
1537
+ }
1538
+ );
1322
1539
  const CVE_REGEX = /(CVE-(19|20)\d{2}-\d{4,7})/gi;
1323
1540
  function remarkCve() {
1324
- return (tree, _file) => {
1325
- findAndReplace(tree, [[
1326
- CVE_REGEX,
1327
- replaceCve
1328
- ]]);
1541
+ return (tree) => {
1542
+ findAndReplace(tree, [[CVE_REGEX, replaceCve]], {
1543
+ ignore: ["link"]
1544
+ });
1329
1545
  };
1330
1546
  function replaceCve(value, id) {
1331
1547
  return [
1332
1548
  {
1333
1549
  type: "link",
1334
1550
  url: `https://cve.mitre.org/cgi-bin/cvename.cgi?name=${id}`,
1335
- children: [
1336
- { children: [{ type: "text", value: value.trim() }] }
1337
- ]
1551
+ children: [{ children: [{ type: "text", value: value.trim() }] }]
1338
1552
  }
1339
1553
  ];
1340
1554
  }
1341
1555
  }
1556
+ const SessionEmpty = ({ children }) => {
1557
+ const { theme } = useContext(ChatContext);
1558
+ return /* @__PURE__ */ jsx("div", { className: cn(theme.empty), children });
1559
+ };
1560
+ const SvgRefresh = (props) => /* @__PURE__ */ React.createElement("svg", { width: 18, height: 18, viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M1.75 8.25098C2.16399 8.25098 2.49998 8.58699 2.5 9.00098C2.5 12.585 5.416 15.501 9 15.501C11.149 15.501 13.1291 14.4262 14.3301 12.6992L12.8701 12.9014C12.4591 12.9484 12.0814 12.6698 12.0244 12.2598C11.9685 11.8498 12.2541 11.4711 12.665 11.4141L15.6094 11.0068L15.6104 11.0078C16.0172 10.951 16.3981 11.2386 16.4551 11.6484L16.8633 14.5928C16.9203 15.0038 16.6327 15.3825 16.2227 15.4395C16.1878 15.4444 16.153 15.4463 16.1191 15.4463C15.7501 15.4463 15.429 15.1738 15.377 14.7988L15.2598 13.9551C13.7628 15.842 11.4739 17.001 9 17.001C4.589 17.001 1 13.412 1 9.00098C1.00002 8.58699 1.33601 8.25098 1.75 8.25098ZM9.00098 1C13.412 1 17.001 4.589 17.001 9C17.001 9.414 16.665 9.75 16.251 9.75C15.837 9.75 15.501 9.414 15.501 9C15.501 5.416 12.585 2.5 9.00098 2.5C6.84502 2.5 4.87188 3.57384 3.67188 5.30078L5.12988 5.09863C5.53788 5.04563 5.91859 5.32923 5.97559 5.74023C6.03148 6.15017 5.7459 6.52895 5.33496 6.58594L2.39062 6.99316C2.35579 6.99812 2.32095 6.99999 2.28711 7C1.91811 7 1.59692 6.72754 1.54492 6.35254L1.13672 3.4082C1.07972 2.9972 1.36734 2.61852 1.77734 2.56152C2.18818 2.50179 2.56607 2.79129 2.62305 3.20215L2.73926 4.04199C4.23526 2.15508 6.52006 1 9 1H9.00098Z", fill: "currentColor" }));
1561
+ const SvgThumbsDown = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 18, height: 18, viewBox: "0 0 18 18", fill: "none", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M11.25 1.25H4.5C3.8775 1.25 3.345 1.625 3.12 2.165L0.855 7.4525C0.7875 7.625 0.75 7.805 0.75 8V9.5C0.75 10.325 1.425 11 2.25 11H6.9825L6.27 14.4275L6.2475 14.6675C6.2475 14.975 6.375 15.26 6.5775 15.4625L7.3725 16.25L12.315 11.3075C12.585 11.0375 12.75 10.6625 12.75 10.25V2.75C12.75 1.925 12.075 1.25 11.25 1.25ZM11.25 10.25L7.995 13.505L9 9.5H2.25V8L4.5 2.75H11.25V10.25ZM14.25 1.25H17.25V10.25H14.25V1.25Z", fill: "currentColor" }));
1562
+ const SvgThumbsUp = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 18, height: 18, viewBox: "0 0 18 18", fill: "none", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M6.75 15.75H13.5C14.1225 15.75 14.655 15.375 14.88 14.835L17.145 9.5475C17.2125 9.375 17.25 9.195 17.25 9V7.5C17.25 6.675 16.575 6 15.75 6H11.0175L11.73 2.5725L11.7525 2.3325C11.7525 2.025 11.625 1.74 11.4225 1.5375L10.6275 0.75L5.685 5.6925C5.415 5.9625 5.25 6.3375 5.25 6.75V14.25C5.25 15.075 5.925 15.75 6.75 15.75ZM6.75 6.75L10.005 3.495L9 7.5H15.75V9L13.5 14.25H6.75V6.75ZM0.75 6.75H3.75V15.75H0.75V6.75Z", fill: "currentColor" }));
1563
+ const MessageActions = ({
1564
+ children,
1565
+ ...props
1566
+ }) => {
1567
+ const { theme } = useContext(ChatContext);
1568
+ const {
1569
+ question,
1570
+ response,
1571
+ copyIcon = /* @__PURE__ */ jsx(SvgCopy, {}),
1572
+ thumbsUpIcon = /* @__PURE__ */ jsx(SvgThumbsUp, {}),
1573
+ thumbsDownIcon = /* @__PURE__ */ jsx(SvgThumbsDown, {}),
1574
+ refreshIcon = /* @__PURE__ */ jsx(SvgRefresh, {}),
1575
+ onCopy,
1576
+ onUpvote,
1577
+ onDownvote,
1578
+ onRefresh
1579
+ } = props;
1580
+ const Comp = children ? Slot : "div";
1581
+ const handleCopy = (text) => {
1582
+ navigator.clipboard.writeText(text).then(() => {
1583
+ console.log("Text copied to clipboard");
1584
+ }).catch((err) => {
1585
+ console.error("Could not copy text: ", err);
1586
+ });
1587
+ };
1588
+ return (copyIcon || thumbsDownIcon || thumbsUpIcon || refreshIcon) && /* @__PURE__ */ jsx(Comp, { className: cn(theme.messages.message.footer.base), children: children || /* @__PURE__ */ jsxs(Fragment, { children: [
1589
+ copyIcon && /* @__PURE__ */ jsx(
1590
+ IconButton,
1591
+ {
1592
+ variant: "ghost",
1593
+ disablePadding: true,
1594
+ title: "Copy question and response",
1595
+ className: cn(theme.messages.message.footer.copy),
1596
+ onClick: onCopy ? onCopy : () => handleCopy(`${question}
1597
+ ${response}`),
1598
+ children: copyIcon
1599
+ }
1600
+ ),
1601
+ thumbsUpIcon && /* @__PURE__ */ jsx(
1602
+ IconButton,
1603
+ {
1604
+ variant: "ghost",
1605
+ disablePadding: true,
1606
+ title: "Upvote",
1607
+ className: cn(theme.messages.message.footer.upvote),
1608
+ onClick: onUpvote,
1609
+ children: thumbsUpIcon
1610
+ }
1611
+ ),
1612
+ thumbsDownIcon && /* @__PURE__ */ jsx(
1613
+ IconButton,
1614
+ {
1615
+ variant: "ghost",
1616
+ disablePadding: true,
1617
+ title: "Downvote",
1618
+ className: cn(theme.messages.message.footer.downvote),
1619
+ onClick: onDownvote,
1620
+ children: thumbsDownIcon
1621
+ }
1622
+ ),
1623
+ refreshIcon && /* @__PURE__ */ jsx(
1624
+ IconButton,
1625
+ {
1626
+ variant: "ghost",
1627
+ disablePadding: true,
1628
+ title: "Refresh",
1629
+ className: cn(theme.messages.message.footer.refresh),
1630
+ onClick: onRefresh,
1631
+ children: refreshIcon
1632
+ }
1633
+ )
1634
+ ] }) });
1635
+ };
1342
1636
  const SvgFile = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, viewBox: "0 0 16 16", fill: "currentColor", ...props }, /* @__PURE__ */ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M2.7036 1.37034C3.04741 1.02653 3.51373 0.833374 3.99996 0.833374H9.33329H9.33331C9.47275 0.833374 9.59885 0.890449 9.68954 0.98251L13.6843 4.97722C13.7763 5.0679 13.8333 5.19398 13.8333 5.33337L13.8333 5.3379V13.3334C13.8333 13.8196 13.6401 14.2859 13.2963 14.6297C12.9525 14.9736 12.4862 15.1667 12 15.1667H3.99996C3.51373 15.1667 3.04741 14.9736 2.7036 14.6297C2.35978 14.2859 2.16663 13.8196 2.16663 13.3334V2.66671C2.16663 2.18048 2.35978 1.71416 2.7036 1.37034ZM3.99996 1.83337H8.83331V5.33337C8.83331 5.60952 9.05717 5.83337 9.33331 5.83337H12.8333V13.3334C12.8333 13.5544 12.7455 13.7663 12.5892 13.9226C12.4329 14.0789 12.221 14.1667 12 14.1667H3.99996C3.77895 14.1667 3.56698 14.0789 3.4107 13.9226C3.25442 13.7663 3.16663 13.5544 3.16663 13.3334V2.66671C3.16663 2.44569 3.25442 2.23373 3.4107 2.07745C3.56698 1.92117 3.77895 1.83337 3.99996 1.83337ZM9.83331 2.5405L12.1262 4.83337H9.83331V2.5405ZM5.33331 8.16663C5.05717 8.16663 4.83331 8.39048 4.83331 8.66663C4.83331 8.94277 5.05717 9.16663 5.33331 9.16663H10.6666C10.9428 9.16663 11.1666 8.94277 11.1666 8.66663C11.1666 8.39048 10.9428 8.16663 10.6666 8.16663H5.33331ZM4.83331 11.3334C4.83331 11.0572 5.05717 10.8334 5.33331 10.8334H10.6666C10.9428 10.8334 11.1666 11.0572 11.1666 11.3334C11.1666 11.6095 10.9428 11.8334 10.6666 11.8334H5.33331C5.05717 11.8334 4.83331 11.6095 4.83331 11.3334ZM5.33331 5.5C5.05717 5.5 4.83331 5.72386 4.83331 6C4.83331 6.27614 5.05717 6.5 5.33331 6.5H6.66665C6.94279 6.5 7.16665 6.27614 7.16665 6C7.16665 5.72386 6.94279 5.5 6.66665 5.5H5.33331Z" }));
1343
- const DefaultFileRenderer = lazy(() => import("./DefaultFileRenderer-Bgc4Jadg.js"));
1344
- const CSVFileRenderer = lazy(() => import("./CSVFileRenderer-BAbkFZ2w.js"));
1637
+ const DefaultFileRenderer = lazy(
1638
+ () => import("./DefaultFileRenderer-BVeS3GS1.js")
1639
+ );
1640
+ const CSVFileRenderer = lazy(() => import("./CSVFileRenderer-BJ6YmtEo.js"));
1345
1641
  const ImageFileRenderer = lazy(() => import("./ImageFileRenderer-C8tVW3I8.js"));
1346
- const PDFFileRenderer = lazy(() => import("./PDFFileRenderer-DQdFS2l6.js"));
1642
+ const PDFFileRenderer = lazy(() => import("./PDFFileRenderer-BBn2EVrV.js"));
1347
1643
  const FILE_TYPE_RENDERER_MAP = {
1348
1644
  "image/": ImageFileRenderer,
1349
1645
  "text/csv": CSVFileRenderer,
@@ -1358,16 +1654,10 @@ const MessageFile = ({
1358
1654
  }) => {
1359
1655
  const { theme } = useContext(ChatContext);
1360
1656
  const FileRenderer = useMemo(() => {
1361
- const Renderer = Object.keys(FILE_TYPE_RENDERER_MAP).find((key) => type == null ? void 0 : type.startsWith(key)) ?? "default";
1657
+ const Renderer = Object.keys(FILE_TYPE_RENDERER_MAP).find((key) => type?.startsWith(key)) ?? "default";
1362
1658
  return FILE_TYPE_RENDERER_MAP[Renderer] || DefaultFileRenderer;
1363
1659
  }, [type]);
1364
- return /* @__PURE__ */ jsx(
1365
- "div",
1366
- {
1367
- className: cn(theme.messages.message.files.file.base),
1368
- children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsx(FileRenderer, { name, url, fileIcon, limit }) })
1369
- }
1370
- );
1660
+ return /* @__PURE__ */ jsx("div", { className: cn(theme.messages.message.files.file.base), children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsx(FileRenderer, { name, url, fileIcon, limit }) }) });
1371
1661
  };
1372
1662
  const MessageFiles = ({ files, children }) => {
1373
1663
  const { theme } = useContext(ChatContext);
@@ -1454,7 +1744,7 @@ const MessageQuestion = ({
1454
1744
  ...props,
1455
1745
  children: children || /* @__PURE__ */ jsxs(Fragment, { children: [
1456
1746
  /* @__PURE__ */ jsx(MessageFiles, { files }),
1457
- /* @__PURE__ */ jsx(Markdown, { remarkPlugins, children: question }),
1747
+ /* @__PURE__ */ jsx(Markdown, { remarkPlugins, theme, children: question }),
1458
1748
  isLong && !expanded && /* @__PURE__ */ jsx(
1459
1749
  Button,
1460
1750
  {
@@ -1482,7 +1772,7 @@ const MessageResponse = ({
1482
1772
  "data-compact": isCompact,
1483
1773
  className: cn(theme.messages.message.response),
1484
1774
  children: children || /* @__PURE__ */ jsxs(Fragment, { children: [
1485
- /* @__PURE__ */ jsx(Markdown, { remarkPlugins, children: response }),
1775
+ /* @__PURE__ */ jsx(Markdown, { remarkPlugins, theme, children: response }),
1486
1776
  isLoading && /* @__PURE__ */ jsx(
1487
1777
  motion.div,
1488
1778
  {
@@ -1499,7 +1789,12 @@ const MessageResponse = ({
1499
1789
  }
1500
1790
  );
1501
1791
  };
1502
- const MessageSource = ({ title, url, image, limit = 50 }) => {
1792
+ const MessageSource = ({
1793
+ title,
1794
+ url,
1795
+ image,
1796
+ limit = 50
1797
+ }) => {
1503
1798
  const { theme, isCompact } = useContext(ChatContext);
1504
1799
  return /* @__PURE__ */ jsxs(
1505
1800
  "figure",
@@ -1513,10 +1808,26 @@ const MessageSource = ({ title, url, image, limit = 50 }) => {
1513
1808
  }
1514
1809
  },
1515
1810
  children: [
1516
- image && /* @__PURE__ */ jsx("img", { src: image, alt: title, className: cn(theme.messages.message.sources.source.image) }),
1811
+ image && /* @__PURE__ */ jsx(
1812
+ "img",
1813
+ {
1814
+ src: image,
1815
+ alt: title,
1816
+ className: cn(theme.messages.message.sources.source.image)
1817
+ }
1818
+ ),
1517
1819
  (title || url) && /* @__PURE__ */ jsxs("figcaption", { children: [
1518
1820
  title && /* @__PURE__ */ jsx("span", { className: cn(theme.messages.message.sources.source.title), children: /* @__PURE__ */ jsx(Ellipsis, { value: title, limit }) }),
1519
- url && /* @__PURE__ */ jsx("a", { href: url, target: "_blank", rel: "noopener noreferrer", className: cn(theme.messages.message.sources.source.url), children: url })
1821
+ url && /* @__PURE__ */ jsx(
1822
+ "a",
1823
+ {
1824
+ href: url,
1825
+ target: "_blank",
1826
+ rel: "noopener noreferrer",
1827
+ className: cn(theme.messages.message.sources.source.url),
1828
+ children: url
1829
+ }
1830
+ )
1520
1831
  ] })
1521
1832
  ]
1522
1833
  }
@@ -1533,104 +1844,35 @@ const MessageSources = ({
1533
1844
  }
1534
1845
  return sources && sources.length > 0 && /* @__PURE__ */ jsx("div", { className: cn(theme.messages.message.sources.base), children: sources.map((source, index) => /* @__PURE__ */ jsx(Comp, { ...source, children }, index)) });
1535
1846
  };
1536
- const SvgThumbsDown = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1, strokeLinecap: "round", strokeLinejoin: "round", className: "lucide lucide-thumbs-down", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M17 14V2" }), /* @__PURE__ */ React.createElement("path", { d: "M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z" }));
1537
- const SvgThumbsUp = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1, strokeLinecap: "round", strokeLinejoin: "round", className: "lucide lucide-thumbs-up", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M7 10v12" }), /* @__PURE__ */ React.createElement("path", { d: "M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z" }));
1538
- const SvgRefresh = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1, strokeLinecap: "round", strokeLinejoin: "round", className: "lucide lucide-refresh-ccw", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), /* @__PURE__ */ React.createElement("path", { d: "M3 3v5h5" }), /* @__PURE__ */ React.createElement("path", { d: "M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16" }), /* @__PURE__ */ React.createElement("path", { d: "M16 16h5v5" }));
1539
- const MessageActions = ({
1540
- children,
1541
- ...props
1542
- }) => {
1543
- const { theme } = useContext(ChatContext);
1544
- const {
1545
- question,
1546
- response,
1547
- copyIcon = /* @__PURE__ */ jsx(SvgCopy, {}),
1548
- thumbsUpIcon = /* @__PURE__ */ jsx(SvgThumbsUp, {}),
1549
- thumbsDownIcon = /* @__PURE__ */ jsx(SvgThumbsDown, {}),
1550
- refreshIcon = /* @__PURE__ */ jsx(SvgRefresh, {}),
1551
- onCopy,
1552
- onUpvote,
1553
- onDownvote,
1554
- onRefresh
1555
- } = props;
1556
- const Comp = children ? Slot : "div";
1557
- const handleCopy = (text) => {
1558
- navigator.clipboard.writeText(text).then(() => {
1559
- console.log("Text copied to clipboard");
1560
- }).catch((err) => {
1561
- console.error("Could not copy text: ", err);
1562
- });
1563
- };
1564
- return (copyIcon || thumbsDownIcon || thumbsUpIcon || refreshIcon) && /* @__PURE__ */ jsx(Comp, { className: cn(theme.messages.message.footer.base), children: children || /* @__PURE__ */ jsxs(Fragment, { children: [
1565
- copyIcon && /* @__PURE__ */ jsx(
1566
- IconButton,
1567
- {
1568
- variant: "text",
1569
- disablePadding: true,
1570
- title: "Copy question and response",
1571
- className: cn(theme.messages.message.footer.copy),
1572
- onClick: onCopy ? onCopy : () => handleCopy(`${question}
1573
- ${response}`),
1574
- children: copyIcon
1575
- }
1576
- ),
1577
- thumbsUpIcon && /* @__PURE__ */ jsx(
1578
- IconButton,
1579
- {
1580
- variant: "text",
1581
- disablePadding: true,
1582
- title: "Upvote",
1583
- className: cn(theme.messages.message.footer.upvote),
1584
- onClick: onUpvote,
1585
- children: thumbsUpIcon
1586
- }
1587
- ),
1588
- thumbsDownIcon && /* @__PURE__ */ jsx(
1589
- IconButton,
1590
- {
1591
- variant: "text",
1592
- disablePadding: true,
1593
- title: "Downvote",
1594
- className: cn(theme.messages.message.footer.downvote),
1595
- onClick: onDownvote,
1596
- children: thumbsDownIcon
1597
- }
1598
- ),
1599
- refreshIcon && /* @__PURE__ */ jsx(
1600
- IconButton,
1601
- {
1602
- variant: "text",
1603
- disablePadding: true,
1604
- title: "Refresh",
1605
- className: cn(theme.messages.message.footer.refresh),
1606
- onClick: onRefresh,
1607
- children: refreshIcon
1608
- }
1609
- )
1610
- ] }) });
1611
- };
1612
- const messageVariants = {
1613
- hidden: {
1614
- opacity: 0,
1615
- y: 20
1616
- },
1617
- visible: {
1618
- opacity: 1,
1619
- y: 0,
1620
- transition: {
1621
- duration: 0.3
1622
- }
1623
- }
1624
- };
1625
- const SessionMessage = ({
1626
- conversation,
1627
- isLast,
1628
- children
1847
+ const messageVariants = {
1848
+ hidden: {
1849
+ opacity: 0,
1850
+ y: 20
1851
+ },
1852
+ visible: {
1853
+ opacity: 1,
1854
+ y: 0,
1855
+ transition: {
1856
+ duration: 0.3
1857
+ }
1858
+ }
1859
+ };
1860
+ const SessionMessage = ({
1861
+ className,
1862
+ conversation,
1863
+ isLast,
1864
+ children
1629
1865
  }) => {
1630
1866
  const { theme, isLoading } = useContext(ChatContext);
1631
1867
  return /* @__PURE__ */ jsxs(motion.div, { variants: messageVariants, children: [
1632
- /* @__PURE__ */ jsx(Card, { className: cn(theme.messages.message.base), children: children || /* @__PURE__ */ jsxs(Fragment, { children: [
1633
- /* @__PURE__ */ jsx(MessageQuestion, { question: conversation.question, files: conversation.files }),
1868
+ /* @__PURE__ */ jsx(Card, { className: cn(theme.messages.message.base, className), children: children || /* @__PURE__ */ jsxs(Fragment, { children: [
1869
+ /* @__PURE__ */ jsx(
1870
+ MessageQuestion,
1871
+ {
1872
+ question: conversation.question,
1873
+ files: conversation.files
1874
+ }
1875
+ ),
1634
1876
  /* @__PURE__ */ jsx(
1635
1877
  MessageResponse,
1636
1878
  {
@@ -1643,383 +1885,24 @@ const SessionMessage = ({
1643
1885
  MessageActions,
1644
1886
  {
1645
1887
  question: conversation.question,
1646
- response: conversation.response
1647
- }
1648
- )
1649
- ] }) }),
1650
- !isLast && /* @__PURE__ */ jsx(Divider, {})
1651
- ] }, conversation.id);
1652
- };
1653
- const containerVariants = {
1654
- hidden: {},
1655
- visible: {
1656
- transition: {
1657
- staggerChildren: 0.07,
1658
- when: "beforeChildren"
1659
- }
1660
- }
1661
- };
1662
- const SessionMessages = ({
1663
- children,
1664
- newSessionContent,
1665
- limit = 10,
1666
- showMoreText = "Show more"
1667
- }) => {
1668
- const { activeSession, theme } = useContext(ChatContext);
1669
- const contentRef = useRef(null);
1670
- const [isAnimating, setIsAnimating] = useState(true);
1671
- useEffect(() => {
1672
- if (contentRef.current) {
1673
- requestAnimationFrame(
1674
- () => contentRef.current.scrollTop = contentRef.current.scrollHeight
1675
- );
1676
- }
1677
- }, [activeSession, isAnimating]);
1678
- function handleShowMore() {
1679
- showNext(limit);
1680
- requestAnimationFrame(() => contentRef.current.scrollTop = 0);
1681
- }
1682
- const reversedConvos = useMemo(
1683
- () => [...(activeSession == null ? void 0 : activeSession.conversations) ?? []].reverse(),
1684
- [activeSession]
1685
- );
1686
- const { data, hasMore, showNext } = useInfinityList({
1687
- items: reversedConvos,
1688
- size: limit
1689
- });
1690
- const reReversedConvo = useMemo(() => [...data].reverse(), [data]);
1691
- const convosToRender = limit ? reReversedConvo : activeSession == null ? void 0 : activeSession.conversations;
1692
- if (!activeSession) {
1693
- return /* @__PURE__ */ jsx(SessionEmpty, { children: newSessionContent });
1694
- }
1695
- return /* @__PURE__ */ jsxs("div", { className: cn(theme.messages.content), ref: contentRef, children: [
1696
- hasMore && /* @__PURE__ */ jsx(
1697
- Button,
1698
- {
1699
- variant: "outline",
1700
- className: cn(theme.messages.showMore),
1701
- fullWidth: true,
1702
- onClick: handleShowMore,
1703
- children: showMoreText
1704
- }
1705
- ),
1706
- /* @__PURE__ */ jsx(AnimatePresence, { children: /* @__PURE__ */ jsx(
1707
- motion.div,
1708
- {
1709
- variants: containerVariants,
1710
- initial: "hidden",
1711
- animate: "visible",
1712
- onAnimationComplete: () => {
1713
- requestAnimationFrame(() => setIsAnimating(false));
1714
- },
1715
- children: children ? children(convosToRender) : convosToRender.map((conversation, index) => /* @__PURE__ */ jsx(
1716
- SessionMessage,
1717
- {
1718
- conversation,
1719
- isLast: index === conversation.length - 1
1720
- },
1721
- conversation.id
1722
- ))
1723
- },
1724
- activeSession == null ? void 0 : activeSession.id
1725
- ) })
1726
- ] });
1727
- };
1728
- const chatTheme = {
1729
- base: "dark:text-white text-gray-500",
1730
- console: "flex w-full gap-4 h-full",
1731
- companion: "w-full h-full overflow-hidden",
1732
- empty: "text-center flex-1",
1733
- appbar: "flex p-5",
1734
- sessions: {
1735
- base: "overflow-auto",
1736
- console: "min-w-[150px] w-[30%] max-w-[300px] dark:bg-[#11111F] bg-[#F2F3F7] p-5 rounded-3xl",
1737
- companion: "w-full h-full",
1738
- group: "text-xs dart:text-gray-400 text-gray-700 mt-4 hover:bg-transparent mb-1",
1739
- create: "relative mb-4 rounded-[10px] text-white",
1740
- session: {
1741
- base: [
1742
- "group my-1 rounded-[10px] p-2 text-gray-500 border border-transparent hover:bg-gray-300 hover:border-gray-400 [&_svg]:text-gray-500",
1743
- "dark:text-typography dark:text-gray-400 dark:hover:bg-gray-800/50 dark:hover:border-gray-700/50 dark:[&_svg]:text-gray-200"
1744
- ].join(" "),
1745
- active: [
1746
- "border border-gray-300 hover:border-gray-400 text-gray-700 bg-gray-200 hover:bg-gray-300 ",
1747
- "dark:text-gray-500 dark:bg-gray-800/70 dark:border-gray-700/50 dark:text-white dark:border-gray-700/70 dark:hover:bg-gray-800/50",
1748
- "[&_button]:opacity-100!"
1749
- ].join(" "),
1750
- delete: "[&>svg]:w-4 [&>svg]:h-4 opacity-0 group-hover:opacity-50!"
1751
- }
1752
- },
1753
- messages: {
1754
- base: "",
1755
- console: "flex flex-col mx-5 flex-1 overflow-hidden",
1756
- companion: "flex w-full h-full",
1757
- back: "self-start p-0 my-2",
1758
- inner: "flex-1 h-full flex flex-col",
1759
- title: ["text-base font-bold text-gray-500", "dark:text-gray-200"].join(
1760
- " "
1761
- ),
1762
- date: "text-xs whitespace-nowrap text-gray-400",
1763
- content: [
1764
- "mt-2 flex-1 overflow-auto [&_hr]:bg-gray-200",
1765
- "dark:[&_hr]:bg-gray-800/60"
1766
- ].join(" "),
1767
- header: "flex justify-between items-center gap-2",
1768
- showMore: "mb-4",
1769
- message: {
1770
- base: "mt-4 mb-4 flex flex-col p-0 rounded-sm border-none bg-transparent",
1771
- question: [
1772
- "relative font-semibold mb-4 px-4 py-4 pb-2 rounded-3xl rounded-br-none text-typography border bg-gray-200 border-gray-300 text-gray-900",
1773
- "dark:bg-gray-900/60 dark:border-gray-700/50 dark:text-gray-100"
1774
- ].join(" "),
1775
- response: [
1776
- "relative data-[compact=false]:px-4 text-gray-900",
1777
- "dark:text-gray-100"
1778
- ].join(" "),
1779
- overlay: "overflow-y-hidden max-h-[350px] after:content-[''] after:absolute after:inset-x-0 after:bottom-0 after:h-16 after:bg-linear-to-b after:from-transparent dark:after:to-gray-900 after:to-gray-200",
1780
- cursor: "inline-block w-1 h-4 bg-current",
1781
- expand: "absolute bottom-1 right-1 z-10",
1782
- files: {
1783
- base: "mb-2 flex flex-wrap gap-3 ",
1784
- file: {
1785
- base: [
1786
- "flex items-center gap-2 border border-gray-300 px-3 py-2 rounded-lg cursor-pointer",
1787
- "dark:border-gray-700"
1788
- ].join(" "),
1789
- name: ["text-sm text-gray-500", "dark:text-gray-200"].join(" ")
1790
- }
1791
- },
1792
- sources: {
1793
- base: "my-4 flex flex-wrap gap-3",
1794
- source: {
1795
- base: [
1796
- "flex gap-2 border border-gray-200 px-4 py-2 rounded-lg cursor-pointer",
1797
- "dark:border-gray-700"
1798
- ].join(" "),
1799
- companion: "flex-1 px-3 py-1.5",
1800
- image: "max-w-10 max-h-10 rounded-md w-full h-fit self-center",
1801
- title: "text-md block",
1802
- url: "text-sm text-blue-400 underline"
1803
- }
1804
- },
1805
- markdown: {
1806
- copy: "sticky py-1 [&>svg]:w-4 [&>svg]:h-4 opacity-50",
1807
- p: "mb-2",
1808
- a: "text-blue-400 underline",
1809
- table: "table-auto w-full m-2",
1810
- th: "px-4 py-2 text-left font-bold border-b border-gray-500",
1811
- td: "px-4 py-2",
1812
- code: "m-2 rounded-b relative",
1813
- toolbar: "text-xs dark:bg-gray-700/50 flex items-center justify-between px-2 py-1 rounded-t sticky top-0 backdrop-blur-md bg-gray-200 ",
1814
- li: "mb-2 ml-6",
1815
- ul: "mb-4 list-disc",
1816
- ol: "mb-4 list-decimal"
1817
- },
1818
- footer: {
1819
- base: "mt-3 flex gap-1.5",
1820
- copy: [
1821
- "p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-200 hover:text-gray-500",
1822
- "dark:hover:bg-gray-800 dark:hover:text-white text-gray-400"
1823
- ].join(" "),
1824
- upvote: "p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400",
1825
- downvote: "p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400",
1826
- refresh: "p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400"
1827
- }
1828
- }
1829
- },
1830
- input: {
1831
- base: "flex mt-4 relative",
1832
- upload: ["px-5 py-2 text-gray-400 size-10", "dark:gray-500"].join(" "),
1833
- input: [
1834
- "w-full border rounded-3xl px-3 py-2 pr-16 text-gray-500 border-gray-200 hover:bg-blue-100 hover:border-blue-500 after:hidden after:mx-10! bg-white [&>textarea]:w-full [&>textarea]:flex-none",
1835
- "dark:border-gray-700/50 dark:text-gray-200 dark:bg-gray-950 dark:hover:bg-blue-950/40"
1836
- ].join(" "),
1837
- actions: {
1838
- base: "absolute flex gap-2 items-center right-5 inset-y-1/2 -translate-y-1/2 z-10",
1839
- send: [
1840
- "px-3 py-3 hover:bg-primary-hover rounded-full bg-gray-200 hover:bg-gray-300 text-gray-500",
1841
- "dark:text-white light:text-gray-500 dark:bg-gray-800 dark:hover:bg-gray-700"
1842
- ].join(" "),
1843
- stop: "px-2 py-2 bg-red-500 text-white rounded-full hover:bg-red-700 "
1844
- }
1845
- }
1846
- };
1847
- const useDimensions = () => {
1848
- const [ref, setRef] = useState(null);
1849
- const [width, setWidth] = useState(void 0);
1850
- const observe = useCallback((element) => {
1851
- if (element) setRef(element);
1852
- }, []);
1853
- useEffect(() => {
1854
- if (!ref) return;
1855
- const resizeObserver = new ResizeObserver((entries) => {
1856
- for (let entry of entries) {
1857
- setWidth(entry.contentRect.width);
1858
- }
1859
- });
1860
- resizeObserver.observe(ref);
1861
- return () => {
1862
- resizeObserver.disconnect();
1863
- };
1864
- }, [ref]);
1865
- return { width, observe };
1866
- };
1867
- const Chat = ({
1868
- children,
1869
- viewType = "console",
1870
- sessions,
1871
- onSelectSession,
1872
- onDeleteSession,
1873
- onSendMessage,
1874
- onStopMessage,
1875
- onFileUpload,
1876
- isLoading,
1877
- activeSessionId,
1878
- theme = chatTheme,
1879
- onNewSession,
1880
- remarkPlugins = [remarkGfm, remarkYoutube, remarkMath],
1881
- disabled,
1882
- style,
1883
- className
1884
- }) => {
1885
- const [internalActiveSessionID, setInternalActiveSessionID] = useState(activeSessionId);
1886
- const { width, observe } = useDimensions();
1887
- const isCompact = viewType === "companion" || width && width < 767;
1888
- useEffect(() => {
1889
- setInternalActiveSessionID(activeSessionId);
1890
- }, [activeSessionId]);
1891
- const handleSelectSession = useCallback(
1892
- (sessionId) => {
1893
- setInternalActiveSessionID(sessionId);
1894
- onSelectSession == null ? void 0 : onSelectSession(sessionId);
1895
- },
1896
- [onSelectSession]
1897
- );
1898
- const handleDeleteSession = useCallback(
1899
- (sessionId) => {
1900
- setInternalActiveSessionID(void 0);
1901
- onDeleteSession == null ? void 0 : onDeleteSession(sessionId);
1902
- },
1903
- [onDeleteSession]
1904
- );
1905
- const handleCreateNewSession = useCallback(() => {
1906
- setInternalActiveSessionID(void 0);
1907
- onNewSession == null ? void 0 : onNewSession();
1908
- }, [onNewSession]);
1909
- useHotkeys([
1910
- {
1911
- name: "Create new session",
1912
- category: "Chat",
1913
- keys: "meta+shift+s",
1914
- callback: (event) => {
1915
- event.preventDefault();
1916
- handleCreateNewSession();
1917
- }
1918
- }
1919
- ]);
1920
- const activeSession = useMemo(
1921
- () => sessions.find((session) => session.id === internalActiveSessionID),
1922
- [sessions, internalActiveSessionID]
1923
- );
1924
- const contextValue = useMemo(
1925
- () => ({
1926
- sessions,
1927
- activeSession,
1928
- remarkPlugins,
1929
- theme,
1930
- disabled,
1931
- isLoading,
1932
- isCompact,
1933
- viewType,
1934
- activeSessionId: internalActiveSessionID,
1935
- selectSession: handleSelectSession,
1936
- deleteSession: handleDeleteSession,
1937
- createSession: handleCreateNewSession,
1938
- sendMessage: onSendMessage,
1939
- stopMessage: onStopMessage,
1940
- fileUpload: onFileUpload
1941
- }),
1942
- [
1943
- isLoading,
1944
- isCompact,
1945
- viewType,
1946
- disabled,
1947
- theme,
1948
- remarkPlugins,
1949
- sessions,
1950
- activeSession,
1951
- internalActiveSessionID,
1952
- handleSelectSession,
1953
- handleDeleteSession,
1954
- handleCreateNewSession,
1955
- onSendMessage,
1956
- onStopMessage,
1957
- onFileUpload
1958
- ]
1959
- );
1960
- return /* @__PURE__ */ jsx(ChatContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: /* @__PURE__ */ jsx(
1961
- "div",
1962
- {
1963
- ref: observe,
1964
- className: cn(className, theme.base, {
1965
- [theme.companion]: isCompact,
1966
- [theme.console]: !isCompact
1967
- }),
1968
- style,
1969
- children
1970
- }
1971
- ) }) });
1972
- };
1973
- const SvgTrash = (props) => /* @__PURE__ */ React.createElement("svg", { width: 14, height: 14, viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React.createElement("g", { id: "Delete" }, /* @__PURE__ */ React.createElement("path", { id: "Vector", d: "M5.97905 1.16666C5.90859 1.16576 5.83895 1.18189 5.77605 1.21368C5.71316 1.24547 5.65888 1.29199 5.61783 1.34926C5.57677 1.40654 5.55016 1.47288 5.54025 1.54265C5.53034 1.61242 5.53743 1.68355 5.56092 1.75H4.27007C3.7342 1.75 3.2324 2.01817 2.93535 2.46435L2.24492 3.5H2.18738C2.12941 3.49918 2.07185 3.50989 2.01805 3.5315C1.96425 3.55312 1.91529 3.58522 1.874 3.62593C1.83271 3.66663 1.79993 3.71514 1.77755 3.76863C1.75518 3.82211 1.74365 3.87952 1.74365 3.9375C1.74365 3.99548 1.75518 4.05288 1.77755 4.10636C1.79993 4.15985 1.83271 4.20836 1.874 4.24907C1.91529 4.28977 1.96425 4.32187 2.01805 4.34349C2.07185 4.3651 2.12941 4.37582 2.18738 4.375H2.41012C2.44765 4.38067 2.48576 4.38143 2.52348 4.37727L3.24468 11.1084C3.33169 11.9199 4.02367 12.5417 4.83973 12.5417H9.15947C9.97553 12.5417 10.6675 11.9199 10.7545 11.1084L11.4763 4.37727C11.5133 4.38124 11.5506 4.38047 11.5874 4.375H11.8124C11.8704 4.37582 11.9279 4.3651 11.9817 4.34349C12.0355 4.32187 12.0845 4.28977 12.1258 4.24907C12.1671 4.20836 12.1998 4.15985 12.2222 4.10636C12.2446 4.05288 12.2561 3.99548 12.2561 3.9375C12.2561 3.87952 12.2446 3.82211 12.2222 3.76863C12.1998 3.71514 12.1671 3.66663 12.1258 3.62593C12.0845 3.58522 12.0355 3.55312 11.9817 3.5315C11.9279 3.50989 11.8704 3.49918 11.8124 3.5H11.7548L11.0644 2.46435C10.7671 2.01841 10.2654 1.75 9.7297 1.75H8.43885C8.46234 1.68355 8.46943 1.61242 8.45952 1.54265C8.44961 1.47288 8.423 1.40654 8.38194 1.34926C8.34089 1.29199 8.2866 1.24547 8.22371 1.21368C8.16082 1.18189 8.09118 1.16576 8.02072 1.16666H5.97905ZM4.27007 2.625H9.7297C9.97394 2.625 10.2009 2.74639 10.3364 2.9497L10.7033 3.5H3.29651L3.66338 2.9497L3.66395 2.94913C3.79913 2.74608 4.02543 2.625 4.27007 2.625ZM3.40361 4.375H10.5962L9.88465 11.015C9.8445 11.3894 9.53575 11.6667 9.15947 11.6667H4.83973C4.46345 11.6667 4.15527 11.3894 4.11512 11.015L3.40361 4.375Z", fill: "currentColor" })));
1974
- const SvgChat = (props) => /* @__PURE__ */ React.createElement("svg", { width: 16, height: 17, viewBox: "0 0 16 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M8 3C4.55375 3 1.75 5.23753 1.75 7.98828C1.75 9.70653 2.83659 11.2762 4.62109 12.188C4.11184 13.0465 3.62587 13.7378 3.62012 13.7461C3.50687 13.9071 3.49862 14.1196 3.59912 14.2891C3.69012 14.4418 3.8543 14.5342 4.0293 14.5342C4.0483 14.5342 4.06743 14.533 4.08643 14.5308C4.15168 14.5233 5.66214 14.3364 7.50439 12.9604C7.67239 12.9712 7.8385 12.9766 8 12.9766C11.4462 12.9766 14.25 10.739 14.25 7.98828C14.25 5.23753 11.4462 3 8 3ZM8 4C10.8948 4 13.25 5.78903 13.25 7.98828C13.25 10.1875 10.8948 11.9766 8 11.9766C7.8055 11.9766 7.60225 11.968 7.396 11.9497C7.271 11.9382 7.1454 11.9752 7.0459 12.0527C6.3589 12.5855 5.72033 12.9308 5.20508 13.1528C5.38383 12.8648 5.57691 12.5418 5.76416 12.2061C5.83416 12.0813 5.84705 11.9324 5.7998 11.7974C5.75255 11.6624 5.64983 11.5542 5.51758 11.5C3.81033 10.7993 2.75 9.45328 2.75 7.98828C2.75 5.78903 5.10525 4 8 4ZM5.5 7.25C5.08575 7.25 4.75 7.58575 4.75 8C4.75 8.41425 5.08575 8.75 5.5 8.75C5.91425 8.75 6.25 8.41425 6.25 8C6.25 7.58575 5.91425 7.25 5.5 7.25ZM8 7.25C7.58575 7.25 7.25 7.58575 7.25 8C7.25 8.41425 7.58575 8.75 8 8.75C8.41425 8.75 8.75 8.41425 8.75 8C8.75 7.58575 8.41425 7.25 8 7.25ZM10.5 7.25C10.0857 7.25 9.75 7.58575 9.75 8C9.75 8.41425 10.0857 8.75 10.5 8.75C10.9143 8.75 11.25 8.41425 11.25 8C11.25 7.58575 10.9143 7.25 10.5 7.25Z", fill: "currentColor" }));
1975
- const SessionListItem = ({
1976
- children,
1977
- session,
1978
- deletable = true,
1979
- limit = 100,
1980
- deleteIcon = /* @__PURE__ */ jsx(SvgTrash, {}),
1981
- chatIcon = /* @__PURE__ */ jsx(SvgChat, { className: "mr-2" })
1982
- }) => {
1983
- const { activeSessionId, selectSession, deleteSession, theme } = useContext(ChatContext);
1984
- const Comp = children ? Slot : ListItem;
1985
- return /* @__PURE__ */ jsx(
1986
- Comp,
1987
- {
1988
- dense: true,
1989
- disableGutters: true,
1990
- active: session.id === activeSessionId,
1991
- className: cn(theme.sessions.session.base, {
1992
- [theme.sessions.session.active]: session.id === activeSessionId
1993
- }),
1994
- onClick: () => selectSession == null ? void 0 : selectSession(session.id),
1995
- start: chatIcon,
1996
- end: /* @__PURE__ */ jsx(Fragment, { children: deletable && /* @__PURE__ */ jsx(
1997
- IconButton,
1998
- {
1999
- size: "small",
2000
- variant: "text",
2001
- onClick: (e) => {
2002
- e.stopPropagation();
2003
- deleteSession(session.id);
2004
- },
2005
- className: cn(theme.sessions.session.delete),
2006
- children: deleteIcon
1888
+ response: conversation.response
2007
1889
  }
2008
- ) }),
2009
- children: children || /* @__PURE__ */ jsx(Ellipsis, { value: session.title, limit })
2010
- }
2011
- );
1890
+ )
1891
+ ] }) }),
1892
+ !isLast && /* @__PURE__ */ jsx(Divider, {})
1893
+ ] }, conversation.id);
2012
1894
  };
2013
- const SessionsList = ({
1895
+ const SvgBack = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 50 50", width: "24px", height: "24px", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M 34.980469 3.992188 C 34.71875 3.996094 34.472656 4.105469 34.292969 4.292969 L 14.292969 24.292969 C 13.902344 24.683594 13.902344 25.316406 14.292969 25.707031 L 34.292969 45.707031 C 34.542969 45.96875 34.917969 46.074219 35.265625 45.980469 C 35.617188 45.890625 35.890625 45.617188 35.980469 45.265625 C 36.074219 44.917969 35.96875 44.542969 35.707031 44.292969 L 16.414063 25 L 35.707031 5.707031 C 36.003906 5.417969 36.089844 4.980469 35.929688 4.601563 C 35.769531 4.21875 35.394531 3.976563 34.980469 3.992188 Z", fill: "currentColor" }));
1896
+ const SessionMessagePanel = ({
2014
1897
  children,
2015
- templates
1898
+ allowBack = true
2016
1899
  }) => {
2017
- const { theme, isCompact, activeSessionId, createSession } = useContext(ChatContext);
2018
- const isVisible = isCompact && !activeSessionId;
2019
- return (!isCompact || isVisible) && /* @__PURE__ */ jsxs(
1900
+ const { activeSessionId, theme, isCompact, selectSession, viewType } = useContext(ChatContext);
1901
+ const isVisible = isCompact && activeSessionId || viewType === "chat" || !isCompact;
1902
+ return isVisible && /* @__PURE__ */ jsx(
2020
1903
  motion.div,
2021
1904
  {
2022
- initial: { translateX: "-100%" },
1905
+ initial: { translateX: "200%" },
2023
1906
  animate: {
2024
1907
  translateX: "0%",
2025
1908
  transition: {
@@ -2029,28 +1912,123 @@ const SessionsList = ({
2029
1912
  when: "beforeChildren"
2030
1913
  }
2031
1914
  },
2032
- exit: { translateX: "-100%" },
2033
- className: cn(theme.sessions.base, {
2034
- [theme.sessions.companion]: isCompact,
2035
- [theme.sessions.console]: !isCompact
1915
+ exit: { translateX: "200%" },
1916
+ className: cn(theme.messages.base, {
1917
+ [theme.messages.companion]: isCompact,
1918
+ [theme.messages.console]: !isCompact
2036
1919
  }),
2037
- children: [
2038
- /* @__PURE__ */ jsx(List, { children }),
2039
- templates && !activeSessionId && /* @__PURE__ */ jsx("div", { className: "mt-4", children: templates.map((template) => /* @__PURE__ */ jsx("div", { onClick: () => createSession == null ? void 0 : createSession(), children: /* @__PURE__ */ jsx(
2040
- SessionListItem,
1920
+ children: /* @__PURE__ */ jsxs("div", { className: cn(theme.messages.inner), children: [
1921
+ allowBack && isCompact && viewType !== "chat" && /* @__PURE__ */ jsxs(
1922
+ Button,
2041
1923
  {
2042
- session: {
2043
- id: template.id,
2044
- title: template.title,
2045
- conversations: []
2046
- },
2047
- chatIcon: template.icon,
2048
- deletable: false
1924
+ variant: "text",
1925
+ size: "small",
1926
+ onClick: () => selectSession(null),
1927
+ className: cn(theme.messages.back),
1928
+ children: [
1929
+ /* @__PURE__ */ jsx(SvgBack, {}),
1930
+ "Back"
1931
+ ]
2049
1932
  }
2050
- ) }, template.id)) })
2051
- ]
1933
+ ),
1934
+ children
1935
+ ] })
1936
+ }
1937
+ );
1938
+ };
1939
+ const containerVariants = {
1940
+ hidden: {},
1941
+ visible: {
1942
+ transition: {
1943
+ staggerChildren: 0.07,
1944
+ when: "beforeChildren"
2052
1945
  }
1946
+ }
1947
+ };
1948
+ const SessionMessages = ({
1949
+ children,
1950
+ newSessionContent,
1951
+ limit = 10,
1952
+ className,
1953
+ showMoreText = "Show more",
1954
+ autoScroll = true
1955
+ }) => {
1956
+ const { activeSession, theme } = useContext(ChatContext);
1957
+ const contentRef = useRef(null);
1958
+ const [isAnimating, setIsAnimating] = useState(true);
1959
+ useEffect(() => {
1960
+ if (contentRef.current && autoScroll) {
1961
+ requestAnimationFrame(
1962
+ () => contentRef.current.scrollTop = contentRef.current.scrollHeight
1963
+ );
1964
+ }
1965
+ }, [activeSession, autoScroll, isAnimating]);
1966
+ function handleShowMore() {
1967
+ showNext(limit);
1968
+ requestAnimationFrame(() => contentRef.current.scrollTop = 0);
1969
+ }
1970
+ const reversedConvos = useMemo(
1971
+ () => [...activeSession?.conversations ?? []].reverse(),
1972
+ [activeSession]
2053
1973
  );
1974
+ const { data, hasMore, showNext } = useInfinityList({
1975
+ items: reversedConvos,
1976
+ size: limit
1977
+ });
1978
+ const reReversedConvo = useMemo(() => [...data].reverse(), [data]);
1979
+ const convosToRender = limit ? reReversedConvo : activeSession?.conversations;
1980
+ if (!activeSession) {
1981
+ return /* @__PURE__ */ jsx(SessionEmpty, { children: newSessionContent });
1982
+ }
1983
+ return /* @__PURE__ */ jsxs("div", { className: cn(theme.messages.content, className), ref: contentRef, children: [
1984
+ hasMore && /* @__PURE__ */ jsx(
1985
+ Button,
1986
+ {
1987
+ variant: "outline",
1988
+ className: cn(theme.messages.showMore),
1989
+ fullWidth: true,
1990
+ onClick: handleShowMore,
1991
+ children: showMoreText
1992
+ }
1993
+ ),
1994
+ /* @__PURE__ */ jsx(AnimatePresence, { children: /* @__PURE__ */ jsx(
1995
+ motion.div,
1996
+ {
1997
+ variants: containerVariants,
1998
+ initial: "hidden",
1999
+ animate: "visible",
2000
+ onAnimationComplete: () => {
2001
+ requestAnimationFrame(() => setIsAnimating(false));
2002
+ },
2003
+ children: children ? children(convosToRender) : convosToRender.map((conversation, index) => /* @__PURE__ */ jsx(
2004
+ SessionMessage,
2005
+ {
2006
+ conversation,
2007
+ isLast: index === conversation.length - 1
2008
+ },
2009
+ conversation.id
2010
+ ))
2011
+ },
2012
+ activeSession?.id
2013
+ ) })
2014
+ ] });
2015
+ };
2016
+ const SessionMessagesHeader = ({ children }) => {
2017
+ const { activeSession, theme } = useContext(ChatContext);
2018
+ const Comp = children ? Slot : "header";
2019
+ if (!activeSession) {
2020
+ return null;
2021
+ }
2022
+ return /* @__PURE__ */ jsx(Comp, { className: cn(theme.messages.header), children: children || /* @__PURE__ */ jsxs(Fragment, { children: [
2023
+ /* @__PURE__ */ jsx("h2", { className: cn(theme.messages.title), children: /* @__PURE__ */ jsx(Ellipsis, { limit: 125, value: activeSession.title }) }),
2024
+ /* @__PURE__ */ jsx(
2025
+ DateFormat,
2026
+ {
2027
+ className: cn(theme.messages.date),
2028
+ date: activeSession.createdAt
2029
+ }
2030
+ )
2031
+ ] }) });
2054
2032
  };
2055
2033
  const SvgPlus = (props) => /* @__PURE__ */ React.createElement("svg", { width: 17, height: 17, viewBox: "0 0 17 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React.createElement("g", { id: "add" }, /* @__PURE__ */ React.createElement("path", { id: "Vector", d: "M13.1667 9.16658H9.16671V13.1666H7.83337V9.16658H3.83337V7.83325H7.83337V3.83325H9.16671V7.83325H13.1667V9.16658Z", fill: "currentColor" })));
2056
2034
  const NewSessionButton = ({
@@ -2136,6 +2114,46 @@ function groupSessionsByDate(sessions) {
2136
2114
  )
2137
2115
  }));
2138
2116
  }
2117
+ const SvgChat = (props) => /* @__PURE__ */ React.createElement("svg", { width: 16, height: 17, viewBox: "0 0 16 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M8 3C4.55375 3 1.75 5.23753 1.75 7.98828C1.75 9.70653 2.83659 11.2762 4.62109 12.188C4.11184 13.0465 3.62587 13.7378 3.62012 13.7461C3.50687 13.9071 3.49862 14.1196 3.59912 14.2891C3.69012 14.4418 3.8543 14.5342 4.0293 14.5342C4.0483 14.5342 4.06743 14.533 4.08643 14.5308C4.15168 14.5233 5.66214 14.3364 7.50439 12.9604C7.67239 12.9712 7.8385 12.9766 8 12.9766C11.4462 12.9766 14.25 10.739 14.25 7.98828C14.25 5.23753 11.4462 3 8 3ZM8 4C10.8948 4 13.25 5.78903 13.25 7.98828C13.25 10.1875 10.8948 11.9766 8 11.9766C7.8055 11.9766 7.60225 11.968 7.396 11.9497C7.271 11.9382 7.1454 11.9752 7.0459 12.0527C6.3589 12.5855 5.72033 12.9308 5.20508 13.1528C5.38383 12.8648 5.57691 12.5418 5.76416 12.2061C5.83416 12.0813 5.84705 11.9324 5.7998 11.7974C5.75255 11.6624 5.64983 11.5542 5.51758 11.5C3.81033 10.7993 2.75 9.45328 2.75 7.98828C2.75 5.78903 5.10525 4 8 4ZM5.5 7.25C5.08575 7.25 4.75 7.58575 4.75 8C4.75 8.41425 5.08575 8.75 5.5 8.75C5.91425 8.75 6.25 8.41425 6.25 8C6.25 7.58575 5.91425 7.25 5.5 7.25ZM8 7.25C7.58575 7.25 7.25 7.58575 7.25 8C7.25 8.41425 7.58575 8.75 8 8.75C8.41425 8.75 8.75 8.41425 8.75 8C8.75 7.58575 8.41425 7.25 8 7.25ZM10.5 7.25C10.0857 7.25 9.75 7.58575 9.75 8C9.75 8.41425 10.0857 8.75 10.5 8.75C10.9143 8.75 11.25 8.41425 11.25 8C11.25 7.58575 10.9143 7.25 10.5 7.25Z", fill: "currentColor" }));
2118
+ const SvgTrash = (props) => /* @__PURE__ */ React.createElement("svg", { width: 14, height: 14, viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React.createElement("g", { id: "Delete" }, /* @__PURE__ */ React.createElement("path", { id: "Vector", d: "M5.97905 1.16666C5.90859 1.16576 5.83895 1.18189 5.77605 1.21368C5.71316 1.24547 5.65888 1.29199 5.61783 1.34926C5.57677 1.40654 5.55016 1.47288 5.54025 1.54265C5.53034 1.61242 5.53743 1.68355 5.56092 1.75H4.27007C3.7342 1.75 3.2324 2.01817 2.93535 2.46435L2.24492 3.5H2.18738C2.12941 3.49918 2.07185 3.50989 2.01805 3.5315C1.96425 3.55312 1.91529 3.58522 1.874 3.62593C1.83271 3.66663 1.79993 3.71514 1.77755 3.76863C1.75518 3.82211 1.74365 3.87952 1.74365 3.9375C1.74365 3.99548 1.75518 4.05288 1.77755 4.10636C1.79993 4.15985 1.83271 4.20836 1.874 4.24907C1.91529 4.28977 1.96425 4.32187 2.01805 4.34349C2.07185 4.3651 2.12941 4.37582 2.18738 4.375H2.41012C2.44765 4.38067 2.48576 4.38143 2.52348 4.37727L3.24468 11.1084C3.33169 11.9199 4.02367 12.5417 4.83973 12.5417H9.15947C9.97553 12.5417 10.6675 11.9199 10.7545 11.1084L11.4763 4.37727C11.5133 4.38124 11.5506 4.38047 11.5874 4.375H11.8124C11.8704 4.37582 11.9279 4.3651 11.9817 4.34349C12.0355 4.32187 12.0845 4.28977 12.1258 4.24907C12.1671 4.20836 12.1998 4.15985 12.2222 4.10636C12.2446 4.05288 12.2561 3.99548 12.2561 3.9375C12.2561 3.87952 12.2446 3.82211 12.2222 3.76863C12.1998 3.71514 12.1671 3.66663 12.1258 3.62593C12.0845 3.58522 12.0355 3.55312 11.9817 3.5315C11.9279 3.50989 11.8704 3.49918 11.8124 3.5H11.7548L11.0644 2.46435C10.7671 2.01841 10.2654 1.75 9.7297 1.75H8.43885C8.46234 1.68355 8.46943 1.61242 8.45952 1.54265C8.44961 1.47288 8.423 1.40654 8.38194 1.34926C8.34089 1.29199 8.2866 1.24547 8.22371 1.21368C8.16082 1.18189 8.09118 1.16576 8.02072 1.16666H5.97905ZM4.27007 2.625H9.7297C9.97394 2.625 10.2009 2.74639 10.3364 2.9497L10.7033 3.5H3.29651L3.66338 2.9497L3.66395 2.94913C3.79913 2.74608 4.02543 2.625 4.27007 2.625ZM3.40361 4.375H10.5962L9.88465 11.015C9.8445 11.3894 9.53575 11.6667 9.15947 11.6667H4.83973C4.46345 11.6667 4.15527 11.3894 4.11512 11.015L3.40361 4.375Z", fill: "currentColor" })));
2119
+ const SessionListItem = ({
2120
+ children,
2121
+ session,
2122
+ deletable = true,
2123
+ limit = 100,
2124
+ deleteIcon = /* @__PURE__ */ jsx(SvgTrash, {}),
2125
+ chatIcon = /* @__PURE__ */ jsx(SvgChat, { className: "mr-2" })
2126
+ }) => {
2127
+ const { activeSessionId, selectSession, deleteSession, theme } = useContext(ChatContext);
2128
+ const Comp = children ? Slot : ListItem;
2129
+ return /* @__PURE__ */ jsx(
2130
+ Comp,
2131
+ {
2132
+ dense: true,
2133
+ disableGutters: true,
2134
+ active: session.id === activeSessionId,
2135
+ className: cn(theme.sessions.session.base, {
2136
+ [theme.sessions.session.active]: session.id === activeSessionId
2137
+ }),
2138
+ onClick: () => selectSession?.(session.id),
2139
+ start: chatIcon,
2140
+ end: /* @__PURE__ */ jsx(Fragment, { children: deletable && /* @__PURE__ */ jsx(
2141
+ IconButton,
2142
+ {
2143
+ size: "small",
2144
+ variant: "ghost",
2145
+ onClick: (e) => {
2146
+ e.stopPropagation();
2147
+ deleteSession(session.id);
2148
+ },
2149
+ className: cn(theme.sessions.session.delete),
2150
+ children: deleteIcon
2151
+ }
2152
+ ) }),
2153
+ children: children || /* @__PURE__ */ jsx(Ellipsis, { value: session.title, limit })
2154
+ }
2155
+ );
2156
+ };
2139
2157
  const SessionsGroup = ({
2140
2158
  heading,
2141
2159
  children
@@ -2157,80 +2175,85 @@ const SessionsGroup = ({
2157
2175
  const SessionGroups = ({ children }) => {
2158
2176
  const { sessions } = useContext(ChatContext);
2159
2177
  const groups = useMemo(() => groupSessionsByDate(sessions), [sessions]);
2160
- return /* @__PURE__ */ jsx(Fragment, { children: children ? children(groups) : groups.map(({ heading, sessions: sessions2 }) => /* @__PURE__ */ jsx(SessionsGroup, { heading, children: sessions2.map((session) => /* @__PURE__ */ jsx(SessionListItem, { session }, session.id)) })) });
2161
- };
2162
- const AppBar = ({ content, theme = chatTheme }) => {
2163
- return /* @__PURE__ */ jsx("div", { className: cn(theme.appbar), children: content });
2178
+ return /* @__PURE__ */ jsx(Fragment, { children: children ? children(groups) : groups.map(({ heading, sessions: sessions2 }) => /* @__PURE__ */ jsx(SessionsGroup, { heading, children: sessions2.map((session) => /* @__PURE__ */ jsx(SessionListItem, { session }, session.id)) }, heading)) });
2164
2179
  };
2165
- const ChatBubble = memo(
2166
- ({
2167
- children,
2168
- bubbleContent,
2169
- position = "right-end",
2170
- modifiers = [offset({ mainAxis: 0, crossAxis: -40 })],
2171
- className
2172
- }) => {
2173
- const [isOpen, setIsOpen] = useState(false);
2174
- const ref = useRef(null);
2175
- return /* @__PURE__ */ jsxs(Fragment, { children: [
2176
- /* @__PURE__ */ jsx(
2177
- ConnectedOverlay,
2178
- {
2179
- placement: position,
2180
- modifiers,
2181
- reference: ref.current,
2182
- open: isOpen,
2183
- onOpen: () => setIsOpen(true),
2184
- onClose: () => setIsOpen(false),
2185
- content: () => /* @__PURE__ */ jsx(Fragment, { children })
2186
- }
2187
- ),
2188
- /* @__PURE__ */ jsx(
2189
- "div",
2190
- {
2191
- ref,
2192
- className,
2193
- onClick: () => setIsOpen((prev) => !prev),
2194
- children: bubbleContent
2180
+ const SessionsList = ({
2181
+ children,
2182
+ templates
2183
+ }) => {
2184
+ const { theme, isCompact, activeSessionId, createSession } = useContext(ChatContext);
2185
+ const isVisible = isCompact && !activeSessionId;
2186
+ return (!isCompact || isVisible) && /* @__PURE__ */ jsxs(
2187
+ motion.div,
2188
+ {
2189
+ initial: { translateX: "-100%" },
2190
+ animate: {
2191
+ translateX: "0%",
2192
+ transition: {
2193
+ type: "tween",
2194
+ ease: "linear",
2195
+ duration: 0.2,
2196
+ when: "beforeChildren"
2195
2197
  }
2196
- )
2197
- ] });
2198
- }
2199
- );
2198
+ },
2199
+ exit: { translateX: "-100%" },
2200
+ className: cn(theme.sessions.base, {
2201
+ [theme.sessions.companion]: isCompact,
2202
+ [theme.sessions.console]: !isCompact
2203
+ }),
2204
+ children: [
2205
+ /* @__PURE__ */ jsx(List, { children }),
2206
+ templates && !activeSessionId && /* @__PURE__ */ jsx("div", { className: "mt-4", children: templates.map((template) => /* @__PURE__ */ jsx("div", { onClick: () => createSession?.(), children: /* @__PURE__ */ jsx(
2207
+ SessionListItem,
2208
+ {
2209
+ session: {
2210
+ id: template.id,
2211
+ title: template.title,
2212
+ conversations: []
2213
+ },
2214
+ chatIcon: template.icon,
2215
+ deletable: false
2216
+ }
2217
+ ) }, template.id)) })
2218
+ ]
2219
+ }
2220
+ );
2221
+ };
2200
2222
  export {
2201
2223
  AppBar as A,
2202
- ChatBubble as B,
2203
- ChatInput as C,
2224
+ chatTheme as B,
2225
+ ChatContext as C,
2226
+ groupSessionsByDate as D,
2204
2227
  FileInput as F,
2205
- MessageSource as M,
2228
+ Markdown as M,
2206
2229
  NewSessionButton as N,
2207
2230
  SvgFile as S,
2208
2231
  TableComponent as T,
2209
2232
  SvgCopy as a,
2210
- SessionEmpty as b,
2211
- SessionMessagesHeader as c,
2212
- SessionMessagePanel as d,
2213
- SessionMessage as e,
2214
- MessageActions as f,
2215
- MessageFile as g,
2216
- MessageFiles as h,
2217
- MessageQuestion as i,
2218
- MessageResponse as j,
2219
- MessageSources as k,
2220
- SessionMessages as l,
2221
- Chat as m,
2222
- SessionsList as n,
2223
- SessionListItem as o,
2224
- SessionGroups as p,
2225
- SessionsGroup as q,
2226
- chatTheme as r,
2227
- Markdown as s,
2228
- TableHeaderCell as t,
2229
- TableDataCell as u,
2230
- CodeHighlighter as v,
2231
- remarkCve as w,
2232
- dark as x,
2233
- light as y,
2234
- ChatContext as z
2233
+ Chat as b,
2234
+ ChatBubble as c,
2235
+ ChatInput as d,
2236
+ CodeHighlighter as e,
2237
+ TableHeaderCell as f,
2238
+ TableDataCell as g,
2239
+ dark as h,
2240
+ SessionEmpty as i,
2241
+ MessageActions as j,
2242
+ MessageFile as k,
2243
+ light as l,
2244
+ MessageFiles as m,
2245
+ MessageQuestion as n,
2246
+ MessageResponse as o,
2247
+ MessageSource as p,
2248
+ MessageSources as q,
2249
+ remarkCve as r,
2250
+ SessionMessage as s,
2251
+ SessionMessagePanel as t,
2252
+ SessionMessages as u,
2253
+ SessionMessagesHeader as v,
2254
+ SessionGroups as w,
2255
+ SessionListItem as x,
2256
+ SessionsGroup as y,
2257
+ SessionsList as z
2235
2258
  };
2236
- //# sourceMappingURL=index-unCEyRCC.js.map
2259
+ //# sourceMappingURL=index-BIrmxgH5.js.map