@algorithm-shift/design-system 1.2.978 → 1.2.980

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
@@ -47,6 +47,7 @@ __export(src_exports, {
47
47
  FileInput: () => FileInput_default,
48
48
  FlexLayout: () => Flex_default,
49
49
  GridLayout: () => Grid_default,
50
+ HistoryTimeline: () => HistoryTimeline_default,
50
51
  Icon: () => Icon_default,
51
52
  Image: () => Image_default,
52
53
  Modal: () => Modal,
@@ -1785,7 +1786,7 @@ __export(lucide_react_exports, {
1785
1786
  FerrisWheelIcon: () => FerrisWheel,
1786
1787
  Figma: () => Figma,
1787
1788
  FigmaIcon: () => Figma,
1788
- File: () => File,
1789
+ File: () => File2,
1789
1790
  FileArchive: () => FileArchive,
1790
1791
  FileArchiveIcon: () => FileArchive,
1791
1792
  FileAudio: () => FileAudio,
@@ -1838,7 +1839,7 @@ __export(lucide_react_exports, {
1838
1839
  FileEditIcon: () => FilePen,
1839
1840
  FileHeart: () => FileHeart,
1840
1841
  FileHeartIcon: () => FileHeart,
1841
- FileIcon: () => File,
1842
+ FileIcon: () => File2,
1842
1843
  FileImage: () => FileImage,
1843
1844
  FileImageIcon: () => FileImage,
1844
1845
  FileInput: () => FileInput,
@@ -3195,7 +3196,7 @@ __export(lucide_react_exports, {
3195
3196
  LucideFence: () => Fence,
3196
3197
  LucideFerrisWheel: () => FerrisWheel,
3197
3198
  LucideFigma: () => Figma,
3198
- LucideFile: () => File,
3199
+ LucideFile: () => File2,
3199
3200
  LucideFileArchive: () => FileArchive,
3200
3201
  LucideFileAudio: () => FileAudio,
3201
3202
  LucideFileAudio2: () => FileAudio2,
@@ -6616,7 +6617,7 @@ __export(icons_exports, {
6616
6617
  Fence: () => Fence,
6617
6618
  FerrisWheel: () => FerrisWheel,
6618
6619
  Figma: () => Figma,
6619
- File: () => File,
6620
+ File: () => File2,
6620
6621
  FileArchive: () => FileArchive,
6621
6622
  FileAudio: () => FileAudio,
6622
6623
  FileAudio2: () => FileAudio2,
@@ -14766,7 +14767,7 @@ var __iconNode630 = [
14766
14767
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
14767
14768
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }]
14768
14769
  ];
14769
- var File = createLucideIcon("file", __iconNode630);
14770
+ var File2 = createLucideIcon("file", __iconNode630);
14770
14771
 
14771
14772
  // node_modules/lucide-react/dist/esm/icons/files.js
14772
14773
  var __iconNode631 = [
@@ -27021,18 +27022,26 @@ var TextInput = ({ className, style, ...props }) => {
27021
27022
  const handleChange = (e) => {
27022
27023
  props.onChange?.(e, props?.name || "");
27023
27024
  };
27025
+ const formatValue = (value) => {
27026
+ if (props.inputType === "file") {
27027
+ return value instanceof File || value instanceof FileList ? value : null;
27028
+ }
27029
+ if (value === null || value === void 0) return "";
27030
+ return value;
27031
+ };
27024
27032
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
27025
27033
  /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
27026
27034
  Input,
27027
27035
  {
27028
27036
  type: props.inputType || "text",
27029
27037
  name: props.name,
27038
+ id: props.name || "text-field",
27030
27039
  className: cn(className, props.errorMessage ? "border-red-500" : ""),
27031
27040
  style: {
27032
27041
  ...style,
27033
27042
  borderColor: props.errorMessage ? "#f87171" : style?.borderColor
27034
27043
  },
27035
- value: props.value || "",
27044
+ value: formatValue(props.value),
27036
27045
  autoComplete: isAutocomplete ? "on" : "off",
27037
27046
  placeholder,
27038
27047
  onChange: handleChange,
@@ -27063,14 +27072,21 @@ var NumberInput = ({ className, style, ...props }) => {
27063
27072
  const handleChange = (e) => {
27064
27073
  props.onChange?.(e, props.name || "");
27065
27074
  };
27075
+ const formatValue = (value) => {
27076
+ if (props.inputType === "file") {
27077
+ return value instanceof File || value instanceof FileList ? value : null;
27078
+ }
27079
+ if (value === null || value === void 0) return 0;
27080
+ return value;
27081
+ };
27066
27082
  return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
27067
27083
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
27068
27084
  Input,
27069
27085
  {
27070
- type: "number",
27086
+ type: props.inputType || "number",
27071
27087
  id: props.name || "number-field",
27072
27088
  name: props.name,
27073
- value: props.value || "",
27089
+ value: formatValue(props.value),
27074
27090
  className: cn(className, props.errorMessage ? "border-red-500" : ""),
27075
27091
  style: {
27076
27092
  ...style,
@@ -27106,13 +27122,21 @@ var EmailInput = ({ className, style, ...props }) => {
27106
27122
  const handleChange = (e) => {
27107
27123
  props.onChange?.(e, props?.name || "");
27108
27124
  };
27125
+ const formatValue = (value) => {
27126
+ if (props.inputType === "file") {
27127
+ return value instanceof File || value instanceof FileList ? value : null;
27128
+ }
27129
+ if (value === null || value === void 0) return "";
27130
+ return value;
27131
+ };
27109
27132
  return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
27110
27133
  /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
27111
27134
  Input,
27112
27135
  {
27113
- type: "email",
27136
+ type: props.inputType || "email",
27114
27137
  name: props.name,
27115
- value: props.value || "",
27138
+ id: props.name || "email-field",
27139
+ value: formatValue(props.value),
27116
27140
  className: cn(className, props.errorMessage ? "border-red-500" : ""),
27117
27141
  style: {
27118
27142
  ...style,
@@ -27148,14 +27172,21 @@ var PasswordInput = ({ className, style, ...props }) => {
27148
27172
  const handleChange = (e) => {
27149
27173
  props.onChange?.(e, props?.name || "");
27150
27174
  };
27175
+ const formatValue = (value) => {
27176
+ if (props.inputType === "file") {
27177
+ return value instanceof File || value instanceof FileList ? value : null;
27178
+ }
27179
+ if (value === null || value === void 0) return "";
27180
+ return value;
27181
+ };
27151
27182
  return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
27152
27183
  /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
27153
27184
  Input,
27154
27185
  {
27155
- type: "password",
27186
+ type: props.inputType || "password",
27156
27187
  id: props.name || "password-field",
27157
27188
  name: props.name,
27158
- value: props.value || "",
27189
+ value: formatValue(props.value),
27159
27190
  className: cn(className, props.errorMessage ? "border-red-500" : ""),
27160
27191
  style: {
27161
27192
  ...style,
@@ -27251,16 +27282,23 @@ var UrlInput = ({ className, style, ...props }) => {
27251
27282
  const handleChange = (e) => {
27252
27283
  props.onChange?.(e, props?.name || "");
27253
27284
  };
27285
+ const formatValue = (value) => {
27286
+ if (props.inputType === "file") {
27287
+ return value instanceof File || value instanceof FileList ? value : null;
27288
+ }
27289
+ if (value === null || value === void 0) return "";
27290
+ return value;
27291
+ };
27254
27292
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
27255
27293
  /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex justify-start items-center relative", children: [
27256
27294
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "bg-[#E9E9E9] absolute px-10 text-center top-1/2 h-full justify-center items-center flex w-10 -translate-y-1/2 text-[#383838] font-[500] text-[12px]", children: "https://" }),
27257
27295
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27258
27296
  Input,
27259
27297
  {
27260
- id: "url-field",
27261
- type: "url",
27298
+ id: props.name || "url-field",
27299
+ type: props.inputType || "url",
27262
27300
  name: props.name,
27263
- value: props.value || "",
27301
+ value: formatValue(props.value),
27264
27302
  className: cn(className, props.errorMessage ? "border-red-500" : ""),
27265
27303
  style: {
27266
27304
  ...style,
@@ -28495,14 +28533,21 @@ var SearchInput = ({ className, style, ...props }) => {
28495
28533
  const handleChange = (e) => {
28496
28534
  props.onChange?.(e, props?.name || "");
28497
28535
  };
28536
+ const formatValue = (value) => {
28537
+ if (props.inputType === "file") {
28538
+ return value instanceof File || value instanceof FileList ? value : null;
28539
+ }
28540
+ if (value === null || value === void 0) return "";
28541
+ return value;
28542
+ };
28498
28543
  return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
28499
28544
  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
28500
28545
  Input,
28501
28546
  {
28502
- type: "text",
28547
+ type: props.inputType || "search",
28503
28548
  id: props.name || "text-field",
28504
28549
  name: props.name,
28505
- value: props.value || "",
28550
+ value: formatValue(props.value),
28506
28551
  className: cn(className, props.errorMessage ? "border-red-500" : ""),
28507
28552
  style: {
28508
28553
  ...style,
@@ -28534,14 +28579,21 @@ var FileInput2 = ({ className, style, ...props }) => {
28534
28579
  const handleChange = (e) => {
28535
28580
  props.onChange?.(e, props?.name || "");
28536
28581
  };
28582
+ const formatValue = (value) => {
28583
+ if (props.inputType === "file") {
28584
+ return value instanceof File || value instanceof FileList ? value : null;
28585
+ }
28586
+ if (value === null || value === void 0) return "";
28587
+ return value;
28588
+ };
28537
28589
  return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "d-flex items-center relative align-middle", children: [
28538
28590
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
28539
28591
  Input,
28540
28592
  {
28541
- type: "file",
28542
- id: "file",
28593
+ type: props.inputType || "file",
28594
+ id: props.name || "file-field",
28543
28595
  name: props.name,
28544
- value: props.value || "",
28596
+ value: formatValue(props.value),
28545
28597
  className: cn(className, props.errorMessage ? "border-red-500" : ""),
28546
28598
  style: {
28547
28599
  ...style,
@@ -30514,29 +30566,230 @@ var CustomPagination = ({
30514
30566
  };
30515
30567
  var Pagination_default = CustomPagination;
30516
30568
 
30517
- // src/components/Navigation/Tabs/Tabs.tsx
30569
+ // src/components/DataDisplay/HistoryTimeline/HistoryTimeline.tsx
30518
30570
  var import_react30 = require("react");
30571
+
30572
+ // src/components/ui/accordion.tsx
30573
+ var AccordionPrimitive = __toESM(require("@radix-ui/react-accordion"));
30574
+ var import_jsx_runtime55 = require("react/jsx-runtime");
30575
+ function Accordion2({
30576
+ ...props
30577
+ }) {
30578
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
30579
+ }
30580
+ function AccordionItem({
30581
+ className,
30582
+ ...props
30583
+ }) {
30584
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
30585
+ AccordionPrimitive.Item,
30586
+ {
30587
+ "data-slot": "accordion-item",
30588
+ className: cn("border-b last:border-b-0", className),
30589
+ ...props
30590
+ }
30591
+ );
30592
+ }
30593
+ function AccordionTrigger({
30594
+ className,
30595
+ children,
30596
+ ...props
30597
+ }) {
30598
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
30599
+ AccordionPrimitive.Trigger,
30600
+ {
30601
+ "data-slot": "accordion-trigger",
30602
+ className: cn(
30603
+ "focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
30604
+ className
30605
+ ),
30606
+ ...props,
30607
+ children: [
30608
+ children,
30609
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ChevronDown, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
30610
+ ]
30611
+ }
30612
+ ) });
30613
+ }
30614
+ function AccordionContent({
30615
+ className,
30616
+ children,
30617
+ ...props
30618
+ }) {
30619
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
30620
+ AccordionPrimitive.Content,
30621
+ {
30622
+ "data-slot": "accordion-content",
30623
+ className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
30624
+ ...props,
30625
+ children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: cn("pt-0 pb-4", className), children })
30626
+ }
30627
+ );
30628
+ }
30629
+
30630
+ // src/components/ui/card.tsx
30631
+ var import_jsx_runtime56 = require("react/jsx-runtime");
30632
+ function Card({ className, ...props }) {
30633
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
30634
+ "div",
30635
+ {
30636
+ "data-slot": "card",
30637
+ className: cn(
30638
+ "bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
30639
+ className
30640
+ ),
30641
+ ...props
30642
+ }
30643
+ );
30644
+ }
30645
+ function CardHeader({ className, ...props }) {
30646
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
30647
+ "div",
30648
+ {
30649
+ "data-slot": "card-header",
30650
+ className: cn(
30651
+ "@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
30652
+ className
30653
+ ),
30654
+ ...props
30655
+ }
30656
+ );
30657
+ }
30658
+ function CardTitle({ className, ...props }) {
30659
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
30660
+ "div",
30661
+ {
30662
+ "data-slot": "card-title",
30663
+ className: cn("leading-none font-semibold", className),
30664
+ ...props
30665
+ }
30666
+ );
30667
+ }
30668
+ function CardContent({ className, ...props }) {
30669
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
30670
+ "div",
30671
+ {
30672
+ "data-slot": "card-content",
30673
+ className: cn("px-6", className),
30674
+ ...props
30675
+ }
30676
+ );
30677
+ }
30678
+
30679
+ // src/components/DataDisplay/HistoryTimeline/HistoryTimeline.tsx
30680
+ var import_jsx_runtime57 = require("react/jsx-runtime");
30681
+ function getValue(item, key) {
30682
+ if (!key) return void 0;
30683
+ return item[key];
30684
+ }
30685
+ var HistoryTimeline = ({
30686
+ title = "Timeline",
30687
+ className,
30688
+ loading = false,
30689
+ titleKey,
30690
+ descriptionKey,
30691
+ createdAtKey,
30692
+ ...props
30693
+ }) => {
30694
+ const data = (0, import_react30.useMemo)(() => {
30695
+ if (Array.isArray(props.data)) {
30696
+ return props.data;
30697
+ }
30698
+ return [];
30699
+ }, [props.data]);
30700
+ if (loading) {
30701
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Card, { className: cn("w-full", className), children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(CardContent, { className: "flex items-center justify-center px-4 py-8", children: [
30702
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(LoaderCircle, { className: "h-5 w-5 animate-spin text-muted-foreground" }),
30703
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ml-2 text-sm text-muted-foreground", children: "Loading history\u2026" })
30704
+ ] }) });
30705
+ }
30706
+ if (data.length === 0) {
30707
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Card, { className: cn("w-full", className), children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(CardContent, { className: "px-4 py-8 text-center text-muted-foreground", children: "No history available." }) });
30708
+ }
30709
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Card, { className: cn("w-full", className), children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Accordion2, { type: "single", collapsible: true, defaultValue: "history", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(AccordionItem, { value: "history", className: "border-0", children: [
30710
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(CardHeader, { className: "flex flex-row items-center justify-between gap-2 border-b px-4 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
30711
+ AccordionTrigger,
30712
+ {
30713
+ className: cn(
30714
+ "flex flex-1 items-center justify-between gap-2 p-0 text-left",
30715
+ "hover:no-underline"
30716
+ ),
30717
+ children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(CardTitle, { className: "text-base font-semibold", children: title })
30718
+ }
30719
+ ) }),
30720
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(AccordionContent, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(CardContent, { className: "px-4 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("ol", { className: "relative ml-4 border-l-2 border-[#939393] space-y-4", children: data.map((item, index) => {
30721
+ const id = item.id ?? index;
30722
+ const rawTitle = getValue(item, titleKey);
30723
+ const rawDescription = getValue(item, descriptionKey);
30724
+ const rawCreatedAt = getValue(item, createdAtKey);
30725
+ const titleText = String(rawTitle ?? "");
30726
+ const descriptionText = rawDescription != null ? String(rawDescription) : "";
30727
+ const createdAtDate = rawCreatedAt != null ? new Date(rawCreatedAt) : null;
30728
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("li", { className: "relative pl-4", children: [
30729
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "absolute left-[-9px] top-2 flex h-4 w-4 items-center justify-center rounded-full bg-primary text-primary-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "bg-[#06A59A] text-white rounded-md p-[5px]", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
30730
+ Info,
30731
+ {
30732
+ className: cn(
30733
+ "h-5 w-5 text-white"
30734
+ )
30735
+ }
30736
+ ) }) }),
30737
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
30738
+ Accordion2,
30739
+ {
30740
+ type: "single",
30741
+ collapsible: true,
30742
+ className: "w-full",
30743
+ children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(AccordionItem, { value: `item-${item.id}`, className: "border-0", children: [
30744
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
30745
+ AccordionTrigger,
30746
+ {
30747
+ className: cn(
30748
+ "flex items-center justify-between gap-2 rounded-md px-2 py-1 text-left",
30749
+ "hover:bg-muted/60 hover:no-underline"
30750
+ ),
30751
+ children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex flex-col gap-1", children: [
30752
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-sm font-medium leading-none", children: titleText }),
30753
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-[11px] text-muted-foreground", children: new Intl.DateTimeFormat("default", {
30754
+ dateStyle: "medium",
30755
+ timeStyle: "short"
30756
+ }).format(createdAtDate ?? /* @__PURE__ */ new Date()) })
30757
+ ] })
30758
+ }
30759
+ ),
30760
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(AccordionContent, { className: "pt-1", children: descriptionText && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "rounded-md bg-muted px-2 py-2 text-xs text-muted-foreground", children: descriptionText }) })
30761
+ ] })
30762
+ }
30763
+ )
30764
+ ] }, id);
30765
+ }) }) }) })
30766
+ ] }) }) });
30767
+ };
30768
+ var HistoryTimeline_default = HistoryTimeline;
30769
+
30770
+ // src/components/Navigation/Tabs/Tabs.tsx
30771
+ var import_react31 = require("react");
30519
30772
  var import_link5 = __toESM(require("next/link"));
