@instockng/storefront-ui 1.0.50 → 1.0.52

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.
Files changed (248) hide show
  1. package/dist/components/Checkout.d.ts.map +1 -1
  2. package/dist/components/PostPurchaseUpsell.d.ts +14 -0
  3. package/dist/components/PostPurchaseUpsell.d.ts.map +1 -0
  4. package/dist/index.mjs +56 -54
  5. package/dist/index100.mjs +19 -26
  6. package/dist/index101.mjs +15 -11
  7. package/dist/index102.mjs +16 -210
  8. package/dist/index103.mjs +56 -171
  9. package/dist/index104.mjs +7 -11
  10. package/dist/index105.mjs +31 -15
  11. package/dist/index106.mjs +17 -26
  12. package/dist/index107.mjs +28 -150
  13. package/dist/index108.mjs +19 -12
  14. package/dist/index109.mjs +12 -24
  15. package/dist/index110.mjs +14 -77
  16. package/dist/index111.mjs +39 -30
  17. package/dist/index112.mjs +18 -140
  18. package/dist/index113.mjs +256 -43
  19. package/dist/index114.mjs +63 -16
  20. package/dist/index115.mjs +7 -26
  21. package/dist/index116.mjs +2 -23
  22. package/dist/index117.mjs +2 -25
  23. package/dist/index118.mjs +28 -16
  24. package/dist/index119.mjs +2 -22
  25. package/dist/index120.mjs +34 -21
  26. package/dist/index121.mjs +42 -64
  27. package/dist/index122.mjs +232 -15
  28. package/dist/index123.mjs +5 -38
  29. package/dist/index124.mjs +130 -20
  30. package/dist/index125.mjs +67 -33
  31. package/dist/index126.mjs +83 -23
  32. package/dist/index127.mjs +28 -18
  33. package/dist/index128.mjs +8 -20
  34. package/dist/index129.mjs +72 -44
  35. package/dist/index13.mjs +148 -141
  36. package/dist/index130.mjs +3 -22
  37. package/dist/index131.mjs +2 -268
  38. package/dist/index132.mjs +80 -67
  39. package/dist/index133.mjs +53 -7
  40. package/dist/index134.mjs +6 -2
  41. package/dist/index135.mjs +5 -2
  42. package/dist/index136.mjs +173 -27
  43. package/dist/index137.mjs +53 -2
  44. package/dist/index138.mjs +69 -21
  45. package/dist/index139.mjs +2 -56
  46. package/dist/index14.mjs +2 -2
  47. package/dist/index140.mjs +2 -29
  48. package/dist/index141.mjs +2 -7
  49. package/dist/index142.mjs +2 -52
  50. package/dist/index143.mjs +18 -6
  51. package/dist/index144.mjs +31 -11
  52. package/dist/index145.mjs +38 -7
  53. package/dist/index146.mjs +18 -28
  54. package/dist/index147.mjs +18 -2
  55. package/dist/index148.mjs +2 -70
  56. package/dist/index149.mjs +18 -165
  57. package/dist/index150.mjs +46 -2
  58. package/dist/index151.mjs +2 -2
  59. package/dist/index152.mjs +30 -2
  60. package/dist/index153.mjs +18 -2
  61. package/dist/index154.mjs +2 -18
  62. package/dist/index155.mjs +2 -32
  63. package/dist/index156.mjs +2 -38
  64. package/dist/index157.mjs +2 -18
  65. package/dist/index158.mjs +67 -13
  66. package/dist/index159.mjs +2 -2
  67. package/dist/index16.mjs +1 -1
  68. package/dist/index160.mjs +48 -15
  69. package/dist/index161.mjs +2 -46
  70. package/dist/index162.mjs +36 -2
  71. package/dist/index163.mjs +142 -20
  72. package/dist/index164.mjs +2 -18
  73. package/dist/index165.mjs +2 -2
  74. package/dist/index166.mjs +19 -2
  75. package/dist/index168.mjs +2 -2
  76. package/dist/index169.mjs +18 -64
  77. package/dist/index17.mjs +14 -14
  78. package/dist/index170.mjs +2 -2
  79. package/dist/index171.mjs +2 -53
  80. package/dist/index172.mjs +24 -2
  81. package/dist/index173.mjs +15 -28
  82. package/dist/index174.mjs +2 -152
  83. package/dist/index175.mjs +2 -2
  84. package/dist/index176.mjs +2 -2
  85. package/dist/index177.mjs +14 -10
  86. package/dist/index178.mjs +2 -2
  87. package/dist/index179.mjs +23 -2
  88. package/dist/index180.mjs +2 -26
  89. package/dist/index181.mjs +2 -2
  90. package/dist/index182.mjs +2 -2
  91. package/dist/index183.mjs +16 -17
  92. package/dist/index184.mjs +2 -23
  93. package/dist/index185.mjs +23 -2
  94. package/dist/index186.mjs +2 -2
  95. package/dist/index187.mjs +2 -2
  96. package/dist/index188.mjs +2 -23
  97. package/dist/index189.mjs +2 -2
  98. package/dist/index190.mjs +2 -23
  99. package/dist/index191.mjs +2 -2
  100. package/dist/index192.mjs +2 -2
  101. package/dist/index193.mjs +2 -2
  102. package/dist/index194.mjs +124 -20
  103. package/dist/index195.mjs +2 -2
  104. package/dist/index196.mjs +71 -20
  105. package/dist/index197.mjs +74 -2
  106. package/dist/index199.mjs +108 -2
  107. package/dist/index20.mjs +2 -2
  108. package/dist/index200.mjs +2 -2
  109. package/dist/index202.mjs +2 -2
  110. package/dist/index203.mjs +2 -2
  111. package/dist/index204.mjs +2 -2
  112. package/dist/index205.mjs +2 -127
  113. package/dist/index206.mjs +2 -2
  114. package/dist/index207.mjs +2 -74
  115. package/dist/index208.mjs +2 -74
  116. package/dist/index209.mjs +2 -31
  117. package/dist/index210.mjs +36 -10
  118. package/dist/index211.mjs +2 -4
  119. package/dist/index212.mjs +243 -3
  120. package/dist/index213.mjs +2 -13
  121. package/dist/index214.mjs +33 -7
  122. package/dist/index215.mjs +64 -11
  123. package/dist/index216.mjs +24 -4
  124. package/dist/index217.mjs +2 -33
  125. package/dist/index218.mjs +2 -31
  126. package/dist/index219.mjs +2 -28
  127. package/dist/index220.mjs +20 -60
  128. package/dist/index221.mjs +56 -2
  129. package/dist/index222.mjs +29 -2
  130. package/dist/index223.mjs +7 -2
  131. package/dist/index224.mjs +52 -2
  132. package/dist/index225.mjs +6 -108
  133. package/dist/index226.mjs +12 -2
  134. package/dist/index227.mjs +7 -2
  135. package/dist/index228.mjs +28 -2
  136. package/dist/index229.mjs +2 -2
  137. package/dist/index23.mjs +2 -2
  138. package/dist/index230.mjs +70 -2
  139. package/dist/index231.mjs +167 -2
  140. package/dist/index232.mjs +2 -2
  141. package/dist/index233.mjs +2 -244
  142. package/dist/index234.mjs +2 -2
  143. package/dist/index235.mjs +2 -33
  144. package/dist/index236.mjs +2 -65
  145. package/dist/index237.mjs +2 -25
  146. package/dist/index238.mjs +4 -2
  147. package/dist/index239.mjs +2 -37
  148. package/dist/index24.mjs +1 -1
  149. package/dist/index242.mjs +2 -2
  150. package/dist/index243.mjs +18 -2
  151. package/dist/index244.mjs +47 -2
  152. package/dist/index245.mjs +2 -2
  153. package/dist/index246.mjs +2 -2
  154. package/dist/index247.mjs +2 -2
  155. package/dist/index248.mjs +2 -2
  156. package/dist/index249.mjs +91 -4
  157. package/dist/index250.mjs +2 -2
  158. package/dist/index251.mjs +31 -2
  159. package/dist/index252.mjs +11 -3
  160. package/dist/index253.mjs +4 -2
  161. package/dist/index254.mjs +4 -2
  162. package/dist/index255.mjs +13 -2
  163. package/dist/index256.mjs +7 -17
  164. package/dist/index257.mjs +11 -12
  165. package/dist/index258.mjs +5 -6
  166. package/dist/index259.mjs +33 -30
  167. package/dist/index260.mjs +31 -2
  168. package/dist/index261.mjs +27 -17
  169. package/dist/index262.mjs +58 -44
  170. package/dist/index263.mjs +2 -2
  171. package/dist/index264.mjs +2 -2
  172. package/dist/index265.mjs +2 -2
  173. package/dist/index266.mjs +3 -2
  174. package/dist/index267.mjs +2 -91
  175. package/dist/index268.mjs +2 -2
  176. package/dist/index269.mjs +17 -2
  177. package/dist/index27.mjs +21 -10
  178. package/dist/index270.mjs +13 -2
  179. package/dist/index271.mjs +6 -2
  180. package/dist/index272.mjs +33 -0
  181. package/dist/index30.mjs +4 -3
  182. package/dist/index31.mjs +11 -10
  183. package/dist/index32.mjs +11 -11
  184. package/dist/index33.mjs +1 -1
  185. package/dist/index34.mjs +21 -12
  186. package/dist/index35.mjs +1 -1
  187. package/dist/index36.mjs +1 -1
  188. package/dist/index37.mjs +1 -1
  189. package/dist/index38.mjs +2 -2
  190. package/dist/index40.mjs +2 -2
  191. package/dist/index44.mjs +70 -2
  192. package/dist/index45.mjs +2 -60
  193. package/dist/index46.mjs +57 -48
  194. package/dist/index47.mjs +51 -33
  195. package/dist/index48.mjs +33 -15
  196. package/dist/index49.mjs +12 -2260
  197. package/dist/index50.mjs +2263 -36
  198. package/dist/index51.mjs +36 -44
  199. package/dist/index52.mjs +44 -99
  200. package/dist/index53.mjs +99 -113
  201. package/dist/index54.mjs +82 -50
  202. package/dist/index55.mjs +55 -51
  203. package/dist/index56.mjs +46 -64
  204. package/dist/index57.mjs +71 -57
  205. package/dist/index58.mjs +57 -55
  206. package/dist/index59.mjs +75 -15
  207. package/dist/index60.mjs +13 -14
  208. package/dist/index61.mjs +16 -59
  209. package/dist/index62.mjs +43 -105
  210. package/dist/index63.mjs +89 -93
  211. package/dist/index64.mjs +128 -23
  212. package/dist/index65.mjs +24 -2
  213. package/dist/index66.mjs +149 -19
  214. package/dist/index67.mjs +19 -149
  215. package/dist/index68.mjs +2 -5
  216. package/dist/index71.mjs +2 -2
  217. package/dist/index74.mjs +35 -35
  218. package/dist/index75.mjs +1 -1
  219. package/dist/index76.mjs +2 -2
  220. package/dist/index77.mjs +2 -2
  221. package/dist/index79.mjs +4 -234
  222. package/dist/index80.mjs +2 -6
  223. package/dist/index81.mjs +2 -134
  224. package/dist/index82.mjs +25 -65
  225. package/dist/index83.mjs +16 -85
  226. package/dist/index84.mjs +214 -28
  227. package/dist/index85.mjs +179 -8
  228. package/dist/index86.mjs +19 -72
  229. package/dist/index87.mjs +22 -3
  230. package/dist/index88.mjs +33 -2
  231. package/dist/index89.mjs +153 -80
  232. package/dist/index90.mjs +19 -53
  233. package/dist/index91.mjs +30 -5
  234. package/dist/index92.mjs +83 -4
  235. package/dist/index93.mjs +35 -176
  236. package/dist/index94.mjs +145 -53
  237. package/dist/index95.mjs +55 -69
  238. package/dist/index96.mjs +23 -2
  239. package/dist/index97.mjs +27 -34
  240. package/dist/index98.mjs +22 -42
  241. package/dist/index99.mjs +25 -2
  242. package/dist/styles.css +1 -1
  243. package/package.json +2 -2
  244. package/src/components/Checkout.stories.tsx +84 -0
  245. package/src/components/Checkout.tsx +26 -34
  246. package/src/components/PostPurchaseUpsell.stories.tsx +201 -0
  247. package/src/components/PostPurchaseUpsell.tsx +154 -0
  248. package/src/components/ui/modal.tsx +3 -3
