warqadui 0.0.52 → 0.0.53

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
@@ -58,7 +58,9 @@ __export(index_exports, {
58
58
  PageHeader: () => PageHeader,
59
59
  PhoneInput: () => PhoneInput,
60
60
  PostTable: () => PostTable,
61
+ ProfileCard: () => ProfileCard,
61
62
  ProfileDropdown: () => ProfileDropdown,
63
+ ProfileView: () => ProfileView,
62
64
  ProtectedRoute: () => ProtectedRoute,
63
65
  SearchApi: () => SearchApi,
64
66
  SearchApiContent: () => SearchApiContent,
@@ -1190,13 +1192,13 @@ var Input = (0, import_react8.forwardRef)(
1190
1192
  }
1191
1193
  }
1192
1194
  }, [props.value, name, form]);
1193
- let message2 = error;
1195
+ let message4 = error;
1194
1196
  if (form && name) {
1195
1197
  const {
1196
1198
  formState: { errors }
1197
1199
  } = form;
1198
1200
  const errorObj = name.split(".").reduce((acc, current) => acc?.[current], errors);
1199
- message2 = errorObj?.message;
1201
+ message4 = errorObj?.message;
1200
1202
  }
1201
1203
  const watchedValue = form?.watch(name);
1202
1204
  (0, import_react8.useEffect)(() => {
@@ -1263,7 +1265,7 @@ var Input = (0, import_react8.forwardRef)(
1263
1265
  }
1264
1266
  )
1265
1267
  ] }),
1266
- message2 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-sm text-red-600 dark:text-red-400", children: message2 })
1268
+ message4 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-sm text-red-600 dark:text-red-400", children: message4 })
1267
1269
  ]
1268
1270
  }
1269
1271
  );
@@ -1378,7 +1380,7 @@ var PhoneInput = (0, import_react9.forwardRef)(
1378
1380
  const [isFocused, setIsFocused] = (0, import_react9.useState)(false);
1379
1381
  const { theme } = useWarqadConfig();
1380
1382
  const primaryColor = theme?.primaryColor;
1381
- let message2 = error;
1383
+ let message4 = error;
1382
1384
  if (form && name) {
1383
1385
  const {
1384
1386
  formState: { errors }
@@ -1388,7 +1390,7 @@ var PhoneInput = (0, import_react9.forwardRef)(
1388
1390
  for (const part of nameParts) {
1389
1391
  currentError = currentError?.[part];
1390
1392
  }
1391
- message2 = currentError?.message || message2;
1393
+ message4 = currentError?.message || message4;
1392
1394
  }
1393
1395
  const renderInput = (onChangeHandler, currentValue) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: `space-y-2 group relative ${containerClassName}`, children: [
1394
1396
  /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
@@ -1433,7 +1435,7 @@ var PhoneInput = (0, import_react9.forwardRef)(
1433
1435
  }
1434
1436
  )
1435
1437
  ] }),
1436
- message2 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-sm text-red-600 dark:text-red-400", children: message2 })
1438
+ message4 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-sm text-red-600 dark:text-red-400", children: message4 })
1437
1439
  ] });
1438
1440
  if (form && name) {
1439
1441
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
@@ -1582,7 +1584,7 @@ var SelectRoot = ({
1582
1584
  document.addEventListener("mousedown", handleClickOutside);
1583
1585
  return () => document.removeEventListener("mousedown", handleClickOutside);
1584
1586
  }, [fieldInternalProps]);
1585
- let message2 = error;
1587
+ let message4 = error;
1586
1588
  if (form && name) {
1587
1589
  const {
1588
1590
  formState: { errors }
@@ -1592,7 +1594,7 @@ var SelectRoot = ({
1592
1594
  for (const part of nameParts) {
1593
1595
  currentError = currentError?.[part];
1594
1596
  }
1595
- message2 = currentError?.message || message2;
1597
+ message4 = currentError?.message || message4;
1596
1598
  }
1597
1599
  const allOptions = initialOptions?.length ? initialOptions : registeredOptions;
1598
1600
  const valueCtx = {
@@ -1653,7 +1655,7 @@ var SelectRoot = ({
1653
1655
  String(opt.value) || index
1654
1656
  )) })
1655
1657
  ] }),
1656
- message2 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-sm text-red-600 dark:text-red-400", children: message2 })
1658
+ message4 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-sm text-red-600 dark:text-red-400", children: message4 })
1657
1659
  ]
1658
1660
  }
1659
1661
  ) });
@@ -1887,13 +1889,13 @@ var Textarea = (0, import_react11.forwardRef)(
1887
1889
  const [isFocused, setIsFocused] = (0, import_react11.useState)(false);
1888
1890
  const { theme } = useWarqadConfig();
1889
1891
  const primaryColor = theme?.primaryColor;
1890
- let message2 = error;
1892
+ let message4 = error;
1891
1893
  if (form && name) {
1892
1894
  const {
1893
1895
  formState: { errors }
1894
1896
  } = form;
1895
1897
  const errorObj = name.split(".").reduce((acc, current) => acc?.[current], errors);
1896
- message2 = errorObj?.message;
1898
+ message4 = errorObj?.message;
1897
1899
  }
1898
1900
  const renderInput = (inputProps, ref2) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: `space-y-2 group w-full! relative ${containerClassName}`, children: [
1899
1901
  /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
@@ -1929,7 +1931,7 @@ var Textarea = (0, import_react11.forwardRef)(
1929
1931
  ...inputProps
1930
1932
  }
1931
1933
  ) }),
1932
- message2 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-sm text-red-600 dark:text-red-400", children: message2 })
1934
+ message4 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-sm text-red-600 dark:text-red-400", children: message4 })
1933
1935
  ] });
1934
1936
  (0, import_react11.useEffect)(() => {
1935
1937
  if (form && name && props.value !== void 0 && props.value !== null && props.value !== "") {
@@ -2415,7 +2417,7 @@ var SearchApiRoot = ({
2415
2417
  const filteredOptions = options.filter(
2416
2418
  (option) => !filter.includes(getOptionValue(option))
2417
2419
  );
2418
- let message2 = error || errorMessage;
2420
+ let message4 = error || errorMessage;
2419
2421
  if (form && name) {
2420
2422
  const {
2421
2423
  formState: { errors }
@@ -2425,7 +2427,7 @@ var SearchApiRoot = ({
2425
2427
  for (const part of nameParts) {
2426
2428
  currentError = currentError?.[part];
2427
2429
  }
2428
- message2 = currentError?.message || message2;
2430
+ message4 = currentError?.message || message4;
2429
2431
  }
2430
2432
  const valueCtx = {
2431
2433
  isOpen,
@@ -2459,7 +2461,7 @@ var SearchApiRoot = ({
2459
2461
  form,
2460
2462
  name,
2461
2463
  obj,
2462
- error: message2,
2464
+ error: message4,
2463
2465
  onSelect,
2464
2466
  onClear
2465
2467
  };
@@ -2814,19 +2816,19 @@ var DateInput = (0, import_react14.forwardRef)(
2814
2816
  const { theme } = useWarqadConfig();
2815
2817
  const primaryColor = theme?.primaryColor;
2816
2818
  const [isFocused, setIsFocused] = (0, import_react14.useState)(false);
2817
- let message2 = error;
2819
+ let message4 = error;
2818
2820
  if (form && name) {
2819
2821
  const {
2820
2822
  formState: { errors }
2821
2823
  } = form;
2822
2824
  const errorObj = name.split(".").reduce((acc, current) => acc?.[current], errors);
2823
- message2 = errorObj?.message;
2825
+ message4 = errorObj?.message;
2824
2826
  }
2825
2827
  const inputStyles = `w-full px-2.5 py-1 rounded-xl border! shadow-none transition-all! duration-200! outline-none!
2826
2828
  bg-white! dark:bg-zinc-900!
2827
2829
  text-gray-900! dark:text-zinc-100!
2828
2830
  hover:bg-white! dark:hover:bg-zinc-900!
2829
- ${message2 ? "border-red-500 hover:border-red-500 [&.ant-picker-focused]:border-red-500 [&.ant-picker-focused]:ring-red-500/20" : "border-gray-200 dark:border-zinc-700 hover:border-gray-200 dark:hover:border-zinc-700 [&.ant-picker-focused]:ring-2"}
2831
+ ${message4 ? "border-red-500 hover:border-red-500 [&.ant-picker-focused]:border-red-500 [&.ant-picker-focused]:ring-red-500/20" : "border-gray-200 dark:border-zinc-700 hover:border-gray-200 dark:hover:border-zinc-700 [&.ant-picker-focused]:ring-2"}
2830
2832
  [&.ant-picker-focused]:bg-white dark:[&.ant-picker-focused]:bg-zinc-900
2831
2833
  ${className}`;
2832
2834
  const renderDatePicker = (val, changeHandler, blurHandler, refProps) => {
@@ -2854,8 +2856,8 @@ var DateInput = (0, import_react14.forwardRef)(
2854
2856
  needConfirm: false,
2855
2857
  style: {
2856
2858
  height: "36px",
2857
- borderColor: isFocused && !message2 ? primaryColor : void 0,
2858
- boxShadow: isFocused && !message2 ? `${primaryColor}33 0px 0px 0px 2px` : void 0
2859
+ borderColor: isFocused && !message4 ? primaryColor : void 0,
2860
+ boxShadow: isFocused && !message4 ? `${primaryColor}33 0px 0px 0px 2px` : void 0
2859
2861
  },
2860
2862
  classNames: { popup: { root: "z-50" } },
2861
2863
  suffixIcon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
@@ -2876,7 +2878,7 @@ var DateInput = (0, import_react14.forwardRef)(
2876
2878
  {
2877
2879
  className: "block text-xs font-medium transition-colors duration-200",
2878
2880
  style: {
2879
- color: message2 ? "#ef4444" : isFocused ? primaryColor : void 0
2881
+ color: message4 ? "#ef4444" : isFocused ? primaryColor : void 0
2880
2882
  },
2881
2883
  children: [
2882
2884
  label,
@@ -2897,7 +2899,7 @@ var DateInput = (0, import_react14.forwardRef)(
2897
2899
  )
2898
2900
  }
2899
2901
  ) : renderDatePicker(value, onChange, onBlur, ref),
2900
- message2 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-sm text-red-600 dark:text-red-400", children: message2 })
2902
+ message4 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-sm text-red-600 dark:text-red-400", children: message4 })
2901
2903
  ] });
2902
2904
  }
2903
2905
  );
@@ -3066,7 +3068,7 @@ function DataTable({
3066
3068
  {
3067
3069
  placeholder: searchPlaceholder,
3068
3070
  value: globalFilter,
3069
- onChange: (e) => setGlobalFilter(e.target.value),
3071
+ onChange: (val) => setGlobalFilter(val),
3070
3072
  icon: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react10.Search, { size: 16 }),
3071
3073
  className: "h-9!"
3072
3074
  }
@@ -4110,16 +4112,228 @@ var Branding = ({
4110
4112
  );
4111
4113
  };
4112
4114
 
4115
+ // src/components/ProfileCard.tsx
4116
+ var import_react19 = require("react");
4117
+ var import_lucide_react12 = require("lucide-react");
4118
+ var import_react_router_dom2 = require("react-router-dom");
4119
+ var import_antd2 = require("antd");
4120
+ var import_jsx_runtime28 = require("react/jsx-runtime");
4121
+ var ProfileCard = ({
4122
+ name,
4123
+ role,
4124
+ image,
4125
+ details,
4126
+ backUrl,
4127
+ className
4128
+ }) => {
4129
+ const navigate = (0, import_react_router_dom2.useNavigate)();
4130
+ const [copiedKey, setCopiedKey] = (0, import_react19.useState)(null);
4131
+ const handleBack = () => {
4132
+ if (backUrl) navigate(backUrl);
4133
+ else navigate(-1);
4134
+ };
4135
+ const handleCopy = async (key, value) => {
4136
+ try {
4137
+ await navigator.clipboard.writeText(String(value));
4138
+ setCopiedKey(key);
4139
+ import_antd2.message.success(`${formatLabel(key)} copied to clipboard`);
4140
+ setTimeout(() => setCopiedKey(null), 2e3);
4141
+ } catch (err) {
4142
+ import_antd2.message.error("Failed to copy");
4143
+ }
4144
+ };
4145
+ const formatLabel = (label) => {
4146
+ return label.replace(/_/g, " ").replace(/([A-Z])/g, " $1").replace(/^./, (str) => str.toUpperCase()).trim();
4147
+ };
4148
+ const getInitials = (userName) => {
4149
+ return userName.split(" ").filter(Boolean).map((n) => n[0]).join("").toUpperCase().slice(0, 2);
4150
+ };
4151
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Card, { className: cn(
4152
+ "overflow-hidden border-0 bg-white/70 dark:bg-zinc-950/70 backdrop-blur-xl shadow-2xl",
4153
+ "relative group/card transition-all duration-300",
4154
+ className
4155
+ ), children: [
4156
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "absolute top-0 left-0 w-full h-32 bg-linear-to-br from-blue-600/10 via-indigo-600/5 to-purple-600/10 dark:from-blue-500/10 dark:via-indigo-500/5 dark:to-purple-500/10" }),
4157
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "absolute top-0 right-0 w-48 h-48 bg-blue-500/20 blur-3xl -mr-24 -mt-24 rounded-full" }),
4158
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "absolute top-0 left-0 w-32 h-32 bg-indigo-500/10 blur-2xl -ml-16 -mt-16 rounded-full" }),
4159
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Card.Content, { className: "relative px-8 pt-8 pb-10 z-10", children: [
4160
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex justify-between items-start mb-10", children: [
4161
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4162
+ "button",
4163
+ {
4164
+ onClick: handleBack,
4165
+ className: "p-2.5 rounded-2xl bg-white dark:bg-zinc-900 border border-gray-100 dark:border-zinc-800 text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 shadow-sm transition-all active:scale-95 group/back",
4166
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react12.ArrowLeft, { size: 20, className: "group-hover/back:-translate-x-0.5 transition-transform" })
4167
+ }
4168
+ ),
4169
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "px-3 py-1 rounded-full bg-blue-50/50 dark:bg-blue-500/10 text-[10px] font-bold text-blue-600 dark:text-blue-400 uppercase tracking-widest border border-blue-100/50 dark:border-blue-500/20", children: "Active Profile" }) })
4170
+ ] }),
4171
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col items-center sm:flex-row gap-8 mb-12", children: [
4172
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "relative shrink-0 group/avatar", children: [
4173
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "absolute inset-0 bg-blue-500/20 blur-xl opacity-0 group-hover/avatar:opacity-100 transition-opacity" }),
4174
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "relative h-28 w-28 rounded-3xl ring-4 ring-white dark:ring-zinc-950 shadow-2xl overflow-hidden bg-gray-50 dark:bg-zinc-900 flex items-center justify-center transition-transform hover:rotate-3 duration-300", children: image ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("img", { src: image, alt: name, className: "h-full w-full object-cover" }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-3xl font-black text-blue-600 dark:text-blue-400 select-none", children: getInitials(name) }) }),
4175
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "absolute bottom-0 right-0 w-6 h-6 bg-green-500 border-4 border-white dark:border-zinc-950 rounded-full shadow-lg" })
4176
+ ] }),
4177
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col items-center sm:items-start text-center sm:text-left gap-1", children: [
4178
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("h2", { className: "text-3xl font-black text-gray-900 dark:text-white tracking-tight leading-tight", children: name }),
4179
+ role && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center gap-2", children: [
4180
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-sm font-semibold text-gray-500 dark:text-zinc-400 capitalize", children: role }),
4181
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "w-1 h-1 rounded-full bg-gray-300 dark:bg-zinc-700" }),
4182
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-xs font-medium text-blue-600/70 dark:text-blue-400/70", children: "Verified Account" })
4183
+ ] })
4184
+ ] })
4185
+ ] }),
4186
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: Object.entries(details).map(([key, value]) => {
4187
+ if (value === void 0 || value === null || value === "") return null;
4188
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
4189
+ "div",
4190
+ {
4191
+ className: "group flex flex-col p-4 rounded-2xl bg-gray-50/50 dark:bg-zinc-900/30 border border-transparent hover:border-blue-100 dark:hover:border-blue-900/30 hover:bg-white dark:hover:bg-zinc-900 transition-all duration-300",
4192
+ children: [
4193
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center justify-between mb-1", children: [
4194
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-[10px] font-black uppercase tracking-widest text-gray-400 dark:text-zinc-500", children: formatLabel(key) }),
4195
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4196
+ "button",
4197
+ {
4198
+ onClick: () => handleCopy(key, value),
4199
+ className: cn(
4200
+ "p-1.5 rounded-lg transition-all duration-200 opacity-0 group-hover:opacity-100",
4201
+ copiedKey === key ? "text-green-500 bg-green-50 dark:bg-green-500/10" : "text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-500/10"
4202
+ ),
4203
+ children: copiedKey === key ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react12.Check, { size: 12, className: "animate-in zoom-in" }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react12.Copy, { size: 12 })
4204
+ }
4205
+ )
4206
+ ] }),
4207
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex items-center justify-between gap-2 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-base font-bold text-gray-800 dark:text-zinc-100 truncate", children: value }) })
4208
+ ]
4209
+ },
4210
+ key
4211
+ );
4212
+ }) })
4213
+ ] }),
4214
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "px-8 py-4 bg-gray-50/50 dark:bg-zinc-900/30 border-t border-gray-100 dark:border-zinc-900 flex justify-between items-center", children: [
4215
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-[10px] text-gray-400 dark:text-zinc-600 font-medium italic", children: "All data is securely encrypted." }),
4216
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("button", { className: "flex items-center gap-1.5 text-xs font-bold text-blue-600 dark:text-blue-400 hover:underline", children: [
4217
+ "Edit Settings ",
4218
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react12.ExternalLink, { size: 12 })
4219
+ ] })
4220
+ ] })
4221
+ ] });
4222
+ };
4223
+
4224
+ // src/components/ProfileView.tsx
4225
+ var import_react20 = __toESM(require("react"));
4226
+ var import_lucide_react13 = require("lucide-react");
4227
+ var import_antd3 = require("antd");
4228
+ var import_jsx_runtime29 = require("react/jsx-runtime");
4229
+ var ProfileView = ({
4230
+ name,
4231
+ role,
4232
+ email,
4233
+ imgUrl,
4234
+ userId,
4235
+ info = [],
4236
+ className,
4237
+ title = "My Profile",
4238
+ description = "Manage your account settings and preferences"
4239
+ }) => {
4240
+ const [copiedIndex, setCopiedIndex] = import_react20.default.useState(null);
4241
+ const formatLabel = (label) => {
4242
+ return label.replace(/_/g, " ").replace(/([A-Z])/g, " $1").replace(/^./, (str) => str.toUpperCase()).trim();
4243
+ };
4244
+ const handleCopy = async (index, label, value) => {
4245
+ await navigator.clipboard.writeText(String(value));
4246
+ setCopiedIndex(index);
4247
+ import_antd3.message.success(`${formatLabel(label)} copied!`);
4248
+ setTimeout(() => setCopiedIndex(null), 2e3);
4249
+ };
4250
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
4251
+ "div",
4252
+ {
4253
+ className: cn(
4254
+ "max-w-5xl mx-auto space-y-8 animate-in fade-in slide-in-from-bottom-4 duration-500 pb-12",
4255
+ className
4256
+ ),
4257
+ children: [
4258
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { children: [
4259
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("h1", { className: "text-3xl font-black text-gray-900 dark:text-white tracking-tight leading-none", children: title }),
4260
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "text-gray-500 dark:text-gray-400 mt-2 font-medium", children: description })
4261
+ ] }) }),
4262
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "bg-white dark:bg-zinc-900 rounded-[2.5rem] border border-gray-100 dark:border-zinc-800 relative overflow-hidden flex flex-col", children: [
4263
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "p-8 sm:p-10 border-b border-gray-50 dark:border-zinc-800/50 relative overflow-hidden bg-gray-50/30 dark:bg-zinc-900/10", children: [
4264
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "absolute top-0 right-0 w-64 h-64 bg-blue-50 dark:bg-blue-900/10 rounded-full blur-3xl -mr-16 -mt-16 pointer-events-none" }),
4265
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "relative flex flex-col sm:flex-row items-center sm:items-start gap-10", children: [
4266
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "relative shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "w-28 h-28 sm:w-36 sm:h-36 rounded-[2rem] bg-linear-to-br from-blue-50 to-indigo-50 dark:from-blue-900/20 dark:to-indigo-900/20 flex items-center justify-center text-blue-600 dark:text-blue-400 ring-1 ring-black/5 dark:ring-white/10 overflow-hidden", children: imgUrl ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4267
+ "img",
4268
+ {
4269
+ src: imgUrl,
4270
+ alt: name,
4271
+ className: "w-full h-full object-cover"
4272
+ }
4273
+ ) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react13.User, { size: 56, className: "opacity-80" }) }) }),
4274
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "text-center sm:text-left space-y-4 flex-1 pt-4", children: [
4275
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { children: [
4276
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("h2", { className: "text-3xl font-black text-gray-900 dark:text-white tracking-tight leading-none mb-3", children: name }),
4277
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "text-gray-500 dark:text-gray-400 font-semibold text-lg", children: email })
4278
+ ] }),
4279
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-wrap justify-center sm:justify-start gap-2.5", children: [
4280
+ role && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { className: "inline-flex items-center gap-2 px-4 py-1.5 rounded-2xl bg-blue-50 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300 text-xs font-bold capitalize border border-blue-100 dark:border-blue-800 tracking-wide", children: [
4281
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react13.Shield, { size: 14 }),
4282
+ role
4283
+ ] }),
4284
+ userId && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { className: "inline-flex items-center gap-2 px-4 py-1.5 rounded-2xl bg-gray-50 text-gray-700 dark:bg-zinc-800 dark:text-gray-300 text-xs font-bold border border-gray-100 dark:border-zinc-700 tracking-wide", children: [
4285
+ "#",
4286
+ userId.slice(-6).toUpperCase()
4287
+ ] })
4288
+ ] })
4289
+ ] })
4290
+ ] })
4291
+ ] }),
4292
+ info && info.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "p-8 sm:p-10", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: info.map((item, index) => {
4293
+ if (item.value === void 0 || item.value === null || item.value === "")
4294
+ return null;
4295
+ const isCopiable = item.copiable !== false;
4296
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
4297
+ "div",
4298
+ {
4299
+ className: "group flex flex-col p-6 rounded-3xl bg-gray-50/50 dark:bg-zinc-800/30 border border-gray-100/50 dark:border-zinc-800/50 hover:bg-white dark:hover:bg-zinc-800 hover:border-blue-100 dark:hover:border-blue-900/30 transition-all duration-300",
4300
+ children: [
4301
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex items-center justify-between mb-2 capitalize", children: [
4302
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-[10px] font-black uppercase tracking-widest text-gray-400 dark:text-zinc-500", children: formatLabel(item.label) }),
4303
+ isCopiable && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4304
+ "button",
4305
+ {
4306
+ onClick: () => handleCopy(index, item.label, item.value),
4307
+ className: cn(
4308
+ "p-2 rounded-xl transition-all duration-200 opacity-0 group-hover:opacity-100",
4309
+ copiedIndex === index ? "text-green-500 bg-green-50 dark:bg-green-500/10" : "text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 hover:bg-white dark:hover:bg-zinc-900 border border-transparent hover:border-gray-100 dark:hover:border-zinc-700"
4310
+ ),
4311
+ children: copiedIndex === index ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react13.Check, { size: 14, className: "animate-in zoom-in" }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react13.Copy, { size: 14 })
4312
+ }
4313
+ )
4314
+ ] }),
4315
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "text-base font-black text-gray-800 dark:text-zinc-100 truncate", children: item.value })
4316
+ ]
4317
+ },
4318
+ index
4319
+ );
4320
+ }) }) })
4321
+ ] })
4322
+ ]
4323
+ }
4324
+ );
4325
+ };
4326
+
4113
4327
  // src/hooks/useLogin.tsx
