@loczer/storefront-sdk 0.182.0 → 0.183.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/StorefrontProvider.d.ts +18 -15
- package/dist/StorefrontProvider.d.ts.map +1 -1
- package/dist/StorefrontProvider.js +24 -34
- package/dist/chunks/booking-engine/dist/models/{Product.shared-CJ6vPb6n.js → Product.shared-CTuk4fiR.js} +2 -2
- package/dist/chunks/booking-engine/dist/schemas/{base-asset-PqhtKnZA.js → base-asset-B_Dm8_Vk.js} +1 -1
- package/dist/chunks/booking-engine/dist/schemas/{base-booking-BM3jZzqu.js → base-booking-DW8AEPKo.js} +1 -1
- package/dist/chunks/booking-engine/dist/schemas/{base-product-BJd4ttMP.js → base-product-1H8l2aUv.js} +1 -1
- package/dist/chunks/booking-engine/dist/{schemas-BNlwu75Z.js → schemas-34QQv0EH.js} +4 -4
- package/dist/chunks/ui/dist/Map/{MapContent--PwVTg2W.js → MapContent-QPkuTBvK.js} +2 -2
- package/dist/chunks/ui/dist/Map/{constants-DqrK8UkE.js → constants-BNmiJXfg.js} +1 -1
- package/dist/chunks/ui/dist/{Map-B45AxZ-D.js → Map-BXmRf5Ep.js} +3 -3
- package/dist/chunks/ui/dist/static/strings-1T2w7LqX.js +4 -0
- package/dist/components/AboutSection/index.d.ts +1 -6
- package/dist/components/AboutSection/index.d.ts.map +1 -1
- package/dist/components/AboutSection/index.js +43 -39
- package/dist/components/ContactSection/index.d.ts +1 -3
- package/dist/components/ContactSection/index.d.ts.map +1 -1
- package/dist/components/ContactSection/index.js +222 -164
- package/dist/components/Footer/index.d.ts +3 -4
- package/dist/components/Footer/index.d.ts.map +1 -1
- package/dist/components/Footer/index.js +98 -69
- package/dist/components/FulfillmentSection/index.d.ts.map +1 -1
- package/dist/components/FulfillmentSection/index.js +17 -16
- package/dist/components/Header/index.d.ts +1 -3
- package/dist/components/Header/index.d.ts.map +1 -1
- package/dist/components/Header/index.js +77 -72
- package/dist/components/Layout/index.d.ts +3 -1
- package/dist/components/Layout/index.d.ts.map +1 -1
- package/dist/components/Layout/index.js +45 -47
- package/dist/components/Map/index.js +1 -1
- package/dist/components/ProductPriceBadge/index.d.ts.map +1 -1
- package/dist/components/ProductPriceBadge/index.js +68 -60
- package/dist/i18n/I18nProvider.js +1 -1
- package/dist/i18n/fr.js +1 -1
- package/dist/index.d.ts +151 -150
- package/dist/index.js +62 -62
- package/dist/lib/cart.d.ts +4 -1
- package/dist/lib/cart.d.ts.map +1 -1
- package/dist/lib/cart.js +64 -40
- package/dist/lib/cartSummary.d.ts.map +1 -1
- package/dist/lib/cartSummary.js +4 -3
- package/dist/lib/checkoutSubmit.js +2 -2
- package/dist/lib/productVariants.d.ts.map +1 -1
- package/dist/lib/productVariants.js +20 -9
- package/dist/lib/storefrontAddress.d.ts +5 -0
- package/dist/lib/storefrontAddress.d.ts.map +1 -0
- package/dist/lib/storefrontAddress.js +24 -0
- package/dist/lib/storefrontAvailability.d.ts +6 -6
- package/dist/lib/storefrontContact.d.ts +10 -0
- package/dist/lib/storefrontContact.d.ts.map +1 -0
- package/dist/lib/storefrontContact.js +24 -0
- package/dist/lib/storefrontMissingValues.d.ts +5 -0
- package/dist/lib/storefrontMissingValues.d.ts.map +1 -0
- package/dist/lib/storefrontMissingValues.js +4 -0
- package/dist/lib/storefrontProducts.d.ts +23 -21
- package/dist/lib/storefrontProducts.d.ts.map +1 -1
- package/dist/lib/storefrontProducts.js +7 -5
- package/dist/lib/whatsapp.d.ts +8 -6
- package/dist/lib/whatsapp.d.ts.map +1 -1
- package/dist/lib/whatsapp.js +16 -43
- package/dist/pages/BookingPage.js +36 -36
- package/dist/pages/HomePage.d.ts.map +1 -1
- package/dist/pages/HomePage.js +126 -128
- package/dist/pages/ProductPage.js +160 -160
- package/dist/storefront.css +1 -1
- package/dist/storefrontSchemas.d.ts +14 -12
- package/dist/storefrontSchemas.d.ts.map +1 -1
- package/dist/storefrontSchemas.js +3 -2
- package/dist/ui/radio-group.d.ts +1 -1
- package/package.json +7 -6
- package/dist/chunks/ui/dist/static/strings-CPnO-KbA.js +0 -4
- package/dist/data/config.d.ts +0 -15
- package/dist/data/config.d.ts.map +0 -1
- package/dist/data/config.js +0 -24
- package/dist/static/strings.d.ts +0 -2
- package/dist/static/strings.d.ts.map +0 -1
- package/dist/static/strings.js +0 -4
package/dist/pages/HomePage.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { applyBookingParamsToSearch as t, createBookingPeriodConfigFromStorefrontConfiguration as n, getBookingParamsFromSearch as r, getDefaultBookingParamsForStorefrontConfiguration as i, resolveBookingSearchParamsFromSessionStorage as a, writeBookingSearchParamsToSessionStorage as o } from "../lib/booking.js";
|
|
1
|
+
import { applyBookingParamsToSearch as e, createBookingPeriodConfigFromStorefrontConfiguration as t, getBookingParamsFromSearch as n, getDefaultBookingParamsForStorefrontConfiguration as r, resolveBookingSearchParamsFromSessionStorage as i, writeBookingSearchParamsToSessionStorage as a } from "../lib/booking.js";
|
|
3
2
|
import { getAvailabilityVariant as ee } from "../lib/utils.js";
|
|
4
|
-
import { getLocalizedValue as
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
3
|
+
import { getLocalizedValue as o } from "../localization.js";
|
|
4
|
+
import "../lib/storefrontMissingValues.js";
|
|
5
|
+
import { Badge as s } from "../ui/badge.js";
|
|
6
|
+
import { Button as c } from "../ui/button.js";
|
|
7
|
+
import { usePlaygroundDevSettings as l } from "../lib/playgroundDevSettings.js";
|
|
8
|
+
import { BookingPeriodProvider as u } from "../components/BookingPeriodSelector/BookingPeriodContext.js";
|
|
9
|
+
import { BookingStartDateField as te } from "../components/BookingPeriodSelector/components/BookingStartDateField.js";
|
|
10
|
+
import { BookingStartTimeField as ne } from "../components/BookingPeriodSelector/components/BookingStartTimeField.js";
|
|
11
|
+
import { BookingEndDateField as re } from "../components/BookingPeriodSelector/components/BookingEndDateField.js";
|
|
12
|
+
import { BookingEndTimeField as ie } from "../components/BookingPeriodSelector/components/BookingEndTimeField.js";
|
|
13
13
|
import "../components/BookingPeriodSelector/index.js";
|
|
14
|
-
import { DeliveryAddressSelector as
|
|
15
|
-
import { useStorefront as
|
|
16
|
-
import { ContactSection as
|
|
17
|
-
import { TestimonialsSection as
|
|
18
|
-
import { AboutSection as
|
|
19
|
-
import { Card as
|
|
20
|
-
import { ProductWarningNotice as
|
|
21
|
-
import { ProductPriceBadge as
|
|
22
|
-
import
|
|
23
|
-
import { resolveProductImageContainerStyle as
|
|
24
|
-
import { BikeProductCard as
|
|
25
|
-
import { StorefrontCancellationPolicyNotice as
|
|
26
|
-
import { createStorefrontTimeSlotsFetcher as
|
|
27
|
-
import { FulfillmentSection as
|
|
28
|
-
import { useEffect as
|
|
29
|
-
import { Fragment as
|
|
14
|
+
import { DeliveryAddressSelector as ae } from "../components/DeliveryAddressSelector/index.js";
|
|
15
|
+
import { useStorefront as oe, useStorefrontProducts as se } from "../StorefrontProvider.js";
|
|
16
|
+
import { ContactSection as ce } from "../components/ContactSection/index.js";
|
|
17
|
+
import { TestimonialsSection as le } from "../components/TestimonialsSection/index.js";
|
|
18
|
+
import { AboutSection as ue } from "../components/AboutSection/index.js";
|
|
19
|
+
import { Card as de } from "../ui/card.js";
|
|
20
|
+
import { ProductWarningNotice as fe } from "../components/ProductWarningNotice/index.js";
|
|
21
|
+
import { ProductPriceBadge as pe } from "../components/ProductPriceBadge/index.js";
|
|
22
|
+
import me from "../chunks/assets/playground-hero-preview-kf4c9tSc.js";
|
|
23
|
+
import { resolveProductImageContainerStyle as he } from "../lib/productImageStyles.js";
|
|
24
|
+
import { BikeProductCard as ge } from "../components/BikeProductCard/index.js";
|
|
25
|
+
import { StorefrontCancellationPolicyNotice as _e, resolveStorefrontCancellationPolicyTeaserTier as ve } from "../components/StorefrontCancellationPolicyNotice/index.js";
|
|
26
|
+
import { createStorefrontTimeSlotsFetcher as ye } from "../lib/fetchStorefrontTimeSlots.js";
|
|
27
|
+
import { FulfillmentSection as be } from "../components/FulfillmentSection/index.js";
|
|
28
|
+
import { useEffect as xe, useMemo as d, useRef as Se, useState as f } from "react";
|
|
29
|
+
import { Fragment as Ce, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
30
30
|
import { cn as h } from "@rpcbase/ui";
|
|
31
|
-
import { useMediaQuery as
|
|
32
|
-
import { Link as g, useLocation as
|
|
33
|
-
import { useTranslation as
|
|
34
|
-
import { ArrowRight as _, Bike as
|
|
31
|
+
import { useMediaQuery as we } from "@rpcbase/client";
|
|
32
|
+
import { Link as g, useLocation as Te, useNavigate as Ee, useParams as De, useSearchParams as Oe } from "@rpcbase/router";
|
|
33
|
+
import { useTranslation as ke } from "react-i18next";
|
|
34
|
+
import { ArrowRight as _, Bike as Ae, Clock as je, MapPin as Me, ShieldCheck as Ne, Truck as Pe, Umbrella as Fe } from "lucide-react";
|
|
35
35
|
//#region src/pages/HomePage.tsx
|
|
36
36
|
var v = (e) => String(e).padStart(2, "0"), y = "text-2xs font-semibold uppercase tracking-wide text-slate-600", b = "h-10", x = 6, S = 5, C = [
|
|
37
37
|
15,
|
|
@@ -55,8 +55,8 @@ var v = (e) => String(e).padStart(2, "0"), y = "text-2xs font-semibold uppercase
|
|
|
55
55
|
if (!t) return;
|
|
56
56
|
let n = Number(t[1]), r = Number(t[2]), i = Number(t[3]), a = new Date(n, r - 1, i);
|
|
57
57
|
if (!(Number.isNaN(a.getTime()) || a.getFullYear() !== n || a.getMonth() !== r - 1 || a.getDate() !== i)) return a;
|
|
58
|
-
},
|
|
59
|
-
let t = e.length > 0 ? e : [
|
|
58
|
+
}, Ie = (e) => {
|
|
59
|
+
let t = e.length > 0 ? e : [me];
|
|
60
60
|
return Array.from({ length: x }, (e, n) => Array.from({ length: S }, (e, r) => {
|
|
61
61
|
let i = n * S + r;
|
|
62
62
|
return {
|
|
@@ -66,10 +66,10 @@ var v = (e) => String(e).padStart(2, "0"), y = "text-2xs font-semibold uppercase
|
|
|
66
66
|
}));
|
|
67
67
|
};
|
|
68
68
|
function D() {
|
|
69
|
-
let { t: v, i18n: x } =
|
|
70
|
-
let e = E(
|
|
71
|
-
return E(
|
|
72
|
-
}), [V,
|
|
69
|
+
let { t: v, i18n: x } = ke(), { storeSlug: S } = De(), w = Te(), { storefrontConfiguration: D } = oe(), O = D.shop.address?.trim() ?? "", k = D.workspace?.workspaceLanguage, { bikes: A, accessories: Le } = se(), [j] = Oe(), Re = Ee(), M = d(() => i(j, S), [j, S]), ze = d(() => t(D), [D]), N = d(() => r(D), [D]), P = d(() => E(N.start_date), [N.start_date]), Be = d(() => E(N.end_date) ?? P, [N.end_date, P]), F = D.settings.fulfillmentModes.includes("delivery"), Ve = D.settings.deliveryDisabledReason.trim(), He = !!ve(D.bookingEngine.cancellationPolicy), I = d(() => n(M, N), [N, M]), [L, Ue] = f(() => I.fulfillment === "delivery" && F ? "delivery" : "pickup"), [R, We] = f(() => E(M.get("start_date")) ?? P), [z, Ge] = f(() => M.get("start_time") ?? N.start_time), [B, Ke] = f(() => {
|
|
70
|
+
let e = E(M.get("start_date")) ?? P;
|
|
71
|
+
return E(M.get("end_date")) ?? e ?? Be;
|
|
72
|
+
}), [V, qe] = f(() => M.get("end_time") ?? N.end_time), [H, U] = f(() => I.start_address), [W, G] = f(() => I.end_address), K = Se(null), Je = d(() => A.slice(0, 4), [A]), { heroMode: Ye } = l(), q = Ye === "vertical_marquee_hero", J = Ye === "booking_bar_overlay_hero" || q, Xe = we("(min-width: 1024px)"), Ze = ye(S), Qe = d(() => ({
|
|
73
73
|
startDate: v("booking_start_date"),
|
|
74
74
|
pickStartDate: v("booking_start_date"),
|
|
75
75
|
startTime: v("booking_start_time"),
|
|
@@ -78,10 +78,10 @@ function D() {
|
|
|
78
78
|
endTime: v("booking_end_time"),
|
|
79
79
|
selectedDaysTooltip: ({ count: e }) => v("booking_selected_days_tooltip", { count: e })
|
|
80
80
|
}), [x.language, v]), Y = d(() => {
|
|
81
|
-
let
|
|
82
|
-
return
|
|
81
|
+
let t = R ?? P ?? /* @__PURE__ */ new Date(), n = B ?? t;
|
|
82
|
+
return e(new URLSearchParams(), {
|
|
83
83
|
fulfillment: L === "delivery" && F ? "delivery" : "pickup",
|
|
84
|
-
start_date: T(
|
|
84
|
+
start_date: T(t),
|
|
85
85
|
start_time: z || N.start_time,
|
|
86
86
|
end_date: T(n),
|
|
87
87
|
end_time: V || N.end_time,
|
|
@@ -100,64 +100,65 @@ function D() {
|
|
|
100
100
|
H,
|
|
101
101
|
R,
|
|
102
102
|
z
|
|
103
|
-
]),
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
]), $e = Y.toString(), et = $e ? `?${$e}` : "";
|
|
104
|
+
xe(() => {
|
|
105
|
+
a(S, Y);
|
|
106
106
|
}, [Y, S]);
|
|
107
|
-
let
|
|
107
|
+
let tt = {
|
|
108
108
|
startDate: R,
|
|
109
|
-
onStartDateChange:
|
|
109
|
+
onStartDateChange: We,
|
|
110
110
|
startTime: z,
|
|
111
|
-
onStartTimeChange:
|
|
111
|
+
onStartTimeChange: Ge,
|
|
112
112
|
endDate: B,
|
|
113
|
-
onEndDateChange:
|
|
113
|
+
onEndDateChange: Ke,
|
|
114
114
|
endTime: V,
|
|
115
|
-
onEndTimeChange:
|
|
115
|
+
onEndTimeChange: qe,
|
|
116
116
|
onEndTimeCommit: () => {
|
|
117
117
|
K.current?.focus({ preventScroll: !0 });
|
|
118
118
|
},
|
|
119
|
-
bookingPeriodConfig:
|
|
120
|
-
fetchTimeSlots:
|
|
121
|
-
labels:
|
|
119
|
+
bookingPeriodConfig: ze,
|
|
120
|
+
fetchTimeSlots: Ze,
|
|
121
|
+
labels: Qe,
|
|
122
122
|
localeCode: x.language
|
|
123
123
|
}, X = () => {
|
|
124
|
-
let e = new URLSearchParams(
|
|
124
|
+
let e = new URLSearchParams(j);
|
|
125
125
|
for (let [t, n] of Y.entries()) e.set(t, n);
|
|
126
|
-
|
|
127
|
-
},
|
|
126
|
+
Re(`/${S ?? ""}/booking?${e.toString()}#booking-products`);
|
|
127
|
+
}, Z = (e) => `/${S ?? ""}/products/${e}`, Q = { backTo: `${w.pathname}${w.search}${w.hash}` }, nt = /* @__PURE__ */ m("div", { children: [
|
|
128
128
|
/* @__PURE__ */ m("div", {
|
|
129
129
|
className: "flex items-center gap-2",
|
|
130
|
-
children: [/* @__PURE__ */ m(
|
|
130
|
+
children: [/* @__PURE__ */ m(s, {
|
|
131
131
|
variant: "secondary",
|
|
132
|
-
children: [/* @__PURE__ */ p(
|
|
132
|
+
children: [/* @__PURE__ */ p(je, {
|
|
133
133
|
className: "h-3 w-3",
|
|
134
134
|
"aria-hidden": "true"
|
|
135
135
|
}), /* @__PURE__ */ p("span", { children: v("status_open") })]
|
|
136
|
-
}), /* @__PURE__ */ m(
|
|
136
|
+
}), /* @__PURE__ */ m(s, {
|
|
137
137
|
variant: "outline",
|
|
138
|
-
|
|
138
|
+
className: h(!O && "border-destructive/40 text-destructive"),
|
|
139
|
+
children: [/* @__PURE__ */ p(Me, {
|
|
139
140
|
className: "h-3 w-3",
|
|
140
141
|
"aria-hidden": "true"
|
|
141
|
-
}), /* @__PURE__ */ p("span", { children:
|
|
142
|
+
}), /* @__PURE__ */ p("span", { children: O || "[Missing shop address]" })]
|
|
142
143
|
})]
|
|
143
144
|
}),
|
|
144
145
|
/* @__PURE__ */ p("h1", {
|
|
145
146
|
className: "mt-4 text-3xl font-semibold tracking-tight sm:text-4xl",
|
|
146
|
-
children: /* @__PURE__ */ p("span", { children: v("hero_title"
|
|
147
|
+
children: /* @__PURE__ */ p("span", { children: v("hero_title") })
|
|
147
148
|
}),
|
|
148
149
|
/* @__PURE__ */ p("p", {
|
|
149
150
|
className: "mt-3 text-sm text-slate-700 sm:text-base",
|
|
150
|
-
children: /* @__PURE__ */ p("span", { children: v("hero_description"
|
|
151
|
+
children: /* @__PURE__ */ p("span", { children: v("hero_description") })
|
|
151
152
|
}),
|
|
152
153
|
/* @__PURE__ */ p("div", {
|
|
153
154
|
className: h("mt-6", !J && "rounded-xl border bg-white/70 p-3"),
|
|
154
155
|
children: /* @__PURE__ */ m("ul", {
|
|
155
156
|
className: h("space-y-3", J && "space-y-2"),
|
|
156
157
|
children: [
|
|
157
|
-
/* @__PURE__ */ p(
|
|
158
|
+
/* @__PURE__ */ p(_e, { policy: D.bookingEngine.cancellationPolicy }),
|
|
158
159
|
/* @__PURE__ */ m("li", {
|
|
159
|
-
className: h("flex items-start gap-3", !J &&
|
|
160
|
-
children: [/* @__PURE__ */ p(
|
|
160
|
+
className: h("flex items-start gap-3", !J && He && "border-t border-slate-200/70 pt-3"),
|
|
161
|
+
children: [/* @__PURE__ */ p(Ne, {
|
|
161
162
|
className: "mt-0.5 h-5 w-5 text-success",
|
|
162
163
|
"aria-hidden": "true"
|
|
163
164
|
}), /* @__PURE__ */ m("div", {
|
|
@@ -173,7 +174,7 @@ function D() {
|
|
|
173
174
|
}),
|
|
174
175
|
/* @__PURE__ */ m("li", {
|
|
175
176
|
className: h("flex items-start gap-3", !J && "border-t border-slate-200/70 pt-3"),
|
|
176
|
-
children: [/* @__PURE__ */ p(
|
|
177
|
+
children: [/* @__PURE__ */ p(Fe, {
|
|
177
178
|
className: "mt-0.5 h-5 w-5 text-success",
|
|
178
179
|
"aria-hidden": "true"
|
|
179
180
|
}), /* @__PURE__ */ m("div", {
|
|
@@ -189,7 +190,7 @@ function D() {
|
|
|
189
190
|
}),
|
|
190
191
|
F ? /* @__PURE__ */ m("li", {
|
|
191
192
|
className: h("flex items-start gap-3", !J && "border-t border-slate-200/70 pt-3"),
|
|
192
|
-
children: [/* @__PURE__ */ p(
|
|
193
|
+
children: [/* @__PURE__ */ p(Pe, {
|
|
193
194
|
className: "mt-0.5 h-5 w-5 text-slate-900",
|
|
194
195
|
"aria-hidden": "true"
|
|
195
196
|
}), /* @__PURE__ */ m("div", {
|
|
@@ -206,8 +207,8 @@ function D() {
|
|
|
206
207
|
]
|
|
207
208
|
})
|
|
208
209
|
})
|
|
209
|
-
] }),
|
|
210
|
-
...
|
|
210
|
+
] }), rt = ({ className: e, showSubmitButton: t = !1, submitButtonClassName: n }) => /* @__PURE__ */ p(u, {
|
|
211
|
+
...tt,
|
|
211
212
|
labelClassName: y,
|
|
212
213
|
inputClassName: b,
|
|
213
214
|
children: /* @__PURE__ */ m("div", {
|
|
@@ -215,15 +216,15 @@ function D() {
|
|
|
215
216
|
children: [
|
|
216
217
|
/* @__PURE__ */ p("div", {
|
|
217
218
|
className: "min-w-0",
|
|
218
|
-
children: /* @__PURE__ */ p(
|
|
219
|
+
children: /* @__PURE__ */ p(te, {})
|
|
219
220
|
}),
|
|
220
|
-
/* @__PURE__ */ p(
|
|
221
|
+
/* @__PURE__ */ p(ne, {}),
|
|
221
222
|
/* @__PURE__ */ p("div", {
|
|
222
223
|
className: "min-w-0",
|
|
223
|
-
children: /* @__PURE__ */ p(
|
|
224
|
+
children: /* @__PURE__ */ p(re, {})
|
|
224
225
|
}),
|
|
225
|
-
/* @__PURE__ */ p(
|
|
226
|
-
t ? /* @__PURE__ */ m(
|
|
226
|
+
/* @__PURE__ */ p(ie, {}),
|
|
227
|
+
t ? /* @__PURE__ */ m(c, {
|
|
227
228
|
ref: K,
|
|
228
229
|
className: h("gap-2", n),
|
|
229
230
|
onClick: X,
|
|
@@ -234,7 +235,7 @@ function D() {
|
|
|
234
235
|
}) : null
|
|
235
236
|
]
|
|
236
237
|
})
|
|
237
|
-
}),
|
|
238
|
+
}), it = (e) => F ? /* @__PURE__ */ p(ae, {
|
|
238
239
|
open: L === "delivery",
|
|
239
240
|
className: "sm:min-h-[6.75rem]",
|
|
240
241
|
inputClassName: `${b} bg-white`,
|
|
@@ -244,8 +245,8 @@ function D() {
|
|
|
244
245
|
returnAddress: W,
|
|
245
246
|
onReturnAddressChange: G,
|
|
246
247
|
testIdPrefix: e
|
|
247
|
-
}) : null,
|
|
248
|
-
className: "border-slate-200 bg-white/80 shadow-
|
|
248
|
+
}) : null, at = it("storefront-home-fulfillment-delivery-address"), ot = it("storefront-home-compact-fulfillment-delivery-address"), st = /* @__PURE__ */ m(de, {
|
|
249
|
+
className: "border-slate-200 bg-white/80 shadow-none",
|
|
249
250
|
children: [/* @__PURE__ */ m("div", {
|
|
250
251
|
className: "border-b border-slate-200 px-4 py-4",
|
|
251
252
|
children: [/* @__PURE__ */ p("p", {
|
|
@@ -258,12 +259,12 @@ function D() {
|
|
|
258
259
|
}), /* @__PURE__ */ m("div", {
|
|
259
260
|
className: "grid gap-4 px-4 py-4",
|
|
260
261
|
children: [
|
|
261
|
-
/* @__PURE__ */ p(
|
|
262
|
+
/* @__PURE__ */ p(be, {
|
|
262
263
|
value: L,
|
|
263
|
-
onValueChange:
|
|
264
|
-
pickupAddress:
|
|
264
|
+
onValueChange: Ue,
|
|
265
|
+
pickupAddress: O,
|
|
265
266
|
deliveryEnabled: F,
|
|
266
|
-
deliveryDisabledReason:
|
|
267
|
+
deliveryDisabledReason: Ve,
|
|
267
268
|
startAddress: H,
|
|
268
269
|
onStartAddressChange: U,
|
|
269
270
|
endAddress: W,
|
|
@@ -271,13 +272,13 @@ function D() {
|
|
|
271
272
|
showDeliveryAddressSelector: !1,
|
|
272
273
|
testIdPrefix: "storefront-home-fulfillment"
|
|
273
274
|
}),
|
|
274
|
-
|
|
275
|
-
|
|
275
|
+
rt({ 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" }),
|
|
276
|
+
at,
|
|
276
277
|
/* @__PURE__ */ p("p", {
|
|
277
278
|
className: "text-xs text-slate-600",
|
|
278
279
|
children: /* @__PURE__ */ p("span", { children: v("booking_minimum_duration", { hours: 4 }) })
|
|
279
280
|
}),
|
|
280
|
-
/* @__PURE__ */ m(
|
|
281
|
+
/* @__PURE__ */ m(c, {
|
|
281
282
|
ref: K,
|
|
282
283
|
className: "h-11 w-fit justify-self-start rounded-xl text-sm font-semibold gap-2",
|
|
283
284
|
onClick: X,
|
|
@@ -288,17 +289,17 @@ function D() {
|
|
|
288
289
|
})
|
|
289
290
|
]
|
|
290
291
|
})]
|
|
291
|
-
}),
|
|
292
|
+
}), ct = /* @__PURE__ */ p(de, {
|
|
292
293
|
className: "border-slate-200 bg-white/95 shadow-xl",
|
|
293
294
|
children: /* @__PURE__ */ m("div", {
|
|
294
295
|
className: "grid gap-3 p-4",
|
|
295
296
|
children: [
|
|
296
|
-
/* @__PURE__ */ p("div", { children: /* @__PURE__ */ p(
|
|
297
|
+
/* @__PURE__ */ p("div", { children: /* @__PURE__ */ p(be, {
|
|
297
298
|
value: L,
|
|
298
|
-
onValueChange:
|
|
299
|
-
pickupAddress:
|
|
299
|
+
onValueChange: Ue,
|
|
300
|
+
pickupAddress: O,
|
|
300
301
|
deliveryEnabled: F,
|
|
301
|
-
deliveryDisabledReason:
|
|
302
|
+
deliveryDisabledReason: Ve,
|
|
302
303
|
startAddress: H,
|
|
303
304
|
onStartAddressChange: U,
|
|
304
305
|
endAddress: W,
|
|
@@ -306,15 +307,15 @@ function D() {
|
|
|
306
307
|
showDeliveryAddressSelector: !1,
|
|
307
308
|
testIdPrefix: "storefront-home-compact-fulfillment"
|
|
308
309
|
}) }),
|
|
309
|
-
|
|
310
|
+
rt({
|
|
310
311
|
className: "grid gap-3 md:grid-cols-2 xl:grid-cols-[minmax(0,1fr)_150px_minmax(0,1fr)_150px_auto] xl:items-end",
|
|
311
312
|
showSubmitButton: !0,
|
|
312
313
|
submitButtonClassName: "h-10 rounded-xl text-sm font-semibold xl:self-end"
|
|
313
314
|
}),
|
|
314
|
-
|
|
315
|
+
ot
|
|
315
316
|
]
|
|
316
317
|
})
|
|
317
|
-
}),
|
|
318
|
+
}), lt = Ie([...A, ...Le].flatMap((e) => Array.isArray(e.images) ? e.images : []).filter((e) => typeof e == "string" && e.trim().length > 0).map((e) => e.trim()).slice(0, 12)), ut = q ? /* @__PURE__ */ p("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, $ = (e) => /* @__PURE__ */ p("div", {
|
|
318
319
|
className: h("relative h-full min-h-[340px] overflow-hidden", e),
|
|
319
320
|
style: {
|
|
320
321
|
WebkitMaskImage: "linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%)",
|
|
@@ -327,7 +328,7 @@ function D() {
|
|
|
327
328
|
"aria-hidden": "true",
|
|
328
329
|
children: /* @__PURE__ */ p("div", {
|
|
329
330
|
className: "absolute inset-0 grid grid-cols-2 gap-3 md:grid-cols-3 lg:grid-cols-6",
|
|
330
|
-
children:
|
|
331
|
+
children: lt.map((e, t) => {
|
|
331
332
|
let n = C[t % C.length] ?? 32, r = [...e, ...e];
|
|
332
333
|
return /* @__PURE__ */ p("div", {
|
|
333
334
|
className: h("relative min-h-0 overflow-hidden", t === 2 && "hidden md:block", t >= 3 && "hidden lg:block"),
|
|
@@ -355,7 +356,7 @@ function D() {
|
|
|
355
356
|
}, `hero-marquee-column-${t}`);
|
|
356
357
|
})
|
|
357
358
|
})
|
|
358
|
-
}),
|
|
359
|
+
}), dt = q ? /* @__PURE__ */ p("div", {
|
|
359
360
|
className: "pointer-events-none absolute inset-0 hidden lg:block",
|
|
360
361
|
"aria-hidden": "true",
|
|
361
362
|
children: /* @__PURE__ */ m("div", {
|
|
@@ -365,7 +366,7 @@ function D() {
|
|
|
365
366
|
children: $()
|
|
366
367
|
})]
|
|
367
368
|
})
|
|
368
|
-
}) : null,
|
|
369
|
+
}) : null, ft = q ? /* @__PURE__ */ m(Ce, { children: [/* @__PURE__ */ p("div", {
|
|
369
370
|
className: "lg:hidden",
|
|
370
371
|
children: $()
|
|
371
372
|
}), /* @__PURE__ */ p("div", {
|
|
@@ -374,7 +375,7 @@ function D() {
|
|
|
374
375
|
})] }) : /* @__PURE__ */ m("div", {
|
|
375
376
|
className: "relative min-h-[340px] overflow-hidden rounded-3xl border border-slate-200 bg-slate-900 shadow-sm lg:min-h-[510px]",
|
|
376
377
|
children: [/* @__PURE__ */ p("img", {
|
|
377
|
-
src:
|
|
378
|
+
src: me,
|
|
378
379
|
alt: "Bikes ready for reservation",
|
|
379
380
|
className: "absolute inset-0 h-full w-full object-cover"
|
|
380
381
|
}), /* @__PURE__ */ p("div", {
|
|
@@ -382,7 +383,7 @@ function D() {
|
|
|
382
383
|
"aria-hidden": "true"
|
|
383
384
|
})]
|
|
384
385
|
});
|
|
385
|
-
return /* @__PURE__ */ m(
|
|
386
|
+
return /* @__PURE__ */ m(Ce, { children: [
|
|
386
387
|
/* @__PURE__ */ m("section", {
|
|
387
388
|
className: "relative overflow-hidden border-b border-slate-200",
|
|
388
389
|
children: [
|
|
@@ -395,34 +396,34 @@ function D() {
|
|
|
395
396
|
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%)" },
|
|
396
397
|
"aria-hidden": "true"
|
|
397
398
|
}),
|
|
399
|
+
ut,
|
|
398
400
|
dt,
|
|
399
|
-
ft,
|
|
400
401
|
J ? /* @__PURE__ */ m("div", {
|
|
401
402
|
className: "relative mx-auto grid max-w-7xl gap-8 px-4 py-10 sm:px-6 lg:grid-cols-12 lg:py-14",
|
|
402
403
|
children: [/* @__PURE__ */ m("div", {
|
|
403
404
|
className: "lg:col-span-5",
|
|
404
|
-
children: [
|
|
405
|
+
children: [nt, Xe ? /* @__PURE__ */ p("div", {
|
|
405
406
|
className: "mt-7",
|
|
406
407
|
children: /* @__PURE__ */ p("div", {
|
|
407
408
|
className: "relative z-20 w-[calc(100%+24rem)] max-w-none",
|
|
408
|
-
children:
|
|
409
|
+
children: ct
|
|
409
410
|
})
|
|
410
411
|
}) : null]
|
|
411
412
|
}), /* @__PURE__ */ m("div", {
|
|
412
413
|
className: h("lg:col-span-7", !q && "lg:pt-4"),
|
|
413
|
-
children: [
|
|
414
|
+
children: [ft, Xe ? null : /* @__PURE__ */ p("div", {
|
|
414
415
|
className: "mt-4",
|
|
415
|
-
children:
|
|
416
|
+
children: ct
|
|
416
417
|
})]
|
|
417
418
|
})]
|
|
418
419
|
}) : /* @__PURE__ */ m("div", {
|
|
419
420
|
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",
|
|
420
421
|
children: [/* @__PURE__ */ p("div", {
|
|
421
422
|
className: "lg:col-span-5",
|
|
422
|
-
children:
|
|
423
|
+
children: nt
|
|
423
424
|
}), /* @__PURE__ */ p("div", {
|
|
424
425
|
className: "lg:col-span-7",
|
|
425
|
-
children:
|
|
426
|
+
children: st
|
|
426
427
|
})]
|
|
427
428
|
})
|
|
428
429
|
]
|
|
@@ -443,7 +444,7 @@ function D() {
|
|
|
443
444
|
})]
|
|
444
445
|
}), /* @__PURE__ */ m(g, {
|
|
445
446
|
className: "hidden items-center gap-2 text-sm font-medium text-slate-700 hover:text-slate-950 sm:inline-flex",
|
|
446
|
-
to: `/${S ?? ""}/booking${
|
|
447
|
+
to: `/${S ?? ""}/booking${et}`,
|
|
447
448
|
children: [/* @__PURE__ */ p("span", { children: v("featured_view_all") }), /* @__PURE__ */ p(_, {
|
|
448
449
|
className: "h-4 w-4",
|
|
449
450
|
"aria-hidden": "true"
|
|
@@ -451,18 +452,18 @@ function D() {
|
|
|
451
452
|
})]
|
|
452
453
|
}), /* @__PURE__ */ p("div", {
|
|
453
454
|
className: "mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
454
|
-
children:
|
|
455
|
-
let t = e.id, n = e.slug, r =
|
|
455
|
+
children: Je.map((e) => {
|
|
456
|
+
let t = e.id, n = e.slug, r = o(e.name, x.language, k), i = o(e.description, x.language, k), a = typeof e.images?.[0] == "string" ? e.images[0].trim() : "", c = he(e.primaryImageStyle), l = ee(e.availabilityStatus), u = Z(n);
|
|
456
457
|
return /* @__PURE__ */ m("div", {
|
|
457
458
|
className: "group flex h-full flex-col gap-2 rounded-xl border border-slate-200 bg-white p-3 text-left shadow-sm transition hover:border-slate-400",
|
|
458
459
|
children: [
|
|
459
460
|
/* @__PURE__ */ p(g, {
|
|
460
461
|
to: u,
|
|
461
|
-
state:
|
|
462
|
+
state: Q,
|
|
462
463
|
className: "block",
|
|
463
464
|
children: /* @__PURE__ */ p("span", {
|
|
464
|
-
className: h("relative block aspect-[1618/1000] overflow-hidden rounded-xl",
|
|
465
|
-
style:
|
|
465
|
+
className: h("relative block aspect-[1618/1000] overflow-hidden rounded-xl", c.className),
|
|
466
|
+
style: c.style,
|
|
466
467
|
children: a ? /* @__PURE__ */ p("img", {
|
|
467
468
|
src: a,
|
|
468
469
|
alt: r,
|
|
@@ -470,7 +471,7 @@ function D() {
|
|
|
470
471
|
loading: "lazy"
|
|
471
472
|
}) : /* @__PURE__ */ p("span", {
|
|
472
473
|
className: "absolute inset-0 flex items-center justify-center text-slate-400",
|
|
473
|
-
children: /* @__PURE__ */ p(
|
|
474
|
+
children: /* @__PURE__ */ p(Ae, {
|
|
474
475
|
className: "h-8 w-8",
|
|
475
476
|
"aria-hidden": "true"
|
|
476
477
|
})
|
|
@@ -482,11 +483,11 @@ function D() {
|
|
|
482
483
|
children: [
|
|
483
484
|
/* @__PURE__ */ p(g, {
|
|
484
485
|
to: u,
|
|
485
|
-
state:
|
|
486
|
+
state: Q,
|
|
486
487
|
className: "text-sm font-semibold text-slate-950 hover:text-slate-700",
|
|
487
488
|
children: /* @__PURE__ */ p("span", { children: r })
|
|
488
489
|
}),
|
|
489
|
-
/* @__PURE__ */ p(
|
|
490
|
+
/* @__PURE__ */ p(pe, {
|
|
490
491
|
prices: e.prices,
|
|
491
492
|
className: "self-start"
|
|
492
493
|
}),
|
|
@@ -499,7 +500,7 @@ function D() {
|
|
|
499
500
|
/* @__PURE__ */ m("span", {
|
|
500
501
|
className: "flex flex-wrap items-center gap-x-2 gap-y-1",
|
|
501
502
|
children: [
|
|
502
|
-
/* @__PURE__ */ p(
|
|
503
|
+
/* @__PURE__ */ p(s, {
|
|
503
504
|
variant: l.variant,
|
|
504
505
|
children: /* @__PURE__ */ p("span", { children: v(l.labelKey) })
|
|
505
506
|
}),
|
|
@@ -509,7 +510,7 @@ function D() {
|
|
|
509
510
|
}),
|
|
510
511
|
/* @__PURE__ */ p(g, {
|
|
511
512
|
to: u,
|
|
512
|
-
state:
|
|
513
|
+
state: Q,
|
|
513
514
|
className: "text-xs font-medium text-slate-700 hover:text-slate-950",
|
|
514
515
|
children: /* @__PURE__ */ p("span", { children: v("product_details_link") })
|
|
515
516
|
})
|
|
@@ -539,11 +540,11 @@ function D() {
|
|
|
539
540
|
})
|
|
540
541
|
}), /* @__PURE__ */ p("div", {
|
|
541
542
|
className: "mt-6 grid gap-4 md:grid-cols-2",
|
|
542
|
-
children:
|
|
543
|
+
children: A.map((e) => /* @__PURE__ */ p(ge, {
|
|
543
544
|
bike: e,
|
|
544
|
-
detailsPath:
|
|
545
|
-
productDetailsLinkState:
|
|
546
|
-
fallbackLanguage:
|
|
545
|
+
detailsPath: Z(e.slug),
|
|
546
|
+
productDetailsLinkState: Q,
|
|
547
|
+
fallbackLanguage: k,
|
|
547
548
|
onAction: X
|
|
548
549
|
}, e.id))
|
|
549
550
|
})]
|
|
@@ -565,8 +566,8 @@ function D() {
|
|
|
565
566
|
})
|
|
566
567
|
}), /* @__PURE__ */ p("div", {
|
|
567
568
|
className: "mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
568
|
-
children:
|
|
569
|
-
let t =
|
|
569
|
+
children: Le.slice(0, 4).map((e) => {
|
|
570
|
+
let t = o(e.name, x.language, k), n = o(e.description, x.language, k), r = o(e.warning, x.language, k), i = typeof e.images?.[0] == "string" ? e.images[0].trim() : "", a = he(e.primaryImageStyle);
|
|
570
571
|
return /* @__PURE__ */ m("div", {
|
|
571
572
|
className: "flex h-full flex-col gap-2 rounded-xl border border-slate-200 bg-white p-3 shadow-sm",
|
|
572
573
|
children: [
|
|
@@ -580,7 +581,7 @@ function D() {
|
|
|
580
581
|
loading: "lazy"
|
|
581
582
|
}) : /* @__PURE__ */ p("div", {
|
|
582
583
|
className: "absolute inset-0 flex items-center justify-center text-slate-400",
|
|
583
|
-
children: /* @__PURE__ */ p(
|
|
584
|
+
children: /* @__PURE__ */ p(Ae, {
|
|
584
585
|
className: "h-8 w-8",
|
|
585
586
|
"aria-hidden": "true"
|
|
586
587
|
})
|
|
@@ -597,7 +598,7 @@ function D() {
|
|
|
597
598
|
className: "line-clamp-2 text-xs text-slate-600",
|
|
598
599
|
children: /* @__PURE__ */ p("span", { children: n })
|
|
599
600
|
}),
|
|
600
|
-
/* @__PURE__ */ p(
|
|
601
|
+
/* @__PURE__ */ p(fe, {
|
|
601
602
|
warning: r,
|
|
602
603
|
className: "mt-1"
|
|
603
604
|
})
|
|
@@ -605,19 +606,16 @@ function D() {
|
|
|
605
606
|
}),
|
|
606
607
|
/* @__PURE__ */ p("div", {
|
|
607
608
|
className: "flex items-center justify-between gap-2",
|
|
608
|
-
children: /* @__PURE__ */ p(
|
|
609
|
+
children: /* @__PURE__ */ p(pe, { prices: e.prices })
|
|
609
610
|
})
|
|
610
611
|
]
|
|
611
612
|
}, e.id);
|
|
612
613
|
})
|
|
613
614
|
})]
|
|
614
615
|
}),
|
|
615
|
-
/* @__PURE__ */ p(de, { preset: M }),
|
|
616
616
|
/* @__PURE__ */ p(ue, {}),
|
|
617
|
-
/* @__PURE__ */ p(le, {
|
|
618
|
-
|
|
619
|
-
storeSlug: S ?? ""
|
|
620
|
-
})
|
|
617
|
+
/* @__PURE__ */ p(le, {}),
|
|
618
|
+
/* @__PURE__ */ p(ce, { storeSlug: S ?? "" })
|
|
621
619
|
] });
|
|
622
620
|
}
|
|
623
621
|
//#endregion
|