package/dist/index13.mjs CHANGED
@@ -1,62 +1,63 @@
1
1
  'use client';
2
- import { jsxs as a, jsx as e, Fragment as Me } from "react/jsx-runtime";
3
- import { useState as w, useEffect as S, useMemo as K, useCallback as qe } from "react";
4
- import { object as G, string as N, ValidationError as Ie } from "./index43.mjs";
2
+ import { jsxs as a, jsx as e, Fragment as qe } from "react/jsx-runtime";
3
+ import { useState as w, useEffect as L, useMemo as K, useCallback as Ie } from "react";
4
+ import { object as G, string as v, ValidationError as je } from "./index43.mjs";
5
5
  import "./index21.mjs";
6
6
  import "@tanstack/react-query";
7
- import { useGetDeliveryZones as je } from "./index36.mjs";
7
+ import { useGetDeliveryZones as Le } from "./index36.mjs";
8
8
  import { useCart as Se } from "./index3.mjs";
9
- import { Modal as oe } from "./index17.mjs";
9
+ import { Modal as me } from "./index17.mjs";
10
10
  import { FormInput as q } from "./index18.mjs";
11
- import { FormSelect as me } from "./index19.mjs";
11
+ import { FormSelect as he } from "./index19.mjs";
12
12
  import { Button as _ } from "./index14.mjs";