4114
- var import_react19 = __toESM(require("react"));
4328
+ var import_react21 = __toESM(require("react"));
4115
4329
  var import_react_hook_form7 = require("react-hook-form");
4116
4330
  var import_zod = require("@hookform/resolvers/zod");
4117
4331
  var z = __toESM(require("zod"));
4118
4332
 
4119
4333
  // src/components/Login/ThemedLogins.tsx
4120
- var import_lucide_react12 = require("lucide-react");
4121
- var import_react_router_dom2 = require("react-router-dom");
4122
- var import_jsx_runtime28 = require("react/jsx-runtime");
4334
+ var import_lucide_react14 = require("lucide-react");
4335
+ var import_react_router_dom3 = require("react-router-dom");
4336
+ var import_jsx_runtime30 = require("react/jsx-runtime");
4123
4337
  var TechLogin = ({
4124
4338
  form,
4125
4339
  onSubmit,
@@ -4130,65 +4344,65 @@ var TechLogin = ({
4130
4344
  backUrl,
4131
4345
  isLoading
4132
4346
  }) => {
4133
- const navigate = (0, import_react_router_dom2.useNavigate)();
4134
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex h-screen w-full overflow-hidden bg-white dark:bg-[#0A0B10]", children: [
4135
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "hidden lg:flex lg:w-3/5 relative overflow-hidden bg-slate-900 border-r border-slate-800", children: [
4136
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4347
+ const navigate = (0, import_react_router_dom3.useNavigate)();
4348
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex h-screen w-full overflow-hidden bg-white dark:bg-[#0A0B10]", children: [
4349
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "hidden lg:flex lg:w-3/5 relative overflow-hidden bg-slate-900 border-r border-slate-800", children: [
4350
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4137
4351
  "div",
4138
4352
  {
4139
4353
  className: "absolute inset-0 z-0 opacity-60 bg-cover bg-center transition-transform hover:scale-110 duration-[20s]",
4140
4354
  style: { backgroundImage: `url('${image || "/tech_bg.png"}')` }
4141
4355
  }
4142
4356
  ),
4143
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "absolute inset-0 bg-linear-to-tr from-[#0A0B10] via-transparent to-purple-500/10 z-10" }),
4144
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "relative z-20 p-12 flex flex-col justify-between w-full h-full", children: [
4145
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center gap-3", children: [
4146
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "h-10 w-10 bg-indigo-600 rounded-lg flex items-center justify-center shadow-[0_0_20px_rgba(79,70,229,0.5)]", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react12.Terminal, { className: "text-white w-6 h-6" }) }),
4147
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-2xl font-bold text-white tracking-widest uppercase", children: brandName || "DevNode" })
4357
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "absolute inset-0 bg-linear-to-tr from-[#0A0B10] via-transparent to-purple-500/10 z-10" }),
4358
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "relative z-20 p-12 flex flex-col justify-between w-full h-full", children: [
4359
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center gap-3", children: [
4360
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "h-10 w-10 bg-indigo-600 rounded-lg flex items-center justify-center shadow-[0_0_20px_rgba(79,70,229,0.5)]", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react14.Terminal, { className: "text-white w-6 h-6" }) }),
4361
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-2xl font-bold text-white tracking-widest uppercase", children: brandName || "DevNode" })
4148
4362
  ] }),
4149
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "max-w-md", children: [
4150
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("h1", { className: "text-5xl font-extrabold text-white mb-6 leading-tight", children: [
4363
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "max-w-md", children: [
4364
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("h1", { className: "text-5xl font-extrabold text-white mb-6 leading-tight", children: [
4151
4365
  "Build the ",
4152
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-indigo-400", children: "Future" }),
4366
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-indigo-400", children: "Future" }),
4153
4367
  " of Web."
4154
4368
  ] }),
4155
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-slate-400 text-lg leading-relaxed mb-8", children: "Join thousands of developers building scalable applications with our state-of-the-art infrastructure." })
4369
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-slate-400 text-lg leading-relaxed mb-8", children: "Join thousands of developers building scalable applications with our state-of-the-art infrastructure." })
4156
4370
  ] }),
4157
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "text-slate-500 text-sm", children: [
4371
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "text-slate-500 text-sm", children: [
4158
4372
  "\xA9 2026 ",
4159
4373
  brandName || "DevNode",
4160
4374
  "."
4161
4375
  ] })
4162
4376
  ] })
4163
4377
  ] }),
4164
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "w-full lg:w-2/5 p-8 lg:p-16 flex flex-col justify-center bg-white dark:bg-[#0A0B10] relative transition-colors duration-300", children: [
4165
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "absolute top-4 right-4 z-50 flex items-center gap-2", children: [
4166
- backUrl && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
4378
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "w-full lg:w-2/5 p-8 lg:p-16 flex flex-col justify-center bg-white dark:bg-[#0A0B10] relative transition-colors duration-300", children: [
4379
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "absolute top-4 right-4 z-50 flex items-center gap-2", children: [
4380
+ backUrl && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
4167
4381
  "button",
4168
4382
  {
4169
4383
  onClick: () => navigate(backUrl),
4170
4384
  disabled: isLoading,
4171
4385
  className: "p-2 rounded-lg text-slate-500 hover:text-indigo-600 hover:bg-slate-100 dark:text-slate-400 dark:hover:text-indigo-400 dark:hover:bg-slate-800 transition-colors flex items-center gap-2 font-medium disabled:opacity-50",
4172
4386
  children: [
4173
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react12.ArrowLeft, { size: 18 }),
4174
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-sm", children: "Back" })
4387
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react14.ArrowLeft, { size: 18 }),
4388
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-sm", children: "Back" })
4175
4389
  ]
4176
4390
  }
4177
4391
  ),
4178
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ThemeToggle, {})
4392
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ThemeToggle, {})
4179
4393
  ] }),
