@wealthx/shadcn 1.3.0 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -68,6 +68,7 @@ __export(index_exports, {
68
68
  AddLeadModal: () => AddLeadModal,
69
69
  AddressAutocomplete: () => AddressAutocomplete,
70
70
  AdvisorCard: () => AdvisorCard,
71
+ AdvisorInviteCard: () => AdvisorInviteCard,
71
72
  AiAssistantDrawer: () => AiAssistantDrawer,
72
73
  Alert: () => Alert,
73
74
  AlertAccordion: () => AlertAccordion,
@@ -574,6 +575,9 @@ function AccordionContent(_a) {
574
575
  );
575
576
  }
576
577
 
578
+ // src/components/ui/advisor-card.tsx
579
+ var import_react2 = __toESM(require("react"));
580
+
577
581
  // src/components/ui/badge.tsx
578
582
  var import_class_variance_authority = require("class-variance-authority");
579
583
 
@@ -892,31 +896,34 @@ function AdvisorCard({
892
896
  role,
893
897
  phone,
894
898
  email,
899
+ companyName,
895
900
  companyLogoUrl,
896
901
  avatarInitials,
897
902
  isPrimary = false,
898
- appointment,
903
+ appointments,
899
904
  onRefer,
900
905
  onMoreOptions,
901
906
  onBookAppointment,
902
907
  onViewAppointment
903
908
  }) {
909
+ const hasAppointments = appointments !== void 0;
910
+ const appointmentList = appointments === null || Array.isArray(appointments) && appointments.length === 0 ? null : appointments;
904
911
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col border border-border bg-card", children: [
905
912
  /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-start gap-4 p-4", children: [
906
913
  /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Avatar, { className: "h-10 w-10 shrink-0", children: [
907
914
  companyLogoUrl && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AvatarImage, { src: companyLogoUrl, alt: `${name} company logo` }),
908
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AvatarFallback, { className: "text-sm", children: avatarInitials != null ? avatarInitials : name.slice(0, 2).toUpperCase() })
915
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AvatarFallback, { className: "text-sm", children: avatarInitials != null ? avatarInitials : companyName ? companyName.split(" ").map((w) => w[0]).join("").slice(0, 2).toUpperCase() : name.slice(0, 2).toUpperCase() })
909
916
  ] }),
910
917
  /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
911
918
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-sm font-semibold leading-tight", children: name }),
912
919
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-sm text-muted-foreground", children: role }),
913
920
  /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "mt-2 flex flex-col gap-1", children: [
914
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [
915
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react3.Phone, { className: "h-3 w-3 shrink-0" }),
921
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-1.5 text-sm text-muted-foreground", children: [
922
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react3.Phone, { className: "h-4 w-4 shrink-0" }),
916
923
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: phone })
917
924
  ] }),
918
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [
919
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react3.Mail, { className: "h-3 w-3 shrink-0" }),
925
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-1.5 text-sm text-muted-foreground", children: [
926
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react3.Mail, { className: "h-4 w-4 shrink-0" }),
920
927
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: email })
921
928
  ] })
922
929
  ] })
@@ -936,14 +943,14 @@ function AdvisorCard({
936
943
  )
937
944
  ] })
938
945
  ] }),
939
- appointment !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
946
+ hasAppointments && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
940
947
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Separator, {}),
941
- appointment ? (
942
- /* Has appointment */
948
+ appointmentList ? appointmentList.map((appt, i) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react2.default.Fragment, { children: [
949
+ i > 0 && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Separator, {}),
943
950
  /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
944
951
  "div",
945
952
  {
946
- className: `flex items-center gap-3 px-4 py-3 ${STRIP_BG[appointment.status]}`,
953
+ className: `flex items-center gap-3 px-4 py-3 ${STRIP_BG[appt.status]}`,
947
954
  children: [
948
955
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react3.CalendarCheck, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
949
956
  /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
@@ -951,19 +958,19 @@ function AdvisorCard({
951
958
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
952
959
  Badge,
953
960
  {
954
- variant: STATUS_VARIANT[appointment.status],
961
+ variant: STATUS_VARIANT[appt.status],
955
962
  className: "text-[10px]",
956
- children: STATUS_LABEL[appointment.status]
963
+ children: STATUS_LABEL[appt.status]
957
964
  }
958
965
  ),
959
- appointment.appointmentType && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "truncate text-xs text-muted-foreground", children: appointment.appointmentType })
966
+ appt.appointmentType && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "truncate text-sm font-semibold", children: appt.appointmentType })
960
967
  ] }),
961
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("p", { className: "text-xs text-muted-foreground", children: [
962
- appointment.date,
968
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("p", { className: "whitespace-nowrap text-sm text-muted-foreground", children: [
969
+ appt.date,
963
970
  " \xB7 ",
964
- appointment.timeStart,
971
+ appt.timeStart,
965
972
  "\u2013",
966
- appointment.timeEnd
973
+ appt.timeEnd
967
974
  ] })
968
975
  ] }),
969
976
  onViewAppointment && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
@@ -972,7 +979,7 @@ function AdvisorCard({
972
979
  variant: "ghost",
973
980
  size: "sm",
974
981
  className: "h-7 shrink-0 gap-1 px-2 text-xs",
975
- onClick: onViewAppointment,
982
+ onClick: () => onViewAppointment(i),
976
983
  children: [
977
984
  "View",
978
985
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react3.ChevronRight, { className: "h-3 w-3" })
@@ -982,8 +989,8 @@ function AdvisorCard({
982
989
  ]
983
990
  }
984
991
  )
985
- ) : (
986
- /* No appointment */
992
+ ] }, i)) : (
993
+ /* Empty state */
987
994
  /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-3 px-4 py-3", children: [
988
995
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react3.Calendar, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
989
996
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "flex-1 text-xs text-muted-foreground", children: "No upcoming appointments" })
@@ -991,31 +998,58 @@ function AdvisorCard({
991
998
  )
992
999
  ] }),
993
1000
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Separator, {}),
994
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-2 px-4 py-3", children: [
1001
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col gap-2 px-4 py-3", children: [
995
1002
  onBookAppointment && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
996
1003
  Button,
997
1004
  {
998
1005
  variant: "outline-primary",
999
1006
  size: "sm",
1007
+ className: "w-full",
1000
1008
  onClick: onBookAppointment,
1001
1009
  children: "Book Appointment"
1002
1010
  }
1003
1011
  ),
1004
- onRefer && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Button, { variant: "outline", size: "sm", onClick: onRefer, children: [
1005
- "Refer ",
1006
- name,
1007
- " to Others"
1008
- ] })
1012
+ onRefer && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1013
+ Button,
1014
+ {
1015
+ variant: "outline",
1016
+ size: "sm",
1017
+ className: "w-full",
1018
+ onClick: onRefer,
1019
+ children: [
1020
+ "Refer ",
1021
+ name,
1022
+ " to Others"
1023
+ ]
1024
+ }
1025
+ )
1009
1026
  ] })
1010
1027
  ] });
1011
1028
  }
1029
+ function AdvisorInviteCard({ onInvite }) {
1030
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1031
+ Button,
1032
+ {
1033
+ variant: "ghost",
1034
+ onClick: onInvite,
1035
+ className: "flex h-auto w-full flex-col items-center justify-center gap-3 border border-dashed border-border bg-card p-8 text-center transition-colors hover:bg-muted/40",
1036
+ children: [
1037
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex h-10 w-10 items-center justify-center border border-dashed border-muted-foreground/40", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react3.Plus, { className: "h-5 w-5 text-muted-foreground" }) }),
1038
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col gap-1", children: [
1039
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-sm font-medium", children: "Add Another Advisor" }),
1040
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-xs text-muted-foreground", children: "Connect more advisors to your account" })
1041
+ ] })
1042
+ ]
1043
+ }
1044
+ );
1045
+ }
1012
1046
 
1013
1047
  // src/components/ui/appointment-upcoming-card.tsx
1014
- var import_react3 = __toESM(require("react"));
1048
+ var import_react4 = __toESM(require("react"));
1015
1049
  var import_lucide_react6 = require("lucide-react");
1016
1050
 
1017
1051
  // src/components/ui/calendar.tsx
1018
- var React2 = __toESM(require("react"));
1052
+ var React3 = __toESM(require("react"));
1019
1053
  var import_lucide_react4 = require("lucide-react");
1020
1054
  var import_react_day_picker = require("react-day-picker");
1021
1055
  var import_jsx_runtime7 = require("react/jsx-runtime");
@@ -1188,8 +1222,8 @@ function CalendarDayButton(_a) {
1188
1222
  "modifiers"
1189
1223
  ]);
1190
1224
  const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