13
- import { Loader2 as O, ChevronLeft as Ze, ChevronRight as Le, CheckCircle as ze, Package as he, Banknote as ue, Mail as Fe, Phone as Te, ChevronDown as Ae, Zap as _e } from "lucide-react";
14
- import { formatCurrency as I, cn as P, getFbCookies as ye, getTikTokCookies as pe } from "./index20.mjs";
15
- import Be from "./index44.mjs";
16
- import { usePaystackPayment as Re } from "./index45.mjs";
17
- const We = "2348125648668", $e = `https://wa.me/${We}`, He = (i) => i.replace(/\D/g, ""), Ke = G({
18
- firstName: N().required("First name is required").min(2, "First name must be at least 2 characters").max(50, "First name must be less than 50 characters"),
19
- lastName: N().required("Last name is required").min(2, "Last name must be at least 2 characters").max(50, "Last name must be less than 50 characters"),
20
- email: N().required("Email is required").email("Please enter a valid email address"),
21
- phone: N().required("Phone number is required").test("nigerian-phone", "Please enter a valid Nigerian phone number (e.g. 0812 564 8668)", (i) => {
13
+ import { Loader2 as U, ChevronLeft as Ze, ChevronRight as ze, Package as ue, Banknote as pe, Mail as Fe, Phone as Te, ChevronDown as Ae, Zap as _e } from "lucide-react";
14
+ import { PostPurchaseUpsell as Be } from "./index44.mjs";
15
+ import { formatCurrency as I, cn as P, getFbCookies as ye, getTikTokCookies as fe } from "./index20.mjs";
16
+ import We from "./index45.mjs";
17
+ import { usePaystackPayment as Re } from "./index46.mjs";
18
+ const $e = "2348125648668", He = `https://wa.me/${$e}`, Ke = (i) => i.replace(/\D/g, ""), Ue = G({
19
+ firstName: v().required("First name is required").min(2, "First name must be at least 2 characters").max(50, "First name must be less than 50 characters"),
20
+ lastName: v().required("Last name is required").min(2, "Last name must be at least 2 characters").max(50, "Last name must be less than 50 characters"),
21
+ email: v().required("Email is required").email("Please enter a valid email address"),
22
+ phone: v().required("Phone number is required").test("nigerian-phone", "Please enter a valid Nigerian phone number (e.g. 0812 564 8668)", (i) => {
22
23
  if (!i) return !1;
23
- const j = He(i);
24
+ const j = Ke(i);
24
25
  return [
25
26
  /^0[789]\d{9}$/
26
27
  // 0xxxxxxxxx (11 digits total)
27
- ].some((v) => v.test(j));
28
+ ].some((N) => N.test(j));
28
29
  })
29
- }), Oe = G({
30
- address: N().required("Street address is required").min(10, "Please provide a complete address"),
31
- city: N().required("City is required").min(3, "City name must be at least 3 characters"),
32
- state: N().required("State is required").test("not-empty", "State is required", (i) => !!i && i.trim() !== ""),
33
- deliveryZoneId: N().required("Delivery zone is required").test("not-empty", "Delivery zone is required", (i) => !!i && i.trim() !== "")
34
30
  }), Ge = G({
35
- paymentMethod: N().oneOf(["cod", "online"], "Please select a payment method").required("Payment method is required")
31
+ address: v().required("Street address is required").min(10, "Please provide a complete address"),
32
+ city: v().required("City is required").min(3, "City name must be at least 3 characters"),
33
+ state: v().required("State is required").test("not-empty", "State is required", (i) => !!i && i.trim() !== ""),
34
+ deliveryZoneId: v().required("Delivery zone is required").test("not-empty", "Delivery zone is required", (i) => !!i && i.trim() !== "")
35
+ }), Oe = G({
36
+ paymentMethod: v().oneOf(["cod", "online"], "Please select a payment method").required("Payment method is required")
36
37
  });
37
- function dt({
38
+ function ct({
38
39
  isOpen: i,
39
40
  onClose: j,
40
41
  initialData: l,
41
- onSuccess: v,
42
- onError: c,
43
- submitButtonText: fe = "Place Order",
44
- refundPolicy: Z
42
+ onSuccess: N,
43
+ onError: o,
44
+ submitButtonText: ve = "Place Order",
45
+ refundPolicy: S
45
46
  }) {
46
- var te, ae, re, se, ne, le, ie, de, ce;
47
- const [o, g] = w("customer"), [L, Ne] = w(void 0), [p, U] = w(void 0), [f, B] = w(null), { refetch: V, isLoading: Y, cart: s, updateCartMutation: R, checkoutMutation: ve, clearAndCreateNewCart: J } = Se(), Q = (te = s == null ? void 0 : s.brand) == null ? void 0 : te.paystackPublicKey, X = Re({
47
+ var te, ae, re, se, ne, le, ie, de, oe, ce;
48
+ const [c, g] = w("customer"), [Z, Ne] = w(void 0), [f, O] = w(void 0), [u, B] = w(null), { refetch: V, isLoading: Y, cart: s, updateCartMutation: W, checkoutMutation: ge, clearAndCreateNewCart: J } = Se(), Q = (te = s == null ? void 0 : s.brand) == null ? void 0 : te.paystackPublicKey, X = Re({
48
49
  isOpen: i,
49
50
  publicKey: Q || "",
50
51
  onSuccess: async (t) => {
51
52
  try {
52
- const { fbc: n, fbp: d } = ye(), { ttp: y, ttclid: M } = pe(), x = await k.mutateAsync({
53
+ const { fbc: n, fbp: d } = ye(), { ttp: y, ttclid: M } = fe(), x = await k.mutateAsync({
53
54
  firstName: r.firstName,
54
55
  lastName: r.lastName,
55
56
  email: r.email,
56
57
  phone: r.phone,
57
58
  address: r.address,
58
59
  city: r.city,
59
- deliveryZoneId: p || r.deliveryZoneId,
60
+ deliveryZoneId: f || r.deliveryZoneId,
60
61
  paymentMethod: r.paymentMethod,
61
62
  paystackReference: t.reference,
62
63
  fbc: n,
@@ -66,28 +67,28 @@ function dt({
66
67
  });
67
68
  if ("error" in x) {
68
69
  const H = x.error;
69
- c == null || c(new Error((H == null ? void 0 : H.message) || "Checkout failed"));
70
+ o == null || o(new Error((H == null ? void 0 : H.message) || "Checkout failed"));
70
71
  return;
71
72
  }
72
- B(x), J(), v == null || v(x.id);
73
+ B(x), J(), N == null || N(x.id);
73
74
  } catch (n) {
74
- c == null || c(n);
75
+ o == null || o(n);
75
76
  }
76
77
  },
77
78
  onClose: () => {
78
79
  console.log("Payment popup closed by user");
79
80
  }
80
81
  });
81
- S(() => {
82
+ L(() => {
82
83
  i && V();
83
84
  }, [i, V]);
84
- const { data: C } = je(((ae = s == null ? void 0 : s.brand) == null ? void 0 : ae.id) || "", {
85
+ const { data: C } = Le(((ae = s == null ? void 0 : s.brand) == null ? void 0 : ae.id) || "", {
85
86
  enabled: !!((re = s == null ? void 0 : s.brand) != null && re.id)
86
- }), m = K(() => C == null ? void 0 : C.find((t) => t.id === L), [C, L]), u = K(() => m == null ? void 0 : m.zones.find((t) => t.id === p), [m, p]), k = ve;
87
- S(() => {
87
+ }), m = K(() => C == null ? void 0 : C.find((t) => t.id === Z), [C, Z]), p = K(() => m == null ? void 0 : m.zones.find((t) => t.id === f), [m, f]), k = ge;
88
+ L(() => {
88
89
  i || (B(null), g("customer"), k.reset());
89
90
  }, [i]);
90
- const [r, W] = w({
91
+ const [r, R] = w({
91
92
  firstName: (l == null ? void 0 : l.firstName) || "",
92
93
  lastName: (l == null ? void 0 : l.lastName) || "",
93
94
  email: (l == null ? void 0 : l.email) || "",
@@ -98,12 +99,12 @@ function dt({
98
99
  paymentMethod: (l == null ? void 0 : l.paymentMethod) || "online",
99
100
  notes: (l == null ? void 0 : l.notes) || ""
100
101
  });
101
- S(() => {
102
+ L(() => {
102
103
  i && g("customer");
103
104
  }, [i]);
104
105
  const [E, D] = w(!1);
105
- S(() => {
106
- i && s && !l && !E && (W((t) => {
106
+ L(() => {
107
+ i && s && !l && !E && (R((t) => {
107
108
  var n;
108
109
  return {
109
110
  ...t,
@@ -114,51 +115,51 @@ function dt({
114
115
  deliveryZoneId: ((n = s.deliveryZone) == null ? void 0 : n.id) || t.deliveryZoneId
115
116
  };
116
117
  }), D(!0)), i || D(!1);
117
- }, [i, s, l, E]), S(() => {
118
- if (p) {
119
- const t = m == null ? void 0 : m.zones.find((n) => n.id === p);
120
- t && W((n) => ({
118
+ }, [i, s, l, E]), L(() => {
119
+ if (f) {
120
+ const t = m == null ? void 0 : m.zones.find((n) => n.id === f);
121
+ t && R((n) => ({
121
122
  ...n,
122
123
  paymentMethod: t.allowOnline ? "online" : "cod"
123
124
  }));
124
125
  }
125
- }, [p, m]);
126
- const [h, z] = w({}), [$, ge] = w(!1), b = (t) => {
126
+ }, [f, m]);
127
+ const [h, z] = w({}), [$, be] = w(!1), b = (t) => {
127
128
  const { name: n, value: d } = t.target;
128
- W((y) => ({ ...y, [n]: d })), h[n] && z((y) => ({ ...y, [n]: void 0 }));
129
- }, F = qe(
129
+ R((y) => ({ ...y, [n]: d })), h[n] && z((y) => ({ ...y, [n]: void 0 }));
130
+ }, F = Ie(
130
131
  (t) => {
131
132
  const n = r[t];
132
133
  if (!n) return;
133
134
  const d = {};
134
- t === "firstName" ? d.customerFirstName = n : t === "lastName" ? d.customerLastName = n : t === "email" ? d.customerEmail = n : t === "phone" && (d.customerPhone = n), R.mutate(d);
135
+ t === "firstName" ? d.customerFirstName = n : t === "lastName" ? d.customerLastName = n : t === "email" ? d.customerEmail = n : t === "phone" && (d.customerPhone = n), W.mutate(d);
135
136
  },
136
- [r, R]
137
+ [r, W]
137
138
  ), T = (t) => {
138
139
  const n = {};
139
140
  try {
140
141
  if (t === "customer")
141
- Ke.validateSync(r, { abortEarly: !1 });
142
+ Ue.validateSync(r, { abortEarly: !1 });
142
143
  else if (t === "delivery") {
143
144
  const d = {
144
145
  address: r.address,
145
146
  city: r.city,
146
- state: L || r.state || "",
147
- deliveryZoneId: p || r.deliveryZoneId || ""
147
+ state: Z || r.state || "",
148
+ deliveryZoneId: f || r.deliveryZoneId || ""
148
149
  };
149
- Oe.validateSync(d, { abortEarly: !1 });
150
- } else t === "payment" && Ge.validateSync(r, { abortEarly: !1 });
150
+ Ge.validateSync(d, { abortEarly: !1 });
151
+ } else t === "payment" && Oe.validateSync(r, { abortEarly: !1 });
151
152
  } catch (d) {
152
- d instanceof Ie && d.inner.forEach((y) => {
153
+ d instanceof je && d.inner.forEach((y) => {
153
154
  y.path && (n[y.path] = y.message);
154
155
  });
155
156
  }
156
157
  return z(n), Object.keys(n).length === 0;
157
- }, be = () => {
158
- T(o) && (o === "customer" ? g("delivery") : o === "delivery" && g("payment"));
159
158
  }, xe = () => {
160
- o === "payment" ? g("delivery") : o === "delivery" && g("customer");
161
- }, we = async () => {
159
+ T(c) && (c === "customer" ? g("delivery") : c === "delivery" && g("payment"));
160
+ }, we = () => {
161
+ c === "payment" ? g("delivery") : c === "delivery" && g("customer");
162
+ }, Ce = async () => {
162
163
  if (!T("customer")) {
163
164
  g("customer");
164
165
  return;
@@ -170,11 +171,11 @@ function dt({
170
171
  if (T("payment")) {
171
172
  if (r.paymentMethod === "online") {
172
173
  if (!Q) {
173
- c == null || c(new Error("Paystack is not configured. Please contact support."));
174
+ o == null || o(new Error("Paystack is not configured. Please contact support."));
174
175
  return;
175
176
  }
176
177
  if (!X.isLoaded) {
177
- c == null || c(new Error("Payment system is loading. Please try again."));
178
+ o == null || o(new Error("Payment system is loading. Please try again."));
178
179
  return;
179
180
  }
180
181
  const t = Math.round(s.pricing.total * 100);
@@ -201,14 +202,14 @@ function dt({
201
202
  return;
202
203
  }
203
204
  try {
204
- const { fbc: t, fbp: n } = ye(), { ttp: d, ttclid: y } = pe(), M = await k.mutateAsync({
205
+ const { fbc: t, fbp: n } = ye(), { ttp: d, ttclid: y } = fe(), M = await k.mutateAsync({
205
206
  firstName: r.firstName,
206
207
  lastName: r.lastName,
207
208
  email: r.email,
208
209
  phone: r.phone,
209
210
  address: r.address,
210
211
  city: r.city,
211
- deliveryZoneId: p || r.deliveryZoneId,
212
+ deliveryZoneId: f || r.deliveryZoneId,
212
213
  paymentMethod: r.paymentMethod,
213
214
  fbc: t,
214
215
  fbp: n,
@@ -217,21 +218,21 @@ function dt({
217
218
  });
218
219
  if ("error" in M) {
219
220
  const x = M.error;
220
- c == null || c(new Error((x == null ? void 0 : x.message) || "Checkout failed"));
221
+ o == null || o(new Error((x == null ? void 0 : x.message) || "Checkout failed"));
221
222
  return;
222
223
  }
223
- B(M), J(), v == null || v(M.id);
224
+ B(M), J(), N == null || N(M.id);
224
225
  } catch (t) {
225
- c == null || c(t);
226
+ o == null || o(t);
226
227
  }
227
228
  }
228
- }, Ce = {
229
+ }, Pe = {
229
230
  customer: "Customer Information",
230
231
  delivery: "Delivery Address",
231
232
  payment: "Payment Method"
232
- }, Pe = K(() => Ce[o], [o]), ke = /* @__PURE__ */ a("div", { className: "space-y-3", children: [
233
- (o === "payment" || o === "delivery") && ((se = s == null ? void 0 : s.pricing) == null ? void 0 : se.total) && /* @__PURE__ */ a("div", { className: "text-sm text-black relative", children: [
234
- Y && /* @__PURE__ */ e("div", { className: "absolute flex items-center justify-center inset-0 bg-white opacity-50", children: /* @__PURE__ */ e(O, { className: "animate-spin text-accent-500" }) }),
233
+ }, ke = K(() => Pe[c], [c]), Me = /* @__PURE__ */ a("div", { className: "space-y-3", children: [
234
+ (c === "payment" || c === "delivery") && ((se = s == null ? void 0 : s.pricing) == null ? void 0 : se.total) && /* @__PURE__ */ a("div", { className: "text-sm text-black relative", children: [
235
+ Y && /* @__PURE__ */ e("div", { className: "absolute flex items-center justify-center inset-0 bg-white opacity-50", children: /* @__PURE__ */ e(U, { className: "animate-spin text-accent-500" }) }),
235
236
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between font-medium", children: [
236
237
  /* @__PURE__ */ e("span", { children: "Subtotal" }),
237
238
  /* @__PURE__ */ e("span", { children: I(((ne = s == null ? void 0 : s.pricing) == null ? void 0 : ne.subtotal) ?? 0) })
@@ -250,16 +251,16 @@ function dt({
250
251
  /* @__PURE__ */ e("hr", { className: "border-gray-200 my-2" }),
251
252
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between font-medium", children: [
252
253
  /* @__PURE__ */ e("span", { children: "Total" }),
253
- /* @__PURE__ */ e("span", { children: I(((ce = s == null ? void 0 : s.pricing) == null ? void 0 : ce.total) ?? 0) })
254
+ /* @__PURE__ */ e("span", { children: I(((oe = s == null ? void 0 : s.pricing) == null ? void 0 : oe.total) ?? 0) })
254
255
  ] })
255
256
  ] }),
256
257
  /* @__PURE__ */ a("div", { className: "flex gap-3", children: [
257
- o !== "customer" && /* @__PURE__ */ a(
258
+ c !== "customer" && /* @__PURE__ */ a(
258
259
  _,
259
260
  {
260
261
  type: "button",
261
262
  variant: "outline",
262
- onClick: xe,
263
+ onClick: we,
263
264
  className: "flex-1 border-gray-400",
264
265
  size: "lg",
265
266
  children: [
@@ -268,42 +269,49 @@ function dt({
268
269
  ]
269
270
  }
270
271
  ),
271
- o !== "payment" ? /* @__PURE__ */ a(
272
+ c !== "payment" ? /* @__PURE__ */ a(
272
273
  _,
273
274
  {
274
275
  type: "button",
275
- onClick: be,
276
+ onClick: xe,
276
277
  className: "flex-1 bg-accent-500 text-white hover:bg-accent-600",
277
278
  size: "lg",
278
279
  children: [
279
280
  "Next",
280
- /* @__PURE__ */ e(Le, { className: "ml-2 h-4 w-4" })
281
+ /* @__PURE__ */ e(ze, { className: "ml-2 h-4 w-4" })
281
282
  ]
282
283
  }
283
284
  ) : /* @__PURE__ */ e(
284
285
  _,
285
286
  {
286
287
  type: "button",
287
- onClick: we,
288
+ onClick: Ce,
288
289
  disabled: k.isPending,
289
290
  className: "flex-1 bg-accent-500 text-white hover:bg-accent-600",
290
291
  size: "lg",
291
- children: k.isPending ? /* @__PURE__ */ a(Me, { children: [
292
- /* @__PURE__ */ e(O, { className: "mr-2 h-4 w-4 animate-spin" }),
292
+ children: k.isPending ? /* @__PURE__ */ a(qe, { children: [
293
+ /* @__PURE__ */ e(U, { className: "mr-2 h-4 w-4 animate-spin" }),
293
294
  "Processing..."
294
- ] }) : fe
295
+ ] }) : ve
295
296
  }
296
297
  )
297
298
  ] }),
298
299
  k.isError && /* @__PURE__ */ e("div", { className: "rounded-lg bg-red-50 p-3 text-sm text-red-600", children: "Failed to place order. Please check your information and try again." })
299
300
  ] }), A = (t) => !(s != null && s.availablePaymentMethods.includes(t));
300
- if (f)
301
+ if (u)
301
302
  return /* @__PURE__ */ e(
302
- oe,
303
+ me,
303
304
  {
304
305
  isOpen: i,
305
306
  onClose: j,
306
- title: "Order Placed Successfully!",
307
+ title: /* @__PURE__ */ a("span", { className: "flex items-center gap-3", children: [
308
+ /* @__PURE__ */ e("span", { className: "w-10 h-10 bg-green-100 rounded-full flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ e("svg", { className: "h-6 w-6 text-green-600", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) }) }),
309
+ /* @__PURE__ */ a("span", { children: [
310
+ "Thank You!",
311
+ /* @__PURE__ */ e("br", {}),
312
+ "We'll contact you shortly"
313
+ ] })
314
+ ] }),
307
315
  footer: /* @__PURE__ */ e(
308
316
  _,
309
317
  {
@@ -314,77 +322,76 @@ function dt({
314
322
  }
315
323
  ),
316
324
  size: "lg",
317
- contentClassName: "p-6",
318
- children: /* @__PURE__ */ a("div", { className: "text-center space-y-6", children: [
319
- /* @__PURE__ */ e("div", { className: "flex justify-center", children: /* @__PURE__ */ e("div", { className: "w-20 h-20 bg-green-100 rounded-full flex items-center justify-center", children: /* @__PURE__ */ e(ze, { className: "h-12 w-12 text-green-600" }) }) }),
320
- /* @__PURE__ */ a("div", { className: "space-y-2", children: [
321
- /* @__PURE__ */ e("h3", { className: "text-2xl font-bold text-gray-900", children: "Thank You!" }),
322
- /* @__PURE__ */ e("p", { className: "text-gray-600", children: "Your order has been placed successfully." })
323
- ] }),
324
- /* @__PURE__ */ a("div", { className: "bg-gray-50 rounded-lg p-6 space-y-4", children: [
325
+ contentClassName: "p-4",
326
+ children: /* @__PURE__ */ a("div", { className: "space-y-4", children: [
327
+ /* @__PURE__ */ a("div", { className: "bg-gray-50 rounded-lg p-4 space-y-2", children: [
325
328
  /* @__PURE__ */ a("div", { className: "flex items-center justify-center space-x-2 text-gray-700", children: [
326
- /* @__PURE__ */ e(he, { className: "h-5 w-5" }),
327
- /* @__PURE__ */ a("span", { className: "font-medium", children: [
329
+ /* @__PURE__ */ e(ue, { className: "h-4 w-4" }),
330
+ /* @__PURE__ */ a("span", { className: "text-sm font-medium", children: [
328
331
  "Order #",
329
- f.orderNumber
332
+ u.orderNumber
330
333
  ] })
331
334
  ] }),
332
- /* @__PURE__ */ a("div", { className: "border-t border-gray-200 pt-4 space-y-3", children: [
335
+ /* @__PURE__ */ a("div", { className: "border-t border-gray-200 pt-2 space-y-1.5", children: [
333
336
  /* @__PURE__ */ a("div", { className: "flex justify-between text-sm", children: [
334
337
  /* @__PURE__ */ e("span", { className: "text-gray-600", children: "Customer" }),
335
338
  /* @__PURE__ */ a("span", { className: "font-medium text-gray-900", children: [
336
- f.firstName,
339
+ u.firstName,
337
340
  " ",
338
- f.lastName
341
+ u.lastName
339
342
  ] })
340
343
  ] }),
341
344
  /* @__PURE__ */ a("div", { className: "flex justify-between text-sm", children: [
342
345
  /* @__PURE__ */ e("span", { className: "text-gray-600", children: "Phone" }),
343
- /* @__PURE__ */ e("span", { className: "font-medium text-gray-900", children: f.phone })
346
+ /* @__PURE__ */ e("span", { className: "font-medium text-gray-900", children: u.phone })
344
347
  ] }),
345
- f.email && /* @__PURE__ */ a("div", { className: "flex justify-between text-sm", children: [
348
+ u.email && /* @__PURE__ */ a("div", { className: "flex justify-between text-sm", children: [
346
349
  /* @__PURE__ */ e("span", { className: "text-gray-600", children: "Email" }),
347
- /* @__PURE__ */ e("span", { className: "font-medium text-gray-900", children: f.email })
350
+ /* @__PURE__ */ e("span", { className: "font-medium text-gray-900", children: u.email })
348
351
  ] }),
349
352
  /* @__PURE__ */ a("div", { className: "flex justify-between text-sm", children: [
350
- /* @__PURE__ */ e("span", { className: "text-gray-600", children: "Payment Method" }),
351
- /* @__PURE__ */ e("span", { className: "font-medium text-gray-900", children: f.paymentMethod === "cod" ? "Cash on Delivery" : "Online Payment" })
353
+ /* @__PURE__ */ e("span", { className: "text-gray-600", children: "Payment" }),
354
+ /* @__PURE__ */ e("span", { className: "font-medium text-gray-900", children: u.paymentMethod === "cod" ? "Cash on Delivery" : "Online" })
352
355
  ] }),
353
356
  /* @__PURE__ */ a("div", { className: "flex justify-between text-sm", children: [
354
357
  /* @__PURE__ */ e("span", { className: "text-gray-600", children: "Total" }),
355
- /* @__PURE__ */ e("span", { className: "font-bold text-gray-900", children: I(f.totalPrice) })
358
+ /* @__PURE__ */ e("span", { className: "font-bold text-gray-900", children: I(u.totalPrice) })
356
359
  ] })
357
360
  ] })
358
361
  ] }),
359
- /* @__PURE__ */ e("div", { className: "bg-blue-50 rounded-lg p-4", children: /* @__PURE__ */ a("p", { className: "text-sm text-blue-900", children: [
360
- /* @__PURE__ */ e("span", { className: "font-semibold", children: "We'll be in touch shortly!" }),
361
- /* @__PURE__ */ e("br", {}),
362
- "Our team will contact you soon to arrange delivery and confirm your order details."
363
- ] }) })
362
+ /* @__PURE__ */ e(
363
+ Be,
364
+ {
365
+ orderId: u.id,
366
+ token: u.userActionToken,
367
+ limit: 4,
368
+ brandSiteUrl: (ce = u.brand) == null ? void 0 : ce.siteUrl
369
+ }
370
+ )
364
371
  ] })
365
372
  }
366
373
  );
367
- const ee = u && (o === "delivery" || o === "payment") && (u.waybillOnly || !(u != null && u.allowCOD));
374
+ const ee = p && (c === "delivery" || c === "payment") && (p.waybillOnly || !(p != null && p.allowCOD));
368
375
  return /* @__PURE__ */ e(
369
- oe,
376
+ me,
370
377
  {
371
378
  isOpen: i,
372
379
  onClose: j,
373
- title: Pe,
374
- footer: ke,
380
+ title: ke,
381
+ footer: Me,
375
382
  size: "lg",
376
383
  contentClassName: "p-0",
377
- children: Y ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center min-h-[300px]", children: /* @__PURE__ */ e(O, { className: "h-8 w-8 animate-spin text-gray-600" }) }) : /* @__PURE__ */ e("div", { className: "w-full overflow-hidden", children: /* @__PURE__ */ a("div", { className: "relative w-full", children: [
384
+ children: Y ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center min-h-[300px]", children: /* @__PURE__ */ e(U, { className: "h-8 w-8 animate-spin text-gray-600" }) }) : /* @__PURE__ */ e("div", { className: "w-full overflow-hidden", children: /* @__PURE__ */ a("div", { className: "relative w-full", children: [
378
385
  ee && /* @__PURE__ */ a("div", { className: "space-y-3 p-4 pb-0", children: [
379
- u.noteTitle && u.noteContent && /* @__PURE__ */ e("div", { className: "bg-amber-50 border border-amber-200 rounded-lg p-4", children: /* @__PURE__ */ a("div", { className: "flex items-start gap-3", children: [
380
- /* @__PURE__ */ e(he, { className: "h-5 w-5 text-amber-600 flex-shrink-0 mt-0.5" }),
386
+ p.noteTitle && p.noteContent && /* @__PURE__ */ e("div", { className: "bg-amber-50 border border-amber-200 rounded-lg p-4", children: /* @__PURE__ */ a("div", { className: "flex items-start gap-3", children: [
387
+ /* @__PURE__ */ e(ue, { className: "h-5 w-5 text-amber-600 flex-shrink-0 mt-0.5" }),
381
388
  /* @__PURE__ */ a("div", { className: "space-y-1", children: [
382
- /* @__PURE__ */ e("p", { className: "text-sm font-semibold text-amber-900 whitespace-pre-wrap", children: u.noteTitle }),
383
- /* @__PURE__ */ e("p", { className: "text-sm text-amber-800 whitespace-pre-wrap", children: u.noteContent })
389
+ /* @__PURE__ */ e("p", { className: "text-sm font-semibold text-amber-900 whitespace-pre-wrap", children: p.noteTitle }),
390
+ /* @__PURE__ */ e("p", { className: "text-sm text-amber-800 whitespace-pre-wrap", children: p.noteContent })
384
391
  ] })
385
392
  ] }) }),
386
- !(u != null && u.allowCOD) && /* @__PURE__ */ e("div", { className: "bg-blue-50 border border-blue-200 rounded-lg p-4", children: /* @__PURE__ */ a("div", { className: "flex items-start gap-3", children: [
387
- /* @__PURE__ */ e(ue, { className: "h-5 w-5 text-blue-600 flex-shrink-0 mt-0.5" }),
393
+ !(p != null && p.allowCOD) && /* @__PURE__ */ e("div", { className: "bg-blue-50 border border-blue-200 rounded-lg p-4", children: /* @__PURE__ */ a("div", { className: "flex items-start gap-3", children: [
394
+ /* @__PURE__ */ e(pe, { className: "h-5 w-5 text-blue-600 flex-shrink-0 mt-0.5" }),
388
395
  /* @__PURE__ */ a("div", { className: "space-y-1", children: [
389
396
  /* @__PURE__ */ e("p", { className: "text-sm font-semibold text-blue-900", children: "Cash on Delivery Unavailable" }),
390
397
  /* @__PURE__ */ e("p", { className: "text-sm text-blue-800", children: "We're unable to offer cash on delivery to this location. Please use online payment to complete your order." })
@@ -394,7 +401,7 @@ function dt({
394
401
  /* @__PURE__ */ e("div", { className: "p-4", children: /* @__PURE__ */ a(
395
402
  "a",
396
403
  {
397
- href: $e,
404
+ href: He,
398
405
  target: "_blank",
399
406
  rel: "noopener noreferrer",
400
407
  className: "flex items-center justify-center gap-2 p-3 bg-green-500 hover:bg-green-600 rounded-lg transition-colors",
@@ -416,9 +423,9 @@ function dt({
416
423
  {
417
424
  className: P(
418
425
  "flex transition-transform duration-300 ease-in-out w-full",
419
- o === "customer" && "translate-x-0",
420
- o === "delivery" && "-translate-x-full",
421
- o === "payment" && "-translate-x-[200%]"
426
+ c === "customer" && "translate-x-0",
427
+ c === "delivery" && "-translate-x-full",
428
+ c === "payment" && "-translate-x-[200%]"
422
429
  ),
423
430
  children: [
424
431
  /* @__PURE__ */ e("div", { className: "w-full min-w-full flex-shrink-0 p-4", children: /* @__PURE__ */ e("div", { className: "space-y-4", children: /* @__PURE__ */ a("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
@@ -513,13 +520,13 @@ function dt({
513
520
  }
514
521
  ),
515
522
  /* @__PURE__ */ a(
516
- me,
523
+ he,
517
524
  {
518
525
  label: "State",
519
526
  name: "state",
520
- value: L || "",
527
+ value: Z || "",
521
528
  onChange: (t) => {
522
- U("");
529
+ O("");
523
530
  const n = t.target.value;
524
531
  Ne(n || void 0), h.state && z((d) => ({ ...d, state: void 0 }));
525
532
  },
@@ -532,13 +539,13 @@ function dt({
532
539
  }
533
540
  ),
534
541
  /* @__PURE__ */ a(
535
- me,
542
+ he,
536
543
  {
537
544
  label: "Delivery Zone",
538
- value: p || "",
545
+ value: f || "",
539
546
  onChange: (t) => {
540
547
  const n = t.target.value;
541
- U(n || void 0), h.deliveryZoneId && z((d) => ({ ...d, deliveryZoneId: void 0 })), n && R.mutate({ deliveryZoneId: n });
548
+ O(n || void 0), h.deliveryZoneId && z((d) => ({ ...d, deliveryZoneId: void 0 })), n && W.mutate({ deliveryZoneId: n });
542
549
  },
543
550
  disabled: !m,
544
551
  error: h.deliveryZoneId,
@@ -557,15 +564,15 @@ function dt({
557
564
  ] })
558
565
  ] }) }),
559
566
  /* @__PURE__ */ e("div", { className: "w-full min-w-full flex-shrink-0 p-4", children: /* @__PURE__ */ a("div", { className: "space-y-6", children: [
560
- Z && /* @__PURE__ */ a("div", { className: `border border-gray-200 rounded-lg ${ee ? "mt-4" : ""}`, children: [
567
+ S && /* @__PURE__ */ a("div", { className: `border border-gray-200 rounded-lg ${ee ? "mt-4" : ""}`, children: [
561
568
  /* @__PURE__ */ a(
562
569
  "button",
563
570
  {
564
571
  type: "button",
565
- onClick: () => ge(!$),
572
+ onClick: () => be(!$),
566
573
  className: "overflow-hidden w-full flex items-center overflow-hidden rounded-lg rounded-b-none justify-between p-4 text-left hover:bg-gray-50 transition-colors",
567
574
  children: [
568
- /* @__PURE__ */ e("span", { className: "text-sm font-bold text-accent-700", children: Z.title || "🤔 Curious about Refunds?" }),
575
+ /* @__PURE__ */ e("span", { className: "text-sm font-bold text-accent-700", children: S.title || "🤔 Curious about Refunds?" }),
569
576
  /* @__PURE__ */ e(
570
577
  Ae,
571
578
  {
@@ -586,9 +593,9 @@ function dt({
586
593
  "overflow-hidden transition-all duration-300 ease-in-out",
587
594
  $ ? "max-h-96 opacity-100" : "max-h-0 opacity-0"
588
595
  ),
589
- children: /* @__PURE__ */ e("div", { className: "px-4 pb-4 border-t border-gray-100", children: /* @__PURE__ */ e("div", { className: "text-sm text-gray-600 space-y-3 pt-4", children: Z.policies && /* @__PURE__ */ a("div", { children: [
596
+ children: /* @__PURE__ */ e("div", { className: "px-4 pb-4 border-t border-gray-100", children: /* @__PURE__ */ e("div", { className: "text-sm text-gray-600 space-y-3 pt-4", children: S.policies && /* @__PURE__ */ a("div", { children: [
590
597
  /* @__PURE__ */ e("h4", { className: "font-bold text-gray-800 mb-2", children: "Our Refund Policy" }),
591
- /* @__PURE__ */ e("ul", { className: "space-y-1", children: Z.policies.map((t, n) => /* @__PURE__ */ a("li", { className: "flex items-start", children: [
598
+ /* @__PURE__ */ e("ul", { className: "space-y-1", children: S.policies.map((t, n) => /* @__PURE__ */ a("li", { className: "flex items-start", children: [
592
599
  /* @__PURE__ */ e("span", { className: "text-green-600 mr-2", children: "✓" }),
593
600
  /* @__PURE__ */ e("span", { children: t })
594
601
  ] }, n)) })
@@ -635,7 +642,7 @@ function dt({
635
642
  /* @__PURE__ */ e(
636
643
  "img",
637
644
  {
638
- src: Be,
645
+ src: We,
639
646
  alt: "Paystack",
640
647
  className: "h-4 w-auto mt-2 mx-auto"
641
648
  }
@@ -675,7 +682,7 @@ function dt({
675
682
  "p-3 rounded-full",
676
683
  r.paymentMethod === "cod" ? "bg-accent-100 text-accent-600" : "bg-gray-100 text-gray-600"
677
684
  ),
678
- children: /* @__PURE__ */ e(ue, { size: 24 })
685
+ children: /* @__PURE__ */ e(pe, { size: 24 })
679
686
  }
680
687
  ),
681
688
  /* @__PURE__ */ a("div", { children: [
@@ -698,5 +705,5 @@ function dt({
698
705
  );
699
706
  }
700
707
  export {
701
- dt as Checkout
708
+ ct as Checkout
702
709
  };
package/dist/index130.mjs CHANGED
@@ -1,26 +1,7 @@
1
1
  'use client';
2
- import { __exports as t } from "./index202.mjs";
3
- var n;
4
- function i() {
5
- return n ? t : (n = 1, function(o) {
6
- Object.defineProperty(o, "__esModule", {
7
- value: !0
8
- }), Object.defineProperty(o, "handleSmoothScroll", {
9
- enumerable: !0,
10
- get: function() {
11
- return c;
12
- }
13
- });
14
- function c(l, e) {
15
- if (e === void 0 && (e = {}), e.onlyHashChange) {
16
- l();
17
- return;
18
- }
19
- const r = document.documentElement, u = r.style.scrollBehavior;
20
- r.style.scrollBehavior = "auto", e.dontForceLayout || r.getClientRects(), l(), r.style.scrollBehavior = u;
21
- }
22
- }(t), t);
2
+ function t(n) {
3
+ return !!(n && n.__CANCEL__);
23
4
  }
24
5
  export {
25
- i as __require
6
+ t as default
26
7
  };