4180
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "max-w-md w-full mx-auto relative z-10", children: [
4181
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "mb-12", children: [
4182
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("h2", { className: "text-3xl font-bold text-slate-900 dark:text-white mb-3 tracking-tight", children: title || "Welcome Back" }),
4183
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-slate-500 dark:text-slate-400", children: subtitle || "Please enter your credentials to access your dashboard." })
4394
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "max-w-md w-full mx-auto relative z-10", children: [
4395
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "mb-12", children: [
4396
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("h2", { className: "text-3xl font-bold text-slate-900 dark:text-white mb-3 tracking-tight", children: title || "Welcome Back" }),
4397
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-slate-500 dark:text-slate-400", children: subtitle || "Please enter your credentials to access your dashboard." })
4184
4398
  ] }),
4185
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
4399
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
4186
4400
  "form",
4187
4401
  {
4188
4402
  onSubmit: form.handleSubmit((d) => onSubmit(d, form)),
4189
4403
  className: "space-y-6",
4190
4404
  children: [
4191
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4405
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4192
4406
  Fields_default.Input,
4193
4407
  {
4194
4408
  form,
@@ -4197,8 +4411,8 @@ var TechLogin = ({
4197
4411
  type: "email",
4198
4412
  disabled: isLoading,
4199
4413
  placeholder: "maoo@example.com",
4200
- icon: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4201
- import_lucide_react12.Mail,
4414
+ icon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4415
+ import_lucide_react14.Mail,
4202
4416
  {
4203
4417
  size: 18,
4204
4418
  className: "text-slate-400 dark:text-slate-500"
@@ -4207,7 +4421,7 @@ var TechLogin = ({
4207
4421
  className: "bg-slate-50 dark:bg-slate-900/50 border-slate-200 dark:border-slate-800 text-slate-900 dark:text-white h-12"
4208
4422
  }
4209
4423
  ),
4210
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4424
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4211
4425
  Fields_default.Input,
4212
4426
  {
4213
4427
  form,
@@ -4216,8 +4430,8 @@ var TechLogin = ({
4216
4430
  type: "password",
4217
4431
  disabled: isLoading,
4218
4432
  placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",
4219
- icon: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4220
- import_lucide_react12.Lock,
4433
+ icon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4434
+ import_lucide_react14.Lock,
4221
4435
  {
4222
4436
  size: 18,
4223
4437
  className: "text-slate-400 dark:text-slate-500"
@@ -4226,8 +4440,8 @@ var TechLogin = ({
4226
4440
  className: "bg-slate-50 dark:bg-slate-900/50 border-slate-200 dark:border-slate-800 text-slate-900 dark:text-white h-12"
4227
4441
  }
4228
4442
  ),
4229
- form.formState.errors.root && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-red-500 text-sm font-medium animate-in fade-in slide-in-from-top-1 duration-200", children: form.formState.errors.root.message }),
4230
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
4443
+ form.formState.errors.root && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-red-500 text-sm font-medium animate-in fade-in slide-in-from-top-1 duration-200", children: form.formState.errors.root.message }),
4444
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
4231
4445
  Button,
4232
4446
  {
4233
4447
  type: "submit",
@@ -4235,7 +4449,7 @@ var TechLogin = ({
4235
4449
  className: "w-full bg-indigo-600 hover:bg-indigo-500 text-white h-12 font-semibold flex items-center justify-center gap-2",
4236
4450
  children: [
4237
4451
  isLoading ? "Logging in..." : "Authenticate Now",
4238
- !isLoading && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react12.ArrowRight, { size: 18 })
4452
+ !isLoading && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react14.ArrowRight, { size: 18 })
4239
4453
  ]
4240
4454
  }
4241
4455
  )
@@ -4256,63 +4470,63 @@ var TravelLogin = ({
4256
4470
  backUrl,
4257
4471
  isLoading
4258
4472
  }) => {
4259
- const navigate = (0, import_react_router_dom2.useNavigate)();
4260
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex h-screen w-full overflow-hidden bg-white dark:bg-slate-950 transition-colors", children: [
4261
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "hidden lg:flex lg:w-1/2 relative overflow-hidden bg-slate-100 border-r border-slate-100", children: [
4262
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4473
+ const navigate = (0, import_react_router_dom3.useNavigate)();
4474
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex h-screen w-full overflow-hidden bg-white dark:bg-slate-950 transition-colors", children: [
4475
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "hidden lg:flex lg:w-1/2 relative overflow-hidden bg-slate-100 border-r border-slate-100", children: [
4476
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4263
4477
  "div",
4264
4478
  {
4265
4479
  className: "absolute inset-0 z-0 bg-cover bg-center transition-transform hover:scale-105 duration-[30s]",
4266
4480
  style: { backgroundImage: `url('${image || "/travel_bg.png"}')` }
4267
4481
  }
4268
4482
  ),
4269
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "absolute inset-0 bg-linear-to-br from-orange-500/20 via-transparent to-black/30 z-10" }),
4270
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "relative z-20 p-16 flex flex-col justify-between w-full h-full text-white", children: [
4271
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center gap-3", children: [
4272
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "h-10 w-10 bg-orange-500 rounded-full flex items-center justify-center shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react12.Plane, { className: "text-white w-6 h-6 rotate-45" }) }),
4273
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-2xl font-bold tracking-tight", children: brandName || "Wanderlust" })
4483
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "absolute inset-0 bg-linear-to-br from-orange-500/20 via-transparent to-black/30 z-10" }),
4484
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "relative z-20 p-16 flex flex-col justify-between w-full h-full text-white", children: [
4485
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center gap-3", children: [
4486
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "h-10 w-10 bg-orange-500 rounded-full flex items-center justify-center shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react14.Plane, { className: "text-white w-6 h-6 rotate-45" }) }),
4487
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-2xl font-bold tracking-tight", children: brandName || "Wanderlust" })
4274
4488
  ] }),
4275
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "max-w-md", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("h1", { className: "text-6xl font-black mb-8 leading-[1.1]", children: [
4489
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "max-w-md", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("h1", { className: "text-6xl font-black mb-8 leading-[1.1]", children: [
4276
4490
  "Your Next ",
4277
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-orange-400", children: "Adventure" }),
4491
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-orange-400", children: "Adventure" }),
4278
4492
  " ",
4279
4493
  "Starts Now."
4280
4494
  ] }) }),
4281
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "text-white/70 text-sm", children: [
4495
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "text-white/70 text-sm", children: [
4282
4496
  "Discover the world with ",
4283
4497
  brandName || "Wanderlust",
4284
4498
  "."
4285
4499
  ] })
4286
4500
  ] })
4287
4501
  ] }),
4288
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "w-full lg:w-1/2 p-10 lg:p-24 flex flex-col justify-center bg-white dark:bg-slate-950 relative transition-colors", children: [
4289
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "absolute top-4 right-4 z-50 flex items-center gap-2", children: [
4290
- backUrl && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
4502
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "w-full lg:w-1/2 p-10 lg:p-24 flex flex-col justify-center bg-white dark:bg-slate-950 relative transition-colors", children: [
4503
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "absolute top-4 right-4 z-50 flex items-center gap-2", children: [
4504
+ backUrl && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
4291
4505
  "button",
4292
4506
  {
4293
4507
  onClick: () => navigate(backUrl),
4294
4508
  disabled: isLoading,
4295
4509
  className: "p-2 rounded-lg text-slate-500 hover:text-orange-600 hover:bg-slate-100 dark:text-slate-400 dark:hover:text-orange-400 dark:hover:bg-slate-800 transition-colors flex items-center gap-2 font-medium disabled:opacity-50",
4296
4510
  children: [
4297
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react12.ArrowLeft, { size: 18 }),
4298
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-sm", children: "Back" })
4511
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react14.ArrowLeft, { size: 18 }),
4512
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-sm", children: "Back" })
4299
4513
  ]
4300
4514
  }
4301
4515
  ),
4302
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ThemeToggle, {})
4516
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ThemeToggle, {})
4303
4517
  ] }),
4304
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "max-w-md w-full mx-auto relative z-10", children: [
4305
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "mb-12 text-center lg:text-left", children: [
4306
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("h2", { className: "text-4xl font-bold text-slate-900 dark:text-white mb-4 tracking-tight", children: title || "Login to Explore" }),
4307
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-slate-500 dark:text-slate-400 text-lg", children: subtitle || "Enter your details to access your travel dashboard." })
4518
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "max-w-md w-full mx-auto relative z-10", children: [
4519
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "mb-12 text-center lg:text-left", children: [
4520
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("h2", { className: "text-4xl font-bold text-slate-900 dark:text-white mb-4 tracking-tight", children: title || "Login to Explore" }),
4521
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-slate-500 dark:text-slate-400 text-lg", children: subtitle || "Enter your details to access your travel dashboard." })
4308
4522
  ] }),
4309
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
4523
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
4310
4524
  "form",
4311
4525
  {
4312
4526
  onSubmit: form.handleSubmit((d) => onSubmit(d, form)),
4313
4527
  className: "space-y-6",
4314
4528
  children: [
4315
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4529
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4316
4530
  Fields_default.Input,
4317
4531
  {
4318
4532
  form,
@@ -4321,8 +4535,8 @@ var TravelLogin = ({
4321
4535
  type: "email",
4322
4536
  disabled: isLoading,
4323
4537
  placeholder: "traveler@world.com",
4324
- icon: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4325
- import_lucide_react12.Mail,
4538
+ icon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4539
+ import_lucide_react14.Mail,
4326
4540
  {
4327
4541
  size: 18,
4328
4542
  className: "text-slate-400 dark:text-slate-500"
@@ -4331,7 +4545,7 @@ var TravelLogin = ({
4331
4545
  className: "bg-slate-50 dark:bg-slate-900/50 border-slate-200 dark:border-slate-800 text-slate-900 dark:text-white h-14 rounded-xl"
4332
4546
  }
4333
4547
  ),
4334
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4548
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4335
4549
  Fields_default.Input,
4336
4550
  {
4337
4551
  form,
@@ -4340,8 +4554,8 @@ var TravelLogin = ({
4340
4554
  type: "password",
4341
4555
  disabled: isLoading,
4342
4556
  placeholder: "Secret journey phrase",
4343
- icon: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4344
- import_lucide_react12.Lock,
4557
+ icon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4558
+ import_lucide_react14.Lock,
4345
4559
  {
4346
4560
  size: 18,
4347
4561
  className: "text-slate-400 dark:text-slate-500"
@@ -4350,8 +4564,8 @@ var TravelLogin = ({
4350
4564
  className: "bg-slate-50 dark:bg-slate-900/50 border-slate-200 dark:border-slate-800 text-slate-900 dark:text-white h-14 rounded-xl"
4351
4565
  }
4352
4566
  ),
4353
- form.formState.errors.root && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-orange-600 dark:text-orange-400 text-sm font-bold text-center lg:text-left animate-in fade-in slide-in-from-top-1 duration-200", children: form.formState.errors.root.message }),
4354
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
4567
+ form.formState.errors.root && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-orange-600 dark:text-orange-400 text-sm font-bold text-center lg:text-left animate-in fade-in slide-in-from-top-1 duration-200", children: form.formState.errors.root.message }),
4568
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
4355
4569
  Button,
4356
4570
  {
4357
4571
  type: "submit",
@@ -4359,7 +4573,7 @@ var TravelLogin = ({
4359
4573
  className: "w-full bg-orange-500 hover:bg-orange-600 text-white h-14 rounded-xl font-bold text-lg flex items-center justify-center gap-2 transition-all",
4360
4574
  children: [
4361
4575
  isLoading ? "Logging in..." : "Start Journey",
4362
- !isLoading && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react12.Plane, { size: 20, className: "rotate-45" })
4576
+ !isLoading && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react14.Plane, { size: 20, className: "rotate-45" })
4363
4577
  ]
4364
4578
  }
4365
4579
  )
@@ -4380,40 +4594,40 @@ var HealthcareLogin = ({
4380
4594
  backUrl,
4381
4595
  isLoading
4382
4596
  }) => {
4383
- const navigate = (0, import_react_router_dom2.useNavigate)();
4384
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex h-screen w-full overflow-hidden bg-[#F0F7FF] dark:bg-slate-950 transition-colors", children: [
4385
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "w-full lg:w-[450px] flex flex-col justify-center bg-white dark:bg-slate-900 shadow-2xl z-30 relative px-10 lg:px-14 transition-colors", children: [
4386
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "absolute top-4 right-4 z-50 flex items-center gap-2", children: [
4387
- backUrl && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
4597
+ const navigate = (0, import_react_router_dom3.useNavigate)();
4598
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex h-screen w-full overflow-hidden bg-[#F0F7FF] dark:bg-slate-950 transition-colors", children: [
4599
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "w-full lg:w-[450px] flex flex-col justify-center bg-white dark:bg-slate-900 shadow-2xl z-30 relative px-10 lg:px-14 transition-colors", children: [
4600
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "absolute top-4 right-4 z-50 flex items-center gap-2", children: [
4601
+ backUrl && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
4388
4602
  "button",
4389
4603
  {
4390
4604
  onClick: () => navigate(backUrl),
4391
4605
  disabled: isLoading,
4392
4606
  className: "p-2 rounded-lg text-slate-500 hover:text-blue-600 hover:bg-slate-100 dark:text-slate-400 dark:hover:text-blue-400 dark:hover:bg-slate-800 transition-colors flex items-center gap-2 font-medium disabled:opacity-50",
4393
4607
  children: [
4394
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react12.ArrowLeft, { size: 18 }),
4395
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-sm font-semibold", children: "Back" })
4608
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react14.ArrowLeft, { size: 18 }),
4609
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-sm font-semibold", children: "Back" })
4396
4610
  ]
4397
4611
  }
4398
4612
  ),
4399
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ThemeToggle, {})
4613
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ThemeToggle, {})
4400
4614
  ] }),
4401
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "max-w-[340px] w-full mx-auto", children: [
4402
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "mb-14", children: [
4403
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center gap-3 mb-8", children: [
4404
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "h-12 w-12 bg-blue-600 rounded-xl flex items-center justify-center shadow-md shadow-blue-200 dark:shadow-blue-900/20", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react12.HeartPulse, { className: "text-white w-7 h-7" }) }),
4405
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-2xl font-bold text-slate-800 dark:text-white tracking-tight", children: brandName || "CarePoint" })
4615
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "max-w-[340px] w-full mx-auto", children: [
4616
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "mb-14", children: [
4617
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center gap-3 mb-8", children: [
4618
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "h-12 w-12 bg-blue-600 rounded-xl flex items-center justify-center shadow-md shadow-blue-200 dark:shadow-blue-900/20", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react14.HeartPulse, { className: "text-white w-7 h-7" }) }),
4619
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-2xl font-bold text-slate-800 dark:text-white tracking-tight", children: brandName || "CarePoint" })
4406
4620
  ] }),
4407
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("h2", { className: "text-3xl font-bold text-slate-800 dark:text-white mb-3 tracking-tight", children: title || "Clinical Login" }),
4408
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-slate-500 dark:text-slate-400 font-medium leading-relaxed", children: subtitle || "Secure access for staff and healthcare professionals." })
4621
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("h2", { className: "text-3xl font-bold text-slate-800 dark:text-white mb-3 tracking-tight", children: title || "Clinical Login" }),
4622
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-slate-500 dark:text-slate-400 font-medium leading-relaxed", children: subtitle || "Secure access for staff and healthcare professionals." })
4409
4623
  ] }),
4410
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
4624
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
4411
4625
  "form",
4412
4626
  {
4413
4627
  onSubmit: form.handleSubmit((d) => onSubmit(d, form)),
4414
4628
  className: "space-y-7",
4415
4629
  children: [
4416
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4630
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4417
4631
  Fields_default.Input,
4418
4632
  {
4419
4633
  form,
@@ -4422,11 +4636,11 @@ var HealthcareLogin = ({
4422
4636
  type: "email",
4423
4637
  disabled: isLoading,
4424
4638
  placeholder: "dr.name@carepoint.org",
4425
- icon: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react12.Mail, { size: 18, className: "text-blue-500" }),
4639
+ icon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react14.Mail, { size: 18, className: "text-blue-500" }),
4426
4640
  className: "bg-slate-50/50 dark:bg-slate-800/50 border-slate-200 dark:border-slate-700 text-slate-900 dark:text-white h-13 rounded-lg border-2"
4427
4641
  }
4428
4642
  ),
4429
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4643
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4430
4644
  Fields_default.Input,
4431
4645
  {
4432
4646
  form,
@@ -4435,12 +4649,12 @@ var HealthcareLogin = ({
4435
4649
  type: "password",
4436
4650
  disabled: isLoading,
4437
4651
  placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",
4438
- icon: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react12.Lock, { size: 18, className: "text-blue-500" }),
4652
+ icon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react14.Lock, { size: 18, className: "text-blue-500" }),
4439
4653
  className: "bg-slate-50/50 dark:bg-slate-800/50 border-slate-200 dark:border-slate-700 text-slate-900 dark:text-white h-13 rounded-lg border-2"
4440
4654
  }
4441
4655
  ),
4442
- form.formState.errors.root && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-red-600 dark:text-red-400 text-sm font-bold animate-in fade-in slide-in-from-top-1 duration-200", children: form.formState.errors.root.message }),
4443
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
4656
+ form.formState.errors.root && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-red-600 dark:text-red-400 text-sm font-bold animate-in fade-in slide-in-from-top-1 duration-200", children: form.formState.errors.root.message }),
4657
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
4444
4658
  Button,
4445
4659
  {
4446
4660
  type: "submit",
@@ -4448,7 +4662,7 @@ var HealthcareLogin = ({
4448
4662
  className: "w-full bg-blue-600 hover:bg-blue-700 text-white h-13 rounded-lg font-bold flex items-center justify-center gap-2 transition-all shadow-lg active:translate-y-0.5",
4449
4663
  children: [
4450
4664
  isLoading ? "Logging in..." : "Secure Login",
4451
- !isLoading && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react12.MonitorCheck, { size: 18 })
4665
+ !isLoading && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react14.MonitorCheck, { size: 18 })
4452
4666
  ]
4453
4667
  }
4454
4668
  )
@@ -4457,19 +4671,19 @@ var HealthcareLogin = ({
4457
4671
  )
4458
4672
  ] })
4459
4673
  ] }),
4460
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "hidden lg:flex flex-1 relative overflow-hidden bg-slate-900", children: [
4461
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4674
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "hidden lg:flex flex-1 relative overflow-hidden bg-slate-900", children: [
4675
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4462
4676
  "div",
4463
4677
  {
4464
4678
  className: "absolute inset-0 z-0 bg-cover bg-center brightness-110",
4465
4679
  style: { backgroundImage: `url('${image || "/medicine_bg.png"}')` }
4466
4680
  }
4467
4681
  ),
4468
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "absolute inset-0 bg-linear-to-l from-transparent via-blue-900/10 to-blue-900/40 z-10" }),
4469
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "relative z-20 p-20 flex flex-col items-center justify-center w-full h-full text-center", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "max-w-2xl bg-white/20 backdrop-blur-xl border border-white/30 p-12 rounded-[40px] shadow-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("h1", { className: "text-5xl font-black text-white mb-6 leading-tight drop-shadow-sm", children: [
4682
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "absolute inset-0 bg-linear-to-l from-transparent via-blue-900/10 to-blue-900/40 z-10" }),
4683
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "relative z-20 p-20 flex flex-col items-center justify-center w-full h-full text-center", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "max-w-2xl bg-white/20 backdrop-blur-xl border border-white/30 p-12 rounded-[40px] shadow-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("h1", { className: "text-5xl font-black text-white mb-6 leading-tight drop-shadow-sm", children: [
4470
4684
  "Next-Gen ",