1191
- const ref = React2.useRef(null);
1192
- React2.useEffect(() => {
1225
+ const ref = React3.useRef(null);
1226
+ React3.useEffect(() => {
1193
1227
  var _a2;
1194
1228
  if (modifiers.focused) (_a2 = ref.current) == null ? void 0 : _a2.focus();
1195
1229
  }, [modifiers.focused]);
@@ -1219,11 +1253,11 @@ var import_lucide_react5 = require("lucide-react");
1219
1253
  var import_dialog = require("@base-ui/react/dialog");
1220
1254
 
1221
1255
  // src/lib/theme-provider.tsx
1222
- var import_react2 = require("react");
1256
+ var import_react3 = require("react");
1223
1257
  var import_jsx_runtime8 = require("react/jsx-runtime");
1224
- var ThemeVarsContext = (0, import_react2.createContext)({});
1258
+ var ThemeVarsContext = (0, import_react3.createContext)({});
1225
1259
  function useThemeVars() {
1226
- return (0, import_react2.useContext)(ThemeVarsContext);
1260
+ return (0, import_react3.useContext)(ThemeVarsContext);
1227
1261
  }
1228
1262
 
1229
1263
  // src/components/ui/dialog.tsx
@@ -1565,16 +1599,16 @@ function AppointmentUpcomingCard({
1565
1599
  onAcceptReschedule
1566
1600
  }) {
1567
1601
  var _a, _b, _c;
1568
- const [calendarDialogOpen, setCalendarDialogOpen] = import_react3.default.useState(false);
1569
- const [acceptDialogOpen, setAcceptDialogOpen] = import_react3.default.useState(false);
1570
- const [rescheduleDialogOpen, setRescheduleDialogOpen] = import_react3.default.useState(false);
1571
- const [cancelDialogOpen, setCancelDialogOpen] = import_react3.default.useState(false);
1572
- const [rescheduleDate, setRescheduleDate] = import_react3.default.useState(
1602
+ const [calendarDialogOpen, setCalendarDialogOpen] = import_react4.default.useState(false);
1603
+ const [acceptDialogOpen, setAcceptDialogOpen] = import_react4.default.useState(false);
1604
+ const [rescheduleDialogOpen, setRescheduleDialogOpen] = import_react4.default.useState(false);
1605
+ const [cancelDialogOpen, setCancelDialogOpen] = import_react4.default.useState(false);
1606
+ const [rescheduleDate, setRescheduleDate] = import_react4.default.useState(
1573
1607
  /* @__PURE__ */ new Date()
1574
1608
  );
1575
- const [rescheduleSlot, setRescheduleSlot] = import_react3.default.useState(void 0);
1576
- const [rescheduleNote, setRescheduleNote] = import_react3.default.useState("");
1577
- const [cancelReason, setCancelReason] = import_react3.default.useState("");
1609
+ const [rescheduleSlot, setRescheduleSlot] = import_react4.default.useState(void 0);
1610
+ const [rescheduleNote, setRescheduleNote] = import_react4.default.useState("");
1611
+ const [cancelReason, setCancelReason] = import_react4.default.useState("");
1578
1612
  const resetRescheduleForm = () => {
1579
1613
  setRescheduleDate(/* @__PURE__ */ new Date());
1580
1614
  setRescheduleSlot(void 0);
@@ -1977,7 +2011,7 @@ function AppointmentUpcomingCard({
1977
2011
  }
1978
2012
 
1979
2013
  // src/components/ui/add-column-modal.tsx
1980
- var React5 = __toESM(require("react"));
2014
+ var React6 = __toESM(require("react"));
1981
2015
  var import_lucide_react8 = require("lucide-react");
1982
2016
 
1983
2017
  // src/components/ui/input.tsx
@@ -2192,16 +2226,16 @@ function AddColumnModal({
2192
2226
  }) {
2193
2227
  var _a, _b;
2194
2228
  const isEdit = !!(editData == null ? void 0 : editData.id);
2195
- const nextId = React5.useRef(0);
2196
- const [name, setName] = React5.useState((_a = editData == null ? void 0 : editData.name) != null ? _a : "");
2197
- const [warningDays, setWarningDays] = React5.useState(
2229
+ const nextId = React6.useRef(0);
2230
+ const [name, setName] = React6.useState((_a = editData == null ? void 0 : editData.name) != null ? _a : "");
2231
+ const [warningDays, setWarningDays] = React6.useState(
2198
2232
  (editData == null ? void 0 : editData.warningDays) != null ? String(editData.warningDays) : ""
2199
2233
  );
2200
- const [priorityDays, setPriorityDays] = React5.useState(
2234
+ const [priorityDays, setPriorityDays] = React6.useState(
2201
2235
  (editData == null ? void 0 : editData.priorityDays) != null ? String(editData.priorityDays) : ""
2202
2236
  );
2203
- const [tasks, setTasks] = React5.useState((_b = editData == null ? void 0 : editData.tasks) != null ? _b : []);
2204
- React5.useEffect(() => {
2237
+ const [tasks, setTasks] = React6.useState((_b = editData == null ? void 0 : editData.tasks) != null ? _b : []);
2238
+ React6.useEffect(() => {
2205
2239
  var _a2, _b2;
2206
2240
  if (open) {
2207
2241
  setName((_a2 = editData == null ? void 0 : editData.name) != null ? _a2 : "");
@@ -2386,11 +2420,11 @@ function AddColumnModal({
2386
2420
  }
2387
2421
 
2388
2422
  // src/components/ui/add-lead-modal.tsx
2389
- var React6 = __toESM(require("react"));
2423
+ var React7 = __toESM(require("react"));
2390
2424
  var import_lucide_react11 = require("lucide-react");
2391
2425
 
2392
2426
  // src/components/ui/checkbox.tsx
2393
- var import_react4 = require("react");
2427
+ var import_react5 = require("react");
2394
2428
  var import_lucide_react9 = require("lucide-react");
2395
2429
  var import_checkbox = require("@base-ui/react/checkbox");
2396
2430
  var import_jsx_runtime18 = require("react/jsx-runtime");
@@ -2449,7 +2483,7 @@ function CheckboxCard(_a) {
2449
2483
  "label",
2450
2484
  "description"
2451
2485
  ]);
2452
- const [internalChecked, setInternalChecked] = (0, import_react4.useState)(
2486
+ const [internalChecked, setInternalChecked] = (0, import_react5.useState)(
2453
2487
  Boolean(defaultChecked)
2454
2488
  );
2455
2489
  const resolvedChecked = checked != null ? checked : internalChecked;
@@ -2533,8 +2567,8 @@ function AddLeadModal({
2533
2567
  onAdd,
2534
2568
  className
2535
2569
  }) {
2536
- const [selectedIds, setSelectedIds] = React6.useState(/* @__PURE__ */ new Set());
2537
- React6.useEffect(() => {
2570
+ const [selectedIds, setSelectedIds] = React7.useState(/* @__PURE__ */ new Set());
2571
+ React7.useEffect(() => {
2538
2572
  if (open) setSelectedIds(/* @__PURE__ */ new Set());
2539
2573
  }, [open]);
2540
2574
  const allPageSelected = contacts.length > 0 && contacts.every((c) => selectedIds.has(c.id));
@@ -2701,7 +2735,7 @@ function AddLeadModal({
2701
2735
  }
2702
2736
 
2703
2737
  // src/components/ui/ai-assistant-drawer.tsx
2704
- var React7 = __toESM(require("react"));
2738
+ var React8 = __toESM(require("react"));
2705
2739
  var import_lucide_react13 = require("lucide-react");
2706
2740
 
2707
2741
  // src/components/ui/sheet.tsx
@@ -2928,26 +2962,26 @@ function AiAssistantDrawer({
2928
2962
  className
2929
2963
  }) {
2930
2964
  var _a;
2931
- const [inputValue, setInputValue] = React7.useState("");
2932
- const messagesEndRef = React7.useRef(null);
2933
- const textareaRef = React7.useRef(null);
2965
+ const [inputValue, setInputValue] = React8.useState("");
2966
+ const messagesEndRef = React8.useRef(null);
2967
+ const textareaRef = React8.useRef(null);
2934
2968
  const suggestions = taskSuggestions != null ? taskSuggestions : DEFAULT_SUGGESTIONS;
2935
2969
  const hasMessages = messages.length > 0;
2936
2970
  const canSend = inputValue.trim().length > 0 && !isStreaming && !isLoading;
2937
- React7.useEffect(() => {
2971
+ React8.useEffect(() => {
2938
2972
  if (!messagesEndRef.current) return;
2939
2973
  messagesEndRef.current.scrollIntoView({
2940
2974
  behavior: "smooth",
2941
2975
  block: "nearest"
2942
2976
  });
2943
2977
  }, [messages.length]);
2944
- React7.useEffect(() => {
2978
+ React8.useEffect(() => {
2945
2979
  const el = textareaRef.current;
2946
2980
  if (!el) return;
2947
2981
  el.style.height = "auto";
2948
2982
  el.style.height = `${Math.min(el.scrollHeight, 120)}px`;
2949
2983
  }, [inputValue]);
2950
- const handleSend = React7.useCallback(() => {
2984
+ const handleSend = React8.useCallback(() => {
2951
2985
  const text = inputValue.trim();
2952
2986
  if (!text || !canSend) return;
2953
2987
  onSendMessage == null ? void 0 : onSendMessage(text);
@@ -3355,10 +3389,10 @@ function AlertDialogCancel(_a) {
3355
3389
  }
3356
3390
 
3357
3391
  // src/components/ui/appointment-availability-settings.tsx
3358
- var import_react6 = __toESM(require("react"));
3392
+ var import_react7 = __toESM(require("react"));
3359
3393
 
3360
3394
  // src/components/ui/date-picker.tsx
3361
- var React8 = __toESM(require("react"));
3395
+ var React9 = __toESM(require("react"));
3362
3396
  var import_date_fns = require("date-fns");
3363
3397
  var import_lucide_react14 = require("lucide-react");
3364
3398
 
@@ -3467,7 +3501,7 @@ function DatePicker({
3467
3501
  className,
3468
3502
  calendarProps
3469
3503
  }) {
3470
- const [open, setOpen] = React8.useState(false);
3504
+ const [open, setOpen] = React9.useState(false);
3471
3505
  function handleDaySelect(day) {
3472
3506
  if (!day) {
3473
3507
  onChange == null ? void 0 : onChange(void 0);
@@ -3556,7 +3590,7 @@ function DatePicker({
3556
3590
  }
3557
3591
 
3558
3592
  // src/components/ui/switch.tsx
3559
- var import_react5 = require("react");
3593
+ var import_react6 = require("react");
3560
3594
  var import_switch = require("@base-ui/react/switch");
3561
3595
  var import_jsx_runtime27 = require("react/jsx-runtime");
3562
3596
  function Switch(_a) {
@@ -3623,7 +3657,7 @@ function SwitchCard(_a) {
3623
3657
  "switchPosition",
3624
3658
  "size"
3625
3659
  ]);
3626
- const [internalChecked, setInternalChecked] = (0, import_react5.useState)(
3660
+ const [internalChecked, setInternalChecked] = (0, import_react6.useState)(
3627
3661
  defaultChecked != null ? defaultChecked : false
3628
3662
  );
3629
3663
  const isChecked = checked != null ? checked : internalChecked;
@@ -3852,11 +3886,11 @@ function AddTimeOffDialog({
3852
3886
  onOpenChange,
3853
3887
  onAdd
3854
3888
  }) {
3855
- const [label, setLabel] = import_react6.default.useState("");
3856
- const [date, setDate] = import_react6.default.useState(void 0);
3857
- const [includeTime, setIncludeTime] = import_react6.default.useState(false);
3858
- const [timeStart, setTimeStart] = import_react6.default.useState("09:00");
3859
- const [timeEnd, setTimeEnd] = import_react6.default.useState("17:00");
3889
+ const [label, setLabel] = import_react7.default.useState("");
3890
+ const [date, setDate] = import_react7.default.useState(void 0);
3891
+ const [includeTime, setIncludeTime] = import_react7.default.useState(false);
3892
+ const [timeStart, setTimeStart] = import_react7.default.useState("09:00");
3893
+ const [timeEnd, setTimeEnd] = import_react7.default.useState("17:00");
3860
3894
  const reset = () => {
3861
3895
  setLabel("");
3862
3896
  setDate(void 0);
@@ -3956,15 +3990,15 @@ function AppointmentAvailabilitySettings({
3956
3990
  onSave,
3957
3991
  onBlockedDatesChange
3958
3992
  }) {
3959
- const hasMounted = import_react6.default.useRef(false);
3960
- import_react6.default.useEffect(() => {
3993
+ const hasMounted = import_react7.default.useRef(false);
3994
+ import_react7.default.useEffect(() => {
3961
3995
  hasMounted.current = true;
3962
3996
  }, []);
3963
- const [schedule, setSchedule] = import_react6.default.useState(initialSchedule);
3964
- const [meetingDuration, setMeetingDuration] = import_react6.default.useState("30");
3965
- const [schedulingBuffer, setSchedulingBuffer] = import_react6.default.useState("0");
3966
- const [maxSlotsPerDay, setMaxSlotsPerDay] = import_react6.default.useState("8");
3967
- const [timeOffEntries, setTimeOffEntries] = import_react6.default.useState(
3997
+ const [schedule, setSchedule] = import_react7.default.useState(initialSchedule);
3998
+ const [meetingDuration, setMeetingDuration] = import_react7.default.useState("30");
3999
+ const [schedulingBuffer, setSchedulingBuffer] = import_react7.default.useState("0");
4000
+ const [maxSlotsPerDay, setMaxSlotsPerDay] = import_react7.default.useState("8");
4001
+ const [timeOffEntries, setTimeOffEntries] = import_react7.default.useState(
3968
4002
  () => {
3969
4003
  const holidayDates = new Set(AU_PUBLIC_HOLIDAYS_2026.map((h) => h.date));
3970
4004
  const entries = AU_PUBLIC_HOLIDAYS_2026.map((h) => __spreadProps(__spreadValues({}, h), {
@@ -3984,20 +4018,20 @@ function AppointmentAvailabilitySettings({
3984
4018
  return entries.sort((a, b) => a.date.localeCompare(b.date));
3985
4019
  }
3986
4020
  );
3987
- const [addMoreOpen, setAddMoreOpen] = import_react6.default.useState(false);
3988
- const currentPrefs = import_react6.default.useMemo(
4021
+ const [addMoreOpen, setAddMoreOpen] = import_react7.default.useState(false);
4022
+ const currentPrefs = import_react7.default.useMemo(
3989
4023
  () => ({ meetingDuration, schedulingBuffer, maxSlotsPerDay }),
3990
4024
  [meetingDuration, schedulingBuffer, maxSlotsPerDay]
3991
4025
  );
3992
- import_react6.default.useEffect(() => {
4026
+ import_react7.default.useEffect(() => {
3993
4027
  if (!hasMounted.current) return;
3994
4028
  onSave == null ? void 0 : onSave(schedule, currentPrefs);
3995
4029
  }, [schedule]);
3996
- import_react6.default.useEffect(() => {
4030
+ import_react7.default.useEffect(() => {
3997
4031
  if (!hasMounted.current) return;
3998
4032
  onSave == null ? void 0 : onSave(schedule, currentPrefs);
3999
4033
  }, [meetingDuration, schedulingBuffer, maxSlotsPerDay]);
4000
- import_react6.default.useEffect(() => {
4034
+ import_react7.default.useEffect(() => {
4001
4035
  if (!hasMounted.current) return;
4002
4036
  const blocked = timeOffEntries.filter((e) => e.enabled).map(({ date, label, timeStart, timeEnd }) => ({
4003
4037
  date,
@@ -4252,7 +4286,7 @@ function AppointmentAvailabilitySettings({
4252
4286
  }
4253
4287
 
4254
4288
  // src/components/ui/appointment-action-dialogs.tsx
4255
- var import_react7 = __toESM(require("react"));
4289
+ var import_react8 = __toESM(require("react"));
4256
4290
  var import_lucide_react16 = require("lucide-react");
4257
4291
  var import_jsx_runtime30 = require("react/jsx-runtime");
4258
4292
  function AppointmentConfirmDialog({
@@ -4263,7 +4297,7 @@ function AppointmentConfirmDialog({
4263
4297
  onConfirm
4264
4298
  }) {
4265
4299
  const isDecline = action === "decline";
4266
- const [cancelReason, setCancelReason] = import_react7.default.useState("");
4300
+ const [cancelReason, setCancelReason] = import_react8.default.useState("");
4267
4301
  const handleOpenChange = (next) => {
4268
4302
  if (!next) setCancelReason("");
4269
4303
  onOpenChange(next);
@@ -4323,9 +4357,9 @@ function AppointmentRescheduleDialog({
4323
4357
  currentTimeEnd,
4324
4358
  onReschedule
4325
4359
  }) {
4326
- const [date, setDate] = import_react7.default.useState(/* @__PURE__ */ new Date());
4327
- const [slot, setSlot] = import_react7.default.useState();
4328
- const [note, setNote] = import_react7.default.useState("");
4360
+ const [date, setDate] = import_react8.default.useState(/* @__PURE__ */ new Date());
4361
+ const [slot, setSlot] = import_react8.default.useState();
4362
+ const [note, setNote] = import_react8.default.useState("");
4329
4363
  const handleOpenChange = (next) => {
4330
4364
  if (!next) {
4331
4365
  setDate(/* @__PURE__ */ new Date());
@@ -4445,17 +4479,17 @@ function AppointmentRescheduleDialog({
4445
4479
  }
4446
4480
 
4447
4481
  // src/components/ui/appointment-book-dialog.tsx
4448
- var import_react8 = __toESM(require("react"));
4482
+ var import_react9 = __toESM(require("react"));
4449
4483
 
4450
4484
  // src/components/ui/form-primitives.tsx
4451
- var React13 = __toESM(require("react"));
4485
+ var React14 = __toESM(require("react"));
4452
4486
  var import_lucide_react17 = require("lucide-react");
4453
4487
 
4454
4488
  // src/components/ui/slider.tsx
4455
- var React11 = __toESM(require("react"));
4489
+ var React12 = __toESM(require("react"));
4456
4490
  var import_slider = require("@base-ui/react/slider");
4457
4491
  var import_jsx_runtime31 = require("react/jsx-runtime");
4458
- var Slider = React11.forwardRef(
4492
+ var Slider = React12.forwardRef(
4459
4493
  ({
4460
4494
  className,
4461
4495
  value,
@@ -4524,11 +4558,11 @@ var Slider = React11.forwardRef(
4524
4558
  Slider.displayName = "Slider";
4525
4559
 
4526
4560
  // src/components/ui/toggle-group.tsx
4527
- var React12 = __toESM(require("react"));
4561
+ var React13 = __toESM(require("react"));
4528
4562
  var import_toggle_group = require("@base-ui/react/toggle-group");
4529
4563
  var import_toggle3 = require("@base-ui/react/toggle");
4530
4564
  var import_jsx_runtime32 = require("react/jsx-runtime");
4531
- var ToggleGroupContext = React12.createContext({
4565
+ var ToggleGroupContext = React13.createContext({
4532
4566
  size: "default",
4533
4567
  variant: "default",
4534
4568
  spacing: 0
@@ -4580,7 +4614,7 @@ function ToggleGroupItem(_a) {
4580
4614
  "variant",
4581
4615
  "size"
4582
4616
  ]);
4583
- const context = React12.useContext(ToggleGroupContext);
4617
+ const context = React13.useContext(ToggleGroupContext);
4584
4618
  return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4585
4619
  import_toggle3.Toggle,
4586
4620
  __spreadProps(__spreadValues({
@@ -4624,13 +4658,13 @@ function CurrencyInputWithSlider({
4624
4658
  onValueChange,
4625
4659
  className
4626
4660
  }) {
4627
- const [internalValue, setInternalValue] = React13.useState(defaultValue);
4661
+ const [internalValue, setInternalValue] = React14.useState(defaultValue);
4628
4662
  const numericValue = controlledValue !== void 0 ? controlledValue : internalValue;
4629
- const [inputText, setInputText] = React13.useState(
4663
+ const [inputText, setInputText] = React14.useState(
4630
4664
  formatNumberToCurrency(numericValue)
4631
4665
  );
4632
- const [isFocused, setIsFocused] = React13.useState(false);
4633
- React13.useEffect(() => {
4666
+ const [isFocused, setIsFocused] = React14.useState(false);
4667
+ React14.useEffect(() => {
4634
4668
  if (!isFocused) {
4635
4669
  setInputText(formatNumberToCurrency(numericValue));
4636
4670
  }
@@ -4700,7 +4734,7 @@ function ConcernScale({
4700
4734
  className
4701
4735
  }) {
4702
4736
  var _a;
4703
- const [internalValue, setInternalValue] = React13.useState(defaultValue);
4737
+ const [internalValue, setInternalValue] = React14.useState(defaultValue);
4704
4738
  const selected = controlledValue !== void 0 ? controlledValue : internalValue;
4705
4739
  const handleValueChange = (val) => {
4706
4740
  const n = val ? Number(val) : 0;
@@ -4786,13 +4820,13 @@ function AddressAutocomplete({
4786
4820
  onSelect,
4787
4821
  className
4788
4822
  }) {
4789
- const [internalValue, setInternalValue] = React13.useState("");
4823
+ const [internalValue, setInternalValue] = React14.useState("");
4790
4824
  const inputValue = controlledValue !== void 0 ? controlledValue : internalValue;
4791
- const [open, setOpen] = React13.useState(false);
4792
- const [activeIndex, setActiveIndex] = React13.useState(-1);
4793
- const containerRef = React13.useRef(null);
4794
- const listRef = React13.useRef(null);
4795
- const filtered = React13.useMemo(() => {
4825
+ const [open, setOpen] = React14.useState(false);
4826
+ const [activeIndex, setActiveIndex] = React14.useState(-1);
4827
+ const containerRef = React14.useRef(null);
4828
+ const listRef = React14.useRef(null);
4829
+ const filtered = React14.useMemo(() => {
4796
4830
  if (!inputValue.trim()) return suggestions.slice(0, 5);
4797
4831
  const q = inputValue.toLowerCase();
4798
4832
  return suggestions.filter((s) => s.label.toLowerCase().includes(q)).slice(0, 5);
@@ -4822,7 +4856,7 @@ function AddressAutocomplete({
4822
4856
  setOpen(false);
4823
4857
  }
4824
4858
  };
4825
- React13.useEffect(() => {
4859
+ React14.useEffect(() => {
4826
4860
  const handler = (e) => {
4827
4861
  if (containerRef.current && !containerRef.current.contains(e.target)) {
4828
4862
  setOpen(false);
@@ -4899,7 +4933,7 @@ function OwnershipSplit({
4899
4933
  onOwnersChange,
4900
4934
  className
4901
4935
  }) {
4902
- const [internalOwners, setInternalOwners] = React13.useState(DEFAULT_OWNERS);
4936
+ const [internalOwners, setInternalOwners] = React14.useState(DEFAULT_OWNERS);
4903
4937
  const owners = controlledOwners !== void 0 ? controlledOwners : internalOwners;
4904
4938
  const setOwners = (updated) => {
4905
4939
  if (controlledOwners === void 0) setInternalOwners(updated);
@@ -5070,8 +5104,8 @@ function ClientSearch({
5070
5104
  value,
5071
5105
  onValueChange
5072
5106
  }) {
5073
- const [query, setQuery] = import_react8.default.useState("");
5074
- const [open, setOpen] = import_react8.default.useState(false);
5107
+ const [query, setQuery] = import_react9.default.useState("");
5108
+ const [open, setOpen] = import_react9.default.useState(false);
5075
5109
  const selected = clients.find((c) => c.id === value);
5076
5110
  const filtered = clients.filter((c) => {
5077
5111
  const q = query.toLowerCase();
@@ -5224,29 +5258,29 @@ function AppointmentBookDialog({
5224
5258
  Sat: 6
5225
5259
  };
5226
5260
  const disabledDayOfWeek = schedule == null ? void 0 : schedule.filter((d) => !d.enabled).map((d) => DAY_MAP[d.day]).filter((n) => n !== void 0);
5227
- const [clientId, setClientId] = import_react8.default.useState(void 0);
5228
- const [meetingType, setMeetingType] = import_react8.default.useState("");
5229
- const [meetingFormat, setMeetingFormat] = import_react8.default.useState("call");
5230
- const [offlineLocation, setOfflineLocation] = import_react8.default.useState(
5261
+ const [clientId, setClientId] = import_react9.default.useState(void 0);
5262
+ const [meetingType, setMeetingType] = import_react9.default.useState("");
5263
+ const [meetingFormat, setMeetingFormat] = import_react9.default.useState("call");
5264
+ const [offlineLocation, setOfflineLocation] = import_react9.default.useState(
5231
5265
  advisorOfficeAddress ? "office" : "custom"
5232
5266
  );
5233
- const [customAddress, setCustomAddress] = import_react8.default.useState("");
5234
- const [date, setDate] = import_react8.default.useState(/* @__PURE__ */ new Date());
5235
- const [selectedSlot, setSelectedSlot] = import_react8.default.useState(void 0);
5236
- const [notes, setNotes] = import_react8.default.useState("");
5237
- const [selectedPhone, setSelectedPhone] = import_react8.default.useState(
5267
+ const [customAddress, setCustomAddress] = import_react9.default.useState("");
5268
+ const [date, setDate] = import_react9.default.useState(/* @__PURE__ */ new Date());
5269
+ const [selectedSlot, setSelectedSlot] = import_react9.default.useState(void 0);
5270
+ const [notes, setNotes] = import_react9.default.useState("");
5271
+ const [selectedPhone, setSelectedPhone] = import_react9.default.useState(
5238
5272
  void 0
5239
5273
  );
5240
5274
  const selectedClient = clients.find((c) => c.id === clientId);
5241
- import_react8.default.useEffect(() => {
5275
+ import_react9.default.useEffect(() => {
5242
5276
  if (open && initialClientId) {
5243
5277
  setClientId(initialClientId);
5244
5278
  }
5245
5279
  }, [open, initialClientId]);
5246
- import_react8.default.useEffect(() => {
5280
+ import_react9.default.useEffect(() => {
5247
5281
  setSelectedPhone(void 0);
5248
5282
  }, [clientId]);
5249
- import_react8.default.useEffect(() => {
5283
+ import_react9.default.useEffect(() => {
5250
5284
  if (meetingFormat !== "call") {
5251
5285
  setSelectedPhone(void 0);
5252
5286
  }
@@ -5832,7 +5866,7 @@ function AppointmentCalendarView({
5832
5866
  }
5833
5867
 
5834
5868
  // src/components/ui/appointment-detail-sheet.tsx
5835
- var import_react9 = __toESM(require("react"));
5869
+ var import_react10 = __toESM(require("react"));
5836
5870
  var import_lucide_react21 = require("lucide-react");
5837
5871
  var import_jsx_runtime37 = require("react/jsx-runtime");
5838
5872
  var STATUS_CONFIG2 = {
@@ -5869,8 +5903,8 @@ function AppointmentDetailSheet({
5869
5903
  onReschedule,
5870
5904
  onBookNew
5871
5905
  }) {
5872
- const [confirmAction, setConfirmAction] = import_react9.default.useState(null);
5873
- const [rescheduleOpen, setRescheduleOpen] = import_react9.default.useState(false);
5906
+ const [confirmAction, setConfirmAction] = import_react10.default.useState(null);
5907
+ const [rescheduleOpen, setRescheduleOpen] = import_react10.default.useState(false);
5874
5908
  if (!appointment) return null;
5875
5909
  const { variant, label, icon } = STATUS_CONFIG2[appointment.status];
5876
5910
  const isCancelled = appointment.status === "cancelled";
@@ -6250,7 +6284,7 @@ function AppointmentMiniCard({
6250
6284
  }
6251
6285
 
6252
6286
  // src/components/ui/backoffice-alert-history-chart.tsx
6253
- var import_react10 = require("react");
6287
+ var import_react11 = require("react");
6254
6288
  var import_chart = require("chart.js");
6255
6289
  var import_react_chartjs_2 = require("react-chartjs-2");
6256
6290
 
@@ -6654,22 +6688,22 @@ function BackofficeAlertHistoryChart({
6654
6688
  className,
6655
6689
  isLoading = false
6656
6690
  }) {
6657
- const [period, setPeriod] = (0, import_react10.useState)(defaultPeriod);
6691
+ const [period, setPeriod] = (0, import_react11.useState)(defaultPeriod);
6658
6692
  const themeVars = useThemeVars();
6659
6693
  const fontFamily = themeVars["--font-sans"] || "Figtree, sans-serif";
6660
- const sliced = (0, import_react10.useMemo)(() => {
6694
+ const sliced = (0, import_react11.useMemo)(() => {
6661
6695
  if (!(chartData == null ? void 0 : chartData.length)) return null;
6662
6696
  const count = Math.min(SLICE_COUNT[period], chartData.length);
6663
6697
  return chartData.slice(chartData.length - count);
6664
6698
  }, [chartData, period]);
6665
- const labels = (0, import_react10.useMemo)(
6699
+ const labels = (0, import_react11.useMemo)(
6666
6700
  () => {
6667
6701
  var _a;
6668
6702
  return (_a = sliced == null ? void 0 : sliced.map((p) => formatMonthLabel(p.date))) != null ? _a : [];
6669
6703
  },
6670
6704
  [sliced]
6671
6705
  );
6672
- const data = (0, import_react10.useMemo)(() => {
6706
+ const data = (0, import_react11.useMemo)(() => {
6673
6707
  if (!sliced) return { labels: [], datasets: [] };
6674
6708
  return {
6675
6709
  labels,
@@ -6698,7 +6732,7 @@ function BackofficeAlertHistoryChart({
6698
6732
  ]
6699
6733
  };
6700
6734
  }, [sliced, labels]);
6701
- const options = (0, import_react10.useMemo)(
6735
+ const options = (0, import_react11.useMemo)(
6702
6736
  () => ({
6703
6737
  responsive: true,
6704
6738
  maintainAspectRatio: false,
@@ -6797,7 +6831,7 @@ function BackofficeAlertHistoryChart({
6797
6831
  }
6798
6832
 
6799
6833
  // src/components/ui/backoffice-alerts-chart.tsx
6800
- var import_react11 = require("react");
6834
+ var import_react12 = require("react");
6801
6835
  var import_chart2 = require("chart.js");
6802
6836
  var import_react_chartjs_22 = require("react-chartjs-2");
6803
6837
  var import_lucide_react23 = require("lucide-react");
@@ -6851,16 +6885,16 @@ function BackofficeAlertsChart({
6851
6885
  className,
6852
6886
  isLoading = false
6853
6887
  }) {
6854
- const [period, setPeriod] = (0, import_react11.useState)(defaultPeriod);
6855
- const [chartType, setChartType] = (0, import_react11.useState)("line");
6888
+ const [period, setPeriod] = (0, import_react12.useState)(defaultPeriod);
6889
+ const [chartType, setChartType] = (0, import_react12.useState)("line");
6856
6890
  const themeVars = useThemeVars();
6857
6891
  const fontFamily = themeVars["--font-sans"] || "Figtree, sans-serif";
6858
- const sliced = (0, import_react11.useMemo)(() => {
6892
+ const sliced = (0, import_react12.useMemo)(() => {
6859
6893
  if (!(chartData == null ? void 0 : chartData.length)) return null;
6860
6894
  const count = Math.min(SLICE_COUNT2[period], chartData.length);
6861
6895
  return chartData.slice(chartData.length - count);
6862
6896
  }, [chartData, period]);
6863
- const labels = (0, import_react11.useMemo)(
6897
+ const labels = (0, import_react12.useMemo)(
6864
6898
  () => {
6865
6899
  var _a;
6866
6900
  return (_a = sliced == null ? void 0 : sliced.map((p) => formatMonthLabel(p.date))) != null ? _a : [];
@@ -6868,7 +6902,7 @@ function BackofficeAlertsChart({
6868
6902
  [sliced]
6869
6903
  );
6870
6904
  const isBar = chartType === "bar";
6871
- const datasets = (0, import_react11.useMemo)(() => {
6905
+ const datasets = (0, import_react12.useMemo)(() => {
6872
6906
  if (!sliced) return [];
6873
6907
  return [
6874
6908
  {
@@ -6906,7 +6940,7 @@ function BackofficeAlertsChart({
6906
6940
  }
6907
6941
  ];
6908
6942
  }, [sliced, chartType, isBar]);
6909
- const options = (0, import_react11.useMemo)(
6943
+ const options = (0, import_react12.useMemo)(
6910
6944
  () => ({
6911
6945
  responsive: true,
6912
6946
  maintainAspectRatio: false,
@@ -7021,7 +7055,7 @@ function BackofficeAlertsChart({
7021
7055
  }
7022
7056
 
7023
7057
  // src/components/ui/backoffice-connections-chart.tsx
7024
- var import_react12 = require("react");
7058
+ var import_react13 = require("react");
7025
7059
  var import_chart3 = require("chart.js");
7026
7060
  var import_react_chartjs_23 = require("react-chartjs-2");
7027
7061
  var import_lucide_react24 = require("lucide-react");
@@ -7095,16 +7129,16 @@ function BackofficeConnectionsChart({
7095
7129
  className,
7096
7130
  isLoading = false
7097
7131
  }) {
7098
- const [period, setPeriod] = (0, import_react12.useState)(defaultPeriod);
7099
- const [chartType, setChartType] = (0, import_react12.useState)("line");
7132
+ const [period, setPeriod] = (0, import_react13.useState)(defaultPeriod);
7133
+ const [chartType, setChartType] = (0, import_react13.useState)("line");
7100
7134
  const themeVars = useThemeVars();
7101
7135
  const fontFamily = themeVars["--font-sans"] || "Figtree, sans-serif";
7102
- const sliced = (0, import_react12.useMemo)(() => {
7136
+ const sliced = (0, import_react13.useMemo)(() => {
7103
7137
  if (!(chartData == null ? void 0 : chartData.length)) return null;
7104
7138
  const count = Math.min(SLICE_COUNT3[period], chartData.length);
7105
7139
  return chartData.slice(chartData.length - count);
7106
7140
  }, [chartData, period]);
7107
- const labels = (0, import_react12.useMemo)(
7141
+ const labels = (0, import_react13.useMemo)(
7108
7142
  () => {
7109
7143
  var _a;
7110
7144
  return (_a = sliced == null ? void 0 : sliced.map((p) => formatMonthLabel(p.date))) != null ? _a : [];
@@ -7112,7 +7146,7 @@ function BackofficeConnectionsChart({
7112
7146
  [sliced]
7113
7147
  );
7114
7148
  const isBar = chartType === "bar";
7115
- const datasets = (0, import_react12.useMemo)(() => {
7149
+ const datasets = (0, import_react13.useMemo)(() => {
7116
7150
  if (!sliced) return [];
7117
7151
  return [
7118
7152
  {
@@ -7161,7 +7195,7 @@ function BackofficeConnectionsChart({
7161
7195
  }
7162
7196
  ];
7163
7197
  }, [sliced, chartType, isBar]);
7164
- const options = (0, import_react12.useMemo)(
7198
+ const options = (0, import_react13.useMemo)(
7165
7199
  () => ({
7166
7200
  responsive: true,
7167
7201
  maintainAspectRatio: false,
@@ -7276,7 +7310,7 @@ function BackofficeConnectionsChart({
7276
7310
  }
7277
7311
 
7278
7312
  // src/components/ui/backoffice-contact-history-chart.tsx
7279
- var import_react13 = require("react");
7313
+ var import_react14 = require("react");
7280
7314
  var import_chart4 = require("chart.js");
7281
7315
  var import_react_chartjs_24 = require("react-chartjs-2");
7282
7316
  var import_jsx_runtime47 = require("react/jsx-runtime");
@@ -7320,7 +7354,7 @@ function BackofficeContactHistoryChart({
7320
7354
  className,
7321
7355
  isLoading = false
7322
7356
  }) {
7323
- const [period, setPeriod] = (0, import_react13.useState)(defaultPeriod);
7357
+ const [period, setPeriod] = (0, import_react14.useState)(defaultPeriod);
7324
7358
  const themeVars = useThemeVars();
7325
7359
  const brandPrimary = themeVars["--theme-primary"] || FALLBACK_PRIMARY;
7326
7360
  const fontFamily = themeVars["--font-sans"] || "Figtree, sans-serif";
@@ -7328,26 +7362,26 @@ function BackofficeContactHistoryChart({
7328
7362
  const emailColor = hexToRgba(brandPrimary, 0.65);
7329
7363
  const meetingColor = hexToRgba(brandPrimary, 0.4);
7330
7364
  const noteColor = hexToRgba(brandPrimary, 0.22);
7331
- const sliced = (0, import_react13.useMemo)(() => {
7365
+ const sliced = (0, import_react14.useMemo)(() => {
7332
7366
  if (!(chartData == null ? void 0 : chartData.length)) return null;
7333
7367
  const count = Math.min(SLICE_COUNT4[period], chartData.length);
7334
7368
  return chartData.slice(chartData.length - count);
7335
7369
  }, [chartData, period]);
7336
- const showNotes = (0, import_react13.useMemo)(
7370
+ const showNotes = (0, import_react14.useMemo)(
7337
7371
  () => !!(sliced == null ? void 0 : sliced.some((p) => {
7338
7372
  var _a;
7339
7373
  return ((_a = p.notes) != null ? _a : 0) > 0;
7340
7374
  })),
7341
7375
  [sliced]
7342
7376
  );
7343
- const labels = (0, import_react13.useMemo)(
7377
+ const labels = (0, import_react14.useMemo)(
7344
7378
  () => {
7345
7379
  var _a;
7346
7380
  return (_a = sliced == null ? void 0 : sliced.map((p) => formatMonthLabel(p.date))) != null ? _a : [];
7347
7381
  },
7348
7382
  [sliced]
7349
7383
  );
7350
- const data = (0, import_react13.useMemo)(() => {
7384
+ const data = (0, import_react14.useMemo)(() => {
7351
7385
  if (!sliced) return { labels: [], datasets: [] };
7352
7386
  return {
7353
7387
  labels,
@@ -7396,7 +7430,7 @@ function BackofficeContactHistoryChart({
7396
7430
  noteColor,
7397
7431
  showNotes
7398
7432
  ]);
7399
- const options = (0, import_react13.useMemo)(
7433
+ const options = (0, import_react14.useMemo)(
7400
7434
  () => ({
7401
7435
  responsive: true,
7402
7436
  maintainAspectRatio: false,
@@ -7514,7 +7548,7 @@ function BackofficeContactHistoryChart({
7514
7548
  }
7515
7549
 
7516
7550
  // src/components/ui/borrowing-capacity-line-chart.tsx
7517
- var import_react14 = require("react");
7551
+ var import_react15 = require("react");
7518
7552
  var import_chart5 = require("chart.js");
7519
7553
  var import_react_chartjs_25 = require("react-chartjs-2");
7520
7554
  var import_jsx_runtime48 = require("react/jsx-runtime");
@@ -7576,7 +7610,7 @@ function BorrowingCapacityLineChart({
7576
7610
  const themeVars = useThemeVars();
7577
7611
  const brandPrimary = themeVars["--theme-primary"] || FALLBACK_PRIMARY;
7578
7612
  const fontFamily = themeVars["--font-sans"] || "Figtree, sans-serif";
7579
- const seriesColor = (0, import_react14.useMemo)(
7613
+ const seriesColor = (0, import_react15.useMemo)(
7580
7614
  () => ({
7581
7615
  "current-expenses": FALLBACK_FOREGROUND,
7582
7616
  "optimised-estimate": FALLBACK_TICK,
@@ -7585,20 +7619,20 @@ function BorrowingCapacityLineChart({
7585
7619
  }),
7586
7620
  [brandPrimary]
7587
7621
  );
7588
- const orderedSeries = (0, import_react14.useMemo)(() => {
7622
+ const orderedSeries = (0, import_react15.useMemo)(() => {
7589
7623
  if (!(series == null ? void 0 : series.length)) return [];
7590
7624
  return SERIES_RENDER_ORDER.map(
7591
7625
  (t) => series.find((s) => s.type === t)
7592
7626
  ).filter((s) => !!s && s.data.length > 0);
7593
7627
  }, [series]);
7594
7628
  const hasData = orderedSeries.length > 0;
7595
- const labels = (0, import_react14.useMemo)(() => {
7629
+ const labels = (0, import_react15.useMemo)(() => {
7596
7630
  var _a;
7597
7631
  if (!orderedSeries.length) return [];
7598
7632
  const primary = (_a = orderedSeries.find((s) => s.type === "current-expenses")) != null ? _a : orderedSeries[0];
7599
7633
  return primary.data.map((p) => p.date);
7600
7634
  }, [orderedSeries]);
7601
- const chartData = (0, import_react14.useMemo)(() => {
7635
+ const chartData = (0, import_react15.useMemo)(() => {
7602
7636
  if (!orderedSeries.length) return { labels: [], datasets: [] };
7603
7637
  return {
7604
7638
  labels,
@@ -7623,7 +7657,7 @@ function BorrowingCapacityLineChart({
7623
7657
  })
7624
7658
  };
7625
7659
  }, [labels, orderedSeries, seriesColor]);
7626
- const options = (0, import_react14.useMemo)(
7660
+ const options = (0, import_react15.useMemo)(
7627
7661
  () => ({
7628
7662
  responsive: true,
7629
7663
  maintainAspectRatio: false,
@@ -7693,7 +7727,7 @@ function BorrowingCapacityLineChart({
7693
7727
  }),
7694
7728
  [showXAxis, showYAxis, labels, fontFamily]
7695
7729
  );
7696
- const legendEl = (0, import_react14.useMemo)(() => {
7730
+ const legendEl = (0, import_react15.useMemo)(() => {
7697
7731
  if (!showLegend || !hasData) return null;
7698
7732
  const items = SERIES_LEGEND_ORDER.map(
7699
7733
  (t) => orderedSeries.find((s) => s.type === t)
@@ -7738,7 +7772,7 @@ function BorrowingCapacityLineChart({
7738
7772
  }
7739
7773
 
7740
7774
  // src/components/ui/cash-balance-line-chart.tsx
7741
- var import_react15 = require("react");
7775
+ var import_react16 = require("react");
7742
7776
  var import_chart6 = require("chart.js");
7743
7777
  var import_react_chartjs_26 = require("react-chartjs-2");
7744
7778
  var import_jsx_runtime49 = require("react/jsx-runtime");
@@ -7779,7 +7813,7 @@ function CashBalanceLineChart({
7779
7813
  const brandPrimary = themeVars["--theme-primary"] || FALLBACK_PRIMARY;
7780
7814
  const fontFamily = themeVars["--font-sans"] || "Figtree, sans-serif";
7781
7815
  const hasData = Array.isArray(chartData) && chartData.length > 0;
7782
- const tickIndices = (0, import_react15.useMemo)(() => {
7816
+ const tickIndices = (0, import_react16.useMemo)(() => {
7783
7817
  if (!hasData) return /* @__PURE__ */ new Set();
7784
7818
  const count = chartData.length;
7785
7819
  const step = Math.max(1, Math.floor(count / 6));
@@ -7788,7 +7822,7 @@ function CashBalanceLineChart({
7788
7822
  indices.add(count - 1);
7789
7823
  return indices;
7790
7824
  }, [hasData, chartData]);
7791
- const data = (0, import_react15.useMemo)(() => {
7825
+ const data = (0, import_react16.useMemo)(() => {
7792
7826
  if (!hasData) return { labels: [], datasets: [] };
7793
7827
  return {
7794
7828
  labels: chartData.map((p) => p.x),
@@ -7812,7 +7846,7 @@ function CashBalanceLineChart({
7812
7846
  ]
7813
7847
  };
7814
7848
  }, [hasData, chartData, brandPrimary, title]);
7815
- const options = (0, import_react15.useMemo)(
7849
+ const options = (0, import_react16.useMemo)(
7816
7850
  () => ({
7817
7851
  responsive: true,
7818
7852
  maintainAspectRatio: false,
@@ -7934,7 +7968,7 @@ function CashBalanceLineChart({
7934
7968
  }
7935
7969
 
7936
7970
  // src/components/ui/cashflow-bar-chart.tsx
7937
- var import_react16 = require("react");
7971
+ var import_react17 = require("react");
7938
7972
  var import_chart7 = require("chart.js");
7939
7973
  var import_react_chartjs_27 = require("react-chartjs-2");
7940
7974
  var import_jsx_runtime50 = require("react/jsx-runtime");
@@ -8024,12 +8058,12 @@ function CashflowBarChart({
8024
8058
  className,
8025
8059
  isLoading = false
8026
8060
  }) {
8027
- const [period, setPeriod] = (0, import_react16.useState)(defaultPeriod);
8061
+ const [period, setPeriod] = (0, import_react17.useState)(defaultPeriod);
8028
8062
  const themeVars = useThemeVars();
8029
8063
  const brandPrimary = themeVars["--theme-primary"] || FALLBACK_PRIMARY;
8030
8064
  const brandSecondary = themeVars["--theme-secondary"] || FALLBACK_SECONDARY;
8031
8065
  const fontFamily = themeVars["--font-sans"] || "Figtree, sans-serif";
8032
- const sliced = (0, import_react16.useMemo)(() => {
8066
+ const sliced = (0, import_react17.useMemo)(() => {
8033
8067
  var _a;
8034
8068
  if (!((_a = cashflowData == null ? void 0 : cashflowData.data) == null ? void 0 : _a.length)) return null;
8035
8069
  const count = Math.min(period, cashflowData.data.length);
@@ -8039,7 +8073,7 @@ function CashflowBarChart({
8039
8073
  data: cashflowData.data.slice(start)
8040
8074
  };
8041
8075
  }, [cashflowData, period]);
8042
- const chartData = (0, import_react16.useMemo)(() => {
8076
+ const chartData = (0, import_react17.useMemo)(() => {
8043
8077
  if (!sliced) return { labels: [], datasets: [] };
8044
8078
  return {
8045
8079
  labels: sliced.months,
@@ -8088,7 +8122,7 @@ function CashflowBarChart({
8088
8122
  ]
8089
8123
  };
8090
8124
  }, [sliced, brandPrimary, brandSecondary]);
8091
- const options = (0, import_react16.useMemo)(
8125
+ const options = (0, import_react17.useMemo)(
8092
8126
  () => ({
8093
8127
  responsive: true,
8094
8128
  maintainAspectRatio: false,
@@ -8242,7 +8276,7 @@ function Chip(_a) {
8242
8276
  }
8243
8277
 
8244
8278
  // src/components/ui/color-picker.tsx
8245
- var React23 = __toESM(require("react"));
8279
+ var React24 = __toESM(require("react"));
8246
8280
  var import_jsx_runtime52 = require("react/jsx-runtime");
8247
8281
  var COLOR_PICKER_PRESETS = [
8248
8282
  // Blues
@@ -8320,8 +8354,8 @@ function ColorPickerContent({
8320
8354
  onChange,
8321
8355
  presets = COLOR_PICKER_PRESETS
8322
8356
  }) {
8323
- const [hexInput, setHexInput] = React23.useState(value);
8324
- React23.useEffect(() => {
8357
+ const [hexInput, setHexInput] = React24.useState(value);
8358
+ React24.useEffect(() => {
8325
8359
  setHexInput(value);
8326
8360
  }, [value]);
8327
8361
  function handleHexInputChange(e) {
@@ -8408,10 +8442,10 @@ function ColorPicker({
8408
8442
  className
8409
8443
  }) {
8410
8444
  const isControlled = controlledValue !== void 0;
8411
- const [internalValue, setInternalValue] = React23.useState(defaultValue);
8445
+ const [internalValue, setInternalValue] = React24.useState(defaultValue);
8412
8446
  const color = isControlled ? controlledValue : internalValue;
8413
- const [open, setOpen] = React23.useState(false);
8414
- React23.useEffect(() => {
8447
+ const [open, setOpen] = React24.useState(false);
8448
+ React24.useEffect(() => {
8415
8449
  if (disabled) setOpen(false);
8416
8450
  }, [disabled]);
8417
8451
  function handleChange(newColor) {
@@ -8635,7 +8669,7 @@ function ComboboxSeparator(_a) {
8635
8669
  }
8636
8670
 
8637
8671
  // src/components/ui/data-table.tsx
8638
- var React24 = __toESM(require("react"));
8672
+ var React25 = __toESM(require("react"));
8639
8673
  var import_react_table = require("@tanstack/react-table");
8640
8674
  var import_lucide_react29 = require("lucide-react");
8641
8675
 
@@ -9459,20 +9493,20 @@ function DataTable({
9459
9493
  onColumnFiltersChange: onColumnFiltersChangeProp
9460
9494
  }) {
9461
9495
  var _a;
9462
- const [internalSorting, setInternalSorting] = React24.useState(
9496
+ const [internalSorting, setInternalSorting] = React25.useState(
9463
9497
  []
9464
9498
  );
9465
- const [internalColumnFilters, setInternalColumnFilters] = React24.useState([]);
9466
- const [internalPagination, setInternalPagination] = React24.useState({
9499
+ const [internalColumnFilters, setInternalColumnFilters] = React25.useState([]);
9500
+ const [internalPagination, setInternalPagination] = React25.useState({
9467
9501
  pageIndex: 0,
9468
9502
  pageSize: (_a = pageSizeOptions[0]) != null ? _a : 10
9469
9503
  });
9470
- const [columnVisibility, setColumnVisibility] = React24.useState({});
9471
- const [rowSelection, setRowSelection] = React24.useState({});
9504
+ const [columnVisibility, setColumnVisibility] = React25.useState({});
9505
+ const [rowSelection, setRowSelection] = React25.useState({});
9472
9506
  const sorting = controlledSorting != null ? controlledSorting : internalSorting;
9473
9507
  const columnFilters = controlledColumnFilters != null ? controlledColumnFilters : internalColumnFilters;
9474
9508
  const pagination = controlledPagination != null ? controlledPagination : internalPagination;
9475
- const resolvedColumns = React24.useMemo(() => {
9509
+ const resolvedColumns = React25.useMemo(() => {
9476
9510
  if (!enableRowSelection) return userColumns;
9477
9511
  return [getSelectionColumn(), ...userColumns];
9478
9512
  }, [userColumns, enableRowSelection]);
@@ -9688,7 +9722,7 @@ function DrawerDescription(_a) {
9688
9722
  }
9689
9723
 
9690
9724
  // src/components/ui/expense-bar-chart.tsx
9691
- var import_react17 = require("react");
9725
+ var import_react18 = require("react");
9692
9726
  var import_chart8 = require("chart.js");
9693
9727
  var import_react_chartjs_28 = require("react-chartjs-2");
9694
9728
  var import_jsx_runtime59 = require("react/jsx-runtime");
@@ -9715,9 +9749,9 @@ function ExpenseBarChart({
9715
9749
  isLoading = false
9716
9750
  }) {
9717
9751
  const periods = CHART_PERIODS[granularity];
9718
- const [period, setPeriod] = (0, import_react17.useState)(defaultPeriod);
9719
- const isFirstRender = (0, import_react17.useRef)(true);
9720
- (0, import_react17.useEffect)(() => {
9752
+ const [period, setPeriod] = (0, import_react18.useState)(defaultPeriod);
9753
+ const isFirstRender = (0, import_react18.useRef)(true);
9754
+ (0, import_react18.useEffect)(() => {
9721
9755
  if (isFirstRender.current) {
9722
9756
  isFirstRender.current = false;
9723
9757
  return;
@@ -9727,7 +9761,7 @@ function ExpenseBarChart({
9727
9761
  const themeVars = useThemeVars();
9728
9762
  const brandSecondary = themeVars["--theme-secondary"] || FALLBACK_SECONDARY;
9729
9763
  const fontFamily = themeVars["--font-sans"] || "Figtree, sans-serif";
9730
- const sliced = (0, import_react17.useMemo)(() => {
9764
+ const sliced = (0, import_react18.useMemo)(() => {
9731
9765
  var _a, _b;
9732
9766
  if (!((_a = expenseData == null ? void 0 : expenseData.months) == null ? void 0 : _a.length) || !expenseData.datasets.length)
9733
9767
  return null;
@@ -9744,7 +9778,7 @@ function ExpenseBarChart({
9744
9778
  }))
9745
9779
  };
9746
9780
  }, [expenseData, period, granularity]);
9747
- const datasetColors = (0, import_react17.useMemo)(
9781
+ const datasetColors = (0, import_react18.useMemo)(
9748
9782
  () => {
9749
9783
  var _a;
9750
9784
  return (_a = sliced == null ? void 0 : sliced.datasets.map(
@@ -9753,7 +9787,7 @@ function ExpenseBarChart({
9753
9787
  },
9754
9788
  [sliced, brandSecondary]
9755
9789
  );
9756
- const chartData = (0, import_react17.useMemo)(() => {
9790
+ const chartData = (0, import_react18.useMemo)(() => {
9757
9791
  if (!sliced) return { labels: [], datasets: [] };
9758
9792
  return {
9759
9793
  labels: sliced.months,
@@ -9774,7 +9808,7 @@ function ExpenseBarChart({
9774
9808
  }))
9775
9809
  };
9776
9810
  }, [sliced, datasetColors, brandSecondary]);
9777
- const options = (0, import_react17.useMemo)(
9811
+ const options = (0, import_react18.useMemo)(
9778
9812
  () => ({
9779
9813
  responsive: true,
9780
9814
  maintainAspectRatio: false,
@@ -9883,7 +9917,7 @@ function ExpenseBarChart({
9883
9917
  }
9884
9918
 
9885
9919
  // src/components/ui/field.tsx
9886
- var import_react18 = require("react");
9920
+ var import_react19 = require("react");
9887
9921
  var import_class_variance_authority8 = require("class-variance-authority");
9888
9922
  var import_jsx_runtime60 = require("react/jsx-runtime");
9889
9923
  function FieldSet(_a) {
@@ -10082,7 +10116,7 @@ function FieldError(_a) {
10082
10116
  "children",
10083
10117
  "errors"
10084
10118
  ]);
10085
- const content = (0, import_react18.useMemo)(() => {
10119
+ const content = (0, import_react19.useMemo)(() => {
10086
10120
  var _a2;
10087
10121
  if (children) {
10088
10122
  return children;
@@ -10116,7 +10150,7 @@ function FieldError(_a) {
10116
10150
  }
10117
10151
 
10118
10152
  // src/components/ui/financial-cards.tsx
10119
- var React26 = __toESM(require("react"));
10153
+ var React27 = __toESM(require("react"));
10120
10154
  var import_lucide_react30 = require("lucide-react");
10121
10155
 
10122
10156
  // src/components/ui/financial-primitives.tsx
@@ -10279,7 +10313,7 @@ function PropertyCard({
10279
10313
  interestCharged,
10280
10314
  principlePaidOff
10281
10315
  }) {
10282
- const [expanded, setExpanded] = React26.useState(false);
10316
+ const [expanded, setExpanded] = React27.useState(false);
10283
10317
  return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
10284
10318
  "div",
10285
10319
  {
@@ -11134,7 +11168,7 @@ function OpportunityDetailsDrawer({
11134
11168
  }
11135
11169
 
11136
11170
  // src/components/ui/financial-sections.tsx
11137
- var import_react19 = require("react");
11171
+ var import_react20 = require("react");
11138
11172
  var import_jsx_runtime64 = require("react/jsx-runtime");
11139
11173
  function PropertyHoldingsSection({
11140
11174
  title = "Property Holdings",
@@ -11261,7 +11295,7 @@ function AlertAccordion({
11261
11295
  onSaveActions,
11262
11296
  isSaving = false
11263
11297
  }) {
11264
- const [actionMap, setActionMap] = (0, import_react19.useState)(
11298
+ const [actionMap, setActionMap] = (0, import_react20.useState)(
11265
11299
  {}
11266
11300
  );
11267
11301
  const handleActionChange = (id) => (action) => {
@@ -11495,7 +11529,7 @@ function FinancialViewSection({
11495
11529
  }
11496
11530
 
11497
11531
  // src/components/ui/income-bar-chart.tsx
11498
- var import_react20 = require("react");
11532
+ var import_react21 = require("react");
11499
11533
  var import_chart9 = require("chart.js");
11500
11534
  var import_react_chartjs_29 = require("react-chartjs-2");
11501
11535
  var import_jsx_runtime65 = require("react/jsx-runtime");
@@ -11522,9 +11556,9 @@ function IncomeBarChart({
11522
11556
  isLoading = false
11523
11557
  }) {
11524
11558
  const periods = CHART_PERIODS[granularity];
11525
- const [period, setPeriod] = (0, import_react20.useState)(defaultPeriod);
11526
- const isFirstRender = (0, import_react20.useRef)(true);
11527
- (0, import_react20.useEffect)(() => {
11559
+ const [period, setPeriod] = (0, import_react21.useState)(defaultPeriod);
11560
+ const isFirstRender = (0, import_react21.useRef)(true);
11561
+ (0, import_react21.useEffect)(() => {
11528
11562
  if (isFirstRender.current) {
11529
11563
  isFirstRender.current = false;
11530
11564
  return;
@@ -11534,7 +11568,7 @@ function IncomeBarChart({
11534
11568
  const themeVars = useThemeVars();
11535
11569
  const brandPrimary = themeVars["--theme-primary"] || FALLBACK_PRIMARY;
11536
11570
  const fontFamily = themeVars["--font-sans"] || "Figtree, sans-serif";
11537
- const sliced = (0, import_react20.useMemo)(() => {
11571
+ const sliced = (0, import_react21.useMemo)(() => {
11538
11572
  var _a, _b;
11539
11573
  if (!((_a = incomeData == null ? void 0 : incomeData.months) == null ? void 0 : _a.length) || !incomeData.datasets.length) return null;
11540
11574
  const count = Math.min(
@@ -11550,7 +11584,7 @@ function IncomeBarChart({
11550
11584
  }))
11551
11585
  };
11552
11586
  }, [incomeData, period, granularity]);
11553
- const datasetColors = (0, import_react20.useMemo)(
11587
+ const datasetColors = (0, import_react21.useMemo)(
11554
11588
  () => {
11555
11589
  var _a;
11556
11590
  return (_a = sliced == null ? void 0 : sliced.datasets.map(
@@ -11559,7 +11593,7 @@ function IncomeBarChart({
11559
11593
  },
11560
11594
  [sliced, brandPrimary]
11561
11595
  );
11562
- const chartData = (0, import_react20.useMemo)(() => {
11596
+ const chartData = (0, import_react21.useMemo)(() => {
11563
11597
  if (!sliced) return { labels: [], datasets: [] };
11564
11598
  return {
11565
11599
  labels: sliced.months,
@@ -11580,7 +11614,7 @@ function IncomeBarChart({
11580
11614
  }))
11581
11615
  };
11582
11616
  }, [sliced, datasetColors, brandPrimary]);
11583
- const options = (0, import_react20.useMemo)(
11617
+ const options = (0, import_react21.useMemo)(
11584
11618
  () => ({
11585
11619
  responsive: true,
11586
11620
  maintainAspectRatio: false,
@@ -11855,7 +11889,7 @@ function InputGroupTextarea(_a) {
11855
11889
  }
11856
11890
 
11857
11891
  // src/components/ui/input-otp.tsx
11858
- var React29 = __toESM(require("react"));
11892
+ var React30 = __toESM(require("react"));
11859
11893
  var import_input_otp = require("input-otp");
11860
11894
  var import_lucide_react32 = require("lucide-react");
11861
11895
  var import_jsx_runtime67 = require("react/jsx-runtime");
@@ -11902,7 +11936,7 @@ function InputOTPSlot(_a) {
11902
11936
  "className"
11903
11937
  ]);
11904
11938
  var _a2;
11905
- const inputOTPContext = React29.useContext(import_input_otp.OTPInputContext);
11939
+ const inputOTPContext = React30.useContext(import_input_otp.OTPInputContext);
11906
11940
  const { char, hasFakeCaret, isActive } = (_a2 = inputOTPContext.slots[index]) != null ? _a2 : {};
11907
11941
  return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
11908
11942
  "div",
@@ -12515,7 +12549,7 @@ function KanbanColumn({
12515
12549
  }
12516
12550
 
12517
12551
  // src/components/ui/opportunity-edit-modals.tsx
12518
- var React30 = __toESM(require("react"));
12552
+ var React31 = __toESM(require("react"));
12519
12553
  var import_lucide_react35 = require("lucide-react");
12520
12554
 
12521
12555
  // src/lib/opportunity-constants.ts
@@ -12878,9 +12912,9 @@ function EditLoanScenarioModal({
12878
12912
  container,
12879
12913
  className
12880
12914
  }) {
12881
- const [form, setForm] = React30.useState(__spreadValues(__spreadValues({}, LOAN_SCENARIO_DEFAULTS), initialData));
12882
- const initialSnapshot = React30.useRef("");
12883
- React30.useEffect(() => {
12915
+ const [form, setForm] = React31.useState(__spreadValues(__spreadValues({}, LOAN_SCENARIO_DEFAULTS), initialData));
12916
+ const initialSnapshot = React31.useRef("");
12917
+ React31.useEffect(() => {
12884
12918
  if (open) {
12885
12919
  const data = __spreadValues(__spreadValues({}, LOAN_SCENARIO_DEFAULTS), initialData);
12886
12920
  setForm(data);
@@ -13140,11 +13174,11 @@ function EditAssetsModal({
13140
13174
  container,
13141
13175
  className
13142
13176
  }) {
13143
- const [items, setItems] = React30.useState(
13177
+ const [items, setItems] = React31.useState(
13144
13178
  initialItems.length > 0 ? initialItems : [makeDefaultAssetItem()]
13145
13179
  );
13146
- const initialSnapshot = React30.useRef("");
13147
- React30.useEffect(() => {
13180
+ const initialSnapshot = React31.useRef("");
13181
+ React31.useEffect(() => {
13148
13182
  if (open) {
13149
13183
  const data = initialItems.length > 0 ? initialItems : [makeDefaultAssetItem()];
13150
13184
  setItems(data);
@@ -13437,11 +13471,11 @@ function EditDebtsModal({
13437
13471
  container,
13438
13472
  className
13439
13473
  }) {
13440
- const [items, setItems] = React30.useState(
13474
+ const [items, setItems] = React31.useState(
13441
13475
  initialItems.length > 0 ? initialItems : [makeDefaultDebtItem()]
13442
13476
  );
13443
- const initialSnapshot = React30.useRef("");
13444
- React30.useEffect(() => {
13477
+ const initialSnapshot = React31.useRef("");
13478
+ React31.useEffect(() => {
13445
13479
  if (open) {
13446
13480
  const data = initialItems.length > 0 ? initialItems : [makeDefaultDebtItem()];
13447
13481
  setItems(data);
@@ -13763,9 +13797,9 @@ function EditAboutApplicantModal({
13763
13797
  container,
13764
13798
  className
13765
13799
  }) {
13766
- const [form, setForm] = React30.useState(__spreadValues(__spreadValues({}, ABOUT_APPLICANT_DEFAULTS), initialData));
13767
- const initialSnapshot = React30.useRef("");
13768
- React30.useEffect(() => {
13800
+ const [form, setForm] = React31.useState(__spreadValues(__spreadValues({}, ABOUT_APPLICANT_DEFAULTS), initialData));
13801
+ const initialSnapshot = React31.useRef("");
13802
+ React31.useEffect(() => {
13769
13803
  if (open) {
13770
13804
  const data = __spreadValues(__spreadValues({}, ABOUT_APPLICANT_DEFAULTS), initialData);
13771
13805
  setForm(data);
@@ -14037,7 +14071,7 @@ function EditIncomeModal({
14037
14071
  container,
14038
14072
  className
14039
14073
  }) {
14040
- const defaultItems = React30.useMemo(
14074
+ const defaultItems = React31.useMemo(
14041
14075
  () => {
14042
14076
  var _a;
14043
14077
  return ((_a = initialData == null ? void 0 : initialData.items) == null ? void 0 : _a.length) ? initialData.items : [makeDefaultIncomeItem()];
@@ -14045,9 +14079,9 @@ function EditIncomeModal({
14045
14079
  []
14046
14080
  // eslint-disable-line react-hooks/exhaustive-deps
14047
14081
  );
14048
- const [items, setItems] = React30.useState(defaultItems);
14049
- const initialSnapshot = React30.useRef("");
14050
- React30.useEffect(() => {
14082
+ const [items, setItems] = React31.useState(defaultItems);
14083
+ const initialSnapshot = React31.useRef("");
14084
+ React31.useEffect(() => {
14051
14085
  var _a;
14052
14086
  if (open) {
14053
14087
  const data = ((_a = initialData == null ? void 0 : initialData.items) == null ? void 0 : _a.length) ? initialData.items : [makeDefaultIncomeItem()];
@@ -14264,7 +14298,7 @@ function EditExpensesModal({
14264
14298
  container,
14265
14299
  className
14266
14300
  }) {
14267
- const defaultItems = React30.useMemo(
14301
+ const defaultItems = React31.useMemo(
14268
14302
  () => {
14269
14303
  var _a;
14270
14304
  return ((_a = initialData == null ? void 0 : initialData.items) == null ? void 0 : _a.length) ? initialData.items : [makeDefaultExpenseItem()];
@@ -14272,9 +14306,9 @@ function EditExpensesModal({
14272
14306
  []
14273
14307
  // eslint-disable-line react-hooks/exhaustive-deps
14274
14308
  );
14275
- const [items, setItems] = React30.useState(defaultItems);
14276
- const initialSnapshot = React30.useRef("");
14277
- React30.useEffect(() => {
14309
+ const [items, setItems] = React31.useState(defaultItems);
14310
+ const initialSnapshot = React31.useRef("");
14311
+ React31.useEffect(() => {
14278
14312
  var _a;
14279
14313
  if (open) {
14280
14314
  const data = ((_a = initialData == null ? void 0 : initialData.items) == null ? void 0 : _a.length) ? initialData.items : [makeDefaultExpenseItem()];
@@ -14407,7 +14441,7 @@ function EditExpensesModal({
14407
14441
  }
14408
14442
 
14409
14443
  // src/components/ui/opportunity-summary-tab.tsx
14410
- var import_react21 = require("react");
14444
+ var import_react22 = require("react");
14411
14445
  var import_lucide_react36 = require("lucide-react");
14412
14446
  var import_jsx_runtime72 = require("react/jsx-runtime");
14413
14447
  function toMonthly(amount, freq) {
@@ -14668,20 +14702,20 @@ function OpportunitySummaryTab({
14668
14702
  onCoExpensesChange
14669
14703
  }) {
14670
14704
  var _a, _b;
14671
- const [portalEl, setPortalEl] = (0, import_react21.useState)(null);
14672
- const [summarySubTab, setSummarySubTab] = (0, import_react21.useState)(
14705
+ const [portalEl, setPortalEl] = (0, import_react22.useState)(null);
14706
+ const [summarySubTab, setSummarySubTab] = (0, import_react22.useState)(
14673
14707
  "joint"
14674
14708
  );
14675
- const [loanScenarioExpanded, setLoanScenarioExpanded] = (0, import_react21.useState)(true);
14676
- const [editLoanOpen, setEditLoanOpen] = (0, import_react21.useState)(false);
14677
- const [editAssetsOpen, setEditAssetsOpen] = (0, import_react21.useState)(false);
14678
- const [editDebtsOpen, setEditDebtsOpen] = (0, import_react21.useState)(false);
14679
- const [editMainAboutOpen, setEditMainAboutOpen] = (0, import_react21.useState)(false);
14680
- const [editCoAboutOpen, setEditCoAboutOpen] = (0, import_react21.useState)(false);
14681
- const [editMainIncomeOpen, setEditMainIncomeOpen] = (0, import_react21.useState)(false);
14682
- const [editCoIncomeOpen, setEditCoIncomeOpen] = (0, import_react21.useState)(false);
14683
- const [editMainExpensesOpen, setEditMainExpensesOpen] = (0, import_react21.useState)(false);
14684
- const [editCoExpensesOpen, setEditCoExpensesOpen] = (0, import_react21.useState)(false);
14709
+ const [loanScenarioExpanded, setLoanScenarioExpanded] = (0, import_react22.useState)(true);
14710
+ const [editLoanOpen, setEditLoanOpen] = (0, import_react22.useState)(false);
14711
+ const [editAssetsOpen, setEditAssetsOpen] = (0, import_react22.useState)(false);
14712
+ const [editDebtsOpen, setEditDebtsOpen] = (0, import_react22.useState)(false);
14713
+ const [editMainAboutOpen, setEditMainAboutOpen] = (0, import_react22.useState)(false);
14714
+ const [editCoAboutOpen, setEditCoAboutOpen] = (0, import_react22.useState)(false);
14715
+ const [editMainIncomeOpen, setEditMainIncomeOpen] = (0, import_react22.useState)(false);
14716
+ const [editCoIncomeOpen, setEditCoIncomeOpen] = (0, import_react22.useState)(false);
14717
+ const [editMainExpensesOpen, setEditMainExpensesOpen] = (0, import_react22.useState)(false);
14718
+ const [editCoExpensesOpen, setEditCoExpensesOpen] = (0, import_react22.useState)(false);
14685
14719
  const totalAssetsAmount = assets.reduce((sum, a) => sum + a.value, 0);
14686
14720
  const totalDebtsAmount = debts.reduce((sum, d) => sum + d.amountOwing, 0);
14687
14721
  const totalAssets = formatCurrency(totalAssetsAmount);
@@ -15071,8 +15105,9 @@ function OpportunitySummaryTab({
15071
15105
  }
15072
15106
 
15073
15107
  // src/components/ui/sidebar-nav.tsx
15074
- var React31 = __toESM(require("react"));
15108
+ var React32 = __toESM(require("react"));
15075
15109
  var import_lucide_react37 = require("lucide-react");
15110
+ var import_accordion6 = require("@base-ui/react/accordion");
15076
15111
 
15077
15112
  // src/components/ui/tooltip.tsx
15078
15113
  var import_tooltip = require("@base-ui/react/tooltip");
@@ -15217,7 +15252,7 @@ function SidebarNavItemView({
15217
15252
  Icon,
15218
15253
  {
15219
15254
  className: navIconCn((_a = item.isActive) != null ? _a : false),
15220
- size: 18,
15255
+ size: 24,
15221
15256
  strokeWidth: 1.75
15222
15257
  }
15223
15258
  ),
@@ -15234,8 +15269,8 @@ function CollapsibleNavItem({
15234
15269
  var _a, _b;
15235
15270
  const Icon = item.icon;
15236
15271
  const hasActiveChild = (_b = (_a = item.subItems) == null ? void 0 : _a.some((sub) => sub.isActive)) != null ? _b : false;
15237
- const [open, setOpen] = React31.useState(hasActiveChild);
15238
- React31.useEffect(() => {
15272
+ const [open, setOpen] = React32.useState(hasActiveChild);
15273
+ React32.useEffect(() => {
15239
15274
  if (hasActiveChild) setOpen(true);
15240
15275
  }, [hasActiveChild]);
15241
15276
  if (collapsed) {
@@ -15254,79 +15289,83 @@ function CollapsibleNavItem({
15254
15289
  Icon,
15255
15290
  {
15256
15291
  className: navIconCn(hasActiveChild),
15257
- size: 18,
15292
+ size: 24,
15258
15293
  strokeWidth: 1.75
15259
15294
  }
15260
15295
  )
15261
15296
  }
15262
15297
  ) });
15263
15298
  }
15264
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { children: [
15265
- /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
15266
- Button,
15267
- {
15268
- type: "button",
15269
- variant: "ghost",
15270
- onClick: () => setOpen((prev) => !prev),
15271
- className: cn(
15272
- "group h-auto w-full justify-start gap-3 px-3 py-2.5 text-base font-medium transition-colors",
15273
- "text-brand-secondary-foreground/70 hover:bg-white/10 hover:text-brand-secondary-foreground",
15274
- "border-l-4 border-transparent",
15275
- hasActiveChild && "bg-white/15 text-brand-secondary-foreground border-primary"
15276
- ),
15277
- children: [
15278
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15279
- Icon,
15280
- {
15281
- className: navIconCn(hasActiveChild),
15282
- size: 18,
15283
- strokeWidth: 1.75
15284
- }
15285
- ),
15286
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "flex-1 truncate text-left", children: item.title }),
15287
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15288
- import_lucide_react37.ChevronDown,
15289
- {
15290
- className: cn(
15291
- "ml-auto shrink-0 text-brand-secondary-foreground/40 transition-transform duration-200",
15292
- open && "rotate-180"
15299
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15300
+ Accordion,
15301
+ {
15302
+ value: open ? [item.href] : [],
15303
+ onValueChange: (values) => setOpen(values.length > 0),
15304
+ children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(AccordionItem, { className: "border-none", value: item.href, children: [
15305
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_accordion6.Accordion.Header, { className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
15306
+ import_accordion6.Accordion.Trigger,
15307
+ {
15308
+ className: cn(
15309
+ "group flex h-auto w-full items-center justify-start gap-3 px-3 py-2.5 text-base font-medium transition-colors",
15310
+ "text-brand-secondary-foreground/70 hover:bg-white/10 hover:text-brand-secondary-foreground",
15311
+ "border-l-4 border-transparent",
15312
+ hasActiveChild && "bg-white/15 text-brand-secondary-foreground border-primary"
15313
+ ),
15314
+ children: [
15315
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15316
+ Icon,
15317
+ {
15318
+ className: navIconCn(hasActiveChild),
15319
+ size: 24,
15320
+ strokeWidth: 1.75
15321
+ }
15293
15322
  ),
15294
- size: 14,
15295
- strokeWidth: 2
15296
- }
15297
- )
15298
- ]
15299
- }
15300
- ),
15301
- open && item.subItems && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "ml-9 border-l border-white/15 pl-3", children: item.subItems.map((sub) => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
15302
- Button,
15303
- {
15304
- type: "button",
15305
- variant: "ghost",
15306
- onClick: () => onNavigate == null ? void 0 : onNavigate(sub.href),
15307
- className: cn(
15308
- "h-auto w-full justify-start gap-2 py-1.5 pl-1 text-sm transition-colors",
15309
- "text-brand-secondary-foreground/50 hover:text-brand-secondary-foreground",
15310
- sub.isActive && "text-primary font-medium"
15311
- ),
15312
- children: [
15313
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15314
- import_lucide_react37.ChevronRight,
15315
- {
15316
- size: 11,
15317
- strokeWidth: 2,
15318
- className: cn(
15319
- "shrink-0",
15320
- sub.isActive ? "text-primary" : "text-brand-secondary-foreground/30"
15323
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "flex-1 truncate text-left", children: item.title }),
15324
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15325
+ import_lucide_react37.ChevronDown,
15326
+ {
15327
+ className: cn(
15328
+ "ml-auto shrink-0 text-brand-secondary-foreground/40 transition-transform duration-200",
15329
+ "group-data-[panel-open]:rotate-180"
15330
+ ),
15331
+ size: 14,
15332
+ strokeWidth: 2
15333
+ }
15321
15334
  )
15322
- }
15323
- ),
15324
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "truncate", children: sub.title })
15325
- ]
15326
- },
15327
- sub.href
15328
- )) })
15329
- ] });
15335
+ ]
15336
+ }
15337
+ ) }),
15338
+ item.subItems && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(AccordionContent, { className: "p-0 text-inherit", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "ml-9 border-l border-white/15 pl-3", children: item.subItems.map((sub) => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
15339
+ Button,
15340
+ {
15341
+ type: "button",
15342
+ variant: "ghost",
15343
+ onClick: () => onNavigate == null ? void 0 : onNavigate(sub.href),
15344
+ className: cn(
15345
+ "h-auto w-full justify-start gap-2 py-1.5 pl-1 text-sm transition-colors",
15346
+ "text-brand-secondary-foreground/50 hover:text-brand-secondary-foreground",
15347
+ sub.isActive && "text-primary font-medium"
15348
+ ),
15349
+ children: [
15350
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15351
+ import_lucide_react37.ChevronRight,
15352
+ {
15353
+ size: 11,
15354
+ strokeWidth: 2,
15355
+ className: cn(
15356
+ "shrink-0",
15357
+ sub.isActive ? "text-primary" : "text-brand-secondary-foreground/30"
15358
+ )
15359
+ }
15360
+ ),
15361
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "truncate", children: sub.title })
15362
+ ]
15363
+ },
15364
+ sub.href
15365
+ )) }) })
15366
+ ] })
15367
+ }
15368
+ );
15330
15369
  }
15331
15370
  function SidebarNav({
15332
15371
  items,
@@ -15340,97 +15379,145 @@ function SidebarNav({
15340
15379
  onCollapsedChange,
15341
15380
  className
15342
15381
  }) {
15343
- const [userMenuOpen, setUserMenuOpen] = React31.useState(false);
15382
+ const [userMenuOpen, setUserMenuOpen] = React32.useState(false);
15383
+ const navScrollRef = React32.useRef(null);
15384
+ const expandedScrollRef = React32.useRef(0);
15385
+ React32.useEffect(() => {
15386
+ if (collapsed) setUserMenuOpen(false);
15387
+ }, [collapsed]);
15388
+ React32.useLayoutEffect(() => {
15389
+ const nav = navScrollRef.current;
15390
+ if (!nav) return;
15391
+ if (!collapsed) {
15392
+ nav.scrollTop = expandedScrollRef.current;
15393
+ }
15394
+ return () => {
15395
+ if (!collapsed && nav) {
15396
+ expandedScrollRef.current = nav.scrollTop;
15397
+ }
15398
+ };
15399
+ }, [collapsed]);
15344
15400
  return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
15345
15401
  "nav",
15346
15402
  {
15347
15403
  "data-slot": "sidebar-nav",
15348
15404
  "data-collapsed": collapsed,
15349
15405
  className: cn(
15350
- // Force dark-mode CSS variable resolution — sidebar is always dark-backgrounded
15351
- // regardless of system theme, so semantic tokens (destructive, success, etc.)
15352
- // must use their dark-mode values to maintain WCAG contrast.
15353
- "dark flex h-full flex-col bg-brand-secondary text-brand-secondary-foreground",
15406
+ "flex h-full flex-col bg-brand-secondary text-brand-secondary-foreground",
15354
15407
  "transition-all duration-200 ease-in-out",
15355
15408
  collapsed ? "w-14" : "w-[279px]",
15356
15409
  className
15357
15410
  ),
15358
15411
  children: [
15359
- !collapsed && logo && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "flex items-center border-b border-white/15 px-5 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15360
- "img",
15361
- {
15362
- src: logo,
15363
- alt: "Logo",
15364
- className: "h-8 w-auto object-contain object-left",
15365
- style: { filter: "brightness(0) invert(1)" }
15366
- }
15367
- ) }),
15368
- collapsed && logoCollapsed && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "flex items-center justify-center border-b border-white/15 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15369
- "img",
15370
- {
15371
- src: logoCollapsed,
15372
- alt: "Logo",
15373
- className: "h-8 w-8 object-contain",
15374
- style: { filter: "brightness(0) invert(1)" }
15375
- }
15376
- ) }),
15377
- /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "border-b border-white/15", children: [
15378
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(NavTooltip, { label: userName, collapsed, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
15379
- Button,
15412
+ (logo || logoCollapsed) && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "relative flex items-center border-b border-white/15 py-4 overflow-hidden", children: [
15413
+ logo && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15414
+ "img",
15380
15415
  {
15381
- type: "button",
15382
- variant: "ghost",
15383
- onClick: () => !collapsed && setUserMenuOpen((prev) => !prev),
15416
+ src: logo,
15417
+ alt: "Logo",
15384
15418
  className: cn(
15385
- "group h-auto w-full justify-start gap-3 px-5 py-5 text-base transition-colors",
15386
- "text-brand-secondary-foreground hover:bg-white/10",
15387
- collapsed && "justify-center px-2 py-4"
15419
+ "h-8 w-auto object-contain object-left px-5 transition-opacity duration-200",
15420
+ collapsed ? "opacity-0" : "opacity-100"
15388
15421
  ),
15389
- children: [
15390
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center font-semibold text-xs bg-primary text-primary-foreground", children: getInitials(userName) }),
15391
- !collapsed && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx_runtime74.Fragment, { children: [
15392
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "flex-1 truncate text-left font-medium text-brand-secondary-foreground", children: userName }),
15393
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15394
- import_lucide_react37.ChevronDown,
15395
- {
15396
- className: cn(
15397
- "shrink-0 text-brand-secondary-foreground/50 transition-transform duration-200",
15398
- userMenuOpen && "rotate-180"
15399
- ),
15400
- size: 16,
15401
- strokeWidth: 2
15402
- }
15403
- )
15404
- ] })
15405
- ]
15422
+ style: { filter: "brightness(0) invert(1)" }
15406
15423
  }
15407
- ) }),
15408
- !collapsed && userMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "border-t border-white/15 bg-black/20", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
15409
- Button,
15424
+ ),
15425
+ logoCollapsed && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15426
+ "img",
15410
15427
  {
15411
- type: "button",
15412
- variant: "ghost",
15413
- onClick: onLogout,
15428
+ src: logoCollapsed,
15429
+ alt: "Logo",
15414
15430
  className: cn(
15415
- "h-auto w-full justify-start gap-3 px-5 py-3 text-base",
15416
- "text-brand-secondary-foreground/70 hover:bg-white/10 hover:text-brand-secondary-foreground transition-colors"
15431
+ "absolute inset-y-0 left-0 right-0 m-auto h-8 w-8 object-contain transition-opacity duration-200",
15432
+ collapsed ? "opacity-100" : "opacity-0"
15417
15433
  ),
15418
- children: [
15419
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15420
- import_lucide_react37.LogOut,
15421
- {
15422
- size: 16,
15423
- strokeWidth: 1.75,
15424
- className: "shrink-0 text-destructive"
15425
- }
15426
- ),
15427
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { children: "Logout" })
15428
- ]
15434
+ style: { filter: "brightness(0) invert(1)" }
15435
+ }
15436
+ )
15437
+ ] }),
15438
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "relative border-b border-white/15", children: [
15439
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15440
+ "div",
15441
+ {
15442
+ className: cn(
15443
+ collapsed ? "opacity-0 pointer-events-none" : "opacity-100"
15444
+ ),
15445
+ children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15446
+ Accordion,
15447
+ {
15448
+ value: userMenuOpen ? ["user-menu"] : [],
15449
+ onValueChange: (values) => setUserMenuOpen(values.length > 0),
15450
+ children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(AccordionItem, { className: "border-none", value: "user-menu", children: [
15451
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_accordion6.Accordion.Header, { className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
15452
+ import_accordion6.Accordion.Trigger,
15453
+ {
15454
+ className: cn(
15455
+ "group flex h-auto w-full items-center justify-start gap-3 px-5 py-5 text-base transition-colors",
15456
+ "text-brand-secondary-foreground hover:bg-white/10"
15457
+ ),
15458
+ children: [
15459
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center font-semibold text-xs bg-primary text-primary-foreground", children: getInitials(userName) }),
15460
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "flex-1 truncate text-left font-medium text-brand-secondary-foreground", children: userName }),
15461
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15462
+ import_lucide_react37.ChevronDown,
15463
+ {
15464
+ className: "ml-auto shrink-0 text-brand-secondary-foreground/50 transition-transform duration-200 group-data-[panel-open]:rotate-180",
15465
+ size: 16,
15466
+ strokeWidth: 2
15467
+ }
15468
+ )
15469
+ ]
15470
+ }
15471
+ ) }),
15472
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(AccordionContent, { className: "p-0 text-inherit", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "border-t border-white/15 bg-black/20", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
15473
+ Button,
15474
+ {
15475
+ type: "button",
15476
+ variant: "ghost",
15477
+ onClick: onLogout,
15478
+ className: cn(
15479
+ "h-auto w-full justify-start gap-3 px-5 py-3 text-base",
15480
+ "text-brand-secondary-foreground/70 hover:bg-white/10 hover:text-brand-secondary-foreground transition-colors"
15481
+ ),
15482
+ children: [
15483
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15484
+ import_lucide_react37.LogOut,
15485
+ {
15486
+ size: 16,
15487
+ strokeWidth: 1.75,
15488
+ className: "shrink-0 text-destructive"
15489
+ }
15490
+ ),
15491
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { children: "Logout" })
15492
+ ]
15493
+ }
15494
+ ) }) })
15495
+ ] })
15496
+ }
15497
+ )
15498
+ }
15499
+ ),
15500
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(NavTooltip, { label: userName, collapsed, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15501
+ "div",
15502
+ {
15503
+ className: cn(
15504
+ "absolute inset-0 flex items-center justify-center transition-opacity duration-200",
15505
+ collapsed ? "opacity-100" : "opacity-0 pointer-events-none"
15506
+ ),
15507
+ children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center font-semibold text-xs bg-primary text-primary-foreground", children: getInitials(userName) })
15429
15508
  }
15430
15509
  ) })
15431
15510
  ] }),
15432
- !collapsed && !!(metricsGroups == null ? void 0 : metricsGroups.length) && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { children: metricsGroups.map((group, i) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(MetricsGroup, { group }, i)) }),
15433
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "flex flex-col overflow-y-auto py-3", children: items.map(
15511
+ !!(metricsGroups == null ? void 0 : metricsGroups.length) && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15512
+ Accordion,
15513
+ {
15514
+ value: !collapsed ? ["metrics"] : [],
15515
+ onValueChange: () => {
15516
+ },
15517
+ children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(AccordionItem, { className: "border-none", value: "metrics", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(AccordionContent, { className: "p-0 text-inherit", children: metricsGroups.map((group, i) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(MetricsGroup, { group }, i)) }) })
15518
+ }
15519
+ ),
15520
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { ref: navScrollRef, className: "flex flex-col overflow-y-auto py-3", children: items.map(
15434
15521
  (item) => item.isCollapsible ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15435
15522
  CollapsibleNavItem,
15436
15523
  {
@@ -15461,7 +15548,7 @@ function SidebarNav({
15461
15548
  variant: "ghost",
15462
15549
  onClick: () => onCollapsedChange(!collapsed),
15463
15550
  className: cn(
15464
- "h-auto w-full justify-start gap-3 px-3 py-3 transition-colors",
15551
+ "h-12 w-full justify-start gap-3 px-3 py-3 transition-colors",
15465
15552
  "text-brand-secondary-foreground/80 hover:bg-white/10 hover:text-brand-secondary-foreground",
15466
15553
  collapsed && "justify-center px-2"
15467
15554
  ),
@@ -15469,14 +15556,14 @@ function SidebarNav({
15469
15556
  collapsed ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15470
15557
  import_lucide_react37.PanelLeftOpen,
15471
15558
  {
15472
- size: 18,
15559
+ size: 24,
15473
15560
  strokeWidth: 1.75,
15474
15561
  className: "shrink-0"
15475
15562
  }
15476
15563
  ) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15477
15564
  import_lucide_react37.PanelLeftClose,
15478
15565
  {
15479
- size: 18,
15566
+ size: 24,
15480
15567
  strokeWidth: 1.75,
15481
15568
  className: "shrink-0"
15482
15569
  }
@@ -15670,7 +15757,7 @@ function PipelineBoard({
15670
15757
  }
15671
15758
 
15672
15759
  // src/components/ui/pipeline-chart.tsx
15673
- var React32 = __toESM(require("react"));
15760
+ var React33 = __toESM(require("react"));
15674
15761
  var import_jsx_runtime77 = require("react/jsx-runtime");
15675
15762
  function formatValue(v) {
15676
15763
  return new Intl.NumberFormat("en-AU", {
@@ -15693,9 +15780,9 @@ function PipelineChart({
15693
15780
  className
15694
15781
  }) {
15695
15782
  const themeVars = useThemeVars();
15696
- const [activeId, setActiveId] = React32.useState(null);
15697
- const [tooltipX, setTooltipX] = React32.useState(0);
15698
- const barRef = React32.useRef(null);
15783
+ const [activeId, setActiveId] = React33.useState(null);
15784
+ const [tooltipX, setTooltipX] = React33.useState(0);
15785
+ const barRef = React33.useRef(null);
15699
15786
  const nonEmpty = stages.filter((s) => s.value > 0);
15700
15787
  const total = nonEmpty.reduce((sum, s) => sum + s.value, 0);
15701
15788
  if (total === 0 || stages.length === 0) {
@@ -15800,7 +15887,7 @@ function PipelineChart({
15800
15887
  }
15801
15888
 
15802
15889
  // src/components/ui/pipeline-dialogs.tsx
15803
- var React33 = __toESM(require("react"));
15890
+ var React34 = __toESM(require("react"));
15804
15891
  var import_date_fns3 = require("date-fns");
15805
15892
  var import_jsx_runtime78 = require("react/jsx-runtime");
15806
15893
  function DeleteOpportunityDialog({
@@ -15914,10 +16001,10 @@ function PutOnHoldDialog({
15914
16001
  onSave,
15915
16002
  className
15916
16003
  }) {
15917
- const [duration, setDuration] = React33.useState("90");
15918
- const [customDate, setCustomDate] = React33.useState();
15919
- const today = React33.useMemo(() => (0, import_date_fns3.startOfDay)(/* @__PURE__ */ new Date()), []);
15920
- const resolvedDate = React33.useMemo(() => {
16004
+ const [duration, setDuration] = React34.useState("90");
16005
+ const [customDate, setCustomDate] = React34.useState();
16006
+ const today = React34.useMemo(() => (0, import_date_fns3.startOfDay)(/* @__PURE__ */ new Date()), []);
16007
+ const resolvedDate = React34.useMemo(() => {
15921
16008
  if (duration === "custom") return customDate;
15922
16009
  return (0, import_date_fns3.addDays)(today, parseInt(duration, 10));
15923
16010
  }, [duration, customDate, today]);
@@ -15926,7 +16013,7 @@ function PutOnHoldDialog({
15926
16013
  if (!resolvedDate) return;
15927
16014
  onSave((0, import_date_fns3.format)(resolvedDate, "yyyy-MM-dd"));
15928
16015
  }
15929
- React33.useEffect(() => {
16016
+ React34.useEffect(() => {
15930
16017
  if (open) {
15931
16018
  setDuration("90");
15932
16019
  setCustomDate(void 0);
@@ -16068,7 +16155,7 @@ function Progress(_a) {
16068
16155
  }
16069
16156
 
16070
16157
  // src/components/ui/property-cashflow-doughnut-chart.tsx
16071
- var import_react22 = require("react");
16158
+ var import_react23 = require("react");
16072
16159
  var import_chart10 = require("chart.js");
16073
16160
  var import_react_chartjs_210 = require("react-chartjs-2");
16074
16161
  var import_jsx_runtime82 = require("react/jsx-runtime");
@@ -16092,7 +16179,7 @@ function PropertyCashflowDoughnutChart({
16092
16179
  const total = incomeVal + expensesVal;
16093
16180
  const netCashflow = incomeVal - expensesVal;
16094
16181
  const hasData = total > 0;
16095
- const chartData = (0, import_react22.useMemo)(
16182
+ const chartData = (0, import_react23.useMemo)(
16096
16183
  () => ({
16097
16184
  labels: ["Income", "Expenses"],
16098
16185
  datasets: [
@@ -16106,7 +16193,7 @@ function PropertyCashflowDoughnutChart({
16106
16193
  }),
16107
16194
  [incomeVal, expensesVal, brandPrimary, brandSecondary]
16108
16195
  );
16109
- const options = (0, import_react22.useMemo)(
16196
+ const options = (0, import_react23.useMemo)(
16110
16197
  () => ({
16111
16198
  responsive: true,
16112
16199
  maintainAspectRatio: false,
@@ -16198,7 +16285,7 @@ function PropertyCashflowDoughnutChart({
16198
16285
  }
16199
16286
 
16200
16287
  // src/components/ui/property-debt-equity-doughnut-chart.tsx
16201
- var import_react23 = require("react");
16288
+ var import_react24 = require("react");
16202
16289
  var import_chart11 = require("chart.js");
16203
16290
  var import_react_chartjs_211 = require("react-chartjs-2");
16204
16291
  var import_jsx_runtime83 = require("react/jsx-runtime");
@@ -16221,7 +16308,7 @@ function PropertyDebtEquityDoughnutChart({
16221
16308
  const debt = Math.min(debtValue != null ? debtValue : 0, estimate);
16222
16309
  const equity = Math.max(0, estimate - debt);
16223
16310
  const hasData = estimate > 0;
16224
- const chartData = (0, import_react23.useMemo)(
16311
+ const chartData = (0, import_react24.useMemo)(
16225
16312
  () => ({
16226
16313
  labels: ["Equity", "Debt"],
16227
16314
  datasets: [
@@ -16235,7 +16322,7 @@ function PropertyDebtEquityDoughnutChart({
16235
16322
  }),
16236
16323
  [equity, debt, brandPrimary, brandSecondary]
16237
16324
  );
16238
- const options = (0, import_react23.useMemo)(
16325
+ const options = (0, import_react24.useMemo)(
16239
16326
  () => ({
16240
16327
  responsive: true,
16241
16328
  maintainAspectRatio: false,
@@ -16326,7 +16413,7 @@ function PropertyDebtEquityDoughnutChart({
16326
16413
  }
16327
16414
 
16328
16415
  // src/components/ui/property-mobile-estimate-line-chart.tsx
16329
- var import_react24 = require("react");
16416
+ var import_react25 = require("react");
16330
16417
  var import_chart12 = require("chart.js");
16331
16418
  var import_react_chartjs_212 = require("react-chartjs-2");
16332
16419
  var import_jsx_runtime84 = require("react/jsx-runtime");
@@ -16400,29 +16487,29 @@ function PropertyMobileEstimateLineChart({
16400
16487
  className,
16401
16488
  isLoading = false
16402
16489
  }) {
16403
- const [period, setPeriod] = (0, import_react24.useState)(defaultPeriod);
16490
+ const [period, setPeriod] = (0, import_react25.useState)(defaultPeriod);
16404
16491
  const themeVars = useThemeVars();
16405
16492
  const brandPrimary = themeVars["--theme-primary"] || FALLBACK_PRIMARY;
16406
16493
  const brandSecondary = themeVars["--theme-secondary"] || FALLBACK_SECONDARY;
16407
16494
  const fontFamily = themeVars["--font-sans"] || "Figtree, sans-serif";
16408
- const sliced = (0, import_react24.useMemo)(() => {
16495
+ const sliced = (0, import_react25.useMemo)(() => {
16409
16496
  if (!(chartData == null ? void 0 : chartData.length)) return null;
16410
16497
  const count = Math.min(PROPERTY_SLICE_COUNT[period], chartData.length);
16411
16498
  const start = chartData.length - count;
16412
16499
  return chartData.slice(start);
16413
16500
  }, [chartData, period]);
16414
- const showDebt = (0, import_react24.useMemo)(
16501
+ const showDebt = (0, import_react25.useMemo)(
16415
16502
  () => !!(sliced == null ? void 0 : sliced.some((p) => p.debt != null && p.debt > 0)),
16416
16503
  [sliced]
16417
16504
  );
16418
- const labels = (0, import_react24.useMemo)(
16505
+ const labels = (0, import_react25.useMemo)(
16419
16506
  () => {
16420
16507
  var _a;
16421
16508
  return (_a = sliced == null ? void 0 : sliced.map((p) => formatMonthLabel(p.date))) != null ? _a : [];
16422
16509
  },
16423
16510
  [sliced]
16424
16511
  );
16425
- const data = (0, import_react24.useMemo)(() => {
16512
+ const data = (0, import_react25.useMemo)(() => {
16426
16513
  if (!sliced) return { labels: [], datasets: [] };
16427
16514
  return {
16428
16515
  labels,
@@ -16481,7 +16568,7 @@ function PropertyMobileEstimateLineChart({
16481
16568
  ]
16482
16569
  };
16483
16570
  }, [sliced, labels, brandPrimary, brandSecondary, showDebt]);
16484
- const options = (0, import_react24.useMemo)(
16571
+ const options = (0, import_react25.useMemo)(
16485
16572
  () => ({
16486
16573
  responsive: true,
16487
16574
  maintainAspectRatio: false,
@@ -16772,15 +16859,15 @@ function StageTimeline({
16772
16859
  }
16773
16860
 
16774
16861
  // src/components/ui/stepper.tsx
16775
- var React37 = __toESM(require("react"));
16862
+ var React38 = __toESM(require("react"));
16776
16863
  var import_lucide_react41 = require("lucide-react");
16777
16864
  var import_jsx_runtime87 = require("react/jsx-runtime");
16778
- var StepperContext = React37.createContext({
16865
+ var StepperContext = React38.createContext({
16779
16866
  activeStep: 0,
16780
16867
  orientation: "horizontal",
16781
16868
  totalSteps: 0
16782
16869
  });
16783
- var StepContext = React37.createContext({
16870
+ var StepContext = React38.createContext({
16784
16871
  index: 0,
16785
16872
  isActive: false,
16786
16873
  isCompleted: false,
@@ -16793,7 +16880,7 @@ function Stepper({
16793
16880
  className,
16794
16881
  children
16795
16882
  }) {
16796
- const totalSteps = React37.Children.count(children);
16883
+ const totalSteps = React38.Children.count(children);
16797
16884
  return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(StepperContext.Provider, { value: { activeStep, orientation, totalSteps }, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
16798
16885
  "div",
16799
16886
  {
@@ -16803,9 +16890,9 @@ function Stepper({
16803
16890
  orientation === "horizontal" ? "flex w-full items-start" : "flex flex-col",
16804
16891
  className
16805
16892
  ),
16806
- children: React37.Children.map(
16893
+ children: React38.Children.map(
16807
16894
  children,
16808
- (step, index) => React37.isValidElement(step) ? React37.cloneElement(
16895
+ (step, index) => React38.isValidElement(step) ? React38.cloneElement(
16809
16896
  step,
16810
16897
  { _index: index }
16811
16898
  ) : step
@@ -16814,7 +16901,7 @@ function Stepper({
16814
16901
  ) });
16815
16902
  }
16816
16903
  function Step({ _index = 0, error, className, children }) {
16817
- const { activeStep, orientation, totalSteps } = React37.useContext(StepperContext);
16904
+ const { activeStep, orientation, totalSteps } = React38.useContext(StepperContext);
16818
16905
  const isActive = _index === activeStep;
16819
16906
  const isCompleted = _index < activeStep;
16820
16907
  const isFirst = _index === 0;
@@ -16842,8 +16929,8 @@ function Step({ _index = 0, error, className, children }) {
16842
16929
  );
16843
16930
  }
16844
16931
  function StepIndicator({ error, className }) {
16845
- const { orientation } = React37.useContext(StepperContext);
16846
- const { index, isActive, isCompleted, isFirst, isLast } = React37.useContext(StepContext);
16932
+ const { orientation } = React38.useContext(StepperContext);
16933
+ const { index, isActive, isCompleted, isFirst, isLast } = React38.useContext(StepContext);
16847
16934
  const filled = isActive || isCompleted;
16848
16935
  const circle = /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
16849
16936
  "div",
@@ -16915,8 +17002,8 @@ function StepLabel({
16915
17002
  error,
16916
17003
  className
16917
17004
  }) {
16918
- const { orientation } = React37.useContext(StepperContext);
16919
- const { isActive, isCompleted, isLast } = React37.useContext(StepContext);
17005
+ const { orientation } = React38.useContext(StepperContext);
17006
+ const { isActive, isCompleted, isLast } = React38.useContext(StepContext);
16920
17007
  const subtext = typeof error === "string" ? error : description;
16921
17008
  return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
16922
17009
  "div",
@@ -16955,7 +17042,7 @@ function StepLabel({
16955
17042
  );
16956
17043
  }
16957
17044
  function StepContent({ className, children }) {
16958
- const { isActive } = React37.useContext(StepContext);
17045
+ const { isActive } = React38.useContext(StepContext);
16959
17046
  if (!isActive) return null;
16960
17047
  return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { "data-slot": "step-content", className: cn("pb-4 pt-2", className), children });
16961
17048
  }
@@ -16967,7 +17054,7 @@ function StepItem({ label, description, error }) {
16967
17054
  }
16968
17055
 
16969
17056
  // src/components/ui/transactions-expense-categories-doughnut-chart.tsx
16970
- var import_react25 = require("react");
17057
+ var import_react26 = require("react");
16971
17058
  var import_chart13 = require("chart.js");
16972
17059
  var import_react_chartjs_213 = require("react-chartjs-2");
16973
17060
  var import_jsx_runtime88 = require("react/jsx-runtime");
@@ -16985,20 +17072,20 @@ function TransactionsExpenseCategoriesDoughnutChart({
16985
17072
  const brandPrimary = themeVars["--theme-primary"] || FALLBACK_PRIMARY;
16986
17073
  const fontFamily = themeVars["--font-sans"] || "Figtree, sans-serif";
16987
17074
  const hasData = !!(segments == null ? void 0 : segments.length) && segments.some((s) => s.value > 0);
16988
- const total = (0, import_react25.useMemo)(
17075
+ const total = (0, import_react26.useMemo)(
16989
17076
  () => {
16990
17077
  var _a;
16991
17078
  return (_a = segments == null ? void 0 : segments.reduce((sum, s) => sum + s.value, 0)) != null ? _a : 0;
16992
17079
  },
16993
17080
  [segments]
16994
17081
  );
16995
- const colors = (0, import_react25.useMemo)(
17082
+ const colors = (0, import_react26.useMemo)(
16996
17083
  () => (segments != null ? segments : []).map(
16997
17084
  (_, i) => hexToRgba(brandPrimary, DATASET_ALPHAS[i % DATASET_ALPHAS.length])
16998
17085
  ),
16999
17086
  [segments, brandPrimary]
17000
17087
  );
17001
- const chartData = (0, import_react25.useMemo)(
17088
+ const chartData = (0, import_react26.useMemo)(
17002
17089
  () => {
17003
17090
  var _a, _b;
17004
17091
  return {
@@ -17015,7 +17102,7 @@ function TransactionsExpenseCategoriesDoughnutChart({
17015
17102
  },
17016
17103
  [segments, colors]
17017
17104
  );
17018
- const options = (0, import_react25.useMemo)(
17105
+ const options = (0, import_react26.useMemo)(
17019
17106
  () => ({
17020
17107
  responsive: true,
17021
17108
  maintainAspectRatio: false,
@@ -17094,7 +17181,7 @@ function TransactionsExpenseCategoriesDoughnutChart({
17094
17181
  }
17095
17182
 
17096
17183
  // src/components/ui/transactions-income-expense-bar-chart.tsx
17097
- var import_react26 = require("react");
17184
+ var import_react27 = require("react");
17098
17185
  var import_chart14 = require("chart.js");
17099
17186
  var import_chartjs_plugin_datalabels = __toESM(require("chartjs-plugin-datalabels"));
17100
17187
  var import_react_chartjs_214 = require("react-chartjs-2");
@@ -17123,7 +17210,7 @@ function TransactionsIncomeExpenseBarChart({
17123
17210
  const incomeVal = totalIncome != null ? totalIncome : 0;
17124
17211
  const expenseVal = Math.abs(totalExpense != null ? totalExpense : 0);
17125
17212
  const maxVal = Math.max(incomeVal, expenseVal);
17126
- const chartData = (0, import_react26.useMemo)(() => {
17213
+ const chartData = (0, import_react27.useMemo)(() => {
17127
17214
  if (!hasData) return { labels: [], datasets: [] };
17128
17215
  return {
17129
17216
  labels: ["Incoming", "Outgoing"],
@@ -17174,7 +17261,7 @@ function TransactionsIncomeExpenseBarChart({
17174
17261
  ]
17175
17262
  };
17176
17263
  }, [hasData, incomeVal, expenseVal, brandPrimary, brandSecondary]);
17177
- const options = (0, import_react26.useMemo)(
17264
+ const options = (0, import_react27.useMemo)(
17178
17265
  () => ({
17179
17266
  indexAxis: "y",
17180
17267
  responsive: true,
@@ -17237,7 +17324,7 @@ function TransactionsIncomeExpenseBarChart({
17237
17324
  }
17238
17325
 
17239
17326
  // src/components/ui/transactions-liabilities-breakdown-doughnut-chart.tsx
17240
- var import_react27 = require("react");
17327
+ var import_react28 = require("react");
17241
17328
  var import_chart15 = require("chart.js");
17242
17329
  var import_react_chartjs_215 = require("react-chartjs-2");
17243
17330
  var import_jsx_runtime90 = require("react/jsx-runtime");
@@ -17255,20 +17342,20 @@ function TransactionsLiabilitiesBreakdownChart({
17255
17342
  const brandPrimary = themeVars["--theme-primary"] || FALLBACK_PRIMARY;
17256
17343
  const fontFamily = themeVars["--font-sans"] || "Figtree, sans-serif";
17257
17344
  const hasData = !!(segments == null ? void 0 : segments.length) && segments.some((s) => s.value > 0);
17258
- const total = (0, import_react27.useMemo)(
17345
+ const total = (0, import_react28.useMemo)(
17259
17346
  () => {
17260
17347
  var _a;
17261
17348
  return (_a = segments == null ? void 0 : segments.reduce((sum, s) => sum + s.value, 0)) != null ? _a : 0;
17262
17349
  },
17263
17350
  [segments]
17264
17351
  );
17265
- const colors = (0, import_react27.useMemo)(
17352
+ const colors = (0, import_react28.useMemo)(
17266
17353
  () => (segments != null ? segments : []).map(
17267
17354
  (_, i) => hexToRgba(brandPrimary, DATASET_ALPHAS[i % DATASET_ALPHAS.length])
17268
17355
  ),
17269
17356
  [segments, brandPrimary]
17270
17357
  );
17271
- const chartData = (0, import_react27.useMemo)(
17358
+ const chartData = (0, import_react28.useMemo)(
17272
17359
  () => {
17273
17360
  var _a, _b;
17274
17361
  return {
@@ -17285,7 +17372,7 @@ function TransactionsLiabilitiesBreakdownChart({
17285
17372
  },
17286
17373
  [segments, colors]
17287
17374
  );
17288
- const options = (0, import_react27.useMemo)(
17375
+ const options = (0, import_react28.useMemo)(
17289
17376
  () => ({
17290
17377
  responsive: true,
17291
17378
  maintainAspectRatio: false,
@@ -17373,6 +17460,7 @@ function TransactionsLiabilitiesBreakdownChart({
17373
17460
  AddLeadModal,
17374
17461
  AddressAutocomplete,
17375
17462
  AdvisorCard,
17463
+ AdvisorInviteCard,
17376
17464
  AiAssistantDrawer,
17377
17465
  Alert,
17378
17466
  AlertAccordion,