30520
30773
  var import_navigation3 = require("next/navigation");
30521
30774
 
30522
30775
  // src/components/ui/dialog.tsx
30523
30776
  var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
30524
- var import_jsx_runtime55 = require("react/jsx-runtime");
30777
+ var import_jsx_runtime58 = require("react/jsx-runtime");
30525
30778
  function Dialog({
30526
30779
  ...props
30527
30780
  }) {
30528
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
30781
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
30529
30782
  }
30530
30783
  function DialogPortal({
30531
30784
  ...props
30532
30785
  }) {
30533
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
30786
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
30534
30787
  }
30535
30788
  function DialogOverlay({
30536
30789
  className,
30537
30790
  ...props
30538
30791
  }) {
30539
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
30792
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
30540
30793
  DialogPrimitive.Overlay,
30541
30794
  {
30542
30795
  "data-slot": "dialog-overlay",
@@ -30554,9 +30807,9 @@ function DialogContent({
30554
30807
  showCloseButton = true,
30555
30808
  ...props
30556
30809
  }) {
30557
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(DialogPortal, { "data-slot": "dialog-portal", children: [
30558
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(DialogOverlay, {}),
30559
- /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
30810
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(DialogPortal, { "data-slot": "dialog-portal", children: [
30811
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DialogOverlay, {}),
30812
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
30560
30813
  DialogPrimitive.Content,
30561
30814
  {
30562
30815
  "data-slot": "dialog-content",
@@ -30567,14 +30820,14 @@ function DialogContent({
30567
30820
  ...props,
30568
30821
  children: [
30569
30822
  children,
30570
- showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
30823
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
30571
30824
  DialogPrimitive.Close,
30572
30825
  {
30573
30826
  "data-slot": "dialog-close",
30574
30827
  className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
30575
30828
  children: [
30576
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(X, {}),
30577
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "sr-only", children: "Close" })
30829
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(X, {}),
30830
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "sr-only", children: "Close" })
30578
30831
  ]
30579
30832
  }
30580
30833
  )
@@ -30584,7 +30837,7 @@ function DialogContent({
30584
30837
  ] });
30585
30838
  }
30586
30839
  function DialogHeader({ className, ...props }) {
30587
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
30840
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
30588
30841
  "div",
30589
30842
  {
30590
30843
  "data-slot": "dialog-header",
@@ -30594,7 +30847,7 @@ function DialogHeader({ className, ...props }) {
30594
30847
  );
30595
30848
  }
30596
30849
  function DialogFooter({ className, ...props }) {
30597
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
30850
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
30598
30851
  "div",
30599
30852
  {
30600
30853
  "data-slot": "dialog-footer",
@@ -30610,7 +30863,7 @@ function DialogTitle({
30610
30863
  className,
30611
30864
  ...props
30612
30865
  }) {
30613
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
30866
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
30614
30867
  DialogPrimitive.Title,
30615
30868
  {
30616
30869
  "data-slot": "dialog-title",
@@ -30623,7 +30876,7 @@ function DialogDescription({
30623
30876
  className,
30624
30877
  ...props
30625
30878
  }) {
30626
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
30879
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
30627
30880
  DialogPrimitive.Description,
30628
30881
  {
30629
30882
  "data-slot": "dialog-description",
@@ -30671,9 +30924,9 @@ function showSonnerToast({
30671
30924
  }
30672
30925
 
30673
30926
  // src/components/Navigation/Tabs/Tabs.tsx
30674
- var import_jsx_runtime56 = require("react/jsx-runtime");
30927
+ var import_jsx_runtime59 = require("react/jsx-runtime");
30675
30928
  var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuilder = false, source, parentKey, menuNameKey, menuUrlKey, loading, bgActiveColor, textActiveColor }) => {
30676
- const [openIndex, setOpenIndex] = (0, import_react30.useState)(null);
30929
+ const [openIndex, setOpenIndex] = (0, import_react31.useState)(null);
30677
30930
  const currentPathname = (0, import_navigation3.usePathname)();
30678
30931
  function groupMenus(menus = []) {
30679
30932
  const menuMap = /* @__PURE__ */ new Map();
@@ -30707,7 +30960,7 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
30707
30960
  });
30708
30961
  return sortMenus(rootMenus);
30709
30962
  }
30710
- const rawTabs = (0, import_react30.useMemo)(() => {
30963
+ const rawTabs = (0, import_react31.useMemo)(() => {
30711
30964
  if (!Array.isArray(tabs)) return [];
30712
30965
  if (source === "manual") return Array.isArray(tabs) ? tabs : [];
30713
30966
  return groupMenus(tabs);
@@ -30737,9 +30990,9 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
30737
30990
  return tab.children.some((child) => isActive(child.url));
30738
30991
  };
30739
30992
  const router = (0, import_navigation3.useRouter)();
30740
- const [showExitDialog, setShowExitDialog] = (0, import_react30.useState)(false);
30741
- const [pendingUrl, setPendingUrl] = (0, import_react30.useState)(null);
30742
- const handleBuilderExit = (0, import_react30.useCallback)(
30993
+ const [showExitDialog, setShowExitDialog] = (0, import_react31.useState)(false);
30994
+ const [pendingUrl, setPendingUrl] = (0, import_react31.useState)(null);
30995
+ const handleBuilderExit = (0, import_react31.useCallback)(
30743
30996
  (e, url) => {
30744
30997
  if (isBuilder) {
30745
30998
  e.preventDefault();
@@ -30770,13 +31023,13 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
30770
31023
  border: active && textActiveColor ? `1px solid ${textActiveColor}` : void 0
30771
31024
  };
30772
31025
  if (Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown) {
30773
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
31026
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
30774
31027
  DropdownMenu,
30775
31028
  {
30776
31029
  open: openIndex === index,
30777
31030
  onOpenChange: (open) => setOpenIndex(open ? index : null),
30778
31031
  children: [
30779
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
31032
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
30780
31033
  DropdownMenuTrigger,
30781
31034
  {
30782
31035
  className: `${finalClasses} inline-flex items-center gap-1`,
@@ -30790,11 +31043,11 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
30790
31043
  style: finalStyle,
30791
31044
  children: [
30792
31045
  tab.header,
30793
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ChevronDown, { className: "h-4 w-4 opacity-80" })
31046
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ChevronDown, { className: "h-4 w-4 opacity-80" })
30794
31047
  ]
30795
31048
  }
30796
31049
  ),
30797
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
31050
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
30798
31051
  DropdownMenuContent,
30799
31052
  {
30800
31053
  align: "start",
@@ -30807,12 +31060,12 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
30807
31060
  onMouseLeave: () => {
30808
31061
  timeout = setTimeout(() => setOpenIndex(null), 150);
30809
31062
  },
30810
- children: tab.children.map((item, index2) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
31063
+ children: tab.children.map((item, index2) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
30811
31064
  DropdownMenuItem,
30812
31065
  {
30813
31066
  asChild: true,
30814
31067
  className: "cursor-pointer rounded-sm px-3 py-2 text-gray-800 hover:bg-gray-100 focus:bg-gray-100",
30815
- children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
31068
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
30816
31069
  import_link5.default,
30817
31070
  {
30818
31071
  href: item.url || "#",
@@ -30831,7 +31084,7 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
30831
31084
  index
30832
31085
  );
30833
31086
  }
30834
- return tab.url ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
31087
+ return tab.url ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
30835
31088
  import_link5.default,
30836
31089
  {
30837
31090
  href: tab.url,
@@ -30842,14 +31095,14 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
30842
31095
  children: tab.header
30843
31096
  },
30844
31097
  index
30845
- ) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: finalClasses, style: finalStyle, role: "button", tabIndex: 0, children: tab.header }, index);
31098
+ ) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: finalClasses, style: finalStyle, role: "button", tabIndex: 0, children: tab.header }, index);
30846
31099
  };
30847
- const renderMobileMenu = () => /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(DropdownMenu, { children: [
30848
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(DropdownMenuTrigger, { className: "flex items-center gap-2 px-3 py-2 rounded-md bg-white/10 text-white text-sm", children: [
30849
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Menu, { className: "h-4 w-4" }),
31100
+ const renderMobileMenu = () => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(DropdownMenu, { children: [
31101
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(DropdownMenuTrigger, { className: "flex items-center gap-2 px-3 py-2 rounded-md bg-white/10 text-white text-sm", children: [
31102
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Menu, { className: "h-4 w-4" }),
30850
31103
  "Menu"
30851
31104
  ] }),
30852
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
31105
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
30853
31106
  DropdownMenuContent,
30854
31107
  {
30855
31108
  align: "start",
@@ -30858,25 +31111,25 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
30858
31111
  children: rawTabs.map((tab, i) => {
30859
31112
  const hasChildren = Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown;
30860
31113
  if (hasChildren) {
30861
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(DropdownMenuSub, { children: [
30862
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DropdownMenuSubTrigger, { className: "flex items-center justify-between cursor-pointer rounded-sm px-3 py-2 text-[13px] text-foreground hover:text-foreground", children: tab.header }),
30863
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DropdownMenuSubContent, { className: "bg-white border shadow-lg rounded-md p-1", children: tab.children.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
31114
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(DropdownMenuSub, { children: [
31115
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DropdownMenuSubTrigger, { className: "flex items-center justify-between cursor-pointer rounded-sm px-3 py-2 text-[13px] text-foreground hover:text-foreground", children: tab.header }),
31116
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DropdownMenuSubContent, { className: "bg-white border shadow-lg rounded-md p-1", children: tab.children.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
30864
31117
  DropdownMenuItem,
30865
31118
  {
30866
31119
  asChild: true,
30867
31120
  className: "cursor-pointer rounded-sm px-3 py-2 text-gray-800 hover:bg-gray-100",
30868
- children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_link5.default, { href: item.url || "#", onClick: (e) => handleBuilderExit(e, item.url || "#"), children: item.header })
31121
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_link5.default, { href: item.url || "#", onClick: (e) => handleBuilderExit(e, item.url || "#"), children: item.header })
30869
31122
  },
30870
31123
  item.id || index
30871
31124
  )) })
30872
31125
  ] }, i);
30873
31126
  }
30874
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
31127
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
30875
31128
  DropdownMenuItem,
30876
31129
  {
30877
31130
  asChild: true,
30878
31131
  className: "cursor-pointer rounded-sm px-3 py-2 text-[13px] text-gray-800 hover:bg-gray-100",
30879
- children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_link5.default, { href: tab.url || "#", onClick: (e) => handleBuilderExit(e, tab.url || "#"), children: tab.header })
31132
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_link5.default, { href: tab.url || "#", onClick: (e) => handleBuilderExit(e, tab.url || "#"), children: tab.header })
30880
31133
  },
30881
31134
  i
30882
31135
  );
@@ -30886,19 +31139,19 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
30886
31139
  ] });
30887
31140
  const forceMobile = canvasMode ? canvasMode === "mobile" || canvasMode === "tablet" : void 0;
30888
31141
  const forceDesktop = canvasMode ? canvasMode === "desktop" : void 0;
30889
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
30890
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: cn("min-h-10", className), style, children: [
30891
- forceDesktop !== void 0 ? forceDesktop && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "hidden md:flex", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "hidden md:flex", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }),
30892
- forceMobile !== void 0 ? forceMobile && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { children: renderMobileMenu() }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "flex md:hidden", children: renderMobileMenu() })
31142
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
31143
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: cn("min-h-10", className), style, children: [
31144
+ forceDesktop !== void 0 ? forceDesktop && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "hidden md:flex", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "hidden md:flex", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }),
31145
+ forceMobile !== void 0 ? forceMobile && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { children: renderMobileMenu() }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "flex md:hidden", children: renderMobileMenu() })
30893
31146
  ] }),
30894
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Dialog, { open: showExitDialog, onOpenChange: setShowExitDialog, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(DialogContent, { className: "bg-[#fff]", children: [
30895
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(DialogHeader, { children: [
30896
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DialogTitle, { children: "Exit Builder?" }),
30897
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DialogDescription, { children: "You are about to leave the builder. Any unsaved changes may be lost." })
31147
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Dialog, { open: showExitDialog, onOpenChange: setShowExitDialog, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(DialogContent, { className: "bg-[#fff]", children: [
31148
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(DialogHeader, { children: [
31149
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DialogTitle, { children: "Exit Builder?" }),
31150
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DialogDescription, { children: "You are about to leave the builder. Any unsaved changes may be lost." })
30898
31151
  ] }),
30899
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(DialogFooter, { children: [
30900
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Button, { className: "cursor-pointer bg-[#12715b] text-[#fff]", variant: "outline", onClick: () => setShowExitDialog(false), children: "Cancel" }),
30901
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Button, { className: "cursor-pointer border-[#12715b] border", onClick: confirmExit, children: "Yes, Exit" })
31152
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(DialogFooter, { children: [
31153
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { className: "cursor-pointer bg-[#12715b] text-[#fff]", variant: "outline", onClick: () => setShowExitDialog(false), children: "Cancel" }),
31154
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { className: "cursor-pointer border-[#12715b] border", onClick: confirmExit, children: "Yes, Exit" })
30902
31155
  ] })
30903
31156
  ] }) })
30904
31157
  ] });
@@ -30906,8 +31159,8 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
30906
31159
  var Tabs_default = Tabs;
30907
31160
 
30908
31161
  // src/components/Navigation/Stages/Stages.tsx
30909
- var import_react31 = __toESM(require("react"));
30910
- var import_jsx_runtime57 = require("react/jsx-runtime");
31162
+ var import_react32 = __toESM(require("react"));
31163
+ var import_jsx_runtime60 = require("react/jsx-runtime");
30911
31164
  var StagesComponent = ({
30912
31165
  stages,
30913
31166
  isShowBtn,
@@ -30923,8 +31176,8 @@ var StagesComponent = ({
30923
31176
  triggerOnClick = false,
30924
31177
  canvasMode = "desktop"
30925
31178
  }) => {
30926
- const [activeStage, setActiveStage] = (0, import_react31.useState)(currentStage || (stages && stages.length > 0 ? stages[0][dataKey] : null));
30927
- const [isCompleted, setIsCompleted] = (0, import_react31.useState)(false);
31179
+ const [activeStage, setActiveStage] = (0, import_react32.useState)(currentStage || (stages && stages.length > 0 ? stages[0][dataKey] : null));
31180
+ const [isCompleted, setIsCompleted] = (0, import_react32.useState)(false);
30928
31181
  const updateStage = (stageKey) => {
30929
31182
  setActiveStage(stageKey);
30930
31183
  onStageChange?.(stageKey);
@@ -30955,7 +31208,7 @@ var StagesComponent = ({
30955
31208
  };
30956
31209
  const isAllStagesCompleted = isCompleted || currentStage === lastStage;
30957
31210
  const disabled = isAllStagesCompleted || loading || saving;
30958
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
31211
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
30959
31212
  "div",
30960
31213
  {
30961
31214
  className: `
@@ -30965,8 +31218,8 @@ var StagesComponent = ({
30965
31218
  ${isMobile ? "p-3 sm:p-4" : "p-2"}
30966
31219
  `,
30967
31220
  children: [
30968
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex items-center flex-shrink-0 order-1 lg:order-1", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("button", { className: "p-2 hover:bg-gray-100 rounded flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("svg", { className: "w-4 h-4 text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }) }),
30969
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
31221
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "flex items-center flex-shrink-0 order-1 lg:order-1", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("button", { className: "p-2 hover:bg-gray-100 rounded flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("svg", { className: "w-4 h-4 text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }) }),
31222
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
30970
31223
  "div",
30971
31224
  {
30972
31225
  className: `
@@ -30974,7 +31227,7 @@ var StagesComponent = ({
30974
31227
  flex-wrap gap-2 sm:gap-2 lg:gap-3 w-full lg:w-auto
30975
31228
  ${isMobile ? "order-2 mt-2 lg:mt-0" : "order-2"}
30976
31229
  `,
30977
- children: loading ? Array(6).fill(null).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
31230
+ children: loading ? Array(6).fill(null).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
30978
31231
  "button",
30979
31232
  {
30980
31233
  className: `
@@ -30992,8 +31245,8 @@ var StagesComponent = ({
30992
31245
  const currentIndex = stages.findIndex((s) => s[dataKey] === activeStage);
30993
31246
  const isCompletedStage = isAllStagesCompleted || index <= currentIndex;
30994
31247
  const isActive = !isAllStagesCompleted && index === currentIndex;
30995
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_react31.default.Fragment, { children: [
30996
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
31248
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_react32.default.Fragment, { children: [
31249
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
30997
31250
  "button",
30998
31251
  {
30999
31252
  className: `
@@ -31010,19 +31263,19 @@ var StagesComponent = ({
31010
31263
  children: stage[dataLabel]
31011
31264
  }
31012
31265
  ),
31013
- !isMobile && index < stages.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "hidden sm:flex sm:flex-shrink-0 w-3 h-px bg-gray-300 sm:w-4" })
31266
+ !isMobile && index < stages.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "hidden sm:flex sm:flex-shrink-0 w-3 h-px bg-gray-300 sm:w-4" })
31014
31267
  ] }, stage.id);
31015
31268
  })
31016
31269
  }
31017
31270
  ),