4471
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("br", {}),
4472
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-blue-100", children: "Patient Management" })
4685
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("br", {}),
4686
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-blue-100", children: "Patient Management" })
4473
4687
  ] }) }) })
4474
4688
  ] })
4475
4689
  ] });
@@ -4477,18 +4691,18 @@ var HealthcareLogin = ({
4477
4691
  var ThemedLogin = (props) => {
4478
4692
  switch (props.theme) {
4479
4693
  case "tech":
4480
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(TechLogin, { ...props });
4694
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TechLogin, { ...props });
4481
4695
  case "travel":
4482
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(TravelLogin, { ...props });
4696
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TravelLogin, { ...props });
4483
4697
  case "healthcare":
4484
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(HealthcareLogin, { ...props });
4698
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(HealthcareLogin, { ...props });
4485
4699
  default:
4486
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(TechLogin, { ...props });
4700
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TechLogin, { ...props });
4487
4701
  }
4488
4702
  };
4489
4703
 
4490
4704
  // src/hooks/useLogin.tsx
4491
- var import_jsx_runtime29 = require("react/jsx-runtime");
4705
+ var import_jsx_runtime31 = require("react/jsx-runtime");
4492
4706
  var defaultLoginSchema = z.object({
4493
4707
  email: z.string().email("Invalid email address"),
4494
4708
  password: z.string().min(1, "Password is required")
@@ -4501,12 +4715,12 @@ var useLogin = (props) => {
4501
4715
  password: ""
4502
4716
  }
4503
4717
  });
4504
- const propsRef = import_react19.default.useRef(props);
4718
+ const propsRef = import_react21.default.useRef(props);
4505
4719
  propsRef.current = props;
4506
- const Login = import_react19.default.useMemo(() => {
4720
+ const Login = import_react21.default.useMemo(() => {
4507
4721
  const StableLogin = () => {
4508
4722
  const currentProps = propsRef.current;
4509
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4723
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4510
4724
  ThemedLogin,
4511
4725
  {
4512
4726
  form,
@@ -4530,19 +4744,20 @@ var useLogin = (props) => {
4530
4744
  };
4531
4745
 
4532
4746
  // src/components/ProfileDropdown.tsx
4533
- var import_react20 = require("react");
4534
- var import_jsx_runtime30 = require("react/jsx-runtime");
4747
+ var import_react22 = require("react");
4748
+ var import_jsx_runtime32 = require("react/jsx-runtime");
4535
4749
  var ProfileDropdown = ({
4536
4750
  name,
4537
4751
  image,
4538
4752
  items,
4539
4753
  className,
4540
4754
  triggerMode = "click",
4541
- size = "md"
4755
+ size = "md",
4756
+ role
4542
4757
  }) => {
4543
- const [isOpen, setIsOpen] = (0, import_react20.useState)(false);
4544
- const dropdownRef = (0, import_react20.useRef)(null);
4545
- const [loadingItems, setLoadingItems] = (0, import_react20.useState)({});
4758
+ const [isOpen, setIsOpen] = (0, import_react22.useState)(false);
4759
+ const dropdownRef = (0, import_react22.useRef)(null);
4760
+ const [loadingItems, setLoadingItems] = (0, import_react22.useState)({});
4546
4761
  const sizeConfigs = {
4547
4762
  sm: {
4548
4763
  avatar: "h-8 w-8",
@@ -4567,7 +4782,7 @@ var ProfileDropdown = ({
4567
4782
  }
4568
4783
  };
4569
4784
  const currentSize = sizeConfigs[size];
4570
- (0, import_react20.useEffect)(() => {
4785
+ (0, import_react22.useEffect)(() => {
4571
4786
  const handleClickOutside = (event) => {
4572
4787
  if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
4573
4788
  setIsOpen(false);
@@ -4603,7 +4818,7 @@ var ProfileDropdown = ({
4603
4818
  }
4604
4819
  };
4605
4820
  const fallbackInitial = name ? name.charAt(0).toUpperCase() : "?";
4606
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
4821
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
4607
4822
  "div",
4608
4823
  {
4609
4824
  ref: dropdownRef,
@@ -4611,7 +4826,7 @@ var ProfileDropdown = ({
4611
4826
  onMouseEnter: openDropdown,
4612
4827
  onMouseLeave: closeDropdown,
4613
4828
  children: [
4614
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
4829
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
4615
4830
  "button",
4616
4831
  {
4617
4832
  type: "button",
@@ -4621,21 +4836,21 @@ var ProfileDropdown = ({
4621
4836
  currentSize.container
4622
4837
  ),
4623
4838
  children: [
4624
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4839
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4625
4840
  "div",
4626
4841
  {
4627
4842
  className: cn(
4628
4843
  "relative overflow-hidden rounded-full ring-2 ring-transparent group-hover:ring-blue-500/30 transition-all duration-300 shadow-sm border border-gray-100 dark:border-white/10 flex items-center justify-center bg-blue-50 dark:bg-blue-900/20",
4629
4844
  currentSize.avatar
4630
4845
  ),
4631
- children: image ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4846
+ children: image ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4632
4847
  "img",
4633
4848
  {
4634
4849
  src: image,
4635
4850
  alt: name,
4636
4851
  className: "h-full w-full object-cover"
4637
4852
  }
4638
- ) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4853
+ ) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4639
4854
  "span",
4640
4855
  {
4641
4856
  className: cn(
@@ -4647,8 +4862,8 @@ var ProfileDropdown = ({
4647
4862
  )
4648
4863
  }
4649
4864
  ),
4650
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col items-start mr-1", children: [
4651
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4865
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col items-start mr-1 min-w-[80px]", children: [
4866
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4652
4867
  "span",
4653
4868
  {
4654
4869
  className: cn(
@@ -4658,18 +4873,18 @@ var ProfileDropdown = ({
4658
4873
  children: name
4659
4874
  }
4660
4875
  ),
4661
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4876
+ role && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4662
4877
  "span",
4663
4878
  {
4664
4879
  className: cn(
4665
4880
  "text-gray-500 dark:text-gray-400 uppercase tracking-wider font-medium",
4666
4881
  currentSize.role
4667
4882
  ),
4668
- children: "Account"
4883
+ children: role
4669
4884
  }
4670
4885
  )
4671
4886
  ] }),
4672
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4887
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4673
4888
  "svg",
4674
4889
  {
4675
4890
  className: cn(
@@ -4679,7 +4894,7 @@ var ProfileDropdown = ({
4679
4894
  fill: "none",
4680
4895
  viewBox: "0 0 24 24",
4681
4896
  stroke: "currentColor",
4682
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4897
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4683
4898
  "path",
4684
4899
  {
4685
4900
  strokeLinecap: "round",
@@ -4693,9 +4908,9 @@ var ProfileDropdown = ({
4693
4908
  ]
4694
4909
  }
4695
4910
  ),
4696
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "absolute right-0 top-full pt-2 w-64 origin-top-right z-50 group-data-[state=open]:animate-in group-data-[state=closed]:animate-out fade-in zoom-in duration-200", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "rounded-2xl bg-white dark:bg-gray-900 shadow-2xl ring-1 ring-black/5 dark:ring-white/10 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "py-2", children: items.map((item, index) => {
4911
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "absolute right-0 top-full pt-2 w-64 origin-top-right z-50 group-data-[state=open]:animate-in group-data-[state=closed]:animate-out fade-in zoom-in duration-200", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "rounded-2xl bg-white dark:bg-gray-900 shadow-2xl ring-1 ring-black/5 dark:ring-white/10 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "py-2", children: items.map((item, index) => {
4697
4912
  const isLoading = loadingItems[index];
4698
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
4913
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
4699
4914
  "button",
4700
4915
  {
4701
4916
  onClick: () => handleItemClick(item, index),
@@ -4707,8 +4922,8 @@ var ProfileDropdown = ({
4707
4922
  item.className
4708
4923
  ),
4709
4924
  children: [
4710
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "flex-shrink-0 flex items-center justify-center w-5 h-5", children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(LoadingSpin, { size: "sm", className: "text-blue-500" }) : item.icon }),
4711
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "flex-grow text-left font-medium", children: item.label })
4925
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "flex-shrink-0 flex items-center justify-center w-5 h-5", children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(LoadingSpin, { size: "sm", className: "text-blue-500" }) : item.icon }),
4926
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "flex-grow text-left font-medium", children: item.label })
4712
4927
  ]
4713
4928
  },
4714
4929
  index
@@ -4720,10 +4935,10 @@ var ProfileDropdown = ({
4720
4935
  };
4721
4936
 
4722
4937
  // src/hooks/Fetches/useA4DataView.tsx
4723
- var import_react21 = require("react");
4938
+ var import_react23 = require("react");
4724
4939
  var import_react_to_print = require("react-to-print");
4725
- var import_lucide_react13 = require("lucide-react");
4726
- var import_jsx_runtime31 = require("react/jsx-runtime");
4940
+ var import_lucide_react15 = require("lucide-react");
4941
+ var import_jsx_runtime33 = require("react/jsx-runtime");
4727
4942
  var useA4StatementView = ({
4728
4943
  url,
4729
4944
  v = 1,
@@ -4732,7 +4947,7 @@ var useA4StatementView = ({
4732
4947
  startPage = 1
4733
4948
  } = {}) => {
4734
4949
  const { data: apiData, isLoading, get, error: apiError } = useApis_default();
4735
- const contentRef = (0, import_react21.useRef)(null);
4950
+ const contentRef = (0, import_react23.useRef)(null);
4736
4951
  const reactToPrintFn = (0, import_react_to_print.useReactToPrint)({
4737
4952
  contentRef
4738
4953
  });
@@ -4742,7 +4957,7 @@ var useA4StatementView = ({
4742
4957
  await get({ url, v, params, delay });
4743
4958
  }
4744
4959
  };
4745
- (0, import_react21.useEffect)(() => {
4960
+ (0, import_react23.useEffect)(() => {
4746
4961
  getData();
4747
4962
  }, [url, v, JSON.stringify(params), delay]);
4748
4963
  const A4DataViewComponent = ({
@@ -4773,12 +4988,12 @@ var useA4StatementView = ({
4773
4988
  }) => {
4774
4989
  const { store } = useWarqadConfig();
4775
4990
  const isActuallyLoading = externalLoading ?? isLoading;
4776
- const measureContainerRef = (0, import_react21.useRef)(null);
4777
- const [pages, setPages] = (0, import_react21.useState)([]);
4778
- const [isMeasuring, setIsMeasuring] = (0, import_react21.useState)(true);
4779
- const [globalFilter, setGlobalFilter] = (0, import_react21.useState)("");
4780
- const [currentPageIndex, setCurrentPageIndex] = (0, import_react21.useState)(0);
4781
- const [pageSearch, setPageSearch] = (0, import_react21.useState)("");
4991
+ const measureContainerRef = (0, import_react23.useRef)(null);
4992
+ const [pages, setPages] = (0, import_react23.useState)([]);
4993
+ const [isMeasuring, setIsMeasuring] = (0, import_react23.useState)(true);
4994
+ const [globalFilter, setGlobalFilter] = (0, import_react23.useState)("");
4995
+ const [currentPageIndex, setCurrentPageIndex] = (0, import_react23.useState)(0);
4996
+ const [pageSearch, setPageSearch] = (0, import_react23.useState)("");
4782
4997
  const displayColumnsForSearch = columns.filter((col) => !col.hide);
4783
4998
  const filteredDisplayData = data.filter((row) => {
4784
4999
  if (!globalFilter) return true;
@@ -4794,20 +5009,20 @@ var useA4StatementView = ({
4794
5009
  const columnsWithFooters = columns.filter(
4795
5010
  (col) => col.renderFooter && !col.hide
4796
5011
  );
4797
- const DisplayFinalTotalEl = columnsWithFooters.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
5012
+ const DisplayFinalTotalEl = columnsWithFooters.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
4798
5013
  "div",
4799
5014
  {
4800
5015
  id: "a4-final-total",
4801
5016
  className: "mt-6 flex flex-wrap justify-end items-center pt-4 border-t border-black dark:border-zinc-700 print:border-black gap-4",
4802
5017
  children: [
4803
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "text-black dark:text-white print:text-black font-bold uppercase tracking-widest text-xs mr-auto", children: "Grand Totals" }),
4804
- columnsWithFooters.map((col, idx) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
5018
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "text-black dark:text-white print:text-black font-bold uppercase tracking-widest text-xs mr-auto", children: "Grand Totals" }),
5019
+ columnsWithFooters.map((col, idx) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
4805
5020
  "div",
4806
5021
  {
4807
5022
  className: "flex items-center gap-3 px-4 py-2 rounded-md border border-black dark:border-zinc-700 print:border-black",
4808
5023
  children: [
4809
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-black dark:text-white print:text-black font-bold uppercase tracking-widest text-xs", children: typeof col.header === "string" ? col.header : typeof col.key === "string" ? col.key : "Total" }),
4810
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "text-base font-bold font-sans tabular-nums text-black dark:text-white print:text-black", children: col.renderFooter(filteredDisplayData) })
5024
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-black dark:text-white print:text-black font-bold uppercase tracking-widest text-xs", children: typeof col.header === "string" ? col.header : typeof col.key === "string" ? col.key : "Total" }),
5025
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "text-base font-bold font-sans tabular-nums text-black dark:text-white print:text-black", children: col.renderFooter(filteredDisplayData) })
4811
5026
  ]
4812
5027
  },
4813
5028
  col.key || idx
@@ -4823,7 +5038,7 @@ var useA4StatementView = ({
4823
5038
  renderFooter: c.renderFooter ? c.renderFooter.toString() : ""
4824
5039
  }))
4825
5040
  });
4826
- (0, import_react21.useEffect)(() => {
5041
+ (0, import_react23.useEffect)(() => {
4827
5042
  if (filteredDisplayData && filteredDisplayData.length > 0) {
4828
5043
  setIsMeasuring(true);
4829
5044
  setPages((prev) => prev.length === 0 ? [[]] : prev);
@@ -4838,7 +5053,7 @@ var useA4StatementView = ({
4838
5053
  setCurrentPageIndex(0);
4839
5054
  }
4840
5055
  }, [depsString]);
4841
- (0, import_react21.useEffect)(() => {
5056
+ (0, import_react23.useEffect)(() => {
4842
5057
  if (!isMeasuring || filteredDisplayData.length === 0) return;
4843
5058
  const timer = setTimeout(() => {
4844
5059
  if (!measureContainerRef.current) return;
@@ -4894,28 +5109,28 @@ var useA4StatementView = ({
4894
5109
  }, 150);
4895
5110
  return () => clearTimeout(timer);
4896
5111
  }, [isMeasuring, depsString]);
4897
- const HeaderEl = /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
5112
+ const HeaderEl = /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
4898
5113
  "div",
4899
5114
  {
4900
5115
  className: "flex justify-between items-start mb-5 px-8 pt-8",
4901
5116
  id: "a4-header-section",
4902
5117
  children: [
4903
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex items-center gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("section", { children: [
4904
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h1", { className: "text-4xl font-bold text-blue-600 dark:text-blue-500 print:text-blue-600 tracking-tight uppercase", children: title }),
4905
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-gray-500 dark:text-gray-400 print:text-gray-500 mt-1 uppercase text-xs font-semibold tracking-wider", children: subtitle })
5118
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex items-center gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("section", { children: [
5119
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("h1", { className: "text-4xl font-bold text-blue-600 dark:text-blue-500 print:text-blue-600 tracking-tight uppercase", children: title }),
5120
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-gray-500 dark:text-gray-400 print:text-gray-500 mt-1 uppercase text-xs font-semibold tracking-wider", children: subtitle })
4906
5121
  ] }) }) }),
4907
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "text-right", children: [
4908
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h2", { className: "text-lg font-bold text-gray-800 dark:text-gray-100 print:text-gray-800", children: store?.name }),
4909
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "text-sm text-gray-500 dark:text-gray-400 print:text-gray-500 leading-relaxed text-right flex flex-col items-end", children: [
4910
- store?.address && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "whitespace-pre-line", children: store.address }),
4911
- store?.phone && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: store.phone }),
4912
- store?.email && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: store.email })
5122
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "text-right", children: [
5123
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("h2", { className: "text-lg font-bold text-gray-800 dark:text-gray-100 print:text-gray-800", children: store?.name }),
5124
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "text-sm text-gray-500 dark:text-gray-400 print:text-gray-500 leading-relaxed text-right flex flex-col items-end", children: [
5125
+ store?.address && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "whitespace-pre-line", children: store.address }),
5126
+ store?.phone && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: store.phone }),
5127
+ store?.email && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: store.email })
4913
5128
  ] })
4914
5129
  ] })
4915
5130
  ]
4916
5131
  }
4917
5132
  );
4918
- const DisplayInfoGridEl = Array.isArray(info) && info.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { id: "a4-info-grid", className: "px-8", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5133
+ const DisplayInfoGridEl = Array.isArray(info) && info.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { id: "a4-info-grid", className: "px-8", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4919
5134
  InfoGrid,
4920
5135
  {
4921
5136
  className: "mb-4",
@@ -4923,29 +5138,29 @@ var useA4StatementView = ({
4923
5138
  isLoading: isActuallyLoading
4924
5139
  }
4925
5140
  ) }) : null;
4926
- const statusOverlay = isActuallyLoading || error || !data || data.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex flex-col relative w-full items-center justify-center py-12 min-h-[400px]", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col items-center justify-center p-8 bg-gray-50/50 dark:bg-zinc-900/30 rounded-2xl border border-dashed border-gray-300 dark:border-zinc-700 w-full max-w-lg text-center shadow-sm", children: [
4927
- isActuallyLoading ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ClassicSpin, {}) }) : error ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "w-14 h-14 bg-red-100 dark:bg-red-500/10 rounded-full flex items-center justify-center mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react13.AlertCircle, { className: "w-7 h-7 text-red-600 dark:text-red-500" }) }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "w-14 h-14 bg-gray-200 dark:bg-zinc-800 rounded-full flex items-center justify-center mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react13.FileX, { className: "w-7 h-7 text-gray-500 dark:text-gray-400" }) }),
4928
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h3", { className: "text-lg font-bold text-gray-900 dark:text-white mb-2", children: isActuallyLoading ? "Loading data..." : error ? "Failed to Load Statement" : "No Records Found" }),
4929
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-sm text-gray-500 dark:text-gray-400 max-w-xs mb-6 leading-relaxed", children: isActuallyLoading ? "Please wait while we prepare your statement." : error ? typeof error === "string" ? error : "An unexpected error occurred while fetching the statement data." : "There are no transactions or records available in this requested statement." }),
4930
- url && !isActuallyLoading && /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
5141
+ const statusOverlay = isActuallyLoading || error || !data || data.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex flex-col relative w-full items-center justify-center py-12 min-h-[400px]", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col items-center justify-center p-8 bg-gray-50/50 dark:bg-zinc-900/30 rounded-2xl border border-dashed border-gray-300 dark:border-zinc-700 w-full max-w-lg text-center shadow-sm", children: [
5142
+ isActuallyLoading ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ClassicSpin, {}) }) : error ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "w-14 h-14 bg-red-100 dark:bg-red-500/10 rounded-full flex items-center justify-center mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react15.AlertCircle, { className: "w-7 h-7 text-red-600 dark:text-red-500" }) }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "w-14 h-14 bg-gray-200 dark:bg-zinc-800 rounded-full flex items-center justify-center mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react15.FileX, { className: "w-7 h-7 text-gray-500 dark:text-gray-400" }) }),
5143
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("h3", { className: "text-lg font-bold text-gray-900 dark:text-white mb-2", children: isActuallyLoading ? "Loading data..." : error ? "Failed to Load Statement" : "No Records Found" }),
5144
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-sm text-gray-500 dark:text-gray-400 max-w-xs mb-6 leading-relaxed", children: isActuallyLoading ? "Please wait while we prepare your statement." : error ? typeof error === "string" ? error : "An unexpected error occurred while fetching the statement data." : "There are no transactions or records available in this requested statement." }),
5145
+ url && !isActuallyLoading && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
4931
5146
  "button",
4932
5147
  {
4933
5148
  onClick: () => getData(),
4934
5149
  className: "flex items-center gap-2 px-5 py-2 bg-black dark:bg-white text-white dark:text-black font-semibold rounded-lg shadow-md hover:bg-gray-800 dark:hover:bg-gray-100 transition-all active:scale-95 text-sm",
4935
5150
  children: [
4936
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react13.RefreshCw, { size: 14 }),
5151
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react15.RefreshCw, { size: 14 }),
4937
5152
  "Try Again"
4938
5153
  ]
4939
5154
  }
4940
5155
  )
4941
5156
  ] }) }) : null;
