@arbidocs/react 0.3.118 → 0.3.120

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.
@@ -0,0 +1,1486 @@
1
+ 'use strict';
2
+
3
+ var clsx = require('clsx');
4
+ var tailwindMerge = require('tailwind-merge');
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+ var React2 = require('react');
7
+ var Markdown = require('react-markdown');
8
+ var remarkGfm = require('remark-gfm');
9
+ var rehypeRaw = require('rehype-raw');
10
+ var lucideReact = require('lucide-react');
11
+ var reactDom = require('react-dom');
12
+ var AvatarPrimitive = require('@radix-ui/react-avatar');
13
+ var classVarianceAuthority = require('class-variance-authority');
14
+ var reactSlot = require('@radix-ui/react-slot');
15
+ var HoverCardPrimitive = require('@radix-ui/react-hover-card');
16
+ var SeparatorPrimitive = require('@radix-ui/react-separator');
17
+ var CollapsiblePrimitive = require('@radix-ui/react-collapsible');
18
+ var ProgressPrimitive = require('@radix-ui/react-progress');
19
+ var ScrollAreaPrimitive = require('@radix-ui/react-scroll-area');
20
+ var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
21
+ var CheckboxPrimitive = require('@radix-ui/react-checkbox');
22
+ var SwitchPrimitives = require('@radix-ui/react-switch');
23
+ var TabsPrimitive = require('@radix-ui/react-tabs');
24
+ var SliderPrimitive = require('@radix-ui/react-slider');
25
+ var TogglePrimitive = require('@radix-ui/react-toggle');
26
+ var ToggleGroupPrimitive = require('@radix-ui/react-toggle-group');
27
+ var DialogPrimitive = require('@radix-ui/react-dialog');
28
+ var PopoverPrimitive = require('@radix-ui/react-popover');
29
+ var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
30
+ var SelectPrimitive = require('@radix-ui/react-select');
31
+ var cmdk = require('cmdk');
32
+
33
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
34
+
35
+ function _interopNamespace(e) {
36
+ if (e && e.__esModule) return e;
37
+ var n = Object.create(null);
38
+ if (e) {
39
+ Object.keys(e).forEach(function (k) {
40
+ if (k !== 'default') {
41
+ var d = Object.getOwnPropertyDescriptor(e, k);
42
+ Object.defineProperty(n, k, d.get ? d : {
43
+ enumerable: true,
44
+ get: function () { return e[k]; }
45
+ });
46
+ }
47
+ });
48
+ }
49
+ n.default = e;
50
+ return Object.freeze(n);
51
+ }
52
+
53
+ var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
54
+ var Markdown__default = /*#__PURE__*/_interopDefault(Markdown);
55
+ var remarkGfm__default = /*#__PURE__*/_interopDefault(remarkGfm);
56
+ var rehypeRaw__default = /*#__PURE__*/_interopDefault(rehypeRaw);
57
+ var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
58
+ var HoverCardPrimitive__namespace = /*#__PURE__*/_interopNamespace(HoverCardPrimitive);
59
+ var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
60
+ var CollapsiblePrimitive__namespace = /*#__PURE__*/_interopNamespace(CollapsiblePrimitive);
61
+ var ProgressPrimitive__namespace = /*#__PURE__*/_interopNamespace(ProgressPrimitive);
62
+ var ScrollAreaPrimitive__namespace = /*#__PURE__*/_interopNamespace(ScrollAreaPrimitive);
63
+ var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
64
+ var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
65
+ var SwitchPrimitives__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitives);
66
+ var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
67
+ var SliderPrimitive__namespace = /*#__PURE__*/_interopNamespace(SliderPrimitive);
68
+ var TogglePrimitive__namespace = /*#__PURE__*/_interopNamespace(TogglePrimitive);
69
+ var ToggleGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(ToggleGroupPrimitive);
70
+ var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
71
+ var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
72
+ var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
73
+ var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
74
+
75
+ // src/lib/utils.ts
76
+ function cn(...inputs) {
77
+ return tailwindMerge.twMerge(clsx.clsx(inputs));
78
+ }
79
+ var markdownBaseComponents = {
80
+ h1: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-lg font-semibold", "data-testid": "markdown-heading-1", ...props, children }),
81
+ h2: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "font-semibold text-base", "data-testid": "markdown-heading-2", ...props, children }),
82
+ h3: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold text-base", "data-testid": "markdown-heading-3", ...props, children }),
83
+ h4: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold text-base", ...props, children }),
84
+ h5: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("h5", { className: "font-medium", ...props, children }),
85
+ strong: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("strong", { className: "font-semibold", ...props, children }),
86
+ blockquote: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("blockquote", { className: "border-l-2 border-primary pl-4", ...props, children }),
87
+ ol: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "list-decimal space-y-2 pl-6", "data-testid": "markdown-ordered-list", ...props, children }),
88
+ ul: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "list-none space-y-2 pl-6", "data-testid": "markdown-unordered-list", ...props, children }),
89
+ li: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "my-1.5", ...props, children }),
90
+ table: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("table", { "data-testid": "markdown-table", ...props, children }),
91
+ th: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("th", { ...props, children }),
92
+ td: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("td", { ...props, children }),
93
+ tr: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("tr", { ...props, children }),
94
+ p: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("p", { className: "whitespace-pre-wrap", ...props, children }),
95
+ hr: (props) => /* @__PURE__ */ jsxRuntime.jsx("hr", { className: "border-foreground/20", ...props }),
96
+ sup: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("sup", { className: "text-xs", ...props, children }),
97
+ sub: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("sub", { className: "text-xs", ...props, children }),
98
+ div: ({ children, className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className, ...props, children }),
99
+ br: (props) => /* @__PURE__ */ jsxRuntime.jsx("br", { ...props }),
100
+ kbd: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
101
+ "kbd",
102
+ {
103
+ className: "px-1.5 py-0.5 text-xs font-mono bg-muted border border-border rounded",
104
+ ...props,
105
+ children
106
+ }
107
+ ),
108
+ abbr: ({ children, title, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("abbr", { title, className: "underline decoration-dotted cursor-help", ...props, children }),
109
+ cite: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("cite", { className: "italic", ...props, children })
110
+ };
111
+ var MarkdownStreamingContext = React2.createContext(false);
112
+
113
+ // src/ai/split-markdown-blocks.ts
114
+ var LIST_ITEM_RE = /^\s*([-*+]|\d+[.)])\s/;
115
+ var BLOCKQUOTE_RE = /^\s*>/;
116
+ function splitMarkdownBlocks(content) {
117
+ if (!content) return [];
118
+ const blocks = [];
119
+ let start = 0;
120
+ let inFence = false;
121
+ let i = 0;
122
+ while (i < content.length) {
123
+ if (content.startsWith("```", i)) {
124
+ inFence = !inFence;
125
+ i += 3;
126
+ continue;
127
+ }
128
+ if (!inFence && content[i] === "\n" && content[i + 1] === "\n") {
129
+ const before = content.slice(start, i);
130
+ const lastLine = before.slice(before.lastIndexOf("\n") + 1);
131
+ const afterStart = i + 2;
132
+ const nextNewline = content.indexOf("\n", afterStart);
133
+ const nextLine = content.slice(afterStart, nextNewline === -1 ? void 0 : nextNewline);
134
+ const bothListItems = LIST_ITEM_RE.test(lastLine) && LIST_ITEM_RE.test(nextLine);
135
+ const bothBlockquotes = BLOCKQUOTE_RE.test(lastLine) && BLOCKQUOTE_RE.test(nextLine);
136
+ if (bothListItems || bothBlockquotes) {
137
+ i += 2;
138
+ continue;
139
+ }
140
+ blocks.push(content.slice(start, afterStart));
141
+ start = afterStart;
142
+ i = afterStart;
143
+ continue;
144
+ }
145
+ i++;
146
+ }
147
+ if (start < content.length) blocks.push(content.slice(start));
148
+ return blocks;
149
+ }
150
+ function CodeBlock({ language, code }) {
151
+ const [copied, setCopied] = React2.useState(false);
152
+ const handleCopy = async () => {
153
+ try {
154
+ await navigator.clipboard.writeText(code);
155
+ setCopied(true);
156
+ setTimeout(() => setCopied(false), 2e3);
157
+ } catch {
158
+ }
159
+ };
160
+ return /* @__PURE__ */ jsxRuntime.jsxs(
161
+ "div",
162
+ {
163
+ className: "code-block relative my-3 overflow-hidden rounded-md border border-border bg-muted",
164
+ "data-testid": "markdown-code-block",
165
+ children: [
166
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between border-b border-border px-3 py-1.5", children: [
167
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono text-xs text-muted-foreground", children: language || "code" }),
168
+ /* @__PURE__ */ jsxRuntime.jsxs(
169
+ "button",
170
+ {
171
+ type: "button",
172
+ onClick: handleCopy,
173
+ className: "flex items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground",
174
+ title: copied ? "Copied!" : "Copy code",
175
+ children: [
176
+ copied ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { size: 12 }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { size: 12 }),
177
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: copied ? "Copied" : "Copy" })
178
+ ]
179
+ }
180
+ )
181
+ ] }),
182
+ /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "overflow-x-auto p-3 text-sm leading-relaxed", children: /* @__PURE__ */ jsxRuntime.jsx("code", { className: cn("font-mono text-foreground", language && `language-${language}`), children: code }) })
183
+ ]
184
+ }
185
+ );
186
+ }
187
+ var defaultComponents = {
188
+ ...markdownBaseComponents,
189
+ a: ({ href, children, ...props }) => {
190
+ const isInternal = !href || href.startsWith("#") || href.startsWith("cite:");
191
+ return /* @__PURE__ */ jsxRuntime.jsx(
192
+ "a",
193
+ {
194
+ className: "text-primary underline underline-offset-2",
195
+ href,
196
+ ...isInternal ? {} : { target: "_blank", rel: "noopener noreferrer" },
197
+ ...props,
198
+ children
199
+ }
200
+ );
201
+ },
202
+ em: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("em", { className: "italic", ...props, children }),
203
+ code: function MarkdownCode({
204
+ className,
205
+ children,
206
+ ...props
207
+ }) {
208
+ const match = /language-(\w+)/.exec(className || "");
209
+ if (!match) {
210
+ return /* @__PURE__ */ jsxRuntime.jsx(
211
+ "code",
212
+ {
213
+ className: "rounded bg-muted px-1 py-0.5 font-mono text-[0.9em]",
214
+ "data-testid": "markdown-inline-code",
215
+ ...props,
216
+ children
217
+ }
218
+ );
219
+ }
220
+ return /* @__PURE__ */ jsxRuntime.jsx(CodeBlock, { language: match[1], code: String(children).replace(/\n$/, "") });
221
+ },
222
+ // The CodeBlock renders its own <pre>; unwrap react-markdown's wrapper so we
223
+ // don't nest <pre><pre>.
224
+ pre: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children }),
225
+ blockquote: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("blockquote", { className: "border-l-2 border-border pl-4 italic text-muted-foreground", ...props, children }),
226
+ table: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "my-3 overflow-x-auto rounded-lg border border-border", children: /* @__PURE__ */ jsxRuntime.jsx("table", { "data-testid": "markdown-table", className: "w-full border-collapse text-sm", ...props, children }) }),
227
+ thead: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("thead", { className: "bg-muted", ...props, children }),
228
+ th: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
229
+ "th",
230
+ {
231
+ className: "border-b border-border px-3 py-2 text-left font-semibold text-foreground",
232
+ ...props,
233
+ children
234
+ }
235
+ ),
236
+ td: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("td", { className: "border-b border-border px-3 py-2 align-top", ...props, children }),
237
+ // General emphasis marks (GFM `~~strikethrough~~` → <del>, raw <ins>/<mark>).
238
+ del: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("del", { className: "text-muted-foreground line-through", ...props, children }),
239
+ ins: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("ins", { className: "underline decoration-primary/60", ...props, children }),
240
+ mark: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("mark", { className: "rounded bg-primary/15 px-0.5 text-foreground", ...props, children })
241
+ };
242
+ var remarkPlugins = [remarkGfm__default.default];
243
+ var rehypePlugins = [rehypeRaw__default.default];
244
+ var MemoizedBlock = React2__namespace.default.memo(function MarkdownBlock({
245
+ content,
246
+ components
247
+ }) {
248
+ return /* @__PURE__ */ jsxRuntime.jsx(Markdown__default.default, { remarkPlugins, rehypePlugins, components, children: content });
249
+ });
250
+ var MarkdownErrorBoundary = class extends React2__namespace.default.Component {
251
+ state = { hasError: false };
252
+ static getDerivedStateFromError() {
253
+ return { hasError: true };
254
+ }
255
+ render() {
256
+ return this.state.hasError ? this.props.fallback : this.props.children;
257
+ }
258
+ };
259
+ function MarkdownRendererComponent({
260
+ children,
261
+ components: customComponents,
262
+ isStreaming = false,
263
+ className,
264
+ testId = "markdown-renderer"
265
+ }) {
266
+ const components = React2.useMemo(
267
+ () => customComponents ? { ...defaultComponents, ...customComponents } : defaultComponents,
268
+ [customComponents]
269
+ );
270
+ const blocks = React2.useMemo(() => splitMarkdownBlocks(children), [children]);
271
+ return /* @__PURE__ */ jsxRuntime.jsx(
272
+ MarkdownErrorBoundary,
273
+ {
274
+ fallback: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("whitespace-pre-wrap break-words text-foreground", className), children }),
275
+ children: /* @__PURE__ */ jsxRuntime.jsx(MarkdownStreamingContext.Provider, { value: isStreaming, children: /* @__PURE__ */ jsxRuntime.jsx(
276
+ "div",
277
+ {
278
+ className: cn(
279
+ "markdown-content space-y-3 break-words leading-relaxed text-foreground",
280
+ className
281
+ ),
282
+ "data-testid": testId,
283
+ children: blocks.map((block, index) => /* @__PURE__ */ jsxRuntime.jsx(MemoizedBlock, { content: block, components }, index))
284
+ }
285
+ ) })
286
+ }
287
+ );
288
+ }
289
+ var MarkdownRenderer = React2__namespace.default.memo(MarkdownRendererComponent);
290
+ var TooltipContext = React2__namespace.createContext(null);
291
+ var DEFAULT_DELAY = 300;
292
+ var TooltipConfigContext = React2__namespace.createContext({
293
+ delayDuration: DEFAULT_DELAY
294
+ });
295
+ var TooltipProvider = ({ children, delayDuration = DEFAULT_DELAY }) => {
296
+ const value = React2__namespace.useMemo(() => ({ delayDuration }), [delayDuration]);
297
+ return /* @__PURE__ */ jsxRuntime.jsx(TooltipConfigContext.Provider, { value, children });
298
+ };
299
+ function Tooltip({ children, delayDuration }) {
300
+ const config = React2__namespace.useContext(TooltipConfigContext);
301
+ const delay = delayDuration ?? config.delayDuration;
302
+ const [open, setOpen] = React2__namespace.useState(false);
303
+ const triggerRef = React2__namespace.useRef(null);
304
+ const timer = React2__namespace.useRef(null);
305
+ const contentId = React2__namespace.useId();
306
+ const clearTimer = () => {
307
+ if (timer.current) {
308
+ clearTimeout(timer.current);
309
+ timer.current = null;
310
+ }
311
+ };
312
+ const show = React2__namespace.useCallback(() => {
313
+ clearTimer();
314
+ timer.current = setTimeout(() => setOpen(true), delay);
315
+ }, [delay]);
316
+ const hide = React2__namespace.useCallback(() => {
317
+ clearTimer();
318
+ setOpen(false);
319
+ }, []);
320
+ const setTrigger = React2__namespace.useCallback((el) => {
321
+ triggerRef.current = el;
322
+ }, []);
323
+ React2__namespace.useEffect(() => () => clearTimer(), []);
324
+ const value = React2__namespace.useMemo(
325
+ () => ({ open, show, hide, setTrigger, triggerRef, contentId }),
326
+ [open, show, hide, setTrigger, contentId]
327
+ );
328
+ return /* @__PURE__ */ jsxRuntime.jsx(TooltipContext.Provider, { value, children });
329
+ }
330
+ function TooltipTrigger({ asChild, children, ...props }) {
331
+ const ctx = React2__namespace.useContext(TooltipContext);
332
+ if (!ctx) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
333
+ const triggerHandlers = {
334
+ onPointerEnter: (e) => {
335
+ props.onPointerEnter?.(e);
336
+ ctx.show();
337
+ },
338
+ onPointerLeave: (e) => {
339
+ props.onPointerLeave?.(e);
340
+ ctx.hide();
341
+ },
342
+ onFocus: (e) => {
343
+ props.onFocus?.(e);
344
+ ctx.show();
345
+ },
346
+ onBlur: (e) => {
347
+ props.onBlur?.(e);
348
+ ctx.hide();
349
+ },
350
+ "aria-describedby": ctx.open ? ctx.contentId : void 0,
351
+ "data-state": ctx.open ? "open" : "closed"
352
+ };
353
+ if (asChild && React2__namespace.isValidElement(children)) {
354
+ const child = children;
355
+ return React2__namespace.cloneElement(child, {
356
+ ...props,
357
+ ...triggerHandlers,
358
+ ref: ctx.setTrigger
359
+ });
360
+ }
361
+ return /* @__PURE__ */ jsxRuntime.jsx(
362
+ "button",
363
+ {
364
+ type: "button",
365
+ ...props,
366
+ ...triggerHandlers,
367
+ ref: ctx.setTrigger,
368
+ children
369
+ }
370
+ );
371
+ }
372
+ var TRANSFORM_BY_SIDE = {
373
+ top: "translate(-50%, -100%)",
374
+ bottom: "translate(-50%, 0)",
375
+ left: "translate(-100%, -50%)",
376
+ right: "translate(0, -50%)"
377
+ };
378
+ var TooltipContent = React2__namespace.forwardRef(
379
+ ({ className, side = "top", sideOffset = 4, style, ...props }, ref) => {
380
+ const ctx = React2__namespace.useContext(TooltipContext);
381
+ const innerRef = React2__namespace.useRef(null);
382
+ const [coords, setCoords] = React2__namespace.useState(null);
383
+ React2__namespace.useLayoutEffect(() => {
384
+ if (!ctx?.open || !ctx.triggerRef.current) {
385
+ setCoords(null);
386
+ return;
387
+ }
388
+ const r = ctx.triggerRef.current.getBoundingClientRect();
389
+ const c = innerRef.current?.getBoundingClientRect();
390
+ const ch = c?.height ?? 0;
391
+ const cw = c?.width ?? 0;
392
+ const vh = window.innerHeight;
393
+ const vw = window.innerWidth;
394
+ let s = side;
395
+ if (s === "top" && r.top - sideOffset - ch < 0) s = "bottom";
396
+ else if (s === "bottom" && r.bottom + sideOffset + ch > vh) s = "top";
397
+ else if (s === "left" && r.left - sideOffset - cw < 0) s = "right";
398
+ else if (s === "right" && r.right + sideOffset + cw > vw) s = "left";
399
+ setCoords({
400
+ top: s === "top" ? r.top - sideOffset : s === "bottom" ? r.bottom + sideOffset : r.top + r.height / 2,
401
+ left: s === "left" ? r.left - sideOffset : s === "right" ? r.right + sideOffset : r.left + r.width / 2,
402
+ transform: TRANSFORM_BY_SIDE[s]
403
+ });
404
+ }, [ctx?.open, side, sideOffset, ctx?.triggerRef]);
405
+ if (!ctx?.open) return null;
406
+ const setRefs = (node) => {
407
+ innerRef.current = node;
408
+ if (typeof ref === "function") ref(node);
409
+ else if (ref) ref.current = node;
410
+ };
411
+ return reactDom.createPortal(
412
+ /* @__PURE__ */ jsxRuntime.jsx(
413
+ "div",
414
+ {
415
+ ref: setRefs,
416
+ id: ctx.contentId,
417
+ role: "tooltip",
418
+ className: cn(
419
+ // The kit owns the tooltip's look: semantic tokens only, so it is
420
+ // legible in every app without one of them defining a global class.
421
+ // The `tooltip-content` hook is kept last-but-one so a host stylesheet
422
+ // can still restyle every tooltip in one place (the ARBI app does, with
423
+ // `!important` rules that win over these defaults).
424
+ "pointer-events-none max-w-[300px] break-words rounded-md border border-border bg-popover px-3 py-2 text-sm font-normal text-popover-foreground shadow-lg",
425
+ "tooltip-content",
426
+ className
427
+ ),
428
+ style: {
429
+ position: "fixed",
430
+ top: coords?.top ?? -9999,
431
+ left: coords?.left ?? -9999,
432
+ transform: coords?.transform ?? TRANSFORM_BY_SIDE[side],
433
+ opacity: coords ? void 0 : 0,
434
+ zIndex: 9999,
435
+ ...style
436
+ },
437
+ ...props
438
+ }
439
+ ),
440
+ document.body
441
+ );
442
+ }
443
+ );
444
+ TooltipContent.displayName = "TooltipContent";
445
+ var Avatar = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
446
+ AvatarPrimitive__namespace.Root,
447
+ {
448
+ ref,
449
+ className: cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className),
450
+ ...props
451
+ }
452
+ ));
453
+ Avatar.displayName = AvatarPrimitive__namespace.Root.displayName;
454
+ var AvatarImage = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
455
+ AvatarPrimitive__namespace.Image,
456
+ {
457
+ ref,
458
+ className: cn("aspect-square h-full w-full object-cover", className),
459
+ ...props
460
+ }
461
+ ));
462
+ AvatarImage.displayName = AvatarPrimitive__namespace.Image.displayName;
463
+ var AvatarFallback = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
464
+ AvatarPrimitive__namespace.Fallback,
465
+ {
466
+ ref,
467
+ className: cn(
468
+ "flex h-full w-full items-center justify-center rounded-full bg-muted",
469
+ className
470
+ ),
471
+ ...props
472
+ }
473
+ ));
474
+ AvatarFallback.displayName = AvatarPrimitive__namespace.Fallback.displayName;
475
+ var badgeVariants = classVarianceAuthority.cva(
476
+ "inline-flex items-center rounded-md border px-2.5 py-0.5 text-sm font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
477
+ {
478
+ variants: {
479
+ variant: {
480
+ default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
481
+ accent: "border-transparent bg-ai-accent-soft text-ai-accent",
482
+ secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
483
+ destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
484
+ outline: "text-foreground"
485
+ }
486
+ },
487
+ defaultVariants: {
488
+ variant: "default"
489
+ }
490
+ }
491
+ );
492
+ function Badge({ className, variant, ...props }) {
493
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(badgeVariants({ variant }), className), ...props });
494
+ }
495
+ var buttonVariants = classVarianceAuthority.cva(
496
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-base font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
497
+ {
498
+ variants: {
499
+ variant: {
500
+ default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
501
+ accent: "bg-ai-accent text-ai-accent-foreground shadow hover:bg-ai-accent/90",
502
+ destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
503
+ outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
504
+ secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
505
+ ghost: "hover:bg-accent hover:text-accent-foreground",
506
+ link: "text-primary underline-offset-4 hover:underline"
507
+ },
508
+ size: {
509
+ default: "h-9 px-4 py-2",
510
+ sm: "h-8 rounded-md px-3",
511
+ lg: "h-10 rounded-md px-8",
512
+ icon: "h-9 w-9"
513
+ }
514
+ },
515
+ defaultVariants: {
516
+ variant: "default",
517
+ size: "default"
518
+ }
519
+ }
520
+ );
521
+ var Button = React2__namespace.forwardRef(
522
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
523
+ const Comp = asChild ? reactSlot.Slot : "button";
524
+ return /* @__PURE__ */ jsxRuntime.jsx(Comp, { className: cn(buttonVariants({ variant, size, className })), ref, ...props });
525
+ }
526
+ );
527
+ Button.displayName = "Button";
528
+ var HoverCard = HoverCardPrimitive__namespace.Root;
529
+ var HoverCardTrigger = HoverCardPrimitive__namespace.Trigger;
530
+ var HoverCardContent = React2__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(HoverCardPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
531
+ HoverCardPrimitive__namespace.Content,
532
+ {
533
+ ref,
534
+ align,
535
+ sideOffset,
536
+ className: cn(
537
+ "z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-hover-card-content-transform-origin]",
538
+ className
539
+ ),
540
+ ...props
541
+ }
542
+ ) }));
543
+ HoverCardContent.displayName = HoverCardPrimitive__namespace.Content.displayName;
544
+ var cardVariants = classVarianceAuthority.cva("rounded-lg bg-card text-card-foreground", {
545
+ variants: {
546
+ variant: {
547
+ flat: "",
548
+ outline: "border",
549
+ elevated: "border shadow-sm"
550
+ }
551
+ },
552
+ defaultVariants: {
553
+ variant: "flat"
554
+ }
555
+ });
556
+ var Card = React2__namespace.forwardRef(
557
+ ({ className, variant, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
558
+ "div",
559
+ {
560
+ ref,
561
+ "data-slot": "card",
562
+ className: cn(cardVariants({ variant }), className),
563
+ ...props
564
+ }
565
+ )
566
+ );
567
+ Card.displayName = "Card";
568
+ var CardHeader = React2__namespace.forwardRef(
569
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
570
+ "div",
571
+ {
572
+ ref,
573
+ "data-slot": "card-header",
574
+ className: cn("flex flex-col space-y-1.5 p-6", className),
575
+ ...props
576
+ }
577
+ )
578
+ );
579
+ CardHeader.displayName = "CardHeader";
580
+ var CardTitle = React2__namespace.forwardRef(
581
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
582
+ "div",
583
+ {
584
+ ref,
585
+ "data-slot": "card-title",
586
+ className: cn("font-semibold leading-none tracking-tight", className),
587
+ ...props
588
+ }
589
+ )
590
+ );
591
+ CardTitle.displayName = "CardTitle";
592
+ var CardDescription = React2__namespace.forwardRef(
593
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
594
+ "div",
595
+ {
596
+ ref,
597
+ "data-slot": "card-description",
598
+ className: cn("text-sm text-muted-foreground", className),
599
+ ...props
600
+ }
601
+ )
602
+ );
603
+ CardDescription.displayName = "CardDescription";
604
+ var CardContent = React2__namespace.forwardRef(
605
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, "data-slot": "card-content", className: cn("p-6 pt-0", className), ...props })
606
+ );
607
+ CardContent.displayName = "CardContent";
608
+ var CardFooter = React2__namespace.forwardRef(
609
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
610
+ "div",
611
+ {
612
+ ref,
613
+ "data-slot": "card-footer",
614
+ className: cn("flex items-center p-6 pt-0", className),
615
+ ...props
616
+ }
617
+ )
618
+ );
619
+ CardFooter.displayName = "CardFooter";
620
+ var Input = React2__namespace.forwardRef(
621
+ ({ className, type, ...props }, ref) => {
622
+ return /* @__PURE__ */ jsxRuntime.jsx(
623
+ "input",
624
+ {
625
+ type,
626
+ "data-slot": "input",
627
+ className: cn(
628
+ "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
629
+ className
630
+ ),
631
+ ref,
632
+ ...props
633
+ }
634
+ );
635
+ }
636
+ );
637
+ Input.displayName = "Input";
638
+ var Label = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
639
+ "label",
640
+ {
641
+ ref,
642
+ className: `text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 ${className || ""}`,
643
+ ...props
644
+ }
645
+ ));
646
+ Label.displayName = "Label";
647
+ var Separator = React2__namespace.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
648
+ SeparatorPrimitive__namespace.Root,
649
+ {
650
+ ref,
651
+ decorative,
652
+ orientation,
653
+ className: cn(
654
+ "shrink-0 bg-border",
655
+ orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
656
+ className
657
+ ),
658
+ ...props
659
+ }
660
+ ));
661
+ Separator.displayName = SeparatorPrimitive__namespace.Root.displayName;
662
+ var Textarea = React2__namespace.forwardRef(
663
+ ({ className, ...props }, ref) => {
664
+ return /* @__PURE__ */ jsxRuntime.jsx(
665
+ "textarea",
666
+ {
667
+ className: cn(
668
+ "flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
669
+ className
670
+ ),
671
+ ref,
672
+ ...props
673
+ }
674
+ );
675
+ }
676
+ );
677
+ Textarea.displayName = "Textarea";
678
+ var Collapsible = CollapsiblePrimitive__namespace.Root;
679
+ var CollapsibleTrigger2 = CollapsiblePrimitive__namespace.CollapsibleTrigger;
680
+ var CollapsibleContent2 = CollapsiblePrimitive__namespace.CollapsibleContent;
681
+ var Progress = React2__namespace.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
682
+ ProgressPrimitive__namespace.Root,
683
+ {
684
+ ref,
685
+ className: cn("relative h-2 w-full overflow-hidden rounded-full bg-primary/20", className),
686
+ ...props,
687
+ children: /* @__PURE__ */ jsxRuntime.jsx(
688
+ ProgressPrimitive__namespace.Indicator,
689
+ {
690
+ className: "h-full w-full flex-1 bg-primary transition-all",
691
+ style: { transform: `translateX(-${100 - (value || 0)}%)` }
692
+ }
693
+ )
694
+ }
695
+ ));
696
+ Progress.displayName = ProgressPrimitive__namespace.Root.displayName;
697
+ var ScrollArea = React2__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
698
+ ScrollAreaPrimitive__namespace.Root,
699
+ {
700
+ ref,
701
+ className: cn("relative overflow-hidden", className),
702
+ ...props,
703
+ children: [
704
+ /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive__namespace.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
705
+ /* @__PURE__ */ jsxRuntime.jsx(ScrollBar, {}),
706
+ /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive__namespace.Corner, {})
707
+ ]
708
+ }
709
+ ));
710
+ ScrollArea.displayName = ScrollAreaPrimitive__namespace.Root.displayName;
711
+ var ScrollBar = React2__namespace.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
712
+ ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
713
+ {
714
+ ref,
715
+ orientation,
716
+ className: cn(
717
+ "flex touch-none select-none transition-colors",
718
+ orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
719
+ orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
720
+ className
721
+ ),
722
+ ...props,
723
+ children: /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive__namespace.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
724
+ }
725
+ ));
726
+ ScrollBar.displayName = ScrollAreaPrimitive__namespace.ScrollAreaScrollbar.displayName;
727
+ var RadioGroup = React2__namespace.forwardRef(({ className, ...props }, ref) => {
728
+ return /* @__PURE__ */ jsxRuntime.jsx(RadioGroupPrimitive__namespace.Root, { className: cn("grid gap-2", className), ...props, ref });
729
+ });
730
+ RadioGroup.displayName = RadioGroupPrimitive__namespace.Root.displayName;
731
+ var RadioGroupItem = React2__namespace.forwardRef(({ className, ...props }, ref) => {
732
+ return /* @__PURE__ */ jsxRuntime.jsx(
733
+ RadioGroupPrimitive__namespace.Item,
734
+ {
735
+ ref,
736
+ className: cn(
737
+ "aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
738
+ className
739
+ ),
740
+ ...props,
741
+ children: /* @__PURE__ */ jsxRuntime.jsx(RadioGroupPrimitive__namespace.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-2.5 w-2.5 fill-current text-current" }) })
742
+ }
743
+ );
744
+ });
745
+ RadioGroupItem.displayName = RadioGroupPrimitive__namespace.Item.displayName;
746
+ var Checkbox = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
747
+ CheckboxPrimitive__namespace.Root,
748
+ {
749
+ ref,
750
+ className: cn(
751
+ "peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
752
+ className
753
+ ),
754
+ ...props,
755
+ children: /* @__PURE__ */ jsxRuntime.jsx(CheckboxPrimitive__namespace.Indicator, { className: cn("flex items-center justify-center text-current"), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) })
756
+ }
757
+ ));
758
+ Checkbox.displayName = CheckboxPrimitive__namespace.Root.displayName;
759
+ var Switch = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
760
+ SwitchPrimitives__namespace.Root,
761
+ {
762
+ className: cn(
763
+ "peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
764
+ className
765
+ ),
766
+ ...props,
767
+ ref,
768
+ children: /* @__PURE__ */ jsxRuntime.jsx(
769
+ SwitchPrimitives__namespace.Thumb,
770
+ {
771
+ className: cn(
772
+ "pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
773
+ )
774
+ }
775
+ )
776
+ }
777
+ ));
778
+ Switch.displayName = SwitchPrimitives__namespace.Root.displayName;
779
+ var Tabs = TabsPrimitive__namespace.Root;
780
+ var TabsList = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
781
+ TabsPrimitive__namespace.List,
782
+ {
783
+ ref,
784
+ className: cn(
785
+ "inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
786
+ className
787
+ ),
788
+ ...props
789
+ }
790
+ ));
791
+ TabsList.displayName = TabsPrimitive__namespace.List.displayName;
792
+ var TabsTrigger = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
793
+ TabsPrimitive__namespace.Trigger,
794
+ {
795
+ ref,
796
+ className: cn(
797
+ "inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
798
+ className
799
+ ),
800
+ ...props
801
+ }
802
+ ));
803
+ TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
804
+ var TabsContent = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
805
+ TabsPrimitive__namespace.Content,
806
+ {
807
+ ref,
808
+ className: cn(
809
+ "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
810
+ className
811
+ ),
812
+ ...props
813
+ }
814
+ ));
815
+ TabsContent.displayName = TabsPrimitive__namespace.Content.displayName;
816
+ var Table = React2__namespace.forwardRef(
817
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx("table", { ref, className: cn("w-full caption-bottom text-sm", className), ...props }) })
818
+ );
819
+ Table.displayName = "Table";
820
+ var TableHeader = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
821
+ TableHeader.displayName = "TableHeader";
822
+ var TableBody = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("tbody", { ref, className: cn("[&_tr:last-child]:border-0", className), ...props }));
823
+ TableBody.displayName = "TableBody";
824
+ var TableFooter = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
825
+ "tfoot",
826
+ {
827
+ ref,
828
+ className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
829
+ ...props
830
+ }
831
+ ));
832
+ TableFooter.displayName = "TableFooter";
833
+ var TableRow = React2__namespace.forwardRef(
834
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
835
+ "tr",
836
+ {
837
+ ref,
838
+ className: cn(
839
+ "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
840
+ className
841
+ ),
842
+ ...props
843
+ }
844
+ )
845
+ );
846
+ TableRow.displayName = "TableRow";
847
+ var TableHead = React2__namespace.forwardRef(
848
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
849
+ "th",
850
+ {
851
+ ref,
852
+ className: cn(
853
+ "h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
854
+ className
855
+ ),
856
+ ...props
857
+ }
858
+ )
859
+ );
860
+ TableHead.displayName = "TableHead";
861
+ var TableCell = React2__namespace.forwardRef(
862
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
863
+ "td",
864
+ {
865
+ ref,
866
+ className: cn(
867
+ "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
868
+ className
869
+ ),
870
+ ...props
871
+ }
872
+ )
873
+ );
874
+ TableCell.displayName = "TableCell";
875
+ var TableCaption = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("caption", { ref, className: cn("mt-4 text-sm text-muted-foreground", className), ...props }));
876
+ TableCaption.displayName = "TableCaption";
877
+ var Slider = React2__namespace.forwardRef(
878
+ ({ className, rangeClassName, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
879
+ SliderPrimitive__namespace.Root,
880
+ {
881
+ ref,
882
+ className: cn("relative flex w-full touch-none select-none items-center", className),
883
+ ...props,
884
+ children: [
885
+ /* @__PURE__ */ jsxRuntime.jsx(SliderPrimitive__namespace.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20", children: /* @__PURE__ */ jsxRuntime.jsx(SliderPrimitive__namespace.Range, { className: cn("absolute h-full bg-primary", rangeClassName) }) }),
886
+ /* @__PURE__ */ jsxRuntime.jsx(SliderPrimitive__namespace.Thumb, { className: "block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50" })
887
+ ]
888
+ }
889
+ )
890
+ );
891
+ Slider.displayName = SliderPrimitive__namespace.Root.displayName;
892
+ var toggleVariants = classVarianceAuthority.cva(
893
+ "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
894
+ {
895
+ variants: {
896
+ variant: {
897
+ default: "bg-transparent",
898
+ outline: "border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"
899
+ },
900
+ size: {
901
+ default: "h-9 px-2 min-w-9",
902
+ sm: "h-8 px-1.5 min-w-8",
903
+ lg: "h-10 px-2.5 min-w-10"
904
+ }
905
+ },
906
+ defaultVariants: {
907
+ variant: "default",
908
+ size: "default"
909
+ }
910
+ }
911
+ );
912
+ var Toggle = React2__namespace.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
913
+ TogglePrimitive__namespace.Root,
914
+ {
915
+ ref,
916
+ className: cn(toggleVariants({ variant, size, className })),
917
+ ...props
918
+ }
919
+ ));
920
+ Toggle.displayName = TogglePrimitive__namespace.Root.displayName;
921
+ var ToggleGroupContext = React2__namespace.createContext({
922
+ size: "default",
923
+ variant: "default"
924
+ });
925
+ var ToggleGroup = React2__namespace.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
926
+ ToggleGroupPrimitive__namespace.Root,
927
+ {
928
+ ref,
929
+ className: cn("flex items-center justify-center gap-1", className),
930
+ ...props,
931
+ children: /* @__PURE__ */ jsxRuntime.jsx(ToggleGroupContext.Provider, { value: { variant, size }, children })
932
+ }
933
+ ));
934
+ ToggleGroup.displayName = ToggleGroupPrimitive__namespace.Root.displayName;
935
+ var ToggleGroupItem = React2__namespace.forwardRef(({ className, children, variant, size, ...props }, ref) => {
936
+ const context = React2__namespace.useContext(ToggleGroupContext);
937
+ return /* @__PURE__ */ jsxRuntime.jsx(
938
+ ToggleGroupPrimitive__namespace.Item,
939
+ {
940
+ ref,
941
+ className: cn(
942
+ toggleVariants({
943
+ variant: context.variant || variant,
944
+ size: context.size || size
945
+ }),
946
+ className
947
+ ),
948
+ ...props,
949
+ children
950
+ }
951
+ );
952
+ });
953
+ ToggleGroupItem.displayName = ToggleGroupPrimitive__namespace.Item.displayName;
954
+ var Dialog = DialogPrimitive__namespace.Root;
955
+ var DialogTrigger = DialogPrimitive__namespace.Trigger;
956
+ var DialogPortal = DialogPrimitive__namespace.Portal;
957
+ var DialogClose = DialogPrimitive__namespace.Close;
958
+ var DialogOverlay = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
959
+ DialogPrimitive__namespace.Overlay,
960
+ {
961
+ ref,
962
+ className: cn(
963
+ "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
964
+ className
965
+ ),
966
+ ...props
967
+ }
968
+ ));
969
+ DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
970
+ var DialogContent = React2__namespace.forwardRef(({ className, children, hideCloseButton, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
971
+ /* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
972
+ /* @__PURE__ */ jsxRuntime.jsxs(
973
+ DialogPrimitive__namespace.Content,
974
+ {
975
+ ref,
976
+ className: cn(
977
+ "fixed left-[50%] top-[50%] z-50 grid w-[calc(100%-2rem)] max-w-lg max-h-[90vh] translate-x-[-50%] translate-y-[-50%] gap-4 overflow-y-auto border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 rounded-md",
978
+ className
979
+ ),
980
+ ...props,
981
+ children: [
982
+ children,
983
+ !hideCloseButton && /* @__PURE__ */ jsxRuntime.jsxs(
984
+ DialogPrimitive__namespace.Close,
985
+ {
986
+ className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
987
+ "data-testid": "dialog-close-button",
988
+ children: [
989
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }),
990
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close dialog" })
991
+ ]
992
+ }
993
+ )
994
+ ]
995
+ }
996
+ )
997
+ ] }));
998
+ DialogContent.displayName = DialogPrimitive__namespace.Content.displayName;
999
+ var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
1000
+ DialogHeader.displayName = "DialogHeader";
1001
+ var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
1002
+ "div",
1003
+ {
1004
+ className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
1005
+ ...props
1006
+ }
1007
+ );
1008
+ DialogFooter.displayName = "DialogFooter";
1009
+ var DialogTitle = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1010
+ DialogPrimitive__namespace.Title,
1011
+ {
1012
+ ref,
1013
+ className: cn("text-lg font-semibold leading-none tracking-tight", className),
1014
+ ...props
1015
+ }
1016
+ ));
1017
+ DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
1018
+ var DialogDescription = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1019
+ DialogPrimitive__namespace.Description,
1020
+ {
1021
+ ref,
1022
+ className: cn("text-sm text-muted-foreground", className),
1023
+ ...props
1024
+ }
1025
+ ));
1026
+ DialogDescription.displayName = DialogPrimitive__namespace.Description.displayName;
1027
+ var Popover = PopoverPrimitive__namespace.Root;
1028
+ var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
1029
+ var PopoverAnchor = PopoverPrimitive__namespace.Anchor;
1030
+ var PopoverContent = React2__namespace.forwardRef(({ className, align = "center", sideOffset = 4, container, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { container: container ?? void 0, children: /* @__PURE__ */ jsxRuntime.jsx(
1031
+ PopoverPrimitive__namespace.Content,
1032
+ {
1033
+ ref,
1034
+ align,
1035
+ sideOffset,
1036
+ className: cn(
1037
+ "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",
1038
+ className
1039
+ ),
1040
+ ...props
1041
+ }
1042
+ ) }));
1043
+ PopoverContent.displayName = PopoverPrimitive__namespace.Content.displayName;
1044
+ var DropdownMenu = DropdownMenuPrimitive__namespace.Root;
1045
+ var DropdownMenuTrigger = DropdownMenuPrimitive__namespace.Trigger;
1046
+ var DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
1047
+ var DropdownMenuPortal = DropdownMenuPrimitive__namespace.Portal;
1048
+ var DropdownMenuSub = DropdownMenuPrimitive__namespace.Sub;
1049
+ var DropdownMenuRadioGroup = DropdownMenuPrimitive__namespace.RadioGroup;
1050
+ var DropdownMenuSubTrigger = React2__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
1051
+ DropdownMenuPrimitive__namespace.SubTrigger,
1052
+ {
1053
+ ref,
1054
+ className: cn(
1055
+ "flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
1056
+ inset && "pl-8",
1057
+ className
1058
+ ),
1059
+ ...props,
1060
+ children: [
1061
+ children,
1062
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "ml-auto" })
1063
+ ]
1064
+ }
1065
+ ));
1066
+ DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive__namespace.SubTrigger.displayName;
1067
+ var DropdownMenuSubContent = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1068
+ DropdownMenuPrimitive__namespace.SubContent,
1069
+ {
1070
+ ref,
1071
+ className: cn(
1072
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",
1073
+ className
1074
+ ),
1075
+ ...props
1076
+ }
1077
+ ));
1078
+ DropdownMenuSubContent.displayName = DropdownMenuPrimitive__namespace.SubContent.displayName;
1079
+ var DropdownMenuContent = React2__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
1080
+ DropdownMenuPrimitive__namespace.Content,
1081
+ {
1082
+ ref,
1083
+ sideOffset,
1084
+ className: cn(
1085
+ "z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
1086
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",
1087
+ className
1088
+ ),
1089
+ ...props
1090
+ }
1091
+ ) }));
1092
+ DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
1093
+ var DropdownMenuItem = React2__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1094
+ DropdownMenuPrimitive__namespace.Item,
1095
+ {
1096
+ ref,
1097
+ className: cn(
1098
+ "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
1099
+ inset && "pl-8",
1100
+ className
1101
+ ),
1102
+ ...props
1103
+ }
1104
+ ));
1105
+ DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
1106
+ var DropdownMenuCheckboxItem = React2__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
1107
+ DropdownMenuPrimitive__namespace.CheckboxItem,
1108
+ {
1109
+ ref,
1110
+ className: cn(
1111
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1112
+ className
1113
+ ),
1114
+ checked,
1115
+ ...props,
1116
+ children: [
1117
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-4 w-4 items-center justify-center rounded border border-border bg-popover", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-3.5 w-3.5 text-primary" }) }) }),
1118
+ children
1119
+ ]
1120
+ }
1121
+ ));
1122
+ DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive__namespace.CheckboxItem.displayName;
1123
+ var DropdownMenuRadioItem = React2__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
1124
+ DropdownMenuPrimitive__namespace.RadioItem,
1125
+ {
1126
+ ref,
1127
+ className: cn(
1128
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1129
+ className
1130
+ ),
1131
+ ...props,
1132
+ children: [
1133
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-2 w-2 fill-current" }) }) }),
1134
+ children
1135
+ ]
1136
+ }
1137
+ ));
1138
+ DropdownMenuRadioItem.displayName = DropdownMenuPrimitive__namespace.RadioItem.displayName;
1139
+ var DropdownMenuLabel = React2__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1140
+ DropdownMenuPrimitive__namespace.Label,
1141
+ {
1142
+ ref,
1143
+ className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className),
1144
+ ...props
1145
+ }
1146
+ ));
1147
+ DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
1148
+ var DropdownMenuSeparator = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1149
+ DropdownMenuPrimitive__namespace.Separator,
1150
+ {
1151
+ ref,
1152
+ className: cn("-mx-1 my-1 h-px bg-muted", className),
1153
+ ...props
1154
+ }
1155
+ ));
1156
+ DropdownMenuSeparator.displayName = DropdownMenuPrimitive__namespace.Separator.displayName;
1157
+ var DropdownMenuShortcut = ({ className, ...props }) => {
1158
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("ml-auto text-sm tracking-widest opacity-60", className), ...props });
1159
+ };
1160
+ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
1161
+ var Select = SelectPrimitive__namespace.Root;
1162
+ var SelectGroup = SelectPrimitive__namespace.Group;
1163
+ var SelectValue = SelectPrimitive__namespace.Value;
1164
+ var SelectTrigger = React2__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
1165
+ SelectPrimitive__namespace.Trigger,
1166
+ {
1167
+ ref,
1168
+ className: cn(
1169
+ "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
1170
+ className
1171
+ ),
1172
+ ...props,
1173
+ children: [
1174
+ children,
1175
+ /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4 opacity-50" }) })
1176
+ ]
1177
+ }
1178
+ ));
1179
+ SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
1180
+ var SelectScrollUpButton = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1181
+ SelectPrimitive__namespace.ScrollUpButton,
1182
+ {
1183
+ ref,
1184
+ className: cn("flex cursor-default items-center justify-center py-1", className),
1185
+ ...props,
1186
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUp, { className: "h-4 w-4" })
1187
+ }
1188
+ ));
1189
+ SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
1190
+ var SelectScrollDownButton = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1191
+ SelectPrimitive__namespace.ScrollDownButton,
1192
+ {
1193
+ ref,
1194
+ className: cn("flex cursor-default items-center justify-center py-1", className),
1195
+ ...props,
1196
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4" })
1197
+ }
1198
+ ));
1199
+ SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
1200
+ var SelectContent = React2__namespace.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
1201
+ SelectPrimitive__namespace.Content,
1202
+ {
1203
+ ref,
1204
+ className: cn(
1205
+ "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1206
+ position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
1207
+ className
1208
+ ),
1209
+ position,
1210
+ ...props,
1211
+ children: [
1212
+ /* @__PURE__ */ jsxRuntime.jsx(SelectScrollUpButton, {}),
1213
+ /* @__PURE__ */ jsxRuntime.jsx(
1214
+ SelectPrimitive__namespace.Viewport,
1215
+ {
1216
+ className: cn(
1217
+ "p-1",
1218
+ position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
1219
+ ),
1220
+ children
1221
+ }
1222
+ ),
1223
+ /* @__PURE__ */ jsxRuntime.jsx(SelectScrollDownButton, {})
1224
+ ]
1225
+ }
1226
+ ) }));
1227
+ SelectContent.displayName = SelectPrimitive__namespace.Content.displayName;
1228
+ var SelectLabel = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1229
+ SelectPrimitive__namespace.Label,
1230
+ {
1231
+ ref,
1232
+ className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
1233
+ ...props
1234
+ }
1235
+ ));
1236
+ SelectLabel.displayName = SelectPrimitive__namespace.Label.displayName;
1237
+ var SelectItem = React2__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
1238
+ SelectPrimitive__namespace.Item,
1239
+ {
1240
+ ref,
1241
+ className: cn(
1242
+ "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1243
+ className
1244
+ ),
1245
+ ...props,
1246
+ children: [
1247
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) }) }),
1248
+ /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemText, { children })
1249
+ ]
1250
+ }
1251
+ ));
1252
+ SelectItem.displayName = SelectPrimitive__namespace.Item.displayName;
1253
+ var SelectSeparator = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1254
+ SelectPrimitive__namespace.Separator,
1255
+ {
1256
+ ref,
1257
+ className: cn("-mx-1 my-1 h-px bg-muted", className),
1258
+ ...props
1259
+ }
1260
+ ));
1261
+ SelectSeparator.displayName = SelectPrimitive__namespace.Separator.displayName;
1262
+ var Command = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1263
+ cmdk.Command,
1264
+ {
1265
+ ref,
1266
+ className: cn(
1267
+ "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
1268
+ className
1269
+ ),
1270
+ ...props
1271
+ }
1272
+ ));
1273
+ Command.displayName = cmdk.Command.displayName;
1274
+ var CommandDialog = ({ children, ...props }) => {
1275
+ return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { ...props, children: /* @__PURE__ */ jsxRuntime.jsx(DialogContent, { className: "overflow-hidden p-0", children: /* @__PURE__ */ jsxRuntime.jsx(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) }) });
1276
+ };
1277
+ var CommandInput = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center border-b px-3", "data-cmdk-input-wrapper": "", children: [
1278
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
1279
+ /* @__PURE__ */ jsxRuntime.jsx(
1280
+ cmdk.Command.Input,
1281
+ {
1282
+ ref,
1283
+ className: cn(
1284
+ "flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
1285
+ className
1286
+ ),
1287
+ ...props
1288
+ }
1289
+ )
1290
+ ] }));
1291
+ CommandInput.displayName = cmdk.Command.Input.displayName;
1292
+ var CommandList = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1293
+ cmdk.Command.List,
1294
+ {
1295
+ ref,
1296
+ className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className),
1297
+ ...props
1298
+ }
1299
+ ));
1300
+ CommandList.displayName = cmdk.Command.List.displayName;
1301
+ var CommandEmpty = React2__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(cmdk.Command.Empty, { ref, className: "py-6 text-center text-sm", ...props }));
1302
+ CommandEmpty.displayName = cmdk.Command.Empty.displayName;
1303
+ var CommandGroup = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1304
+ cmdk.Command.Group,
1305
+ {
1306
+ ref,
1307
+ className: cn(
1308
+ "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-sm [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
1309
+ className
1310
+ ),
1311
+ ...props
1312
+ }
1313
+ ));
1314
+ CommandGroup.displayName = cmdk.Command.Group.displayName;
1315
+ var CommandSeparator = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1316
+ cmdk.Command.Separator,
1317
+ {
1318
+ ref,
1319
+ className: cn("-mx-1 h-px bg-border", className),
1320
+ ...props
1321
+ }
1322
+ ));
1323
+ CommandSeparator.displayName = cmdk.Command.Separator.displayName;
1324
+ var CommandItem = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1325
+ cmdk.Command.Item,
1326
+ {
1327
+ ref,
1328
+ className: cn(
1329
+ "relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
1330
+ className
1331
+ ),
1332
+ ...props
1333
+ }
1334
+ ));
1335
+ CommandItem.displayName = cmdk.Command.Item.displayName;
1336
+ var CommandShortcut = ({ className, ...props }) => {
1337
+ return /* @__PURE__ */ jsxRuntime.jsx(
1338
+ "span",
1339
+ {
1340
+ className: cn("ml-auto text-sm tracking-widest text-muted-foreground", className),
1341
+ ...props
1342
+ }
1343
+ );
1344
+ };
1345
+ CommandShortcut.displayName = "CommandShortcut";
1346
+ var AI_COMPONENTS = {
1347
+ a: (p) => /* @__PURE__ */ jsxRuntime.jsx(
1348
+ "a",
1349
+ {
1350
+ className: "text-ai-accent underline underline-offset-2",
1351
+ target: "_blank",
1352
+ rel: "noopener noreferrer",
1353
+ ...p
1354
+ }
1355
+ ),
1356
+ // Redline marks: deletions in red strike, <ins>/<mark> additions accented.
1357
+ del: (p) => /* @__PURE__ */ jsxRuntime.jsx("del", { className: "rounded bg-destructive/10 text-destructive decoration-destructive/60", ...p }),
1358
+ ins: (p) => /* @__PURE__ */ jsxRuntime.jsx("ins", { className: "rounded bg-ai-accent-soft px-0.5 text-ai-accent no-underline", ...p }),
1359
+ mark: (p) => /* @__PURE__ */ jsxRuntime.jsx("mark", { className: "rounded bg-ai-accent-soft px-0.5 text-ai-accent", ...p }),
1360
+ thead: (p) => /* @__PURE__ */ jsxRuntime.jsx("thead", { className: "bg-secondary/60", ...p })
1361
+ };
1362
+ function AiMarkdown({
1363
+ children,
1364
+ className,
1365
+ isStreaming
1366
+ }) {
1367
+ return /* @__PURE__ */ jsxRuntime.jsx(
1368
+ MarkdownRenderer,
1369
+ {
1370
+ className: className ?? "text-sm text-foreground",
1371
+ components: AI_COMPONENTS,
1372
+ isStreaming,
1373
+ testId: "ai-markdown",
1374
+ children
1375
+ }
1376
+ );
1377
+ }
1378
+
1379
+ exports.AiMarkdown = AiMarkdown;
1380
+ exports.Avatar = Avatar;
1381
+ exports.AvatarFallback = AvatarFallback;
1382
+ exports.AvatarImage = AvatarImage;
1383
+ exports.Badge = Badge;
1384
+ exports.Button = Button;
1385
+ exports.Card = Card;
1386
+ exports.CardContent = CardContent;
1387
+ exports.CardDescription = CardDescription;
1388
+ exports.CardFooter = CardFooter;
1389
+ exports.CardHeader = CardHeader;
1390
+ exports.CardTitle = CardTitle;
1391
+ exports.Checkbox = Checkbox;
1392
+ exports.Collapsible = Collapsible;
1393
+ exports.CollapsibleContent = CollapsibleContent2;
1394
+ exports.CollapsibleTrigger = CollapsibleTrigger2;
1395
+ exports.Command = Command;
1396
+ exports.CommandDialog = CommandDialog;
1397
+ exports.CommandEmpty = CommandEmpty;
1398
+ exports.CommandGroup = CommandGroup;
1399
+ exports.CommandInput = CommandInput;
1400
+ exports.CommandItem = CommandItem;
1401
+ exports.CommandList = CommandList;
1402
+ exports.CommandSeparator = CommandSeparator;
1403
+ exports.CommandShortcut = CommandShortcut;
1404
+ exports.Dialog = Dialog;
1405
+ exports.DialogClose = DialogClose;
1406
+ exports.DialogContent = DialogContent;
1407
+ exports.DialogDescription = DialogDescription;
1408
+ exports.DialogFooter = DialogFooter;
1409
+ exports.DialogHeader = DialogHeader;
1410
+ exports.DialogOverlay = DialogOverlay;
1411
+ exports.DialogPortal = DialogPortal;
1412
+ exports.DialogTitle = DialogTitle;
1413
+ exports.DialogTrigger = DialogTrigger;
1414
+ exports.DropdownMenu = DropdownMenu;
1415
+ exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
1416
+ exports.DropdownMenuContent = DropdownMenuContent;
1417
+ exports.DropdownMenuGroup = DropdownMenuGroup;
1418
+ exports.DropdownMenuItem = DropdownMenuItem;
1419
+ exports.DropdownMenuLabel = DropdownMenuLabel;
1420
+ exports.DropdownMenuPortal = DropdownMenuPortal;
1421
+ exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup;
1422
+ exports.DropdownMenuRadioItem = DropdownMenuRadioItem;
1423
+ exports.DropdownMenuSeparator = DropdownMenuSeparator;
1424
+ exports.DropdownMenuShortcut = DropdownMenuShortcut;
1425
+ exports.DropdownMenuSub = DropdownMenuSub;
1426
+ exports.DropdownMenuSubContent = DropdownMenuSubContent;
1427
+ exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
1428
+ exports.DropdownMenuTrigger = DropdownMenuTrigger;
1429
+ exports.HoverCard = HoverCard;
1430
+ exports.HoverCardContent = HoverCardContent;
1431
+ exports.HoverCardTrigger = HoverCardTrigger;
1432
+ exports.Input = Input;
1433
+ exports.Label = Label;
1434
+ exports.MarkdownRenderer = MarkdownRenderer;
1435
+ exports.MarkdownStreamingContext = MarkdownStreamingContext;
1436
+ exports.Popover = Popover;
1437
+ exports.PopoverAnchor = PopoverAnchor;
1438
+ exports.PopoverContent = PopoverContent;
1439
+ exports.PopoverTrigger = PopoverTrigger;
1440
+ exports.Progress = Progress;
1441
+ exports.RadioGroup = RadioGroup;
1442
+ exports.RadioGroupItem = RadioGroupItem;
1443
+ exports.ScrollArea = ScrollArea;
1444
+ exports.ScrollBar = ScrollBar;
1445
+ exports.Select = Select;
1446
+ exports.SelectContent = SelectContent;
1447
+ exports.SelectGroup = SelectGroup;
1448
+ exports.SelectItem = SelectItem;
1449
+ exports.SelectLabel = SelectLabel;
1450
+ exports.SelectScrollDownButton = SelectScrollDownButton;
1451
+ exports.SelectScrollUpButton = SelectScrollUpButton;
1452
+ exports.SelectSeparator = SelectSeparator;
1453
+ exports.SelectTrigger = SelectTrigger;
1454
+ exports.SelectValue = SelectValue;
1455
+ exports.Separator = Separator;
1456
+ exports.Slider = Slider;
1457
+ exports.Switch = Switch;
1458
+ exports.Table = Table;
1459
+ exports.TableBody = TableBody;
1460
+ exports.TableCaption = TableCaption;
1461
+ exports.TableCell = TableCell;
1462
+ exports.TableFooter = TableFooter;
1463
+ exports.TableHead = TableHead;
1464
+ exports.TableHeader = TableHeader;
1465
+ exports.TableRow = TableRow;
1466
+ exports.Tabs = Tabs;
1467
+ exports.TabsContent = TabsContent;
1468
+ exports.TabsList = TabsList;
1469
+ exports.TabsTrigger = TabsTrigger;
1470
+ exports.Textarea = Textarea;
1471
+ exports.Toggle = Toggle;
1472
+ exports.ToggleGroup = ToggleGroup;
1473
+ exports.ToggleGroupItem = ToggleGroupItem;
1474
+ exports.Tooltip = Tooltip;
1475
+ exports.TooltipContent = TooltipContent;
1476
+ exports.TooltipProvider = TooltipProvider;
1477
+ exports.TooltipTrigger = TooltipTrigger;
1478
+ exports.badgeVariants = badgeVariants;
1479
+ exports.buttonVariants = buttonVariants;
1480
+ exports.cardVariants = cardVariants;
1481
+ exports.cn = cn;
1482
+ exports.markdownBaseComponents = markdownBaseComponents;
1483
+ exports.splitMarkdownBlocks = splitMarkdownBlocks;
1484
+ exports.toggleVariants = toggleVariants;
1485
+ //# sourceMappingURL=chunk-ZBZKHBDS.cjs.map
1486
+ //# sourceMappingURL=chunk-ZBZKHBDS.cjs.map