31018
- isShowBtn && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
31271
+ isShowBtn && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
31019
31272
  "div",
31020
31273
  {
31021
31274
  className: `
31022
31275
  flex items-center flex-shrink-0 w-full lg:w-auto
31023
31276
  ${isMobile ? "order-3 mt-3 lg:mt-0" : "order-3"}
31024
31277
  `,
31025
- children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
31278
+ children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
31026
31279
  "button",
31027
31280
  {
31028
31281
  className: `
@@ -31044,26 +31297,26 @@ var StagesComponent = ({
31044
31297
  var Stages_default = StagesComponent;
31045
31298
 
31046
31299
  // src/components/Navigation/Spacer/Spacer.tsx
31047
- var import_jsx_runtime58 = require("react/jsx-runtime");
31300
+ var import_jsx_runtime61 = require("react/jsx-runtime");
31048
31301
  var Spacer = ({ className, style }) => {
31049
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: `${className}`, style });
31302
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: `${className}`, style });
31050
31303
  };
31051
31304
  var Spacer_default = Spacer;
31052
31305
 
31053
31306
  // src/components/Navigation/Profile/Profile.tsx
31054
- var import_jsx_runtime59 = require("react/jsx-runtime");
31307
+ var import_jsx_runtime62 = require("react/jsx-runtime");
31055
31308
 
31056
31309
  // src/components/Navigation/Notification/Notification.tsx
31057
- var import_jsx_runtime60 = require("react/jsx-runtime");
31310
+ var import_jsx_runtime63 = require("react/jsx-runtime");
31058
31311
 
31059
31312
  // src/components/Navigation/Logo/Logo.tsx
31060
- var import_jsx_runtime61 = require("react/jsx-runtime");
31313
+ var import_jsx_runtime64 = require("react/jsx-runtime");
31061
31314
 
31062
31315
  // src/components/ui/avatar.tsx
31063
31316
  var React11 = __toESM(require("react"));
31064
31317
  var AvatarPrimitive = __toESM(require("@radix-ui/react-avatar"));
31065
- var import_jsx_runtime62 = require("react/jsx-runtime");
31066
- var Avatar = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
31318
+ var import_jsx_runtime65 = require("react/jsx-runtime");
31319
+ var Avatar = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
31067
31320
  AvatarPrimitive.Root,
31068
31321
  {
31069
31322
  ref,
@@ -31075,7 +31328,7 @@ var Avatar = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
31075
31328
  }
31076
31329
  ));
31077
31330
  Avatar.displayName = AvatarPrimitive.Root.displayName;
31078
- var AvatarImage = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
31331
+ var AvatarImage = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
31079
31332
  AvatarPrimitive.Image,
31080
31333
  {
31081
31334
  ref,
@@ -31084,7 +31337,7 @@ var AvatarImage = React11.forwardRef(({ className, ...props }, ref) => /* @__PUR
31084
31337
  }
31085
31338
  ));
31086
31339
  AvatarImage.displayName = AvatarPrimitive.Image.displayName;
31087
- var AvatarFallback = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
31340
+ var AvatarFallback = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
31088
31341
  AvatarPrimitive.Fallback,
31089
31342
  {
31090
31343
  ref,
@@ -31102,8 +31355,8 @@ var import_link6 = __toESM(require("next/link"));
31102
31355
  var import_image4 = __toESM(require("next/image"));
31103
31356
  var import_navigation4 = require("next/navigation");
31104
31357
  var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
31105
- var import_react32 = require("react");
31106
- var import_jsx_runtime63 = require("react/jsx-runtime");
31358
+ var import_react33 = require("react");
31359
+ var import_jsx_runtime66 = require("react/jsx-runtime");
31107
31360
  function Navbar({
31108
31361
  style,
31109
31362
  badgeType,
@@ -31123,9 +31376,9 @@ function Navbar({
31123
31376
  }) {
31124
31377
  const isMobileView = canvasMode === "mobile" || canvasMode === "tablet";
31125
31378
  const router = (0, import_navigation4.useRouter)();
31126
- const [showExitDialog, setShowExitDialog] = (0, import_react32.useState)(false);
31127
- const [pendingUrl, setPendingUrl] = (0, import_react32.useState)(null);
31128
- const handleBuilderExit = (0, import_react32.useCallback)(
31379
+ const [showExitDialog, setShowExitDialog] = (0, import_react33.useState)(false);
31380
+ const [pendingUrl, setPendingUrl] = (0, import_react33.useState)(null);
31381
+ const handleBuilderExit = (0, import_react33.useCallback)(
31129
31382
  (e, url) => {
31130
31383
  if (isBuilder) {
31131
31384
  e.preventDefault();
@@ -31141,29 +31394,29 @@ function Navbar({
31141
31394
  router.push(pendingUrl);
31142
31395
  }
31143
31396
  };
31144
- const formatedMenu = (0, import_react32.useMemo)(() => {
31397
+ const formatedMenu = (0, import_react33.useMemo)(() => {
31145
31398
  if (source === "state" && navList && navList.length) {
31146
31399
  return navList.map((i) => ({ ...i, header: i.name || "Menu" }));
31147
31400
  }
31148
31401
  return list || [];
31149
31402
  }, [source, navList]);
31150
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_jsx_runtime63.Fragment, { children: [
31151
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
31403
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
31404
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
31152
31405
  "nav",
31153
31406
  {
31154
31407
  className: "w-full border-b border-b-white dark:border-b-gray-800 dark:bg-gray-800 bg-white shadow-sm",
31155
31408
  style,
31156
- children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "mx-auto flex max-w-[90%] items-center justify-between px-4 py-4", children: [
31157
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
31409
+ children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "mx-auto flex max-w-[90%] items-center justify-between px-4 py-4", children: [
31410
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
31158
31411
  import_link6.default,
31159
31412
  {
31160
31413
  href: "/",
31161
31414
  onClick: (e) => handleBuilderExit(e, "/"),
31162
31415
  className: "flex items-center space-x-2",
31163
- children: imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_image4.default, { src: imageUrl, alt: altText, width: 200, height: 200 }) : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "font-semibold text-blue-700", children: "Logo" })
31416
+ children: imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_image4.default, { src: imageUrl, alt: altText, width: 200, height: 200 }) : /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "font-semibold text-blue-700", children: "Logo" })
31164
31417
  }
31165
31418
  ),
31166
- !isMobileView && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "flex items-center space-x-6 sm:hidden md:flex", children: formatedMenu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
31419
+ !isMobileView && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "flex items-center space-x-6 sm:hidden md:flex", children: formatedMenu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
31167
31420
  import_link6.default,
31168
31421
  {
31169
31422
  href: item.url || "#",
@@ -31173,39 +31426,39 @@ function Navbar({
31173
31426
  },
31174
31427
  item.id
31175
31428
  )) }),
31176
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex items-center space-x-3", children: [
31177
- !isMobileView ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "flex-1 px-6", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "relative w-full max-w-md border border-gray-300 rounded-md", children: [
31178
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 dark:text-white text-gray-400" }),
31179
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Input, { placeholder: "Search", className: "pl-9 text-gray-400" })
31180
- ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Button, { variant: "ghost", size: "icon", className: "border border-gray-400", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Search, { className: "h-5 w-5 text-gray-400" }) }),
31181
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "relative bg-[#E9E9E9] dark:bg-gray-700 rounded-md", children: [
31182
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Bell, { className: "h-5 w-5 text-[#1C1B1F] dark:text-gray-400" }) }),
31183
- badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && Number(badgeCount) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "absolute -top-1 -right-1 flex h-4 w-4 items-center justify-center rounded-full bg-red-500 text-[10px] text-white leading-8", children: badgeCount }) : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "absolute -top-1 -right-1 flex h-2 w-2 items-center justify-center rounded-full bg-red-500" })
31429
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex items-center space-x-3", children: [
31430
+ !isMobileView ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "flex-1 px-6", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "relative w-full max-w-md border border-gray-300 rounded-md", children: [
31431
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 dark:text-white text-gray-400" }),
31432
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Input, { placeholder: "Search", className: "pl-9 text-gray-400" })
31433
+ ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Button, { variant: "ghost", size: "icon", className: "border border-gray-400", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Search, { className: "h-5 w-5 text-gray-400" }) }),
31434
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "relative bg-[#E9E9E9] dark:bg-gray-700 rounded-md", children: [
31435
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Bell, { className: "h-5 w-5 text-[#1C1B1F] dark:text-gray-400" }) }),
31436
+ badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && Number(badgeCount) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "absolute -top-1 -right-1 flex h-4 w-4 items-center justify-center rounded-full bg-red-500 text-[10px] text-white leading-8", children: badgeCount }) : /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "absolute -top-1 -right-1 flex h-2 w-2 items-center justify-center rounded-full bg-red-500" })
31184
31437
  ] }),
31185
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(DropdownMenu, { children: [
31186
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex items-center space-x-2", children: [
31187
- !isMobileView && showName && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("h4", { className: "text-[#000000] dark:text-gray-300 text-[13px] font-[500] mb-0", children: userName }),
31188
- !isMobileView ? /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_jsx_runtime63.Fragment, { children: [
31189
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Avatar, { className: "cursor-pointer h-8 w-8 text-gray-900", children: profileType === "avatar" ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
31438
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(DropdownMenu, { children: [
31439
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex items-center space-x-2", children: [
31440
+ !isMobileView && showName && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("h4", { className: "text-[#000000] dark:text-gray-300 text-[13px] font-[500] mb-0", children: userName }),
31441
+ !isMobileView ? /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
31442
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Avatar, { className: "cursor-pointer h-8 w-8 text-gray-900", children: profileType === "avatar" ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
31190
31443
  AvatarImage,
31191
31444
  {
31192
31445
  src: "/images/appbuilder/toolset/profile.svg",
31193
31446
  alt: "Profile"
31194
31447
  }
31195
- ) : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "w-8 h-8 bg-[#12715b] rounded-full text-[#fff] text-center text-[11px] flex items-center justify-center", children: userName && getInitials(userName) }) }),
31196
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
31448
+ ) : /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "w-8 h-8 bg-[#12715b] rounded-full text-[#fff] text-center text-[11px] flex items-center justify-center", children: userName && getInitials(userName) }) }),
31449
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
31197
31450
  Button,
31198
31451
  {
31199
31452
  variant: "ghost",
31200
31453
  size: "icon",
31201
31454
  className: "text-gray-900 md:hidden dark:invert",
31202
- children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Menu, { className: "h-6 w-6" })
31455
+ children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Menu, { className: "h-6 w-6" })
31203
31456
  }
31204
31457
  )
31205
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Button, { variant: "ghost", size: "icon", className: "text-gray-900 dark:invert", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Menu, { className: "h-6 w-6" }) })
31458
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Button, { variant: "ghost", size: "icon", className: "text-gray-900 dark:invert", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Menu, { className: "h-6 w-6" }) })
31206
31459
  ] }) }),
31207
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(DropdownMenuContent, { align: "end", className: "bg-white dark:bg-gray-800", children: [
31208
- profileMenu && profileMenu.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_jsx_runtime63.Fragment, { children: profileMenu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(DropdownMenuItem, { className: "text-black dark:invert", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
31460
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(DropdownMenuContent, { align: "end", className: "bg-white dark:bg-gray-800", children: [
31461
+ profileMenu && profileMenu.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, { children: profileMenu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(DropdownMenuItem, { className: "text-black dark:invert", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
31209
31462
  import_link6.default,
31210
31463
  {
31211
31464
  href: item.url || "#",
@@ -31213,9 +31466,9 @@ function Navbar({
31213
31466
  children: item.header
31214
31467
  }
31215
31468
  ) }, item.id)) }),
31216
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "md:hidden", children: [
31217
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react_dropdown_menu.DropdownMenuSeparator, {}),
31218
- formatedMenu && formatedMenu.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_jsx_runtime63.Fragment, { children: formatedMenu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(DropdownMenuItem, { className: "text-black dark:invert", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
31469
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "md:hidden", children: [
31470
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react_dropdown_menu.DropdownMenuSeparator, {}),
31471
+ formatedMenu && formatedMenu.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, { children: formatedMenu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(DropdownMenuItem, { className: "text-black dark:invert", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
31219
31472
  import_link6.default,
31220
31473
  {
31221
31474
  href: item.url || "#",
@@ -31230,24 +31483,24 @@ function Navbar({
31230
31483
  ] })
31231
31484
  }
31232
31485
  ),
31233
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Dialog, { open: showExitDialog, onOpenChange: setShowExitDialog, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(DialogContent, { className: "bg-[#fff]", children: [
31234
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(DialogHeader, { children: [
31235
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(DialogTitle, { children: "Exit Builder?" }),
31236
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(DialogDescription, { children: "You are about to leave the builder. Any unsaved changes may be lost." })
31486
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Dialog, { open: showExitDialog, onOpenChange: setShowExitDialog, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(DialogContent, { className: "bg-[#fff]", children: [
31487
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(DialogHeader, { children: [
31488
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(DialogTitle, { children: "Exit Builder?" }),
31489
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(DialogDescription, { children: "You are about to leave the builder. Any unsaved changes may be lost." })
31237
31490
  ] }),
31238
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(DialogFooter, { children: [
31239
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Button, { className: "cursor-pointer bg-[#12715b] text-[#fff]", variant: "outline", onClick: () => setShowExitDialog(false), children: "Cancel" }),
31240
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Button, { className: "cursor-pointer border-[#12715b] border", onClick: confirmExit, children: "Yes, Exit" })
31491
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(DialogFooter, { children: [
31492
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Button, { className: "cursor-pointer bg-[#12715b] text-[#fff]", variant: "outline", onClick: () => setShowExitDialog(false), children: "Cancel" }),
31493
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Button, { className: "cursor-pointer border-[#12715b] border", onClick: confirmExit, children: "Yes, Exit" })
31241
31494
  ] })
31242
31495
  ] }) })
31243
31496
  ] });
31244
31497
  }
31245
31498
 
31246
31499
  // src/components/Chart/BarChart.tsx
31247
- var import_react33 = __toESM(require("react"));
31500
+ var import_react34 = __toESM(require("react"));
31248
31501
  var import_axios2 = __toESM(require("axios"));
31249
31502
  var import_recharts = require("recharts");
31250
- var import_jsx_runtime64 = require("react/jsx-runtime");
31503
+ var import_jsx_runtime67 = require("react/jsx-runtime");
31251
31504
  var getRandomColor = () => {
31252
31505
  const palette = [
31253
31506
  "#2563eb",
@@ -31305,18 +31558,18 @@ var ChartComponent = ({
31305
31558
  canvasMode,
31306
31559
  ...props
31307
31560
  }) => {
31308
- const [rawData, setRawData] = (0, import_react33.useState)([]);
31309
- const [rawMeta, setRawMeta] = (0, import_react33.useState)(null);
31310
- const [localLoading, setLocalLoading] = (0, import_react33.useState)(false);
31311
- const [currentPage, setCurrentPage] = (0, import_react33.useState)(1);
31561
+ const [rawData, setRawData] = (0, import_react34.useState)([]);
31562
+ const [rawMeta, setRawMeta] = (0, import_react34.useState)(null);
31563
+ const [localLoading, setLocalLoading] = (0, import_react34.useState)(false);
31564
+ const [currentPage, setCurrentPage] = (0, import_react34.useState)(1);
31312
31565
  const effectiveData = apiUrl ? rawData : props.data || [];
31313
31566
  const effectiveLoading = apiUrl ? localLoading : externalLoading;
31314
- (0, import_react33.useEffect)(() => {
31567
+ (0, import_react34.useEffect)(() => {
31315
31568
  if (apiUrl) {
31316
31569
  setCurrentPage(1);
31317
31570
  }
31318
31571
  }, [apiUrl]);
31319
- const fetchData = (0, import_react33.useCallback)(async (page) => {
31572
+ const fetchData = (0, import_react34.useCallback)(async (page) => {
31320
31573
  if (!apiUrl) return;
31321
31574
  const cancelled = false;
31322
31575
  try {
@@ -31325,7 +31578,8 @@ var ChartComponent = ({
31325
31578
  page: page.toString(),
31326
31579
  limit: limit.toString()
31327
31580
  });
31328
- const res = await import_axios2.default.get(`${apiUrl}?${params.toString()}`, {
31581
+ const axiosClient = props.axiosInstance ?? import_axios2.default;
31582
+ const res = await axiosClient.get(`${apiUrl}?${params.toString()}`, {
31329
31583
  withCredentials: true
31330
31584
  });
31331
31585
  if (!cancelled) {
@@ -31352,7 +31606,7 @@ var ChartComponent = ({
31352
31606
  if (!cancelled) setLocalLoading(false);
31353
31607
  }
31354
31608
  }, [apiUrl, limit]);
31355
- (0, import_react33.useEffect)(() => {
31609
+ (0, import_react34.useEffect)(() => {
31356
31610
  if (!apiUrl) return;
31357
31611
  fetchData(currentPage);
31358
31612
  }, [apiUrl, currentPage, fetchData]);
@@ -31360,7 +31614,7 @@ var ChartComponent = ({
31360
31614
  if (rawMeta && (newPage < 1 || newPage > rawMeta.pages)) return;
31361
31615
  setCurrentPage(newPage);
31362
31616
  };
31363
- const data = (0, import_react33.useMemo)(() => {
31617
+ const data = (0, import_react34.useMemo)(() => {
31364
31618
  if (!Array.isArray(effectiveData) || effectiveData.length === 0 || !dataKey || !dataLabel) {
31365
31619
  return [];
31366
31620
  }
@@ -31373,27 +31627,27 @@ var ChartComponent = ({
31373
31627
  const chartType = props.chartType || "bar";
31374
31628
  const legendsPosition = ["middle", "bottom"].includes(props.legendsPosition) ? props.legendsPosition : "top";
31375
31629
  if (effectiveLoading || data.length === 0) {
31376
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
31630
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
31377
31631
  "div",
31378
31632
  {
31379
31633
  className: `relative flex flex-col w-full h-[300px] md:h-[400px] bg-gradient-to-br from-gray-50 to-gray-100 rounded-xl p-6 ${className}`,
31380
31634
  style,
31381
31635
  children: [
31382
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "mb-6 flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "inline-flex items-center space-x-2 bg-white/90 px-6 py-2.5 rounded-xl backdrop-blur-sm border border-gray-200 shadow-lg", children: [
31383
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "w-5 h-5 border-2 border-gray-400 border-t-blue-500 rounded-full animate-spin" }),
31384
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "text-sm font-medium text-gray-700 bg-gradient-to-r from-gray-300 bg-clip-text animate-pulse", children: "Loading chart data..." })
31636
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "mb-6 flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "inline-flex items-center space-x-2 bg-white/90 px-6 py-2.5 rounded-xl backdrop-blur-sm border border-gray-200 shadow-lg", children: [
31637
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "w-5 h-5 border-2 border-gray-400 border-t-blue-500 rounded-full animate-spin" }),
31638
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "text-sm font-medium text-gray-700 bg-gradient-to-r from-gray-300 bg-clip-text animate-pulse", children: "Loading chart data..." })
31385
31639
  ] }) }),
31386
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-white/60 to-transparent animate-shimmer rounded-xl" }),
31387
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "flex-1 relative w-full h-full min-h-[240px] md:min-h-[320px] bg-white/80 rounded-lg border border-gray-200/50 shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "absolute bottom-0 left-4 right-4 flex gap-2 h-[200px] md:h-[280px] justify-center items-end", children: [...Array(20)].map((_, idx) => {
31640
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-white/60 to-transparent animate-shimmer rounded-xl" }),
31641
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "flex-1 relative w-full h-full min-h-[240px] md:min-h-[320px] bg-white/80 rounded-lg border border-gray-200/50 shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "absolute bottom-0 left-4 right-4 flex gap-2 h-[200px] md:h-[280px] justify-center items-end", children: [...Array(20)].map((_, idx) => {
31388
31642
  const randomHeight = `${Math.floor(Math.random() * 76) + 20}%`;
31389
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
31643
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
31390
31644
  "div",
31391
31645
  {
31392
31646
  className: `relative w-10 md:w-12 flex-1 max-w-[48px] rounded-t-lg bg-gradient-to-t from-gray-100 via-gray-200 to-transparent shadow-lg border border-gray-200/50 animate-slide-up stagger-${idx} overflow-hidden`,
31393
31647
  style: { height: randomHeight, animationDelay: `${idx * 0.08}s` },
31394
31648
  children: [
31395
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "absolute inset-0 bg-gradient-to-r from-white/40 via-transparent to-white/40 animate-shimmer-bar" }),
31396
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "absolute bottom-1 left-1/2 w-4 h-1 rounded-full transform -translate-x-1/2 blur-sm" })
31649
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "absolute inset-0 bg-gradient-to-r from-white/40 via-transparent to-white/40 animate-shimmer-bar" }),
31650
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "absolute bottom-1 left-1/2 w-4 h-1 rounded-full transform -translate-x-1/2 blur-sm" })
31397
31651
  ]
31398
31652
  },
31399
31653
  `bar-${idx}`
@@ -31403,9 +31657,9 @@ var ChartComponent = ({
31403
31657
  }
31404
31658
  );
31405
31659
  }
31406
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: `${className} h-[450px]`, style, children: [
31407
- isPaginationEnabled && rawMeta && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex items-center justify-between mb-4 px-2", children: [
31408
- /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "text-sm text-gray-600 hidden sm:block", children: [
31660
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: `${className} h-[450px]`, style, children: [
31661
+ isPaginationEnabled && rawMeta && /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex items-center justify-between mb-4 px-2", children: [
31662
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "text-sm text-gray-600 hidden sm:block", children: [
31409
31663
  "Page ",
31410
31664
  rawMeta.page,
31411
31665
  " of ",
@@ -31414,52 +31668,52 @@ var ChartComponent = ({
31414
31668
  rawMeta.total.toLocaleString(),
31415
31669
  " total records)"
31416
31670
  ] }),
31417
- /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex items-center space-x-2 sm:hidden w-full justify-center", children: [
31418
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
31671
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex items-center space-x-2 sm:hidden w-full justify-center", children: [
31672
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
31419
31673
  "button",
31420
31674
  {
31421
31675
  onClick: () => handlePageChange(currentPage - 1),
31422
31676
  disabled: currentPage === 1 || localLoading,
31423
31677
  className: "flex-1 px-3 py-2 text-xs font-medium rounded-lg border bg-white shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 flex items-center justify-center space-x-1 min-w-0",
31424
- children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { children: "\u2190 Prev" })
31678
+ children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { children: "\u2190 Prev" })
31425
31679
  }
31426
31680
  ),
31427
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "px-2 py-2 text-xs font-semibold text-gray-700 min-w-[36px] text-center flex-shrink-0", children: currentPage }),
31428
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
31681
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "px-2 py-2 text-xs font-semibold text-gray-700 min-w-[36px] text-center flex-shrink-0", children: currentPage }),
31682
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
31429
31683
  "button",
31430
31684
  {
31431
31685
  onClick: () => handlePageChange(currentPage + 1),
31432
31686
  disabled: currentPage >= rawMeta.pages || localLoading,
31433
31687
  className: "flex-1 px-3 py-2 text-xs font-medium rounded-lg border bg-white shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 flex items-center justify-center space-x-1 min-w-0",
31434
- children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { children: "Next \u2192" })
31688
+ children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { children: "Next \u2192" })
31435
31689
  }
31436
31690
  )
31437
31691
  ] }),
31438
- /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex items-center space-x-2 hidden sm:flex", children: [
31439
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
31692
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex items-center space-x-2 hidden sm:flex", children: [
31693
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
31440
31694
  "button",
31441
31695
  {
31442
31696
  onClick: () => handlePageChange(currentPage - 1),
31443
31697
  disabled: currentPage === 1 || localLoading,
31444
31698
  className: "px-3 py-1.5 text-sm font-medium rounded-lg border bg-white shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 flex items-center space-x-1",
31445
- children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { children: "\u2190 Prev" })
31699
+ children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { children: "\u2190 Prev" })
31446
31700
  }
31447
31701
  ),
31448
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "px-3 py-1 text-sm font-medium text-gray-700", children: currentPage }),
31449
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
31702
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "px-3 py-1 text-sm font-medium text-gray-700", children: currentPage }),
31703
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
31450
31704
  "button",
31451
31705
  {
31452
31706
  onClick: () => handlePageChange(currentPage + 1),
31453
31707
  disabled: currentPage >= rawMeta.pages || localLoading,
31454
31708
  className: "px-3 py-1.5 text-sm font-medium rounded-lg border bg-white shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 flex items-center space-x-1",
31455
- children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { children: "Next \u2192" })
31709
+ children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { children: "Next \u2192" })
31456
31710
  }
31457
31711
  )
31458
31712
  ] })
31459
31713
  ] }),
31460
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_recharts.ResponsiveContainer, { width: "100%", height: "100%", children: chartType === "bar" ? /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_recharts.BarChart, { data, children: [
31461
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_recharts.CartesianGrid, { strokeDasharray: "3 3" }),
31462
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
31714
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_recharts.ResponsiveContainer, { width: "100%", height: "100%", children: chartType === "bar" ? /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_recharts.BarChart, { data, children: [
31715
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_recharts.CartesianGrid, { strokeDasharray: "3 3" }),
31716
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
31463
31717
  import_recharts.XAxis,
31464
31718
  {
31465
31719
  dataKey: dataLabel,
@@ -31477,7 +31731,7 @@ var ChartComponent = ({
31477
31731
  className: "hidden sm:block"
31478
31732
  }
31479
31733
  ),
31480
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
31734
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
31481
31735
  import_recharts.YAxis,
31482
31736
  {
31483
31737
  tickFormatter: (value) => `${(value / 1e3).toFixed(0)}k`,
@@ -31490,9 +31744,9 @@ var ChartComponent = ({
31490
31744
  width: 60
31491
31745
  }
31492
31746
  ),
31493
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_recharts.Tooltip, { formatter: (value) => [`${value}`, "Count"] }),
31494
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_recharts.Legend, { verticalAlign: legendsPosition, align: "center" }),
31495
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
31747
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_recharts.Tooltip, { formatter: (value) => [`${value}`, "Count"] }),
31748
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_recharts.Legend, { verticalAlign: legendsPosition, align: "center" }),
31749
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
31496
31750
  import_recharts.Bar,
31497
31751
  {
31498
31752
  dataKey,
@@ -31500,13 +31754,13 @@ var ChartComponent = ({
31500
31754
  isAnimationActive: false
31501
31755
  }
31502
31756
  )
31503
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_recharts.AreaChart, { data, children: [
31504
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("linearGradient", { id: "colorCount", x1: "0", y1: "0", x2: "0", y2: "1", children: [
31505
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("stop", { offset: "5%", stopColor: "#00695C", stopOpacity: 0.8 }),
31506
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("stop", { offset: "95%", stopColor: "#00695C", stopOpacity: 0 })
31757
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_recharts.AreaChart, { data, children: [
31758
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("linearGradient", { id: "colorCount", x1: "0", y1: "0", x2: "0", y2: "1", children: [
31759
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("stop", { offset: "5%", stopColor: "#00695C", stopOpacity: 0.8 }),
31760
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("stop", { offset: "95%", stopColor: "#00695C", stopOpacity: 0 })
31507
31761
  ] }) }),
31508
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_recharts.CartesianGrid, { strokeDasharray: "3 3" }),
31509
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
31762
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_recharts.CartesianGrid, { strokeDasharray: "3 3" }),
31763
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
31510
31764
  import_recharts.XAxis,
31511
31765
  {
31512
31766
  dataKey: dataLabel,
@@ -31520,7 +31774,7 @@ var ChartComponent = ({
31520
31774
  }
31521
31775
  }
31522
31776
  ),
31523
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
31777
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
31524
31778
  import_recharts.YAxis,
31525
31779
  {
31526
31780
  tickFormatter: (value) => `${(value / 1e3).toFixed(0)}k`,
@@ -31533,8 +31787,8 @@ var ChartComponent = ({
31533
31787
  width: 60
31534
31788
  }
31535
31789
  ),
31536
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_recharts.Tooltip, { formatter: (value) => `${value}k` }),
31537
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
31790
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_recharts.Tooltip, { formatter: (value) => `${value}k` }),
31791
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
31538
31792
  import_recharts.Area,
31539
31793
  {
31540
31794
  type: "monotone",
@@ -31548,13 +31802,13 @@ var ChartComponent = ({
31548
31802
  ] }) })
31549
31803
  ] });
31550
31804
  };
31551
- var BarChart_default = import_react33.default.memo(ChartComponent);
31805
+ var BarChart_default = import_react34.default.memo(ChartComponent);
31552
31806
 
31553
31807
  // src/components/Chart/PieChart.tsx
31554
- var import_react34 = __toESM(require("react"));
31808
+ var import_react35 = __toESM(require("react"));
31555
31809
  var import_axios3 = __toESM(require("axios"));
31556
31810
  var import_recharts2 = require("recharts");
31557
- var import_jsx_runtime65 = require("react/jsx-runtime");
31811
+ var import_jsx_runtime68 = require("react/jsx-runtime");
31558
31812
  var getRandomColor2 = () => {
31559
31813
  const palette = [
31560
31814
  "#2563eb",
@@ -31631,17 +31885,18 @@ var DonutChart = ({
31631
31885
  }) => {
31632
31886
  const showLegends = props.showLegends ?? true;
31633
31887
  const canvasMode = props.canvasMode;
31634
- const [rawData, setRawData] = (0, import_react34.useState)([]);
31635
- const [localLoading, setLocalLoading] = (0, import_react34.useState)(false);
31888
+ const [rawData, setRawData] = (0, import_react35.useState)([]);
31889
+ const [localLoading, setLocalLoading] = (0, import_react35.useState)(false);
31636
31890
  const effectiveData = apiUrl ? rawData : props.data || [];
31637
31891
  const effectiveLoading = apiUrl ? localLoading : externalLoading;
31638
- (0, import_react34.useEffect)(() => {
31892
+ (0, import_react35.useEffect)(() => {
31639
31893
  if (!apiUrl) return;
31640
31894
  let cancelled = false;
31641
31895
  const fetchData = async () => {
31642
31896
  try {
31643
31897
  setLocalLoading(true);
31644
- const res = await import_axios3.default.get(apiUrl, {
31898
+ const axiosClient = props.axiosInstance ?? import_axios3.default;
31899
+ const res = await axiosClient.get(apiUrl, {
31645
31900
  withCredentials: true
31646
31901
  });
31647
31902
  if (!cancelled) {
@@ -31670,7 +31925,7 @@ var DonutChart = ({
31670
31925
  cancelled = true;
31671
31926
  };
31672
31927
  }, [apiUrl]);
31673
- const data = (0, import_react34.useMemo)(() => {
31928
+ const data = (0, import_react35.useMemo)(() => {
31674
31929
  if (!Array.isArray(effectiveData) || effectiveData.length === 0) return [];
31675
31930
  return effectiveData.map((item) => ({
31676
31931
  ...item,
@@ -31679,11 +31934,11 @@ var DonutChart = ({
31679
31934
  [dataLabel]: item[dataLabel] ?? "Unknown"
31680
31935
  }));
31681
31936
  }, [effectiveData, dataKey, dataLabel]);
31682
- const total = (0, import_react34.useMemo)(
31937
+ const total = (0, import_react35.useMemo)(
31683
31938
  () => data.reduce((sum, d) => sum + (d[dataKey] ?? 0), 0),
31684
31939
  [data, dataKey]
31685
31940
  );
31686
- const formattedTotal = (0, import_react34.useMemo)(() => {
31941
+ const formattedTotal = (0, import_react35.useMemo)(() => {
31687
31942
  if (total >= 1e6) {
31688
31943
  return `${(total / 1e6).toFixed(1)}M`;
31689
31944
  }
@@ -31692,7 +31947,7 @@ var DonutChart = ({
31692
31947
  }
31693
31948
  return total.toString();
31694
31949
  }, [total]);
31695
- const chartData = (0, import_react34.useMemo)(() => {
31950
+ const chartData = (0, import_react35.useMemo)(() => {
31696
31951
  if (total === 0) return data;
31697
31952
  const sortedData = [...data].sort((a, b) => (b[dataKey] ?? 0) - (a[dataKey] ?? 0));
31698
31953
  const minAngle = 360 / Math.max(12, sortedData.length);
@@ -31715,39 +31970,39 @@ var DonutChart = ({
31715
31970
  if (chartData.length <= 6) return { inner: 85, outer: 150 };
31716
31971
  return { inner: 70, outer: 130 };
31717
31972
  };
31718
- const [mounted, setMounted] = (0, import_react34.useState)(false);
31719
- (0, import_react34.useEffect)(() => {
31973
+ const [mounted, setMounted] = (0, import_react35.useState)(false);
31974
+ (0, import_react35.useEffect)(() => {
31720
31975
  const timeout = setTimeout(() => setMounted(true), 100);
31721
31976
  return () => clearTimeout(timeout);
31722
31977
  }, []);
31723
- const renderLegends = (0, import_react34.useMemo)(() => {
31978
+ const renderLegends = (0, import_react35.useMemo)(() => {
31724
31979
  if (!showLegends) return null;
31725
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "flex flex-wrap justify-center gap-2 mt-4 w-full max-w-4xl", children: chartData.map((d, index) => {
31980
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "flex flex-wrap justify-center gap-2 mt-4 w-full max-w-4xl", children: chartData.map((d, index) => {
31726
31981
  const actualValue = data.find(
31727
31982
  (item) => item[dataLabel] === d[dataLabel]
31728
31983
  )?.[dataKey] ?? d[dataKey];
31729
31984
  const displayValue = actualValue >= 1e3 ? `${(actualValue / 1e3).toFixed(0)}k` : actualValue.toLocaleString();
31730
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
31985
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
31731
31986
  "div",
31732
31987
  {
31733
31988
  className: "flex items-center space-x-2 rounded-lg border border-gray-200/50 px-3 py-1.5 w-[48%] sm:w-[32%] md:w-auto bg-white/80 backdrop-blur-sm shadow-sm hover:shadow-md transition-all",
31734
31989
  children: [
31735
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
31990
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
31736
31991
  "span",
31737
31992
  {
31738
31993
  className: "inline-block w-[12px] h-[12px] rounded-full shrink-0 border-2 border-white/50",
31739
31994
  style: { backgroundColor: d.color }
31740
31995
  }
31741
31996
  ),
31742
- /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "min-w-0 flex-1", children: [
31743
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "text-gray-900 text-[11px] md:text-[13px] font-semibold block truncate leading-tight", children: d[dataLabel] }),
31744
- /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex items-center gap-1 text-xs text-gray-600 font-medium", children: [
31745
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: displayValue }),
31746
- /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { children: [
31997
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "min-w-0 flex-1", children: [
31998
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "text-gray-900 text-[11px] md:text-[13px] font-semibold block truncate leading-tight", children: d[dataLabel] }),
31999
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex items-center gap-1 text-xs text-gray-600 font-medium", children: [
32000
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { children: displayValue }),
32001
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("span", { children: [
31747
32002
  (actualValue / total * 100).toFixed(1),
31748
32003
  "%"
31749
32004
  ] }),
31750
- d.isBoosted && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "text-[9px] px-1 py-0.5 bg-blue-100 text-blue-700 rounded-full", children: "min" })
32005
+ d.isBoosted && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "text-[9px] px-1 py-0.5 bg-blue-100 text-blue-700 rounded-full", children: "min" })
31751
32006
  ] })
31752
32007
  ] })
31753
32008
  ]
@@ -31758,26 +32013,26 @@ var DonutChart = ({
31758
32013
  }, [chartData, data, dataLabel, dataKey, total, showLegends]);
31759
32014
  if (!mounted) return null;
31760
32015
  if (effectiveLoading || data.length === 0) {
31761
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
32016
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
31762
32017
  "div",
31763
32018
  {
31764
32019
  className: `relative flex flex-col items-center w-full h-[300px] md:h-[400px] bg-gradient-to-br from-gray-50 to-gray-100 rounded-xl p-6 ${className}`,
31765
32020
  style,
31766
32021
  children: [
31767
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-white/60 to-transparent animate-shimmer rounded-xl" }),
31768
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "mt-6 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "inline-flex items-center space-x-2 bg-white/80 px-6 py-2 rounded-full backdrop-blur-sm border border-gray-200 shadow-lg", children: [
31769
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "w-5 h-5 border-2 border-gray-300 border-t-blue-400 rounded-full animate-spin" }),
31770
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "text-sm font-medium text-gray-600 bg-gradient-to-r from-gray-300 bg-clip-text animate-pulse", children: "Loading chart data..." })
32022
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-white/60 to-transparent animate-shimmer rounded-xl" }),
32023
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "mt-6 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "inline-flex items-center space-x-2 bg-white/80 px-6 py-2 rounded-full backdrop-blur-sm border border-gray-200 shadow-lg", children: [
32024
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "w-5 h-5 border-2 border-gray-300 border-t-blue-400 rounded-full animate-spin" }),
32025
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "text-sm font-medium text-gray-600 bg-gradient-to-r from-gray-300 bg-clip-text animate-pulse", children: "Loading chart data..." })
31771
32026
  ] }) }),
31772
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "flex flex-wrap justify-center gap-3 mt-8 w-full max-w-4xl", children: [...Array(18)].map((_, idx) => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
32027
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "flex flex-wrap justify-center gap-3 mt-8 w-full max-w-4xl", children: [...Array(18)].map((_, idx) => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
31773
32028
  "div",
31774
32029
  {
31775
32030
  className: `h-10 w-[48%] sm:w-[32%] md:w-32 rounded-xl bg-gradient-to-r from-gray-200 via-gray-300/50 to-gray-200 p-3 flex items-center space-x-3 animate-slide-up stagger-${idx} shadow-sm border border-gray-200/50`,
31776
32031
  children: [
31777
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "w-4 h-4 rounded-full bg-gradient-to-r from-blue-300 to-purple-300 animate-pulse" }),
31778
- /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex-1 space-y-1", children: [
31779
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "h-3 w-20 bg-gray-300 rounded animate-pulse" }),
31780
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "h-2.5 w-16 bg-gray-200/60 rounded animate-pulse-delayed" })
32032
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "w-4 h-4 rounded-full bg-gradient-to-r from-blue-300 to-purple-300 animate-pulse" }),
32033
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex-1 space-y-1", children: [
32034
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "h-3 w-20 bg-gray-300 rounded animate-pulse" }),
32035
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "h-2.5 w-16 bg-gray-200/60 rounded animate-pulse-delayed" })
31781
32036
  ] })
31782
32037
  ]
31783
32038
  },
@@ -31790,10 +32045,10 @@ var DonutChart = ({
31790
32045
  const { inner, outer } = getDynamicRadius();
31791
32046
  const innerRadius = inner;
31792
32047
  const outerRadius = outer;
31793
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: `relative flex flex-col items-center ${className}`, style, children: [
31794
- /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "relative w-full md:w-[75%] h-[280px] md:h-[380px] flex items-center justify-center mb-2", children: [
31795
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_recharts2.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_recharts2.PieChart, { children: [
31796
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
32048
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: `relative flex flex-col items-center ${className}`, style, children: [
32049
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "relative w-full md:w-[75%] h-[280px] md:h-[380px] flex items-center justify-center mb-2", children: [
32050
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_recharts2.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_recharts2.PieChart, { children: [
32051
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
31797
32052
  import_recharts2.Pie,
31798
32053
  {
31799
32054
  data: chartData,
@@ -31806,7 +32061,7 @@ var DonutChart = ({
31806
32061
  isAnimationActive: true,
31807
32062
  animationDuration: 800,
31808
32063
  minAngle: 3,
31809
- children: chartData.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
32064
+ children: chartData.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
31810
32065
  import_recharts2.Cell,
31811
32066
  {
31812
32067
  fill: entry.color,
@@ -31817,7 +32072,7 @@ var DonutChart = ({
31817
32072
  ))
31818
32073
  }
31819
32074
  ),
31820
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
32075
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
31821
32076
  import_recharts2.Tooltip,
31822
32077
  {
31823
32078
  formatter: (value, name, payload) => {
@@ -31840,21 +32095,21 @@ var DonutChart = ({
31840
32095
  }
31841
32096
  )
31842
32097
  ] }) }),
31843
- total > 0 && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: `absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-center pointer-events-none ${forceMobile ? "text-xl px-2" : "text-3xl px-4"} font-bold bg-white/90 backdrop-blur-sm rounded-full py-1 shadow-lg`, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "text-[#1f2937] leading-tight", children: [
32098
+ total > 0 && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: `absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-center pointer-events-none ${forceMobile ? "text-xl px-2" : "text-3xl px-4"} font-bold bg-white/90 backdrop-blur-sm rounded-full py-1 shadow-lg`, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "text-[#1f2937] leading-tight", children: [
31844
32099
  formattedTotal,
31845
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "text-sm md:text-base font-normal text-gray-600 block md:inline-block md:ml-1", children: "total" })
32100
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "text-sm md:text-base font-normal text-gray-600 block md:inline-block md:ml-1", children: "total" })
31846
32101
  ] }) })
31847
32102
  ] }),
31848
32103
  renderLegends
31849
32104
  ] });
31850
32105
  };
31851
- var PieChart_default = import_react34.default.memo(DonutChart);
32106
+ var PieChart_default = import_react35.default.memo(DonutChart);
31852
32107
 
31853
32108
  // src/components/Blocks/EmailComposer.tsx
31854
- var import_jsx_runtime66 = require("react/jsx-runtime");
32109
+ var import_jsx_runtime69 = require("react/jsx-runtime");
31855
32110
  function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc, setShowBcc, cc, setCc, bcc, setBcc, subject, setSubject, body, setBody }) {
31856
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "border rounded-md shadow bg-[#fff] p-4 mx-auto z-[50] relative", children: [
31857
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
32111
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "border rounded-md shadow bg-[#fff] p-4 mx-auto z-[50] relative", children: [
32112
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
31858
32113
  "input",
31859
32114
  {
31860
32115
  type: "email",
@@ -31863,8 +32118,8 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
31863
32118
  required: true
31864
32119
  }
31865
32120
  ) }),
31866
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex items-center gap-2", children: [
31867
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
32121
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex items-center gap-2", children: [
32122
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
31868
32123
  "input",
31869
32124
  {
31870
32125
  type: "email",
@@ -31875,7 +32130,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
31875
32130
  required: true
31876
32131
  }
31877
32132
  ),
31878
- !showCc && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
32133
+ !showCc && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
31879
32134
  "button",
31880
32135
  {
31881
32136
  onClick: () => setShowCc?.(true),
@@ -31883,7 +32138,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
31883
32138
  children: "Cc"
31884
32139
  }
31885
32140
  ),
31886
- !showBcc && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
32141
+ !showBcc && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
31887
32142
  "button",
31888
32143
  {
31889
32144
  onClick: () => setShowBcc?.(true),
@@ -31892,7 +32147,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
31892
32147
  }
31893
32148
  )
31894
32149
  ] }) }),
31895
- showCc && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
32150
+ showCc && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
31896
32151
  "input",
31897
32152
  {
31898
32153
  type: "text",
@@ -31902,7 +32157,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
31902
32157
  className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
31903
32158
  }
31904
32159
  ) }),
31905
- showBcc && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
32160
+ showBcc && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
31906
32161
  "input",
31907
32162
  {
31908
32163
  type: "text",
@@ -31912,7 +32167,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
31912
32167
  className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
31913
32168
  }
31914
32169
  ) }),
31915
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
32170
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
31916
32171
  "input",
31917
32172
  {
31918
32173
  type: "text",
@@ -31922,11 +32177,11 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
31922
32177
  className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
31923
32178
  }
31924
32179
  ) }),
31925
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(MyEditor, { value: body, onChange: setBody }) }),
31926
- /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex justify-end gap-2", children: [
31927
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("button", { className: "px-4 py-2 rounded-md text-gray-600 hover:bg-gray-100", children: "Discard" }),
31928
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("button", { className: "px-4 py-2 rounded-md border text-[#12715B] border-[#12715B]", children: "Reset" }),
31929
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("button", { className: "px-4 py-2 rounded-md bg-[#12715B] text-white", children: "Send" })
32180
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(MyEditor, { value: body, onChange: setBody }) }),
32181
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex justify-end gap-2", children: [
32182
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("button", { className: "px-4 py-2 rounded-md text-gray-600 hover:bg-gray-100", children: "Discard" }),
32183
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("button", { className: "px-4 py-2 rounded-md border text-[#12715B] border-[#12715B]", children: "Reset" }),
32184
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("button", { className: "px-4 py-2 rounded-md bg-[#12715B] text-white", children: "Send" })
31930
32185
  ] })
31931
32186
  ] }) });
31932
32187
  }
@@ -31934,10 +32189,10 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
31934
32189
  // src/components/ui/sonner.tsx
31935
32190
  var import_next_themes = require("next-themes");
31936
32191
  var import_sonner2 = require("sonner");
31937
- var import_jsx_runtime67 = require("react/jsx-runtime");
32192
+ var import_jsx_runtime70 = require("react/jsx-runtime");
31938
32193
  var Toaster = ({ ...props }) => {
31939
32194
  const { theme = "system" } = (0, import_next_themes.useTheme)();
31940
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
32195
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
31941
32196
  import_sonner2.Toaster,
31942
32197
  {
31943
32198
  theme,
@@ -31969,6 +32224,7 @@ var Toaster = ({ ...props }) => {
31969
32224
  FileInput,
31970
32225
  FlexLayout,
31971
32226
  GridLayout,
32227
+ HistoryTimeline,
31972
32228
  Icon,
31973
32229
  Image,
31974
32230
  Modal,