4942
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col relative w-full items-center", children: [
4943
- isMeasuring && filteredDisplayData.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "absolute top-0 opacity-0 pointer-events-none -left-full", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5157
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col relative w-full items-center", children: [
5158
+ isMeasuring && filteredDisplayData.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "absolute top-0 opacity-0 pointer-events-none -left-full", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4944
5159
  "div",
4945
5160
  {
4946
5161
  style: { width: "210mm", boxSizing: "border-box" },
4947
5162
  className: "bg-white",
4948
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
5163
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
4949
5164
  "div",
4950
5165
  {
4951
5166
  ref: measureContainerRef,
@@ -4953,9 +5168,9 @@ var useA4StatementView = ({
4953
5168
  children: [
4954
5169
  HeaderEl,
4955
5170
  DisplayInfoGridEl,
4956
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "grow w-full px-8 pb-8", children: [
4957
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "mb-4 border-b border-gray-200 dark:border-zinc-800 print:border-gray-200 pb-2 flex items-center gap-2 justify-between px-2 mt-2", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h3", { className: "text-sm font-bold text-gray-800 dark:text-gray-100 print:text-gray-800 uppercase tracking-wide shrink-0", children: tableTitle }) }),
4958
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5171
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "grow w-full px-8 pb-8", children: [
5172
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "mb-4 border-b border-gray-200 dark:border-zinc-800 print:border-gray-200 pb-2 flex items-center gap-2 justify-between px-2 mt-2", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("h3", { className: "text-sm font-bold text-gray-800 dark:text-gray-100 print:text-gray-800 uppercase tracking-wide shrink-0", children: tableTitle }) }),
5173
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4959
5174
  SimpleTable,
4960
5175
  {
4961
5176
  columns,
@@ -4973,52 +5188,52 @@ var useA4StatementView = ({
4973
5188
  )
4974
5189
  }
4975
5190
  ) }),
4976
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "py-2 px-0 md:px-4 w-full", ref: contentRef, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex flex-col gap-8 print:block print:gap-0 w-full items-center", children: pages.map((pageData, pageIndex) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5191
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "py-2 px-0 md:px-4 w-full", ref: contentRef, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex flex-col gap-8 print:block print:gap-0 w-full items-center", children: pages.map((pageData, pageIndex) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4977
5192
  "div",
4978
5193
  {
4979
5194
  className: pageIndex === currentPageIndex ? "w-full" : "hidden print:block w-full",
4980
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5195
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4981
5196
  PageA4,
4982
5197
  {
4983
5198
  className: "w-full",
4984
5199
  pageNumber: pageIndex + 1,
4985
5200
  totalPages: pages.length,
4986
5201
  isLastPage: pageIndex === pages.length - 1,
4987
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col h-full grow w-full", children: [
4988
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("header", { className: "flex justify-between gap-2 items-center px-8 pt-4 print:hidden", children: [
5202
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col h-full grow w-full", children: [
5203
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("header", { className: "flex justify-between gap-2 items-center px-8 pt-4 print:hidden", children: [
4989
5204
  headers,
4990
- printable && pageIndex === currentPageIndex && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex items-center justify-end ", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex items-center gap-2", children: [
4991
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
5205
+ printable && pageIndex === currentPageIndex && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex items-center justify-end ", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-2", children: [
5206
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
4992
5207
  "button",
4993
5208
  {
4994
5209
  onClick: async () => await getData(),
4995
5210
  disabled: isLoading,
4996
5211
  className: "flex items-center gap-2 px-3 py-1.5 text-gray-600 dark:text-gray-300 hover:text-black dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-800 rounded-lg transition-all disabled:opacity-50",
4997
5212
  children: [
4998
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4999
- import_lucide_react13.RefreshCw,
5213
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5214
+ import_lucide_react15.RefreshCw,
5000
5215
  {
5001
5216
  size: 16,
5002
5217
  className: isLoading ? "animate-spin" : ""
5003
5218
  }
5004
5219
  ),
5005
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-xs font-semibold", children: "Reload" })
5220
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-xs font-semibold", children: "Reload" })
5006
5221
  ]
5007
5222
  }
5008
5223
  ),
5009
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
5224
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
5010
5225
  "button",
5011
5226
  {
5012
5227
  onClick: () => reactToPrintFn(),
5013
5228
  className: "flex items-center gap-2 px-4 py-1.5 bg-black dark:bg-zinc-800 text-white rounded-md text-xs font-bold shadow-sm hover:bg-zinc-800 dark:hover:bg-zinc-700 transition-all active:scale-95",
5014
5229
  children: [
5015
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react13.Printer, { size: 16 }),
5230
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react15.Printer, { size: 16 }),
5016
5231
  "Print"
5017
5232
  ]
5018
5233
  }
5019
5234
  ),
5020
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex items-center gap-1.5 ml-2 pl-2 border-l border-gray-200 dark:border-zinc-700", children: [
5021
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5235
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-1.5 ml-2 pl-2 border-l border-gray-200 dark:border-zinc-700", children: [
5236
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5022
5237
  "button",
5023
5238
  {
5024
5239
  onClick: (e) => {
@@ -5029,11 +5244,11 @@ var useA4StatementView = ({
5029
5244
  },
5030
5245
  disabled: currentPageIndex === 0,
5031
5246
  className: "p-1 rounded hover:bg-gray-100 dark:hover:bg-zinc-800 disabled:opacity-30 transition-colors text-gray-600 dark:text-gray-400",
5032
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react13.ChevronLeft, { size: 18 })
5247
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react15.ChevronLeft, { size: 18 })
5033
5248
  }
5034
5249
  ),
5035
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex items-center gap-1 text-[11px] font-bold tabular-nums", children: [
5036
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
5250
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-1 text-[11px] font-bold tabular-nums", children: [
5251
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
5037
5252
  Select,
5038
5253
  {
5039
5254
  value: currentPageIndex + 1,
@@ -5046,9 +5261,9 @@ var useA4StatementView = ({
5046
5261
  variant: "ghost",
5047
5262
  containerClassName: "inline-block",
5048
5263
  children: [
5049
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SelectTrigger, { className: "h-7 px-2 min-w-[40px] border border-gray-200 dark:border-zinc-700 rounded flex items-center justify-center bg-white dark:bg-zinc-900 hover:bg-gray-100 dark:hover:bg-zinc-800 transition-colors", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-gray-900 dark:text-white", children: currentPageIndex + 1 }) }),
5050
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(SelectContent, { className: "min-w-[100px] max-h-64 overflow-y-auto p-0", children: [
5051
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "p-2 border-b border-gray-100 dark:border-zinc-800 sticky top-0 bg-white dark:bg-zinc-950 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5264
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SelectTrigger, { className: "h-7 px-2 min-w-[40px] border border-gray-200 dark:border-zinc-700 rounded flex items-center justify-center bg-white dark:bg-zinc-900 hover:bg-gray-100 dark:hover:bg-zinc-800 transition-colors", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-gray-900 dark:text-white", children: currentPageIndex + 1 }) }),
5265
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(SelectContent, { className: "min-w-[100px] max-h-64 overflow-y-auto p-0", children: [
5266
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "p-2 border-b border-gray-100 dark:border-zinc-800 sticky top-0 bg-white dark:bg-zinc-950 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5052
5267
  "input",
5053
5268
  {
5054
5269
  type: "text",
@@ -5060,17 +5275,17 @@ var useA4StatementView = ({
5060
5275
  autoFocus: true
5061
5276
  }
5062
5277
  ) }),
5063
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "p-1", children: pages.map((_, i) => i + 1).filter(
5278
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "p-1", children: pages.map((_, i) => i + 1).filter(
5064
5279
  (p) => String(p).includes(pageSearch)
5065
- ).map((p) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SelectItem, { value: p, children: p }, p)) })
5280
+ ).map((p) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SelectItem, { value: p, children: p }, p)) })
5066
5281
  ] })
5067
5282
  ]
5068
5283
  }
5069
5284
  ),
5070
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-gray-400 mx-0.5", children: "/" }),
5071
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-gray-600 dark:text-gray-400", children: pages.length })
5285
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-gray-400 mx-0.5", children: "/" }),
5286
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-gray-600 dark:text-gray-400", children: pages.length })
5072
5287
  ] }),
5073
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5288
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5074
5289
  "button",
5075
5290
  {
5076
5291
  onClick: (e) => {
@@ -5081,7 +5296,7 @@ var useA4StatementView = ({
5081
5296
  },
5082
5297
  disabled: currentPageIndex === pages.length - 1,
5083
5298
  className: "p-1 rounded hover:bg-gray-100 dark:hover:bg-zinc-800 disabled:opacity-30 transition-colors text-gray-600 dark:text-gray-400",
5084
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react13.ChevronRight, { size: 18 })
5299
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react15.ChevronRight, { size: 18 })
5085
5300
  }
5086
5301
  )
5087
5302
  ] })
@@ -5089,10 +5304,10 @@ var useA4StatementView = ({
5089
5304
  ] }),
5090
5305
  pageIndex === 0 && HeaderEl,
5091
5306
  pageIndex === 0 && DisplayInfoGridEl,
5092
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "grow w-full px-8 pb-8", children: [
5093
- pageIndex === 0 && /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "mb-4 border-b border-gray-200 dark:border-zinc-700 print:border-gray-200 pb-2 flex items-center gap-2 justify-between px-2 mt-2 print:hidden", children: [
5094
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h3", { className: "text-sm font-bold text-gray-800 dark:text-gray-100 print:text-gray-800 uppercase tracking-wide shrink-0", children: tableTitle }),
5095
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5307
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "grow w-full px-8 pb-8", children: [
5308
+ pageIndex === 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "mb-4 border-b border-gray-200 dark:border-zinc-700 print:border-gray-200 pb-2 flex items-center gap-2 justify-between px-2 mt-2 print:hidden", children: [
5309
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("h3", { className: "text-sm font-bold text-gray-800 dark:text-gray-100 print:text-gray-800 uppercase tracking-wide shrink-0", children: tableTitle }),
5310
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5096
5311
  "input",
5097
5312
  {
5098
5313
  type: "text",
@@ -5103,9 +5318,9 @@ var useA4StatementView = ({
5103
5318
  }
5104
5319
  )
5105
5320
  ] }),
5106
- pageIndex === 0 && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "hidden print:flex mb-4 border-b border-gray-200 print:border-gray-200 pb-2 items-center gap-2 justify-between px-2 mt-2", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h3", { className: "text-sm font-bold text-gray-800 print:text-gray-800 uppercase tracking-wide shrink-0", children: tableTitle }) }),
5107
- pageIndex > 0 && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "h-7 print:h-0" }),
5108
- statusOverlay ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "px-8 pb-8", children: statusOverlay }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5321
+ pageIndex === 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "hidden print:flex mb-4 border-b border-gray-200 print:border-gray-200 pb-2 items-center gap-2 justify-between px-2 mt-2", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("h3", { className: "text-sm font-bold text-gray-800 print:text-gray-800 uppercase tracking-wide shrink-0", children: tableTitle }) }),
5322
+ pageIndex > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "h-7 print:h-0" }),
5323
+ statusOverlay ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "px-8 pb-8", children: statusOverlay }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5109
5324
  SimpleTable,
