@wealthx/shadcn 1.5.33 → 1.5.35

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.
@@ -57,6 +57,10 @@ import {
57
57
  cn,
58
58
  getInitials
59
59
  } from "./chunk-AFML43VJ.mjs";
60
+ import {
61
+ __spreadProps,
62
+ __spreadValues
63
+ } from "./chunk-WNQUEZJF.mjs";
60
64
 
61
65
  // src/components/ui/ai-conversations/index.tsx
62
66
  import { useState } from "react";
@@ -178,8 +182,8 @@ function ConversationListItem({
178
182
  function filterConversations(conversations, query, filter, channelFilter) {
179
183
  const q = query.toLowerCase();
180
184
  return conversations.filter((c) => {
181
- var _a, _b;
182
- const matchesFilter = filter === "all" || (filter === "emails" ? ((_a = c.channel) != null ? _a : "chat") === "email" : c.status === filter);
185
+ var _a2, _b;
186
+ const matchesFilter = filter === "all" || (filter === "emails" ? ((_a2 = c.channel) != null ? _a2 : "chat") === "email" : c.status === filter);
183
187
  const matchesChannel = channelFilter === "all" || ((_b = c.channel) != null ? _b : "chat") === channelFilter;
184
188
  const matchesSearch = !q || c.contact.name.toLowerCase().includes(q) || c.lastMessage.toLowerCase().includes(q);
185
189
  return matchesFilter && matchesChannel && matchesSearch;
@@ -316,14 +320,11 @@ import { useEditor, EditorContent } from "@tiptap/react";
316
320
  import StarterKit from "@tiptap/starter-kit";
317
321
  import TiptapUnderline from "@tiptap/extension-underline";
318
322
  import TiptapLink from "@tiptap/extension-link";
319
- import ReactMarkdown from "react-markdown";
320
- import rehypeRaw from "rehype-raw";
321
- import rehypeSanitize, { defaultSchema } from "rehype-sanitize";
322
323
  import {
323
324
  Archive,
324
325
  ArrowLeft,
325
326
  Bold,
326
- Bot,
327
+ Bot as Bot2,
327
328
  ChevronDown,
328
329
  ChevronRight,
329
330
  Flag as Flag2,
@@ -338,8 +339,18 @@ import {
338
339
  Underline,
339
340
  UserCheck
340
341
  } from "lucide-react";
341
- import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
342
- function BubbleAvatar({
342
+
343
+ // src/components/ui/ai-conversations/bubble.tsx
344
+ import ReactMarkdown from "react-markdown";
345
+ import rehypeRaw from "rehype-raw";
346
+ import rehypeSanitize, { defaultSchema } from "rehype-sanitize";
347
+ import { Bot } from "lucide-react";
348
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
349
+ var _a;
350
+ var EMAIL_SANITIZE_SCHEMA = __spreadProps(__spreadValues({}, defaultSchema), {
351
+ strip: ["script", "style", "head", ...(_a = defaultSchema.strip) != null ? _a : []]
352
+ });
353
+ function BubbleAvatar2({
343
354
  role,
344
355
  senderName
345
356
  }) {
@@ -351,16 +362,21 @@ function BubbleAvatar({
351
362
  }
352
363
  return /* @__PURE__ */ jsx3(Avatar, { size: "sm", children: /* @__PURE__ */ jsx3(AvatarFallback, { children: getInitials(senderName != null ? senderName : "?") }) });
353
364
  }
354
- function ChatBubble({ message, channel, className }) {
355
- const { role, content, timestamp, senderName, subject } = message;
356
- const isEmail = channel === "email";
357
- if (role === "system") {
358
- return /* @__PURE__ */ jsxs2("div", { className: cn("my-2 flex items-center gap-3 px-2", className), children: [
359
- /* @__PURE__ */ jsx3(Separator, { className: "flex-1" }),
360
- /* @__PURE__ */ jsx3("span", { className: "shrink-0 text-caption text-muted-foreground", children: content }),
361
- /* @__PURE__ */ jsx3(Separator, { className: "flex-1" })
362
- ] });
363
- }
365
+ function SystemDivider({
366
+ content,
367
+ className
368
+ }) {
369
+ return /* @__PURE__ */ jsxs2("div", { className: cn("my-2 flex items-center gap-3 px-2", className), children: [
370
+ /* @__PURE__ */ jsx3(Separator, { className: "flex-1" }),
371
+ /* @__PURE__ */ jsx3("span", { className: "shrink-0 text-caption text-muted-foreground", children: content }),
372
+ /* @__PURE__ */ jsx3(Separator, { className: "flex-1" })
373
+ ] });
374
+ }
375
+ function ChatMessageBubble({
376
+ message,
377
+ className
378
+ }) {
379
+ const { role, content, timestamp, senderName } = message;
364
380
  const isAdvisor = role === "advisor";
365
381
  const isBot = role === "bot";
366
382
  const isVisitor = role === "visitor";
@@ -374,13 +390,65 @@ function ChatBubble({ message, channel, className }) {
374
390
  className
375
391
  ),
376
392
  children: [
377
- /* @__PURE__ */ jsx3(BubbleAvatar, { role, senderName }),
393
+ /* @__PURE__ */ jsx3(BubbleAvatar2, { role, senderName }),
378
394
  /* @__PURE__ */ jsxs2(
379
395
  "div",
380
396
  {
381
397
  className: cn(
382
- "flex flex-col gap-1",
383
- isEmail ? "max-w-[85%] w-full" : "max-w-[70%]",
398
+ "flex max-w-[70%] flex-col gap-1",
399
+ isAdvisor && "items-end"
400
+ ),
401
+ children: [
402
+ /* @__PURE__ */ jsx3("span", { className: "text-caption text-muted-foreground", children: displayName }),
403
+ /* @__PURE__ */ jsx3(
404
+ "div",
405
+ {
406
+ className: cn(
407
+ "break-words px-3 py-2 text-sm leading-relaxed [&_a]:underline [&_p]:m-0",
408
+ isBot && "border border-border bg-muted/60 text-foreground [&_a]:text-primary",
409
+ isVisitor && "border border-border bg-background text-foreground [&_a]:text-primary",
410
+ isAdvisor && "bg-primary text-primary-foreground [&_a]:text-primary-foreground"
411
+ ),
412
+ children: /* @__PURE__ */ jsx3(
413
+ ReactMarkdown,
414
+ {
415
+ rehypePlugins: [rehypeRaw, [rehypeSanitize, defaultSchema]],
416
+ children: content
417
+ }
418
+ )
419
+ }
420
+ ),
421
+ timestamp && /* @__PURE__ */ jsx3("span", { className: "text-caption text-muted-foreground", children: timestamp })
422
+ ]
423
+ }
424
+ )
425
+ ]
426
+ }
427
+ );
428
+ }
429
+ function EmailMessageBubble({
430
+ message,
431
+ className
432
+ }) {
433
+ const { role, content, timestamp, senderName, subject } = message;
434
+ const isAdvisor = role === "advisor";
435
+ const isBot = role === "bot";
436
+ const displayName = isBot ? "AI Assistant" : isAdvisor ? senderName != null ? senderName : "Advisor" : senderName != null ? senderName : "Lead";
437
+ return /* @__PURE__ */ jsxs2(
438
+ "div",
439
+ {
440
+ className: cn(
441
+ "flex gap-2.5",
442
+ isAdvisor ? "flex-row-reverse" : "flex-row",
443
+ className
444
+ ),
445
+ children: [
446
+ /* @__PURE__ */ jsx3(BubbleAvatar2, { role, senderName }),
447
+ /* @__PURE__ */ jsxs2(
448
+ "div",
449
+ {
450
+ className: cn(
451
+ "flex w-full max-w-[85%] flex-col gap-1",
384
452
  isAdvisor && "items-end"
385
453
  ),
386
454
  children: [
@@ -389,29 +457,22 @@ function ChatBubble({ message, channel, className }) {
389
457
  "div",
390
458
  {
391
459
  className: cn(
392
- "text-sm leading-relaxed break-words",
393
- !isEmail && "px-3 py-2 [&_p]:m-0 [&_a]:underline",
394
- isEmail && [
395
- "border border-border bg-background px-4 py-3 w-full",
396
- "[&_p]:mb-2 [&_p:last-child]:mb-0",
397
- "[&_ul]:mb-2 [&_ul]:list-disc [&_ul]:pl-4",
398
- "[&_ol]:mb-2 [&_ol]:list-decimal [&_ol]:pl-4",
399
- "[&_li]:mb-0.5",
400
- "[&_h1]:mb-2 [&_h1]:text-sm [&_h1]:font-bold",
401
- "[&_h2]:mb-1.5 [&_h2]:text-sm [&_h2]:font-semibold",
402
- "[&_h3]:mb-1 [&_h3]:text-sm [&_h3]:font-medium",
403
- "[&_strong]:font-semibold [&_em]:italic",
404
- "[&_a]:underline [&_a]:text-primary",
405
- "[&_blockquote]:border-l-2 [&_blockquote]:border-border [&_blockquote]:pl-3 [&_blockquote]:text-muted-foreground [&_blockquote]:italic",
406
- "[&_hr]:my-3 [&_hr]:border-border"
407
- ],
408
- !isEmail && isBot && "border border-border bg-muted/60 text-foreground [&_a]:text-primary",
409
- !isEmail && isVisitor && "border border-border bg-background text-foreground [&_a]:text-primary",
410
- !isEmail && isAdvisor && "bg-primary text-primary-foreground [&_a]:text-primary-foreground",
411
- isEmail && isAdvisor && "bg-muted/30"
460
+ "w-full break-words border border-border bg-background px-4 py-3 text-sm leading-relaxed",
461
+ "[&_p]:mb-2 [&_p:last-child]:mb-0",
462
+ "[&_ul]:mb-2 [&_ul]:list-disc [&_ul]:pl-4",
463
+ "[&_ol]:mb-2 [&_ol]:list-decimal [&_ol]:pl-4",
464
+ "[&_li]:mb-0.5",
465
+ "[&_h1]:mb-2 [&_h1]:text-sm [&_h1]:font-bold",
466
+ "[&_h2]:mb-1.5 [&_h2]:text-sm [&_h2]:font-semibold",
467
+ "[&_h3]:mb-1 [&_h3]:text-sm [&_h3]:font-medium",
468
+ "[&_strong]:font-semibold [&_em]:italic",
469
+ "[&_a]:text-primary [&_a]:underline",
470
+ "[&_blockquote]:border-l-2 [&_blockquote]:border-border [&_blockquote]:pl-3 [&_blockquote]:italic [&_blockquote]:text-muted-foreground",
471
+ "[&_hr]:my-3 [&_hr]:border-border",
472
+ isAdvisor && "bg-muted/30"
412
473
  ),
413
474
  children: [
414
- isEmail && subject && /* @__PURE__ */ jsxs2("div", { className: "mb-2.5 border-b border-border pb-2", children: [
475
+ subject && /* @__PURE__ */ jsxs2("div", { className: "mb-2.5 border-b border-border pb-2", children: [
415
476
  /* @__PURE__ */ jsx3("span", { className: "text-xs font-medium text-muted-foreground", children: "Subject:" }),
416
477
  " ",
417
478
  /* @__PURE__ */ jsx3("span", { className: "text-sm font-semibold text-foreground", children: subject })
@@ -419,7 +480,7 @@ function ChatBubble({ message, channel, className }) {
419
480
  /* @__PURE__ */ jsx3(
420
481
  ReactMarkdown,
421
482
  {
422
- rehypePlugins: [rehypeRaw, [rehypeSanitize, defaultSchema]],
483
+ rehypePlugins: [rehypeRaw, [rehypeSanitize, EMAIL_SANITIZE_SCHEMA]],
423
484
  children: content
424
485
  }
425
486
  )
@@ -434,13 +495,25 @@ function ChatBubble({ message, channel, className }) {
434
495
  }
435
496
  );
436
497
  }
498
+ function ChatBubble({ message, channel, className }) {
499
+ if (message.role === "system") {
500
+ return /* @__PURE__ */ jsx3(SystemDivider, { content: message.content, className });
501
+ }
502
+ if (channel === "email") {
503
+ return /* @__PURE__ */ jsx3(EmailMessageBubble, { message, className });
504
+ }
505
+ return /* @__PURE__ */ jsx3(ChatMessageBubble, { message, className });
506
+ }
507
+
508
+ // src/components/ui/ai-conversations/thread.tsx
509
+ import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
437
510
  function ComposerToolbarButton({
438
511
  label,
439
512
  icon: Icon,
440
513
  pressed,
441
514
  onToggle
442
515
  }) {
443
- return /* @__PURE__ */ jsx3(
516
+ return /* @__PURE__ */ jsx4(
444
517
  "button",
445
518
  {
446
519
  type: "button",
@@ -451,7 +524,7 @@ function ComposerToolbarButton({
451
524
  "flex size-7 items-center justify-center transition-colors",
452
525
  pressed ? "bg-foreground text-background" : "text-muted-foreground hover:bg-muted hover:text-foreground"
453
526
  ),
454
- children: /* @__PURE__ */ jsx3(Icon, { className: "size-3.5" })
527
+ children: /* @__PURE__ */ jsx4(Icon, { className: "size-3.5" })
455
528
  }
456
529
  );
457
530
  }
@@ -467,7 +540,7 @@ function ComposerLinkPopover({
467
540
  setOpen(false);
468
541
  setUrl("");
469
542
  };
470
- return /* @__PURE__ */ jsxs2(
543
+ return /* @__PURE__ */ jsxs3(
471
544
  Popover,
472
545
  {
473
546
  open,
@@ -480,7 +553,7 @@ function ComposerLinkPopover({
480
553
  setOpen(newOpen);
481
554
  },
482
555
  children: [
483
- /* @__PURE__ */ jsx3(
556
+ /* @__PURE__ */ jsx4(
484
557
  PopoverTrigger,
485
558
  {
486
559
  "aria-label": "Insert link",
@@ -488,11 +561,11 @@ function ComposerLinkPopover({
488
561
  "flex size-7 items-center justify-center transition-colors",
489
562
  (editor == null ? void 0 : editor.isActive("link")) ? "bg-foreground text-background" : "text-muted-foreground hover:bg-muted hover:text-foreground"
490
563
  ),
491
- children: /* @__PURE__ */ jsx3(Link2, { className: "size-3.5" })
564
+ children: /* @__PURE__ */ jsx4(Link2, { className: "size-3.5" })
492
565
  }
493
566
  ),
494
- /* @__PURE__ */ jsx3(PopoverContent, { className: "w-72 p-2", align: "start", children: /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-1.5", children: [
495
- /* @__PURE__ */ jsx3(
567
+ /* @__PURE__ */ jsx4(PopoverContent, { className: "w-72 p-2", align: "start", children: /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-1.5", children: [
568
+ /* @__PURE__ */ jsx4(
496
569
  "input",
497
570
  {
498
571
  type: "url",
@@ -504,7 +577,7 @@ function ComposerLinkPopover({
504
577
  autoFocus: true
505
578
  }
506
579
  ),
507
- /* @__PURE__ */ jsx3(Button, { size: "sm", className: "h-8 px-3", onClick: handleApply, children: "Apply" })
580
+ /* @__PURE__ */ jsx4(Button, { size: "sm", className: "h-8 px-3", onClick: handleApply, children: "Apply" })
508
581
  ] }) })
509
582
  ]
510
583
  }
@@ -514,8 +587,8 @@ function ComposerEmailFieldRow({
514
587
  label,
515
588
  children
516
589
  }) {
517
- return /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-3 border-b border-border px-4 py-2.5", children: [
518
- /* @__PURE__ */ jsx3("span", { className: "w-14 shrink-0 text-sm text-muted-foreground", children: label }),
590
+ return /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-3 border-b border-border px-4 py-2.5", children: [
591
+ /* @__PURE__ */ jsx4("span", { className: "w-14 shrink-0 text-sm text-muted-foreground", children: label }),
519
592
  children
520
593
  ] });
521
594
  }
@@ -580,7 +653,7 @@ function ChatComposer({
580
653
  setEmailSubject(emailReplySubject ? `Re: ${emailReplySubject}` : "");
581
654
  }
582
655
  };
583
- return /* @__PURE__ */ jsxs2(
656
+ return /* @__PURE__ */ jsxs3(
584
657
  "div",
585
658
  {
586
659
  className: cn(
@@ -588,27 +661,27 @@ function ChatComposer({
588
661
  className
589
662
  ),
590
663
  children: [
591
- isEmailIntegrated && /* @__PURE__ */ jsx3("div", { className: "border-b border-border px-3 py-2", children: /* @__PURE__ */ jsx3(
664
+ isEmailIntegrated && /* @__PURE__ */ jsx4("div", { className: "border-b border-border px-3 py-2", children: /* @__PURE__ */ jsx4(
592
665
  Tabs,
593
666
  {
594
667
  value: channel,
595
668
  onValueChange: (v) => v && handleChannelChange(v),
596
- children: /* @__PURE__ */ jsxs2(TabsList, { variant: "default", className: "w-full", children: [
597
- /* @__PURE__ */ jsxs2(TabsTrigger, { value: "chat", className: "flex-1 gap-1.5", children: [
598
- /* @__PURE__ */ jsx3(MessageSquare2, { className: "size-3.5" }),
669
+ children: /* @__PURE__ */ jsxs3(TabsList, { variant: "default", className: "w-full", children: [
670
+ /* @__PURE__ */ jsxs3(TabsTrigger, { value: "chat", className: "flex-1 gap-1.5", children: [
671
+ /* @__PURE__ */ jsx4(MessageSquare2, { className: "size-3.5" }),
599
672
  "Chat"
600
673
  ] }),
601
- /* @__PURE__ */ jsxs2(TabsTrigger, { value: "email", className: "flex-1 gap-1.5", children: [
602
- /* @__PURE__ */ jsx3(Mail2, { className: "size-3.5" }),
674
+ /* @__PURE__ */ jsxs3(TabsTrigger, { value: "email", className: "flex-1 gap-1.5", children: [
675
+ /* @__PURE__ */ jsx4(Mail2, { className: "size-3.5" }),
603
676
  "Email"
604
677
  ] })
605
678
  ] })
606
679
  }
607
680
  ) }),
608
- mode === "ai" ? /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-2 bg-muted/30 px-4 py-2.5 text-[12px] text-muted-foreground", children: [
609
- /* @__PURE__ */ jsx3(Bot, { className: "size-3.5 shrink-0 text-muted-foreground" }),
610
- /* @__PURE__ */ jsx3("span", { children: "AI is handling this conversation." }),
611
- /* @__PURE__ */ jsx3(
681
+ mode === "ai" ? /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-2 bg-muted/30 px-4 py-2.5 text-[12px] text-muted-foreground", children: [
682
+ /* @__PURE__ */ jsx4(Bot2, { className: "size-3.5 shrink-0 text-muted-foreground" }),
683
+ /* @__PURE__ */ jsx4("span", { children: "AI is handling this conversation." }),
684
+ /* @__PURE__ */ jsx4(
612
685
  Button,
613
686
  {
614
687
  variant: "link",
@@ -618,12 +691,12 @@ function ChatComposer({
618
691
  children: "Take Over"
619
692
  }
620
693
  ),
621
- /* @__PURE__ */ jsx3("span", { children: "to reply directly." })
694
+ /* @__PURE__ */ jsx4("span", { children: "to reply directly." })
622
695
  ] }) : (
623
696
  /* Email panel stays in normal flow to anchor container height;
624
697
  chat panel is an absolute overlay so both tabs share identical dimensions */
625
- /* @__PURE__ */ jsxs2("div", { className: "relative", children: [
626
- /* @__PURE__ */ jsxs2(
698
+ /* @__PURE__ */ jsxs3("div", { className: "relative", children: [
699
+ /* @__PURE__ */ jsxs3(
627
700
  "div",
628
701
  {
629
702
  className: cn(
@@ -632,8 +705,8 @@ function ChatComposer({
632
705
  ),
633
706
  "aria-hidden": channel !== "email",
634
707
  children: [
635
- /* @__PURE__ */ jsxs2(ComposerEmailFieldRow, { label: "To", children: [
636
- /* @__PURE__ */ jsx3(
708
+ /* @__PURE__ */ jsxs3(ComposerEmailFieldRow, { label: "To", children: [
709
+ /* @__PURE__ */ jsx4(
637
710
  "input",
638
711
  {
639
712
  type: "email",
@@ -643,7 +716,7 @@ function ChatComposer({
643
716
  className: "min-w-0 flex-1 bg-transparent text-base text-foreground outline-none placeholder:text-muted-foreground"
644
717
  }
645
718
  ),
646
- /* @__PURE__ */ jsxs2(
719
+ /* @__PURE__ */ jsxs3(
647
720
  "button",
648
721
  {
649
722
  type: "button",
@@ -651,12 +724,12 @@ function ChatComposer({
651
724
  className: "flex shrink-0 items-center gap-0.5 text-sm text-muted-foreground hover:text-foreground",
652
725
  children: [
653
726
  "CC",
654
- /* @__PURE__ */ jsx3(ChevronDown, { className: "size-3.5" })
727
+ /* @__PURE__ */ jsx4(ChevronDown, { className: "size-3.5" })
655
728
  ]
656
729
  }
657
730
  )
658
731
  ] }),
659
- showCc && /* @__PURE__ */ jsx3(ComposerEmailFieldRow, { label: "CC", children: /* @__PURE__ */ jsx3(
732
+ showCc && /* @__PURE__ */ jsx4(ComposerEmailFieldRow, { label: "CC", children: /* @__PURE__ */ jsx4(
660
733
  "input",
661
734
  {
662
735
  type: "email",
@@ -666,7 +739,7 @@ function ChatComposer({
666
739
  className: "min-w-0 flex-1 bg-transparent text-base text-foreground outline-none placeholder:text-muted-foreground"
667
740
  }
668
741
  ) }),
669
- emailMode !== "reply" && /* @__PURE__ */ jsx3(ComposerEmailFieldRow, { label: "Subject", children: /* @__PURE__ */ jsx3(
742
+ emailMode !== "reply" && /* @__PURE__ */ jsx4(ComposerEmailFieldRow, { label: "Subject", children: /* @__PURE__ */ jsx4(
670
743
  "input",
671
744
  {
672
745
  type: "text",
@@ -676,11 +749,11 @@ function ChatComposer({
676
749
  className: "min-w-0 flex-1 bg-transparent text-base text-foreground outline-none placeholder:text-muted-foreground"
677
750
  }
678
751
  ) }),
679
- /* @__PURE__ */ jsx3(EditorContent, { editor }),
680
- /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between border-t border-border px-3 py-2", children: [
681
- /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-0.5", children: [
682
- emailReplySubject && /* @__PURE__ */ jsxs2(Fragment2, { children: [
683
- /* @__PURE__ */ jsxs2(
752
+ /* @__PURE__ */ jsx4(EditorContent, { editor }),
753
+ /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between border-t border-border px-3 py-2", children: [
754
+ /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-0.5", children: [
755
+ emailReplySubject && /* @__PURE__ */ jsxs3(Fragment2, { children: [
756
+ /* @__PURE__ */ jsxs3(
684
757
  ToggleGroup,
685
758
  {
686
759
  type: "single",
@@ -694,14 +767,14 @@ function ChatComposer({
694
767
  },
695
768
  className: "mr-1.5",
696
769
  children: [
697
- /* @__PURE__ */ jsx3(ToggleGroupItem, { value: "reply", children: "Reply" }),
698
- /* @__PURE__ */ jsx3(ToggleGroupItem, { value: "new", children: "New email" })
770
+ /* @__PURE__ */ jsx4(ToggleGroupItem, { value: "reply", children: "Reply" }),
771
+ /* @__PURE__ */ jsx4(ToggleGroupItem, { value: "new", children: "New email" })
699
772
  ]
700
773
  }
701
774
  ),
702
- /* @__PURE__ */ jsx3(Separator, { orientation: "vertical", className: "mr-1.5 h-4" })
775
+ /* @__PURE__ */ jsx4(Separator, { orientation: "vertical", className: "mr-1.5 h-4" })
703
776
  ] }),
704
- /* @__PURE__ */ jsx3(
777
+ /* @__PURE__ */ jsx4(
705
778
  ComposerToolbarButton,
706
779
  {
707
780
  label: "Bold",
@@ -710,7 +783,7 @@ function ChatComposer({
710
783
  onToggle: () => editor == null ? void 0 : editor.chain().focus().toggleBold().run()
711
784
  }
712
785
  ),
713
- /* @__PURE__ */ jsx3(
786
+ /* @__PURE__ */ jsx4(
714
787
  ComposerToolbarButton,
715
788
  {
716
789
  label: "Italic",
@@ -719,7 +792,7 @@ function ChatComposer({
719
792
  onToggle: () => editor == null ? void 0 : editor.chain().focus().toggleItalic().run()
720
793
  }
721
794
  ),
722
- /* @__PURE__ */ jsx3(
795
+ /* @__PURE__ */ jsx4(
723
796
  ComposerToolbarButton,
724
797
  {
725
798
  label: "Underline",
@@ -728,17 +801,17 @@ function ChatComposer({
728
801
  onToggle: () => editor == null ? void 0 : editor.chain().focus().toggleUnderline().run()
729
802
  }
730
803
  ),
731
- /* @__PURE__ */ jsx3(Separator, { orientation: "vertical", className: "mx-1.5 h-4" }),
732
- /* @__PURE__ */ jsx3(ComposerLinkPopover, { editor }),
733
- /* @__PURE__ */ jsx3(ComposerToolbarButton, { label: "Attach file", icon: Paperclip })
804
+ /* @__PURE__ */ jsx4(Separator, { orientation: "vertical", className: "mx-1.5 h-4" }),
805
+ /* @__PURE__ */ jsx4(ComposerLinkPopover, { editor }),
806
+ /* @__PURE__ */ jsx4(ComposerToolbarButton, { label: "Attach file", icon: Paperclip })
734
807
  ] }),
735
- /* @__PURE__ */ jsx3("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxs2(
808
+ /* @__PURE__ */ jsx4("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxs3(
736
809
  Button,
737
810
  {
738
811
  size: "sm",
739
812
  onClick: () => {
740
- var _a;
741
- const html = (_a = editor == null ? void 0 : editor.getHTML()) != null ? _a : "";
813
+ var _a2;
814
+ const html = (_a2 = editor == null ? void 0 : editor.getHTML()) != null ? _a2 : "";
742
815
  onSendEmail == null ? void 0 : onSendEmail({
743
816
  content: html,
744
817
  to: emailTo,
@@ -750,7 +823,7 @@ function ChatComposer({
750
823
  },
751
824
  disabled: !editor || editor.isEmpty || !emailTo.trim(),
752
825
  children: [
753
- /* @__PURE__ */ jsx3(Send, { className: "mr-1.5 size-3.5" }),
826
+ /* @__PURE__ */ jsx4(Send, { className: "mr-1.5 size-3.5" }),
754
827
  "Send Email"
755
828
  ]
756
829
  }
@@ -759,8 +832,8 @@ function ChatComposer({
759
832
  ]
760
833
  }
761
834
  ),
762
- channel === "chat" && /* @__PURE__ */ jsxs2("div", { className: "absolute inset-0 flex flex-col gap-3 p-4", children: [
763
- /* @__PURE__ */ jsx3(
835
+ channel === "chat" && /* @__PURE__ */ jsxs3("div", { className: "absolute inset-0 flex flex-col gap-3 p-4", children: [
836
+ /* @__PURE__ */ jsx4(
764
837
  Textarea,
765
838
  {
766
839
  value: inputValue,
@@ -769,12 +842,12 @@ function ChatComposer({
769
842
  className: "min-h-0 flex-1 resize-none text-base"
770
843
  }
771
844
  ),
772
- /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between", children: [
773
- initialChannelRef.current !== "email" && /* @__PURE__ */ jsxs2(Button, { variant: "outline", size: "sm", onClick: onLetAiHandle, children: [
774
- /* @__PURE__ */ jsx3(Bot, { className: "mr-1.5 size-3.5" }),
845
+ /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between", children: [
846
+ initialChannelRef.current !== "email" && /* @__PURE__ */ jsxs3(Button, { variant: "outline", size: "sm", onClick: onLetAiHandle, children: [
847
+ /* @__PURE__ */ jsx4(Bot2, { className: "mr-1.5 size-3.5" }),
775
848
  "Let AI Handle"
776
849
  ] }),
777
- /* @__PURE__ */ jsxs2(
850
+ /* @__PURE__ */ jsxs3(
778
851
  Button,
779
852
  {
780
853
  size: "sm",
@@ -782,7 +855,7 @@ function ChatComposer({
782
855
  onClick: () => onSend == null ? void 0 : onSend(inputValue),
783
856
  disabled: !inputValue.trim(),
784
857
  children: [
785
- /* @__PURE__ */ jsx3(Send, { className: "mr-1.5 size-3.5" }),
858
+ /* @__PURE__ */ jsx4(Send, { className: "mr-1.5 size-3.5" }),
786
859
  "Send"
787
860
  ]
788
861
  }
@@ -839,13 +912,13 @@ function ChatThread({
839
912
  const prevLastMessageIdRef = React.useRef(void 0);
840
913
  const prevContactIdRef = React.useRef(contact.id);
841
914
  React.useLayoutEffect(() => {
842
- var _a, _b;
915
+ var _a2, _b;
843
916
  const el = scrollRef.current;
844
917
  if (!el) return;
845
918
  if (preLoadScrollHeightRef.current !== null) {
846
919
  el.scrollTop = el.scrollHeight - preLoadScrollHeightRef.current;
847
920
  preLoadScrollHeightRef.current = null;
848
- prevLastMessageIdRef.current = (_a = messages[messages.length - 1]) == null ? void 0 : _a.id;
921
+ prevLastMessageIdRef.current = (_a2 = messages[messages.length - 1]) == null ? void 0 : _a2.id;
849
922
  prevContactIdRef.current = contact.id;
850
923
  return;
851
924
  }
@@ -863,8 +936,8 @@ function ChatThread({
863
936
  const el = scrollRef.current;
864
937
  if (el) el.scrollTop = el.scrollHeight;
865
938
  }, [isAiTyping]);
866
- return /* @__PURE__ */ jsxs2("div", { className: cn("flex flex-col bg-background", className), children: [
867
- /* @__PURE__ */ jsxs2(
939
+ return /* @__PURE__ */ jsxs3("div", { className: cn("flex flex-col bg-background", className), children: [
940
+ /* @__PURE__ */ jsxs3(
868
941
  "div",
869
942
  {
870
943
  className: cn(
@@ -872,7 +945,7 @@ function ChatThread({
872
945
  "flex items-center gap-3 border-b border-border px-4"
873
946
  ),
874
947
  children: [
875
- onBack && /* @__PURE__ */ jsx3(
948
+ onBack && /* @__PURE__ */ jsx4(
876
949
  Button,
877
950
  {
878
951
  variant: "ghost",
@@ -880,28 +953,28 @@ function ChatThread({
880
953
  className: "size-8 shrink-0 md:hidden",
881
954
  onClick: onBack,
882
955
  "aria-label": "Back to conversations",
883
- children: /* @__PURE__ */ jsx3(ArrowLeft, { className: "size-4" })
956
+ children: /* @__PURE__ */ jsx4(ArrowLeft, { className: "size-4" })
884
957
  }
885
958
  ),
886
- /* @__PURE__ */ jsx3(ContactAvatar, { name: contact.name, size: "md" }),
887
- /* @__PURE__ */ jsxs2("div", { className: "min-w-0 flex-1", children: [
888
- /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-2", children: [
889
- /* @__PURE__ */ jsx3("span", { className: "text-sm font-semibold text-foreground", children: displayContactName(contact.name) }),
890
- /* @__PURE__ */ jsx3(ConversationStatusChip, { status, showDot: true })
959
+ /* @__PURE__ */ jsx4(ContactAvatar, { name: contact.name, size: "md" }),
960
+ /* @__PURE__ */ jsxs3("div", { className: "min-w-0 flex-1", children: [
961
+ /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-2", children: [
962
+ /* @__PURE__ */ jsx4("span", { className: "text-sm font-semibold text-foreground", children: displayContactName(contact.name) }),
963
+ /* @__PURE__ */ jsx4(ConversationStatusChip, { status, showDot: true })
891
964
  ] }),
892
- contact.email && /* @__PURE__ */ jsx3("p", { className: "text-sm text-muted-foreground", children: contact.email })
965
+ contact.email && /* @__PURE__ */ jsx4("p", { className: "text-sm text-muted-foreground", children: contact.email })
893
966
  ] }),
894
- /* @__PURE__ */ jsxs2("div", { className: "flex shrink-0 items-center gap-2", children: [
895
- /* @__PURE__ */ jsxs2("div", { className: "hidden items-center gap-2 md:flex", children: [
896
- isClosed && /* @__PURE__ */ jsx3(Button, { variant: "outline", size: "sm", onClick: onReopen, children: "Reopen" }),
897
- !isClosed && aiIsHandling && /* @__PURE__ */ jsx3(Button, { size: "sm", onClick: onTakeOver, children: "Take Over" }),
898
- !isClosed && !aiIsHandling && channel !== "email" && /* @__PURE__ */ jsxs2(Button, { variant: "outline", size: "sm", onClick: onLetAiHandle, children: [
899
- /* @__PURE__ */ jsx3(Bot, { className: "mr-1.5 size-3.5" }),
967
+ /* @__PURE__ */ jsxs3("div", { className: "flex shrink-0 items-center gap-2", children: [
968
+ /* @__PURE__ */ jsxs3("div", { className: "hidden items-center gap-2 md:flex", children: [
969
+ isClosed && /* @__PURE__ */ jsx4(Button, { variant: "outline", size: "sm", onClick: onReopen, children: "Reopen" }),
970
+ !isClosed && aiIsHandling && /* @__PURE__ */ jsx4(Button, { size: "sm", onClick: onTakeOver, children: "Take Over" }),
971
+ !isClosed && !aiIsHandling && channel !== "email" && /* @__PURE__ */ jsxs3(Button, { variant: "outline", size: "sm", onClick: onLetAiHandle, children: [
972
+ /* @__PURE__ */ jsx4(Bot2, { className: "mr-1.5 size-3.5" }),
900
973
  "Let AI Handle"
901
974
  ] })
902
975
  ] }),
903
- /* @__PURE__ */ jsxs2(DropdownMenu, { children: [
904
- /* @__PURE__ */ jsx3(
976
+ /* @__PURE__ */ jsxs3(DropdownMenu, { children: [
977
+ /* @__PURE__ */ jsx4(
905
978
  DropdownMenuTrigger,
906
979
  {
907
980
  className: cn(
@@ -909,38 +982,38 @@ function ChatThread({
909
982
  "size-8"
910
983
  ),
911
984
  "aria-label": "More actions",
912
- children: /* @__PURE__ */ jsx3(MoreHorizontal, { className: "size-4" })
985
+ children: /* @__PURE__ */ jsx4(MoreHorizontal, { className: "size-4" })
913
986
  }
914
987
  ),
915
- /* @__PURE__ */ jsxs2(DropdownMenuContent, { children: [
916
- onShowLeadInfo && /* @__PURE__ */ jsxs2(Fragment2, { children: [
917
- /* @__PURE__ */ jsxs2(
988
+ /* @__PURE__ */ jsxs3(DropdownMenuContent, { children: [
989
+ onShowLeadInfo && /* @__PURE__ */ jsxs3(Fragment2, { children: [
990
+ /* @__PURE__ */ jsxs3(
918
991
  DropdownMenuItem,
919
992
  {
920
993
  className: "md:hidden",
921
994
  onClick: onShowLeadInfo,
922
995
  children: [
923
- /* @__PURE__ */ jsx3(ChevronRight, { className: "mr-2 size-4" }),
996
+ /* @__PURE__ */ jsx4(ChevronRight, { className: "mr-2 size-4" }),
924
997
  "Lead Info"
925
998
  ]
926
999
  }
927
1000
  ),
928
- /* @__PURE__ */ jsx3(DropdownMenuSeparator, { className: "md:hidden" })
1001
+ /* @__PURE__ */ jsx4(DropdownMenuSeparator, { className: "md:hidden" })
929
1002
  ] }),
930
- status === "needs-attention" ? /* @__PURE__ */ jsxs2(DropdownMenuItem, { onClick: onUnmarkUrgent, children: [
931
- /* @__PURE__ */ jsx3(Flag2, { className: "mr-2 size-4" }),
1003
+ status === "needs-attention" ? /* @__PURE__ */ jsxs3(DropdownMenuItem, { onClick: onUnmarkUrgent, children: [
1004
+ /* @__PURE__ */ jsx4(Flag2, { className: "mr-2 size-4" }),
932
1005
  "Unmark Urgent"
933
- ] }) : /* @__PURE__ */ jsxs2(DropdownMenuItem, { onClick: onMarkUrgent, children: [
934
- /* @__PURE__ */ jsx3(Flag2, { className: "mr-2 size-4" }),
1006
+ ] }) : /* @__PURE__ */ jsxs3(DropdownMenuItem, { onClick: onMarkUrgent, children: [
1007
+ /* @__PURE__ */ jsx4(Flag2, { className: "mr-2 size-4" }),
935
1008
  "Mark as Urgent"
936
1009
  ] }),
937
- /* @__PURE__ */ jsxs2(DropdownMenuItem, { onClick: onAssignToAdvisor, children: [
938
- /* @__PURE__ */ jsx3(UserCheck, { className: "mr-2 size-4" }),
1010
+ /* @__PURE__ */ jsxs3(DropdownMenuItem, { onClick: onAssignToAdvisor, children: [
1011
+ /* @__PURE__ */ jsx4(UserCheck, { className: "mr-2 size-4" }),
939
1012
  "Assign to advisor"
940
1013
  ] }),
941
- /* @__PURE__ */ jsx3(DropdownMenuSeparator, {}),
942
- /* @__PURE__ */ jsxs2(DropdownMenuItem, { onClick: onArchive, children: [
943
- /* @__PURE__ */ jsx3(Archive, { className: "mr-2 size-4" }),
1014
+ /* @__PURE__ */ jsx4(DropdownMenuSeparator, {}),
1015
+ /* @__PURE__ */ jsxs3(DropdownMenuItem, { onClick: onArchive, children: [
1016
+ /* @__PURE__ */ jsx4(Archive, { className: "mr-2 size-4" }),
944
1017
  "Archive"
945
1018
  ] })
946
1019
  ] })
@@ -949,7 +1022,7 @@ function ChatThread({
949
1022
  ]
950
1023
  }
951
1024
  ),
952
- /* @__PURE__ */ jsxs2(
1025
+ /* @__PURE__ */ jsxs3(
953
1026
  "div",
954
1027
  {
955
1028
  ref: scrollRef,
@@ -957,29 +1030,29 @@ function ChatThread({
957
1030
  className: "flex flex-1 flex-col gap-4 overflow-y-auto p-4",
958
1031
  tabIndex: 0,
959
1032
  children: [
960
- isLoadingMoreMessages && /* @__PURE__ */ jsx3("div", { className: "flex justify-center py-1 text-caption text-muted-foreground", children: "Loading older messages..." }),
961
- messages.length === 0 ? /* @__PURE__ */ jsxs2("div", { className: "flex flex-1 flex-col items-center justify-center gap-2 text-muted-foreground", children: [
962
- /* @__PURE__ */ jsx3(MessageSquare2, { className: "size-8 opacity-30" }),
963
- /* @__PURE__ */ jsx3("p", { className: "text-sm", children: "No messages yet" })
964
- ] }) : messages.map((msg) => /* @__PURE__ */ jsx3(ChatBubble, { message: msg, channel }, msg.id)),
965
- isAiTyping && !isClosed && /* @__PURE__ */ jsxs2("div", { className: "flex gap-2.5", children: [
966
- /* @__PURE__ */ jsx3(BubbleAvatar, { role: "bot" }),
967
- /* @__PURE__ */ jsxs2("div", { className: "flex flex-col gap-1", children: [
968
- /* @__PURE__ */ jsx3("span", { className: "text-caption text-muted-foreground", children: "AI Assistant" }),
969
- /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-1 border border-border bg-muted/60 px-3 py-2.5", children: [
970
- /* @__PURE__ */ jsx3("span", { className: "size-1.5 animate-bounce rounded-full bg-muted-foreground [animation-delay:0ms]" }),
971
- /* @__PURE__ */ jsx3("span", { className: "size-1.5 animate-bounce rounded-full bg-muted-foreground [animation-delay:150ms]" }),
972
- /* @__PURE__ */ jsx3("span", { className: "size-1.5 animate-bounce rounded-full bg-muted-foreground [animation-delay:300ms]" })
1033
+ isLoadingMoreMessages && /* @__PURE__ */ jsx4("div", { className: "flex justify-center py-1 text-caption text-muted-foreground", children: "Loading older messages..." }),
1034
+ messages.length === 0 ? /* @__PURE__ */ jsxs3("div", { className: "flex flex-1 flex-col items-center justify-center gap-2 text-muted-foreground", children: [
1035
+ /* @__PURE__ */ jsx4(MessageSquare2, { className: "size-8 opacity-30" }),
1036
+ /* @__PURE__ */ jsx4("p", { className: "text-sm", children: "No messages yet" })
1037
+ ] }) : messages.map((msg) => /* @__PURE__ */ jsx4(ChatBubble, { message: msg, channel }, msg.id)),
1038
+ isAiTyping && !isClosed && /* @__PURE__ */ jsxs3("div", { className: "flex gap-2.5", children: [
1039
+ /* @__PURE__ */ jsx4(BubbleAvatar, { role: "bot" }),
1040
+ /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-1", children: [
1041
+ /* @__PURE__ */ jsx4("span", { className: "text-caption text-muted-foreground", children: "AI Assistant" }),
1042
+ /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-1 border border-border bg-muted/60 px-3 py-2.5", children: [
1043
+ /* @__PURE__ */ jsx4("span", { className: "size-1.5 animate-bounce rounded-full bg-muted-foreground [animation-delay:0ms]" }),
1044
+ /* @__PURE__ */ jsx4("span", { className: "size-1.5 animate-bounce rounded-full bg-muted-foreground [animation-delay:150ms]" }),
1045
+ /* @__PURE__ */ jsx4("span", { className: "size-1.5 animate-bounce rounded-full bg-muted-foreground [animation-delay:300ms]" })
973
1046
  ] })
974
1047
  ] })
975
1048
  ] })
976
1049
  ]
977
1050
  }
978
1051
  ),
979
- isClosed ? /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-3 border-t border-border bg-muted/30 px-4 py-3 text-sm text-muted-foreground", children: [
980
- /* @__PURE__ */ jsx3(Lock, { className: "size-3.5 shrink-0" }),
981
- /* @__PURE__ */ jsx3("span", { children: "This conversation is closed." }),
982
- /* @__PURE__ */ jsx3(
1052
+ isClosed ? /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-3 border-t border-border bg-muted/30 px-4 py-3 text-sm text-muted-foreground", children: [
1053
+ /* @__PURE__ */ jsx4(Lock, { className: "size-3.5 shrink-0" }),
1054
+ /* @__PURE__ */ jsx4("span", { children: "This conversation is closed." }),
1055
+ /* @__PURE__ */ jsx4(
983
1056
  Button,
984
1057
  {
985
1058
  variant: "outline",
@@ -989,7 +1062,7 @@ function ChatThread({
989
1062
  children: "Reopen"
990
1063
  }
991
1064
  )
992
- ] }) : /* @__PURE__ */ jsx3(
1065
+ ] }) : /* @__PURE__ */ jsx4(
993
1066
  ChatComposer,
994
1067
  {
995
1068
  mode,
@@ -1027,20 +1100,20 @@ import {
1027
1100
  UserPlus,
1028
1101
  Video
1029
1102
  } from "lucide-react";
1030
- import { Fragment as Fragment3, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
1103
+ import { Fragment as Fragment3, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
1031
1104
  function AICollectedDataSection({
1032
1105
  fields,
1033
1106
  className
1034
1107
  }) {
1035
- return /* @__PURE__ */ jsx4("div", { className: cn("flex flex-col", className), children: fields.map((field, i) => /* @__PURE__ */ jsxs3(
1108
+ return /* @__PURE__ */ jsx5("div", { className: cn("flex flex-col", className), children: fields.map((field, i) => /* @__PURE__ */ jsxs4(
1036
1109
  "div",
1037
1110
  {
1038
1111
  className: "flex items-center justify-between gap-2 border-b border-border/40 py-1.5 last:border-b-0",
1039
1112
  children: [
1040
- /* @__PURE__ */ jsx4("span", { className: "shrink-0 text-sm text-muted-foreground", children: field.label }),
1041
- /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-1.5", children: [
1042
- /* @__PURE__ */ jsx4("span", { className: "text-right text-sm font-medium text-foreground", children: field.value }),
1043
- field.confidence === "confirmed" ? /* @__PURE__ */ jsx4(CheckCircle2, { className: "size-3 shrink-0 text-success-text" }) : /* @__PURE__ */ jsx4(HelpCircle, { className: "size-3 shrink-0 text-warning-text" })
1113
+ /* @__PURE__ */ jsx5("span", { className: "shrink-0 text-sm text-muted-foreground", children: field.label }),
1114
+ /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-1.5", children: [
1115
+ /* @__PURE__ */ jsx5("span", { className: "text-right text-sm font-medium text-foreground", children: field.value }),
1116
+ field.confidence === "confirmed" ? /* @__PURE__ */ jsx5(CheckCircle2, { className: "size-3 shrink-0 text-success-text" }) : /* @__PURE__ */ jsx5(HelpCircle, { className: "size-3 shrink-0 text-warning-text" })
1044
1117
  ] })
1045
1118
  ]
1046
1119
  },
@@ -1074,9 +1147,9 @@ function MeetingDetailRow({
1074
1147
  }) {
1075
1148
  const DetailIcon = MEETING_DETAIL_ICON[meetingType];
1076
1149
  const isLink = detail.startsWith("http");
1077
- return /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-2", children: [
1078
- /* @__PURE__ */ jsx4(DetailIcon, { className: "size-4 shrink-0 text-muted-foreground" }),
1079
- isLink ? /* @__PURE__ */ jsx4(
1150
+ return /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-2", children: [
1151
+ /* @__PURE__ */ jsx5(DetailIcon, { className: "size-4 shrink-0 text-muted-foreground" }),
1152
+ isLink ? /* @__PURE__ */ jsx5(
1080
1153
  "a",
1081
1154
  {
1082
1155
  href: detail,
@@ -1085,7 +1158,7 @@ function MeetingDetailRow({
1085
1158
  className: "text-sm text-primary underline underline-offset-2 break-all hover:text-primary/80",
1086
1159
  children: detail
1087
1160
  }
1088
- ) : /* @__PURE__ */ jsx4("span", { className: "text-sm text-muted-foreground break-all", children: detail })
1161
+ ) : /* @__PURE__ */ jsx5("span", { className: "text-sm text-muted-foreground break-all", children: detail })
1089
1162
  ] });
1090
1163
  }
1091
1164
  function AppointmentSection({
@@ -1098,23 +1171,23 @@ function AppointmentSection({
1098
1171
  }) {
1099
1172
  const AppointmentIcon = MEETING_ICON[appointment.meetingType];
1100
1173
  const canReschedule = !isAnonymous && !!onRescheduleAppointment;
1101
- return /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-2", children: [
1102
- /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-2", children: [
1103
- /* @__PURE__ */ jsx4(Calendar, { className: "size-3.5 shrink-0 text-muted-foreground" }),
1104
- /* @__PURE__ */ jsx4("span", { className: "text-sm font-medium text-foreground", children: appointment.datetime })
1174
+ return /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-2", children: [
1175
+ /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-2", children: [
1176
+ /* @__PURE__ */ jsx5(Calendar, { className: "size-3.5 shrink-0 text-muted-foreground" }),
1177
+ /* @__PURE__ */ jsx5("span", { className: "text-sm font-medium text-foreground", children: appointment.datetime })
1105
1178
  ] }),
1106
- /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-2", children: [
1107
- /* @__PURE__ */ jsx4(AppointmentIcon, { className: "size-4 shrink-0 text-muted-foreground" }),
1108
- /* @__PURE__ */ jsx4("span", { className: "text-sm text-muted-foreground", children: MEETING_LABEL[appointment.meetingType] })
1179
+ /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-2", children: [
1180
+ /* @__PURE__ */ jsx5(AppointmentIcon, { className: "size-4 shrink-0 text-muted-foreground" }),
1181
+ /* @__PURE__ */ jsx5("span", { className: "text-sm text-muted-foreground", children: MEETING_LABEL[appointment.meetingType] })
1109
1182
  ] }),
1110
- appointment.meetingDetail && /* @__PURE__ */ jsx4(
1183
+ appointment.meetingDetail && /* @__PURE__ */ jsx5(
1111
1184
  MeetingDetailRow,
1112
1185
  {
1113
1186
  meetingType: appointment.meetingType,
1114
1187
  detail: appointment.meetingDetail
1115
1188
  }
1116
1189
  ),
1117
- /* @__PURE__ */ jsx4(
1190
+ /* @__PURE__ */ jsx5(
1118
1191
  "span",
1119
1192
  {
1120
1193
  className: cn("text-sm font-medium", {
@@ -1126,9 +1199,9 @@ function AppointmentSection({
1126
1199
  children: APPOINTMENT_STATUS_LABEL[appointment.status]
1127
1200
  }
1128
1201
  ),
1129
- appointment.status === "requested" && /* @__PURE__ */ jsxs3("div", { className: "flex gap-2 pt-1", children: [
1130
- /* @__PURE__ */ jsx4(Button, { size: "sm", className: "flex-1", onClick: onApproveAppointment, children: "Approve" }),
1131
- /* @__PURE__ */ jsx4(
1202
+ appointment.status === "requested" && /* @__PURE__ */ jsxs4("div", { className: "flex gap-2 pt-1", children: [
1203
+ /* @__PURE__ */ jsx5(Button, { size: "sm", className: "flex-1", onClick: onApproveAppointment, children: "Approve" }),
1204
+ /* @__PURE__ */ jsx5(
1132
1205
  Button,
1133
1206
  {
1134
1207
  variant: "outline",
@@ -1138,7 +1211,7 @@ function AppointmentSection({
1138
1211
  children: "Decline"
1139
1212
  }
1140
1213
  ),
1141
- canReschedule && /* @__PURE__ */ jsx4(
1214
+ canReschedule && /* @__PURE__ */ jsx5(
1142
1215
  Button,
1143
1216
  {
1144
1217
  variant: "ghost",
@@ -1149,7 +1222,7 @@ function AppointmentSection({
1149
1222
  }
1150
1223
  )
1151
1224
  ] }),
1152
- (appointment.status === "confirmed" || appointment.status === "cancelled") && canReschedule && /* @__PURE__ */ jsx4(
1225
+ (appointment.status === "confirmed" || appointment.status === "cancelled") && canReschedule && /* @__PURE__ */ jsx5(
1153
1226
  Button,
1154
1227
  {
1155
1228
  variant: "outline",
@@ -1162,13 +1235,13 @@ function AppointmentSection({
1162
1235
  ] });
1163
1236
  }
1164
1237
  function PanelSectionHeader({ children }) {
1165
- return /* @__PURE__ */ jsx4("p", { className: "mb-2.5 text-overline text-muted-foreground", children });
1238
+ return /* @__PURE__ */ jsx5("p", { className: "mb-2.5 text-overline text-muted-foreground", children });
1166
1239
  }
1167
1240
  function PanelSection({
1168
1241
  children,
1169
1242
  last = false
1170
1243
  }) {
1171
- return /* @__PURE__ */ jsx4("div", { className: cn("px-4 py-4", !last && "border-b border-border"), children });
1244
+ return /* @__PURE__ */ jsx5("div", { className: cn("px-4 py-4", !last && "border-b border-border"), children });
1172
1245
  }
1173
1246
  function LeadInfoPanel({
1174
1247
  contact,
@@ -1194,8 +1267,8 @@ function LeadInfoPanel({
1194
1267
  }) {
1195
1268
  const isAnonymous = !contact.name.trim();
1196
1269
  const addToContactsDisabled = isAnonymous || isKnownContact;
1197
- return /* @__PURE__ */ jsxs3("div", { className: cn("flex flex-col bg-background", className), children: [
1198
- /* @__PURE__ */ jsxs3(
1270
+ return /* @__PURE__ */ jsxs4("div", { className: cn("flex flex-col bg-background", className), children: [
1271
+ /* @__PURE__ */ jsxs4(
1199
1272
  "div",
1200
1273
  {
1201
1274
  className: cn(
@@ -1203,7 +1276,7 @@ function LeadInfoPanel({
1203
1276
  "flex items-center justify-between border-b border-border px-4"
1204
1277
  ),
1205
1278
  children: [
1206
- onBack && /* @__PURE__ */ jsx4(
1279
+ onBack && /* @__PURE__ */ jsx5(
1207
1280
  Button,
1208
1281
  {
1209
1282
  variant: "ghost",
@@ -1211,15 +1284,15 @@ function LeadInfoPanel({
1211
1284
  className: "size-8 shrink-0 md:hidden",
1212
1285
  onClick: onBack,
1213
1286
  "aria-label": "Back to conversation",
1214
- children: /* @__PURE__ */ jsx4(ArrowLeft2, { className: "size-4" })
1287
+ children: /* @__PURE__ */ jsx5(ArrowLeft2, { className: "size-4" })
1215
1288
  }
1216
1289
  ),
1217
- /* @__PURE__ */ jsx4("span", { className: "text-sm font-semibold text-foreground", children: "Lead Info" }),
1218
- onToggleCollapse && /* @__PURE__ */ jsxs3(Tooltip, { children: [
1219
- /* @__PURE__ */ jsx4(
1290
+ /* @__PURE__ */ jsx5("span", { className: "text-sm font-semibold text-foreground", children: "Lead Info" }),
1291
+ onToggleCollapse && /* @__PURE__ */ jsxs4(Tooltip, { children: [
1292
+ /* @__PURE__ */ jsx5(
1220
1293
  TooltipTrigger,
1221
1294
  {
1222
- render: /* @__PURE__ */ jsx4(
1295
+ render: /* @__PURE__ */ jsx5(
1223
1296
  Button,
1224
1297
  {
1225
1298
  variant: "ghost",
@@ -1227,7 +1300,7 @@ function LeadInfoPanel({
1227
1300
  className: "size-7",
1228
1301
  onClick: onToggleCollapse,
1229
1302
  "aria-label": isCollapsed ? "Expand panel" : "Collapse panel",
1230
- children: /* @__PURE__ */ jsx4(
1303
+ children: /* @__PURE__ */ jsx5(
1231
1304
  ChevronRight2,
1232
1305
  {
1233
1306
  className: cn(
@@ -1240,26 +1313,26 @@ function LeadInfoPanel({
1240
1313
  )
1241
1314
  }
1242
1315
  ),
1243
- /* @__PURE__ */ jsx4(TooltipContent, { children: isCollapsed ? "Expand panel" : "Collapse panel" })
1316
+ /* @__PURE__ */ jsx5(TooltipContent, { children: isCollapsed ? "Expand panel" : "Collapse panel" })
1244
1317
  ] })
1245
1318
  ]
1246
1319
  }
1247
1320
  ),
1248
- !isCollapsed && /* @__PURE__ */ jsxs3("div", { className: "flex-1 overflow-y-auto", tabIndex: 0, children: [
1249
- /* @__PURE__ */ jsxs3(PanelSection, { children: [
1250
- /* @__PURE__ */ jsx4(PanelSectionHeader, { children: "Contact" }),
1251
- /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-3", children: [
1252
- /* @__PURE__ */ jsx4(ContactAvatar, { name: contact.name, size: "lg" }),
1253
- /* @__PURE__ */ jsxs3("div", { className: "min-w-0 flex-1", children: [
1254
- /* @__PURE__ */ jsx4("p", { className: "truncate text-sm font-semibold text-foreground", children: displayContactName(contact.name) }),
1255
- /* @__PURE__ */ jsx4("p", { className: "text-sm text-muted-foreground", children: source }),
1256
- topic && /* @__PURE__ */ jsx4(Badge, { variant: "secondary", className: "mt-1 text-xs", children: topic })
1321
+ !isCollapsed && /* @__PURE__ */ jsxs4("div", { className: "flex-1 overflow-y-auto", tabIndex: 0, children: [
1322
+ /* @__PURE__ */ jsxs4(PanelSection, { children: [
1323
+ /* @__PURE__ */ jsx5(PanelSectionHeader, { children: "Contact" }),
1324
+ /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-3", children: [
1325
+ /* @__PURE__ */ jsx5(ContactAvatar, { name: contact.name, size: "lg" }),
1326
+ /* @__PURE__ */ jsxs4("div", { className: "min-w-0 flex-1", children: [
1327
+ /* @__PURE__ */ jsx5("p", { className: "truncate text-sm font-semibold text-foreground", children: displayContactName(contact.name) }),
1328
+ /* @__PURE__ */ jsx5("p", { className: "text-sm text-muted-foreground", children: source }),
1329
+ topic && /* @__PURE__ */ jsx5(Badge, { variant: "secondary", className: "mt-1 text-xs", children: topic })
1257
1330
  ] })
1258
1331
  ] }),
1259
- (contact.email || contact.phone || firstSeen) && /* @__PURE__ */ jsxs3("div", { className: "mt-3 flex flex-col gap-1.5", children: [
1260
- contact.email && /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
1261
- /* @__PURE__ */ jsx4(Mail3, { className: "size-4 shrink-0" }),
1262
- /* @__PURE__ */ jsx4(
1332
+ (contact.email || contact.phone || firstSeen) && /* @__PURE__ */ jsxs4("div", { className: "mt-3 flex flex-col gap-1.5", children: [
1333
+ contact.email && /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
1334
+ /* @__PURE__ */ jsx5(Mail3, { className: "size-4 shrink-0" }),
1335
+ /* @__PURE__ */ jsx5(
1263
1336
  "a",
1264
1337
  {
1265
1338
  href: `mailto:${contact.email}`,
@@ -1268,9 +1341,9 @@ function LeadInfoPanel({
1268
1341
  }
1269
1342
  )
1270
1343
  ] }),
1271
- contact.phone && /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
1272
- /* @__PURE__ */ jsx4(PhoneCall, { className: "size-4 shrink-0" }),
1273
- /* @__PURE__ */ jsx4(
1344
+ contact.phone && /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
1345
+ /* @__PURE__ */ jsx5(PhoneCall, { className: "size-4 shrink-0" }),
1346
+ /* @__PURE__ */ jsx5(
1274
1347
  "a",
1275
1348
  {
1276
1349
  href: `tel:${contact.phone}`,
@@ -1279,31 +1352,31 @@ function LeadInfoPanel({
1279
1352
  }
1280
1353
  )
1281
1354
  ] }),
1282
- firstSeen && /* @__PURE__ */ jsxs3("p", { className: "text-sm text-muted-foreground", children: [
1355
+ firstSeen && /* @__PURE__ */ jsxs4("p", { className: "text-sm text-muted-foreground", children: [
1283
1356
  "First seen: ",
1284
1357
  firstSeen
1285
1358
  ] })
1286
1359
  ] })
1287
1360
  ] }),
1288
- /* @__PURE__ */ jsxs3(PanelSection, { children: [
1289
- /* @__PURE__ */ jsx4(PanelSectionHeader, { children: "AI-Collected Data" }),
1290
- aiFields.length > 0 ? /* @__PURE__ */ jsxs3(Fragment3, { children: [
1291
- /* @__PURE__ */ jsx4(AICollectedDataSection, { fields: aiFields }),
1292
- /* @__PURE__ */ jsxs3("div", { className: "mt-2.5 flex items-center gap-3 text-xs text-muted-foreground", children: [
1293
- /* @__PURE__ */ jsxs3("span", { className: "flex items-center gap-1", children: [
1294
- /* @__PURE__ */ jsx4(CheckCircle2, { className: "size-3 text-success-text" }),
1361
+ /* @__PURE__ */ jsxs4(PanelSection, { children: [
1362
+ /* @__PURE__ */ jsx5(PanelSectionHeader, { children: "AI-Collected Data" }),
1363
+ aiFields.length > 0 ? /* @__PURE__ */ jsxs4(Fragment3, { children: [
1364
+ /* @__PURE__ */ jsx5(AICollectedDataSection, { fields: aiFields }),
1365
+ /* @__PURE__ */ jsxs4("div", { className: "mt-2.5 flex items-center gap-3 text-xs text-muted-foreground", children: [
1366
+ /* @__PURE__ */ jsxs4("span", { className: "flex items-center gap-1", children: [
1367
+ /* @__PURE__ */ jsx5(CheckCircle2, { className: "size-3 text-success-text" }),
1295
1368
  "confirmed"
1296
1369
  ] }),
1297
- /* @__PURE__ */ jsxs3("span", { className: "flex items-center gap-1", children: [
1298
- /* @__PURE__ */ jsx4(HelpCircle, { className: "size-3 text-warning-text" }),
1370
+ /* @__PURE__ */ jsxs4("span", { className: "flex items-center gap-1", children: [
1371
+ /* @__PURE__ */ jsx5(HelpCircle, { className: "size-3 text-warning-text" }),
1299
1372
  "estimated"
1300
1373
  ] })
1301
1374
  ] })
1302
- ] }) : /* @__PURE__ */ jsx4("p", { className: "text-sm text-muted-foreground", children: "AI is still gathering information..." })
1375
+ ] }) : /* @__PURE__ */ jsx5("p", { className: "text-sm text-muted-foreground", children: "AI is still gathering information..." })
1303
1376
  ] }),
1304
- /* @__PURE__ */ jsxs3(PanelSection, { children: [
1305
- /* @__PURE__ */ jsx4(PanelSectionHeader, { children: "Appointment" }),
1306
- appointment ? /* @__PURE__ */ jsx4(
1377
+ /* @__PURE__ */ jsxs4(PanelSection, { children: [
1378
+ /* @__PURE__ */ jsx5(PanelSectionHeader, { children: "Appointment" }),
1379
+ appointment ? /* @__PURE__ */ jsx5(
1307
1380
  AppointmentSection,
1308
1381
  {
1309
1382
  appointment,
@@ -1313,7 +1386,7 @@ function LeadInfoPanel({
1313
1386
  onDeclineAppointment,
1314
1387
  onRescheduleAppointment
1315
1388
  }
1316
- ) : /* @__PURE__ */ jsxs3(
1389
+ ) : /* @__PURE__ */ jsxs4(
1317
1390
  Button,
1318
1391
  {
1319
1392
  variant: "outline",
@@ -1322,20 +1395,20 @@ function LeadInfoPanel({
1322
1395
  disabled: isAnonymous,
1323
1396
  onClick: onBookAppointment,
1324
1397
  children: [
1325
- /* @__PURE__ */ jsx4(Plus, { className: "mr-1.5 size-3.5" }),
1398
+ /* @__PURE__ */ jsx5(Plus, { className: "mr-1.5 size-3.5" }),
1326
1399
  "Book Appointment"
1327
1400
  ]
1328
1401
  }
1329
1402
  )
1330
1403
  ] }),
1331
- /* @__PURE__ */ jsxs3(PanelSection, { children: [
1332
- /* @__PURE__ */ jsx4(PanelSectionHeader, { children: "CRM Actions" }),
1333
- /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-2", children: [
1334
- /* @__PURE__ */ jsxs3(Tooltip, { children: [
1335
- /* @__PURE__ */ jsx4(
1404
+ /* @__PURE__ */ jsxs4(PanelSection, { children: [
1405
+ /* @__PURE__ */ jsx5(PanelSectionHeader, { children: "CRM Actions" }),
1406
+ /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-2", children: [
1407
+ /* @__PURE__ */ jsxs4(Tooltip, { children: [
1408
+ /* @__PURE__ */ jsx5(
1336
1409
  TooltipTrigger,
1337
1410
  {
1338
- render: /* @__PURE__ */ jsxs3(
1411
+ render: /* @__PURE__ */ jsxs4(
1339
1412
  Button,
1340
1413
  {
1341
1414
  variant: "outline",
@@ -1344,16 +1417,16 @@ function LeadInfoPanel({
1344
1417
  disabled: addToContactsDisabled,
1345
1418
  onClick: onAddToContacts,
1346
1419
  children: [
1347
- /* @__PURE__ */ jsx4(UserPlus, { className: "mr-1.5 size-3.5" }),
1420
+ /* @__PURE__ */ jsx5(UserPlus, { className: "mr-1.5 size-3.5" }),
1348
1421
  "Add to Contacts"
1349
1422
  ]
1350
1423
  }
1351
1424
  )
1352
1425
  }
1353
1426
  ),
1354
- isKnownContact && /* @__PURE__ */ jsx4(TooltipContent, { children: "Already in contacts" })
1427
+ isKnownContact && /* @__PURE__ */ jsx5(TooltipContent, { children: "Already in contacts" })
1355
1428
  ] }),
1356
- /* @__PURE__ */ jsxs3(
1429
+ /* @__PURE__ */ jsxs4(
1357
1430
  Button,
1358
1431
  {
1359
1432
  variant: "outline",
@@ -1362,23 +1435,23 @@ function LeadInfoPanel({
1362
1435
  disabled: isAnonymous,
1363
1436
  onClick: onCreateOpportunity,
1364
1437
  children: [
1365
- /* @__PURE__ */ jsx4(Briefcase, { className: "mr-1.5 size-3.5" }),
1438
+ /* @__PURE__ */ jsx5(Briefcase, { className: "mr-1.5 size-3.5" }),
1366
1439
  "Add to CRM"
1367
1440
  ]
1368
1441
  }
1369
1442
  )
1370
1443
  ] })
1371
1444
  ] }),
1372
- /* @__PURE__ */ jsxs3(PanelSection, { last: true, children: [
1373
- /* @__PURE__ */ jsxs3("div", { className: "mb-2.5 flex items-center justify-between", children: [
1374
- /* @__PURE__ */ jsx4("p", { className: "text-overline text-muted-foreground", children: "Internal Notes" }),
1375
- notesSaveStatus === "saving" && /* @__PURE__ */ jsx4("span", { className: "text-xs text-muted-foreground", children: "Saving..." }),
1376
- notesSaveStatus === "saved" && /* @__PURE__ */ jsxs3("span", { className: "flex items-center gap-1 text-xs text-success-text", children: [
1377
- /* @__PURE__ */ jsx4(CheckCircle2, { className: "size-3" }),
1445
+ /* @__PURE__ */ jsxs4(PanelSection, { last: true, children: [
1446
+ /* @__PURE__ */ jsxs4("div", { className: "mb-2.5 flex items-center justify-between", children: [
1447
+ /* @__PURE__ */ jsx5("p", { className: "text-overline text-muted-foreground", children: "Internal Notes" }),
1448
+ notesSaveStatus === "saving" && /* @__PURE__ */ jsx5("span", { className: "text-xs text-muted-foreground", children: "Saving..." }),
1449
+ notesSaveStatus === "saved" && /* @__PURE__ */ jsxs4("span", { className: "flex items-center gap-1 text-xs text-success-text", children: [
1450
+ /* @__PURE__ */ jsx5(CheckCircle2, { className: "size-3" }),
1378
1451
  "Saved"
1379
1452
  ] })
1380
1453
  ] }),
1381
- /* @__PURE__ */ jsx4(
1454
+ /* @__PURE__ */ jsx5(
1382
1455
  Textarea,
1383
1456
  {
1384
1457
  value: internalNotes,
@@ -1394,7 +1467,7 @@ function LeadInfoPanel({
1394
1467
  }
1395
1468
 
1396
1469
  // src/components/ui/ai-conversations/index.tsx
1397
- import { Fragment as Fragment4, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
1470
+ import { Fragment as Fragment4, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
1398
1471
  function ConversationsPage({
1399
1472
  conversations,
1400
1473
  activeConversationId,
@@ -1462,12 +1535,12 @@ function ConversationsPage({
1462
1535
  onToggleLeadPanel == null ? void 0 : onToggleLeadPanel();
1463
1536
  setMobilePanel(showLeadPanel ? "chat" : "lead");
1464
1537
  };
1465
- return /* @__PURE__ */ jsx5(TooltipProvider, { children: /* @__PURE__ */ jsxs4(
1538
+ return /* @__PURE__ */ jsx6(TooltipProvider, { children: /* @__PURE__ */ jsxs5(
1466
1539
  "div",
1467
1540
  {
1468
1541
  className: cn("flex h-full overflow-hidden bg-background", className),
1469
1542
  children: [
1470
- /* @__PURE__ */ jsx5(
1543
+ /* @__PURE__ */ jsx6(
1471
1544
  ConversationList,
1472
1545
  {
1473
1546
  conversations,
@@ -1489,7 +1562,7 @@ function ConversationsPage({
1489
1562
  )
1490
1563
  }
1491
1564
  ),
1492
- contact ? /* @__PURE__ */ jsx5(
1565
+ contact ? /* @__PURE__ */ jsx6(
1493
1566
  ChatThread,
1494
1567
  {
1495
1568
  contact,
@@ -1523,21 +1596,21 @@ function ConversationsPage({
1523
1596
  )
1524
1597
  },
1525
1598
  contact.id
1526
- ) : /* @__PURE__ */ jsx5(
1599
+ ) : /* @__PURE__ */ jsx6(
1527
1600
  "div",
1528
1601
  {
1529
1602
  className: cn(
1530
1603
  "min-w-0 flex-1 items-center justify-center border-r border-border bg-muted/10",
1531
1604
  mobilePanel === "chat" ? "flex md:flex" : "hidden md:flex"
1532
1605
  ),
1533
- children: /* @__PURE__ */ jsxs4("div", { className: "flex flex-col items-center gap-2 text-muted-foreground", children: [
1534
- /* @__PURE__ */ jsx5(MessageSquare3, { className: "size-10 opacity-30" }),
1535
- /* @__PURE__ */ jsx5("p", { className: "text-sm", children: "Select a conversation" })
1606
+ children: /* @__PURE__ */ jsxs5("div", { className: "flex flex-col items-center gap-2 text-muted-foreground", children: [
1607
+ /* @__PURE__ */ jsx6(MessageSquare3, { className: "size-10 opacity-30" }),
1608
+ /* @__PURE__ */ jsx6("p", { className: "text-sm", children: "Select a conversation" })
1536
1609
  ] })
1537
1610
  }
1538
1611
  ),
1539
- contact && /* @__PURE__ */ jsxs4(Fragment4, { children: [
1540
- /* @__PURE__ */ jsx5(
1612
+ contact && /* @__PURE__ */ jsxs5(Fragment4, { children: [
1613
+ /* @__PURE__ */ jsx6(
1541
1614
  "div",
1542
1615
  {
1543
1616
  className: cn(
@@ -1545,7 +1618,7 @@ function ConversationsPage({
1545
1618
  "md:block md:shrink-0 md:overflow-hidden md:transition-[width] md:duration-200 md:ease-in-out",
1546
1619
  showLeadPanel ? "md:w-[320px]" : "md:w-0"
1547
1620
  ),
1548
- children: /* @__PURE__ */ jsx5(
1621
+ children: /* @__PURE__ */ jsx6(
1549
1622
  LeadInfoPanel,
1550
1623
  {
1551
1624
  contact,
@@ -1571,11 +1644,11 @@ function ConversationsPage({
1571
1644
  )
1572
1645
  }
1573
1646
  ),
1574
- !showLeadPanel && onToggleLeadPanel && /* @__PURE__ */ jsx5("div", { className: "hidden shrink-0 items-start border-l border-border pt-[29px] md:flex", children: /* @__PURE__ */ jsxs4(Tooltip, { children: [
1575
- /* @__PURE__ */ jsx5(
1647
+ !showLeadPanel && onToggleLeadPanel && /* @__PURE__ */ jsx6("div", { className: "hidden shrink-0 items-start border-l border-border pt-[29px] md:flex", children: /* @__PURE__ */ jsxs5(Tooltip, { children: [
1648
+ /* @__PURE__ */ jsx6(
1576
1649
  TooltipTrigger,
1577
1650
  {
1578
- render: /* @__PURE__ */ jsx5(
1651
+ render: /* @__PURE__ */ jsx6(
1579
1652
  Button,
1580
1653
  {
1581
1654
  variant: "ghost",
@@ -1583,12 +1656,12 @@ function ConversationsPage({
1583
1656
  className: "size-8",
1584
1657
  "aria-label": "Show lead info",
1585
1658
  onClick: handleToggleLeadPanel,
1586
- children: /* @__PURE__ */ jsx5(ChevronLeft, { className: "size-4" })
1659
+ children: /* @__PURE__ */ jsx6(ChevronLeft, { className: "size-4" })
1587
1660
  }
1588
1661
  )
1589
1662
  }
1590
1663
  ),
1591
- /* @__PURE__ */ jsx5(TooltipContent, { children: "Show lead info" })
1664
+ /* @__PURE__ */ jsx6(TooltipContent, { children: "Show lead info" })
1592
1665
  ] }) })
1593
1666
  ] })
1594
1667
  ]
@@ -1618,13 +1691,13 @@ function AiConvAssignAdvisorDialog({
1618
1691
  setRoleFilter("");
1619
1692
  }
1620
1693
  };
1621
- return /* @__PURE__ */ jsx5(Dialog, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxs4(DialogContent, { children: [
1622
- /* @__PURE__ */ jsxs4(DialogHeader, { children: [
1623
- /* @__PURE__ */ jsx5(DialogTitle, { children: "Assign to advisor" }),
1624
- /* @__PURE__ */ jsx5(DialogDescription, { children: "Choose an advisor to handle this conversation." })
1694
+ return /* @__PURE__ */ jsx6(Dialog, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxs5(DialogContent, { children: [
1695
+ /* @__PURE__ */ jsxs5(DialogHeader, { children: [
1696
+ /* @__PURE__ */ jsx6(DialogTitle, { children: "Assign to advisor" }),
1697
+ /* @__PURE__ */ jsx6(DialogDescription, { children: "Choose an advisor to handle this conversation." })
1625
1698
  ] }),
1626
- /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-0", children: [
1627
- roles.length > 0 && /* @__PURE__ */ jsx5("div", { className: "pb-3", children: /* @__PURE__ */ jsxs4(
1699
+ /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-0", children: [
1700
+ roles.length > 0 && /* @__PURE__ */ jsx6("div", { className: "pb-3", children: /* @__PURE__ */ jsxs5(
1628
1701
  ToggleGroup,
1629
1702
  {
1630
1703
  type: "single",
@@ -1637,14 +1710,14 @@ function AiConvAssignAdvisorDialog({
1637
1710
  setRoleFilter(!v || v === "__all__" ? "" : v);
1638
1711
  },
1639
1712
  children: [
1640
- /* @__PURE__ */ jsx5(ToggleGroupItem, { value: "__all__", children: "All" }),
1641
- roles.map((role) => /* @__PURE__ */ jsx5(ToggleGroupItem, { value: role, children: role }, role))
1713
+ /* @__PURE__ */ jsx6(ToggleGroupItem, { value: "__all__", children: "All" }),
1714
+ roles.map((role) => /* @__PURE__ */ jsx6(ToggleGroupItem, { value: role, children: role }, role))
1642
1715
  ]
1643
1716
  }
1644
1717
  ) }),
1645
- /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-2 border border-input px-3", children: [
1646
- /* @__PURE__ */ jsx5(Search2, { className: "size-4 shrink-0 text-muted-foreground" }),
1647
- /* @__PURE__ */ jsx5(
1718
+ /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-2 border border-input px-3", children: [
1719
+ /* @__PURE__ */ jsx6(Search2, { className: "size-4 shrink-0 text-muted-foreground" }),
1720
+ /* @__PURE__ */ jsx6(
1648
1721
  "input",
1649
1722
  {
1650
1723
  type: "text",
@@ -1655,7 +1728,7 @@ function AiConvAssignAdvisorDialog({
1655
1728
  }
1656
1729
  )
1657
1730
  ] }),
1658
- /* @__PURE__ */ jsx5("div", { className: "max-h-52 overflow-y-auto border border-t-0 border-input", children: filtered.length === 0 ? /* @__PURE__ */ jsx5("p", { className: "py-6 text-center text-sm text-muted-foreground", children: "No advisors found." }) : filtered.map((advisor) => /* @__PURE__ */ jsxs4(
1731
+ /* @__PURE__ */ jsx6("div", { className: "max-h-52 overflow-y-auto border border-t-0 border-input", children: filtered.length === 0 ? /* @__PURE__ */ jsx6("p", { className: "py-6 text-center text-sm text-muted-foreground", children: "No advisors found." }) : filtered.map((advisor) => /* @__PURE__ */ jsxs5(
1659
1732
  "button",
1660
1733
  {
1661
1734
  type: "button",
@@ -1665,19 +1738,19 @@ function AiConvAssignAdvisorDialog({
1665
1738
  value === advisor.id && "bg-muted font-medium"
1666
1739
  ),
1667
1740
  children: [
1668
- /* @__PURE__ */ jsx5(Avatar, { size: "sm", children: /* @__PURE__ */ jsx5(AvatarFallback, { className: "font-semibold", children: advisor.initials }) }),
1669
- /* @__PURE__ */ jsxs4("div", { className: "min-w-0 flex-1", children: [
1670
- /* @__PURE__ */ jsx5("p", { className: "truncate text-sm", children: advisor.name }),
1671
- advisor.role && /* @__PURE__ */ jsx5("p", { className: "truncate text-xs text-muted-foreground", children: advisor.role })
1741
+ /* @__PURE__ */ jsx6(Avatar, { size: "sm", children: /* @__PURE__ */ jsx6(AvatarFallback, { className: "font-semibold", children: advisor.initials }) }),
1742
+ /* @__PURE__ */ jsxs5("div", { className: "min-w-0 flex-1", children: [
1743
+ /* @__PURE__ */ jsx6("p", { className: "truncate text-sm", children: advisor.name }),
1744
+ advisor.role && /* @__PURE__ */ jsx6("p", { className: "truncate text-xs text-muted-foreground", children: advisor.role })
1672
1745
  ] })
1673
1746
  ]
1674
1747
  },
1675
1748
  advisor.id
1676
1749
  )) })
1677
1750
  ] }),
1678
- /* @__PURE__ */ jsxs4(DialogFooter, { children: [
1679
- /* @__PURE__ */ jsx5(Button, { variant: "outline", onClick: () => onOpenChange(false), children: "Cancel" }),
1680
- /* @__PURE__ */ jsx5(Button, { onClick: onConfirm, children: "Assign" })
1751
+ /* @__PURE__ */ jsxs5(DialogFooter, { children: [
1752
+ /* @__PURE__ */ jsx6(Button, { variant: "outline", onClick: () => onOpenChange(false), children: "Cancel" }),
1753
+ /* @__PURE__ */ jsx6(Button, { onClick: onConfirm, children: "Assign" })
1681
1754
  ] })
1682
1755
  ] }) });
1683
1756
  }