@shophost/react 2.0.25 → 2.0.27

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/admin-client.js CHANGED
@@ -2,22 +2,22 @@
2
2
  import { jsx as e, jsxs as s, Fragment as C } from "react/jsx-runtime";
3
3
  import { QueryClient as jr, QueryClientProvider as Vr, useQuery as G, keepPreviousData as Ce, useMutation as $ } from "@tanstack/react-query";
4
4
  import { ThemeProvider as kn, useTheme as vn } from "next-themes";
5
- import * as N from "react";
6
- import R, { createContext as ve, useContext as le, useMemo as Se, useState as I, useReducer as An, useEffect as X, useCallback as j, useRef as Hr, Fragment as st, useId as De, forwardRef as Zr } from "react";
5
+ import * as R from "react";
6
+ import N, { createContext as ve, useContext as le, useMemo as Se, useState as I, useReducer as An, useEffect as X, useCallback as j, useRef as Hr, Fragment as st, useId as De, forwardRef as Zr } from "react";
7
7
  import se, { Toaster as Nn } from "react-hot-toast";
8
8
  import { inferAdditionalFields as Ur, organizationClient as Wr } from "better-auth/client/plugins";
9
9
  import { createAuthClient as $r } from "better-auth/react";
10
10
  import { useFormContext as _r, useFormState as Gt, useForm as de, FormProvider as Ge, useFieldArray as Ea } from "react-hook-form";
11
11
  import { Search as Da, ChevronDown as Ke, Check as vt, MailIcon as Rn, XIcon as Kt, CloudUpload as Zt, Loader2 as Cn, Phone as qr, X as At, LanguagesIcon as Gr, ChevronLeft as Xt, ShoppingBasketIcon as Kr, UserIcon as Pn, CircleChevronRightIcon as Tn, PartyPopperIcon as Qn, AtSign as In, PlusCircleIcon as Ln, XCircleIcon as En, PlusIcon as je, CheckCircle as Yt, ArrowRight as Dn, EyeOffIcon as Xr, PencilIcon as Yr, Trash2 as es, TrashIcon as zn, BookCopyIcon as fr, CheckIcon as ts, HomeIcon as as, RadioIcon as rs, LogsIcon as ss, CalendarCheckIcon as is, PackageIcon as ns, BoxesIcon as os, FactoryIcon as ls, UserCircleIcon as Mn, ExternalLinkIcon as Bn } from "lucide-react";
12
12
  import { upload as ds } from "@vercel/blob/client";
13
- import ge from "next/image.js";
13
+ import he from "next/image.js";
14
14
  import { useDebounce as Xe } from "use-debounce";
15
15
  import x from "classnames";
16
16
  import { withMask as Jn } from "use-mask-input";
17
17
  import { Transition as cs, Dialog as On, TransitionChild as yr, DialogPanel as Fn } from "@headlessui/react";
18
18
  import O from "next/link.js";
19
19
  import { RiCloseLine as us, RiLoader2Fill as ps, RiSearchLine as za, RiEyeFill as ms, RiEyeOffFill as gs, RiGoogleFill as ea, RiArrowLeftSLine as Ut, RiArrowRightSLine as it, RiArrowLeftDoubleLine as hs, RiArrowRightDoubleLine as fs, RiCalendar2Fill as jn, RiSubtractFill as Vn, RiArrowDownSLine as Ma, RiArrowUpSLine as ys, RiCheckLine as ta, RiSettings5Line as Ba, RiRadioButtonFill as Hn, RiCheckboxBlankCircleLine as Zn, RiMoreFill as aa, RiMenuLine as Un, RiExpandUpDownLine as ws, RiSunLine as Wn, RiMoonLine as $n, RiComputerLine as _n, RiMore2Fill as qn } from "@remixicon/react";
20
- import { useRouter as K, useSearchParams as fe, usePathname as nt, useParams as bs, notFound as _e } from "next/navigation.js";
20
+ import { useRouter as K, useSearchParams as ye, usePathname as nt, useParams as bs, notFound as _e } from "next/navigation.js";
21
21
  import { zodResolver as ce } from "@hookform/resolvers/zod";
22
22
  import { format as V, isValid as xs, isSameMonth as Gn, addYears as Bt, subYears as wr, interval as Ot, eachDayOfInterval as Ss, subDays as Ra, isWithinInterval as br, formatDate as xr, toDate as ks } from "date-fns";
23
23
  import { initClient as Kn } from "@shophost/client";