5110
5325
  {
5111
5326
  columns,
@@ -5141,10 +5356,10 @@ var useA4StatementView = ({
5141
5356
  var useA4DataView_default = useA4StatementView;
5142
5357
 
5143
5358
  // src/hooks/Fetches/useA4CategoryView.tsx
5144
- var import_react22 = require("react");
5359
+ var import_react24 = require("react");
5145
5360
  var import_react_to_print2 = require("react-to-print");
5146
- var import_lucide_react14 = require("lucide-react");
5147
- var import_jsx_runtime32 = require("react/jsx-runtime");
5361
+ var import_lucide_react16 = require("lucide-react");
5362
+ var import_jsx_runtime34 = require("react/jsx-runtime");
5148
5363
  var useA4CategoryView = ({
5149
5364
  url,
5150
5365
  v = 1,
@@ -5153,7 +5368,7 @@ var useA4CategoryView = ({
5153
5368
  startPage = 1
5154
5369
  } = {}) => {
5155
5370
  const { data: apiData, isLoading, get, error: apiError } = useApis_default();
5156
- const contentRef = (0, import_react22.useRef)(null);
5371
+ const contentRef = (0, import_react24.useRef)(null);
5157
5372
  const reactToPrintFn = (0, import_react_to_print2.useReactToPrint)({
5158
5373
  contentRef
5159
5374
  });
@@ -5162,7 +5377,7 @@ var useA4CategoryView = ({
5162
5377
  await get({ url, v, params, delay });
5163
5378
  }
5164
5379
  };
5165
- (0, import_react22.useEffect)(() => {
5380
+ (0, import_react24.useEffect)(() => {
5166
5381
  getData();
5167
5382
  }, [url, v, JSON.stringify(params), delay]);
5168
5383
  const A4CategoryView = ({
@@ -5181,12 +5396,12 @@ var useA4CategoryView = ({
5181
5396
  }) => {
5182
5397
  const { store } = useWarqadConfig();
5183
5398
  const isActuallyLoading = externalLoading ?? isLoading;
5184
- const measureContainerRef = (0, import_react22.useRef)(null);
5185
- const [pages, setPages] = (0, import_react22.useState)([]);
5186
- const [isMeasuring, setIsMeasuring] = (0, import_react22.useState)(true);
5187
- const [globalFilter, setGlobalFilter] = (0, import_react22.useState)("");
5188
- const [currentPageIndex, setCurrentPageIndex] = (0, import_react22.useState)(0);
5189
- const [pageSearch, setPageSearch] = (0, import_react22.useState)("");
5399
+ const measureContainerRef = (0, import_react24.useRef)(null);
5400
+ const [pages, setPages] = (0, import_react24.useState)([]);
5401
+ const [isMeasuring, setIsMeasuring] = (0, import_react24.useState)(true);
5402
+ const [globalFilter, setGlobalFilter] = (0, import_react24.useState)("");
5403
+ const [currentPageIndex, setCurrentPageIndex] = (0, import_react24.useState)(0);
5404
+ const [pageSearch, setPageSearch] = (0, import_react24.useState)("");
5190
5405
  const groups = incomingGroups ? [...incomingGroups].sort(
5191
5406
  (a, b) => a.title.localeCompare(b.title)
5192
5407
  ) : data ? [{ title: gridTitle, items: data }] : [];
@@ -5217,7 +5432,7 @@ var useA4CategoryView = ({
5217
5432
  gridColumns,
5218
5433
  globalFilter
5219
5434
  });
5220
- (0, import_react22.useEffect)(() => {
5435
+ (0, import_react24.useEffect)(() => {
5221
5436
  if (flattenedNodes.length > 0) {
5222
5437
  setIsMeasuring(true);
5223
5438
  setPages((prev) => prev.length === 0 ? [[]] : prev);
@@ -5230,7 +5445,7 @@ var useA4CategoryView = ({
5230
5445
  setCurrentPageIndex(0);
5231
5446
  }
5232
5447
  }, [depsString]);
5233
- (0, import_react22.useEffect)(() => {
5448
+ (0, import_react24.useEffect)(() => {
5234
5449
  if (!isMeasuring || flattenedNodes.length === 0) return;
5235
5450
  const timer = setTimeout(() => {
5236
5451
  if (!measureContainerRef.current) return;
@@ -5269,28 +5484,28 @@ var useA4CategoryView = ({
5269
5484
  }, 150);
5270
5485
  return () => clearTimeout(timer);
5271
5486
  }, [isMeasuring, depsString]);
5272
- const HeaderEl = /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
5487
+ const HeaderEl = /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
5273
5488
  "div",
5274
5489
  {
5275
5490
  className: "flex justify-between items-start mb-5 px-8 pt-8",
5276
5491
  id: "a4-header-section",
5277
5492
  children: [
5278
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex items-center gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("section", { children: [
5279
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("h1", { className: "text-4xl font-black text-black dark:text-white print:text-black tracking-tighter uppercase", children: title }),
5280
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-gray-600 dark:text-gray-400 print:text-gray-600 mt-1 uppercase text-xs font-bold tracking-widest", children: subtitle })
5493
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex items-center gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("section", { children: [
5494
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("h1", { className: "text-4xl font-black text-black dark:text-white print:text-black tracking-tighter uppercase", children: title }),
5495
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-gray-600 dark:text-gray-400 print:text-gray-600 mt-1 uppercase text-xs font-bold tracking-widest", children: subtitle })
5281
5496
  ] }) }) }),
5282
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "text-right", children: [
5283
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("h2", { className: "text-lg font-black text-black dark:text-white print:text-black uppercase tracking-tight", children: store?.name }),
5284
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "text-sm text-gray-600 dark:text-gray-400 print:text-gray-600 leading-relaxed text-right flex flex-col items-end font-medium", children: [
5285
- store?.address && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "whitespace-pre-line", children: store.address }),
5286
- store?.phone && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: store.phone }),
5287
- store?.email && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: store.email })
5497
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "text-right", children: [
5498
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("h2", { className: "text-lg font-black text-black dark:text-white print:text-black uppercase tracking-tight", children: store?.name }),
5499
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "text-sm text-gray-600 dark:text-gray-400 print:text-gray-600 leading-relaxed text-right flex flex-col items-end font-medium", children: [
5500
+ store?.address && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "whitespace-pre-line", children: store.address }),
5501
+ store?.phone && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: store.phone }),
5502
+ store?.email && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: store.email })
5288
5503
  ] })
5289
5504
  ] })
5290
5505
  ]
5291
5506
  }
5292
5507
  );
5293
- const DisplayInfoGridEl = Array.isArray(info) && info.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { id: "a4-info-grid", className: "px-8", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5508
+ const DisplayInfoGridEl = Array.isArray(info) && info.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { id: "a4-info-grid", className: "px-8", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
5294
5509
  InfoGrid,
5295
5510
  {
5296
5511
  className: "mb-4",
@@ -5300,40 +5515,40 @@ var useA4CategoryView = ({
5300
5515
  ) }) : null;
5301
5516
  const renderNode = (node) => {
5302
5517
  if (node.type === "header") {
5303
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "mb-4 border-b border-black print:border-black pb-2 flex items-center gap-2 justify-between px-2 mt-4", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("h3", { className: "text-sm font-black text-black dark:text-white print:text-black uppercase tracking-[0.2em]", children: node.title }) });
5518
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "mb-4 border-b border-black print:border-black pb-2 flex items-center gap-2 justify-between px-2 mt-4", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("h3", { className: "text-sm font-black text-black dark:text-white print:text-black uppercase tracking-[0.2em]", children: node.title }) });
5304
5519
  }
5305
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5520
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
5306
5521
  "div",
5307
5522
  {
5308
5523
  className: "grid gap-4 px-2",
5309
5524
  style: { gridTemplateColumns: `repeat(${gridColumns}, 1fr)` },
5310
- children: node.items.map((item, j) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { children: renderItem(item) }, j))
5525
+ children: node.items.map((item, j) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { children: renderItem(item) }, j))
5311
5526
  }
5312
5527
  );
5313
5528
  };
5314
- const statusOverlay = isActuallyLoading || error || flattenedNodes.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex flex-col relative w-full items-center justify-center py-12 min-h-[400px]", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col items-center justify-center p-8 bg-gray-50/50 dark:bg-zinc-900/30 rounded-2xl border border-dashed border-gray-300 dark:border-zinc-700 w-full max-w-lg text-center shadow-sm", children: [
5315
- isActuallyLoading ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ClassicSpin, {}) }) : error ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "w-14 h-14 bg-red-100 dark:bg-red-500/10 rounded-full flex items-center justify-center mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react14.AlertCircle, { className: "w-7 h-7 text-red-600 dark:text-red-500" }) }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "w-14 h-14 bg-gray-200 dark:bg-zinc-800 rounded-full flex items-center justify-center mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react14.FileX, { className: "w-7 h-7 text-gray-500 dark:text-gray-400" }) }),
5316
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("h3", { className: "text-lg font-bold text-gray-900 dark:text-white mb-2", children: isActuallyLoading ? "Loading data..." : error ? "Failed to Load Report" : "No Records Found" }),
5317
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-sm text-gray-500 dark:text-gray-400 max-w-xs mb-6 leading-relaxed", children: isActuallyLoading ? "Please wait while we prepare your report." : error ? typeof error === "string" ? error : "An unexpected error occurred while fetching the data." : "There are no items available in this requested report." }),
5318
- url && !isActuallyLoading && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
5529
+ const statusOverlay = isActuallyLoading || error || flattenedNodes.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex flex-col relative w-full items-center justify-center py-12 min-h-[400px]", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col items-center justify-center p-8 bg-gray-50/50 dark:bg-zinc-900/30 rounded-2xl border border-dashed border-gray-300 dark:border-zinc-700 w-full max-w-lg text-center shadow-sm", children: [
5530
+ isActuallyLoading ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ClassicSpin, {}) }) : error ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-14 h-14 bg-red-100 dark:bg-red-500/10 rounded-full flex items-center justify-center mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react16.AlertCircle, { className: "w-7 h-7 text-red-600 dark:text-red-500" }) }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-14 h-14 bg-gray-200 dark:bg-zinc-800 rounded-full flex items-center justify-center mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react16.FileX, { className: "w-7 h-7 text-gray-500 dark:text-gray-400" }) }),
5531
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("h3", { className: "text-lg font-bold text-gray-900 dark:text-white mb-2", children: isActuallyLoading ? "Loading data..." : error ? "Failed to Load Report" : "No Records Found" }),
5532
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-sm text-gray-500 dark:text-gray-400 max-w-xs mb-6 leading-relaxed", children: isActuallyLoading ? "Please wait while we prepare your report." : error ? typeof error === "string" ? error : "An unexpected error occurred while fetching the data." : "There are no items available in this requested report." }),
5533
+ url && !isActuallyLoading && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
5319
5534
  "button",
5320
5535
  {
5321
5536
  onClick: () => getData(),
5322
5537
  className: "flex items-center gap-2 px-5 py-2 bg-black dark:bg-white text-white dark:text-black font-semibold rounded-lg shadow-md hover:bg-gray-800 dark:hover:bg-gray-100 transition-all active:scale-95 text-sm",
5323
5538
  children: [
5324
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react14.RefreshCw, { size: 14 }),
5539
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react16.RefreshCw, { size: 14 }),
5325
5540
  "Try Again"
5326
5541
  ]
5327
5542
  }
5328
5543
  )
5329
5544
  ] }) }) : null;
5330
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col relative w-full items-center", children: [
5331
- isMeasuring && flattenedNodes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "absolute top-0 opacity-0 pointer-events-none -left-full", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5545
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col relative w-full items-center", children: [
5546
+ isMeasuring && flattenedNodes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "absolute top-0 opacity-0 pointer-events-none -left-full", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
5332
5547
  "div",
5333
5548
  {
5334
5549
  style: { width: "210mm", boxSizing: "border-box" },
5335
5550
  className: "bg-white",
5336
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
5551
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
5337
5552
  "div",
5338
5553
  {
5339
5554
  ref: measureContainerRef,
@@ -5341,56 +5556,56 @@ var useA4CategoryView = ({
5341
5556
  children: [
5342
5557
  HeaderEl,
5343
5558
  DisplayInfoGridEl,
5344
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "grow w-full px-8 pb-8", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex flex-col gap-2", children: flattenedNodes.map((node, i) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "a4-measure-node", children: renderNode(node) }, i)) }) })
5559
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "grow w-full px-8 pb-8", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex flex-col gap-2", children: flattenedNodes.map((node, i) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "a4-measure-node", children: renderNode(node) }, i)) }) })
5345
5560
  ]
5346
5561
  }
5347
5562
  )
5348
5563
  }
5349
5564
  ) }),
5350
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "py-2 px-0 md:px-4 w-full", ref: contentRef, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex flex-col gap-8 print:block print:gap-0 w-full items-center", children: pages.map((pageNodes, pageIndex) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5565
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "py-2 px-0 md:px-4 w-full", ref: contentRef, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex flex-col gap-8 print:block print:gap-0 w-full items-center", children: pages.map((pageNodes, pageIndex) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
5351
5566
  "div",
5352
5567
  {
5353
5568
  className: pageIndex === currentPageIndex ? "w-full" : "hidden print:block w-full",
5354
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5569
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
5355
5570
  PageA4,
5356
5571
  {
5357
5572
  className: "w-full",
5358
5573
  pageNumber: pageIndex + 1,
5359
5574
  totalPages: pages.length,
5360
5575
  isLastPage: pageIndex === pages.length - 1,
5361
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col h-full grow w-full", children: [
5362
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("header", { className: "flex justify-between gap-2 items-center px-8 pt-4 print:hidden", children: printable && pageIndex === currentPageIndex && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex items-center gap-2", children: [
5363
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
5576
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col h-full grow w-full", children: [
5577
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("header", { className: "flex justify-between gap-2 items-center px-8 pt-4 print:hidden", children: printable && pageIndex === currentPageIndex && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-2", children: [
5578
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
5364
5579
  "button",
5365
5580
  {
5366
5581
  onClick: async () => await getData(),
5367
5582
  disabled: isLoading,
5368
5583
  className: "flex items-center gap-2 px-3 py-1.5 text-gray-600 dark:text-gray-300 hover:text-black dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-800 rounded-lg transition-all disabled:opacity-50",
5369
5584
  children: [
5370
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5371
- import_lucide_react14.RefreshCw,
5585
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
5586
+ import_lucide_react16.RefreshCw,
5372
5587
  {
5373
5588
  size: 16,
5374
5589
  className: isLoading ? "animate-spin" : ""
5375
5590
  }
5376
5591
  ),
5377
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-xs font-semibold", children: "Reload" })
5592
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-xs font-semibold", children: "Reload" })
5378
5593
  ]
5379
5594
  }
5380
5595
  ),
5381
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
5596
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
5382
5597
  "button",
5383
5598
  {
5384
5599
  onClick: () => reactToPrintFn(),
5385
5600
  className: "flex items-center gap-2 px-4 py-1.5 bg-black dark:bg-zinc-800 text-white rounded-md text-xs font-bold shadow-sm hover:bg-zinc-800 dark:hover:bg-zinc-700 transition-all active:scale-95",
5386
5601
  children: [
5387
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react14.Printer, { size: 16 }),
5602
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react16.Printer, { size: 16 }),
5388
5603
  "Print"
5389
5604
  ]
5390
5605
  }
5391
5606
  ),
5392
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex items-center gap-1.5 ml-2 pl-2 border-l border-gray-200 dark:border-zinc-700", children: [
5393
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5607
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-1.5 ml-2 pl-2 border-l border-gray-200 dark:border-zinc-700", children: [
5608
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
5394
5609
  "button",
5395
5610
  {
5396
5611
  onClick: (e) => {
@@ -5401,11 +5616,11 @@ var useA4CategoryView = ({
5401
5616
  },
5402
5617
  disabled: currentPageIndex === 0,
5403
5618
  className: "p-1 rounded hover:bg-gray-100 dark:hover:bg-zinc-800 disabled:opacity-30 transition-colors text-gray-600 dark:text-gray-400",
5404
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react14.ChevronLeft, { size: 18 })
5619
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react16.ChevronLeft, { size: 18 })
5405
5620
  }
5406
5621
  ),
5407
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex items-center gap-1 text-[11px] font-bold tabular-nums", children: [
5408
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
5622
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-1 text-[11px] font-bold tabular-nums", children: [
5623
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
5409
5624
  Select,
