@loczer/storefront-sdk 0.214.0 → 0.216.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/BookingBikeQuickAddCard/index.js +1 -1
- package/dist/components/BookingBikeVariantDialog/index.js +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingEndDateField.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingEndDateField.js +82 -83
- package/dist/components/BookingPeriodSelector/components/BookingMobileDateDrawer.d.ts +5 -1
- package/dist/components/BookingPeriodSelector/components/BookingMobileDateDrawer.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingMobileDateDrawer.js +135 -149
- package/dist/components/BookingPeriodSelector/components/BookingStartDateField.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingStartDateField.js +34 -35
- package/dist/components/BookingPeriodSelector/useBookingPeriodController.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/useBookingPeriodController.js +233 -228
- package/dist/components/ContactSection/index.js +1 -1
- package/dist/components/payment/StripeCardFieldsForm.d.ts.map +1 -1
- package/dist/components/payment/StripeCardFieldsForm.js +43 -33
- package/dist/index.d.ts +5 -1
- package/dist/pages/BookingPage.d.ts.map +1 -1
- package/dist/pages/BookingPage.js +244 -216
- package/dist/pages/CheckoutPage.d.ts.map +1 -1
- package/dist/pages/CheckoutPage.js +219 -219
- package/dist/pages/HomePage.d.ts.map +1 -1
- package/dist/pages/HomePage.js +268 -264
- package/dist/pages/ProductPage.d.ts.map +1 -1
- package/dist/pages/ProductPage.js +182 -182
- package/dist/storefront.css +1 -1
- package/dist/ui/drawer.d.ts +1 -0
- package/dist/ui/drawer.d.ts.map +1 -1
- package/dist/ui/drawer.js +58 -47
- package/package.json +1 -1
package/dist/pages/HomePage.js
CHANGED
|
@@ -31,21 +31,21 @@ import { StorefrontCancellationPolicyNotice as Se } from "../components/Storefro
|
|
|
31
31
|
import { StorefrontInsuranceNotice as Ce } from "../components/StorefrontInsuranceNotice/index.js";
|
|
32
32
|
import { createStorefrontTimeSlotsFetcher as we } from "../lib/fetchStorefrontTimeSlots.js";
|
|
33
33
|
import { FulfillmentSection as Te } from "../components/FulfillmentSection/index.js";
|
|
34
|
-
import { useEffect as f, useMemo as p, useRef as
|
|
35
|
-
import { Fragment as
|
|
36
|
-
import { Link as
|
|
37
|
-
import { useTranslation as
|
|
38
|
-
import { cn as
|
|
39
|
-
import { ArrowRight as
|
|
34
|
+
import { useEffect as f, useMemo as p, useRef as m, useState as h } from "react";
|
|
35
|
+
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
36
|
+
import { Link as y, useLocation as Ee, useNavigate as De, useParams as Oe, useSearchParams as ke } from "@rpcbase/router";
|
|
37
|
+
import { useTranslation as Ae } from "react-i18next";
|
|
38
|
+
import { cn as b } from "@rpcbase/ui";
|
|
39
|
+
import { ArrowRight as x, Bike as je, Clock as Me, MapPin as Ne, ShieldCheck as Pe, Truck as Fe } from "lucide-react";
|
|
40
40
|
//#region src/pages/HomePage.tsx
|
|
41
|
-
var
|
|
41
|
+
var S = (e) => String(e).padStart(2, "0"), Ie = "text-2xs font-semibold uppercase tracking-wide text-slate-600", Le = "h-10", C = 6, w = 5, Re = [
|
|
42
42
|
15,
|
|
43
43
|
25,
|
|
44
44
|
42,
|
|
45
45
|
66,
|
|
46
46
|
33,
|
|
47
47
|
54
|
|
48
|
-
],
|
|
48
|
+
], T = [
|
|
49
49
|
"4 / 5",
|
|
50
50
|
"1 / 1",
|
|
51
51
|
"3 / 4",
|
|
@@ -54,44 +54,46 @@ var x = (e) => String(e).padStart(2, "0"), Le = "text-2xs font-semibold uppercas
|
|
|
54
54
|
"4 / 3",
|
|
55
55
|
"9 / 16",
|
|
56
56
|
"6 / 7"
|
|
57
|
-
],
|
|
57
|
+
], ze = ({ buttonRef: e, className: t, label: n, onSubmit: r }) => {
|
|
58
58
|
let { hasConfirmedTimeSlots: i, startTime: a, endTime: o } = d();
|
|
59
|
-
return /* @__PURE__ */
|
|
59
|
+
return /* @__PURE__ */ v(u, {
|
|
60
60
|
ref: e,
|
|
61
|
-
className:
|
|
61
|
+
className: b("gap-2", t),
|
|
62
62
|
disabled: !i || !a || !o,
|
|
63
63
|
onClick: r,
|
|
64
|
-
children: [/* @__PURE__ */
|
|
64
|
+
children: [/* @__PURE__ */ _("span", { children: n }), /* @__PURE__ */ _(x, {
|
|
65
65
|
className: "h-4 w-4",
|
|
66
66
|
"aria-hidden": "true"
|
|
67
67
|
})]
|
|
68
68
|
});
|
|
69
|
-
},
|
|
69
|
+
}, E = (e) => `${e.getFullYear()}-${S(e.getMonth() + 1)}-${S(e.getDate())}`, D = (e) => {
|
|
70
70
|
if (!e) return;
|
|
71
71
|
let t = e.match(/^(\d{4})-(\d{2})-(\d{2})$/);
|
|
72
72
|
if (!t) return;
|
|
73
73
|
let n = Number(t[1]), r = Number(t[2]), i = Number(t[3]), a = new Date(n, r - 1, i);
|
|
74
74
|
if (!(Number.isNaN(a.getTime()) || a.getFullYear() !== n || a.getMonth() !== r - 1 || a.getDate() !== i)) return a;
|
|
75
|
-
},
|
|
75
|
+
}, Be = (e) => {
|
|
76
76
|
let t = e.length > 0 ? e : [ye];
|
|
77
|
-
return Array.from({ length:
|
|
78
|
-
let i = n *
|
|
77
|
+
return Array.from({ length: C }, (e, n) => Array.from({ length: w }, (e, r) => {
|
|
78
|
+
let i = n * w + r;
|
|
79
79
|
return {
|
|
80
|
-
aspectRatio:
|
|
80
|
+
aspectRatio: T[(i + n) % T.length] ?? T[0],
|
|
81
81
|
src: t[i % t.length] ?? "data:image/svg+xml,%3csvg%20width='1600'%20height='1066'%20viewBox='0%200%201600%201066'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cdefs%3e%3clinearGradient%20id='bg'%20x1='0'%20y1='0'%20x2='1600'%20y2='1066'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%230F172A'/%3e%3cstop%20offset='1'%20stop-color='%23164E63'/%3e%3c/linearGradient%3e%3clinearGradient%20id='road'%20x1='0'%20y1='740'%20x2='1600'%20y2='1066'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23334155'/%3e%3cstop%20offset='1'%20stop-color='%230F172A'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20width='1600'%20height='1066'%20fill='url(%23bg)'/%3e%3cpath%20d='M0%20675C233%20555%20420%20530%20590%20551C752%20571%20930%20635%201088%20632C1252%20629%201423%20559%201600%20498V1066H0V675Z'%20fill='%231E293B'%20opacity='0.7'/%3e%3cpath%20d='M0%20792C213%20710%20393%20686%20573%20697C760%20708%20945%20760%201123%20761C1286%20762%201437%20722%201600%20666V1066H0V792Z'%20fill='url(%23road)'/%3e%3ccircle%20cx='440'%20cy='620'%20r='92'%20stroke='%23F8FAFC'%20stroke-width='18'%20opacity='0.8'/%3e%3ccircle%20cx='740'%20cy='620'%20r='92'%20stroke='%23F8FAFC'%20stroke-width='18'%20opacity='0.8'/%3e%3cpath%20d='M440%20620L560%20520L650%20620H740M560%20520L610%20445M595%20470H665'%20stroke='%23F8FAFC'%20stroke-width='18'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3ccircle%20cx='980'%20cy='700'%20r='80'%20stroke='%23E2E8F0'%20stroke-width='14'%20opacity='0.7'/%3e%3ccircle%20cx='1240'%20cy='700'%20r='80'%20stroke='%23E2E8F0'%20stroke-width='14'%20opacity='0.7'/%3e%3cpath%20d='M980%20700L1078%20616L1156%20700H1240M1078%20616L1122%20556M1112%20574H1172'%20stroke='%23E2E8F0'%20stroke-width='14'%20stroke-linecap='round'%20stroke-linejoin='round'%20opacity='0.7'/%3e%3c/svg%3e"
|
|
82
82
|
};
|
|
83
83
|
}));
|
|
84
84
|
};
|
|
85
|
-
function
|
|
86
|
-
let { t: d, i18n:
|
|
87
|
-
let e =
|
|
88
|
-
return
|
|
89
|
-
}), [V, Ze] =
|
|
90
|
-
R ?
|
|
85
|
+
function O() {
|
|
86
|
+
let { t: d, i18n: S } = Ae(), { storeSlug: C } = Oe(), w = Ee(), { storefrontConfiguration: T } = te(), O = T.shop.address?.trim() ?? "", k = T.workspace?.workspaceLanguage, { bikes: A, accessories: Ve } = ne(), [j, He] = ke(), Ue = De(), M = p(() => a(j, C), [j, C]), We = p(() => n(T), [T]), N = p(() => i(T), [T]), P = p(() => D(N.start_date), [N.start_date]), Ge = p(() => D(N.end_date) ?? P, [N.end_date, P]), F = T.settings.fulfillmentModes.includes("delivery"), Ke = T.settings.deliveryDisabledReason.trim(), I = p(() => r(M, N), [N, M]), [L, qe] = h(() => I.fulfillment === "delivery" && F ? "delivery" : "pickup"), [R, Je] = h(() => D(M.get("start_date")) ?? P), [z, Ye] = h(() => M.get("start_time") ?? N.start_time), [B, Xe] = h(() => {
|
|
87
|
+
let e = D(M.get("start_date")) ?? P;
|
|
88
|
+
return D(M.get("end_date")) ?? e ?? Ge;
|
|
89
|
+
}), [V, Ze] = h(() => M.get("end_time") ?? N.end_time), [Qe, $e] = h(void 0), et = m(void 0), [tt, nt] = h(!1), [H, U] = h(() => I.start_address), [W, G] = h(() => I.end_address), K = m(null), q = [
|
|
90
|
+
R ? E(R) : "",
|
|
91
91
|
z,
|
|
92
|
-
B ?
|
|
92
|
+
B ? E(B) : "",
|
|
93
93
|
V
|
|
94
|
-
].join(":"),
|
|
94
|
+
].join(":"), rt = m(q);
|
|
95
|
+
rt.current = q;
|
|
96
|
+
let J = Qe === q, it = p(() => A.slice(0, 4), [A]), { heroMode: at } = re(), ot = at ?? T.content?.heroMode ?? "current_booking_hero", Y = ot === "vertical_marquee_hero", X = ot === "booking_bar_overlay_hero" || Y, st = we(C), ct = p(() => ({
|
|
95
97
|
startDate: d("booking_start_date"),
|
|
96
98
|
pickStartDate: d("booking_start_date"),
|
|
97
99
|
startTime: d("booking_start_time"),
|
|
@@ -106,44 +108,44 @@ function D() {
|
|
|
106
108
|
timeSlotsUnavailable: d("booking_time_slots_unavailable"),
|
|
107
109
|
timeSlotsLoadError: d("booking_time_slots_load_error"),
|
|
108
110
|
retryTimeSlots: d("booking_time_slots_retry")
|
|
109
|
-
}), [
|
|
110
|
-
let e = R ??
|
|
111
|
+
}), [S.language, d]), Z = p(() => {
|
|
112
|
+
let e = R ?? P ?? /* @__PURE__ */ new Date(), n = B ?? e;
|
|
111
113
|
return t(new URLSearchParams(), {
|
|
112
|
-
fulfillment: L === "delivery" &&
|
|
113
|
-
start_date:
|
|
114
|
-
start_time:
|
|
115
|
-
end_date:
|
|
116
|
-
end_time:
|
|
114
|
+
fulfillment: L === "delivery" && F ? "delivery" : "pickup",
|
|
115
|
+
start_date: E(e),
|
|
116
|
+
start_time: J ? z : "",
|
|
117
|
+
end_date: E(n),
|
|
118
|
+
end_time: J ? V : "",
|
|
117
119
|
start_address: H,
|
|
118
120
|
end_address: W
|
|
119
121
|
});
|
|
120
122
|
}, [
|
|
121
|
-
N,
|
|
122
123
|
P,
|
|
124
|
+
F,
|
|
123
125
|
W,
|
|
124
126
|
B,
|
|
125
127
|
V,
|
|
126
128
|
L,
|
|
127
|
-
|
|
129
|
+
J,
|
|
128
130
|
H,
|
|
129
131
|
R,
|
|
130
132
|
z
|
|
131
|
-
]),
|
|
133
|
+
]), lt = Z.toString(), ut = lt ? `?${lt}` : "";
|
|
132
134
|
f(() => {
|
|
133
|
-
o(
|
|
134
|
-
}, [
|
|
135
|
-
let t = new URLSearchParams(
|
|
135
|
+
o(C, Z);
|
|
136
|
+
}, [Z, C]), f(() => {
|
|
137
|
+
let t = new URLSearchParams(j);
|
|
136
138
|
for (let n of e) t.delete(n);
|
|
137
|
-
for (let [e, n] of
|
|
138
|
-
t.toString() !==
|
|
139
|
+
for (let [e, n] of Z.entries()) t.set(e, n);
|
|
140
|
+
t.toString() !== j.toString() && He(t, { replace: !0 });
|
|
139
141
|
}, [
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
142
|
+
Z,
|
|
143
|
+
j,
|
|
144
|
+
He
|
|
143
145
|
]), f(() => {
|
|
144
|
-
!
|
|
145
|
-
}, [
|
|
146
|
-
let
|
|
146
|
+
!tt || !J || (nt(!1), K.current?.focus({ preventScroll: !0 }));
|
|
147
|
+
}, [J, tt]);
|
|
148
|
+
let dt = J && !!(z && V), ft = {
|
|
147
149
|
startDate: R,
|
|
148
150
|
onStartDateChange: Je,
|
|
149
151
|
startTime: z,
|
|
@@ -152,173 +154,175 @@ function D() {
|
|
|
152
154
|
onEndDateChange: Xe,
|
|
153
155
|
endTime: V,
|
|
154
156
|
onEndTimeChange: Ze,
|
|
155
|
-
onEndTimeCommit: () =>
|
|
156
|
-
bookingPeriodConfig:
|
|
157
|
+
onEndTimeCommit: () => nt(!0),
|
|
158
|
+
bookingPeriodConfig: We,
|
|
157
159
|
withMobileDateDrawer: !0,
|
|
158
|
-
fetchTimeSlots:
|
|
160
|
+
fetchTimeSlots: st,
|
|
159
161
|
onTimeSlotsConfirmationChange: (e) => {
|
|
160
|
-
|
|
162
|
+
let t = e ? rt.current : void 0;
|
|
163
|
+
et.current !== t && (et.current = t, $e(t));
|
|
161
164
|
},
|
|
162
|
-
labels:
|
|
163
|
-
localeCode:
|
|
164
|
-
},
|
|
165
|
-
|
|
166
|
-
let
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
165
|
+
labels: ct,
|
|
166
|
+
localeCode: S.language
|
|
167
|
+
}, pt = () => {
|
|
168
|
+
let e = new URLSearchParams(j);
|
|
169
|
+
for (let [t, n] of Z.entries()) e.set(t, n);
|
|
170
|
+
Ue(`/${C ?? ""}/booking?${e.toString()}#booking-products`);
|
|
171
|
+
}, Q = () => {
|
|
172
|
+
dt && pt();
|
|
173
|
+
}, mt = (e) => `/${C ?? ""}/products/${e}`, $ = { backTo: `${w.pathname}${w.search}${w.hash}` }, ht = /* @__PURE__ */ v("div", {
|
|
170
174
|
className: "min-w-0",
|
|
171
175
|
children: [
|
|
172
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ v("div", {
|
|
173
177
|
className: "flex min-w-0 flex-wrap items-center gap-2",
|
|
174
|
-
children: [/* @__PURE__ */
|
|
178
|
+
children: [/* @__PURE__ */ v(l, {
|
|
175
179
|
variant: "secondary",
|
|
176
|
-
children: [/* @__PURE__ */
|
|
180
|
+
children: [/* @__PURE__ */ _(Me, {
|
|
177
181
|
className: "h-3 w-3",
|
|
178
182
|
"aria-hidden": "true"
|
|
179
|
-
}), /* @__PURE__ */
|
|
180
|
-
}), /* @__PURE__ */
|
|
183
|
+
}), /* @__PURE__ */ _("span", { children: d("status_open") })]
|
|
184
|
+
}), /* @__PURE__ */ v(l, {
|
|
181
185
|
variant: "outline",
|
|
182
|
-
className:
|
|
183
|
-
children: [/* @__PURE__ */
|
|
186
|
+
className: b("min-w-0 max-w-full", !O && "border-destructive/40 text-destructive"),
|
|
187
|
+
children: [/* @__PURE__ */ _(Ne, {
|
|
184
188
|
className: "h-3 w-3",
|
|
185
189
|
"aria-hidden": "true"
|
|
186
|
-
}), /* @__PURE__ */
|
|
190
|
+
}), /* @__PURE__ */ _("span", {
|
|
187
191
|
className: "truncate",
|
|
188
|
-
children:
|
|
192
|
+
children: O || "[Missing shop address]"
|
|
189
193
|
})]
|
|
190
194
|
})]
|
|
191
195
|
}),
|
|
192
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ _("h1", {
|
|
193
197
|
className: "mt-4 text-[1.75rem] font-semibold leading-tight tracking-tight sm:text-4xl",
|
|
194
|
-
children: /* @__PURE__ */
|
|
198
|
+
children: /* @__PURE__ */ _("span", { children: d("hero_title") })
|
|
195
199
|
}),
|
|
196
|
-
/* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ _("p", {
|
|
197
201
|
className: "mt-3 text-sm text-slate-700 sm:text-base",
|
|
198
|
-
children: /* @__PURE__ */
|
|
202
|
+
children: /* @__PURE__ */ _("span", { children: d("hero_description") })
|
|
199
203
|
}),
|
|
200
|
-
/* @__PURE__ */
|
|
201
|
-
className:
|
|
202
|
-
children: /* @__PURE__ */
|
|
203
|
-
className:
|
|
204
|
+
/* @__PURE__ */ _("div", {
|
|
205
|
+
className: b("mt-6", !X && "rounded-xl border bg-white/70 p-3"),
|
|
206
|
+
children: /* @__PURE__ */ v("ul", {
|
|
207
|
+
className: b("space-y-3", X && "space-y-2"),
|
|
204
208
|
"data-testid": "storefront-home-trust-features",
|
|
205
209
|
children: [
|
|
206
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ v("li", {
|
|
207
211
|
className: "flex items-start gap-3",
|
|
208
212
|
"data-testid": "storefront-secure-payment-notice",
|
|
209
|
-
children: [/* @__PURE__ */
|
|
213
|
+
children: [/* @__PURE__ */ _(Pe, {
|
|
210
214
|
className: "mt-0.5 h-5 w-5 text-success",
|
|
211
215
|
"aria-hidden": "true"
|
|
212
|
-
}), /* @__PURE__ */
|
|
216
|
+
}), /* @__PURE__ */ v("div", {
|
|
213
217
|
className: "flex min-w-0 flex-col gap-0.5",
|
|
214
|
-
children: [/* @__PURE__ */
|
|
218
|
+
children: [/* @__PURE__ */ _("p", {
|
|
215
219
|
className: "text-sm font-medium text-slate-950",
|
|
216
|
-
children: /* @__PURE__ */
|
|
217
|
-
}), /* @__PURE__ */
|
|
220
|
+
children: /* @__PURE__ */ _("span", { children: d("feature_secure_payment_title") })
|
|
221
|
+
}), /* @__PURE__ */ _("p", {
|
|
218
222
|
className: "text-xs text-slate-600",
|
|
219
|
-
children: /* @__PURE__ */
|
|
223
|
+
children: /* @__PURE__ */ _("span", { children: d("feature_secure_payment_description") })
|
|
220
224
|
})]
|
|
221
225
|
})]
|
|
222
226
|
}),
|
|
223
|
-
/* @__PURE__ */
|
|
224
|
-
policy:
|
|
225
|
-
className:
|
|
227
|
+
/* @__PURE__ */ _(Se, {
|
|
228
|
+
policy: T.bookingEngine.cancellationPolicy,
|
|
229
|
+
className: b(!X && "border-t border-slate-200/70 pt-3")
|
|
226
230
|
}),
|
|
227
|
-
|
|
228
|
-
className:
|
|
231
|
+
F ? /* @__PURE__ */ v("li", {
|
|
232
|
+
className: b("flex items-start gap-3", !X && "border-t border-slate-200/70 pt-3"),
|
|
229
233
|
"data-testid": "storefront-delivery-notice",
|
|
230
|
-
children: [/* @__PURE__ */
|
|
234
|
+
children: [/* @__PURE__ */ _(Fe, {
|
|
231
235
|
className: "mt-0.5 h-5 w-5 text-slate-900",
|
|
232
236
|
"aria-hidden": "true"
|
|
233
|
-
}), /* @__PURE__ */
|
|
237
|
+
}), /* @__PURE__ */ v("div", {
|
|
234
238
|
className: "flex flex-col gap-0.5",
|
|
235
|
-
children: [/* @__PURE__ */
|
|
239
|
+
children: [/* @__PURE__ */ _("p", {
|
|
236
240
|
className: "text-sm font-medium text-slate-950",
|
|
237
|
-
children: /* @__PURE__ */
|
|
238
|
-
}), /* @__PURE__ */
|
|
241
|
+
children: /* @__PURE__ */ _("span", { children: d("feature_delivery_title") })
|
|
242
|
+
}), /* @__PURE__ */ _("p", {
|
|
239
243
|
className: "text-xs text-slate-600",
|
|
240
|
-
children: /* @__PURE__ */
|
|
244
|
+
children: /* @__PURE__ */ _("span", { children: d("feature_delivery_description") })
|
|
241
245
|
})]
|
|
242
246
|
})]
|
|
243
247
|
}) : null,
|
|
244
|
-
/* @__PURE__ */
|
|
245
|
-
bikes:
|
|
246
|
-
currency:
|
|
247
|
-
className:
|
|
248
|
+
/* @__PURE__ */ _(Ce, {
|
|
249
|
+
bikes: A,
|
|
250
|
+
currency: T.bookingEngine.currency,
|
|
251
|
+
className: b(!X && "border-t border-slate-200/70 pt-3")
|
|
248
252
|
})
|
|
249
253
|
]
|
|
250
254
|
})
|
|
251
255
|
})
|
|
252
256
|
]
|
|
253
|
-
}),
|
|
254
|
-
...
|
|
257
|
+
}), gt = ({ className: e, showSubmitButton: t = !1, submitButtonClassName: n }) => /* @__PURE__ */ _(ie, {
|
|
258
|
+
...ft,
|
|
255
259
|
selectionFlow: "dates-first",
|
|
256
|
-
labelClassName:
|
|
257
|
-
inputClassName:
|
|
258
|
-
children: /* @__PURE__ */
|
|
259
|
-
/* @__PURE__ */
|
|
260
|
+
labelClassName: Ie,
|
|
261
|
+
inputClassName: Le,
|
|
262
|
+
children: /* @__PURE__ */ v(g, { children: [
|
|
263
|
+
/* @__PURE__ */ v("div", {
|
|
260
264
|
className: e,
|
|
261
265
|
children: [
|
|
262
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ _("div", {
|
|
263
267
|
className: "min-w-0",
|
|
264
|
-
children: /* @__PURE__ */
|
|
268
|
+
children: /* @__PURE__ */ _(ae, {})
|
|
265
269
|
}),
|
|
266
|
-
/* @__PURE__ */
|
|
270
|
+
/* @__PURE__ */ _("div", {
|
|
267
271
|
className: "min-w-0",
|
|
268
|
-
children: /* @__PURE__ */
|
|
272
|
+
children: /* @__PURE__ */ _(oe, {})
|
|
269
273
|
}),
|
|
270
|
-
/* @__PURE__ */
|
|
274
|
+
/* @__PURE__ */ _("div", {
|
|
271
275
|
className: "min-w-0",
|
|
272
|
-
children: /* @__PURE__ */
|
|
276
|
+
children: /* @__PURE__ */ _(se, {})
|
|
273
277
|
}),
|
|
274
|
-
/* @__PURE__ */
|
|
278
|
+
/* @__PURE__ */ _("div", {
|
|
275
279
|
className: "min-w-0",
|
|
276
|
-
children: /* @__PURE__ */
|
|
280
|
+
children: /* @__PURE__ */ _(ce, {})
|
|
277
281
|
}),
|
|
278
|
-
t ? /* @__PURE__ */
|
|
282
|
+
t ? /* @__PURE__ */ _(ze, {
|
|
279
283
|
buttonRef: K,
|
|
280
284
|
className: n,
|
|
281
285
|
label: d("booking_submit"),
|
|
282
|
-
onSubmit:
|
|
286
|
+
onSubmit: Q
|
|
283
287
|
}) : null
|
|
284
288
|
]
|
|
285
289
|
}),
|
|
286
|
-
/* @__PURE__ */
|
|
287
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ _(ue, { onContinue: pt }),
|
|
291
|
+
/* @__PURE__ */ _(le, {
|
|
288
292
|
className: "mt-2",
|
|
289
293
|
testId: "booking-home-time-slots-status"
|
|
290
294
|
})
|
|
291
295
|
] })
|
|
292
|
-
}),
|
|
296
|
+
}), _t = (e) => F ? /* @__PURE__ */ _(de, {
|
|
293
297
|
open: L === "delivery",
|
|
294
298
|
className: "sm:min-h-[6.75rem]",
|
|
295
|
-
inputClassName: `${
|
|
296
|
-
labelClassName:
|
|
299
|
+
inputClassName: `${Le} bg-white`,
|
|
300
|
+
labelClassName: Ie,
|
|
297
301
|
startAddress: H,
|
|
298
302
|
onStartAddressChange: U,
|
|
299
303
|
returnAddress: W,
|
|
300
304
|
onReturnAddressChange: G,
|
|
301
305
|
testIdPrefix: e
|
|
302
|
-
}) : null,
|
|
306
|
+
}) : null, vt = _t("storefront-home-fulfillment-delivery-address"), yt = _t("storefront-home-compact-fulfillment-delivery-address"), bt = /* @__PURE__ */ v(ge, {
|
|
303
307
|
className: "border-slate-200 bg-white/80 shadow-none",
|
|
304
|
-
children: [/* @__PURE__ */
|
|
308
|
+
children: [/* @__PURE__ */ v("div", {
|
|
305
309
|
className: "border-b border-slate-200 px-4 py-4",
|
|
306
|
-
children: [/* @__PURE__ */
|
|
310
|
+
children: [/* @__PURE__ */ _("p", {
|
|
307
311
|
className: "text-sm font-semibold text-slate-950",
|
|
308
|
-
children: /* @__PURE__ */
|
|
309
|
-
}), /* @__PURE__ */
|
|
312
|
+
children: /* @__PURE__ */ _("span", { children: d("booking_title") })
|
|
313
|
+
}), /* @__PURE__ */ _("p", {
|
|
310
314
|
className: "mt-1 text-xs text-slate-600",
|
|
311
|
-
children: /* @__PURE__ */
|
|
315
|
+
children: /* @__PURE__ */ _("span", { children: d("booking_subtitle") })
|
|
312
316
|
})]
|
|
313
|
-
}), /* @__PURE__ */
|
|
317
|
+
}), /* @__PURE__ */ v("div", {
|
|
314
318
|
className: "grid gap-4 px-4 py-4",
|
|
315
319
|
children: [
|
|
316
|
-
/* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ _(Te, {
|
|
317
321
|
value: L,
|
|
318
322
|
onValueChange: qe,
|
|
319
|
-
pickupAddress:
|
|
320
|
-
deliveryEnabled:
|
|
321
|
-
deliveryDisabledReason:
|
|
323
|
+
pickupAddress: O,
|
|
324
|
+
deliveryEnabled: F,
|
|
325
|
+
deliveryDisabledReason: Ke,
|
|
322
326
|
startAddress: H,
|
|
323
327
|
onStartAddressChange: U,
|
|
324
328
|
endAddress: W,
|
|
@@ -326,31 +330,31 @@ function D() {
|
|
|
326
330
|
showDeliveryAddressSelector: !1,
|
|
327
331
|
testIdPrefix: "storefront-home-fulfillment"
|
|
328
332
|
}),
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
/* @__PURE__ */
|
|
333
|
+
gt({ className: "grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-[minmax(0,1fr)_150px_minmax(0,1fr)_150px] xl:items-start" }),
|
|
334
|
+
vt,
|
|
335
|
+
/* @__PURE__ */ v(u, {
|
|
332
336
|
ref: K,
|
|
333
337
|
className: "h-11 w-full justify-self-start gap-2 rounded-xl text-sm font-semibold sm:w-fit",
|
|
334
|
-
disabled: !
|
|
335
|
-
onClick:
|
|
336
|
-
children: [/* @__PURE__ */
|
|
338
|
+
disabled: !dt,
|
|
339
|
+
onClick: Q,
|
|
340
|
+
children: [/* @__PURE__ */ _("span", { children: d("booking_submit") }), /* @__PURE__ */ _(x, {
|
|
337
341
|
className: "h-4 w-4",
|
|
338
342
|
"aria-hidden": "true"
|
|
339
343
|
})]
|
|
340
344
|
})
|
|
341
345
|
]
|
|
342
346
|
})]
|
|
343
|
-
}),
|
|
347
|
+
}), xt = /* @__PURE__ */ _(ge, {
|
|
344
348
|
className: "border-slate-200 bg-white/95 shadow-xl",
|
|
345
|
-
children: /* @__PURE__ */
|
|
349
|
+
children: /* @__PURE__ */ v("div", {
|
|
346
350
|
className: "grid gap-3 p-4",
|
|
347
351
|
children: [
|
|
348
|
-
/* @__PURE__ */
|
|
352
|
+
/* @__PURE__ */ _("div", { children: /* @__PURE__ */ _(Te, {
|
|
349
353
|
value: L,
|
|
350
354
|
onValueChange: qe,
|
|
351
|
-
pickupAddress:
|
|
352
|
-
deliveryEnabled:
|
|
353
|
-
deliveryDisabledReason:
|
|
355
|
+
pickupAddress: O,
|
|
356
|
+
deliveryEnabled: F,
|
|
357
|
+
deliveryDisabledReason: Ke,
|
|
354
358
|
startAddress: H,
|
|
355
359
|
onStartAddressChange: U,
|
|
356
360
|
endAddress: W,
|
|
@@ -358,16 +362,16 @@ function D() {
|
|
|
358
362
|
showDeliveryAddressSelector: !1,
|
|
359
363
|
testIdPrefix: "storefront-home-compact-fulfillment"
|
|
360
364
|
}) }),
|
|
361
|
-
|
|
365
|
+
gt({
|
|
362
366
|
className: "grid gap-3 md:grid-cols-2 xl:grid-cols-[minmax(0,1fr)_150px_minmax(0,1fr)_150px_auto] xl:items-end",
|
|
363
367
|
showSubmitButton: !0,
|
|
364
368
|
submitButtonClassName: "h-10 w-full rounded-xl text-sm font-semibold md:w-fit xl:self-end"
|
|
365
369
|
}),
|
|
366
|
-
|
|
370
|
+
yt
|
|
367
371
|
]
|
|
368
372
|
})
|
|
369
|
-
}),
|
|
370
|
-
className:
|
|
373
|
+
}), St = (T.content?.galleryImageIds ?? []).map((e) => e.trim()).filter((e) => e.length > 0), Ct = St.map((e) => c(e, C ?? T.storeSlug, 320)).filter((e) => e.length > 0), wt = [...A, ...Ve].flatMap((e) => Array.isArray(e.images) ? e.images : []).filter((e) => typeof e == "string" && e.trim().length > 0).map((e) => e.trim()).slice(0, 12), Tt = Be(Ct.length > 0 ? Ct : wt), Et = St[0] ? c(St[0], C ?? T.storeSlug, 1600) : ye, Dt = Y ? /* @__PURE__ */ _("style", { children: "\n @keyframes storefront-hero-marquee-up {\n 0% { transform: translateY(0); }\n 100% { transform: translateY(calc(-50% - (var(--storefront-hero-marquee-gap) / 2))); }\n }\n @keyframes storefront-hero-marquee-down {\n 0% { transform: translateY(calc(-50% - (var(--storefront-hero-marquee-gap) / 2))); }\n 100% { transform: translateY(0); }\n }\n .storefront-hero-marquee-track {\n animation: storefront-hero-marquee-up var(--storefront-hero-marquee-duration, 32s) linear infinite;\n will-change: transform;\n }\n .storefront-hero-marquee-track-reverse {\n animation-name: storefront-hero-marquee-down;\n }\n @media (prefers-reduced-motion: reduce) {\n .storefront-hero-marquee-track,\n .storefront-hero-marquee-track-reverse {\n animation: none !important;\n transform: none !important;\n }\n }\n " }) : null, Ot = (e) => /* @__PURE__ */ _("div", {
|
|
374
|
+
className: b("relative h-full min-h-[340px] overflow-hidden", e),
|
|
371
375
|
style: {
|
|
372
376
|
WebkitMaskImage: "linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%)",
|
|
373
377
|
maskImage: "linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%)",
|
|
@@ -377,196 +381,196 @@ function D() {
|
|
|
377
381
|
maskSize: "100% 100%"
|
|
378
382
|
},
|
|
379
383
|
"aria-hidden": "true",
|
|
380
|
-
children: /* @__PURE__ */
|
|
384
|
+
children: /* @__PURE__ */ _("div", {
|
|
381
385
|
className: "absolute inset-0 grid grid-cols-2 gap-3 md:grid-cols-3 lg:grid-cols-6",
|
|
382
|
-
children:
|
|
383
|
-
let n =
|
|
384
|
-
return /* @__PURE__ */
|
|
385
|
-
className:
|
|
386
|
-
children: /* @__PURE__ */
|
|
387
|
-
className:
|
|
386
|
+
children: Tt.map((e, t) => {
|
|
387
|
+
let n = Re[t % Re.length] ?? 32, r = [...e, ...e];
|
|
388
|
+
return /* @__PURE__ */ _("div", {
|
|
389
|
+
className: b("relative min-h-0 overflow-hidden", t === 2 && "hidden md:block", t >= 3 && "hidden lg:block"),
|
|
390
|
+
children: /* @__PURE__ */ _("div", {
|
|
391
|
+
className: b("storefront-hero-marquee-track flex flex-col gap-[var(--storefront-hero-marquee-gap)]", t % 2 == 1 && "storefront-hero-marquee-track-reverse"),
|
|
388
392
|
style: {
|
|
389
393
|
"--storefront-hero-marquee-duration": `${n}s`,
|
|
390
394
|
"--storefront-hero-marquee-gap": "0.75rem"
|
|
391
395
|
},
|
|
392
|
-
children: r.map((n, r) => /* @__PURE__ */
|
|
396
|
+
children: r.map((n, r) => /* @__PURE__ */ v("div", {
|
|
393
397
|
className: "group relative overflow-hidden rounded-[1.35rem] border border-white/40 bg-transparent",
|
|
394
398
|
style: { aspectRatio: n.aspectRatio },
|
|
395
399
|
children: [
|
|
396
|
-
/* @__PURE__ */
|
|
397
|
-
/* @__PURE__ */
|
|
400
|
+
/* @__PURE__ */ _("div", { className: "absolute inset-0 bg-linear-to-b from-white/22 via-transparent to-transparent" }),
|
|
401
|
+
/* @__PURE__ */ _("img", {
|
|
398
402
|
src: n.src,
|
|
399
403
|
alt: "",
|
|
400
404
|
className: "absolute inset-0 h-full w-full object-cover opacity-90 saturate-[1.05] transition-transform duration-700 group-hover:scale-[1.04]",
|
|
401
405
|
loading: r < e.length ? "eager" : "lazy"
|
|
402
406
|
}),
|
|
403
|
-
/* @__PURE__ */
|
|
407
|
+
/* @__PURE__ */ _("div", { className: "absolute inset-0 bg-linear-to-t from-slate-950/40 via-slate-950/10 to-white/10" })
|
|
404
408
|
]
|
|
405
409
|
}, `hero-marquee-tile-${t}-${r}`))
|
|
406
410
|
})
|
|
407
411
|
}, `hero-marquee-column-${t}`);
|
|
408
412
|
})
|
|
409
413
|
})
|
|
410
|
-
}),
|
|
414
|
+
}), kt = Y ? /* @__PURE__ */ _("div", {
|
|
411
415
|
className: "pointer-events-none absolute inset-0 hidden lg:block",
|
|
412
416
|
"aria-hidden": "true",
|
|
413
|
-
children: /* @__PURE__ */
|
|
417
|
+
children: /* @__PURE__ */ v("div", {
|
|
414
418
|
className: "mx-auto grid h-full max-w-7xl grid-cols-12 gap-8 px-4 sm:px-6",
|
|
415
|
-
children: [/* @__PURE__ */
|
|
419
|
+
children: [/* @__PURE__ */ _("div", { className: "lg:col-span-5" }), /* @__PURE__ */ _("div", {
|
|
416
420
|
className: "lg:col-span-7",
|
|
417
|
-
children:
|
|
421
|
+
children: Ot()
|
|
418
422
|
})]
|
|
419
423
|
})
|
|
420
|
-
}) : null,
|
|
424
|
+
}) : null, At = Y ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("div", {
|
|
421
425
|
className: "lg:hidden",
|
|
422
|
-
children:
|
|
423
|
-
}), /* @__PURE__ */
|
|
426
|
+
children: Ot()
|
|
427
|
+
}), /* @__PURE__ */ _("div", {
|
|
424
428
|
className: "hidden min-h-[510px] lg:block",
|
|
425
429
|
"aria-hidden": "true"
|
|
426
|
-
})] }) : /* @__PURE__ */
|
|
430
|
+
})] }) : /* @__PURE__ */ v("div", {
|
|
427
431
|
className: "relative min-h-[340px] overflow-hidden rounded-3xl border border-slate-200 bg-slate-900 shadow-sm lg:min-h-[510px]",
|
|
428
|
-
children: [/* @__PURE__ */
|
|
429
|
-
src:
|
|
432
|
+
children: [/* @__PURE__ */ _("img", {
|
|
433
|
+
src: Et,
|
|
430
434
|
alt: "",
|
|
431
435
|
className: "absolute inset-0 h-full w-full object-cover",
|
|
432
436
|
"aria-hidden": "true"
|
|
433
|
-
}), /* @__PURE__ */
|
|
437
|
+
}), /* @__PURE__ */ _("div", {
|
|
434
438
|
className: "absolute inset-0 bg-linear-to-t from-slate-900/45 via-slate-900/15 to-transparent",
|
|
435
439
|
"aria-hidden": "true"
|
|
436
440
|
})]
|
|
437
441
|
});
|
|
438
|
-
return /* @__PURE__ */
|
|
439
|
-
/* @__PURE__ */
|
|
442
|
+
return /* @__PURE__ */ v(g, { children: [
|
|
443
|
+
/* @__PURE__ */ v("section", {
|
|
440
444
|
className: "relative overflow-hidden border-b border-slate-200",
|
|
441
445
|
children: [
|
|
442
|
-
/* @__PURE__ */
|
|
446
|
+
/* @__PURE__ */ _("div", {
|
|
443
447
|
className: "absolute inset-0 bg-linear-to-b from-slate-50 to-white",
|
|
444
448
|
"aria-hidden": "true"
|
|
445
449
|
}),
|
|
446
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ _("div", {
|
|
447
451
|
className: "absolute inset-0 opacity-[0.07]",
|
|
448
452
|
style: { backgroundImage: "radial-gradient(circle at 20% 20%, rgba(15, 23, 42, 0.9) 0px, transparent 55%), radial-gradient(circle at 80% 35%, rgba(14, 116, 144, 0.9) 0px, transparent 55%), radial-gradient(circle at 55% 85%, rgba(99, 102, 241, 0.9) 0px, transparent 55%)" },
|
|
449
453
|
"aria-hidden": "true"
|
|
450
454
|
}),
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
455
|
+
Dt,
|
|
456
|
+
kt,
|
|
457
|
+
X ? /* @__PURE__ */ v("div", {
|
|
454
458
|
className: "relative mx-auto grid max-w-7xl gap-x-8 px-4 py-10 sm:px-6 lg:grid-cols-12 lg:py-14",
|
|
455
459
|
children: [
|
|
456
|
-
/* @__PURE__ */
|
|
460
|
+
/* @__PURE__ */ _("div", {
|
|
457
461
|
className: "min-w-0 lg:col-span-5 lg:col-start-1 lg:row-start-1",
|
|
458
|
-
children:
|
|
462
|
+
children: ht
|
|
459
463
|
}),
|
|
460
|
-
/* @__PURE__ */
|
|
461
|
-
className:
|
|
462
|
-
children:
|
|
464
|
+
/* @__PURE__ */ _("div", {
|
|
465
|
+
className: b("mt-8 min-w-0 lg:col-span-7 lg:col-start-6 lg:row-span-2 lg:row-start-1 lg:mt-0", !Y && "lg:pt-4"),
|
|
466
|
+
children: At
|
|
463
467
|
}),
|
|
464
|
-
/* @__PURE__ */
|
|
468
|
+
/* @__PURE__ */ _("div", {
|
|
465
469
|
className: "relative z-20 mt-4 lg:col-span-5 lg:col-start-1 lg:row-start-2 lg:mt-7",
|
|
466
470
|
"data-testid": "storefront-home-booking-bar",
|
|
467
|
-
children: /* @__PURE__ */
|
|
471
|
+
children: /* @__PURE__ */ _("div", {
|
|
468
472
|
className: "lg:w-[calc(100%+24rem)] lg:max-w-none",
|
|
469
|
-
children:
|
|
473
|
+
children: xt
|
|
470
474
|
})
|
|
471
475
|
})
|
|
472
476
|
]
|
|
473
|
-
}) : /* @__PURE__ */
|
|
477
|
+
}) : /* @__PURE__ */ v("div", {
|
|
474
478
|
className: "relative mx-auto grid max-w-7xl gap-8 px-4 py-10 sm:px-6 lg:grid-cols-12 lg:items-center lg:py-14",
|
|
475
|
-
children: [/* @__PURE__ */
|
|
479
|
+
children: [/* @__PURE__ */ _("div", {
|
|
476
480
|
className: "min-w-0 lg:col-span-5",
|
|
477
|
-
children:
|
|
478
|
-
}), /* @__PURE__ */
|
|
481
|
+
children: ht
|
|
482
|
+
}), /* @__PURE__ */ _("div", {
|
|
479
483
|
className: "min-w-0 lg:col-span-7",
|
|
480
|
-
children:
|
|
484
|
+
children: bt
|
|
481
485
|
})]
|
|
482
486
|
})
|
|
483
487
|
]
|
|
484
488
|
}),
|
|
485
|
-
/* @__PURE__ */
|
|
489
|
+
/* @__PURE__ */ v("section", {
|
|
486
490
|
id: "featured",
|
|
487
491
|
className: "mx-auto max-w-7xl scroll-mt-16 px-4 py-10 sm:scroll-mt-20 sm:px-6",
|
|
488
|
-
children: [/* @__PURE__ */
|
|
492
|
+
children: [/* @__PURE__ */ v("div", {
|
|
489
493
|
className: "flex items-center justify-between gap-3",
|
|
490
|
-
children: [/* @__PURE__ */
|
|
494
|
+
children: [/* @__PURE__ */ v("div", {
|
|
491
495
|
className: "space-y-1",
|
|
492
|
-
children: [/* @__PURE__ */
|
|
496
|
+
children: [/* @__PURE__ */ _("h2", {
|
|
493
497
|
className: "text-xl font-semibold tracking-tight",
|
|
494
|
-
children: /* @__PURE__ */
|
|
495
|
-
}), /* @__PURE__ */
|
|
498
|
+
children: /* @__PURE__ */ _("span", { children: d("featured_title") })
|
|
499
|
+
}), /* @__PURE__ */ _("p", {
|
|
496
500
|
className: "text-sm text-slate-600",
|
|
497
|
-
children: /* @__PURE__ */
|
|
501
|
+
children: /* @__PURE__ */ _("span", { children: d("featured_description") })
|
|
498
502
|
})]
|
|
499
|
-
}), /* @__PURE__ */
|
|
503
|
+
}), /* @__PURE__ */ v(y, {
|
|
500
504
|
className: "hidden items-center gap-2 text-sm font-medium text-slate-700 hover:text-slate-950 sm:inline-flex",
|
|
501
|
-
to: `/${
|
|
502
|
-
children: [/* @__PURE__ */
|
|
505
|
+
to: `/${C ?? ""}/booking${ut}`,
|
|
506
|
+
children: [/* @__PURE__ */ _("span", { children: d("featured_view_all") }), /* @__PURE__ */ _(x, {
|
|
503
507
|
className: "h-4 w-4",
|
|
504
508
|
"aria-hidden": "true"
|
|
505
509
|
})]
|
|
506
510
|
})]
|
|
507
|
-
}), /* @__PURE__ */
|
|
511
|
+
}), /* @__PURE__ */ _("div", {
|
|
508
512
|
className: "mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
509
|
-
children:
|
|
510
|
-
let t = e.id, n = e.slug, r = s(e.name,
|
|
511
|
-
return /* @__PURE__ */
|
|
513
|
+
children: it.map((e) => {
|
|
514
|
+
let t = e.id, n = e.slug, r = s(e.name, S.language, k), i = s(e.description, S.language, k), a = typeof e.images?.[0] == "string" ? e.images[0].trim() : "", o = be(e.primaryImageStyle), c = ee(e.availabilityStatus), u = mt(n);
|
|
515
|
+
return /* @__PURE__ */ v("div", {
|
|
512
516
|
className: "group flex h-full min-w-0 flex-col gap-2 rounded-xl border border-slate-200 bg-white p-3 text-left shadow-sm transition hover:border-slate-400",
|
|
513
517
|
children: [
|
|
514
|
-
/* @__PURE__ */
|
|
518
|
+
/* @__PURE__ */ _(y, {
|
|
515
519
|
to: u,
|
|
516
|
-
state:
|
|
520
|
+
state: $,
|
|
517
521
|
className: "block",
|
|
518
|
-
children: /* @__PURE__ */
|
|
519
|
-
className:
|
|
522
|
+
children: /* @__PURE__ */ _("span", {
|
|
523
|
+
className: b("relative block aspect-[1618/1000] overflow-hidden rounded-xl", o.className),
|
|
520
524
|
style: o.style,
|
|
521
|
-
children: a ? /* @__PURE__ */
|
|
525
|
+
children: a ? /* @__PURE__ */ _("img", {
|
|
522
526
|
src: a,
|
|
523
527
|
alt: r,
|
|
524
528
|
className: "absolute inset-0 h-full w-full object-contain p-1",
|
|
525
529
|
loading: "lazy"
|
|
526
|
-
}) : /* @__PURE__ */
|
|
530
|
+
}) : /* @__PURE__ */ _("span", {
|
|
527
531
|
className: "absolute inset-0 flex items-center justify-center text-slate-400",
|
|
528
|
-
children: /* @__PURE__ */
|
|
532
|
+
children: /* @__PURE__ */ _(je, {
|
|
529
533
|
className: "h-8 w-8",
|
|
530
534
|
"aria-hidden": "true"
|
|
531
535
|
})
|
|
532
536
|
})
|
|
533
537
|
})
|
|
534
538
|
}),
|
|
535
|
-
/* @__PURE__ */
|
|
539
|
+
/* @__PURE__ */ v("span", {
|
|
536
540
|
className: "flex flex-1 flex-col gap-1",
|
|
537
541
|
children: [
|
|
538
|
-
/* @__PURE__ */
|
|
542
|
+
/* @__PURE__ */ _(y, {
|
|
539
543
|
to: u,
|
|
540
|
-
state:
|
|
544
|
+
state: $,
|
|
541
545
|
className: "text-sm font-semibold text-slate-950 hover:text-slate-700",
|
|
542
|
-
children: /* @__PURE__ */
|
|
546
|
+
children: /* @__PURE__ */ _("span", { children: r })
|
|
543
547
|
}),
|
|
544
|
-
/* @__PURE__ */
|
|
548
|
+
/* @__PURE__ */ _(ve, {
|
|
545
549
|
prices: e.prices,
|
|
546
550
|
className: "self-start"
|
|
547
551
|
}),
|
|
548
|
-
/* @__PURE__ */
|
|
552
|
+
/* @__PURE__ */ _("span", {
|
|
549
553
|
className: "line-clamp-2 text-xs text-slate-600",
|
|
550
554
|
children: i
|
|
551
555
|
})
|
|
552
556
|
]
|
|
553
557
|
}),
|
|
554
|
-
/* @__PURE__ */
|
|
558
|
+
/* @__PURE__ */ v("span", {
|
|
555
559
|
className: "flex flex-wrap items-center gap-x-2 gap-y-1",
|
|
556
560
|
children: [
|
|
557
|
-
/* @__PURE__ */
|
|
561
|
+
/* @__PURE__ */ _(l, {
|
|
558
562
|
variant: c.variant,
|
|
559
|
-
children: /* @__PURE__ */
|
|
563
|
+
children: /* @__PURE__ */ _("span", { children: d(c.labelKey) })
|
|
560
564
|
}),
|
|
561
|
-
/* @__PURE__ */
|
|
565
|
+
/* @__PURE__ */ _("span", {
|
|
562
566
|
className: "text-slate-400",
|
|
563
567
|
children: "·"
|
|
564
568
|
}),
|
|
565
|
-
/* @__PURE__ */
|
|
569
|
+
/* @__PURE__ */ _(y, {
|
|
566
570
|
to: u,
|
|
567
|
-
state:
|
|
571
|
+
state: $,
|
|
568
572
|
className: "text-xs font-medium text-slate-700 hover:text-slate-950",
|
|
569
|
-
children: /* @__PURE__ */
|
|
573
|
+
children: /* @__PURE__ */ _("span", { children: d("product_details_link") })
|
|
570
574
|
})
|
|
571
575
|
]
|
|
572
576
|
})
|
|
@@ -575,92 +579,92 @@ function D() {
|
|
|
575
579
|
})
|
|
576
580
|
})]
|
|
577
581
|
}),
|
|
578
|
-
/* @__PURE__ */
|
|
582
|
+
/* @__PURE__ */ _("section", {
|
|
579
583
|
id: "products",
|
|
580
584
|
className: "border-t bg-slate-50/60 scroll-mt-16 sm:scroll-mt-20",
|
|
581
|
-
children: /* @__PURE__ */
|
|
585
|
+
children: /* @__PURE__ */ v("div", {
|
|
582
586
|
className: "mx-auto max-w-7xl px-4 py-10 sm:px-6",
|
|
583
|
-
children: [/* @__PURE__ */
|
|
587
|
+
children: [/* @__PURE__ */ _("div", {
|
|
584
588
|
className: "flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between",
|
|
585
|
-
children: /* @__PURE__ */
|
|
589
|
+
children: /* @__PURE__ */ v("div", {
|
|
586
590
|
className: "space-y-1",
|
|
587
|
-
children: [/* @__PURE__ */
|
|
591
|
+
children: [/* @__PURE__ */ _("h2", {
|
|
588
592
|
className: "text-xl font-semibold tracking-tight",
|
|
589
|
-
children: /* @__PURE__ */
|
|
590
|
-
}), /* @__PURE__ */
|
|
593
|
+
children: /* @__PURE__ */ _("span", { children: d("products_title") })
|
|
594
|
+
}), /* @__PURE__ */ _("p", {
|
|
591
595
|
className: "text-sm text-slate-600",
|
|
592
|
-
children: /* @__PURE__ */
|
|
596
|
+
children: /* @__PURE__ */ _("span", { children: d("products_description") })
|
|
593
597
|
})]
|
|
594
598
|
})
|
|
595
|
-
}), /* @__PURE__ */
|
|
599
|
+
}), /* @__PURE__ */ _("div", {
|
|
596
600
|
className: "mt-6 grid gap-4 md:grid-cols-2",
|
|
597
|
-
children:
|
|
601
|
+
children: A.map((e) => /* @__PURE__ */ _(xe, {
|
|
598
602
|
bike: e,
|
|
599
|
-
detailsPath:
|
|
600
|
-
productDetailsLinkState:
|
|
601
|
-
fallbackLanguage:
|
|
602
|
-
onAction:
|
|
603
|
+
detailsPath: mt(e.slug),
|
|
604
|
+
productDetailsLinkState: $,
|
|
605
|
+
fallbackLanguage: k,
|
|
606
|
+
onAction: Q
|
|
603
607
|
}, e.id))
|
|
604
608
|
})]
|
|
605
609
|
})
|
|
606
610
|
}),
|
|
607
|
-
/* @__PURE__ */
|
|
611
|
+
/* @__PURE__ */ v("section", {
|
|
608
612
|
className: "mx-auto max-w-7xl px-4 py-10 sm:px-6",
|
|
609
|
-
children: [/* @__PURE__ */
|
|
613
|
+
children: [/* @__PURE__ */ _("div", {
|
|
610
614
|
className: "flex flex-col gap-2 sm:flex-row sm:items-end sm:justify-between",
|
|
611
|
-
children: /* @__PURE__ */
|
|
615
|
+
children: /* @__PURE__ */ v("div", {
|
|
612
616
|
className: "space-y-1",
|
|
613
|
-
children: [/* @__PURE__ */
|
|
617
|
+
children: [/* @__PURE__ */ _("h2", {
|
|
614
618
|
className: "text-xl font-semibold tracking-tight",
|
|
615
|
-
children: /* @__PURE__ */
|
|
616
|
-
}), /* @__PURE__ */
|
|
619
|
+
children: /* @__PURE__ */ _("span", { children: d("accessories_title") })
|
|
620
|
+
}), /* @__PURE__ */ _("p", {
|
|
617
621
|
className: "text-sm text-slate-600",
|
|
618
|
-
children: /* @__PURE__ */
|
|
622
|
+
children: /* @__PURE__ */ _("span", { children: d("accessories_description") })
|
|
619
623
|
})]
|
|
620
624
|
})
|
|
621
|
-
}), /* @__PURE__ */
|
|
625
|
+
}), /* @__PURE__ */ _("div", {
|
|
622
626
|
className: "mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
623
|
-
children:
|
|
624
|
-
let t = s(e.name,
|
|
625
|
-
return /* @__PURE__ */
|
|
627
|
+
children: Ve.slice(0, 4).map((e) => {
|
|
628
|
+
let t = s(e.name, S.language, k), n = s(e.description, S.language, k), r = s(e.warning, S.language, k), i = typeof e.images?.[0] == "string" ? e.images[0].trim() : "", a = be(e.primaryImageStyle);
|
|
629
|
+
return /* @__PURE__ */ v("div", {
|
|
626
630
|
className: "flex h-full min-w-0 flex-col gap-2 rounded-xl border border-slate-200 bg-white p-3 shadow-sm",
|
|
627
631
|
children: [
|
|
628
|
-
/* @__PURE__ */
|
|
629
|
-
className:
|
|
632
|
+
/* @__PURE__ */ _("div", {
|
|
633
|
+
className: b("relative aspect-[1618/1000] overflow-hidden rounded-xl", a.className),
|
|
630
634
|
style: a.style,
|
|
631
|
-
children: i ? /* @__PURE__ */
|
|
635
|
+
children: i ? /* @__PURE__ */ _("img", {
|
|
632
636
|
src: i,
|
|
633
637
|
alt: t,
|
|
634
638
|
className: "absolute inset-0 h-full w-full object-contain p-1",
|
|
635
639
|
loading: "lazy"
|
|
636
|
-
}) : /* @__PURE__ */
|
|
640
|
+
}) : /* @__PURE__ */ _("div", {
|
|
637
641
|
className: "absolute inset-0 flex items-center justify-center text-slate-400",
|
|
638
|
-
children: /* @__PURE__ */
|
|
642
|
+
children: /* @__PURE__ */ _(je, {
|
|
639
643
|
className: "h-8 w-8",
|
|
640
644
|
"aria-hidden": "true"
|
|
641
645
|
})
|
|
642
646
|
})
|
|
643
647
|
}),
|
|
644
|
-
/* @__PURE__ */
|
|
648
|
+
/* @__PURE__ */ v("div", {
|
|
645
649
|
className: "flex flex-1 flex-col gap-1",
|
|
646
650
|
children: [
|
|
647
|
-
/* @__PURE__ */
|
|
651
|
+
/* @__PURE__ */ _("p", {
|
|
648
652
|
className: "text-sm font-semibold text-slate-950",
|
|
649
|
-
children: /* @__PURE__ */
|
|
653
|
+
children: /* @__PURE__ */ _("span", { children: t })
|
|
650
654
|
}),
|
|
651
|
-
/* @__PURE__ */
|
|
655
|
+
/* @__PURE__ */ _("p", {
|
|
652
656
|
className: "line-clamp-2 text-xs text-slate-600",
|
|
653
|
-
children: /* @__PURE__ */
|
|
657
|
+
children: /* @__PURE__ */ _("span", { children: n })
|
|
654
658
|
}),
|
|
655
|
-
/* @__PURE__ */
|
|
659
|
+
/* @__PURE__ */ _(_e, {
|
|
656
660
|
warning: r,
|
|
657
661
|
className: "mt-1"
|
|
658
662
|
})
|
|
659
663
|
]
|
|
660
664
|
}),
|
|
661
|
-
/* @__PURE__ */
|
|
665
|
+
/* @__PURE__ */ _("div", {
|
|
662
666
|
className: "flex items-center justify-between gap-2",
|
|
663
|
-
children: /* @__PURE__ */
|
|
667
|
+
children: /* @__PURE__ */ _(ve, {
|
|
664
668
|
prices: e.prices,
|
|
665
669
|
openOnHover: !1
|
|
666
670
|
})
|
|
@@ -670,11 +674,11 @@ function D() {
|
|
|
670
674
|
})
|
|
671
675
|
})]
|
|
672
676
|
}),
|
|
673
|
-
/* @__PURE__ */
|
|
674
|
-
/* @__PURE__ */
|
|
675
|
-
/* @__PURE__ */
|
|
676
|
-
/* @__PURE__ */
|
|
677
|
+
/* @__PURE__ */ _(me, {}),
|
|
678
|
+
/* @__PURE__ */ _(he, {}),
|
|
679
|
+
/* @__PURE__ */ _(pe, {}),
|
|
680
|
+
/* @__PURE__ */ _(fe, { storeSlug: C ?? "" })
|
|
677
681
|
] });
|
|
678
682
|
}
|
|
679
683
|
//#endregion
|
|
680
|
-
export {
|
|
684
|
+
export { O as default };
|