@@ -195,7 +195,7 @@ const Rr = "shophost-cart", Ao = {
195
195
  if (!o || !o.modifiers) return "";
196
196
  const l = ((p = (u = o.translations) == null ? void 0 : u.find((h) => h && h.locale === r)) == null ? void 0 : p.title) || (o.translations && o.translations.length > 0 ? (m = o.translations[0]) == null ? void 0 : m.title : "") || "", d = (n.modifiers || []).filter((h) => h).map((h) => {
197
197
  const f = o.modifiers.find(
198
- (w) => w && w.id === h.id
198
+ (S) => S && S.id === h.id
199
199
  );
200
200
  if (!f) return "";
201
201
  const y = f.title || "", b = h.quantity || 1;
@@ -469,8 +469,8 @@ const zs = ve(
469
469
  selectedProduct: f,
470
470
  onModalAddToCart: y,
471
471
  totalAmount: b,
472
- itemCount: w,
473
- removedItemsAlert: S
472
+ itemCount: S,
473
+ removedItemsAlert: w
474
474
  },
475
475
  k
476
476
  ] = An(Es, Ao), v = Se(
@@ -481,7 +481,7 @@ const zs = ve(
481
481
  isLoading: P,
482
482
  isRefetching: _
483
483
  } = G({
484
- queryKey: ["cartProducts", v, w, c == null ? void 0 : c.id],
484
+ queryKey: ["cartProducts", v, S, c == null ? void 0 : c.id],
485
485
  queryFn: async () => {
486
486
  if (v.length === 0)
487
487
  return {
@@ -586,7 +586,7 @@ const zs = ve(
586
586
  removeItem: Z,
587
587
  updateItemQuantity: ae,
588
588
  clearCart: J,
589
- itemCount: w,
589
+ itemCount: S,
590
590
  totalAmount: b,
591
591
  onCheckoutClick: Te,
592
592
  openModifiersModal: We,
@@ -608,7 +608,7 @@ const zs = ve(
608
608
  Z,
609
609
  ae,
610
610
  J,
611
- w,
611
+ S,
612
612
  b,
613
613
  Te,
614
614
  We,
@@ -711,27 +711,27 @@ const zs = ve(
711
711
  r(m), n(null);
712
712
  }, [t]), l = j((m, h) => {
713
713
  r((f) => {
714
- const y = [...f], b = y.findIndex((w) => w.groupId === m);
714
+ const y = [...f], b = y.findIndex((S) => S.groupId === m);
715
715
  if (b === -1)
716
716
  y.push({
717
717
  groupId: m,
718
718
  modifierIds: [h]
719
719
  });
720
720
  else {
721
- const w = y[b];
722
- w.modifierIds.indexOf(h) === -1 ? y[b] = {
723
- ...w,
724
- modifierIds: [...w.modifierIds, h]
721
+ const S = y[b];
722
+ S.modifierIds.indexOf(h) === -1 ? y[b] = {
723
+ ...S,
724
+ modifierIds: [...S.modifierIds, h]
725
725
  } : y[b] = {
726
- ...w,
727
- modifierIds: w.modifierIds.filter((k) => k !== h)
726
+ ...S,
727
+ modifierIds: S.modifierIds.filter((k) => k !== h)
728
728
  };
729
729
  }
730
730
  return y;
731
731
  }), n(null);
732
732
  }, []), d = j((m, h) => {
733
733
  r((f) => {
734
- const y = [...f], b = y.findIndex((w) => w.groupId === m);
734
+ const y = [...f], b = y.findIndex((S) => S.groupId === m);
735
735
  return b === -1 ? y.push({
736
736
  groupId: m,
737
737
  modifierIds: [h]
@@ -783,7 +783,7 @@ const zs = ve(
783
783
  validateSelections: f,
784
784
  validationError: y,
785
785
  getCartModifierGroups: b
786
- } = Io(r || {}), { getProductName: w, getModifierGroupName: S } = Qo(a);
786
+ } = Io(r || {}), { getProductName: S, getModifierGroupName: w } = Qo(a);
787
787
  X(() => {
788
788
  r && (u(), c(1));
789
789
  }, [r, u]);
@@ -824,7 +824,7 @@ const zs = ve(
824
824
  isMultiSelect: ie,
825
825
  toggleModifier: p,
826
826
  selectModifier: m,
827
- getModifierGroupName: S,
827
+ getModifierGroupName: w,
828
828
  formatModifierPrice: ae,
829
829
  locale: a
830
830
  };
@@ -851,14 +851,14 @@ const zs = ve(
851
851
  return !n || p ? i : l.length === 0 ? a : /* @__PURE__ */ e("div", { className: t || "flex-1 overflow-y-auto", children: u && l.map((m) => {
852
852
  const h = u[m.productId];
853
853
  if (!h) return null;
854
- const f = () => d(m.productId, m.modifierGroups), y = (w) => c(m.productId, w, m.modifierGroups), b = Ds(
854
+ const f = () => d(m.productId, m.modifierGroups), y = (S) => c(m.productId, S, m.modifierGroups), b = Ds(
855
855
  m,
856
856
  h,
857
857
  n.configuration.defaultCurrency,
858
858
  o
859
859
  );
860
860
  return /* @__PURE__ */ e(
861
- R.Fragment,
861
+ N.Fragment,
862
862
  {
863
863
  children: r({
864
864
  ...b,
@@ -879,7 +879,7 @@ const zs = ve(
879
879
  updateQuantity: l
880
880
  }) => /* @__PURE__ */ e("div", { className: x("p-1 mb-3 transition-shadow"), children: /* @__PURE__ */ s("div", { className: "grid grid-cols-5", children: [
881
881
  /* @__PURE__ */ e("div", { className: "shrink-0 w-full h-full mr-3 rounded-md overflow-hidden col-span-2", children: r ? /* @__PURE__ */ e(
882
- ge,
882
+ he,
883
883
  {
884
884
  width: 100,
885
885
  height: 100,
@@ -979,7 +979,7 @@ const zs = ve(
979
979
  renderHeader: m,
980
980
  renderItem: h = Mo
981
981
  }) => {
982
- const { itemCount: f, total: y, locale: b } = Va(), { organization: w } = ze(), S = (w == null ? void 0 : w.configuration.defaultCurrency) ?? "USD", k = Ne(y, S, b), v = {
982
+ const { itemCount: f, total: y, locale: b } = Va(), { organization: S } = ze(), w = (S == null ? void 0 : S.configuration.defaultCurrency) ?? "USD", k = Ne(y, w, b), v = {
983
983
  checkoutHref: t,
984
984
  checkoutLabel: a,
985
985
  close: l ?? (() => {
@@ -1036,13 +1036,13 @@ const zs = ve(
1036
1036
  renderFooter: u,
1037
1037
  renderItem: p
1038
1038
  }) => {
1039
- const m = Hr(null), [h, f] = I(null), [y, b] = I(null), w = 50, S = (A) => {
1039
+ const m = Hr(null), [h, f] = I(null), [y, b] = I(null), S = 50, w = (A) => {
1040
1040
  b(null), f(A.targetTouches[0].clientY);
1041
1041
  }, k = (A) => {
1042
1042
  b(A.targetTouches[0].clientY);
1043
1043
  }, v = () => {
1044
1044
  if (!h || !y) return;
1045
- y - h > w && a(), f(null), b(null);
1045
+ y - h > S && a(), f(null), b(null);
1046
1046
  };
1047
1047
  return /* @__PURE__ */ s(C, { children: [
1048
1048
  t && /* @__PURE__ */ e(
@@ -1076,7 +1076,7 @@ const zs = ve(
1076
1076
  {
1077
1077
  className: "h-full",
1078
1078
  ref: m,
1079
- onTouchStart: S,
1079
+ onTouchStart: w,
1080
1080
  onTouchMove: k,
1081
1081
  onTouchEnd: v,
1082
1082
  children: /* @__PURE__ */ e(
@@ -2769,7 +2769,7 @@ const Ys = [
2769
2769
  defaultVariants: {
2770
2770
  variant: "primary"
2771
2771
  }
2772
- }), oe = R.forwardRef(
2772
+ }), oe = N.forwardRef(
2773
2773
  ({
2774
2774
  asChild: t,
2775
2775
  isLoading: a = !1,
@@ -2882,7 +2882,7 @@ const ml = H.Close;
2882
2882
  ml.displayName = "DialogClose";
2883
2883
  const ei = H.Portal;
2884
2884
  ei.displayName = "DialogPortal";
2885
- const ti = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
2885
+ const ti = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
2886
2886
  H.Overlay,
2887
2887
  {
2888
2888
  ref: r,
@@ -2899,7 +2899,7 @@ const ti = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
2899
2899
  }
2900
2900
  ));
2901
2901
  ti.displayName = "DialogOverlay";
2902
- const da = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(ei, { children: /* @__PURE__ */ e(ti, { children: /* @__PURE__ */ e(
2902
+ const da = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(ei, { children: /* @__PURE__ */ e(ti, { children: /* @__PURE__ */ e(
2903
2903
  H.Content,
2904
2904
  {
2905
2905
  ref: r,
@@ -2924,7 +2924,7 @@ const ai = ({
2924
2924
  ...a
2925
2925
  }) => /* @__PURE__ */ e("div", { className: x("flex flex-col gap-y-1", t), ...a });
2926
2926
  ai.displayName = "DialogHeader";
2927
- const _a = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
2927
+ const _a = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
2928
2928
  H.Title,
2929
2929
  {
2930
2930
  ref: r,
@@ -2939,7 +2939,7 @@ const _a = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
2939
2939
  }
2940
2940
  ));
2941
2941
  _a.displayName = "DialogTitle";
2942
- const gl = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
2942
+ const gl = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
2943
2943
  H.Description,
2944
2944
  {
2945
2945
  ref: r,
@@ -2962,7 +2962,7 @@ const hl = ({
2962
2962
  }
2963
2963
  );
2964
2964
  hl.displayName = "DialogFooter";
2965
- const ca = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
2965
+ const ca = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
2966
2966
  F,
2967
2967
  {
2968
2968
  ref: r,
@@ -2974,7 +2974,7 @@ const ca = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
2974
2974
  }
2975
2975
  ));
2976
2976
  ca.displayName = F.displayName;
2977
- const Nu = ({ children: t, ...a }) => /* @__PURE__ */ e(la, { ...a, children: /* @__PURE__ */ e(da, { className: "overflow-hidden p-0", children: /* @__PURE__ */ e(ca, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: t }) }) }), qa = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ s("div", { className: "flex items-center border-b pl-3", "cmdk-input-wrapper": "", children: [
2977
+ const Nu = ({ children: t, ...a }) => /* @__PURE__ */ e(la, { ...a, children: /* @__PURE__ */ e(da, { className: "overflow-hidden p-0", children: /* @__PURE__ */ e(ca, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: t }) }) }), qa = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ s("div", { className: "flex items-center border-b pl-3", "cmdk-input-wrapper": "", children: [
2978
2978
  /* @__PURE__ */ e(Da, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
2979
2979
  /* @__PURE__ */ e(
2980
2980
  F.Input,
@@ -2989,7 +2989,7 @@ const Nu = ({ children: t, ...a }) => /* @__PURE__ */ e(la, { ...a, children: /*
2989
2989
  )
2990
2990
  ] }));
2991
2991
  qa.displayName = F.Input.displayName;
2992
- const Ga = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
2992
+ const Ga = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
2993
2993
  F.List,
2994
2994
  {
2995
2995
  ref: r,
@@ -2998,7 +2998,7 @@ const Ga = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
2998
2998
  }
2999
2999
  ));
3000
3000
  Ga.displayName = F.List.displayName;
3001
- const Ka = N.forwardRef((t, a) => /* @__PURE__ */ e(
3001
+ const Ka = R.forwardRef((t, a) => /* @__PURE__ */ e(
3002
3002
  F.Empty,
3003
3003
  {
3004
3004
  ref: a,
@@ -3007,7 +3007,7 @@ const Ka = N.forwardRef((t, a) => /* @__PURE__ */ e(
3007
3007
  }
3008
3008
  ));
3009
3009
  Ka.displayName = F.Empty.displayName;
3010
- const Xa = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
3010
+ const Xa = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
3011
3011
  F.Group,
3012
3012
  {
3013
3013
  ref: r,
@@ -3019,7 +3019,7 @@ const Xa = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
3019
3019
  }
3020
3020
  ));
3021
3021
  Xa.displayName = F.Group.displayName;
3022
- const fl = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
3022
+ const fl = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
3023
3023
  F.Separator,
3024
3024
  {
3025
3025
  ref: r,
@@ -3028,7 +3028,7 @@ const fl = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
3028
3028
  }
3029
3029
  ));
3030
3030
  fl.displayName = F.Separator.displayName;
3031
- const Ya = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
3031
+ const Ya = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
3032
3032
  F.Item,
3033
3033
  {
3034
3034
  ref: r,
@@ -3056,13 +3056,13 @@ const yl = ({
3056
3056
  yl.displayName = "CommandShortcut";
3057
3057
  const Rt = (t) => /* @__PURE__ */ e(W.Root, { ...t });
3058
3058
  Rt.displayName = "Popover";
3059
- const Ct = N.forwardRef((t, a) => /* @__PURE__ */ e(W.Trigger, { ref: a, ...t }));
3059
+ const Ct = R.forwardRef((t, a) => /* @__PURE__ */ e(W.Trigger, { ref: a, ...t }));
3060
3060
  Ct.displayName = "PopoverTrigger";
3061
- const wl = N.forwardRef((t, a) => /* @__PURE__ */ e(W.Anchor, { ref: a, ...t }));
3061
+ const wl = R.forwardRef((t, a) => /* @__PURE__ */ e(W.Anchor, { ref: a, ...t }));
3062
3062
  wl.displayName = "PopoverAnchor";
3063
- const bl = N.forwardRef((t, a) => /* @__PURE__ */ e(W.Close, { ref: a, ...t }));
3063
+ const bl = R.forwardRef((t, a) => /* @__PURE__ */ e(W.Close, { ref: a, ...t }));
3064
3064
  bl.displayName = "PopoverClose";
3065
- const Pt = N.forwardRef(
3065
+ const Pt = R.forwardRef(
3066
3066
  ({
3067
3067
  className: t,
3068
3068
  sideOffset: a = 10,
@@ -3212,7 +3212,7 @@ const xl = ({
3212
3212
  false: "truncate appearance-none"
3213
3213
  }
3214
3214
  }
3215
- }), Qe = R.forwardRef(
3215
+ }), Qe = N.forwardRef(
3216
3216
  ({
3217
3217
  className: t,
3218
3218
  inputClassName: a,
@@ -3224,7 +3224,7 @@ const xl = ({
3224
3224
  suffix: d,
3225
3225
  ...c
3226
3226
  }, u) => {
3227
- const [p, m] = R.useState(n), h = n === "password" && !o, f = n === "search" && !o, y = n === "textarea" ? "textarea" : "input";
3227
+ const [p, m] = N.useState(n), h = n === "password" && !o, f = n === "search" && !o, y = n === "textarea" ? "textarea" : "input";
3228
3228
  return /* @__PURE__ */ s("div", { className: x("relative w-full", t), children: [
3229
3229
  l && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-y-0 left-0 flex items-center px-3 text-slate-600 dark:text-gray-600 z-10 text-sm border-r border-gray-200", children: l }),
3230
3230
  /* @__PURE__ */ e(
@@ -3348,7 +3348,7 @@ const kl = ({ ...t }) => {
3348
3348
  }
3349
3349
  ),
3350
3350
  /* @__PURE__ */ e(
3351
- ge,
3351
+ he,
3352
3352
  {
3353
3353
  src: m.url,
3354
3354
  alt: m.filename,
@@ -3455,25 +3455,25 @@ const kl = ({ ...t }) => {
3455
3455
  queryKey: ["autocomplete", h],
3456
3456
  queryFn: async () => {
3457
3457
  if (!h || h.length < 2) return [];
3458
- const S = await i.location.getPredictions({
3458
+ const w = await i.location.getPredictions({
3459
3459
  query: {
3460
3460
  query: h
3461
3461
  }
3462
3462
  });
3463
- if (S.status !== 200)
3463
+ if (w.status !== 200)
3464
3464
  throw new Error("Failed to fetch predictions");
3465
- return Array.isArray(S.body) ? S.body : (console.warn("API did not return an array:", S.body), []);
3465
+ return Array.isArray(w.body) ? w.body : (console.warn("API did not return an array:", w.body), []);
3466
3466
  },
3467
3467
  enabled: h.length >= 2,
3468
3468
  refetchOnWindowFocus: !1
3469
3469
  // Don't refetch on window focus
3470
- }), w = (S) => {
3471
- p(S), c(S.text);
3470
+ }), S = (w) => {
3471
+ p(w), c(w.text);
3472
3472
  const k = {
3473
- placeId: S.placeId,
3474
- text: S.text,
3475
- addressLineOne: S.addressLineOne,
3476
- addressLineTwo: S.addressLineTwo
3473
+ placeId: w.placeId,
3474
+ text: w.text,
3475
+ addressLineOne: w.addressLineOne,
3476
+ addressLineTwo: w.addressLineTwo
3477
3477
  };
3478
3478
  a(k), l(!1);
3479
3479
  };
@@ -3519,8 +3519,8 @@ const kl = ({ ...t }) => {
3519
3519
  placeholder: "Search places...",
3520
3520
  className: "flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
3521
3521
  value: d,
3522
- onChange: (S) => {
3523
- c(S.target.value), S.target.value.length >= 2 && l(!0);
3522
+ onChange: (w) => {
3523
+ c(w.target.value), w.target.value.length >= 2 && l(!0);
3524
3524
  }
3525
3525
  }
3526
3526
  )
@@ -3538,20 +3538,20 @@ const kl = ({ ...t }) => {
3538
3538
  f.length,
3539
3539
  " results"
3540
3540
  ] }),
3541
- f.map((S, k) => /* @__PURE__ */ s(
3541
+ f.map((w, k) => /* @__PURE__ */ s(
3542
3542
  "div",
3543
3543
  {
3544
3544
  className: "relative flex cursor-pointer select-none items-center rounded-xs px-2 py-2 text-sm outline-hidden hover:bg-gray-100 dark:hover:bg-gray-800",
3545
- onClick: () => w(S),
3545
+ onClick: () => S(w),
3546
3546
  children: [
3547
3547
  /* @__PURE__ */ s("div", { className: "flex flex-col grow", children: [
3548
- /* @__PURE__ */ e("span", { children: S.addressLineOne || S.text }),
3549
- S.addressLineTwo && /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: S.addressLineTwo })
3548
+ /* @__PURE__ */ e("span", { children: w.addressLineOne || w.text }),
3549
+ w.addressLineTwo && /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: w.addressLineTwo })
3550
3550
  ] }),
3551
- (u == null ? void 0 : u.placeId) === S.placeId && /* @__PURE__ */ e(vt, { size: 16, strokeWidth: 2, className: "ml-auto" })
3551
+ (u == null ? void 0 : u.placeId) === w.placeId && /* @__PURE__ */ e(vt, { size: 16, strokeWidth: 2, className: "ml-auto" })
3552
3552
  ]
3553
3553
  },
3554
- `${S.placeId || "place"}-${k}`
3554
+ `${w.placeId || "place"}-${k}`
3555
3555
  ))
3556
3556
  ] })
3557
3557
  ] })
@@ -3782,7 +3782,7 @@ const Al = ({
3782
3782
  defaultVariants: {
3783
3783
  size: "default"
3784
3784
  }
3785
- }), ii = R.forwardRef(({ className: t, size: a, ...r }, i) => {
3785
+ }), ii = N.forwardRef(({ className: t, size: a, ...r }, i) => {
3786
3786
  const { root: n, thumb: o } = Cl({ size: a });
3787
3787
  return /* @__PURE__ */ e(
3788
3788
  Wt.Root,
@@ -3795,7 +3795,7 @@ const Al = ({
3795
3795
  );
3796
3796
  });
3797
3797
  ii.displayName = "Switch";
3798
- const ni = R.forwardRef(({ className: t, type: a, ...r }, i) => /* @__PURE__ */ e(
3798
+ const ni = N.forwardRef(({ className: t, type: a, ...r }, i) => /* @__PURE__ */ e(
3799
3799
  "input",
3800
3800
  {
3801
3801
  type: a,
@@ -3824,7 +3824,7 @@ function oi({ className: t, ...a }) {
3824
3824
  }
3825
3825
  );
3826
3826
  }
3827
- const Re = N.forwardRef(({ className: t, disabled: a, ...r }, i) => /* @__PURE__ */ e(
3827
+ const Re = R.forwardRef(({ className: t, disabled: a, ...r }, i) => /* @__PURE__ */ e(
3828
3828
  Ns.Root,
3829
3829
  {
3830
3830
  ref: i,
@@ -3850,47 +3850,47 @@ const Pl = ({
3850
3850
  disabled: r
3851
3851
  }) => {
3852
3852
  const i = () => {
3853
- const w = /* @__PURE__ */ new Date(), S = new Date(w);
3854
- return S.setMinutes(w.getMinutes() + 30), S;
3853
+ const S = /* @__PURE__ */ new Date(), w = new Date(S);
3854
+ return w.setMinutes(S.getMinutes() + 30), w;
3855
3855
  }, n = Se(() => {
3856
- const w = [], S = /* @__PURE__ */ new Date();
3856
+ const S = [], w = /* @__PURE__ */ new Date();
3857
3857
  for (let k = 0; k < 7; k++) {
3858
- const v = new Date(S);
3859
- v.setDate(S.getDate() + k), v.setHours(0, 0, 0, 0), w.push(v);
3858
+ const v = new Date(w);
3859
+ v.setDate(w.getDate() + k), v.setHours(0, 0, 0, 0), S.push(v);
3860
3860
  }
3861
- return w;
3862
- }, []), o = (w) => {
3863
- const S = i();
3864
- if (!(w.toDateString() === (/* @__PURE__ */ new Date()).toDateString())) return !0;
3865
- if (S.getHours() >= 21 && S.getMinutes() > 0)
3861
+ return S;
3862
+ }, []), o = (S) => {
3863
+ const w = i();
3864
+ if (!(S.toDateString() === (/* @__PURE__ */ new Date()).toDateString())) return !0;
3865
+ if (w.getHours() >= 21 && w.getMinutes() > 0)
3866
3866
  return !1;
3867
3867
  for (let v = 11; v <= 21; v++) {
3868
- const A = new Date(w);
3869
- if (A.setHours(v, 0, 0, 0), A > S)
3868
+ const A = new Date(S);
3869
+ if (A.setHours(v, 0, 0, 0), A > w)
3870
3870
  return !0;
3871
3871
  }
3872
3872
  return !1;
3873
- }, l = (w) => !o(w), d = Se(() => n.find((w) => !l(w)) || null, [n]), [c, u] = I(
3873
+ }, l = (S) => !o(S), d = Se(() => n.find((S) => !l(S)) || null, [n]), [c, u] = I(
3874
3874
  t || d
3875
3875
  ), [p, m] = I(
3876
3876
  t ? `${t.getHours()}:${t.getMinutes() === 0 ? "00" : t.getMinutes()}` : null
3877
3877
  ), h = Se(() => {
3878
3878
  if (!c) return [];
3879
- const w = [], S = i(), k = c.toDateString() === (/* @__PURE__ */ new Date()).toDateString();
3879
+ const S = [], w = i(), k = c.toDateString() === (/* @__PURE__ */ new Date()).toDateString();
3880
3880
  for (let v = 11; v <= 21; v++) {
3881
3881
  const A = new Date(c);
3882
- A.setHours(v, 0, 0, 0), (!k || A > S) && w.push(`${v}:00`);
3882
+ A.setHours(v, 0, 0, 0), (!k || A > w) && S.push(`${v}:00`);
3883
3883
  }
3884
- return w;
3885
- }, [c]), f = (w) => {
3886
- const S = w.toLocaleDateString("en-US", { weekday: "short" }), k = w.toLocaleDateString("en-US", { month: "short" }), v = w.getDate();
3887
- return { weekday: S, month: k, day: v };
3888
- }, y = (w) => {
3889
- u(w), m(null);
3890
- }, b = (w) => {
3891
- if (m(w), c) {
3892
- const [S] = w.split(":").map(Number), k = new Date(c);
3893
- k.setHours(S, 0, 0, 0), a(k);
3884
+ return S;
3885
+ }, [c]), f = (S) => {
3886
+ const w = S.toLocaleDateString("en-US", { weekday: "short" }), k = S.toLocaleDateString("en-US", { month: "short" }), v = S.getDate();
3887
+ return { weekday: w, month: k, day: v };
3888
+ }, y = (S) => {
3889
+ u(S), m(null);
3890
+ }, b = (S) => {
3891
+ if (m(S), c) {
3892
+ const [w] = S.split(":").map(Number), k = new Date(c);
3893
+ k.setHours(w, 0, 0, 0), a(k);
3894
3894
  }
3895
3895
  };
3896
3896
  return X(() => {
@@ -3898,36 +3898,36 @@ const Pl = ({
3898
3898
  }, []), /* @__PURE__ */ s("div", { className: "mt-2", children: [
3899
3899
  /* @__PURE__ */ s("div", { className: "col-span-4 mt-4", children: [
3900
3900
  /* @__PURE__ */ e(Re, { htmlFor: "date", children: "Select Date" }),
3901
- /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-2 mt-2", children: n.map((w, S) => {
3902
- const { weekday: k, month: v, day: A } = f(w), P = l(w);
3901
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-2 mt-2", children: n.map((S, w) => {
3902
+ const { weekday: k, month: v, day: A } = f(S), P = l(S);
3903
3903
  return /* @__PURE__ */ e(
3904
3904
  "button",
3905
3905
  {
3906
3906
  type: "button",
3907
3907
  disabled: P,
3908
- className: `p-2 text-center border rounded-md ${P ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} ${c && c.toDateString() === w.toDateString() ? "bg-teal-500 text-white" : "bg-white hover:bg-gray-100"}`,
3909
- onClick: () => !P && y(w),
3908
+ className: `p-2 text-center border rounded-md ${P ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} ${c && c.toDateString() === S.toDateString() ? "bg-teal-500 text-white" : "bg-white hover:bg-gray-100"}`,
3909
+ onClick: () => !P && y(S),
3910
3910
  children: /* @__PURE__ */ s("div", { className: "flex flex-col items-center", children: [
3911
3911
  /* @__PURE__ */ e("span", { className: "text-xs font-medium", children: k }),
3912
3912
  /* @__PURE__ */ e("span", { className: "text-xl font-black font-red-hat-display", children: A }),
3913
3913
  /* @__PURE__ */ e("span", { className: "text-xs font-medium", children: v })
3914
3914
  ] })
3915
3915
  },
3916
- S
3916
+ w
3917
3917
  );
3918
3918
  }) })
3919
3919
  ] }),
3920
3920
  c && h.length > 0 && /* @__PURE__ */ s("div", { className: "col-span-4 mt-4", children: [
3921
3921
  /* @__PURE__ */ e(Re, { htmlFor: "time", children: "Select Time" }),
3922
- /* @__PURE__ */ e("div", { className: "grid grid-cols-5 gap-2 mt-2", children: h.map((w, S) => /* @__PURE__ */ e(
3922
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-5 gap-2 mt-2", children: h.map((S, w) => /* @__PURE__ */ e(
3923
3923
  "button",
3924
3924
  {
3925
3925
  type: "button",
3926
- className: `p-2 text-sm text-center border rounded-md font-medium cursor-pointer ${p === w ? "bg-teal-500 text-white" : "bg-white hover:bg-gray-100"}`,
3927
- onClick: () => b(w),
3928
- children: w
3926
+ className: `p-2 text-sm text-center border rounded-md font-medium cursor-pointer ${p === S ? "bg-teal-500 text-white" : "bg-white hover:bg-gray-100"}`,
3927
+ onClick: () => b(S),
3928
+ children: S
3929
3929
  },
3930
- S
3930
+ w
3931
3931
  )) })
3932
3932
  ] })
3933
3933
  ] });
@@ -4032,7 +4032,7 @@ const Pl = ({
4032
4032
  }, Ql = (t, a) => !t || typeof t != "object" ? void 0 : a ? a.replace(/\[/g, ".").replace(/\]/g, "").split(".").filter(Boolean).reduce((i, n) => {
4033
4033
  if (i != null)
4034
4034
  return i[n];
4035
- }, t) : t, me = ({
4035
+ }, t) : t, ge = ({
4036
4036
  type: t = "text",
4037
4037
  name: a,
4038
4038
  label: r,
@@ -4162,7 +4162,7 @@ const Pl = ({
4162
4162
  }
4163
4163
  );
4164
4164
  El.displayName = "CommandBar";
4165
- const Dl = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
4165
+ const Dl = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
4166
4166
  "div",
4167
4167
  {
4168
4168
  ref: r,
@@ -4174,7 +4174,7 @@ const Dl = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
4174
4174
  }
4175
4175
  ));
4176
4176
  Dl.displayName = "CommandBar.Value";
4177
- const zl = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
4177
+ const zl = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
4178
4178
  "div",
4179
4179
  {
4180
4180
  ref: r,
@@ -4186,7 +4186,7 @@ const zl = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
4186
4186
  }
4187
4187
  ));
4188
4188
  zl.displayName = "CommandBarBar";
4189
- const Ml = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
4189
+ const Ml = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
4190
4190
  "div",
4191
4191
  {
4192
4192
  ref: r,
@@ -4195,7 +4195,7 @@ const Ml = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
4195
4195
  }
4196
4196
  ));
4197
4197
  Ml.displayName = "CommandBar.Seperator";
4198
- const Bl = N.forwardRef(
4198
+ const Bl = R.forwardRef(
4199
4199
  ({
4200
4200
  className: t,
4201
4201
  type: a = "button",
@@ -4204,7 +4204,7 @@ const Bl = N.forwardRef(
4204
4204
  shortcut: n,
4205
4205
  disabled: o,
4206
4206
  ...l
4207
- }, d) => (N.useEffect(() => {
4207
+ }, d) => (R.useEffect(() => {
4208
4208
  const c = (u) => {
4209
4209
  u.key === n.shortcut && (u.preventDefault(), u.stopPropagation(), i());
4210
4210
  };
@@ -4245,7 +4245,7 @@ const Bl = N.forwardRef(
4245
4245
  ))
4246
4246
  );
4247
4247
  Bl.displayName = "CommandBar.Command";
4248
- const Pa = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
4248
+ const Pa = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
4249
4249
  Oa.Root,
4250
4250
  {
4251
4251
  ref: r,
@@ -4254,7 +4254,7 @@ const Pa = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
4254
4254
  }
4255
4255
  ));
4256
4256
  Pa.displayName = "RadioCardGroup";
4257
- const Ta = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
4257
+ const Ta = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
4258
4258
  "div",
4259
4259
  {
4260
4260
  className: qe(
@@ -4298,7 +4298,7 @@ const Ta = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
4298
4298
  }
4299
4299
  ));
4300
4300
  Ta.displayName = "RadioCardGroupIndicator";
4301
- const Qa = N.forwardRef(({ className: t, children: a, ...r }, i) => /* @__PURE__ */ e(
4301
+ const Qa = R.forwardRef(({ className: t, children: a, ...r }, i) => /* @__PURE__ */ e(
4302
4302
  Oa.Item,
4303
4303
  {
4304
4304
  ref: i,
@@ -4349,7 +4349,7 @@ const Jl = Pe({
4349
4349
  defaultVariants: {
4350
4350
  variant: "default"
4351
4351
  }
4352
- }), bt = R.forwardRef(
4352
+ }), bt = N.forwardRef(
4353
4353
  ({ className: t, variant: a, ...r }, i) => /* @__PURE__ */ e(
4354
4354
  "span",
4355
4355
  {
@@ -4360,7 +4360,7 @@ const Jl = Pe({
4360
4360
  )
4361
4361
  );
4362
4362
  bt.displayName = "Badge";
4363
- const St = R.forwardRef(
4363
+ const St = N.forwardRef(
4364
4364
  ({ className: t, children: a, ...r }, i) => /* @__PURE__ */ e(
4365
4365
  "div",
4366
4366
  {
@@ -4483,7 +4483,7 @@ const Ol = ({
4483
4483
  return /* @__PURE__ */ e("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ e(Ge, { ...o, children: /* @__PURE__ */ s("form", { onSubmit: o.handleSubmit(p), children: [
4484
4484
  /* @__PURE__ */ s("div", { className: "grid grid-cols-4 gap-x-4 gap-y-4 mt-3", children: [
4485
4485
  /* @__PURE__ */ e(
4486
- me,
4486
+ ge,
4487
4487
  {
4488
4488
  name: "firstname",
4489
4489
  label: "First Name",
@@ -4493,7 +4493,7 @@ const Ol = ({
4493
4493
  }
4494
4494
  ),
4495
4495
  /* @__PURE__ */ e(
4496
- me,
4496
+ ge,
4497
4497
  {
4498
4498
  name: "lastname",
4499
4499
  label: "Last Name",
@@ -4503,7 +4503,7 @@ const Ol = ({
4503
4503
  }
4504
4504
  ),
4505
4505
  /* @__PURE__ */ e(
4506
- me,
4506
+ ge,
4507
4507
  {
4508
4508
  name: "phone",
4509
4509
  label: "Phone",
@@ -4539,7 +4539,7 @@ const Ol = ({
4539
4539
  o.formState.errors.addressLineOne && /* @__PURE__ */ e("p", { className: "mt-1 text-sm text-red-500", children: String(o.formState.errors.addressLineOne.message ?? "") })
4540
4540
  ] }),
4541
4541
  /* @__PURE__ */ e(
4542
- me,
4542
+ ge,
4543
4543
  {
4544
4544
  name: "doorNumber",
4545
4545
  label: "Door Number",
@@ -4549,7 +4549,7 @@ const Ol = ({
4549
4549
  }
4550
4550
  ),
4551
4551
  /* @__PURE__ */ e(
4552
- me,
4552
+ ge,
4553
4553
  {
4554
4554
  name: "zipCode",
4555
4555
  label: "Postal Code",
@@ -4559,7 +4559,7 @@ const Ol = ({
4559
4559
  }
4560
4560
  ),
4561
4561
  /* @__PURE__ */ e(
4562
- me,
4562
+ ge,
4563
4563
  {
4564
4564
  name: "city",
4565
4565
  label: "City",
@@ -4569,7 +4569,7 @@ const Ol = ({
4569
4569
  }
4570
4570
  ),
4571
4571
  /* @__PURE__ */ e(
4572
- me,
4572
+ ge,
4573
4573
  {
4574
4574
  name: "country",
4575
4575
  label: "Country",
@@ -4579,7 +4579,7 @@ const Ol = ({
4579
4579
  }
4580
4580
  ),
4581
4581
  /* @__PURE__ */ e(
4582
- me,
4582
+ ge,
4583
4583
  {
4584
4584
  name: "deliveryInstructions",
4585
4585
  label: "Notes / Instructions",
@@ -4960,7 +4960,7 @@ const Ol = ({
4960
4960
  /* @__PURE__ */ e("div", { className: "my-3 sm:my-6 sm:pb-1", children: a.map(
4961
4961
  ({ title: d, subtitle: c, image: u, price: p, unitPrice: m, quantity: h }, f) => /* @__PURE__ */ e("div", { children: /* @__PURE__ */ s("div", { className: "flex items-center w-full mb-5 sm:mb-7", children: [
4962
4962
  /* @__PURE__ */ e("div", { className: "w-14 sm:min-w-32 h-10 sm:h-24 overflow-hidden rounded-lg", children: u != null && u.url ? /* @__PURE__ */ e(
4963
- ge,
4963
+ he,
4964
4964
  {
4965
4965
  width: 100,
4966
4966
  height: 100,
@@ -5091,7 +5091,7 @@ const Ol = ({
5091
5091
  /* @__PURE__ */ s(O, { href: "/", className: "flex items-center", children: [
5092
5092
  /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(Xt, { className: "w-5 h-5 text-white" }) }),
5093
5093
  l ? /* @__PURE__ */ e("span", { className: "ml-1.5 w-7 xl:w-8 h-7 xl:h-8 overflow-hidden rounded-full", children: /* @__PURE__ */ e(
5094
- ge,
5094
+ he,
5095
5095
  {
5096
5096
  src: l.url,
5097
5097
  alt: o,
@@ -5148,7 +5148,7 @@ const Ol = ({
5148
5148
  /* @__PURE__ */ e(ua, {}),
5149
5149
  /* @__PURE__ */ e("div", { children: /* @__PURE__ */ s("div", { className: "flex flex-col md:flex-row h-screen w-screen relative", children: [
5150
5150
  /* @__PURE__ */ e("div", { className: "hidden md:flex items-center justify-end w-full md:w-1/2 h-full px-16 xl:px-24 relative", children: /* @__PURE__ */ e("div", { className: "absolute inset-0 z-0", children: /* @__PURE__ */ e(
5151
- ge,
5151
+ he,
5152
5152
  {
5153
5153
  src: "/images/15750.jpg",
5154
5154
  alt: "Authentication background",
@@ -5720,7 +5720,7 @@ const Ol = ({
5720
5720
  ] })
5721
5721
  ] });
5722
5722
  }, td = ({ orderId: t }) => {
5723
- const { client: a } = L(), { organization: r, organizationId: i } = ze(), n = fe(), o = K(), l = nt(), { t: d } = ui(), c = r == null ? void 0 : r.configuration.defaultCurrency;
5723
+ const { client: a } = L(), { organization: r, organizationId: i } = ze(), n = ye(), o = K(), l = nt(), { t: d } = ui(), c = r == null ? void 0 : r.configuration.defaultCurrency;
5724
5724
  X(() => {
5725
5725
  if ((n == null ? void 0 : n.get("clearCart")) === "true" && l) {
5726
5726
  localStorage.removeItem("shophost-cart");
@@ -5728,18 +5728,18 @@ const Ol = ({
5728
5728
  Array.from(n.entries())
5729
5729
  );
5730
5730
  b.delete("clearCart");
5731
- const w = b.toString() ? `${l}?${b.toString()}` : l;
5732
- o.replace(w);
5731
+ const S = b.toString() ? `${l}?${b.toString()}` : l;
5732
+ o.replace(S);
5733
5733
  }
5734
5734
  }, [n, o, l]);
5735
5735
  const { data: u, isLoading: p, error: m } = G({
5736
5736
  queryKey: ["order", t],
5737
5737
  refetchInterval: ({ state: b }) => {
5738
- var w, S;
5739
- return ((w = b.data) == null ? void 0 : w.status) !== "completed" && ((S = b.data) == null ? void 0 : S.status) !== "cancelled" ? 30 * 1e3 : !1;
5738
+ var S, w;
5739
+ return ((S = b.data) == null ? void 0 : S.status) !== "completed" && ((w = b.data) == null ? void 0 : w.status) !== "cancelled" ? 30 * 1e3 : !1;
5740
5740
  },
5741
5741
  queryFn: async () => {
5742
- const { status: b, body: w } = await a.order.getOrder({
5742
+ const { status: b, body: S } = await a.order.getOrder({
5743
5743
  params: {
5744
5744
  id: t,
5745
5745
  // Replace with the actual order ID
@@ -5749,7 +5749,7 @@ const Ol = ({
5749
5749
  });
5750
5750
  if (b !== 200)
5751
5751
  throw new Error("Failed to fetch shipping address");
5752
- return w;
5752
+ return S;
5753
5753
  }
5754
5754
  }), h = Se(() => u ? u == null ? void 0 : u.items.map((b) => ({
5755
5755
  title: b.translations[0].title,
@@ -5868,7 +5868,7 @@ const Ol = ({
5868
5868
  }
5869
5869
  }
5870
5870
  ),
5871
- y.map((b, w) => /* @__PURE__ */ e(mi, { ...b }, w))
5871
+ y.map((b, S) => /* @__PURE__ */ e(mi, { ...b }, S))
5872
5872
  ] }) })
5873
5873
  ] }) })
5874
5874
  ] }) })
@@ -5911,7 +5911,7 @@ const Ol = ({
5911
5911
  children: [
5912
5912
  /* @__PURE__ */ s("div", { className: "grid grid-cols-4 gap-x-4 gap-y-4 mt-3", children: [
5913
5913
  /* @__PURE__ */ e(
5914
- me,
5914
+ ge,
5915
5915
  {
5916
5916
  name: "firstname",
5917
5917
  label: "First Name",
@@ -5921,7 +5921,7 @@ const Ol = ({
5921
5921
  }
5922
5922
  ),
5923
5923
  /* @__PURE__ */ e(
5924
- me,
5924
+ ge,
5925
5925
  {
5926
5926
  name: "lastname",
5927
5927
  label: "Last Name",
@@ -5931,7 +5931,7 @@ const Ol = ({
5931
5931
  }
5932
5932
  ),
5933
5933
  /* @__PURE__ */ e(
5934
- me,
5934
+ ge,
5935
5935
  {
5936
5936
  name: "phone",
5937
5937
  label: "Phone",
@@ -5941,7 +5941,7 @@ const Ol = ({
5941
5941
  }
5942
5942
  ),
5943
5943
  /* @__PURE__ */ e(
5944
- me,
5944
+ ge,
5945
5945
  {
5946
5946
  name: "guests",
5947
5947
  label: "Number of Guests",
@@ -5951,7 +5951,7 @@ const Ol = ({
5951
5951
  }
5952
5952
  ),
5953
5953
  /* @__PURE__ */ e(
5954
- me,
5954
+ ge,
5955
5955
  {
5956
5956
  name: "date",
5957
5957
  type: "week-time",
@@ -6193,7 +6193,7 @@ const Ol = ({
6193
6193
  ] })
6194
6194
  ] });
6195
6195
  }, nd = () => {
6196
- const t = fe(), { signIn: a } = Ye(), { baseUrl: r } = L(), i = (t == null ? void 0 : t.get("redirect")) ?? "/checkout/customer-details", {
6196
+ const t = ye(), { signIn: a } = Ye(), { baseUrl: r } = L(), i = (t == null ? void 0 : t.get("redirect")) ?? "/checkout/customer-details", {
6197
6197
  register: n,
6198
6198
  handleSubmit: o,
6199
6199
  formState: { errors: l, isSubmitting: d }
@@ -6307,7 +6307,7 @@ const Ol = ({
6307
6307
  ] })
6308
6308
  ] });
6309
6309
  }, od = () => /* @__PURE__ */ e(nd, {}), ld = () => {
6310
- const t = fe(), { signUp: a, signIn: r } = Ye(), { baseUrl: i } = L(), n = (t == null ? void 0 : t.get("redirect")) ?? "/checkout/customer-details", {
6310
+ const t = ye(), { signUp: a, signIn: r } = Ye(), { baseUrl: i } = L(), n = (t == null ? void 0 : t.get("redirect")) ?? "/checkout/customer-details", {
6311
6311
  register: o,
6312
6312
  handleSubmit: l,
6313
6313
  formState: { errors: d }
@@ -6475,43 +6475,53 @@ const Ol = ({
6475
6475
  subtotal: c,
6476
6476
  shipping: u
6477
6477
  } = ja(), { organization: p, loading: m } = ze(), h = (t == null ? void 0 : t.segments) || [];
6478
- return X(() => {
6478
+ if (X(() => {
6479
6479
  !n && !i && r.push("/account/sign-in?redirect=/checkout/customer-details");
6480
- }, [i, n, r]), m || o || n ? /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center h-screen w-screen bg-gray-900", children: /* @__PURE__ */ e("div", { className: "mb-4", children: /* @__PURE__ */ e("div", { className: "animate-spin rounded-full h-18 w-18 border-b-2 border-teal-500" }) }) }) : p ? !p.configuration.isAcceptingOrders || !p.configuration.isOpen ? /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center h-screen w-screen bg-gray-900 text-center animate-fade-in", children: p.configuration.isOpen ? /* @__PURE__ */ s("div", { className: "relative z-10 max-w-[800px] px-10", children: [
6481
- /* @__PURE__ */ e("h1", { className: "text-2xl sm:text-3xl font-black font-red-hat-display text-white", children: "Unfortunately, We're currently not accepting online orders." }),
6482
- /* @__PURE__ */ s("p", { className: "text-gray-100 font-medium mt-3 text-lg mt-", children: [
6483
- "Please contact us directly for any inquiries. ",
6484
- /* @__PURE__ */ e("br", {}),
6485
- " +48 500 193 738",
6486
- /* @__PURE__ */ e("br", {}),
6487
- " contact@madrasbistro.pl"
6488
- ] }),
6489
- /* @__PURE__ */ e(
6490
- O,
6491
- {
6492
- className: "btn-sm mt-6 text-white bg-teal-500 hover:bg-teal-400 rounded-lg shrink-0",
6493
- href: "/",
6494
- children: "Back to Homepage"
6495
- }
6496
- )
6497
- ] }) : /* @__PURE__ */ s("div", { className: "relative z-10", children: [
6498
- /* @__PURE__ */ e("h1", { className: "text-2xl sm:text-3xl font-black font-red-hat-display text-white", children: "Sorry, we're currently closed" }),
6499
- /* @__PURE__ */ s("p", { className: "text-gray-100 font-medium mt-3 text-lg mt-", children: [
6500
- "Please contact us directly for any inquiries. ",
6501
- /* @__PURE__ */ e("br", {}),
6502
- " +48 500 193 738",
6503
- /* @__PURE__ */ e("br", {}),
6504
- " contact@madrasbistro.pl"
6505
- ] }),
6506
- /* @__PURE__ */ e(
6507
- O,
6508
- {
6509
- className: "btn-sm mt-6 text-white bg-teal-500 hover:bg-teal-400 rounded-lg shrink-0",
6510
- href: "/",
6511
- children: "Back to Homepage"
6512
- }
6513
- )
6514
- ] }) }) : /* @__PURE__ */ s(C, { children: [
6480
+ }, [i, n, r]), m || o || n)
6481
+ return /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center h-screen w-screen bg-gray-900", children: /* @__PURE__ */ e("div", { className: "mb-4", children: /* @__PURE__ */ e("div", { className: "animate-spin rounded-full h-18 w-18 border-b-2 border-teal-500" }) }) });
6482
+ if (!p)
6483
+ return /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center h-screen w-screen bg-gray-900", children: /* @__PURE__ */ e("h1", { className: "text-2xl font-bold", children: "Organization not found" }) });
6484
+ if (!p.configuration.isAcceptingOrders || !p.configuration.isOpen) {
6485
+ const f = [p.phone, p.email].filter(
6486
+ (y) => !!y
6487
+ );
6488
+ return /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center h-screen w-screen bg-gray-900 text-center animate-fade-in", children: p.configuration.isOpen ? /* @__PURE__ */ s("div", { className: "relative z-10 max-w-[800px] px-10", children: [
6489
+ /* @__PURE__ */ e("h1", { className: "text-2xl sm:text-3xl font-black font-red-hat-display text-white", children: "Unfortunately, We're currently not accepting online orders." }),
6490
+ /* @__PURE__ */ s("p", { className: "text-gray-100 font-medium mt-3 text-lg mt-", children: [
6491
+ "Please contact us directly for any inquiries.",
6492
+ f.map((y) => /* @__PURE__ */ s(N.Fragment, { children: [
6493
+ /* @__PURE__ */ e("br", {}),
6494
+ y
6495
+ ] }, y))
6496
+ ] }),
6497
+ /* @__PURE__ */ e(
6498
+ O,
6499
+ {
6500
+ className: "btn-sm mt-6 text-white bg-teal-500 hover:bg-teal-400 rounded-lg shrink-0",
6501
+ href: "/",
6502
+ children: "Back to Homepage"
6503
+ }
6504
+ )
6505
+ ] }) : /* @__PURE__ */ s("div", { className: "relative z-10", children: [
6506
+ /* @__PURE__ */ e("h1", { className: "text-2xl sm:text-3xl font-black font-red-hat-display text-white", children: "Sorry, we're currently closed" }),
6507
+ /* @__PURE__ */ s("p", { className: "text-gray-100 font-medium mt-3 text-lg mt-", children: [
6508
+ "Please contact us directly for any inquiries.",
6509
+ f.map((y) => /* @__PURE__ */ s(N.Fragment, { children: [
6510
+ /* @__PURE__ */ e("br", {}),
6511
+ y
6512
+ ] }, y))
6513
+ ] }),
6514
+ /* @__PURE__ */ e(
6515
+ O,
6516
+ {
6517
+ className: "btn-sm mt-6 text-white bg-teal-500 hover:bg-teal-400 rounded-lg shrink-0",
6518
+ href: "/",
6519
+ children: "Back to Homepage"
6520
+ }
6521
+ )
6522
+ ] }) });
6523
+ }
6524
+ return /* @__PURE__ */ s(C, { children: [
6515
6525
  /* @__PURE__ */ e(
6516
6526
  ua,
6517
6527
  {
@@ -6545,7 +6555,7 @@ const Ol = ({
6545
6555
  ] }) }),
6546
6556
  /* @__PURE__ */ e("div", { className: "flex flex-col items-start 2xl:items-start w-full md:w-1/2 h-full px-6 sm:px-12 xl:px-24 py-8 md:overflow-y-auto relative", children: /* @__PURE__ */ e("div", { className: "py-10 xl:py-24 md:my-auto animate-fade w-full md:max-w-[432px]", children: cd(h) }) })
6547
6557
  ] }) })
6548
- ] }) : /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center h-screen w-screen bg-gray-900", children: /* @__PURE__ */ e("h1", { className: "text-2xl font-bold", children: "Organization not found" }) });
6558
+ ] });
6549
6559
  }, ud = ({
6550
6560
  children: t
6551
6561
  }) => {
@@ -6640,13 +6650,13 @@ const Ol = ({
6640
6650
  onDecrement: f,
6641
6651
  isDecrementDisabled: y,
6642
6652
  onAddToCart: b,
6643
- validationError: w
6653
+ validationError: S
6644
6654
  }) => /* @__PURE__ */ e(
6645
6655
  la,
6646
6656
  {
6647
6657
  open: d,
6648
- onOpenChange: (S) => {
6649
- S || c();
6658
+ onOpenChange: (w) => {
6659
+ w || c();
6650
6660
  },
6651
6661
  children: /* @__PURE__ */ s(
6652
6662
  da,
@@ -6675,15 +6685,15 @@ const Ol = ({
6675
6685
  }
6676
6686
  )
6677
6687
  ] }),
6678
- p.length > 0 ? /* @__PURE__ */ e("div", { className: "px-4", children: p.map((S) => /* @__PURE__ */ e(
6688
+ p.length > 0 ? /* @__PURE__ */ e("div", { className: "px-4", children: p.map((w) => /* @__PURE__ */ e(
6679
6689
  pd,
6680
6690
  {
6681
- group: S,
6682
- renderOptions: () => S.modifiers.map((k) => /* @__PURE__ */ e(
6691
+ group: w,
6692
+ renderOptions: () => w.modifiers.map((k) => /* @__PURE__ */ e(
6683
6693
  md,
6684
6694
  {
6685
6695
  modifier: k,
6686
- groupId: S.id,
6696
+ groupId: w.id,
6687
6697
  children: (v) => l ? l(v) : /* @__PURE__ */ s(
6688
6698
  "div",
6689
6699
  {
@@ -6726,7 +6736,7 @@ const Ol = ({
6726
6736
  /* @__PURE__ */ e("div", { children: k.renderOptions() })
6727
6737
  ] })
6728
6738
  },
6729
- S.id
6739
+ w.id
6730
6740
  )) }) : a,
6731
6741
  i ? i({
6732
6742
  isDecrementDisabled: y,
@@ -6734,7 +6744,7 @@ const Ol = ({
6734
6744
  onDecrement: f,
6735
6745
  onIncrement: h,
6736
6746
  quantity: m,
6737
- validationError: w
6747
+ validationError: S
6738
6748
  }) : /* @__PURE__ */ s(C, { children: [
6739
6749
  /* @__PURE__ */ s("div", { className: "p-4 flex items-center justify-center border-t mt-8", children: [
6740
6750
  /* @__PURE__ */ e(
@@ -6764,7 +6774,7 @@ const Ol = ({
6764
6774
  )
6765
6775
  ] }),
6766
6776
  /* @__PURE__ */ s("div", { className: "p-4 border-t", children: [
6767
- w && /* @__PURE__ */ e("div", { className: "text-red-500 mb-2", children: w }),
6777
+ S && /* @__PURE__ */ e("div", { className: "text-red-500 mb-2", children: S }),
6768
6778
  /* @__PURE__ */ e(
6769
6779
  "button",
6770
6780
  {
@@ -7179,7 +7189,7 @@ const ut = [
7179
7189
  defaultVariants: {
7180
7190
  variant: "primary"
7181
7191
  }
7182
- }), T = R.forwardRef(
7192
+ }), T = N.forwardRef(
7183
7193
  ({
7184
7194
  asChild: t,
7185
7195
  isLoading: a = !1,
@@ -7272,7 +7282,7 @@ const vd = ve(void 0), Ad = ({
7272
7282
  }) => {
7273
7283
  const [r, i] = I(a);
7274
7284
  return /* @__PURE__ */ e(vd.Provider, { value: { flyoutOpen: r, setFlyoutOpen: i }, children: t });
7275
- }, he = ({ className: t, ...a }) => /* @__PURE__ */ s(
7285
+ }, fe = ({ className: t, ...a }) => /* @__PURE__ */ s(
7276
7286
  "svg",
7277
7287
  {
7278
7288
  "aria-hidden": "true",
@@ -7306,45 +7316,46 @@ const vd = ve(void 0), Ad = ({
7306
7316
  ), Mr = ({
7307
7317
  children: t
7308
7318
  }) => {
7309
- var d, c, u, p;
7319
+ var c, u, p, m, h;
7310
7320
  const { client: a } = L(), { organizationId: r } = kd(), i = G({
7311
7321
  queryKey: ["organizations"],
7312
7322
  queryFn: async () => {
7313
- const { body: m, status: h } = await a.organization.getOrganizations();
7314
- if (h !== 200)
7315
- throw h !== 401 && se.error(
7323
+ const { body: f, status: y } = await a.organization.getOrganizations();
7324
+ if (y !== 200)
7325
+ throw y !== 401 && se.error(
7316
7326
  "Failed to update organizations list. Please refresh the page or try again later."
7317
7327
  ), new Error("Failed to fetch organizations");
7318
- return m;
7328
+ return f;
7319
7329
  },
7320
7330
  retry: !1
7321
7331
  }), n = G({
7322
7332
  queryKey: ["organization", r],
7323
7333
  queryFn: async () => {
7324
- const { body: m, status: h } = await a.organization.getOrganization({
7334
+ const { body: f, status: y } = await a.organization.getOrganization({
7325
7335
  params: {
7326
7336
  organizationId: r
7327
7337
  }
7328
7338
  });
7329
- if (h !== 200)
7330
- throw h !== 401 && se.error(
7339
+ if (y !== 200)
7340
+ throw y !== 401 && se.error(
7331
7341
  "Failed to fetch organization. Please try refreshing the page or try again later."
7332
7342
  ), new Error("Failed to fetch organizations");
7333
- return m;
7343
+ return f;
7334
7344
  },
7335
7345
  enabled: !!r
7336
- }), o = ((d = n.data) == null ? void 0 : d.configuration.defaultLocale) ?? "en", l = ((u = (c = n.data) == null ? void 0 : c.configuration.supportedLocales) == null ? void 0 : u.sort(
7337
- (m) => m === o ? -1 : 1
7346
+ }), o = ((c = n.data) == null ? void 0 : c.configuration.defaultLocale) ?? "en", l = ((u = n.data) == null ? void 0 : u.configuration.defaultCurrency) ?? "USD", d = ((m = (p = n.data) == null ? void 0 : p.configuration.supportedLocales) == null ? void 0 : m.sort(
7347
+ (f) => f === o ? -1 : 1
7338
7348
  )) || ["en"];
7339
7349
  return /* @__PURE__ */ e(
7340
7350
  yi.Provider,
7341
7351
  {
7342
7352
  value: {
7343
7353
  defaultLocale: o,
7344
- supportedLocales: l,
7354
+ defaultCurrency: l,
7355
+ supportedLocales: d,
7345
7356
  organizations: {
7346
7357
  loading: i.isLoading,
7347
- data: ((p = i.data) == null ? void 0 : p.list) ?? [],
7358
+ data: ((h = i.data) == null ? void 0 : h.list) ?? [],
7348
7359
  error: i.isError
7349
7360
  },
7350
7361
  organization: {
@@ -7354,12 +7365,12 @@ const vd = ve(void 0), Ad = ({
7354
7365
  }
7355
7366
  },
7356
7367
  children: n.isLoading || i.isLoading ? /* @__PURE__ */ e("div", { className: "flex justify-center items-center h-screen mt-5", children: /* @__PURE__ */ s("div", { className: "flex flex-col items-center gap-2", children: [
7357
- /* @__PURE__ */ e(he, { className: "w-12 h-12" }),
7368
+ /* @__PURE__ */ e(fe, { className: "w-12 h-12" }),
7358
7369
  /* @__PURE__ */ e("p", { className: "text-gray-500 text-sm mt-3", children: "Loading data..." })
7359
7370
  ] }) }) : t
7360
7371
  }
7361
7372
  );
7362
- }, ye = () => {
7373
+ }, pe = () => {
7363
7374
  const t = le(yi);
7364
7375
  if (!t)
7365
7376
  throw new Error(
@@ -7397,7 +7408,7 @@ const vd = ve(void 0), Ad = ({
7397
7408
  defaultVariants: {
7398
7409
  variant: "default"
7399
7410
  }
7400
- }), Tt = R.forwardRef(
7411
+ }), Tt = N.forwardRef(
7401
7412
  ({ className: t, variant: a, ...r }, i) => /* @__PURE__ */ e(
7402
7413
  "span",
7403
7414
  {
@@ -13079,7 +13090,7 @@ function va(t, a) {
13079
13090
  return !0;
13080
13091
  }
13081
13092
  const Td = (t) => {
13082
- N.useEffect(() => {
13093
+ R.useEffect(() => {
13083
13094
  const a = () => {
13084
13095
  t();
13085
13096
  };
@@ -13133,10 +13144,10 @@ const Td = (t) => {
13133
13144
  }
13134
13145
  );
13135
13146
  }, Br = ({ icon: t, onClick: a, disabled: r }) => {
13136
- const i = t, [n, o] = R.useState(!1), l = R.useRef(null);
13137
- return R.useEffect(() => (n ? l.current = setInterval(() => {
13147
+ const i = t, [n, o] = N.useState(!1), l = N.useRef(null);
13148
+ return N.useEffect(() => (n ? l.current = setInterval(() => {
13138
13149
  a == null || a();
13139
- }, 300) : clearInterval(l.current), () => clearInterval(l.current)), [n, a]), R.useEffect(() => {
13150
+ }, 300) : clearInterval(l.current), () => clearInterval(l.current)), [n, a]), N.useEffect(() => {
13140
13151
  r && (clearInterval(l.current), o(!1));
13141
13152
  }, [r]), /* @__PURE__ */ e(
13142
13153
  "button",
@@ -13160,7 +13171,7 @@ const Td = (t) => {
13160
13171
  children: /* @__PURE__ */ e(i, { className: "size-full", "aria-hidden": "true" })
13161
13172
  }
13162
13173
  );
13163
- }, xi = R.forwardRef((t, a) => {
13174
+ }, xi = N.forwardRef((t, a) => {
13164
13175
  const {
13165
13176
  categories: r,
13166
13177
  colors: i = bi,
@@ -13169,12 +13180,12 @@ const Td = (t) => {
13169
13180
  activeLegend: l,
13170
13181
  enableLegendSlider: d = !1,
13171
13182
  ...c
13172
- } = t, u = R.useRef(null), [p, m] = R.useState(null), [h, f] = R.useState(null), y = R.useRef(null), b = R.useCallback(() => {
13183
+ } = t, u = N.useRef(null), [p, m] = N.useState(null), [h, f] = N.useState(null), y = N.useRef(null), b = N.useCallback(() => {
13173
13184
  const v = u == null ? void 0 : u.current;
13174
13185
  if (!v) return;
13175
13186
  const A = v.scrollLeft > 0, P = v.scrollWidth - v.clientWidth > v.scrollLeft;
13176
13187
  m({ left: A, right: P });
13177
- }, [m]), w = R.useCallback(
13188
+ }, [m]), S = N.useCallback(
13178
13189
  (v) => {
13179
13190
  const A = u == null ? void 0 : u.current, P = (A == null ? void 0 : A.clientWidth) ?? 0;
13180
13191
  A && d && (A.scrollTo({
@@ -13186,23 +13197,23 @@ const Td = (t) => {
13186
13197
  },
13187
13198
  [d, b]
13188
13199
  );
13189
- R.useEffect(() => {
13200
+ N.useEffect(() => {
13190
13201
  const v = (A) => {
13191
- A === "ArrowLeft" ? w("left") : A === "ArrowRight" && w("right");
13202
+ A === "ArrowLeft" ? S("left") : A === "ArrowRight" && S("right");
13192
13203
  };
13193
13204
  return h ? (v(h), y.current = setInterval(() => {
13194
13205
  v(h);
13195
13206
  }, 300)) : clearInterval(y.current), () => clearInterval(y.current);
13196
- }, [h, w]);
13197
- const S = (v) => {
13207
+ }, [h, S]);
13208
+ const w = (v) => {
13198
13209
  v.stopPropagation(), (v.key === "ArrowLeft" || v.key === "ArrowRight") && (v.preventDefault(), f(v.key));
13199
13210
  }, k = (v) => {
13200
13211
  v.stopPropagation(), f(null);
13201
13212
  };
13202
- return R.useEffect(() => {
13213
+ return N.useEffect(() => {
13203
13214
  const v = u == null ? void 0 : u.current;
13204
- return d && (b(), v == null || v.addEventListener("keydown", S), v == null || v.addEventListener("keyup", k)), () => {
13205
- v == null || v.removeEventListener("keydown", S), v == null || v.removeEventListener("keyup", k);
13215
+ return d && (b(), v == null || v.addEventListener("keydown", w), v == null || v.addEventListener("keyup", k)), () => {
13216
+ v == null || v.removeEventListener("keydown", w), v == null || v.removeEventListener("keyup", k);
13206
13217
  };
13207
13218
  }, [b, d]), /* @__PURE__ */ s(
13208
13219
  "ol",
@@ -13247,7 +13258,7 @@ const Td = (t) => {
13247
13258
  {
13248
13259
  icon: Ut,
13249
13260
  onClick: () => {
13250
- f(null), w("left");
13261
+ f(null), S("left");
13251
13262
  },
13252
13263
  disabled: !(p != null && p.left)
13253
13264
  }
@@ -13257,7 +13268,7 @@ const Td = (t) => {
13257
13268
  {
13258
13269
  icon: it,
13259
13270
  onClick: () => {
13260
- f(null), w("right");
13271
+ f(null), S("right");
13261
13272
  },
13262
13273
  disabled: !(p != null && p.right)
13263
13274
  }
@@ -13271,7 +13282,7 @@ const Td = (t) => {
13271
13282
  });
13272
13283
  xi.displayName = "Legend";
13273
13284
  const Id = ({ payload: t }, a, r, i, n, o) => {
13274
- const l = R.useRef(null);
13285
+ const l = N.useRef(null);
13275
13286
  Td(() => {
13276
13287
  var u;
13277
13288
  r(((p) => p ? Number(p) + 15 : 60)((u = l.current) == null ? void 0 : u.clientHeight));
@@ -13380,7 +13391,7 @@ const Id = ({ payload: t }, a, r, i, n, o) => {
13380
13391
  ) : null;
13381
13392
  }
13382
13393
  return null;
13383
- }, Si = R.forwardRef(
13394
+ }, Si = N.forwardRef(
13384
13395
  (t, a) => {
13385
13396
  const {
13386
13397
  data: r = [],
@@ -13397,8 +13408,8 @@ const Id = ({ payload: t }, a, r, i, n, o) => {
13397
13408
  showTooltip: f = !0,
13398
13409
  showLegend: y = !0,
13399
13410
  autoMinValue: b = !1,
13400
- minValue: w,
13401
- maxValue: S,
13411
+ minValue: S,
13412
+ maxValue: w,
13402
13413
  allowDecimals: k = !0,
13403
13414
  connectNulls: v = !1,
13404
13415
  className: A,
@@ -13408,11 +13419,11 @@ const Id = ({ payload: t }, a, r, i, n, o) => {
13408
13419
  xAxisLabel: ae,
13409
13420
  yAxisLabel: Z,
13410
13421
  ...J
13411
- } = t, Te = !c && !u ? 0 : 20, [We, et] = R.useState(60), [U, Me] = R.useState(
13422
+ } = t, Te = !c && !u ? 0 : 20, [We, et] = N.useState(60), [U, Me] = N.useState(
13412
13423
  void 0
13413
- ), [M, D] = R.useState(
13424
+ ), [M, D] = N.useState(
13414
13425
  void 0
13415
- ), B = Cd(i, o), pe = Pd(b, w, S), zt = !!P;
13426
+ ), B = Cd(i, o), me = Pd(b, S, w), zt = !!P;
13416
13427
  function xn(z, we) {
13417
13428
  we.stopPropagation(), zt && (z.index === (U == null ? void 0 : U.index) && z.dataKey === (U == null ? void 0 : U.dataKey) || va(r, z.dataKey) && M && M === z.dataKey ? (D(void 0), Me(void 0), P == null || P(null)) : (D(z.dataKey), Me({
13418
13429
  index: z.index,
@@ -13490,7 +13501,7 @@ const Id = ({ payload: t }, a, r, i, n, o) => {
13490
13501
  axisLine: !1,
13491
13502
  tickLine: !1,
13492
13503
  type: "number",
13493
- domain: pe,
13504
+ domain: me,
13494
13505
  tick: { transform: "translate(-3, 0)" },
13495
13506
  fill: "",
13496
13507
  stroke: "",
@@ -13629,7 +13640,7 @@ const Id = ({ payload: t }, a, r, i, n, o) => {
13629
13640
  )
13630
13641
  },
13631
13642
  Mt
13632
- ) : /* @__PURE__ */ e(R.Fragment, {}, Mt);
13643
+ ) : /* @__PURE__ */ e(N.Fragment, {}, Mt);
13633
13644
  },
13634
13645
  name: z,
13635
13646
  type: "linear",
@@ -13671,7 +13682,7 @@ const Id = ({ payload: t }, a, r, i, n, o) => {
13671
13682
  }
13672
13683
  );
13673
13684
  Si.displayName = "LineChart";
13674
- const Le = R.forwardRef(({ className: t, checked: a, ...r }, i) => /* @__PURE__ */ e(
13685
+ const Le = N.forwardRef(({ className: t, checked: a, ...r }, i) => /* @__PURE__ */ e(
13675
13686
  Ar.Root,
13676
13687
  {
13677
13688
  ref: i,
@@ -13750,7 +13761,7 @@ const Le = R.forwardRef(({ className: t, checked: a, ...r }, i) => /* @__PURE__
13750
13761
  }
13751
13762
  ));
13752
13763
  Le.displayName = "Checkbox";
13753
- const yt = N.forwardRef(
13764
+ const yt = R.forwardRef(
13754
13765
  ({ onClick: t, icon: a, disabled: r, ...i }, n) => {
13755
13766
  const o = a;
13756
13767
  return /* @__PURE__ */ e(
@@ -13846,21 +13857,21 @@ const ki = ({
13846
13857
  previousMonth: h,
13847
13858
  currentMonth: f,
13848
13859
  displayMonths: y
13849
- } = po(), { numberOfMonths: b, fromDate: w, toDate: S } = mo(), k = y.findIndex(
13860
+ } = po(), { numberOfMonths: b, fromDate: S, toDate: w } = mo(), k = y.findIndex(
13850
13861
  (Z) => Gn(u.displayMonth, Z)
13851
13862
  ), v = k === 0, A = k === y.length - 1, P = b > 1 && (v || !A), _ = b > 1 && (A || !v), ie = () => {
13852
13863
  const Z = Bt(f, -1);
13853
- h && (!w || Z.getTime() >= w.getTime()) && p(Z);
13864
+ h && (!S || Z.getTime() >= S.getTime()) && p(Z);
13854
13865
  }, ae = () => {
13855
13866
  const Z = Bt(f, 1);
13856
- m && (!S || Z.getTime() <= S.getTime()) && p(Z);
13867
+ m && (!w || Z.getTime() <= w.getTime()) && p(Z);
13857
13868
  };
13858
13869
  return /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
13859
13870
  /* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
13860
13871
  i && !_ && /* @__PURE__ */ e(
13861
13872
  yt,
13862
13873
  {
13863
- disabled: n || !h || w && Bt(f, -1).getTime() < w.getTime(),
13874
+ disabled: n || !h || S && Bt(f, -1).getTime() < S.getTime(),
13864
13875
  "aria-label": "Go to previous year",
13865
13876
  onClick: ie,
13866
13877
  icon: hs
@@ -13898,7 +13909,7 @@ const ki = ({
13898
13909
  i && !P && /* @__PURE__ */ e(
13899
13910
  yt,
13900
13911
  {
13901
- disabled: n || !m || S && Bt(f, 1).getTime() > S.getTime(),
13912
+ disabled: n || !m || w && Bt(f, 1).getTime() > w.getTime(),
13902
13913
  "aria-label": "Go to next year",
13903
13914
  onClick: ae,
13904
13915
  icon: fs
@@ -13908,8 +13919,8 @@ const ki = ({
13908
13919
  ] });
13909
13920
  },
13910
13921
  Day: ({ date: u, displayMonth: p }) => {
13911
- const m = N.useRef(null), { activeModifiers: h, buttonProps: f, divProps: y, isButton: b, isHidden: w } = uo(u, p, m), { selected: S, today: k, disabled: v, range_middle: A } = h;
13912
- if (w)
13922
+ const m = R.useRef(null), { activeModifiers: h, buttonProps: f, divProps: y, isButton: b, isHidden: S } = uo(u, p, m), { selected: w, today: k, disabled: v, range_middle: A } = h;
13923
+ if (S)
13913
13924
  return /* @__PURE__ */ e(C, {});
13914
13925
  if (!b)
13915
13926
  return /* @__PURE__ */ e(
@@ -13942,9 +13953,9 @@ const ki = ({
13942
13953
  className: x(
13943
13954
  "absolute inset-x-1/2 bottom-1.5 h-0.5 w-4 -translate-x-1/2 rounded-[2px]",
13944
13955
  {
13945
- "bg-blue-500 dark:bg-blue-500": !S,
13946
- "bg-white! dark:bg-gray-950!": S,
13947
- "bg-gray-400! dark:bg-gray-600!": S && A,
13956
+ "bg-blue-500 dark:bg-blue-500": !w,
13957
+ "bg-white! dark:bg-gray-950!": w,
13958
+ "bg-gray-400! dark:bg-gray-600!": w && A,
13948
13959
  "bg-gray-400 text-gray-400 dark:bg-gray-400 dark:text-gray-600": v
13949
13960
  }
13950
13961
  )
@@ -13965,7 +13976,7 @@ const Dd = () => {
13965
13976
  }).format();
13966
13977
  return Number.isInteger(Number(a));
13967
13978
  }, zd = ({ segment: t, state: a }) => {
13968
- const r = N.useRef(null), { segmentProps: i } = no(t, a, r), n = t.type === "literal" && t.text === ":", o = t.type === "literal" && t.text === " ";
13979
+ const r = R.useRef(null), { segmentProps: i } = no(t, a, r), n = t.type === "literal" && t.text === ":", o = t.type === "literal" && t.text === " ";
13969
13980
  return /* @__PURE__ */ s(
13970
13981
  "div",
13971
13982
  {
@@ -14010,10 +14021,10 @@ const Dd = () => {
14010
14021
  ]
14011
14022
  }
14012
14023
  );
14013
- }, La = N.forwardRef(
14024
+ }, La = R.forwardRef(
14014
14025
  ({ hourCycle: t, ...a }, r) => {
14015
- const i = N.useRef(null);
14016
- N.useImperativeHandle(
14026
+ const i = R.useRef(null);
14027
+ R.useImperativeHandle(
14017
14028
  r,
14018
14029
  () => i == null ? void 0 : i.current
14019
14030
  );
@@ -14072,7 +14083,7 @@ const Md = Pe({
14072
14083
  true: pa
14073
14084
  }
14074
14085
  }
14075
- }), vi = N.forwardRef(
14086
+ }), vi = R.forwardRef(
14076
14087
  ({ className: t, children: a, placeholder: r, hasError: i, ...n }, o) => /* @__PURE__ */ e(W.Trigger, { asChild: !0, children: /* @__PURE__ */ s(
14077
14088
  "button",
14078
14089
  {
@@ -14087,7 +14098,7 @@ const Md = Pe({
14087
14098
  ) })
14088
14099
  );
14089
14100
  vi.displayName = "DatePicker.Trigger";
14090
- const Ai = N.forwardRef(({ align: t, className: a, children: r, ...i }, n) => /* @__PURE__ */ e(W.Portal, { children: /* @__PURE__ */ e(
14101
+ const Ai = R.forwardRef(({ align: t, className: a, children: r, ...i }, n) => /* @__PURE__ */ e(W.Portal, { children: /* @__PURE__ */ e(
14091
14102
  W.Content,
14092
14103
  {
14093
14104
  ref: n,
@@ -14131,8 +14142,8 @@ const Ni = ({
14131
14142
  let f = !1;
14132
14143
  m && h && l(m, h) && (f = !0);
14133
14144
  const y = u.to, b = p.to;
14134
- let w = !1;
14135
- return y && b && l(y, b) && (w = !0), f && w;
14145
+ let S = !1;
14146
+ return y && b && l(y, b) && (S = !0), f && S;
14136
14147
  }, c = (u) => {
14137
14148
  if (i(u)) {
14138
14149
  const p = r;
@@ -14192,20 +14203,20 @@ const Jr = (t, a, r) => {
14192
14203
  className: y,
14193
14204
  ...b
14194
14205
  }) => {
14195
- const [w, S] = N.useState(!1), [k, v] = N.useState(
14206
+ const [S, w] = R.useState(!1), [k, v] = R.useState(
14196
14207
  a ?? t ?? void 0
14197
- ), [A, P] = N.useState(k == null ? void 0 : k.from), [_, ie] = N.useState(
14208
+ ), [A, P] = R.useState(k == null ? void 0 : k.from), [_, ie] = R.useState(
14198
14209
  a != null && a.from ? new re(a.from.getHours(), a.from.getMinutes()) : t != null && t.from ? new re(t.from.getHours(), t.from.getMinutes()) : new re(0, 0)
14199
- ), [ae, Z] = N.useState(
14210
+ ), [ae, Z] = R.useState(
14200
14211
  a != null && a.to ? new re(a.to.getHours(), a.to.getMinutes()) : t != null && t.to ? new re(t.to.getHours(), t.to.getMinutes()) : new re(0, 0)
14201
- ), J = N.useMemo(() => k, [w]);
14202
- N.useEffect(() => {
14212
+ ), J = R.useMemo(() => k, [S]);
14213
+ R.useEffect(() => {
14203
14214
  v(a ?? t ?? void 0);
14204
- }, [a, t]), N.useEffect(() => {
14215
+ }, [a, t]), R.useEffect(() => {
14205
14216
  k && P(k.from);
14206
- }, [k]), N.useEffect(() => {
14207
- w || P(k == null ? void 0 : k.from);
14208
- }, [w]);
14217
+ }, [k]), R.useEffect(() => {
14218
+ S || P(k == null ? void 0 : k.from);
14219
+ }, [S]);
14209
14220
  const Te = (D) => {
14210
14221
  const B = D;
14211
14222
  u && (B != null && B.from && !_ && ie(new re(0, 0)), B != null && B.to && !ae && Z(new re(0, 0)), B != null && B.from && _ && (B.from.setHours(_.hour), B.from.setMinutes(_.minute)), B != null && B.to && ae && (B.to.setHours(ae.hour), B.to.setMinutes(ae.minute))), v(B);
@@ -14214,9 +14225,9 @@ const Jr = (t, a, r) => {
14214
14225
  J != null && J.from ? new re(J.from.getHours(), J.from.getMinutes()) : new re(0, 0)
14215
14226
  ), Z(
14216
14227
  J != null && J.to ? new re(J.to.getHours(), J.to.getMinutes()) : new re(0, 0)
14217
- ), S(!1);
14228
+ ), w(!1);
14218
14229
  }, et = (D) => {
14219
- D || We(), S(D);
14230
+ D || We(), w(D);
14220
14231
  }, U = (D, B) => {
14221
14232
  switch (B) {
14222
14233
  case "start":
@@ -14230,24 +14241,24 @@ const Jr = (t, a, r) => {
14230
14241
  if (B === "start") {
14231
14242
  if (!k.from)
14232
14243
  return;
14233
- const pe = new Date(k.from.getTime());
14234
- D ? (pe.setHours(D.hour), pe.setMinutes(D.minute)) : (pe.setHours(0), pe.setMinutes(0)), v({
14244
+ const me = new Date(k.from.getTime());
14245
+ D ? (me.setHours(D.hour), me.setMinutes(D.minute)) : (me.setHours(0), me.setMinutes(0)), v({
14235
14246
  ...k,
14236
- from: pe
14247
+ from: me
14237
14248
  });
14238
14249
  }
14239
14250
  if (B === "end") {
14240
14251
  if (!k.to)
14241
14252
  return;
14242
- const pe = new Date(k.to.getTime());
14243
- D ? (pe.setHours(D.hour), pe.setMinutes(D.minute)) : (pe.setHours(0), pe.setMinutes(0)), v({
14253
+ const me = new Date(k.to.getTime());
14254
+ D ? (me.setHours(D.hour), me.setMinutes(D.minute)) : (me.setHours(0), me.setMinutes(0)), v({
14244
14255
  ...k,
14245
- to: pe
14256
+ to: me
14246
14257
  });
14247
14258
  }
14248
14259
  }
14249
14260
  };
14250
- N.useEffect(() => {
14261
+ R.useEffect(() => {
14251
14262
  v(a ?? t ?? void 0), ie(
14252
14263
  a != null && a.from ? new re(a.from.getHours(), a.from.getMinutes()) : t != null && t.from ? new re(
14253
14264
  t.from.getHours(),
@@ -14257,14 +14268,14 @@ const Jr = (t, a, r) => {
14257
14268
  a != null && a.to ? new re(a.to.getHours(), a.to.getMinutes()) : t != null && t.to ? new re(t.to.getHours(), t.to.getMinutes()) : new re(0, 0)
14258
14269
  );
14259
14270
  }, [a, t]);
14260
- const Me = N.useMemo(() => k ? `${k.from ? Jr(k.from, c, u) : ""} - ${k.to ? Jr(k.to, c, u) : ""}` : null, [k, c, u]), M = () => {
14261
- S(!1), r == null || r(k);
14271
+ const Me = R.useMemo(() => k ? `${k.from ? Jr(k.from, c, u) : ""} - ${k.to ? Jr(k.to, c, u) : ""}` : null, [k, c, u]), M = () => {
14272
+ w(!1), r == null || r(k);
14262
14273
  };
14263
14274
  return /* @__PURE__ */ s(
14264
14275
  W.Root,
14265
14276
  {
14266
14277
  "tremor-id": "tremor-raw",
14267
- open: w,
14278
+ open: S,
14268
14279
  onOpenChange: et,
14269
14280
  children: [
14270
14281
  /* @__PURE__ */ e(
@@ -14398,14 +14409,14 @@ const Jr = (t, a, r) => {
14398
14409
  if (t && t.length > 0) {
14399
14410
  const c = i, u = r;
14400
14411
  t.forEach((p) => {
14401
- var m, h, f, y, b, w;
14412
+ var m, h, f, y, b, S;
14402
14413
  if ("date" in p) {
14403
- const S = p.date.getFullYear();
14404
- if (i && S < i)
14414
+ const w = p.date.getFullYear();
14415
+ if (i && w < i)
14405
14416
  throw new Error(
14406
14417
  `Preset ${p.label} is before fromYear ${c}.`
14407
14418
  );
14408
- if (r && S > r)
14419
+ if (r && w > r)
14409
14420
  throw new Error(
14410
14421
  `Preset ${p.label} is after toYear ${u}.`
14411
14422
  );
@@ -14430,8 +14441,8 @@ const Jr = (t, a, r) => {
14430
14441
  );
14431
14442
  }
14432
14443
  if ("dateRange" in p) {
14433
- const S = (m = p.dateRange.from) == null ? void 0 : m.getFullYear(), k = (h = p.dateRange.to) == null ? void 0 : h.getFullYear();
14434
- if (S && i && S < i)
14444
+ const w = (m = p.dateRange.from) == null ? void 0 : m.getFullYear(), k = (h = p.dateRange.to) == null ? void 0 : h.getFullYear();
14445
+ if (w && i && w < i)
14435
14446
  throw new Error(
14436
14447
  `Preset ${p.label}'s 'from' is before fromYear ${c}.`
14437
14448
  );
@@ -14467,7 +14478,7 @@ const Jr = (t, a, r) => {
14467
14478
  );
14468
14479
  }
14469
14480
  if (d) {
14470
- const v = (w = p.dateRange.to) == null ? void 0 : w.getDate();
14481
+ const v = (S = p.dateRange.to) == null ? void 0 : S.getDate();
14471
14482
  if (v && v > d.getDate())
14472
14483
  throw new Error(
14473
14484
  `Preset ${p.label}'s 'to' is after toDay ${V(
@@ -14489,7 +14500,7 @@ const qt = H.Close;
14489
14500
  qt.displayName = "DialogClose";
14490
14501
  const Ci = H.Portal;
14491
14502
  Ci.displayName = "DialogPortal";
14492
- const Pi = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
14503
+ const Pi = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
14493
14504
  H.Overlay,
14494
14505
  {
14495
14506
  ref: r,
@@ -14506,7 +14517,7 @@ const Pi = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
14506
14517
  }
14507
14518
  ));
14508
14519
  Pi.displayName = "DialogOverlay";
14509
- const It = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(Ci, { children: /* @__PURE__ */ e(Pi, { children: /* @__PURE__ */ e(
14520
+ const It = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(Ci, { children: /* @__PURE__ */ e(Pi, { children: /* @__PURE__ */ e(
14510
14521
  H.Content,
14511
14522
  {
14512
14523
  ref: r,
@@ -14531,7 +14542,7 @@ const Lt = ({
14531
14542
  ...a
14532
14543
  }) => /* @__PURE__ */ e("div", { className: x("flex flex-col gap-y-1", t), ...a });
14533
14544
  Lt.displayName = "DialogHeader";
14534
- const Et = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
14545
+ const Et = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
14535
14546
  H.Title,
14536
14547
  {
14537
14548
  ref: r,
@@ -14546,7 +14557,7 @@ const Et = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
14546
14557
  }
14547
14558
  ));
14548
14559
  Et.displayName = "DialogTitle";
14549
- const Dt = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
14560
+ const Dt = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
14550
14561
  H.Description,
14551
14562
  {
14552
14563
  ref: r,
@@ -14569,7 +14580,7 @@ const Ti = ({
14569
14580
  }
14570
14581
  );
14571
14582
  Ti.displayName = "DialogFooter";
14572
- const be = N.forwardRef(({ className: t, disabled: a, ...r }, i) => /* @__PURE__ */ e(
14583
+ const be = R.forwardRef(({ className: t, disabled: a, ...r }, i) => /* @__PURE__ */ e(
14573
14584
  Ns.Root,
14574
14585
  {
14575
14586
  ref: i,
@@ -14616,7 +14627,7 @@ const Fd = [
14616
14627
  // invalid (optional)
14617
14628
  // "dark:aria-invalid:ring-red-400/20 aria-invalid:ring-2 aria-invalid:ring-red-200 aria-invalid:border-red-500 invalid:ring-2 invalid:ring-red-200 invalid:border-red-500"
14618
14629
  )
14619
- ], Li = R.forwardRef(({ className: t, hasError: a, children: r, ...i }, n) => /* @__PURE__ */ s(
14630
+ ], Li = N.forwardRef(({ className: t, hasError: a, children: r, ...i }, n) => /* @__PURE__ */ s(
14620
14631
  Y.Trigger,
14621
14632
  {
14622
14633
  ref: n,
@@ -14645,7 +14656,7 @@ const Fd = [
14645
14656
  }
14646
14657
  ));
14647
14658
  Li.displayName = "SelectTrigger";
14648
- const Ei = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
14659
+ const Ei = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
14649
14660
  Y.ScrollUpButton,
14650
14661
  {
14651
14662
  ref: r,
@@ -14658,7 +14669,7 @@ const Ei = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
14658
14669
  }
14659
14670
  ));
14660
14671
  Ei.displayName = Y.ScrollUpButton.displayName;
14661
- const Di = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
14672
+ const Di = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
14662
14673
  Y.ScrollDownButton,
14663
14674
  {
14664
14675
  ref: r,
@@ -14671,7 +14682,7 @@ const Di = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
14671
14682
  }
14672
14683
  ));
14673
14684
  Di.displayName = Y.ScrollDownButton.displayName;
14674
- const zi = R.forwardRef(
14685
+ const zi = N.forwardRef(
14675
14686
  ({
14676
14687
  className: t,
14677
14688
  position: a = "popper",
@@ -14725,7 +14736,7 @@ const zi = R.forwardRef(
14725
14736
  ) })
14726
14737
  );
14727
14738
  zi.displayName = "SelectContent";
14728
- const jd = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
14739
+ const jd = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
14729
14740
  Y.Label,
14730
14741
  {
14731
14742
  ref: r,
@@ -14740,7 +14751,7 @@ const jd = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
14740
14751
  }
14741
14752
  ));
14742
14753
  jd.displayName = "SelectGroupLabel";
14743
- const Vd = R.forwardRef(({ className: t, children: a, ...r }, i) => /* @__PURE__ */ s(
14754
+ const Vd = N.forwardRef(({ className: t, children: a, ...r }, i) => /* @__PURE__ */ s(
14744
14755
  Y.Item,
14745
14756
  {
14746
14757
  ref: i,
@@ -14771,7 +14782,7 @@ const Vd = R.forwardRef(({ className: t, children: a, ...r }, i) => /* @__PURE__
14771
14782
  }
14772
14783
  ));
14773
14784
  Vd.displayName = "SelectItem";
14774
- const Mi = R.forwardRef(({ className: t, children: a, period: r, ...i }, n) => /* @__PURE__ */ s(
14785
+ const Mi = N.forwardRef(({ className: t, children: a, period: r, ...i }, n) => /* @__PURE__ */ s(
14775
14786
  Y.Item,
14776
14787
  {
14777
14788
  ref: n,
@@ -14810,7 +14821,7 @@ const Mi = R.forwardRef(({ className: t, children: a, period: r, ...i }, n) => /
14810
14821
  }
14811
14822
  ));
14812
14823
  Mi.displayName = "SelectItemPeriod";
14813
- const Hd = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
14824
+ const Hd = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
14814
14825
  Y.Separator,
14815
14826
  {
14816
14827
  ref: r,
@@ -14868,7 +14879,7 @@ function Ud({
14868
14879
  setSelectedCategories: d,
14869
14880
  selectedCategories: c
14870
14881
  }) {
14871
- const [u, p] = R.useState(c), m = (f) => {
14882
+ const [u, p] = N.useState(c), m = (f) => {
14872
14883
  p(
14873
14884
  (y) => y.includes(f) ? y.filter((b) => b !== f) : [...y, f]
14874
14885
  );
@@ -14998,23 +15009,23 @@ function Oi({
14998
15009
  selectedPeriod: i,
14999
15010
  isThumbnail: n
15000
15011
  }) {
15001
- const o = Wd[a], l = r != null && r.from && (r != null && r.to) ? Ot(r.from, r.to) : null, d = r != null && r.from && (r != null && r.to) ? Ss(Ot(r.from, r.to)) : null, c = Bi(r, i), u = c != null && c.from && (c != null && c.to) ? Ot(c.from, c.to) : null, p = Ia.filter((S) => l ? br(S.date, l) : !0).sort((S, k) => new Date(S.date).getTime() - new Date(k.date).getTime()), m = Ia.filter((S) => u ? br(S.date, u) : !1).sort((S, k) => new Date(S.date).getTime() - new Date(k.date).getTime()), h = d == null ? void 0 : d.map((S, k) => {
15012
+ const o = Wd[a], l = r != null && r.from && (r != null && r.to) ? Ot(r.from, r.to) : null, d = r != null && r.from && (r != null && r.to) ? Ss(Ot(r.from, r.to)) : null, c = Bi(r, i), u = c != null && c.from && (c != null && c.to) ? Ot(c.from, c.to) : null, p = Ia.filter((w) => l ? br(w.date, l) : !0).sort((w, k) => new Date(w.date).getTime() - new Date(k.date).getTime()), m = Ia.filter((w) => u ? br(w.date, u) : !1).sort((w, k) => new Date(w.date).getTime() - new Date(k.date).getTime()), h = d == null ? void 0 : d.map((w, k) => {
15002
15013
  const v = p[k], A = m[k], P = (v == null ? void 0 : v[t]) || null, _ = (A == null ? void 0 : A[t]) || null;
15003
15014
  return {
15004
15015
  title: t,
15005
- date: S,
15006
- formattedDate: xr(S, "dd/MM/yyyy"),
15016
+ date: w,
15017
+ formattedDate: xr(w, "dd/MM/yyyy"),
15007
15018
  value: P,
15008
15019
  previousDate: A == null ? void 0 : A.date,
15009
15020
  previousFormattedDate: A ? xr(A.date, "dd/MM/yyyy") : null,
15010
15021
  previousValue: i !== "no-comparison" ? _ : null,
15011
15022
  evolution: i !== "no-comparison" && P && _ ? (P - _) / _ : void 0
15012
15023
  };
15013
- }).sort((S, k) => new Date(S.date).getTime() - new Date(k.date).getTime()), f = i === "no-comparison" ? ["value"] : ["value", "previousValue"], y = (h == null ? void 0 : h.reduce((S, k) => S + (k.value || 0), 0)) || 0, b = (h == null ? void 0 : h.reduce((S, k) => S + (k.previousValue || 0), 0)) || 0, w = i !== "no-comparison" ? (y - b) / b : 0;
15024
+ }).sort((w, k) => new Date(w.date).getTime() - new Date(k.date).getTime()), f = i === "no-comparison" ? ["value"] : ["value", "previousValue"], y = (h == null ? void 0 : h.reduce((w, k) => w + (k.value || 0), 0)) || 0, b = (h == null ? void 0 : h.reduce((w, k) => w + (k.previousValue || 0), 0)) || 0, S = i !== "no-comparison" ? (y - b) / b : 0;
15014
15025
  return /* @__PURE__ */ s("div", { className: Q("transition"), children: [
15015
15026
  /* @__PURE__ */ e("div", { className: "flex items-center justify-between gap-x-2", children: /* @__PURE__ */ s("div", { className: "flex items-center gap-x-2", children: [
15016
15027
  /* @__PURE__ */ e("dt", { className: "font-bold text-gray-900 sm:text-sm dark:text-gray-50", children: t }),
15017
- i !== "no-comparison" && /* @__PURE__ */ e(Tt, { variant: Ji(w), children: gi(w) })
15028
+ i !== "no-comparison" && /* @__PURE__ */ e(Tt, { variant: Ji(S), children: gi(S) })
15018
15029
  ] }) }),
15019
15030
  /* @__PURE__ */ s("div", { className: "mt-2 flex items-baseline justify-between", children: [
15020
15031
  /* @__PURE__ */ e("dd", { className: "text-xl text-gray-900 dark:text-gray-50", children: o(y) }),
@@ -15031,7 +15042,7 @@ function Oi({
15031
15042
  index: "formattedDate",
15032
15043
  colors: ["fuchsia", "gray"],
15033
15044
  startEndOnly: !0,
15034
- valueFormatter: (S) => o(S),
15045
+ valueFormatter: (w) => o(w),
15035
15046
  showYAxis: !1,
15036
15047
  showLegend: !1,
15037
15048
  categories: f,
@@ -15073,7 +15084,7 @@ const $d = Pe({
15073
15084
  defaultVariants: {
15074
15085
  variant: "default"
15075
15086
  }
15076
- }), Fi = R.forwardRef(
15087
+ }), Fi = N.forwardRef(
15077
15088
  ({
15078
15089
  value: t = 0,
15079
15090
  max: a = 100,
@@ -15205,10 +15216,10 @@ const Aa = [
15205
15216
  { title: "Caching", percentage: 11.1, value: "$31.9", color: "bg-gray-400 dark:bg-gray-600" }
15206
15217
  ], Kd = Ia.map((t) => ks(t.date).getTime()), Na = ks(Math.max(...Kd));
15207
15218
  function Xd() {
15208
- const [t, a] = R.useState({
15219
+ const [t, a] = N.useState({
15209
15220
  from: Ra(Na, 30),
15210
15221
  to: Na
15211
- }), [r, i] = R.useState("last-year"), [n, o] = R.useState(
15222
+ }), [r, i] = N.useState("last-year"), [n, o] = N.useState(
15212
15223
  Aa.map((l) => l.title)
15213
15224
  );
15214
15225
  return /* @__PURE__ */ s(C, { children: [
@@ -15312,7 +15323,7 @@ const ji = (t, a, r) => {
15312
15323
  n = n[l];
15313
15324
  }
15314
15325
  return n === void 0 ? r : n;
15315
- }, q = R.forwardRef(
15326
+ }, q = N.forwardRef(
15316
15327
  ({ className: t, children: a, ...r }, i) => /* @__PURE__ */ e(
15317
15328
  "div",
15318
15329
  {
@@ -15437,7 +15448,7 @@ const Fr = [
15437
15448
  { value: "ET", label: "Ethiopia", flag: "🇪🇹" }
15438
15449
  ]
15439
15450
  }
15440
- ], sr = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
15451
+ ], sr = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
15441
15452
  F,
15442
15453
  {
15443
15454
  ref: r,
@@ -15449,7 +15460,7 @@ const Fr = [
15449
15460
  }
15450
15461
  ));
15451
15462
  sr.displayName = F.displayName;
15452
- const ir = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ s("div", { className: "flex items-center border-b pl-3", "cmdk-input-wrapper": "", children: [
15463
+ const ir = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ s("div", { className: "flex items-center border-b pl-3", "cmdk-input-wrapper": "", children: [
15453
15464
  /* @__PURE__ */ e(Da, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
15454
15465
  /* @__PURE__ */ e(
15455
15466
  F.Input,
@@ -15464,7 +15475,7 @@ const ir = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ s("div",
15464
15475
  )
15465
15476
  ] }));
15466
15477
  ir.displayName = F.Input.displayName;
15467
- const nr = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
15478
+ const nr = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
15468
15479
  F.List,
15469
15480
  {
15470
15481
  ref: r,
@@ -15473,7 +15484,7 @@ const nr = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
15473
15484
  }
15474
15485
  ));
15475
15486
  nr.displayName = F.List.displayName;
15476
- const or = N.forwardRef((t, a) => /* @__PURE__ */ e(
15487
+ const or = R.forwardRef((t, a) => /* @__PURE__ */ e(
15477
15488
  F.Empty,
15478
15489
  {
15479
15490
  ref: a,
@@ -15482,7 +15493,7 @@ const or = N.forwardRef((t, a) => /* @__PURE__ */ e(
15482
15493
  }
15483
15494
  ));
15484
15495
  or.displayName = F.Empty.displayName;
15485
- const lr = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
15496
+ const lr = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
15486
15497
  F.Group,
15487
15498
  {
15488
15499
  ref: r,
@@ -15494,7 +15505,7 @@ const lr = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
15494
15505
  }
15495
15506
  ));
15496
15507
  lr.displayName = F.Group.displayName;
15497
- const Yd = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
15508
+ const Yd = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
15498
15509
  F.Separator,
15499
15510
  {
15500
15511
  ref: r,
@@ -15503,7 +15514,7 @@ const Yd = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
15503
15514
  }
15504
15515
  ));
15505
15516
  Yd.displayName = F.Separator.displayName;
15506
- const dr = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
15517
+ const dr = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
15507
15518
  F.Item,
15508
15519
  {
15509
15520
  ref: r,
@@ -15517,13 +15528,13 @@ const dr = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
15517
15528
  dr.displayName = F.Item.displayName;
15518
15529
  const cr = (t) => /* @__PURE__ */ e(W.Root, { ...t });
15519
15530
  cr.displayName = "Popover";
15520
- const ur = N.forwardRef((t, a) => /* @__PURE__ */ e(W.Trigger, { ref: a, ...t }));
15531
+ const ur = R.forwardRef((t, a) => /* @__PURE__ */ e(W.Trigger, { ref: a, ...t }));
15521
15532
  ur.displayName = "PopoverTrigger";
15522
- const ec = N.forwardRef((t, a) => /* @__PURE__ */ e(W.Anchor, { ref: a, ...t }));
15533
+ const ec = R.forwardRef((t, a) => /* @__PURE__ */ e(W.Anchor, { ref: a, ...t }));
15523
15534
  ec.displayName = "PopoverAnchor";
15524
- const tc = N.forwardRef((t, a) => /* @__PURE__ */ e(W.Close, { ref: a, ...t }));
15535
+ const tc = R.forwardRef((t, a) => /* @__PURE__ */ e(W.Close, { ref: a, ...t }));
15525
15536
  tc.displayName = "PopoverClose";
15526
- const pr = N.forwardRef(
15537
+ const pr = R.forwardRef(
15527
15538
  ({
15528
15539
  className: t,
15529
15540
  sideOffset: a = 10,
@@ -15661,7 +15672,7 @@ const ac = ({ value: t, onChange: a }) => {
15661
15672
  false: "truncate appearance-none"
15662
15673
  }
15663
15674
  }
15664
- }), xe = R.forwardRef(
15675
+ }), xe = N.forwardRef(
15665
15676
  ({
15666
15677
  className: t,
15667
15678
  inputClassName: a,
@@ -15673,7 +15684,7 @@ const ac = ({ value: t, onChange: a }) => {
15673
15684
  suffix: d,
15674
15685
  ...c
15675
15686
  }, u) => {
15676
- const [p, m] = R.useState(n), h = n === "password" && !o, f = n === "search" && !o, y = n === "textarea" ? "textarea" : "input";
15687
+ const [p, m] = N.useState(n), h = n === "password" && !o, f = n === "search" && !o, y = n === "textarea" ? "textarea" : "input";
15677
15688
  return /* @__PURE__ */ s("div", { className: x("relative w-full", t), children: [
15678
15689
  l && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-y-0 left-0 flex items-center px-3 text-slate-600 dark:text-gray-600 z-10 text-sm border-r border-gray-200", children: l }),
15679
15690
  /* @__PURE__ */ e(
@@ -15797,7 +15808,7 @@ const sc = ({ ...t }) => {
15797
15808
  }
15798
15809
  ),
15799
15810
  /* @__PURE__ */ e(
15800
- ge,
15811
+ he,
15801
15812
  {
15802
15813
  src: m.url,
15803
15814
  alt: m.filename,
@@ -16103,7 +16114,7 @@ const nc = ({
16103
16114
  defaultVariants: {
16104
16115
  size: "default"
16105
16116
  }
16106
- }), Zi = R.forwardRef(({ className: t, size: a, ...r }, i) => {
16117
+ }), Zi = N.forwardRef(({ className: t, size: a, ...r }, i) => {
16107
16118
  const { root: n, thumb: o } = dc({ size: a });
16108
16119
  return /* @__PURE__ */ e(
16109
16120
  Wt.Root,
@@ -16296,8 +16307,8 @@ const cc = ({
16296
16307
  label: f,
16297
16308
  type: y,
16298
16309
  colspan: b,
16299
- localizable: w,
16300
- multiple: S,
16310
+ localizable: S,
16311
+ multiple: w,
16301
16312
  options: k,
16302
16313
  placeholder: v,
16303
16314
  prefix: A
@@ -16307,7 +16318,7 @@ const cc = ({
16307
16318
  name: `${a.name}[${p}].${h}`,
16308
16319
  label: f,
16309
16320
  type: y ?? "text",
16310
- localizable: w,
16321
+ localizable: S,
16311
16322
  className: x({
16312
16323
  "col-span-1": b === 1,
16313
16324
  "col-span-2": b === 2,
@@ -16315,7 +16326,7 @@ const cc = ({
16315
16326
  "col-span-4": b === 4
16316
16327
  }),
16317
16328
  placeholder: v,
16318
- multiple: S,
16329
+ multiple: w,
16319
16330
  options: k,
16320
16331
  prefix: A
16321
16332
  },
@@ -16415,13 +16426,13 @@ function gc(t, a) {
16415
16426
  const { asChild: r, children: i } = t;
16416
16427
  if (!r)
16417
16428
  return typeof a == "function" ? a(i) : a;
16418
- const n = R.Children.only(i);
16419
- return R.cloneElement(n, {
16429
+ const n = N.Children.only(i);
16430
+ return N.cloneElement(n, {
16420
16431
  // @ts-ignore
16421
16432
  children: typeof a == "function" ? a(n.props.children) : a
16422
16433
  });
16423
16434
  }
16424
- const mr = R.forwardRef(({ className: t, children: a, ...r }, i) => /* @__PURE__ */ e($t.Root, { ref: i, ...r, asChild: !1, children: /* @__PURE__ */ e(
16435
+ const mr = N.forwardRef(({ className: t, children: a, ...r }, i) => /* @__PURE__ */ e($t.Root, { ref: i, ...r, asChild: !1, children: /* @__PURE__ */ e(
16425
16436
  $t.List,
16426
16437
  {
16427
16438
  className: x(
@@ -16435,7 +16446,7 @@ const mr = R.forwardRef(({ className: t, children: a, ...r }, i) => /* @__PURE__
16435
16446
  }
16436
16447
  ) }));
16437
16448
  mr.displayName = "TabNavigation";
16438
- const gr = R.forwardRef(({ asChild: t, disabled: a, className: r, children: i, ...n }, o) => /* @__PURE__ */ e($t.Item, { className: "flex", "aria-disabled": a, children: /* @__PURE__ */ e(
16449
+ const gr = N.forwardRef(({ asChild: t, disabled: a, className: r, children: i, ...n }, o) => /* @__PURE__ */ e($t.Item, { className: "flex", "aria-disabled": a, children: /* @__PURE__ */ e(
16439
16450
  $t.Link,
16440
16451
  {
16441
16452
  "aria-disabled": a,
@@ -16484,8 +16495,8 @@ const Ee = ({
16484
16495
  columns: l = 2,
16485
16496
  onSubmit: d
16486
16497
  }) => {
16487
- const c = t.watch("translations"), { organization: u, defaultLocale: p, supportedLocales: m } = ye(), [h, f] = I(), y = Se(
16488
- () => r.some((w) => w.localizable),
16498
+ const c = t.watch("translations"), { organization: u, defaultLocale: p, supportedLocales: m } = pe(), [h, f] = I(), y = Se(
16499
+ () => r.some((S) => S.localizable),
16489
16500
  [r]
16490
16501
  );
16491
16502
  X(() => {
@@ -16509,26 +16520,26 @@ const Ee = ({
16509
16520
  "grid-cols-4": l === 4
16510
16521
  }),
16511
16522
  children: [
16512
- y && /* @__PURE__ */ e("div", { className: "col-span-full", children: /* @__PURE__ */ e(mr, { className: "col-span-full mb-3", children: m.map((w) => {
16513
- const S = w === p;
16523
+ y && /* @__PURE__ */ e("div", { className: "col-span-full", children: /* @__PURE__ */ e(mr, { className: "col-span-full mb-3", children: m.map((S) => {
16524
+ const w = S === p;
16514
16525
  return /* @__PURE__ */ e(
16515
16526
  gr,
16516
16527
  {
16517
- active: w === h,
16518
- onClick: () => f(w),
16528
+ active: S === h,
16529
+ onClick: () => f(S),
16519
16530
  className: "cursor-pointer",
16520
16531
  children: /* @__PURE__ */ s(C, { children: [
16521
- ia.get(w),
16532
+ ia.get(S),
16522
16533
  " ",
16523
- S && "(Default)"
16534
+ w && "(Default)"
16524
16535
  ] })
16525
16536
  },
16526
- w
16537
+ S
16527
16538
  );
16528
16539
  }) }) }),
16529
- r.map((w) => {
16540
+ r.map((S) => {
16530
16541
  const {
16531
- name: S,
16542
+ name: w,
16532
16543
  label: k,
16533
16544
  type: v,
16534
16545
  colspan: A,
@@ -16537,8 +16548,8 @@ const Ee = ({
16537
16548
  options: ie,
16538
16549
  placeholder: ae,
16539
16550
  prefix: Z
16540
- } = w, J = !P || !h ? S : `translations[${m == null ? void 0 : m.indexOf(h)}].${S}`;
16541
- return v === "object" ? /* @__PURE__ */ e(mc, { config: w }, S) : v === "array" ? /* @__PURE__ */ e(pc, { form: t, config: w }, S) : /* @__PURE__ */ e(
16551
+ } = S, J = !P || !h ? w : `translations[${m == null ? void 0 : m.indexOf(h)}].${w}`;
16552
+ return v === "object" ? /* @__PURE__ */ e(mc, { config: S }, w) : v === "array" ? /* @__PURE__ */ e(pc, { form: t, config: S }, w) : /* @__PURE__ */ e(
16542
16553
  Ae,
16543
16554
  {
16544
16555
  name: J,
@@ -16585,7 +16596,7 @@ const Ee = ({
16585
16596
  ]
16586
16597
  }
16587
16598
  );
16588
- return d ? /* @__PURE__ */ e(Ge, { ...t, children: /* @__PURE__ */ e("form", { onSubmit: t.handleSubmit((w) => d(w)), children: b }) }) : /* @__PURE__ */ e("div", { className: "w-full", children: b });
16599
+ return d ? /* @__PURE__ */ e(Ge, { ...t, children: /* @__PURE__ */ e("form", { onSubmit: t.handleSubmit((S) => d(S)), children: b }) }) : /* @__PURE__ */ e("div", { className: "w-full", children: b });
16589
16600
  }, hc = [
16590
16601
  {
16591
16602
  name: "name",
@@ -16608,7 +16619,7 @@ const Ee = ({
16608
16619
  type: "file"
16609
16620
  }
16610
16621
  ], Ui = ({ initialData: t }) => {
16611
- const { client: a } = L(), r = K(), i = te(), n = ee(), { defaultLocale: o, supportedLocales: l } = ye(), c = de({
16622
+ const { client: a } = L(), r = K(), i = te(), n = ee(), { defaultLocale: o, supportedLocales: l } = pe(), c = de({
16612
16623
  resolver: ce(t ? sl : rl),
16613
16624
  defaultValues: t ? {
16614
16625
  defaultLocale: o,
@@ -16621,12 +16632,12 @@ const Ee = ({
16621
16632
  }
16622
16633
  }), u = $({
16623
16634
  mutationFn: async (f) => {
16624
- var w;
16635
+ var S;
16625
16636
  const y = {
16626
16637
  name: f.name,
16627
16638
  defaultLocale: f.defaultLocale,
16628
16639
  translations: f.translations,
16629
- logoId: (w = f.logo) == null ? void 0 : w.id
16640
+ logoId: (S = f.logo) == null ? void 0 : S.id
16630
16641
  }, { status: b } = await a.manufacturer.createManufacturer({
16631
16642
  params: { organizationId: n },
16632
16643
  body: y
@@ -16636,12 +16647,12 @@ const Ee = ({
16636
16647
  }
16637
16648
  }), p = $({
16638
16649
  mutationFn: async (f) => {
16639
- var w;
16650
+ var S;
16640
16651
  const y = {
16641
16652
  name: f.name,
16642
16653
  defaultLocale: f.defaultLocale,
16643
16654
  translations: f.translations,
16644
- logoId: ((w = f.logo) == null ? void 0 : w.id) || null
16655
+ logoId: ((S = f.logo) == null ? void 0 : S.id) || null
16645
16656
  }, { status: b } = await a.manufacturer.updateManufacturer({
16646
16657
  params: { organizationId: n, id: t.id },
16647
16658
  body: y
@@ -16718,13 +16729,13 @@ function yc() {
16718
16729
  /* @__PURE__ */ e("p", { className: "mt-1 text-sm leading-6 text-gray-500", children: "Enter the information about the manufacturer." })
16719
16730
  ] }),
16720
16731
  /* @__PURE__ */ e("div", { className: "md:col-span-2", children: i || !n ? /* @__PURE__ */ e("div", { className: "flex justify-center items-center h-screen mt-5", children: /* @__PURE__ */ s("div", { className: "flex flex-col items-center gap-2", children: [
16721
- /* @__PURE__ */ e(he, { className: "w-12 h-12" }),
16732
+ /* @__PURE__ */ e(fe, { className: "w-12 h-12" }),
16722
16733
  /* @__PURE__ */ e("p", { className: "text-gray-500 text-sm mt-3", children: "Loading data..." })
16723
16734
  ] }) }) : /* @__PURE__ */ e(Ui, { initialData: n }) })
16724
16735
  ] }) }) }) })
16725
16736
  ] });
16726
16737
  }
16727
- const wc = R.forwardRef(({ className: t, children: a, ...r }, i) => /* @__PURE__ */ e(
16738
+ const wc = N.forwardRef(({ className: t, children: a, ...r }, i) => /* @__PURE__ */ e(
16728
16739
  "div",
16729
16740
  {
16730
16741
  ref: i,
@@ -16739,7 +16750,7 @@ const wc = R.forwardRef(({ className: t, children: a, ...r }, i) => /* @__PURE__
16739
16750
  }
16740
16751
  ));
16741
16752
  wc.displayName = "TableRoot";
16742
- const Wi = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16753
+ const Wi = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16743
16754
  "table",
16744
16755
  {
16745
16756
  ref: r,
@@ -16754,9 +16765,9 @@ const Wi = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16754
16765
  }
16755
16766
  ));
16756
16767
  Wi.displayName = "Table";
16757
- const $i = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e("thead", { ref: r, className: Q(t), ...a }));
16768
+ const $i = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e("thead", { ref: r, className: Q(t), ...a }));
16758
16769
  $i.displayName = "TableHead";
16759
- const _i = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16770
+ const _i = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16760
16771
  "th",
16761
16772
  {
16762
16773
  ref: r,
@@ -16773,7 +16784,7 @@ const _i = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16773
16784
  }
16774
16785
  ));
16775
16786
  _i.displayName = "TableHeaderCell";
16776
- const qi = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16787
+ const qi = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16777
16788
  "tbody",
16778
16789
  {
16779
16790
  ref: r,
@@ -16788,7 +16799,7 @@ const qi = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16788
16799
  }
16789
16800
  ));
16790
16801
  qi.displayName = "TableBody";
16791
- const wt = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16802
+ const wt = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16792
16803
  "tr",
16793
16804
  {
16794
16805
  ref: r,
@@ -16801,7 +16812,7 @@ const wt = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16801
16812
  }
16802
16813
  ));
16803
16814
  wt.displayName = "TableRow";
16804
- const Ft = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16815
+ const Ft = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16805
16816
  "td",
16806
16817
  {
16807
16818
  ref: r,
@@ -16816,7 +16827,7 @@ const Ft = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16816
16827
  }
16817
16828
  ));
16818
16829
  Ft.displayName = "TableCell";
16819
- const bc = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16830
+ const bc = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16820
16831
  "tfoot",
16821
16832
  {
16822
16833
  ref: r,
@@ -16833,7 +16844,7 @@ const bc = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16833
16844
  }
16834
16845
  ));
16835
16846
  bc.displayName = "TableFoot";
16836
- const xc = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16847
+ const xc = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16837
16848
  "caption",
16838
16849
  {
16839
16850
  ref: r,
@@ -16891,7 +16902,7 @@ const Sc = x(
16891
16902
  }
16892
16903
  );
16893
16904
  Gi.displayName = "CommandBar";
16894
- const Ki = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16905
+ const Ki = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16895
16906
  "div",
16896
16907
  {
16897
16908
  ref: r,
@@ -16903,7 +16914,7 @@ const Ki = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16903
16914
  }
16904
16915
  ));
16905
16916
  Ki.displayName = "CommandBar.Value";
16906
- const Xi = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16917
+ const Xi = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16907
16918
  "div",
16908
16919
  {
16909
16920
  ref: r,
@@ -16915,7 +16926,7 @@ const Xi = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16915
16926
  }
16916
16927
  ));
16917
16928
  Xi.displayName = "CommandBarBar";
16918
- const jt = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16929
+ const jt = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16919
16930
  "div",
16920
16931
  {
16921
16932
  ref: r,
@@ -16924,7 +16935,7 @@ const jt = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
16924
16935
  }
16925
16936
  ));
16926
16937
  jt.displayName = "CommandBar.Seperator";
16927
- const Vt = N.forwardRef(
16938
+ const Vt = R.forwardRef(
16928
16939
  ({
16929
16940
  className: t,
16930
16941
  type: a = "button",
@@ -16933,7 +16944,7 @@ const Vt = N.forwardRef(
16933
16944
  shortcut: n,
16934
16945
  disabled: o,
16935
16946
  ...l
16936
- }, d) => (N.useEffect(() => {
16947
+ }, d) => (R.useEffect(() => {
16937
16948
  const c = (u) => {
16938
16949
  u.key === n.shortcut && (u.preventDefault(), u.stopPropagation(), i());
16939
16950
  };
@@ -17023,9 +17034,9 @@ function vc({
17023
17034
  meta: t,
17024
17035
  table: a
17025
17036
  }) {
17026
- const i = fe(), n = K(), o = nt(), l = Number((i == null ? void 0 : i.get("page")) || "1"), d = (y, b) => {
17027
- const w = new URLSearchParams(i == null ? void 0 : i.toString());
17028
- return w.set(y, b), w.toString();
17037
+ const i = ye(), n = K(), o = nt(), l = Number((i == null ? void 0 : i.get("page")) || "1"), d = (y, b) => {
17038
+ const S = new URLSearchParams(i == null ? void 0 : i.toString());
17039
+ return S.set(y, b), S.toString();
17029
17040
  }, c = (y) => {
17030
17041
  n.push(`${o}?${d("page", y.toString())}`);
17031
17042
  }, u = [
@@ -17108,7 +17119,7 @@ function pt({
17108
17119
  refetch: l
17109
17120
  }) {
17110
17121
  var h, f;
17111
- const d = ee(), c = te(), [u, p] = N.useState({}), m = go({
17122
+ const d = ee(), c = te(), [u, p] = R.useState({}), m = go({
17112
17123
  data: i,
17113
17124
  columns: a,
17114
17125
  state: {
@@ -17127,7 +17138,7 @@ function pt({
17127
17138
  n && !i ? (
17128
17139
  // Render a loading spinner when loading is true
17129
17140
  /* @__PURE__ */ e("div", { className: "flex items-center justify-center h-48", children: /* @__PURE__ */ s("div", { className: "flex flex-col items-center gap-2", children: [
17130
- /* @__PURE__ */ e(he, { className: "w-10 h-10" }),
17141
+ /* @__PURE__ */ e(fe, { className: "w-10 h-10" }),
17131
17142
  /* @__PURE__ */ e("p", { className: "text-gray-500 text-xs mt-1", children: "Loading..." })
17132
17143
  ] }) })
17133
17144
  ) : /* @__PURE__ */ s(C, { children: [
@@ -17137,13 +17148,13 @@ function pt({
17137
17148
  {
17138
17149
  className: "border-y border-gray-200 dark:border-gray-800 back",
17139
17150
  children: y.headers.map((b) => {
17140
- var w;
17151
+ var S;
17141
17152
  return /* @__PURE__ */ e(
17142
17153
  _i,
17143
17154
  {
17144
17155
  className: x(
17145
17156
  "whitespace-nowrap py-1 text-sm sm:text-xs",
17146
- (w = b.column.columnDef.meta) == null ? void 0 : w.className
17157
+ (S = b.column.columnDef.meta) == null ? void 0 : S.className
17147
17158
  ),
17148
17159
  children: Nr(
17149
17160
  b.column.columnDef.header,
@@ -17169,18 +17180,18 @@ function pt({
17169
17180
  wt,
17170
17181
  {
17171
17182
  className: "group select-none hover:bg-gray-50 dark:hover:bg-gray-900",
17172
- children: y.getVisibleCells().map((b, w) => {
17173
- var S;
17183
+ children: y.getVisibleCells().map((b, S) => {
17184
+ var w;
17174
17185
  return /* @__PURE__ */ s(
17175
17186
  Ft,
17176
17187
  {
17177
17188
  className: x(
17178
17189
  y.getIsSelected() ? "bg-gray-50 dark:bg-gray-900" : "",
17179
17190
  "relative whitespace-nowrap py-1 text-gray-600 first:w-10 dark:text-gray-400",
17180
- (S = b.column.columnDef.meta) == null ? void 0 : S.className
17191
+ (w = b.column.columnDef.meta) == null ? void 0 : w.className
17181
17192
  ),
17182
17193
  children: [
17183
- w === 0 && y.getIsSelected() && /* @__PURE__ */ e("div", { className: "absolute inset-y-0 left-0 w-0.5 bg-blue-600 dark:bg-blue-500" }),
17194
+ S === 0 && y.getIsSelected() && /* @__PURE__ */ e("div", { className: "absolute inset-y-0 left-0 w-0.5 bg-blue-600 dark:bg-blue-500" }),
17184
17195
  Nr(
17185
17196
  b.column.columnDef.cell,
17186
17197
  b.getContext()
@@ -17205,7 +17216,7 @@ function pt({
17205
17216
  ] }),
17206
17217
  n && i && // Render a loading overlay when refetching is true
17207
17218
  /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center bg-white bg-opacity-75 dark:bg-gray-900 dark:bg-opacity-75", children: /* @__PURE__ */ s("div", { className: "flex flex-col items-center gap-2", children: [
17208
- /* @__PURE__ */ e(he, { className: "w-10 h-10" }),
17219
+ /* @__PURE__ */ e(fe, { className: "w-10 h-10" }),
17209
17220
  /* @__PURE__ */ e("p", { className: "text-gray-500 text-xs mt-1", children: "Loading..." })
17210
17221
  ] }) })
17211
17222
  ] }),
@@ -17245,7 +17256,7 @@ const Ac = Pe({
17245
17256
  true: "[appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none"
17246
17257
  }
17247
17258
  }
17248
- }), mt = N.forwardRef(
17259
+ }), mt = R.forwardRef(
17249
17260
  ({
17250
17261
  className: t,
17251
17262
  inputClassName: a,
@@ -17338,7 +17349,7 @@ const Yi = ne.Sub;
17338
17349
  Yi.displayName = "DropdownMenuSubMenu";
17339
17350
  const en = ne.RadioGroup;
17340
17351
  en.displayName = "DropdownMenuRadioGroup";
17341
- const tn = N.forwardRef(({ className: t, children: a, ...r }, i) => /* @__PURE__ */ s(
17352
+ const tn = R.forwardRef(({ className: t, children: a, ...r }, i) => /* @__PURE__ */ s(
17342
17353
  ne.SubTrigger,
17343
17354
  {
17344
17355
  ref: i,
@@ -17370,7 +17381,7 @@ const tn = N.forwardRef(({ className: t, children: a, ...r }, i) => /* @__PURE__
17370
17381
  }
17371
17382
  ));
17372
17383
  tn.displayName = "DropdownMenuSubMenuTrigger";
17373
- const an = N.forwardRef(({ className: t, collisionPadding: a = 8, ...r }, i) => /* @__PURE__ */ e(ne.Portal, { children: /* @__PURE__ */ e(
17384
+ const an = R.forwardRef(({ className: t, collisionPadding: a = 8, ...r }, i) => /* @__PURE__ */ e(ne.Portal, { children: /* @__PURE__ */ e(
17374
17385
  ne.SubContent,
17375
17386
  {
17376
17387
  ref: i,
@@ -17399,7 +17410,7 @@ const an = N.forwardRef(({ className: t, collisionPadding: a = 8, ...r }, i) =>
17399
17410
  }
17400
17411
  ) }));
17401
17412
  an.displayName = "DropdownMenuSubMenuContent";
17402
- const Ue = N.forwardRef(
17413
+ const Ue = R.forwardRef(
17403
17414
  ({
17404
17415
  className: t,
17405
17416
  sideOffset: a = 8,
@@ -17439,7 +17450,7 @@ const Ue = N.forwardRef(
17439
17450
  ) })
17440
17451
  );
17441
17452
  Ue.displayName = "DropdownMenuContent";
17442
- const ke = N.forwardRef(({ className: t, shortcut: a, hint: r, children: i, ...n }, o) => /* @__PURE__ */ s(
17453
+ const ke = R.forwardRef(({ className: t, shortcut: a, hint: r, children: i, ...n }, o) => /* @__PURE__ */ s(
17443
17454
  ne.Item,
17444
17455
  {
17445
17456
  ref: o,
@@ -17477,7 +17488,7 @@ const ke = N.forwardRef(({ className: t, shortcut: a, hint: r, children: i, ...n
17477
17488
  }
17478
17489
  ));
17479
17490
  ke.displayName = "DropdownMenuItem";
17480
- const Nc = N.forwardRef(
17491
+ const Nc = R.forwardRef(
17481
17492
  ({ className: t, hint: a, shortcut: r, children: i, checked: n, ...o }, l) => /* @__PURE__ */ s(
17482
17493
  ne.CheckboxItem,
17483
17494
  {
@@ -17529,7 +17540,7 @@ const Nc = N.forwardRef(
17529
17540
  )
17530
17541
  );
17531
17542
  Nc.displayName = "DropdownMenuCheckboxItem";
17532
- const Ht = N.forwardRef(
17543
+ const Ht = R.forwardRef(
17533
17544
  ({ className: t, hint: a, shortcut: r, children: i, iconType: n = "radio", ...o }, l) => /* @__PURE__ */ s(
17534
17545
  ne.RadioItem,
17535
17546
  {
@@ -17595,7 +17606,7 @@ const Ht = N.forwardRef(
17595
17606
  )
17596
17607
  );
17597
17608
  Ht.displayName = "DropdownMenuRadioItem";
17598
- const fa = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
17609
+ const fa = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
17599
17610
  ne.Label,
17600
17611
  {
17601
17612
  ref: r,
@@ -17610,7 +17621,7 @@ const fa = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
17610
17621
  }
17611
17622
  ));
17612
17623
  fa.displayName = "DropdownMenuLabel";
17613
- const Rc = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
17624
+ const Rc = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
17614
17625
  ne.Separator,
17615
17626
  {
17616
17627
  ref: r,
@@ -17745,7 +17756,7 @@ const at = ot(), Cc = [
17745
17756
  }
17746
17757
  })
17747
17758
  ], Pc = () => {
17748
- const { client: t } = L(), a = te(), r = ee(), i = fe(), [n, o] = I(""), [l] = Xe(n, 300), d = Number((i == null ? void 0 : i.get("page")) || "1"), { isLoading: c, isRefetching: u, isError: p, data: m } = G({
17759
+ const { client: t } = L(), a = te(), r = ee(), i = ye(), [n, o] = I(""), [l] = Xe(n, 300), d = Number((i == null ? void 0 : i.get("page")) || "1"), { isLoading: c, isRefetching: u, isError: p, data: m } = G({
17749
17760
  queryKey: ["manufacturers", r, d, l],
17750
17761
  queryFn: async () => {
17751
17762
  const { body: h, status: f } = await t.manufacturer.getManufacturers({
@@ -18207,7 +18218,7 @@ const Qc = ({
18207
18218
  cell: ({ row: t, table: a }) => /* @__PURE__ */ e(Ec, { order: t.original, table: a })
18208
18219
  })
18209
18220
  ], zc = () => {
18210
- const { client: t } = L(), a = ee(), r = fe(), [i, n] = I(""), [o] = Xe(i, 300), l = Number((r == null ? void 0 : r.get("page")) || "1"), { isLoading: d, isRefetching: c, isError: u, data: p, refetch: m } = G({
18221
+ const { client: t } = L(), a = ee(), r = ye(), [i, n] = I(""), [o] = Xe(i, 300), l = Number((r == null ? void 0 : r.get("page")) || "1"), { isLoading: d, isRefetching: c, isError: u, data: p, refetch: m } = G({
18211
18222
  queryKey: ["orders", a, l, o],
18212
18223
  queryFn: async () => {
18213
18224
  const { body: h, status: f } = await t.order.getOrders({
@@ -18452,7 +18463,7 @@ const rn = ({
18452
18463
  }
18453
18464
  ) }) });
18454
18465
  }, Bc = () => {
18455
- const [t, a] = I(!1), r = te(), { organizations: i } = ye(), n = () => a(!1);
18466
+ const [t, a] = I(!1), r = te(), { organizations: i } = pe(), n = () => a(!1);
18456
18467
  return /* @__PURE__ */ s(C, { children: [
18457
18468
  /* @__PURE__ */ s("div", { className: "max-w-4xl mx-auto py-8 px-4", children: [
18458
18469
  /* @__PURE__ */ s("div", { className: "flex justify-between items-center", children: [
@@ -18508,7 +18519,7 @@ const rn = ({
18508
18519
  }
18509
18520
  ),
18510
18521
  o.logoFile ? /* @__PURE__ */ e(
18511
- ge,
18522
+ he,
18512
18523
  {
18513
18524
  src: o.logoFile.url,
18514
18525
  alt: o.name,
@@ -18561,7 +18572,7 @@ function Jc() {
18561
18572
  const { appearance: t } = Is(), a = t == null ? void 0 : t.organizationImage;
18562
18573
  return /* @__PURE__ */ s("div", { className: "flex w-full min-h-screen", children: [
18563
18574
  a && /* @__PURE__ */ e("div", { className: "hidden lg:block relative w-1/2 overflow-hidden", children: /* @__PURE__ */ e(
18564
- ge,
18575
+ he,
18565
18576
  {
18566
18577
  src: a,
18567
18578
  alt: "Organization Visual",
@@ -18597,7 +18608,7 @@ const $e = ot(), Oc = ({ row: t, table: a }) => {
18597
18608
  "tremor-id": "tremor-raw",
18598
18609
  disabled: !0,
18599
18610
  children: [
18600
- /* @__PURE__ */ e(he, { className: "w-4 h-4" }),
18611
+ /* @__PURE__ */ e(fe, { className: "w-4 h-4" }),
18601
18612
  " Saving..."
18602
18613
  ]
18603
18614
  }
@@ -18638,7 +18649,7 @@ const $e = ot(), Oc = ({ row: t, table: a }) => {
18638
18649
  variant: "ghost",
18639
18650
  className: "group aspect-square px-1.5 py-0! h-8! hover:border hover:border-gray-300 data-[state=open]:border-gray-300 data-[state=open]:bg-gray-50 dark:hover:border-gray-700 dark:data-[state=open]:border-gray-700 dark:data-[state=open]:bg-gray-900",
18640
18651
  disabled: o.isPending,
18641
- children: o.isPending ? /* @__PURE__ */ e(he, { className: "size-4 shrink-0" }) : /* @__PURE__ */ e(
18652
+ children: o.isPending ? /* @__PURE__ */ e(fe, { className: "size-4 shrink-0" }) : /* @__PURE__ */ e(
18642
18653
  aa,
18643
18654
  {
18644
18655
  className: "size-4 shrink-0 text-gray-500 group-hover:text-gray-700 group-data-[state=open]:text-gray-700 dark:group-hover:text-gray-300 dark:group-data-[state=open]:text-gray-300",
@@ -18666,7 +18677,7 @@ const $e = ot(), Oc = ({ row: t, table: a }) => {
18666
18677
  onClick: l,
18667
18678
  disabled: o.isPending,
18668
18679
  children: /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
18669
- o.isPending ? /* @__PURE__ */ e(he, { className: "w-4 h-4" }) : /* @__PURE__ */ e(es, { className: "w-4 h-4" }),
18680
+ o.isPending ? /* @__PURE__ */ e(fe, { className: "w-4 h-4" }) : /* @__PURE__ */ e(es, { className: "w-4 h-4" }),
18670
18681
  o.isPending ? "Deleting..." : "Delete"
18671
18682
  ] })
18672
18683
  }
@@ -18772,7 +18783,7 @@ const $e = ot(), Oc = ({ row: t, table: a }) => {
18772
18783
  cell: ({ row: t, table: a }) => /* @__PURE__ */ e(Fc, { row: t, table: a })
18773
18784
  })
18774
18785
  ], Vc = () => {
18775
- const { client: t } = L(), a = te(), { defaultLocale: r } = ye(), i = ee(), n = fe(), [o, l] = I(""), d = Number((n == null ? void 0 : n.get("page")) || "1"), [c] = Xe(o, 300), { isLoading: u, isRefetching: p, isError: m, data: h, refetch: f } = G({
18786
+ const { client: t } = L(), a = te(), { defaultLocale: r } = pe(), i = ee(), n = ye(), [o, l] = I(""), d = Number((n == null ? void 0 : n.get("page")) || "1"), [c] = Xe(o, 300), { isLoading: u, isRefetching: p, isError: m, data: h, refetch: f } = G({
18776
18787
  queryKey: [
18777
18788
  "productCategories",
18778
18789
  i,
@@ -18874,7 +18885,7 @@ const Zc = [
18874
18885
  ], sn = ({
18875
18886
  initialData: t
18876
18887
  }) => {
18877
- const { client: a } = L(), r = K(), i = te(), n = ee(), { defaultLocale: o, supportedLocales: l } = ye(), c = de({
18888
+ const { client: a } = L(), r = K(), i = te(), n = ee(), { defaultLocale: o, supportedLocales: l } = pe(), c = de({
18878
18889
  resolver: ce(t ? jo : Fo),
18879
18890
  defaultValues: t ? {
18880
18891
  defaultLocale: o,
@@ -18887,12 +18898,12 @@ const Zc = [
18887
18898
  }
18888
18899
  }), u = $({
18889
18900
  mutationFn: async (f) => {
18890
- var w;
18901
+ var S;
18891
18902
  const y = {
18892
18903
  slug: f.slug,
18893
18904
  defaultLocale: f.defaultLocale,
18894
18905
  translations: f.translations,
18895
- imageId: (w = f.image) == null ? void 0 : w.id
18906
+ imageId: (S = f.image) == null ? void 0 : S.id
18896
18907
  }, { status: b } = await a.productCategory.createProductCategory({
18897
18908
  params: { organizationId: n },
18898
18909
  body: y
@@ -18904,12 +18915,12 @@ const Zc = [
18904
18915
  }
18905
18916
  }), p = $({
18906
18917
  mutationFn: async (f) => {
18907
- var w;
18918
+ var S;
18908
18919
  const y = {
18909
18920
  slug: f.slug,
18910
18921
  defaultLocale: f.defaultLocale,
18911
18922
  translations: f.translations,
18912
- imageId: ((w = f.image) == null ? void 0 : w.id) || null
18923
+ imageId: ((S = f.image) == null ? void 0 : S.id) || null
18913
18924
  }, { status: b } = await a.productCategory.updateProductCategory({
18914
18925
  params: { organizationId: n, id: t.id },
18915
18926
  body: y
@@ -18992,7 +19003,7 @@ function Wc() {
18992
19003
  /* @__PURE__ */ e("p", { className: "mt-1 text-sm leading-6 text-gray-500", children: "Enter the information about the product category." })
18993
19004
  ] }),
18994
19005
  /* @__PURE__ */ e("div", { className: "md:col-span-2", children: i || !n ? /* @__PURE__ */ e("div", { className: "flex justify-center items-center h-[500px] mt-5", children: /* @__PURE__ */ s("div", { className: "flex flex-col items-center gap-2", children: [
18995
- /* @__PURE__ */ e(he, { className: "w-12 h-12" }),
19006
+ /* @__PURE__ */ e(fe, { className: "w-12 h-12" }),
18996
19007
  /* @__PURE__ */ e("p", { className: "text-gray-500 text-sm mt-3", children: "Loading data..." })
18997
19008
  ] }) }) : /* @__PURE__ */ e(sn, { initialData: n }) })
18998
19009
  ] }) }) }) })
@@ -19094,10 +19105,10 @@ const $c = ({ form: t }) => {
19094
19105
  ] }) })
19095
19106
  ] }) });
19096
19107
  }, _c = ({ form: t }) => {
19097
- const [a, r] = R.useState(
19108
+ const [a, r] = N.useState(
19098
19109
  []
19099
19110
  );
19100
- R.useEffect(() => {
19111
+ N.useEffect(() => {
19101
19112
  const d = t.getValues("metadata") || {}, c = Object.entries(d);
19102
19113
  c.length > 0 && r(
19103
19114
  c.map(([u, p], m) => ({
@@ -19107,7 +19118,7 @@ const $c = ({ form: t }) => {
19107
19118
  }))
19108
19119
  );
19109
19120
  }, [t]);
19110
- const i = R.useCallback(
19121
+ const i = N.useCallback(
19111
19122
  (d) => {
19112
19123
  const c = {};
19113
19124
  d.forEach((u) => {
@@ -19221,7 +19232,7 @@ const $c = ({ form: t }) => {
19221
19232
  initialData: r,
19222
19233
  onSubmit: i
19223
19234
  }) => {
19224
- const { defaultLocale: n, supportedLocales: o } = ye(), l = de({
19235
+ const { defaultLocale: n, supportedLocales: o } = pe(), l = de({
19225
19236
  resolver: ce(js),
19226
19237
  defaultValues: r ? {
19227
19238
  ...r,
@@ -19355,7 +19366,7 @@ const $c = ({ form: t }) => {
19355
19366
  ] })
19356
19367
  ] }) });
19357
19368
  }, Gc = ({ form: t }) => {
19358
- const { control: a } = t, { defaultLocale: r } = ye(), {
19369
+ const { control: a } = t, { defaultLocale: r } = pe(), {
19359
19370
  fields: i,
19360
19371
  append: n,
19361
19372
  remove: o,
@@ -19365,28 +19376,28 @@ const $c = ({ form: t }) => {
19365
19376
  name: "modifierGroups"
19366
19377
  }), [d, c] = I(!1), [u, p] = I(
19367
19378
  null
19368
- ), m = () => crypto.randomUUID(), h = (S) => {
19379
+ ), m = () => crypto.randomUUID(), h = (w) => {
19369
19380
  var k;
19370
19381
  return {
19371
- ...S,
19372
- id: S.id ?? m(),
19373
- defaultLocale: S.defaultLocale ?? r,
19374
- modifiers: ((k = S.modifiers) == null ? void 0 : k.map((v) => ({
19382
+ ...w,
19383
+ id: w.id ?? m(),
19384
+ defaultLocale: w.defaultLocale ?? r,
19385
+ modifiers: ((k = w.modifiers) == null ? void 0 : k.map((v) => ({
19375
19386
  ...v,
19376
19387
  id: v.id ?? m()
19377
19388
  }))) ?? []
19378
19389
  };
19379
- }, f = (S) => {
19380
- S.preventDefault(), p(null), c(!0);
19381
- }, y = (S) => {
19382
- p(S), c(!0);
19383
- }, b = (S) => {
19390
+ }, f = (w) => {
19391
+ w.preventDefault(), p(null), c(!0);
19392
+ }, y = (w) => {
19393
+ p(w), c(!0);
19394
+ }, b = (w) => {
19384
19395
  if (u === null) {
19385
- n(h(S)), c(!1);
19396
+ n(h(w)), c(!1);
19386
19397
  return;
19387
19398
  }
19388
- l(u, h(S)), c(!1);
19389
- }, w = () => {
19399
+ l(u, h(w)), c(!1);
19400
+ }, S = () => {
19390
19401
  n({
19391
19402
  id: m(),
19392
19403
  defaultLocale: r,
@@ -19447,7 +19458,7 @@ const $c = ({ form: t }) => {
19447
19458
  type: "button",
19448
19459
  variant: "secondary",
19449
19460
  className: "shadow-none",
19450
- onClick: w,
19461
+ onClick: S,
19451
19462
  children: [
19452
19463
  /* @__PURE__ */ e(fr, { className: "w-4 h-4 mr-2" }),
19453
19464
  " Add From Template"
@@ -19476,7 +19487,7 @@ const $c = ({ form: t }) => {
19476
19487
  type: "button",
19477
19488
  variant: "secondary",
19478
19489
  className: "shadow-none",
19479
- onClick: w,
19490
+ onClick: S,
19480
19491
  children: [
19481
19492
  /* @__PURE__ */ e(fr, { className: "w-4 h-4 mr-2" }),
19482
19493
  " Add From Template"
@@ -19497,11 +19508,11 @@ const $c = ({ form: t }) => {
19497
19508
  }
19498
19509
  )
19499
19510
  ] }),
19500
- /* @__PURE__ */ e("div", { className: "space-y-4", children: i.map((S, k) => {
19511
+ /* @__PURE__ */ e("div", { className: "space-y-4", children: i.map((w, k) => {
19501
19512
  var v;
19502
19513
  return /* @__PURE__ */ s("div", { className: "p-4 border rounded-md", children: [
19503
19514
  /* @__PURE__ */ s("div", { className: "flex justify-between items-center", children: [
19504
- /* @__PURE__ */ e("h3", { className: "text-lg font-semibold", children: S.translations[0].title || "Unnamed Group" }),
19515
+ /* @__PURE__ */ e("h3", { className: "text-lg font-semibold", children: w.translations[0].title || "Unnamed Group" }),
19505
19516
  /* @__PURE__ */ s("div", { children: [
19506
19517
  /* @__PURE__ */ e(
19507
19518
  "button",
@@ -19525,16 +19536,16 @@ const $c = ({ form: t }) => {
19525
19536
  ] }),
19526
19537
  /* @__PURE__ */ s("p", { className: "text-sm text-gray-500 mt-3", children: [
19527
19538
  "Min: ",
19528
- S.selectMin,
19539
+ w.selectMin,
19529
19540
  " | Max: ",
19530
- S.selectMax
19541
+ w.selectMax
19531
19542
  ] }),
19532
19543
  /* @__PURE__ */ s("p", { className: "text-sm text-gray-500 mt-1", children: [
19533
19544
  "Available Options:",
19534
19545
  " ",
19535
- (v = S.modifiers) == null ? void 0 : v.map((A) => A == null ? void 0 : A.title).join(",")
19546
+ (v = w.modifiers) == null ? void 0 : v.map((A) => A == null ? void 0 : A.title).join(",")
19536
19547
  ] })
19537
- ] }, S.id);
19548
+ ] }, w.id);
19538
19549
  }) })
19539
19550
  ] }) })
19540
19551
  ] }),
@@ -19551,94 +19562,97 @@ const $c = ({ form: t }) => {
19551
19562
  u
19552
19563
  )
19553
19564
  ] });
19554
- }, Kc = ({ form: t, loading: a }) => /* @__PURE__ */ e("section", { "aria-labelledby": "product-information", children: /* @__PURE__ */ s("div", { className: "grid grid-cols-1 gap-x-14 gap-y-8 md:grid-cols-3", children: [
19555
- /* @__PURE__ */ s("div", { children: [
19556
- /* @__PURE__ */ e(
19557
- "h2",
19565
+ }, Kc = ({ form: t, loading: a }) => {
19566
+ const { defaultCurrency: r } = pe();
19567
+ return /* @__PURE__ */ e("section", { "aria-labelledby": "product-information", children: /* @__PURE__ */ s("div", { className: "grid grid-cols-1 gap-x-14 gap-y-8 md:grid-cols-3", children: [
19568
+ /* @__PURE__ */ s("div", { children: [
19569
+ /* @__PURE__ */ e(
19570
+ "h2",
19571
+ {
19572
+ id: "product-information",
19573
+ className: "text-lg scroll-mt-10 font-semibold text-gray-900 dark:text-gray-50",
19574
+ children: "Pricing"
19575
+ }
19576
+ ),
19577
+ /* @__PURE__ */ e("p", { className: "mt-1 text-sm leading-6 text-gray-500", children: "Enter the pricing details of your product, including the base price and discounted price." })
19578
+ ] }),
19579
+ /* @__PURE__ */ e("div", { className: "md:col-span-2", children: /* @__PURE__ */ e(Ee, { form: t, config: [
19580
+ {
19581
+ name: "basePrice",
19582
+ label: "Base Price",
19583
+ type: "number",
19584
+ placeholder: "Enter base price",
19585
+ prefix: r
19586
+ },
19558
19587
  {
19559
- id: "product-information",
19560
- className: "text-lg scroll-mt-10 font-semibold text-gray-900 dark:text-gray-50",
19561
- children: "Pricing"
19588
+ name: "discountedBasePrice",
19589
+ label: "Discounted Price",
19590
+ type: "number",
19591
+ placeholder: "Enter discounted price",
19592
+ prefix: r
19562
19593
  }
19563
- ),
19564
- /* @__PURE__ */ e("p", { className: "mt-1 text-sm leading-6 text-gray-500", children: "Enter the pricing details of your product, including the base price and discounted price." })
19565
- ] }),
19566
- /* @__PURE__ */ e("div", { className: "md:col-span-2", children: /* @__PURE__ */ e(Ee, { form: t, config: [
19567
- {
19568
- name: "basePrice",
19569
- label: "Base Price",
19570
- type: "number",
19571
- placeholder: "Enter base price",
19572
- prefix: "USD"
19573
- },
19574
- {
19575
- name: "discountedBasePrice",
19576
- label: "Discounted Price",
19577
- type: "number",
19578
- placeholder: "Enter discounted price",
19579
- prefix: "USD"
19580
- }
19581
- ], loading: a }) })
19582
- ] }) }), nn = ({ initialData: t }) => {
19583
- var y, b;
19584
- const { client: a } = L(), r = K(), i = te(), n = ee(), { defaultLocale: o, supportedLocales: l } = ye(), d = t == null ? void 0 : t.id, u = de({
19594
+ ], loading: a }) })
19595
+ ] }) });
19596
+ }, nn = ({ initialData: t }) => {
19597
+ var b, S;
19598
+ const { client: a } = L(), r = K(), i = te(), n = ee(), { defaultCurrency: o, defaultLocale: l, supportedLocales: d } = pe(), c = t == null ? void 0 : t.id, p = de({
19585
19599
  resolver: ce(t ? Uo : Zo),
19586
19600
  defaultValues: t ? {
19587
19601
  ...t,
19588
- defaultLocale: o,
19589
- categories: (y = t.categories) == null ? void 0 : y.map((w) => w.id),
19602
+ defaultLocale: l,
19603
+ categories: (b = t.categories) == null ? void 0 : b.map((w) => w.id),
19590
19604
  translations: t.translations,
19591
19605
  images: t.images,
19592
19606
  metadata: t.metadata,
19593
- modifierGroups: (b = t.modifierGroups) == null ? void 0 : b.map((w) => ({
19607
+ modifierGroups: (S = t.modifierGroups) == null ? void 0 : S.map((w) => ({
19594
19608
  ...w,
19595
- defaultLocale: o,
19609
+ defaultLocale: l,
19596
19610
  translations: w.translations,
19597
19611
  modifiers: w.modifiers
19598
19612
  }))
19599
19613
  } : {
19600
- defaultLocale: o,
19601
- translations: l.map((w) => ({ locale: w })),
19602
- currency: "USD"
19614
+ defaultLocale: l,
19615
+ translations: d.map((w) => ({ locale: w })),
19616
+ currency: o
19603
19617
  }
19604
- }), p = $({
19618
+ }), m = $({
19605
19619
  mutationFn: async (w) => {
19606
- const { status: S } = await a.product.createProduct({
19620
+ const { status: k } = await a.product.createProduct({
19607
19621
  params: { organizationId: n },
19608
19622
  body: w
19609
19623
  });
19610
- if (S !== 201)
19624
+ if (k !== 201)
19611
19625
  throw new Error("Failed to create product");
19612
19626
  }
19613
- }), m = $({
19627
+ }), h = $({
19614
19628
  mutationFn: async (w) => {
19615
- const { status: S } = await a.product.updateProduct({
19616
- params: { organizationId: n, id: d },
19629
+ const { status: k } = await a.product.updateProduct({
19630
+ params: { organizationId: n, id: c },
19617
19631
  body: w
19618
19632
  });
19619
- if (S !== 200)
19633
+ if (k !== 200)
19620
19634
  throw new Error("Failed to update product");
19621
19635
  }
19622
- }), h = async () => {
19623
- se.success("Product saved successfully"), r.push(i.products(n)), await Ie.invalidateQueries({ queryKey: ["products"] }), d && await Ie.invalidateQueries({
19624
- queryKey: ["product", n, d]
19636
+ }), f = async () => {
19637
+ se.success("Product saved successfully"), r.push(i.products(n)), await Ie.invalidateQueries({ queryKey: ["products"] }), c && await Ie.invalidateQueries({
19638
+ queryKey: ["product", n, c]
19625
19639
  });
19626
- }, f = (w) => {
19627
- t ? m.mutate(w, { onSuccess: h }) : p.mutate(w, { onSuccess: h });
19640
+ }, y = (w) => {
19641
+ t ? h.mutate(w, { onSuccess: f }) : m.mutate(w, { onSuccess: f });
19628
19642
  };
19629
- return /* @__PURE__ */ e(Ge, { ...u, children: /* @__PURE__ */ s(
19643
+ return /* @__PURE__ */ e(Ge, { ...p, children: /* @__PURE__ */ s(
19630
19644
  "form",
19631
19645
  {
19632
- onSubmit: u.handleSubmit((w) => f(w)),
19646
+ onSubmit: p.handleSubmit((w) => y(w)),
19633
19647
  className: "space-y-14",
19634
19648
  children: [
19635
- /* @__PURE__ */ e($c, { form: u }),
19649
+ /* @__PURE__ */ e($c, { form: p }),
19636
19650
  /* @__PURE__ */ e(q, {}),
19637
- /* @__PURE__ */ e(Kc, { form: u }),
19651
+ /* @__PURE__ */ e(Kc, { form: p }),
19638
19652
  /* @__PURE__ */ e(q, {}),
19639
- /* @__PURE__ */ e(Gc, { form: u }),
19653
+ /* @__PURE__ */ e(Gc, { form: p }),
19640
19654
  /* @__PURE__ */ e(q, {}),
19641
- /* @__PURE__ */ e(_c, { form: u }),
19655
+ /* @__PURE__ */ e(_c, { form: p }),
19642
19656
  /* @__PURE__ */ e(q, {}),
19643
19657
  /* @__PURE__ */ s("div", { className: "flex justify-end space-x-3", children: [
19644
19658
  /* @__PURE__ */ s(
@@ -19657,7 +19671,7 @@ const $c = ({ form: t }) => {
19657
19671
  T,
19658
19672
  {
19659
19673
  type: "submit",
19660
- isLoading: p.isPending || m.isPending,
19674
+ isLoading: m.isPending || h.isPending,
19661
19675
  loadingText: "Saving...",
19662
19676
  children: [
19663
19677
  /* @__PURE__ */ e(ts, { className: "w-4 h-4 mr-2" }),
@@ -19693,7 +19707,7 @@ function Yc() {
19693
19707
  return /* @__PURE__ */ s("div", { className: "space-y-6", children: [
19694
19708
  /* @__PURE__ */ e("h1", { className: "text-xl font-semibold text-gray-900 sm:text-2xl dark:text-gray-50", children: "Edit Product" }),
19695
19709
  /* @__PURE__ */ e(q, {}),
19696
- n ? /* @__PURE__ */ e("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ e(he, { className: "w-8 h-8" }) }) : /* @__PURE__ */ e("div", { className: "pt-6", children: /* @__PURE__ */ e(nn, { initialData: i }) })
19710
+ n ? /* @__PURE__ */ e("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ e(fe, { className: "w-8 h-8" }) }) : /* @__PURE__ */ e("div", { className: "pt-6", children: /* @__PURE__ */ e(nn, { initialData: i }) })
19697
19711
  ] });
19698
19712
  }
19699
19713
  const Be = ot(), e0 = ({ row: t, table: a }) => {
@@ -19720,7 +19734,7 @@ const Be = ot(), e0 = ({ row: t, table: a }) => {
19720
19734
  "tremor-id": "tremor-raw",
19721
19735
  disabled: !0,
19722
19736
  children: [
19723
- /* @__PURE__ */ e(he, { className: "w-4 h-4" }),
19737
+ /* @__PURE__ */ e(fe, { className: "w-4 h-4" }),
19724
19738
  " Saving..."
19725
19739
  ]
19726
19740
  }
@@ -19761,7 +19775,7 @@ const Be = ot(), e0 = ({ row: t, table: a }) => {
19761
19775
  variant: "ghost",
19762
19776
  className: "group aspect-square px-1.5 py-0! h-8! hover:border hover:border-gray-300 data-[state=open]:border-gray-300 data-[state=open]:bg-gray-50 dark:hover:border-gray-700 dark:data-[state=open]:border-gray-700 dark:data-[state=open]:bg-gray-900",
19763
19777
  disabled: o.isPending,
19764
- children: o.isPending ? /* @__PURE__ */ e(he, { className: "size-4 shrink-0" }) : /* @__PURE__ */ e(
19778
+ children: o.isPending ? /* @__PURE__ */ e(fe, { className: "size-4 shrink-0" }) : /* @__PURE__ */ e(
19765
19779
  aa,
19766
19780
  {
19767
19781
  className: "size-4 shrink-0 text-gray-500 group-hover:text-gray-700 group-data-[state=open]:text-gray-700 dark:group-hover:text-gray-300 dark:group-data-[state=open]:text-gray-300",
@@ -19789,7 +19803,7 @@ const Be = ot(), e0 = ({ row: t, table: a }) => {
19789
19803
  onClick: l,
19790
19804
  disabled: o.isPending,
19791
19805
  children: /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
19792
- o.isPending ? /* @__PURE__ */ e(he, { className: "w-4 h-4" }) : /* @__PURE__ */ e(es, { className: "w-4 h-4" }),
19806
+ o.isPending ? /* @__PURE__ */ e(fe, { className: "w-4 h-4" }) : /* @__PURE__ */ e(es, { className: "w-4 h-4" }),
19793
19807
  o.isPending ? "Deleting..." : "Delete"
19794
19808
  ] })
19795
19809
  }
@@ -19920,8 +19934,14 @@ const Be = ot(), e0 = ({ row: t, table: a }) => {
19920
19934
  cell: ({ row: t, table: a }) => /* @__PURE__ */ e(t0, { row: t, table: a })
19921
19935
  })
19922
19936
  ], r0 = () => {
19923
- const { client: t } = L(), a = te(), { defaultLocale: r } = ye(), i = ee(), n = fe(), [o, l] = I(""), [d] = Xe(o, 300), c = Number((n == null ? void 0 : n.get("page")) || "1"), { isLoading: u, isRefetching: p, isError: m, data: h, refetch: f } = G({
19924
- queryKey: ["products", i, c, d],
19937
+ const { client: t } = L(), a = te(), { defaultLocale: r } = pe(), i = ee(), n = ye(), [o, l] = I(""), [d] = Xe(o, 300), c = Number((n == null ? void 0 : n.get("page")) || "1"), { isLoading: u, isRefetching: p, isError: m, data: h, refetch: f } = G({
19938
+ queryKey: [
19939
+ "products",
19940
+ i,
19941
+ c,
19942
+ d,
19943
+ r
19944
+ ],
19925
19945
  queryFn: async () => {
19926
19946
  const { body: y, status: b } = await t.product.getProducts({
19927
19947
  params: {
@@ -19993,12 +20013,12 @@ const i0 = ({
19993
20013
  }) => {
19994
20014
  var b;
19995
20015
  const { client: o } = L(), l = $({
19996
- mutationFn: async ({ operation: w }) => {
20016
+ mutationFn: async ({ operation: S }) => {
19997
20017
  if ((await o.reservation.updateReservationStatus({
19998
20018
  params: {
19999
20019
  organizationId: t,
20000
20020
  reservationId: a,
20001
- operation: w
20021
+ operation: S
20002
20022
  },
20003
20023
  body: {}
20004
20024
  })).status !== 200)
@@ -20209,7 +20229,7 @@ const i0 = ({
20209
20229
  cell: ({ row: t, table: a }) => /* @__PURE__ */ e(l0, { reservation: t.original, table: a })
20210
20230
  })
20211
20231
  ], c0 = () => {
20212
- const { client: t } = L(), a = ee(), r = fe(), [i, n] = I(""), [o] = Xe(i, 300), l = Number((r == null ? void 0 : r.get("page")) || "1"), { isLoading: d, isRefetching: c, isError: u, data: p, refetch: m } = G({
20232
+ const { client: t } = L(), a = ee(), r = ye(), [i, n] = I(""), [o] = Xe(i, 300), l = Number((r == null ? void 0 : r.get("page")) || "1"), { isLoading: d, isRefetching: c, isError: u, data: p, refetch: m } = G({
20213
20233
  queryKey: ["reservations", a, l, o],
20214
20234
  queryFn: async () => {
20215
20235
  const { body: h, status: f } = await t.reservation.getReservations({
@@ -20436,13 +20456,13 @@ const p0 = () => /* @__PURE__ */ s(
20436
20456
  }
20437
20457
  ), on = (t) => /* @__PURE__ */ e(H.Root, { ...t });
20438
20458
  on.displayName = "Drawer";
20439
- const ln = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(H.Trigger, { ref: r, className: x(t), ...a }));
20459
+ const ln = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(H.Trigger, { ref: r, className: x(t), ...a }));
20440
20460
  ln.displayName = "Drawer.Trigger";
20441
- const dn = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(H.Close, { ref: r, className: x(t), ...a }));
20461
+ const dn = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(H.Close, { ref: r, className: x(t), ...a }));
20442
20462
  dn.displayName = "Drawer.Close";
20443
20463
  const cn = H.Portal;
20444
20464
  cn.displayName = "DrawerPortal";
20445
- const un = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
20465
+ const un = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
20446
20466
  H.Overlay,
20447
20467
  {
20448
20468
  ref: r,
@@ -20463,7 +20483,7 @@ const un = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
20463
20483
  }
20464
20484
  ));
20465
20485
  un.displayName = "DrawerOverlay";
20466
- const pn = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(cn, { children: /* @__PURE__ */ e(un, { children: /* @__PURE__ */ e(
20486
+ const pn = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(cn, { children: /* @__PURE__ */ e(un, { children: /* @__PURE__ */ e(
20467
20487
  H.Content,
20468
20488
  {
20469
20489
  ref: r,
@@ -20483,7 +20503,7 @@ const pn = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(cn, { c
20483
20503
  }
20484
20504
  ) }) }));
20485
20505
  pn.displayName = "DrawerContent";
20486
- const mn = N.forwardRef(({ children: t, className: a, ...r }, i) => /* @__PURE__ */ s(
20506
+ const mn = R.forwardRef(({ children: t, className: a, ...r }, i) => /* @__PURE__ */ s(
20487
20507
  "div",
20488
20508
  {
20489
20509
  ref: i,
@@ -20503,7 +20523,7 @@ const mn = N.forwardRef(({ children: t, className: a, ...r }, i) => /* @__PURE__
20503
20523
  }
20504
20524
  ));
20505
20525
  mn.displayName = "Drawer.Header";
20506
- const gn = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
20526
+ const gn = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
20507
20527
  H.Title,
20508
20528
  {
20509
20529
  ref: r,
@@ -20518,9 +20538,9 @@ const gn = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
20518
20538
  }
20519
20539
  ));
20520
20540
  gn.displayName = "DrawerTitle";
20521
- const hn = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e("div", { ref: r, className: x("flex-1 py-4", t), ...a }));
20541
+ const hn = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e("div", { ref: r, className: x("flex-1 py-4", t), ...a }));
20522
20542
  hn.displayName = "Drawer.Body";
20523
- const m0 = N.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
20543
+ const m0 = R.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e(
20524
20544
  H.Description,
20525
20545
  {
20526
20546
  ref: r,
@@ -20574,7 +20594,7 @@ function g0() {
20574
20594
  }
20575
20595
  const h0 = () => {
20576
20596
  var d;
20577
- const [t, a] = R.useState(!1), r = R.useRef(null), { organizations: i, organization: n } = ye(), o = K(), l = te();
20597
+ const [t, a] = N.useState(!1), r = N.useRef(null), { organizations: i, organization: n } = pe(), o = K(), l = te();
20578
20598
  return /* @__PURE__ */ e(C, { children: /* @__PURE__ */ s(
20579
20599
  He,
20580
20600
  {
@@ -20591,7 +20611,7 @@ const h0 = () => {
20591
20611
  ),
20592
20612
  children: [
20593
20613
  n.data.logoFile ? /* @__PURE__ */ e(
20594
- ge,
20614
+ he,
20595
20615
  {
20596
20616
  src: n.data.logoFile.url,
20597
20617
  alt: n.data.name,
@@ -20647,7 +20667,7 @@ const h0 = () => {
20647
20667
  onClick: () => o.push(l.dashboard(c.id)),
20648
20668
  children: /* @__PURE__ */ s("div", { className: "flex w-full items-center gap-x-2.5", children: [
20649
20669
  c.logoFile ? /* @__PURE__ */ e(
20650
- ge,
20670
+ he,
20651
20671
  {
20652
20672
  src: c.logoFile.url,
20653
20673
  alt: c.name,
@@ -20682,7 +20702,7 @@ const h0 = () => {
20682
20702
  }
20683
20703
  ) });
20684
20704
  }, f0 = () => {
20685
- const [t, a] = R.useState(!1), r = R.useRef(null), { organizations: i, organization: n } = ye(), o = K(), l = te();
20705
+ const [t, a] = N.useState(!1), r = N.useRef(null), { organizations: i, organization: n } = pe(), o = K(), l = te();
20686
20706
  return /* @__PURE__ */ s(
20687
20707
  He,
20688
20708
  {
@@ -20692,7 +20712,7 @@ const h0 = () => {
20692
20712
  children: [
20693
20713
  /* @__PURE__ */ e(Ze, { asChild: !0, children: n.data && /* @__PURE__ */ s("button", { className: "flex items-center gap-x-1.5 rounded-md p-2 hover:bg-gray-100 focus:outline-hidden dark:hover:bg-gray-900", children: [
20694
20714
  n.data.logoFile ? /* @__PURE__ */ e(
20695
- ge,
20715
+ he,
20696
20716
  {
20697
20717
  src: n.data.logoFile.url,
20698
20718
  alt: n.data.name,
@@ -20750,7 +20770,7 @@ const h0 = () => {
20750
20770
  onClick: () => o.push(l.dashboard(d.id)),
20751
20771
  children: /* @__PURE__ */ s("div", { className: "flex w-full items-center gap-x-2.5", children: [
20752
20772
  d.logoFile ? /* @__PURE__ */ e(
20753
- ge,
20773
+ he,
20754
20774
  {
20755
20775
  src: d.logoFile.url,
20756
20776
  alt: d.name,
@@ -20790,8 +20810,8 @@ function fn({
20790
20810
  align: a = "start"
20791
20811
  }) {
20792
20812
  var m, h;
20793
- const r = K(), [i, n] = N.useState(!1), { theme: o, setTheme: l } = vn(), d = Nt(), c = te(), u = d.useSession();
20794
- N.useEffect(() => {
20813
+ const r = K(), [i, n] = R.useState(!1), { theme: o, setTheme: l } = vn(), d = Nt(), c = te(), u = d.useSession();
20814
+ R.useEffect(() => {
20795
20815
  n(!0);
20796
20816
  }, []);
20797
20817
  const p = () => d.signOut({
@@ -21154,7 +21174,7 @@ const S0 = [
21154
21174
  );
21155
21175
  };
21156
21176
  function v0() {
21157
- const { organization: t } = ye();
21177
+ const { organization: t } = pe();
21158
21178
  return t.data ? /* @__PURE__ */ e("div", { className: "space-y-10", children: /* @__PURE__ */ e("section", { "aria-labelledby": "opening-times", children: /* @__PURE__ */ s("div", { className: "grid grid-cols-1 gap-x-14 gap-y-8 md:grid-cols-3", children: [
21159
21179
  /* @__PURE__ */ s("div", { children: [
21160
21180
  /* @__PURE__ */ e(
@@ -21255,7 +21275,7 @@ const A0 = [
21255
21275
  okText: "Save Settings"
21256
21276
  }
21257
21277
  );
21258
- }, yn = R.forwardRef(
21278
+ }, yn = N.forwardRef(
21259
21279
  ({ className: t, asChild: a, ...r }, i) => /* @__PURE__ */ e(
21260
21280
  a ? Ja : "div",
21261
21281
  {
@@ -21275,7 +21295,7 @@ const A0 = [
21275
21295
  );
21276
21296
  yn.displayName = "Card";
21277
21297
  function R0() {
21278
- const { organization: t } = ye();
21298
+ const { organization: t } = pe();
21279
21299
  return t.data ? /* @__PURE__ */ s("div", { className: "space-y-10", children: [
21280
21300
  /* @__PURE__ */ e("section", { "aria-labelledby": "org-information", children: /* @__PURE__ */ s("div", { className: "grid grid-cols-1 gap-x-14 gap-y-8 md:grid-cols-3", children: [
21281
21301
  /* @__PURE__ */ s("div", { children: [
@@ -21572,7 +21592,7 @@ function P0() {
21572
21592
  /* @__PURE__ */ e("h1", { className: "text-lg font-semibold text-gray-900 sm:text-xl dark:text-gray-50", children: "Edit Shipping Method" }),
21573
21593
  /* @__PURE__ */ e(q, {}),
21574
21594
  /* @__PURE__ */ e("div", { className: "pt-6", children: /* @__PURE__ */ e("div", { className: "space-y-10", children: i || !n ? /* @__PURE__ */ e("div", { className: "flex justify-center items-center h-screen mt-5", children: /* @__PURE__ */ s("div", { className: "flex flex-col items-center gap-2", children: [
21575
- /* @__PURE__ */ e(he, { className: "w-12 h-12" }),
21595
+ /* @__PURE__ */ e(fe, { className: "w-12 h-12" }),
21576
21596
  /* @__PURE__ */ e("p", { className: "text-gray-500 text-sm mt-3", children: "Loading data..." })
21577
21597
  ] }) }) : /* @__PURE__ */ e(wn, { initialData: n }) }) })
21578
21598
  ] });
@@ -21693,7 +21713,7 @@ const rt = ot(), T0 = [
21693
21713
  }
21694
21714
  })
21695
21715
  ], Q0 = () => {
21696
- const { client: t } = L(), a = ee(), r = fe(), [i] = I(""), [n] = Xe(i, 300), o = Number((r == null ? void 0 : r.get("page")) || "1"), { isLoading: l, isRefetching: d, isError: c, data: u } = G({
21716
+ const { client: t } = L(), a = ee(), r = ye(), [i] = I(""), [n] = Xe(i, 300), o = Number((r == null ? void 0 : r.get("page")) || "1"), { isLoading: l, isRefetching: d, isError: c, data: u } = G({
21697
21717
  queryKey: [
21698
21718
  "shipping-and-payment",
21699
21719
  a,
@@ -21762,7 +21782,7 @@ function I0() {
21762
21782
  ] });
21763
21783
  }
21764
21784
  const L0 = () => {
21765
- const t = K(), a = fe(), r = Nt(), i = te(), n = r.signIn, o = ma(
21785
+ const t = K(), a = ye(), r = Nt(), i = te(), n = r.signIn, o = ma(
21766
21786
  a == null ? void 0 : a.get("redirect"),
21767
21787
  i
21768
21788
  ), {
@@ -22047,7 +22067,7 @@ function bn({ children: t }) {
22047
22067
  const { appearance: a } = Is(), r = a == null ? void 0 : a.loginImage;
22048
22068
  return /* @__PURE__ */ s("div", { className: "flex w-full min-h-screen", children: [
22049
22069
  r && /* @__PURE__ */ e("div", { className: "hidden lg:block relative w-1/2 overflow-hidden", children: /* @__PURE__ */ e(
22050
- ge,
22070
+ he,
22051
22071
  {
22052
22072
  src: r,
22053
22073
  alt: "Login Visual",
@@ -22063,7 +22083,7 @@ function E0() {
22063
22083
  return /* @__PURE__ */ e(bn, { children: /* @__PURE__ */ e(L0, {}) });
22064
22084
  }
22065
22085
  const D0 = () => {
22066
- const t = K(), a = fe(), r = Nt(), i = te(), { signIn: n, signUp: o } = r, l = ma(
22086
+ const t = K(), a = ye(), r = Nt(), i = te(), { signIn: n, signUp: o } = r, l = ma(
22067
22087
  a == null ? void 0 : a.get("redirect"),
22068
22088
  i
22069
22089
  ), {
@@ -22383,7 +22403,7 @@ function M0(t) {
22383
22403
  return r ? r === "dashboard" ? { type: "dashboard", orgId: l } : r === "orders" ? { type: "orders", orgId: l } : r === "reservations" ? { type: "reservations", orgId: l } : r === "products" ? i ? i === "create" ? { type: "product-create", orgId: l } : { type: "product-edit", orgId: l, id: i } : { type: "products-list", orgId: l } : r === "product-categories" ? i ? i === "create" ? { type: "product-category-create", orgId: l } : { type: "product-category-edit", orgId: l, id: i } : { type: "product-categories-list", orgId: l } : r === "manufacturers" ? i ? i === "create" ? { type: "manufacturer-create", orgId: l } : { type: "manufacturer-edit", orgId: l, id: i } : { type: "manufacturers-list", orgId: l } : r === "settings" ? i ? i === "opening-times" ? { type: "settings-opening-times", orgId: l } : i === "shipping-methods" ? n ? n === "create" ? { type: "shipping-method-create", orgId: l } : { type: "shipping-method-edit", orgId: l, id: n } : { type: "shipping-methods-list", orgId: l } : { type: "settings", orgId: l } : { type: "settings", orgId: l } : { type: "not-found" } : { type: "not-found" };
22384
22404
  }
22385
22405
  function zu({ segments: t }) {
22386
- const a = Nt(), r = te(), i = K(), n = nt(), o = fe(), { data: l, isPending: d } = a.useSession(), c = M0(t), u = c.type === "sign-in" || c.type === "sign-up", p = c.type === "home" || c.type === "organizations", m = o == null ? void 0 : o.get("redirect"), h = o == null ? void 0 : o.toString(), f = n ? `${n}${h ? `?${h}` : ""}` : r.home, y = u ? ma(m, r) : f;
22406
+ const a = Nt(), r = te(), i = K(), n = nt(), o = ye(), { data: l, isPending: d } = a.useSession(), c = M0(t), u = c.type === "sign-in" || c.type === "sign-up", p = c.type === "home" || c.type === "organizations", m = o == null ? void 0 : o.get("redirect"), h = o == null ? void 0 : o.toString(), f = n ? `${n}${h ? `?${h}` : ""}` : r.home, y = u ? ma(m, r) : f;
22387
22407
  if (X(() => {
22388
22408
  if (!d) {
22389
22409
  if (!l && !u) {
@@ -22404,8 +22424,8 @@ function zu({ segments: t }) {
22404
22424
  return /* @__PURE__ */ e(Mr, { children: /* @__PURE__ */ e(Jc, {}) });
22405
22425
  if (c.type === "not-found")
22406
22426
  return /* @__PURE__ */ e(hi, {});
22407
- const b = "orgId" in c ? c.orgId : void 0, w = "id" in c ? c.id : void 0;
22408
- return /* @__PURE__ */ e(Sd, { organizationId: b, id: w, children: /* @__PURE__ */ e(Mr, { children: /* @__PURE__ */ e(Ad, { children: /* @__PURE__ */ e(x0, { children: B0(c) }) }) }) });
22427
+ const b = "orgId" in c ? c.orgId : void 0, S = "id" in c ? c.id : void 0;
22428
+ return /* @__PURE__ */ e(Sd, { organizationId: b, id: S, children: /* @__PURE__ */ e(Mr, { children: /* @__PURE__ */ e(Ad, { children: /* @__PURE__ */ e(x0, { children: B0(c) }) }) }) });
22409
22429
  }
22410
22430
  function B0(t) {
22411
22431
  switch (t.type) {
@@ -22475,7 +22495,7 @@ export {
22475
22495
  oi as X,
22476
22496
  Re as Y,
22477
22497
  Ql as Z,
22478
- me as _,
22498
+ ge as _,
22479
22499
  zu as a,
22480
22500
  Nu as a0,
22481
22501
  qa as a1,