5410
5625
  {
5411
5626
  value: currentPageIndex + 1,
@@ -5418,9 +5633,9 @@ var useA4CategoryView = ({
5418
5633
  variant: "ghost",
5419
5634
  containerClassName: "inline-block",
5420
5635
  children: [
5421
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SelectTrigger, { className: "h-7 px-2 min-w-[40px] border border-gray-200 dark:border-zinc-700 rounded flex items-center justify-center bg-white dark:bg-zinc-900 hover:bg-gray-100 dark:hover:bg-zinc-800 transition-colors", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-gray-900 dark:text-white", children: currentPageIndex + 1 }) }),
5422
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(SelectContent, { className: "min-w-[100px] max-h-64 overflow-y-auto p-0", children: [
5423
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "p-2 border-b border-gray-100 dark:border-zinc-800 sticky top-0 bg-white dark:bg-zinc-950 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5636
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SelectTrigger, { className: "h-7 px-2 min-w-[40px] border border-gray-200 dark:border-zinc-700 rounded flex items-center justify-center bg-white dark:bg-zinc-900 hover:bg-gray-100 dark:hover:bg-zinc-800 transition-colors", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-gray-900 dark:text-white", children: currentPageIndex + 1 }) }),
5637
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(SelectContent, { className: "min-w-[100px] max-h-64 overflow-y-auto p-0", children: [
5638
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "p-2 border-b border-gray-100 dark:border-zinc-800 sticky top-0 bg-white dark:bg-zinc-950 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
5424
5639
  "input",
5425
5640
  {
5426
5641
  type: "text",
@@ -5432,17 +5647,17 @@ var useA4CategoryView = ({
5432
5647
  autoFocus: true
5433
5648
  }
5434
5649
  ) }),
5435
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "p-1", children: pages.map((_, i) => i + 1).filter(
5650
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "p-1", children: pages.map((_, i) => i + 1).filter(
5436
5651
  (p) => String(p).includes(pageSearch)
5437
- ).map((p) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SelectItem, { value: p, children: p }, p)) })
5652
+ ).map((p) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SelectItem, { value: p, children: p }, p)) })
5438
5653
  ] })
5439
5654
  ]
5440
5655
  }
5441
5656
  ),
5442
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-gray-400 mx-0.5", children: "/" }),
5443
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-gray-600 dark:text-gray-400", children: pages.length })
5657
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-gray-400 mx-0.5", children: "/" }),
5658
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-gray-600 dark:text-gray-400", children: pages.length })
5444
5659
  ] }),
5445
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5660
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
5446
5661
  "button",
5447
5662
  {
5448
5663
  onClick: (e) => {
@@ -5453,15 +5668,15 @@ var useA4CategoryView = ({
5453
5668
  },
5454
5669
  disabled: currentPageIndex === pages.length - 1,
5455
5670
  className: "p-1 rounded hover:bg-gray-100 dark:hover:bg-zinc-800 disabled:opacity-30 transition-colors text-gray-600 dark:text-gray-400",
5456
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react14.ChevronRight, { size: 18 })
5671
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react16.ChevronRight, { size: 18 })
5457
5672
  }
5458
5673
  )
5459
5674
  ] })
5460
5675
  ] }) }) }),
5461
5676
  pageIndex === 0 && HeaderEl,
5462
5677
  pageIndex === 0 && DisplayInfoGridEl,
5463
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "grow w-full px-8 pb-8", children: [
5464
- pageIndex === 0 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex items-center justify-end px-2 mt-2 print:hidden mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5678
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "grow w-full px-8 pb-8", children: [
5679
+ pageIndex === 0 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex items-center justify-end px-2 mt-2 print:hidden mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
5465
5680
  "input",
5466
5681
  {
5467
5682
  type: "text",
@@ -5471,8 +5686,8 @@ var useA4CategoryView = ({
5471
5686
  className: "block w-full max-w-xs px-3 py-2 border border-gray-300 rounded-md text-sm shadow-sm focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 dark:bg-zinc-900 dark:border-zinc-700 dark:text-white"
5472
5687
  }
5473
5688
  ) }),
5474
- pageIndex > 0 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "h-14 print:h-14" }),
5475
- statusOverlay ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "px-8 pb-8", children: statusOverlay }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex flex-col gap-2", children: pageNodes.map((node, i) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { children: renderNode(node) }, i)) })
5689
+ pageIndex > 0 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "h-14 print:h-14" }),
5690
+ statusOverlay ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "px-8 pb-8", children: statusOverlay }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex flex-col gap-2", children: pageNodes.map((node, i) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { children: renderNode(node) }, i)) })
5476
5691
  ] })
5477
5692
  ] })
5478
5693
  },
@@ -5494,10 +5709,10 @@ var useA4CategoryView = ({
5494
5709
  var useA4CategoryView_default = useA4CategoryView;
5495
5710
 
5496
5711
  // src/hooks/Fetches/useTransaction.tsx
5497
- var import_react23 = require("react");
5498
- var import_lucide_react15 = require("lucide-react");
5712
+ var import_react25 = require("react");
5713
+ var import_lucide_react17 = require("lucide-react");
5499
5714
  var import_moment = __toESM(require("moment"));
5500
- var import_jsx_runtime33 = require("react/jsx-runtime");
5715
+ var import_jsx_runtime35 = require("react/jsx-runtime");
5501
5716
  var useTransaction = ({
5502
5717
  url,
5503
5718
  v = 1,
@@ -5505,7 +5720,7 @@ var useTransaction = ({
5505
5720
  params = {},
5506
5721
  dateFilter = true
5507
5722
  }) => {
5508
- const [date, setDate] = (0, import_react23.useState)(
5723
+ const [date, setDate] = (0, import_react25.useState)(
5509
5724
  (0, import_moment.default)().format("DD/MM/YYYY")
5510
5725
  );
5511
5726
  const dateObj = {};
@@ -5522,7 +5737,7 @@ var useTransaction = ({
5522
5737
  delay
5523
5738
  });
5524
5739
  };
5525
- (0, import_react23.useEffect)(() => {
5740
+ (0, import_react25.useEffect)(() => {
5526
5741
  getData();
5527
5742
  }, [url, v, JSON.stringify(params), delay, date]);
5528
5743
  const TransactionViewComponent = ({
@@ -5545,25 +5760,26 @@ var useTransaction = ({
5545
5760
  className = "",
5546
5761
  title = "Untitled Transaction",
5547
5762
  description = "View your transactions",
5763
+ showReload = true,
5548
5764
  onCreate,
5549
5765
  createTitle = "Add New",
5550
5766
  ...rest
5551
5767
  }) => {
5552
- const emptyState = !isLoading && (error || !data || data.length === 0) ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5768
+ const emptyState = !isLoading && (error || !data || data.length === 0) ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
5553
5769
  "div",
5554
5770
  {
5555
5771
  className: `flex flex-col relative w-full items-center justify-center py-12 min-h-[300px] ${className}`,
5556
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col items-center justify-center p-8 bg-gray-50/50 dark:bg-zinc-900/30 rounded-2xl border border-dashed border-gray-300 dark:border-zinc-700 w-full max-w-lg text-center shadow-sm", children: [
5557
- error ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "w-14 h-14 bg-red-100 dark:bg-red-500/10 rounded-full flex items-center justify-center mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react15.AlertCircle, { className: "w-7 h-7 text-red-600 dark:text-red-500" }) }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "w-14 h-14 bg-gray-200 dark:bg-zinc-800 rounded-full flex items-center justify-center mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react15.FileX, { className: "w-7 h-7 text-gray-500 dark:text-gray-400" }) }),
5558
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("h3", { className: "text-lg font-bold text-gray-900 dark:text-white mb-2", children: error ? "Failed to Load Data" : "No Records Found" }),
5559
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-sm text-gray-500 dark:text-gray-400 max-w-xs mb-6 leading-relaxed", children: error ? typeof error === "string" ? error : "An unexpected error occurred while fetching the data." : "There are no transactions or records available to display here." }),
5560
- url && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
5772
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col items-center justify-center p-8 bg-gray-50/50 dark:bg-zinc-900/30 rounded-2xl border border-dashed border-gray-300 dark:border-zinc-700 w-full max-w-lg text-center shadow-sm", children: [
5773
+ error ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "w-14 h-14 bg-red-100 dark:bg-red-500/10 rounded-full flex items-center justify-center mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react17.AlertCircle, { className: "w-7 h-7 text-red-600 dark:text-red-500" }) }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "w-14 h-14 bg-gray-200 dark:bg-zinc-800 rounded-full flex items-center justify-center mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react17.FileX, { className: "w-7 h-7 text-gray-500 dark:text-gray-400" }) }),
5774
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h3", { className: "text-lg font-bold text-gray-900 dark:text-white mb-2", children: error ? "Failed to Load Data" : "No Records Found" }),
5775
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "text-sm text-gray-500 dark:text-gray-400 max-w-xs mb-6 leading-relaxed", children: error ? typeof error === "string" ? error : "An unexpected error occurred while fetching the data." : "There are no transactions or records available to display here." }),
5776
+ url && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
5561
5777
  "button",
5562
5778
  {
5563
5779
  onClick: () => getData(),
5564
5780
  className: "flex items-center gap-2 px-5 py-2 bg-black dark:bg-white text-white dark:text-black font-semibold rounded-lg shadow-md hover:bg-gray-800 dark:hover:bg-gray-100 transition-all active:scale-95 text-sm",
5565
5781
  children: [
5566
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react15.RefreshCw, { size: 14 }),
5782
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react17.RefreshCw, { size: 14 }),
5567
5783
  "Try Again"
5568
5784
  ]
5569
5785
  }
@@ -5571,14 +5787,14 @@ var useTransaction = ({
5571
5787
  ] })
5572
5788
  }
5573
5789
  ) : void 0;
5574
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Card, { children: [
5575
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Card.Header, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("header", { className: "flex items-center justify-between gap-4 py-2", children: [
5576
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "space-y-1", children: [
5577
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Card.Title, { children: title }),
5578
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Card.Description, { children: description })
5790
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Card, { children: [
5791
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Card.Header, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("header", { className: "flex items-center justify-between gap-4 py-2", children: [
5792
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "space-y-1", children: [
5793
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Card.Title, { children: title }),
5794
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Card.Description, { children: description })
5579
5795
  ] }),
5580
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("section", { className: "flex gap-2 items-center", children: [
5581
- dateFilter && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5796
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("section", { className: "flex gap-2 items-center", children: [
5797
+ dateFilter && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
5582
5798
  Fields_default.DateInput,
5583
5799
  {
5584
5800
  value: date,
@@ -5588,20 +5804,31 @@ var useTransaction = ({
5588
5804
  }
5589
5805
  }
5590
5806
  ),
5591
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5807
+ showReload && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
5808
+ Button,
5809
+ {
5810
+ size: "sm",
5811
+ variant: "outline",
5812
+ className: "rounded-md! px-3!",
5813
+ onClick: () => getData(),
5814
+ isLoading,
5815
+ icon: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react17.RefreshCw, { size: 16 })
5816
+ }
5817
+ ),
5818
+ onCreate && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
5592
5819
  Button,
5593
5820
  {
5594
5821
  size: "sm",
5595
5822
  className: "rounded-md!",
5596
5823
  onClick: onCreate,
5597
5824
  variant: "primary",
5598
- icon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react15.Plus, {}),
5825
+ icon: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react17.Plus, {}),
5599
5826
  children: createTitle
5600
5827
  }
5601
5828
  )
5602
5829
  ] })
5603
5830
  ] }) }),
5604
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Card.Content, { className: "space-y-6", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: `w-full ${className}`, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5831
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Card.Content, { className: "space-y-6", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: `w-full ${className}`, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
5605
5832
  DataTable,
5606
5833
  {
5607
5834
  columns,
@@ -5818,15 +6045,15 @@ var storage = {
5818
6045
  };
5819
6046
 
5820
6047
  // src/hooks/uploads/useAntdImageUpload.tsx
5821
- var import_react26 = require("react");
6048
+ var import_react28 = require("react");
5822
6049
 
5823
6050
  // ../../node_modules/@ant-design/icons/es/components/Context.js
5824
- var import_react24 = require("react");
5825
- var IconContext = /* @__PURE__ */ (0, import_react24.createContext)({});
6051
+ var import_react26 = require("react");
6052
+ var IconContext = /* @__PURE__ */ (0, import_react26.createContext)({});
5826
6053
  var Context_default = IconContext;
5827
6054
 
5828
6055
  // ../../node_modules/@ant-design/icons/es/components/AntdIcon.js
5829
- var React16 = __toESM(require("react"));
6056
+ var React18 = __toESM(require("react"));
5830
6057
  var import_clsx2 = require("clsx");
5831
6058
 
5832
6059
  // ../../node_modules/@ant-design/fast-color/es/presetColors.js
@@ -6673,7 +6900,7 @@ var greyDark = ["#151515", "#1f1f1f", "#2d2d2d", "#393939", "#494949", "#5a5a5a"
6673
6900
  greyDark.primary = greyDark[5];
6674
6901
 
6675
6902
  // ../../node_modules/@ant-design/icons/es/components/IconBase.js
6676
- var React15 = __toESM(require("react"));
6903
+ var React17 = __toESM(require("react"));
6677
6904
 
6678
6905
  // ../../node_modules/@rc-component/util/es/Dom/canUseDom.js
6679
6906
  function canUseDom() {
@@ -6829,17 +7056,17 @@ var preWarningFns = [];
6829
7056
  var preMessage = (fn) => {
6830
7057
  preWarningFns.push(fn);
6831
7058
  };
6832
- function warning(valid, message2) {
7059
+ function warning(valid, message4) {
6833
7060
  if (process.env.NODE_ENV !== "production" && !valid && console !== void 0) {
6834
- const finalMessage = preWarningFns.reduce((msg, preMessageFn) => preMessageFn(msg ?? "", "warning"), message2);
7061
+ const finalMessage = preWarningFns.reduce((msg, preMessageFn) => preMessageFn(msg ?? "", "warning"), message4);
6835
7062
  if (finalMessage) {
6836
7063
  console.error(`Warning: ${finalMessage}`);
6837
7064
  }
6838
7065
  }
6839
7066
  }
6840
- function note(valid, message2) {
7067
+ function note(valid, message4) {
6841
7068
  if (process.env.NODE_ENV !== "production" && !valid && console !== void 0) {
6842
- const finalMessage = preWarningFns.reduce((msg, preMessageFn) => preMessageFn(msg ?? "", "note"), message2);
7069
+ const finalMessage = preWarningFns.reduce((msg, preMessageFn) => preMessageFn(msg ?? "", "note"), message4);
6843
7070
  if (finalMessage) {
6844
7071
  console.warn(`Note: ${finalMessage}`);
6845
7072
  }
@@ -6848,29 +7075,29 @@ function note(valid, message2) {
6848
7075
  function resetWarned() {
6849
7076
  warned = {};
6850
7077
  }
6851
- function call(method, valid, message2) {
6852
- if (!valid && !warned[message2]) {
6853
- method(false, message2);
6854
- warned[message2] = true;
7078
+ function call(method, valid, message4) {
7079
+ if (!valid && !warned[message4]) {
7080
+ method(false, message4);
7081
+ warned[message4] = true;
6855
7082
  }
6856
7083
  }
6857
- function warningOnce(valid, message2) {
6858
- call(warning, valid, message2);
7084
+ function warningOnce(valid, message4) {
7085
+ call(warning, valid, message4);
6859
7086
  }
6860
- function noteOnce(valid, message2) {
6861
- call(note, valid, message2);
7087
+ function noteOnce(valid, message4) {
7088
+ call(note, valid, message4);
6862
7089
  }
6863
7090
  warningOnce.preMessage = preMessage;
6864
7091
  warningOnce.resetWarned = resetWarned;
6865
7092
  warningOnce.noteOnce = noteOnce;
6866
7093
 
6867
7094
  // ../../node_modules/@ant-design/icons/es/utils.js
6868
- var import_react25 = __toESM(require("react"));
7095
+ var import_react27 = __toESM(require("react"));
6869
7096
  function camelCase(input) {
6870
7097
  return input.replace(/-(.)/g, (match, g) => g.toUpperCase());
6871
7098
  }
6872
- function warning2(valid, message2) {
6873
- warningOnce(valid, `[@ant-design/icons] ${message2}`);
7099
+ function warning2(valid, message4) {
7100
+ warningOnce(valid, `[@ant-design/icons] ${message4}`);
6874
7101
  }
6875
7102
  function isIconDefinition(target) {
6876
7103
  return typeof target === "object" && typeof target.name === "string" && typeof target.theme === "string" && (typeof target.icon === "object" || typeof target.icon === "function");
@@ -6892,12 +7119,12 @@ function normalizeAttrs(attrs = {}) {
6892
7119
  }
6893
7120
  function generate2(node, key, rootProps) {
6894
7121
  if (!rootProps) {
6895
- return /* @__PURE__ */ import_react25.default.createElement(node.tag, {
7122
+ return /* @__PURE__ */ import_react27.default.createElement(node.tag, {
6896
7123
  key,
6897
7124
  ...normalizeAttrs(node.attrs)
6898
7125
  }, (node.children || []).map((child, index) => generate2(child, `${key}-${node.tag}-${index}`)));
6899
7126
  }
6900
- return /* @__PURE__ */ import_react25.default.createElement(node.tag, {
7127
+ return /* @__PURE__ */ import_react27.default.createElement(node.tag, {
6901
7128
  key,
6902
7129
  ...normalizeAttrs(node.attrs),
6903
7130
  ...rootProps
@@ -6974,7 +7201,7 @@ var useInsertStyles = (eleRef) => {
6974
7201
  csp,
6975
7202
  prefixCls,
6976
7203
  layer
6977
- } = (0, import_react25.useContext)(Context_default);
7204
+ } = (0, import_react27.useContext)(Context_default);
6978
7205
  let mergedStyleStr = iconStyles;
6979
7206
  if (prefixCls) {
6980
7207
  mergedStyleStr = mergedStyleStr.replace(/anticon/g, prefixCls);
@@ -6984,7 +7211,7 @@ var useInsertStyles = (eleRef) => {
6984
7211
  ${mergedStyleStr}
6985
7212
  }`;
6986
7213
  }
6987
- (0, import_react25.useEffect)(() => {
7214
+ (0, import_react27.useEffect)(() => {
6988
7215
  const ele = eleRef.current;
6989
7216
  const shadowRoot = getShadowRoot(ele);
6990
7217
  updateCSS(mergedStyleStr, "@ant-design-icons", {
@@ -7024,7 +7251,7 @@ var IconBase = (props) => {
7024
7251
  secondaryColor,
7025
7252
  ...restProps
7026
7253
  } = props;
7027
- const svgRef = React15.useRef(null);
7254
+ const svgRef = React17.useRef(null);
7028
7255
  let colors = twoToneColorPalette;
7029
7256
  if (primaryColor) {
7030
7257
  colors = {
@@ -7094,7 +7321,7 @@ function _extends() {
7094
7321
  return _extends.apply(this, arguments);
7095
7322
  }
7096
7323
  setTwoToneColor(blue.primary);
7097
- var Icon = /* @__PURE__ */ React16.forwardRef((props, ref) => {
7324
+ var Icon = /* @__PURE__ */ React18.forwardRef((props, ref) => {
7098
7325
  const {
7099
7326
  // affect outter <i>...</i>
7100
7327
  className,
@@ -7111,7 +7338,7 @@ var Icon = /* @__PURE__ */ React16.forwardRef((props, ref) => {
7111
7338
  const {
7112
7339
  prefixCls = "anticon",
7113
7340
  rootClassName
7114
- } = React16.useContext(Context_default);
7341
+ } = React18.useContext(Context_default);
7115
7342
  const classString = (0, import_clsx2.clsx)(rootClassName, prefixCls, {
7116
7343
  [`${prefixCls}-${icon.name}`]: !!icon.name,
7117
7344
  [`${prefixCls}-spin`]: !!spin || icon.name === "loading"
@@ -7125,7 +7352,7 @@ var Icon = /* @__PURE__ */ React16.forwardRef((props, ref) => {
7125
7352
  transform: `rotate(${rotate}deg)`
7126
7353
  } : void 0;
7127
7354
  const [primaryColor, secondaryColor] = normalizeTwoToneColors(twoToneColor);
7128
- return /* @__PURE__ */ React16.createElement("span", _extends({
7355
+ return /* @__PURE__ */ React18.createElement("span", _extends({
7129
7356
  role: "img",
7130
7357
  "aria-label": icon.name
7131
7358
  }, restProps, {
@@ -7133,7 +7360,7 @@ var Icon = /* @__PURE__ */ React16.forwardRef((props, ref) => {
7133
7360
  tabIndex: iconTabIndex,
7134
7361
  onClick,
7135
7362
  className: classString
7136
- }), /* @__PURE__ */ React16.createElement(IconBase_default, {
7363
+ }), /* @__PURE__ */ React18.createElement(IconBase_default, {
7137
7364
  icon,
7138
7365
  primaryColor,
7139
7366
  secondaryColor,
@@ -7148,7 +7375,7 @@ if (process.env.NODE_ENV !== "production") {
7148
7375
  var AntdIcon_default = Icon;
7149
7376
 
7150
7377
  // ../../node_modules/@ant-design/icons/es/icons/PlusOutlined.js
7151
- var React17 = __toESM(require("react"));
7378
+ var React19 = __toESM(require("react"));
7152
7379
 
7153
7380
  // ../../node_modules/@ant-design/icons-svg/es/asn/PlusOutlined.js
7154
7381
  var PlusOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z" } }, { "tag": "path", "attrs": { "d": "M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z" } }] }, "name": "plus", "theme": "outlined" };
@@ -7169,19 +7396,19 @@ function _extends2() {
7169
7396
  };
7170
7397
  return _extends2.apply(this, arguments);
7171
7398
  }
7172
- var PlusOutlined2 = (props, ref) => /* @__PURE__ */ React17.createElement(AntdIcon_default, _extends2({}, props, {
7399
+ var PlusOutlined2 = (props, ref) => /* @__PURE__ */ React19.createElement(AntdIcon_default, _extends2({}, props, {
7173
7400
  ref,
7174
7401
  icon: PlusOutlined_default
7175
7402
  }));
7176
- var RefIcon = /* @__PURE__ */ React17.forwardRef(PlusOutlined2);
7403
+ var RefIcon = /* @__PURE__ */ React19.forwardRef(PlusOutlined2);
7177
7404
  if (process.env.NODE_ENV !== "production") {
7178
7405
  RefIcon.displayName = "PlusOutlined";
7179
7406
  }
7180
7407
  var PlusOutlined_default2 = RefIcon;
7181
7408
 
7182
7409
  // src/hooks/uploads/useAntdImageUpload.tsx
7183
- var import_antd2 = require("antd");
7184
- var import_jsx_runtime34 = require("react/jsx-runtime");
7410
+ var import_antd4 = require("antd");
7411
+ var import_jsx_runtime36 = require("react/jsx-runtime");
7185
7412
  var getBase64 = (file) => new Promise((resolve, reject) => {
7186
7413
  const reader = new FileReader();
7187
7414
  reader.readAsDataURL(file);
@@ -7189,9 +7416,9 @@ var getBase64 = (file) => new Promise((resolve, reject) => {
7189
7416
  reader.onerror = (error) => reject(error);
7190
7417
  });
7191
7418
  var useAntdImageUpload = ({ length = 1 }) => {
7192
- const [fileList, setFileList] = (0, import_react26.useState)([]);
7193
- const [previewOpen, setPreviewOpen] = (0, import_react26.useState)(false);
7194
- const [previewImage, setPreviewImage] = (0, import_react26.useState)("");
7419
+ const [fileList, setFileList] = (0, import_react28.useState)([]);
7420
+ const [previewOpen, setPreviewOpen] = (0, import_react28.useState)(false);
7421
+ const [previewImage, setPreviewImage] = (0, import_react28.useState)("");
7195
7422
  const handlePreview = async (file) => {
7196
7423
  if (!file.url && !file.preview) {
7197
7424
  file.preview = await getBase64(file.originFileObj);
@@ -7208,23 +7435,23 @@ var useAntdImageUpload = ({ length = 1 }) => {
7208
7435
  }))
7209
7436
  );
7210
7437
  };
7211
- const ImageBox = () => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
7212
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
7213
- import_antd2.Upload,
7438
+ const ImageBox = () => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
7439
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
7440
+ import_antd4.Upload,
7214
7441
  {
7215
7442
  listType: "picture-card",
7216
7443
  fileList,
7217
7444
  onPreview: handlePreview,
7218
7445
  onChange: handleChange,
7219
7446
  beforeUpload: () => false,
7220
- children: fileList.length >= length ? null : /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("button", { style: { border: 0, background: "none" }, type: "button", children: [
7221
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(PlusOutlined_default2, {}),
7222
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style: { marginTop: 8 }, children: "Upload" })
7447
+ children: fileList.length >= length ? null : /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("button", { style: { border: 0, background: "none" }, type: "button", children: [
7448
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(PlusOutlined_default2, {}),
7449
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { style: { marginTop: 8 }, children: "Upload" })
7223
7450
  ] })
7224
7451
  }
7225
7452
  ),
7226
- previewImage && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
7227
- import_antd2.Image,
7453
+ previewImage && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
7454
+ import_antd4.Image,
7228
7455
  {
7229
7456
  style: { display: "none" },
7230
7457
  preview: {
@@ -7241,10 +7468,10 @@ var useAntdImageUpload = ({ length = 1 }) => {
7241
7468
  var useAntdImageUpload_default = useAntdImageUpload;
7242
7469
 
7243
7470
  // src/components/Views/CategoryView.tsx
7244
- var import_jsx_runtime35 = require("react/jsx-runtime");
7471
+ var import_jsx_runtime37 = require("react/jsx-runtime");
7245
7472
  var CategoryCard = ({ item }) => {
7246
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "group bg-white rounded-md overflow-hidden border border-black/80 flex flex-col h-full print:border-black transition-all duration-300", children: [
7247
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "relative aspect-square w-full overflow-hidden bg-gray-50 flex-shrink-0 border-b border-black/10", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
7473
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "group bg-white rounded-md overflow-hidden border border-black/80 flex flex-col h-full print:border-black transition-all duration-300", children: [
7474
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "relative aspect-square w-full overflow-hidden bg-gray-50 flex-shrink-0 border-b border-black/10", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
7248
7475
  "img",
7249
7476
  {
7250
7477
  src: item.image,
@@ -7252,7 +7479,7 @@ var CategoryCard = ({ item }) => {
7252
7479
  className: "w-full h-full object-cover"
7253
7480
  }
7254
7481
  ) }),
7255
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "p-1.5 flex flex-col justify-center flex-grow", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h3", { className: "text-[10px] font-bold text-black line-clamp-2 leading-tight text-center", children: item.name }) })
7482
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "p-1.5 flex flex-col justify-center flex-grow", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h3", { className: "text-[10px] font-bold text-black line-clamp-2 leading-tight text-center", children: item.name }) })
7256
7483
  ] });
7257
7484
  };
7258
7485
  var CategoryView = ({
@@ -7260,20 +7487,20 @@ var CategoryView = ({
7260
7487
  items,
7261
7488
  className
7262
7489
  }) => {
7263
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: cn("p-6 bg-gray-50 min-h-full", className), children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "max-w-7xl mx-auto", children: [
7264
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "mb-8", children: [
7265
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h2", { className: "text-2xl md:text-3xl font-bold text-gray-900 tracking-tight", children: categoryName }),
7266
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "mt-2 h-1.5 w-16 bg-green-500 rounded-full" })
7490
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: cn("p-6 bg-gray-50 min-h-full", className), children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "max-w-7xl mx-auto", children: [
7491
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "mb-8", children: [
7492
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h2", { className: "text-2xl md:text-3xl font-bold text-gray-900 tracking-tight", children: categoryName }),
7493
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "mt-2 h-1.5 w-16 bg-green-500 rounded-full" })
7267
7494
  ] }),
7268
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 md:gap-6", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CategoryCard, { item }, item.id)) })
7495
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 md:gap-6", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(CategoryCard, { item }, item.id)) })
7269
7496
  ] }) });
7270
7497
  };
7271
7498
  var CategoryView_default = CategoryView;
7272
7499
 
7273
7500
  // src/components/Views/Transaction.tsx
7274
- var import_jsx_runtime36 = require("react/jsx-runtime");
7501
+ var import_jsx_runtime38 = require("react/jsx-runtime");
7275
7502
  var Transaction = () => {
7276
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { children: "Transaction" });
7503
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { children: "Transaction" });
7277
7504
  };
7278
7505
  var Transaction_default = Transaction;
7279
7506
 
@@ -7286,9 +7513,9 @@ var Views = {
7286
7513
  var Views_default = Views;
7287
7514
 
7288
7515
  // src/components/Guard.tsx
7289
- var import_react27 = require("react");
7290
- var import_react_router_dom3 = require("react-router-dom");
7291
- var import_antd3 = require("antd");
7516
+ var import_react29 = require("react");
7517
+ var import_react_router_dom4 = require("react-router-dom");
7518
+ var import_antd5 = require("antd");
7292
7519
 
7293
7520
  // src/store/useAuthStore.ts
7294
7521
  var import_zustand = require("zustand");
@@ -7380,12 +7607,12 @@ var useAuth = () => {
7380
7607
  var useAuth_default = useAuth;
7381
7608
 
7382
7609
  // src/components/Guard.tsx
7383
- var import_jsx_runtime37 = require("react/jsx-runtime");
7610
+ var import_jsx_runtime39 = require("react/jsx-runtime");
7384
7611
  var Guard = () => {
7385
7612
  const { get } = useApis_default();
7386
- const location = (0, import_react_router_dom3.useLocation)();
7613
+ const location = (0, import_react_router_dom4.useLocation)();
7387
7614
  const { login, setIsLoggedIn, setIsFetched, isFetched } = useAuth();
7388
- (0, import_react27.useLayoutEffect)(() => {
7615
+ (0, import_react29.useLayoutEffect)(() => {
7389
7616
  const fetchProfile = async () => {
7390
7617
  try {
7391
7618
  const res = await get({
@@ -7405,27 +7632,27 @@ var Guard = () => {
7405
7632
  fetchProfile();
7406
7633
  }, [location.pathname]);
7407
7634
  if (!isFetched) {
7408
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "min-h-screen flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(LoadingSpin, { size: "lg" }) });
7635
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "min-h-screen flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(LoadingSpin, { size: "lg" }) });
7409
7636
  }
7410
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_router_dom3.Outlet, {});
7637
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_router_dom4.Outlet, {});
7411
7638
  };
7412
7639
  var ProtectedRoute = () => {
7413
7640
  const { isLoggedIn } = useAuth();
7414
- const location = (0, import_react_router_dom3.useLocation)();
7415
- return isLoggedIn ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_router_dom3.Outlet, {}) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_router_dom3.Navigate, { to: "/login", state: { from: location }, replace: true });
7641
+ const location = (0, import_react_router_dom4.useLocation)();
7642
+ return isLoggedIn ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_router_dom4.Outlet, {}) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_router_dom4.Navigate, { to: "/login", state: { from: location }, replace: true });
7416
7643
  };
7417
7644
  var UnProtectedRoute = () => {
7418
7645
  const { isLoggedIn, user } = useAuth();
7419
- return !isLoggedIn ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_router_dom3.Outlet, {}) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_router_dom3.Navigate, { to: user?.homePath || "/", replace: true });
7646
+ return !isLoggedIn ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_router_dom4.Outlet, {}) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_router_dom4.Navigate, { to: user?.homePath || "/", replace: true });
7420
7647
  };
7421
7648
  var AdminProtectedRoute = () => {
7422
7649
  const { role } = useAuth();
7423
- (0, import_react27.useEffect)(() => {
7650
+ (0, import_react29.useEffect)(() => {
7424
7651
  if (role && !["admin"].includes(role)) {
7425
- import_antd3.message.error("Only admin can access this page");
7652
+ import_antd5.message.error("Only admin can access this page");
7426
7653
  }
7427
7654
  }, [role]);
7428
- return role && ["admin"].includes(role) ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_router_dom3.Outlet, {}) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_router_dom3.Navigate, { to: "/", replace: true });
7655
+ return role && ["admin"].includes(role) ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_router_dom4.Outlet, {}) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_router_dom4.Navigate, { to: "/", replace: true });
7429
7656
  };
7430
7657
  // Annotate the CommonJS export names for ESM import in node:
7431
7658
  0 && (module.exports = {
@@ -7457,7 +7684,9 @@ var AdminProtectedRoute = () => {
7457
7684
  PageHeader,
7458
7685
  PhoneInput,
7459
7686
  PostTable,
7687
+ ProfileCard,
7460
7688
  ProfileDropdown,
7689
+ ProfileView,
7461
7690
  ProtectedRoute,
7462
7691
  SearchApi,
7463
7692
  SearchApiContent,