@planetaexo/design-system 0.37.3 → 0.37.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1599 -363
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +111 -19
- package/dist/index.d.ts +111 -19
- package/dist/index.js +1583 -347
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React28 = require('react');
|
|
4
4
|
var classVarianceAuthority = require('class-variance-authority');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
@@ -37,7 +37,7 @@ function _interopNamespace(e) {
|
|
|
37
37
|
return Object.freeze(n);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
var
|
|
40
|
+
var React28__namespace = /*#__PURE__*/_interopNamespace(React28);
|
|
41
41
|
|
|
42
42
|
var __defProp = Object.defineProperty;
|
|
43
43
|
var __defProps = Object.defineProperties;
|
|
@@ -102,7 +102,7 @@ var buttonVariants = classVarianceAuthority.cva(
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
);
|
|
105
|
-
var Button =
|
|
105
|
+
var Button = React28__namespace.forwardRef(
|
|
106
106
|
(_a, ref) => {
|
|
107
107
|
var _b = _a, { className, variant, size } = _b, props = __objRest(_b, ["className", "variant", "size"]);
|
|
108
108
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -186,6 +186,10 @@ function Dialog(_a) {
|
|
|
186
186
|
var props = __objRest(_a, []);
|
|
187
187
|
return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Root, __spreadValues({ "data-slot": "dialog" }, props));
|
|
188
188
|
}
|
|
189
|
+
function DialogTrigger(_a) {
|
|
190
|
+
var props = __objRest(_a, []);
|
|
191
|
+
return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Trigger, __spreadValues({ "data-slot": "dialog-trigger" }, props));
|
|
192
|
+
}
|
|
189
193
|
function DialogPortal(_a) {
|
|
190
194
|
var props = __objRest(_a, []);
|
|
191
195
|
return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Portal, __spreadValues({ "data-slot": "dialog-portal" }, props));
|
|
@@ -323,10 +327,10 @@ function DialogDescription(_a) {
|
|
|
323
327
|
}, props)
|
|
324
328
|
);
|
|
325
329
|
}
|
|
326
|
-
var FloatingInput =
|
|
330
|
+
var FloatingInput = React28__namespace.forwardRef(
|
|
327
331
|
(_a, ref) => {
|
|
328
332
|
var _b = _a, { label, error, id, className, required } = _b, props = __objRest(_b, ["label", "error", "id", "className", "required"]);
|
|
329
|
-
const inputId = id != null ? id :
|
|
333
|
+
const inputId = id != null ? id : React28__namespace.useId();
|
|
330
334
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative", className), children: [
|
|
331
335
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
332
336
|
"input",
|
|
@@ -366,10 +370,10 @@ var FloatingInput = React8__namespace.forwardRef(
|
|
|
366
370
|
}
|
|
367
371
|
);
|
|
368
372
|
FloatingInput.displayName = "FloatingInput";
|
|
369
|
-
var FloatingSelect =
|
|
373
|
+
var FloatingSelect = React28__namespace.forwardRef(
|
|
370
374
|
(_a, ref) => {
|
|
371
375
|
var _b = _a, { label, error, id, className, required, children, value } = _b, props = __objRest(_b, ["label", "error", "id", "className", "required", "children", "value"]);
|
|
372
|
-
const inputId = id != null ? id :
|
|
376
|
+
const inputId = id != null ? id : React28__namespace.useId();
|
|
373
377
|
const hasValue = typeof value === "string" ? value !== "" : value !== void 0 && value !== null;
|
|
374
378
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative", className), children: [
|
|
375
379
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -633,11 +637,11 @@ function PhoneCountrySelect({
|
|
|
633
637
|
disabled
|
|
634
638
|
}) {
|
|
635
639
|
var _a;
|
|
636
|
-
const [open, setOpen] =
|
|
637
|
-
const containerRef =
|
|
638
|
-
const listRef =
|
|
640
|
+
const [open, setOpen] = React28__namespace.useState(false);
|
|
641
|
+
const containerRef = React28__namespace.useRef(null);
|
|
642
|
+
const listRef = React28__namespace.useRef(null);
|
|
639
643
|
const selected = (_a = PHONE_COUNTRIES.find((c) => c.code === value)) != null ? _a : PHONE_COUNTRIES[0];
|
|
640
|
-
|
|
644
|
+
React28__namespace.useEffect(() => {
|
|
641
645
|
if (!open) return;
|
|
642
646
|
const handler = (e) => {
|
|
643
647
|
var _a2;
|
|
@@ -648,7 +652,7 @@ function PhoneCountrySelect({
|
|
|
648
652
|
document.addEventListener("mousedown", handler);
|
|
649
653
|
return () => document.removeEventListener("mousedown", handler);
|
|
650
654
|
}, [open]);
|
|
651
|
-
|
|
655
|
+
React28__namespace.useEffect(() => {
|
|
652
656
|
if (!open || !listRef.current) return;
|
|
653
657
|
const activeEl = listRef.current.querySelector("[data-selected=true]");
|
|
654
658
|
activeEl == null ? void 0 : activeEl.scrollIntoView({ block: "nearest" });
|
|
@@ -918,8 +922,8 @@ function CalendarDayButton(_a) {
|
|
|
918
922
|
"locale"
|
|
919
923
|
]);
|
|
920
924
|
const defaultClassNames = reactDayPicker.getDefaultClassNames();
|
|
921
|
-
const ref =
|
|
922
|
-
|
|
925
|
+
const ref = React28__namespace.useRef(null);
|
|
926
|
+
React28__namespace.useEffect(() => {
|
|
923
927
|
var _a2;
|
|
924
928
|
if (modifiers.focused) (_a2 = ref.current) == null ? void 0 : _a2.focus();
|
|
925
929
|
}, [modifiers.focused]);
|
|
@@ -950,16 +954,16 @@ function BirthDateField({
|
|
|
950
954
|
className,
|
|
951
955
|
disabled
|
|
952
956
|
}) {
|
|
953
|
-
const [open, setOpen] =
|
|
954
|
-
const [text, setText] =
|
|
957
|
+
const [open, setOpen] = React28__namespace.useState(false);
|
|
958
|
+
const [text, setText] = React28__namespace.useState(
|
|
955
959
|
value ? dateFns.format(value, "dd/MM/yyyy") : ""
|
|
956
960
|
);
|
|
957
|
-
const containerRef =
|
|
958
|
-
const inputId =
|
|
959
|
-
|
|
961
|
+
const containerRef = React28__namespace.useRef(null);
|
|
962
|
+
const inputId = React28__namespace.useId();
|
|
963
|
+
React28__namespace.useEffect(() => {
|
|
960
964
|
setText(value ? dateFns.format(value, "dd/MM/yyyy") : "");
|
|
961
965
|
}, [value]);
|
|
962
|
-
|
|
966
|
+
React28__namespace.useEffect(() => {
|
|
963
967
|
if (!open) return;
|
|
964
968
|
const handler = (e) => {
|
|
965
969
|
var _a;
|
|
@@ -1168,14 +1172,14 @@ function CountrySearchField({
|
|
|
1168
1172
|
}) {
|
|
1169
1173
|
var _a;
|
|
1170
1174
|
const list = countries != null ? countries : COUNTRIES;
|
|
1171
|
-
const [query, setQuery] =
|
|
1172
|
-
const [open, setOpen] =
|
|
1173
|
-
const containerRef =
|
|
1174
|
-
const searchRef =
|
|
1175
|
+
const [query, setQuery] = React28__namespace.useState("");
|
|
1176
|
+
const [open, setOpen] = React28__namespace.useState(false);
|
|
1177
|
+
const containerRef = React28__namespace.useRef(null);
|
|
1178
|
+
const searchRef = React28__namespace.useRef(null);
|
|
1175
1179
|
const selected = list.find((c) => c.code === value);
|
|
1176
1180
|
const isFloated = open || !!selected;
|
|
1177
1181
|
const filtered = query.trim() ? list.filter((c) => c.name.toLowerCase().includes(query.toLowerCase())) : list;
|
|
1178
|
-
|
|
1182
|
+
React28__namespace.useEffect(() => {
|
|
1179
1183
|
if (!open) return;
|
|
1180
1184
|
const handler = (e) => {
|
|
1181
1185
|
var _a2;
|
|
@@ -1289,7 +1293,7 @@ function AdventureCard({
|
|
|
1289
1293
|
}) {
|
|
1290
1294
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
1291
1295
|
const isControlled = (_b = (_a = adventure.optionals) == null ? void 0 : _a.some((o) => o.onCheckedChange !== void 0)) != null ? _b : false;
|
|
1292
|
-
const [checkedInternal, setCheckedInternal] =
|
|
1296
|
+
const [checkedInternal, setCheckedInternal] = React28__namespace.useState(
|
|
1293
1297
|
new Set((_d = (_c = adventure.optionals) == null ? void 0 : _c.filter((o) => o.defaultChecked).map((o) => o.id)) != null ? _d : [])
|
|
1294
1298
|
);
|
|
1295
1299
|
const isChecked = (opt) => {
|
|
@@ -1687,7 +1691,7 @@ function BookingShell({
|
|
|
1687
1691
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-border bg-card overflow-hidden", children: [
|
|
1688
1692
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-border px-5 py-4 bg-muted/20", children: [
|
|
1689
1693
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-bold text-foreground font-heading mb-2", children: title }),
|
|
1690
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: steps.map((label, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1694
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: steps.map((label, i) => /* @__PURE__ */ jsxRuntime.jsxs(React28__namespace.Fragment, { children: [
|
|
1691
1695
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1692
1696
|
"span",
|
|
1693
1697
|
{
|
|
@@ -1886,7 +1890,7 @@ function TermsSection({
|
|
|
1886
1890
|
termsContent
|
|
1887
1891
|
}) {
|
|
1888
1892
|
var _a;
|
|
1889
|
-
const [modalOpen, setModalOpen] =
|
|
1893
|
+
const [modalOpen, setModalOpen] = React28__namespace.useState(false);
|
|
1890
1894
|
const i18n = (_a = TERMS_I18N[locale]) != null ? _a : TERMS_I18N.en;
|
|
1891
1895
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-border p-4 flex flex-col gap-3", children: [
|
|
1892
1896
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: title }),
|
|
@@ -2024,9 +2028,9 @@ function BookingWizard({
|
|
|
2024
2028
|
}) {
|
|
2025
2029
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T;
|
|
2026
2030
|
const wizardSteps = WIZARD_STEPS_FN(labels);
|
|
2027
|
-
const [step, setStep] =
|
|
2028
|
-
const [error, setError] =
|
|
2029
|
-
const [responsible, setResponsible] =
|
|
2031
|
+
const [step, setStep] = React28__namespace.useState("responsible");
|
|
2032
|
+
const [error, setError] = React28__namespace.useState(null);
|
|
2033
|
+
const [responsible, setResponsible] = React28__namespace.useState({
|
|
2030
2034
|
firstName: "",
|
|
2031
2035
|
lastName: "",
|
|
2032
2036
|
email: "",
|
|
@@ -2045,7 +2049,7 @@ function BookingWizard({
|
|
|
2045
2049
|
return s + ((_b2 = (_a2 = a.slots) == null ? void 0 : _a2.children) != null ? _b2 : 0);
|
|
2046
2050
|
}, 0);
|
|
2047
2051
|
const totalPax = totalAdults + totalChildren;
|
|
2048
|
-
const [travellers, setTravellers] =
|
|
2052
|
+
const [travellers, setTravellers] = React28__namespace.useState(
|
|
2049
2053
|
Array.from({ length: Math.max(totalPax, 1) }, () => ({
|
|
2050
2054
|
firstName: "",
|
|
2051
2055
|
lastName: "",
|
|
@@ -2053,9 +2057,9 @@ function BookingWizard({
|
|
|
2053
2057
|
email: ""
|
|
2054
2058
|
}))
|
|
2055
2059
|
);
|
|
2056
|
-
const [payAmount, setPayAmount] =
|
|
2057
|
-
const [payMethod, setPayMethod] =
|
|
2058
|
-
const [termsAccepted, setTermsAccepted] =
|
|
2060
|
+
const [payAmount, setPayAmount] = React28__namespace.useState("full");
|
|
2061
|
+
const [payMethod, setPayMethod] = React28__namespace.useState("stripe");
|
|
2062
|
+
const [termsAccepted, setTermsAccepted] = React28__namespace.useState(false);
|
|
2059
2063
|
const setR = (k, v) => setResponsible((p) => __spreadProps(__spreadValues({}, p), { [k]: v }));
|
|
2060
2064
|
const setT = (i, k, v) => setTravellers((prev) => prev.map((t, idx) => idx === i ? __spreadProps(__spreadValues({}, t), { [k]: v }) : t));
|
|
2061
2065
|
const setTDob = (i, v) => setTravellers((prev) => prev.map((t, idx) => idx === i ? __spreadProps(__spreadValues({}, t), { dateOfBirth: v }) : t));
|
|
@@ -2283,7 +2287,7 @@ function Offer({
|
|
|
2283
2287
|
className
|
|
2284
2288
|
}) {
|
|
2285
2289
|
var _a, _b, _c;
|
|
2286
|
-
const [showBooking, setShowBooking] =
|
|
2290
|
+
const [showBooking, setShowBooking] = React28__namespace.useState(false);
|
|
2287
2291
|
const isShowingCheckout = !confirmedState && (!!checkoutSlot || internalDemoCheckout && showBooking);
|
|
2288
2292
|
const handleBook = () => {
|
|
2289
2293
|
if (!checkoutSlot && !externalBookingFlow && internalDemoCheckout) {
|
|
@@ -2650,7 +2654,7 @@ function AdventureSection({
|
|
|
2650
2654
|
labels
|
|
2651
2655
|
}) {
|
|
2652
2656
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
|
|
2653
|
-
const [detailsOpen, setDetailsOpen] =
|
|
2657
|
+
const [detailsOpen, setDetailsOpen] = React28__namespace.useState(false);
|
|
2654
2658
|
const handleCopyUrl = (url) => {
|
|
2655
2659
|
if (onCopyFormLink) {
|
|
2656
2660
|
onCopyFormLink(url);
|
|
@@ -3162,8 +3166,8 @@ function AddTravellerDialog({
|
|
|
3162
3166
|
errorMessage
|
|
3163
3167
|
}) {
|
|
3164
3168
|
var _a, _b, _c, _d, _e;
|
|
3165
|
-
const [form, setForm] =
|
|
3166
|
-
|
|
3169
|
+
const [form, setForm] = React28__namespace.useState(() => createInitialAddFormData(config));
|
|
3170
|
+
React28__namespace.useEffect(() => {
|
|
3167
3171
|
if (open) {
|
|
3168
3172
|
setForm(createInitialAddFormData(config));
|
|
3169
3173
|
}
|
|
@@ -3223,7 +3227,7 @@ function EditTravellerDialog({
|
|
|
3223
3227
|
errorMessage
|
|
3224
3228
|
}) {
|
|
3225
3229
|
var _a, _b, _c, _d, _e;
|
|
3226
|
-
const [form, setForm] =
|
|
3230
|
+
const [form, setForm] = React28__namespace.useState(() => ({
|
|
3227
3231
|
firstName: "",
|
|
3228
3232
|
lastName: "",
|
|
3229
3233
|
email: "",
|
|
@@ -3232,7 +3236,7 @@ function EditTravellerDialog({
|
|
|
3232
3236
|
birthDate: "",
|
|
3233
3237
|
personType: "ADULT"
|
|
3234
3238
|
}));
|
|
3235
|
-
|
|
3239
|
+
React28__namespace.useEffect(() => {
|
|
3236
3240
|
var _a2, _b2, _c2, _d2, _e2, _f;
|
|
3237
3241
|
if (open && traveller) {
|
|
3238
3242
|
setForm({
|
|
@@ -3567,48 +3571,48 @@ function BookingDetails({
|
|
|
3567
3571
|
const hasSubmitAddTraveller = !!onSubmitAddTraveller;
|
|
3568
3572
|
const hasSubmitEditTraveller = !!onSubmitEditTraveller;
|
|
3569
3573
|
const hasConfirmRemoveTraveller = !!onConfirmRemoveTraveller;
|
|
3570
|
-
const [addModalState, setAddModalState] =
|
|
3574
|
+
const [addModalState, setAddModalState] = React28__namespace.useState({
|
|
3571
3575
|
open: false,
|
|
3572
3576
|
adventureId: null
|
|
3573
3577
|
});
|
|
3574
|
-
const [editModalState, setEditModalState] =
|
|
3575
|
-
const [deleteModalState, setDeleteModalState] =
|
|
3576
|
-
const [resendInviteDialogState, setResendInviteDialogState] =
|
|
3577
|
-
const handleRequestOpenAddModal =
|
|
3578
|
+
const [editModalState, setEditModalState] = React28__namespace.useState({ open: false, adventureId: null, traveller: null });
|
|
3579
|
+
const [deleteModalState, setDeleteModalState] = React28__namespace.useState({ open: false, adventureId: null, traveller: null });
|
|
3580
|
+
const [resendInviteDialogState, setResendInviteDialogState] = React28__namespace.useState({ open: false, traveller: null });
|
|
3581
|
+
const handleRequestOpenAddModal = React28__namespace.useCallback((adventureId) => {
|
|
3578
3582
|
setAddModalState({ open: true, adventureId });
|
|
3579
3583
|
}, []);
|
|
3580
|
-
const handleRequestOpenEditModal =
|
|
3584
|
+
const handleRequestOpenEditModal = React28__namespace.useCallback(
|
|
3581
3585
|
(adventureId, traveller) => {
|
|
3582
3586
|
setEditModalState({ open: true, adventureId, traveller });
|
|
3583
3587
|
},
|
|
3584
3588
|
[]
|
|
3585
3589
|
);
|
|
3586
|
-
const handleRequestOpenDeleteModal =
|
|
3590
|
+
const handleRequestOpenDeleteModal = React28__namespace.useCallback(
|
|
3587
3591
|
(adventureId, traveller) => {
|
|
3588
3592
|
setDeleteModalState({ open: true, adventureId, traveller });
|
|
3589
3593
|
},
|
|
3590
3594
|
[]
|
|
3591
3595
|
);
|
|
3592
|
-
const handleRequestOpenResendInviteDialog =
|
|
3596
|
+
const handleRequestOpenResendInviteDialog = React28__namespace.useCallback(
|
|
3593
3597
|
(traveller) => {
|
|
3594
3598
|
setResendInviteDialogState({ open: true, traveller });
|
|
3595
3599
|
},
|
|
3596
3600
|
[]
|
|
3597
3601
|
);
|
|
3598
|
-
const closeAddModal =
|
|
3602
|
+
const closeAddModal = React28__namespace.useCallback(() => {
|
|
3599
3603
|
setAddModalState({ open: false, adventureId: null });
|
|
3600
3604
|
}, []);
|
|
3601
|
-
const closeEditModal =
|
|
3605
|
+
const closeEditModal = React28__namespace.useCallback(() => {
|
|
3602
3606
|
setEditModalState({ open: false, adventureId: null, traveller: null });
|
|
3603
3607
|
}, []);
|
|
3604
|
-
const closeDeleteModal =
|
|
3608
|
+
const closeDeleteModal = React28__namespace.useCallback(() => {
|
|
3605
3609
|
setDeleteModalState({ open: false, adventureId: null, traveller: null });
|
|
3606
3610
|
}, []);
|
|
3607
|
-
const closeResendInviteDialog =
|
|
3611
|
+
const closeResendInviteDialog = React28__namespace.useCallback(() => {
|
|
3608
3612
|
setResendInviteDialogState({ open: false, traveller: null });
|
|
3609
3613
|
}, []);
|
|
3610
|
-
const submitInFlightRef =
|
|
3611
|
-
const handleAddSubmit =
|
|
3614
|
+
const submitInFlightRef = React28__namespace.useRef(false);
|
|
3615
|
+
const handleAddSubmit = React28__namespace.useCallback(
|
|
3612
3616
|
async (adventureId, data) => {
|
|
3613
3617
|
if (!onSubmitAddTraveller) return;
|
|
3614
3618
|
if (submitInFlightRef.current) return;
|
|
@@ -3623,7 +3627,7 @@ function BookingDetails({
|
|
|
3623
3627
|
},
|
|
3624
3628
|
[onSubmitAddTraveller, closeAddModal]
|
|
3625
3629
|
);
|
|
3626
|
-
const handleEditSubmit =
|
|
3630
|
+
const handleEditSubmit = React28__namespace.useCallback(
|
|
3627
3631
|
async (adventureId, travellerId, data) => {
|
|
3628
3632
|
if (!onSubmitEditTraveller) return;
|
|
3629
3633
|
if (submitInFlightRef.current) return;
|
|
@@ -3638,7 +3642,7 @@ function BookingDetails({
|
|
|
3638
3642
|
},
|
|
3639
3643
|
[onSubmitEditTraveller, closeEditModal]
|
|
3640
3644
|
);
|
|
3641
|
-
const handleDeleteConfirm =
|
|
3645
|
+
const handleDeleteConfirm = React28__namespace.useCallback(
|
|
3642
3646
|
async (adventureId, travellerId) => {
|
|
3643
3647
|
if (!onConfirmRemoveTraveller) return;
|
|
3644
3648
|
if (submitInFlightRef.current) return;
|
|
@@ -3979,6 +3983,12 @@ ${content}
|
|
|
3979
3983
|
</body>
|
|
3980
3984
|
</html>`;
|
|
3981
3985
|
}
|
|
3986
|
+
function constrainItineraryImages(html) {
|
|
3987
|
+
return html.replace(/<img\b[^>]*>/gi, (tag) => {
|
|
3988
|
+
const withoutStyle = tag.replace(/\sstyle\s*=\s*("[^"]*"|'[^']*')/gi, "");
|
|
3989
|
+
return withoutStyle.replace(/<img\b/i, '<img style="max-width:100%;height:auto"');
|
|
3990
|
+
});
|
|
3991
|
+
}
|
|
3982
3992
|
var DEFAULT_LABELS = {
|
|
3983
3993
|
travellersHeading: "TRAVELLERS",
|
|
3984
3994
|
detailsHeading: "DETAILS",
|
|
@@ -4365,7 +4375,7 @@ function BookingAdventureCard({
|
|
|
4365
4375
|
lineHeight: "1.4",
|
|
4366
4376
|
margin: 0
|
|
4367
4377
|
},
|
|
4368
|
-
dangerouslySetInnerHTML: { __html: description }
|
|
4378
|
+
dangerouslySetInnerHTML: { __html: constrainItineraryImages(description) }
|
|
4369
4379
|
}
|
|
4370
4380
|
) : itinerary.map((line, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4371
4381
|
"p",
|
|
@@ -5112,7 +5122,7 @@ function BookingCreatedEmail({
|
|
|
5112
5122
|
}, children: i + 1 }) }),
|
|
5113
5123
|
/* @__PURE__ */ jsxRuntime.jsx("td", { style: { verticalAlign: "top" }, children: /* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontSize: "14px", color: emailTokens.bodyText, lineHeight: "1.6", margin: 0 }, children: step }) })
|
|
5114
5124
|
] }) }) }, i)) }),
|
|
5115
|
-
nextStepsImportant && nextStepsImportant.trim().length > 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "32px", fontSize: "14px", color: emailTokens.foreground, lineHeight: "1.6" }, children: nextStepsImportant.split("\n").map((line, idx, arr) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5125
|
+
nextStepsImportant && nextStepsImportant.trim().length > 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "32px", fontSize: "14px", color: emailTokens.foreground, lineHeight: "1.6" }, children: nextStepsImportant.split("\n").map((line, idx, arr) => /* @__PURE__ */ jsxRuntime.jsxs(React28__namespace.Fragment, { children: [
|
|
5116
5126
|
idx === 0 ? /* @__PURE__ */ jsxRuntime.jsx("strong", { children: line }) : line,
|
|
5117
5127
|
idx < arr.length - 1 ? /* @__PURE__ */ jsxRuntime.jsx("br", {}) : null
|
|
5118
5128
|
] }, idx)) })
|
|
@@ -6481,11 +6491,11 @@ function DatePickerField({
|
|
|
6481
6491
|
fromDate,
|
|
6482
6492
|
className
|
|
6483
6493
|
}) {
|
|
6484
|
-
const [open, setOpen] =
|
|
6485
|
-
const containerRef =
|
|
6486
|
-
const [calendarWidth, setCalendarWidth] =
|
|
6494
|
+
const [open, setOpen] = React28__namespace.useState(false);
|
|
6495
|
+
const containerRef = React28__namespace.useRef(null);
|
|
6496
|
+
const [calendarWidth, setCalendarWidth] = React28__namespace.useState();
|
|
6487
6497
|
const hasValue = !!value;
|
|
6488
|
-
|
|
6498
|
+
React28__namespace.useEffect(() => {
|
|
6489
6499
|
if (!containerRef.current) return;
|
|
6490
6500
|
const observer = new ResizeObserver(([entry]) => {
|
|
6491
6501
|
setCalendarWidth(entry.contentRect.width);
|
|
@@ -6594,7 +6604,7 @@ function BookingForm({
|
|
|
6594
6604
|
subtitle = "Free enquiry \u2013 no commitment",
|
|
6595
6605
|
className
|
|
6596
6606
|
}) {
|
|
6597
|
-
const [values, setValues] =
|
|
6607
|
+
const [values, setValues] = React28__namespace.useState(__spreadValues(__spreadValues({}, defaultInitial), defaultValues));
|
|
6598
6608
|
const set = (key, value) => setValues((prev) => __spreadProps(__spreadValues({}, prev), { [key]: value }));
|
|
6599
6609
|
const handleSubmit = (e) => {
|
|
6600
6610
|
e.preventDefault();
|
|
@@ -7131,11 +7141,11 @@ function FloatingTextarea({
|
|
|
7131
7141
|
}
|
|
7132
7142
|
function SelectField({ field, value, onChange, error, disabled }) {
|
|
7133
7143
|
var _a, _b, _c;
|
|
7134
|
-
const [open, setOpen] =
|
|
7135
|
-
const containerRef =
|
|
7144
|
+
const [open, setOpen] = React28__namespace.useState(false);
|
|
7145
|
+
const containerRef = React28__namespace.useRef(null);
|
|
7136
7146
|
const options = (_a = field.options) != null ? _a : [];
|
|
7137
7147
|
const selectedOpt = (_b = options.find((o) => o.value === value)) != null ? _b : null;
|
|
7138
|
-
|
|
7148
|
+
React28__namespace.useEffect(() => {
|
|
7139
7149
|
if (!open) return;
|
|
7140
7150
|
const handleOutside = (e) => {
|
|
7141
7151
|
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
@@ -7524,11 +7534,11 @@ function RegistrationForm({
|
|
|
7524
7534
|
readOnly = false
|
|
7525
7535
|
}) {
|
|
7526
7536
|
var _a;
|
|
7527
|
-
const L =
|
|
7537
|
+
const L = React28__namespace.useMemo(
|
|
7528
7538
|
() => __spreadValues(__spreadValues({}, DEFAULT_LABELS9), labels != null ? labels : {}),
|
|
7529
7539
|
[labels]
|
|
7530
7540
|
);
|
|
7531
|
-
const sortedFields =
|
|
7541
|
+
const sortedFields = React28__namespace.useMemo(
|
|
7532
7542
|
() => [...fields].sort((a, b) => {
|
|
7533
7543
|
var _a2, _b;
|
|
7534
7544
|
return ((_a2 = a.order) != null ? _a2 : 0) - ((_b = b.order) != null ? _b : 0);
|
|
@@ -7536,7 +7546,7 @@ function RegistrationForm({
|
|
|
7536
7546
|
[fields]
|
|
7537
7547
|
);
|
|
7538
7548
|
const isControlled = values !== void 0;
|
|
7539
|
-
const [internal, setInternal] =
|
|
7549
|
+
const [internal, setInternal] = React28__namespace.useState(
|
|
7540
7550
|
() => initializeValues(
|
|
7541
7551
|
sortedFields,
|
|
7542
7552
|
defaultValues != null ? defaultValues : {},
|
|
@@ -7544,9 +7554,9 @@ function RegistrationForm({
|
|
|
7544
7554
|
includeTerms
|
|
7545
7555
|
)
|
|
7546
7556
|
);
|
|
7547
|
-
const [submitAttempted, setSubmitAttempted] =
|
|
7548
|
-
const [validationErrors, setValidationErrors] =
|
|
7549
|
-
|
|
7557
|
+
const [submitAttempted, setSubmitAttempted] = React28__namespace.useState(false);
|
|
7558
|
+
const [validationErrors, setValidationErrors] = React28__namespace.useState({});
|
|
7559
|
+
React28__namespace.useEffect(() => {
|
|
7550
7560
|
if (isControlled) return;
|
|
7551
7561
|
setInternal((prev) => {
|
|
7552
7562
|
const next = initializeValues(
|
|
@@ -7603,7 +7613,7 @@ function RegistrationForm({
|
|
|
7603
7613
|
const termsError = submitAttempted && termsEnabled && !termsAccepted;
|
|
7604
7614
|
const firstErrorFieldId = Object.keys(fieldErrors)[0];
|
|
7605
7615
|
const scrollTargetId = firstErrorFieldId ? `rf-${firstErrorFieldId}` : termsError ? "rf-terms" : null;
|
|
7606
|
-
|
|
7616
|
+
React28__namespace.useEffect(() => {
|
|
7607
7617
|
if (!submitAttempted || !scrollTargetId) return;
|
|
7608
7618
|
const timer = setTimeout(() => {
|
|
7609
7619
|
const elem = document.getElementById(scrollTargetId);
|
|
@@ -8065,10 +8075,10 @@ var OTPCodeInput = ({
|
|
|
8065
8075
|
id,
|
|
8066
8076
|
required
|
|
8067
8077
|
}) => {
|
|
8068
|
-
const baseId = id != null ? id :
|
|
8069
|
-
const inputRef =
|
|
8070
|
-
const [focused, setFocused] =
|
|
8071
|
-
const digits =
|
|
8078
|
+
const baseId = id != null ? id : React28__namespace.useId();
|
|
8079
|
+
const inputRef = React28__namespace.useRef(null);
|
|
8080
|
+
const [focused, setFocused] = React28__namespace.useState(false);
|
|
8081
|
+
const digits = React28__namespace.useMemo(() => {
|
|
8072
8082
|
const arr = value.split("").slice(0, length);
|
|
8073
8083
|
while (arr.length < length) arr.push("");
|
|
8074
8084
|
return arr;
|
|
@@ -8166,7 +8176,7 @@ function Checkbox(_a) {
|
|
|
8166
8176
|
__spreadProps(__spreadValues({
|
|
8167
8177
|
"data-slot": "checkbox",
|
|
8168
8178
|
className: cn(
|
|
8169
|
-
"peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",
|
|
8179
|
+
"peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground data-indeterminate:border-primary data-indeterminate:bg-primary data-indeterminate:text-primary-foreground dark:data-checked:bg-primary",
|
|
8170
8180
|
className
|
|
8171
8181
|
)
|
|
8172
8182
|
}, props), {
|
|
@@ -8175,16 +8185,13 @@ function Checkbox(_a) {
|
|
|
8175
8185
|
{
|
|
8176
8186
|
"data-slot": "checkbox-indicator",
|
|
8177
8187
|
className: "grid place-content-center text-current transition-none [&>svg]:size-3.5",
|
|
8178
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8179
|
-
lucideReact.CheckIcon,
|
|
8180
|
-
{}
|
|
8181
|
-
)
|
|
8188
|
+
children: props.indeterminate ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MinusIcon, {}) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, {})
|
|
8182
8189
|
}
|
|
8183
8190
|
)
|
|
8184
8191
|
})
|
|
8185
8192
|
);
|
|
8186
8193
|
}
|
|
8187
|
-
var AccordionVariantContext =
|
|
8194
|
+
var AccordionVariantContext = React28__namespace.createContext("default");
|
|
8188
8195
|
function Accordion(_a) {
|
|
8189
8196
|
var _b = _a, { className, variant = "default" } = _b, props = __objRest(_b, ["className", "variant"]);
|
|
8190
8197
|
return /* @__PURE__ */ jsxRuntime.jsx(AccordionVariantContext.Provider, { value: variant, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8202,7 +8209,7 @@ function Accordion(_a) {
|
|
|
8202
8209
|
}
|
|
8203
8210
|
function AccordionItem(_a) {
|
|
8204
8211
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8205
|
-
const variant =
|
|
8212
|
+
const variant = React28__namespace.useContext(AccordionVariantContext);
|
|
8206
8213
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8207
8214
|
accordion.Accordion.Item,
|
|
8208
8215
|
__spreadValues({
|
|
@@ -8223,7 +8230,7 @@ function AccordionTrigger(_a) {
|
|
|
8223
8230
|
"className",
|
|
8224
8231
|
"children"
|
|
8225
8232
|
]);
|
|
8226
|
-
const variant =
|
|
8233
|
+
const variant = React28__namespace.useContext(AccordionVariantContext);
|
|
8227
8234
|
return /* @__PURE__ */ jsxRuntime.jsx(accordion.Accordion.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8228
8235
|
accordion.Accordion.Trigger,
|
|
8229
8236
|
__spreadProps(__spreadValues({
|
|
@@ -8277,7 +8284,7 @@ function AccordionContent(_a) {
|
|
|
8277
8284
|
"className",
|
|
8278
8285
|
"children"
|
|
8279
8286
|
]);
|
|
8280
|
-
const variant =
|
|
8287
|
+
const variant = React28__namespace.useContext(AccordionVariantContext);
|
|
8281
8288
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8282
8289
|
accordion.Accordion.Panel,
|
|
8283
8290
|
__spreadProps(__spreadValues({
|
|
@@ -8300,6 +8307,187 @@ function AccordionContent(_a) {
|
|
|
8300
8307
|
})
|
|
8301
8308
|
);
|
|
8302
8309
|
}
|
|
8310
|
+
function getLeafIds(item) {
|
|
8311
|
+
var _a;
|
|
8312
|
+
if (!((_a = item.children) == null ? void 0 : _a.length)) return [item.id];
|
|
8313
|
+
return item.children.flatMap(getLeafIds);
|
|
8314
|
+
}
|
|
8315
|
+
function getDefaultExpandedIds(items) {
|
|
8316
|
+
const out = [];
|
|
8317
|
+
const walk = (list) => {
|
|
8318
|
+
var _a;
|
|
8319
|
+
for (const i of list) {
|
|
8320
|
+
if ((_a = i.children) == null ? void 0 : _a.length) {
|
|
8321
|
+
if (i.defaultExpanded) out.push(i.id);
|
|
8322
|
+
walk(i.children);
|
|
8323
|
+
}
|
|
8324
|
+
}
|
|
8325
|
+
};
|
|
8326
|
+
walk(items);
|
|
8327
|
+
return out;
|
|
8328
|
+
}
|
|
8329
|
+
function getAllItemIds(items) {
|
|
8330
|
+
return items.flatMap(
|
|
8331
|
+
(i) => {
|
|
8332
|
+
var _a;
|
|
8333
|
+
return ((_a = i.children) == null ? void 0 : _a.length) ? [i.id, ...getAllItemIds(i.children)] : [i.id];
|
|
8334
|
+
}
|
|
8335
|
+
);
|
|
8336
|
+
}
|
|
8337
|
+
function findItemById(items, id) {
|
|
8338
|
+
var _a;
|
|
8339
|
+
for (const item of items) {
|
|
8340
|
+
if (item.id === id) return item;
|
|
8341
|
+
if ((_a = item.children) == null ? void 0 : _a.length) {
|
|
8342
|
+
const found = findItemById(item.children, id);
|
|
8343
|
+
if (found) return found;
|
|
8344
|
+
}
|
|
8345
|
+
}
|
|
8346
|
+
return void 0;
|
|
8347
|
+
}
|
|
8348
|
+
function resolveGroups(groups) {
|
|
8349
|
+
return groups.map((g) => {
|
|
8350
|
+
var _a;
|
|
8351
|
+
if (!g.scopeItemId) return g;
|
|
8352
|
+
const node = findItemById(g.items, g.scopeItemId);
|
|
8353
|
+
return __spreadProps(__spreadValues({}, g), { items: (_a = node == null ? void 0 : node.children) != null ? _a : [] });
|
|
8354
|
+
}).filter((g) => g.items.length > 0);
|
|
8355
|
+
}
|
|
8356
|
+
function FilterItemsList({
|
|
8357
|
+
items,
|
|
8358
|
+
groupId,
|
|
8359
|
+
groupSelected,
|
|
8360
|
+
onToggle,
|
|
8361
|
+
onBulkToggle,
|
|
8362
|
+
idPrefix,
|
|
8363
|
+
depth = 0,
|
|
8364
|
+
parentAsHeader = false,
|
|
8365
|
+
expandedItems,
|
|
8366
|
+
onToggleExpanded
|
|
8367
|
+
}) {
|
|
8368
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8369
|
+
"ul",
|
|
8370
|
+
{
|
|
8371
|
+
className: cn(
|
|
8372
|
+
"flex flex-col gap-0.5",
|
|
8373
|
+
!parentAsHeader && depth > 0 && "mt-0.5 ml-6 border-l border-border pl-3"
|
|
8374
|
+
),
|
|
8375
|
+
children: items.map((item) => {
|
|
8376
|
+
var _a, _b;
|
|
8377
|
+
const isParent = !!((_a = item.children) == null ? void 0 : _a.length);
|
|
8378
|
+
const checkboxId = `${idPrefix}-${groupId}-${item.id}`;
|
|
8379
|
+
if (!isParent) {
|
|
8380
|
+
const checked = groupSelected.includes(item.id);
|
|
8381
|
+
return /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8382
|
+
"label",
|
|
8383
|
+
{
|
|
8384
|
+
htmlFor: checkboxId,
|
|
8385
|
+
className: "flex cursor-pointer items-center gap-3 rounded-md px-1 py-2 transition-colors hover:bg-muted/50",
|
|
8386
|
+
children: [
|
|
8387
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8388
|
+
Checkbox,
|
|
8389
|
+
{
|
|
8390
|
+
id: checkboxId,
|
|
8391
|
+
checked,
|
|
8392
|
+
onCheckedChange: () => onToggle(item.id),
|
|
8393
|
+
className: "shrink-0"
|
|
8394
|
+
}
|
|
8395
|
+
),
|
|
8396
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 text-sm text-foreground font-ui", children: item.label }),
|
|
8397
|
+
item.count !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs font-medium text-primary font-ui", children: [
|
|
8398
|
+
"(",
|
|
8399
|
+
item.count,
|
|
8400
|
+
")"
|
|
8401
|
+
] })
|
|
8402
|
+
]
|
|
8403
|
+
}
|
|
8404
|
+
) }, item.id);
|
|
8405
|
+
}
|
|
8406
|
+
if (parentAsHeader) {
|
|
8407
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: cn(depth > 0 && "mt-1"), children: [
|
|
8408
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-1 pt-2 pb-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground", children: item.label }),
|
|
8409
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8410
|
+
FilterItemsList,
|
|
8411
|
+
{
|
|
8412
|
+
items: item.children,
|
|
8413
|
+
groupId,
|
|
8414
|
+
groupSelected,
|
|
8415
|
+
onToggle,
|
|
8416
|
+
onBulkToggle,
|
|
8417
|
+
idPrefix,
|
|
8418
|
+
depth: depth + 1,
|
|
8419
|
+
parentAsHeader: true,
|
|
8420
|
+
expandedItems,
|
|
8421
|
+
onToggleExpanded
|
|
8422
|
+
}
|
|
8423
|
+
)
|
|
8424
|
+
] }, item.id);
|
|
8425
|
+
}
|
|
8426
|
+
const leafIds = item.children.flatMap(getLeafIds);
|
|
8427
|
+
const selectedLeaves = leafIds.filter((id) => groupSelected.includes(id));
|
|
8428
|
+
const allSelected = leafIds.length > 0 && selectedLeaves.length === leafIds.length;
|
|
8429
|
+
const someSelected = selectedLeaves.length > 0 && !allSelected;
|
|
8430
|
+
const isExpanded = (_b = expandedItems == null ? void 0 : expandedItems.has(item.id)) != null ? _b : false;
|
|
8431
|
+
const panelId = `${checkboxId}-children`;
|
|
8432
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
|
|
8433
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "group/parent flex items-center gap-3 rounded-md px-1 py-2 transition-colors hover:bg-muted/50", children: [
|
|
8434
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8435
|
+
Checkbox,
|
|
8436
|
+
{
|
|
8437
|
+
id: checkboxId,
|
|
8438
|
+
checked: allSelected,
|
|
8439
|
+
indeterminate: someSelected,
|
|
8440
|
+
onCheckedChange: () => onBulkToggle(leafIds, !allSelected),
|
|
8441
|
+
className: "shrink-0"
|
|
8442
|
+
}
|
|
8443
|
+
),
|
|
8444
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8445
|
+
"button",
|
|
8446
|
+
{
|
|
8447
|
+
type: "button",
|
|
8448
|
+
onClick: () => onToggleExpanded == null ? void 0 : onToggleExpanded(item.id),
|
|
8449
|
+
"aria-expanded": isExpanded,
|
|
8450
|
+
"aria-controls": panelId,
|
|
8451
|
+
className: "flex flex-1 items-center gap-2 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm cursor-pointer",
|
|
8452
|
+
children: [
|
|
8453
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 text-sm font-bold text-foreground font-ui", children: item.label }),
|
|
8454
|
+
item.count !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs font-medium text-primary font-ui", children: [
|
|
8455
|
+
"(",
|
|
8456
|
+
item.count,
|
|
8457
|
+
")"
|
|
8458
|
+
] }),
|
|
8459
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8460
|
+
lucideReact.ChevronDownIcon,
|
|
8461
|
+
{
|
|
8462
|
+
className: cn(
|
|
8463
|
+
"h-4 w-4 text-muted-foreground transition-transform",
|
|
8464
|
+
isExpanded && "rotate-180"
|
|
8465
|
+
)
|
|
8466
|
+
}
|
|
8467
|
+
)
|
|
8468
|
+
]
|
|
8469
|
+
}
|
|
8470
|
+
)
|
|
8471
|
+
] }),
|
|
8472
|
+
isExpanded && /* @__PURE__ */ jsxRuntime.jsx("div", { id: panelId, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8473
|
+
FilterItemsList,
|
|
8474
|
+
{
|
|
8475
|
+
items: item.children,
|
|
8476
|
+
groupId,
|
|
8477
|
+
groupSelected,
|
|
8478
|
+
onToggle,
|
|
8479
|
+
onBulkToggle,
|
|
8480
|
+
idPrefix,
|
|
8481
|
+
depth: depth + 1,
|
|
8482
|
+
expandedItems,
|
|
8483
|
+
onToggleExpanded
|
|
8484
|
+
}
|
|
8485
|
+
) })
|
|
8486
|
+
] }, item.id);
|
|
8487
|
+
})
|
|
8488
|
+
}
|
|
8489
|
+
);
|
|
8490
|
+
}
|
|
8303
8491
|
function FilterPanel({
|
|
8304
8492
|
groups,
|
|
8305
8493
|
value,
|
|
@@ -8307,15 +8495,32 @@ function FilterPanel({
|
|
|
8307
8495
|
onClearAll,
|
|
8308
8496
|
alwaysShowClear = false,
|
|
8309
8497
|
title = "Filters",
|
|
8310
|
-
className
|
|
8498
|
+
className,
|
|
8499
|
+
variant = "sidebar",
|
|
8500
|
+
sortOptions,
|
|
8501
|
+
sort,
|
|
8502
|
+
onSortChange
|
|
8311
8503
|
}) {
|
|
8312
|
-
|
|
8504
|
+
var _a, _b;
|
|
8505
|
+
const resolvedGroups = React28__namespace.useMemo(() => resolveGroups(groups), [groups]);
|
|
8506
|
+
const [internalValue, setInternalValue] = React28__namespace.useState(
|
|
8313
8507
|
() => Object.fromEntries(groups.map((g) => [g.id, []]))
|
|
8314
8508
|
);
|
|
8315
8509
|
const selected = value != null ? value : internalValue;
|
|
8510
|
+
const [expandedItems, setExpandedItems] = React28__namespace.useState(
|
|
8511
|
+
() => new Set(groups.flatMap((g) => getDefaultExpandedIds(g.items)))
|
|
8512
|
+
);
|
|
8513
|
+
const toggleExpanded = React28__namespace.useCallback((id) => {
|
|
8514
|
+
setExpandedItems((prev) => {
|
|
8515
|
+
const next = new Set(prev);
|
|
8516
|
+
if (next.has(id)) next.delete(id);
|
|
8517
|
+
else next.add(id);
|
|
8518
|
+
return next;
|
|
8519
|
+
});
|
|
8520
|
+
}, []);
|
|
8316
8521
|
const handleToggle = (groupId, itemId) => {
|
|
8317
|
-
var
|
|
8318
|
-
const current = (
|
|
8522
|
+
var _a2;
|
|
8523
|
+
const current = (_a2 = selected[groupId]) != null ? _a2 : [];
|
|
8319
8524
|
const next = current.includes(itemId) ? current.filter((id) => id !== itemId) : [...current, itemId];
|
|
8320
8525
|
const nextValue = __spreadProps(__spreadValues({}, selected), { [groupId]: next });
|
|
8321
8526
|
if (onChange) {
|
|
@@ -8324,8 +8529,24 @@ function FilterPanel({
|
|
|
8324
8529
|
setInternalValue(nextValue);
|
|
8325
8530
|
}
|
|
8326
8531
|
};
|
|
8532
|
+
const handleBulkToggle = (groupId, itemIds, select) => {
|
|
8533
|
+
var _a2;
|
|
8534
|
+
const current = (_a2 = selected[groupId]) != null ? _a2 : [];
|
|
8535
|
+
const next = select ? Array.from(/* @__PURE__ */ new Set([...current, ...itemIds])) : current.filter((id) => !itemIds.includes(id));
|
|
8536
|
+
const nextValue = __spreadProps(__spreadValues({}, selected), { [groupId]: next });
|
|
8537
|
+
if (onChange) {
|
|
8538
|
+
onChange(nextValue);
|
|
8539
|
+
} else {
|
|
8540
|
+
setInternalValue(nextValue);
|
|
8541
|
+
}
|
|
8542
|
+
};
|
|
8327
8543
|
const handleClearAll = () => {
|
|
8328
|
-
|
|
8544
|
+
var _a2;
|
|
8545
|
+
const cleared = __spreadValues({}, selected);
|
|
8546
|
+
for (const g of resolvedGroups) {
|
|
8547
|
+
const visible = new Set(getAllItemIds(g.items));
|
|
8548
|
+
cleared[g.id] = ((_a2 = selected[g.id]) != null ? _a2 : []).filter((id) => !visible.has(id));
|
|
8549
|
+
}
|
|
8329
8550
|
if (onChange) {
|
|
8330
8551
|
onChange(cleared);
|
|
8331
8552
|
} else {
|
|
@@ -8333,9 +8554,289 @@ function FilterPanel({
|
|
|
8333
8554
|
}
|
|
8334
8555
|
onClearAll == null ? void 0 : onClearAll();
|
|
8335
8556
|
};
|
|
8336
|
-
const totalSelected =
|
|
8557
|
+
const totalSelected = resolvedGroups.reduce((sum, g) => {
|
|
8558
|
+
var _a2;
|
|
8559
|
+
const visible = new Set(getAllItemIds(g.items));
|
|
8560
|
+
return sum + ((_a2 = selected[g.id]) != null ? _a2 : []).filter((id) => visible.has(id)).length;
|
|
8561
|
+
}, 0);
|
|
8337
8562
|
const showClear = alwaysShowClear || totalSelected > 0;
|
|
8338
|
-
const defaultOpenValues =
|
|
8563
|
+
const defaultOpenValues = resolvedGroups.filter((g) => g.defaultOpen).map((g) => g.id);
|
|
8564
|
+
if (resolvedGroups.length === 0) return null;
|
|
8565
|
+
if (variant === "horizontal") {
|
|
8566
|
+
const activeSort = (_a = sortOptions == null ? void 0 : sortOptions.find((o) => o.id === sort)) != null ? _a : sortOptions == null ? void 0 : sortOptions[0];
|
|
8567
|
+
const drawerGroups = /* @__PURE__ */ jsxRuntime.jsx(Accordion, { defaultValue: defaultOpenValues, className: "flex flex-col gap-2", children: resolvedGroups.map((group) => {
|
|
8568
|
+
var _a2;
|
|
8569
|
+
const groupSelected = (_a2 = selected[group.id]) != null ? _a2 : [];
|
|
8570
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8571
|
+
AccordionItem,
|
|
8572
|
+
{
|
|
8573
|
+
value: group.id,
|
|
8574
|
+
className: "border-0 border-b border-border last:border-b-0",
|
|
8575
|
+
children: [
|
|
8576
|
+
/* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: "px-0 py-3.5 hover:no-underline transition-colors", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2.5", children: [
|
|
8577
|
+
group.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary shrink-0", children: group.icon }),
|
|
8578
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold text-foreground font-ui", children: group.label }),
|
|
8579
|
+
groupSelected.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 inline-flex h-4 w-4 items-center justify-center rounded-full bg-primary text-[9px] font-bold text-primary-foreground", children: groupSelected.length })
|
|
8580
|
+
] }) }),
|
|
8581
|
+
/* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "px-4 pb-3 pt-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8582
|
+
FilterItemsList,
|
|
8583
|
+
{
|
|
8584
|
+
items: group.items,
|
|
8585
|
+
groupId: group.id,
|
|
8586
|
+
groupSelected,
|
|
8587
|
+
onToggle: (id) => handleToggle(group.id, id),
|
|
8588
|
+
onBulkToggle: (ids, select) => handleBulkToggle(group.id, ids, select),
|
|
8589
|
+
idPrefix: "mobile-filter",
|
|
8590
|
+
expandedItems,
|
|
8591
|
+
onToggleExpanded: toggleExpanded
|
|
8592
|
+
}
|
|
8593
|
+
) })
|
|
8594
|
+
]
|
|
8595
|
+
},
|
|
8596
|
+
group.id
|
|
8597
|
+
);
|
|
8598
|
+
}) });
|
|
8599
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("contents", className), children: [
|
|
8600
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex sm:hidden items-center gap-2", children: [
|
|
8601
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Dialog, { children: [
|
|
8602
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8603
|
+
DialogTrigger,
|
|
8604
|
+
{
|
|
8605
|
+
render: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8606
|
+
"button",
|
|
8607
|
+
{
|
|
8608
|
+
type: "button",
|
|
8609
|
+
className: cn(
|
|
8610
|
+
"flex-1 inline-flex items-center justify-between gap-2 rounded-xl border-2 border-foreground bg-background px-4 py-3",
|
|
8611
|
+
"text-sm font-ui font-bold text-foreground transition-colors hover:bg-muted",
|
|
8612
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
8613
|
+
)
|
|
8614
|
+
}
|
|
8615
|
+
),
|
|
8616
|
+
children: [
|
|
8617
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
|
|
8618
|
+
title,
|
|
8619
|
+
totalSelected > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex h-5 min-w-[20px] items-center justify-center rounded-full bg-primary px-1.5 text-[10px] font-bold text-primary-foreground", children: totalSelected })
|
|
8620
|
+
] }),
|
|
8621
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.SlidersHorizontalIcon, { className: "h-4 w-4 text-foreground" })
|
|
8622
|
+
]
|
|
8623
|
+
}
|
|
8624
|
+
),
|
|
8625
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8626
|
+
DialogContent,
|
|
8627
|
+
{
|
|
8628
|
+
className: cn(
|
|
8629
|
+
"p-0 sm:max-w-md",
|
|
8630
|
+
"max-w-none w-screen h-screen sm:h-auto sm:max-h-[90vh] rounded-none sm:rounded-2xl"
|
|
8631
|
+
),
|
|
8632
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col h-full max-h-[90vh]", children: [
|
|
8633
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "px-5 py-4 text-lg font-bold font-heading border-b border-border", children: title }),
|
|
8634
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto px-5 py-3", children: drawerGroups }),
|
|
8635
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-3 px-5 py-4 border-t border-border", children: [
|
|
8636
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8637
|
+
"button",
|
|
8638
|
+
{
|
|
8639
|
+
type: "button",
|
|
8640
|
+
onClick: handleClearAll,
|
|
8641
|
+
className: "text-sm font-ui font-semibold text-muted-foreground underline underline-offset-2 hover:text-foreground",
|
|
8642
|
+
children: "Clear all"
|
|
8643
|
+
}
|
|
8644
|
+
),
|
|
8645
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8646
|
+
DialogClose,
|
|
8647
|
+
{
|
|
8648
|
+
render: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8649
|
+
"button",
|
|
8650
|
+
{
|
|
8651
|
+
type: "button",
|
|
8652
|
+
className: "inline-flex items-center justify-center rounded-full bg-foreground text-background px-6 py-2.5 text-sm font-ui font-bold hover:bg-foreground/90 transition-colors"
|
|
8653
|
+
}
|
|
8654
|
+
),
|
|
8655
|
+
children: [
|
|
8656
|
+
"Show ",
|
|
8657
|
+
totalSelected > 0 ? `(${totalSelected})` : "",
|
|
8658
|
+
" results"
|
|
8659
|
+
]
|
|
8660
|
+
}
|
|
8661
|
+
)
|
|
8662
|
+
] })
|
|
8663
|
+
] })
|
|
8664
|
+
}
|
|
8665
|
+
)
|
|
8666
|
+
] }),
|
|
8667
|
+
sortOptions && sortOptions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
|
|
8668
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8669
|
+
PopoverTrigger,
|
|
8670
|
+
{
|
|
8671
|
+
render: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8672
|
+
"button",
|
|
8673
|
+
{
|
|
8674
|
+
type: "button",
|
|
8675
|
+
className: cn(
|
|
8676
|
+
"inline-flex items-center gap-1.5 rounded-xl border border-border bg-background px-4 py-3",
|
|
8677
|
+
"text-sm font-ui font-bold text-foreground transition-colors hover:bg-muted",
|
|
8678
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
8679
|
+
)
|
|
8680
|
+
}
|
|
8681
|
+
),
|
|
8682
|
+
children: [
|
|
8683
|
+
"Sort",
|
|
8684
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "h-4 w-4 text-muted-foreground" })
|
|
8685
|
+
]
|
|
8686
|
+
}
|
|
8687
|
+
),
|
|
8688
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { align: "end", sideOffset: 6, className: "w-52", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-0.5 p-0.5", children: sortOptions.map((opt) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8689
|
+
"button",
|
|
8690
|
+
{
|
|
8691
|
+
type: "button",
|
|
8692
|
+
onClick: () => onSortChange == null ? void 0 : onSortChange(opt.id),
|
|
8693
|
+
className: cn(
|
|
8694
|
+
"flex items-center px-2 py-1.5 rounded-md text-sm text-left",
|
|
8695
|
+
opt.id === (activeSort == null ? void 0 : activeSort.id) ? "bg-muted text-foreground font-semibold" : "text-foreground/80 hover:bg-muted"
|
|
8696
|
+
),
|
|
8697
|
+
children: opt.label
|
|
8698
|
+
},
|
|
8699
|
+
opt.id
|
|
8700
|
+
)) }) })
|
|
8701
|
+
] })
|
|
8702
|
+
] }),
|
|
8703
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "hidden sm:flex items-center gap-2 flex-wrap", children: [
|
|
8704
|
+
resolvedGroups.map((group) => {
|
|
8705
|
+
var _a2, _b2;
|
|
8706
|
+
const selectedCount = ((_a2 = selected[group.id]) != null ? _a2 : []).length;
|
|
8707
|
+
const isActive = selectedCount > 0;
|
|
8708
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
|
|
8709
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8710
|
+
PopoverTrigger,
|
|
8711
|
+
{
|
|
8712
|
+
render: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8713
|
+
"button",
|
|
8714
|
+
{
|
|
8715
|
+
type: "button",
|
|
8716
|
+
className: cn(
|
|
8717
|
+
"inline-flex items-center gap-1.5 rounded-full border px-3.5 py-1.5",
|
|
8718
|
+
"text-sm font-ui font-semibold transition-colors",
|
|
8719
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
8720
|
+
isActive ? "border-foreground bg-foreground text-background" : "border-border bg-background text-foreground hover:bg-muted"
|
|
8721
|
+
)
|
|
8722
|
+
}
|
|
8723
|
+
),
|
|
8724
|
+
children: [
|
|
8725
|
+
group.icon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8726
|
+
"span",
|
|
8727
|
+
{
|
|
8728
|
+
className: cn(
|
|
8729
|
+
"[&>svg]:h-3.5 [&>svg]:w-3.5",
|
|
8730
|
+
isActive ? "" : "text-muted-foreground"
|
|
8731
|
+
),
|
|
8732
|
+
children: group.icon
|
|
8733
|
+
}
|
|
8734
|
+
),
|
|
8735
|
+
group.label,
|
|
8736
|
+
selectedCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8737
|
+
"span",
|
|
8738
|
+
{
|
|
8739
|
+
className: cn(
|
|
8740
|
+
"inline-flex items-center justify-center rounded-full text-[10px] font-bold px-1.5 min-w-[18px] h-[18px]",
|
|
8741
|
+
isActive ? "bg-background text-foreground" : "bg-foreground text-background"
|
|
8742
|
+
),
|
|
8743
|
+
children: selectedCount
|
|
8744
|
+
}
|
|
8745
|
+
),
|
|
8746
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8747
|
+
lucideReact.ChevronDownIcon,
|
|
8748
|
+
{
|
|
8749
|
+
className: cn(
|
|
8750
|
+
"h-3.5 w-3.5",
|
|
8751
|
+
isActive ? "text-background/70" : "text-muted-foreground"
|
|
8752
|
+
)
|
|
8753
|
+
}
|
|
8754
|
+
)
|
|
8755
|
+
]
|
|
8756
|
+
}
|
|
8757
|
+
),
|
|
8758
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8759
|
+
PopoverContent,
|
|
8760
|
+
{
|
|
8761
|
+
align: "start",
|
|
8762
|
+
sideOffset: 6,
|
|
8763
|
+
className: "w-72 max-h-[60vh] overflow-y-auto",
|
|
8764
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 p-2", children: [
|
|
8765
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-1 py-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground", children: group.label }),
|
|
8766
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8767
|
+
FilterItemsList,
|
|
8768
|
+
{
|
|
8769
|
+
items: group.items,
|
|
8770
|
+
groupId: group.id,
|
|
8771
|
+
groupSelected: (_b2 = selected[group.id]) != null ? _b2 : [],
|
|
8772
|
+
onToggle: (id) => handleToggle(group.id, id),
|
|
8773
|
+
onBulkToggle: (ids, select) => handleBulkToggle(group.id, ids, select),
|
|
8774
|
+
idPrefix: "popover-filter",
|
|
8775
|
+
parentAsHeader: true,
|
|
8776
|
+
expandedItems,
|
|
8777
|
+
onToggleExpanded: toggleExpanded
|
|
8778
|
+
}
|
|
8779
|
+
)
|
|
8780
|
+
] })
|
|
8781
|
+
}
|
|
8782
|
+
)
|
|
8783
|
+
] }, group.id);
|
|
8784
|
+
}),
|
|
8785
|
+
totalSelected > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8786
|
+
"button",
|
|
8787
|
+
{
|
|
8788
|
+
type: "button",
|
|
8789
|
+
onClick: handleClearAll,
|
|
8790
|
+
className: "inline-flex items-center gap-1 rounded-full px-3 py-1.5 text-xs font-ui font-semibold text-muted-foreground hover:text-foreground transition-colors",
|
|
8791
|
+
children: [
|
|
8792
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, { className: "h-3 w-3" }),
|
|
8793
|
+
"Clear all (",
|
|
8794
|
+
totalSelected,
|
|
8795
|
+
")"
|
|
8796
|
+
]
|
|
8797
|
+
}
|
|
8798
|
+
),
|
|
8799
|
+
sortOptions && sortOptions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-auto flex items-center gap-2", children: [
|
|
8800
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground font-ui hidden sm:inline", children: "Sort by" }),
|
|
8801
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
|
|
8802
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8803
|
+
PopoverTrigger,
|
|
8804
|
+
{
|
|
8805
|
+
render: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8806
|
+
"button",
|
|
8807
|
+
{
|
|
8808
|
+
type: "button",
|
|
8809
|
+
className: cn(
|
|
8810
|
+
"inline-flex items-center gap-1.5 rounded-full border border-border bg-background px-3.5 py-1.5",
|
|
8811
|
+
"text-sm font-ui font-semibold text-foreground hover:bg-muted transition-colors",
|
|
8812
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
8813
|
+
)
|
|
8814
|
+
}
|
|
8815
|
+
),
|
|
8816
|
+
children: [
|
|
8817
|
+
(_b = activeSort == null ? void 0 : activeSort.label) != null ? _b : "Default",
|
|
8818
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "h-3.5 w-3.5 text-muted-foreground" })
|
|
8819
|
+
]
|
|
8820
|
+
}
|
|
8821
|
+
),
|
|
8822
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { align: "end", sideOffset: 6, className: "w-52", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-0.5 p-0.5", children: sortOptions.map((opt) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8823
|
+
"button",
|
|
8824
|
+
{
|
|
8825
|
+
type: "button",
|
|
8826
|
+
onClick: () => onSortChange == null ? void 0 : onSortChange(opt.id),
|
|
8827
|
+
className: cn(
|
|
8828
|
+
"flex items-center px-2 py-1.5 rounded-md text-sm text-left",
|
|
8829
|
+
opt.id === (activeSort == null ? void 0 : activeSort.id) ? "bg-muted text-foreground font-semibold" : "text-foreground/80 hover:bg-muted"
|
|
8830
|
+
),
|
|
8831
|
+
children: opt.label
|
|
8832
|
+
},
|
|
8833
|
+
opt.id
|
|
8834
|
+
)) }) })
|
|
8835
|
+
] })
|
|
8836
|
+
] })
|
|
8837
|
+
] })
|
|
8838
|
+
] });
|
|
8839
|
+
}
|
|
8339
8840
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-4", className), children: [
|
|
8340
8841
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
8341
8842
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-bold text-foreground font-ui", children: title }),
|
|
@@ -8346,9 +8847,9 @@ function FilterPanel({
|
|
|
8346
8847
|
{
|
|
8347
8848
|
defaultValue: defaultOpenValues,
|
|
8348
8849
|
className: "flex flex-col gap-2",
|
|
8349
|
-
children:
|
|
8350
|
-
var
|
|
8351
|
-
const groupSelected = (
|
|
8850
|
+
children: resolvedGroups.map((group) => {
|
|
8851
|
+
var _a2;
|
|
8852
|
+
const groupSelected = (_a2 = selected[group.id]) != null ? _a2 : [];
|
|
8352
8853
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8353
8854
|
AccordionItem,
|
|
8354
8855
|
{
|
|
@@ -8360,34 +8861,19 @@ function FilterPanel({
|
|
|
8360
8861
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold text-foreground font-ui", children: group.label }),
|
|
8361
8862
|
groupSelected.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 inline-flex h-4 w-4 items-center justify-center rounded-full bg-primary text-[9px] font-bold text-primary-foreground", children: groupSelected.length })
|
|
8362
8863
|
] }) }),
|
|
8363
|
-
/* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "px-4 pb-3 pt-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8364
|
-
|
|
8365
|
-
|
|
8366
|
-
|
|
8367
|
-
|
|
8368
|
-
|
|
8369
|
-
|
|
8370
|
-
|
|
8371
|
-
|
|
8372
|
-
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
|
|
8376
|
-
checked,
|
|
8377
|
-
onCheckedChange: () => handleToggle(group.id, item.id),
|
|
8378
|
-
className: "shrink-0"
|
|
8379
|
-
}
|
|
8380
|
-
),
|
|
8381
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 text-sm text-foreground font-ui", children: item.label }),
|
|
8382
|
-
item.count !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs font-medium text-primary font-ui", children: [
|
|
8383
|
-
"(",
|
|
8384
|
-
item.count,
|
|
8385
|
-
")"
|
|
8386
|
-
] })
|
|
8387
|
-
]
|
|
8388
|
-
}
|
|
8389
|
-
) }, item.id);
|
|
8390
|
-
}) }) })
|
|
8864
|
+
/* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "px-4 pb-3 pt-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8865
|
+
FilterItemsList,
|
|
8866
|
+
{
|
|
8867
|
+
items: group.items,
|
|
8868
|
+
groupId: group.id,
|
|
8869
|
+
groupSelected,
|
|
8870
|
+
onToggle: (id) => handleToggle(group.id, id),
|
|
8871
|
+
onBulkToggle: (ids, select) => handleBulkToggle(group.id, ids, select),
|
|
8872
|
+
idPrefix: "filter",
|
|
8873
|
+
expandedItems,
|
|
8874
|
+
onToggleExpanded: toggleExpanded
|
|
8875
|
+
}
|
|
8876
|
+
) })
|
|
8391
8877
|
]
|
|
8392
8878
|
},
|
|
8393
8879
|
group.id
|
|
@@ -8408,70 +8894,182 @@ function FilterPanel({
|
|
|
8408
8894
|
var TRUSTPILOT_SCRIPT_SRC = "https://widget.trustpilot.com/bootstrap/v5/tp.widget.bootstrap.min.js";
|
|
8409
8895
|
function TrustpilotEmbed({ config }) {
|
|
8410
8896
|
var _a, _b, _c, _d, _e, _f;
|
|
8411
|
-
const ref =
|
|
8412
|
-
|
|
8897
|
+
const ref = React28__namespace.useRef(null);
|
|
8898
|
+
const [widgetReady, setWidgetReady] = React28__namespace.useState(false);
|
|
8899
|
+
const [delayPassed, setDelayPassed] = React28__namespace.useState(false);
|
|
8900
|
+
const showFallback = delayPassed && !widgetReady;
|
|
8901
|
+
React28__namespace.useEffect(() => {
|
|
8902
|
+
var _a2;
|
|
8413
8903
|
if (typeof document === "undefined" || !ref.current) return;
|
|
8904
|
+
const node = ref.current;
|
|
8414
8905
|
let cancelled = false;
|
|
8906
|
+
const checkRendered = () => {
|
|
8907
|
+
if (!node) return false;
|
|
8908
|
+
if (node.querySelector("iframe")) return true;
|
|
8909
|
+
if (node.innerHTML.length > 200) return true;
|
|
8910
|
+
return false;
|
|
8911
|
+
};
|
|
8912
|
+
const observer = new MutationObserver(() => {
|
|
8913
|
+
if (cancelled) return;
|
|
8914
|
+
if (checkRendered()) setWidgetReady(true);
|
|
8915
|
+
});
|
|
8916
|
+
observer.observe(node, { childList: true, subtree: true });
|
|
8917
|
+
if (checkRendered()) setWidgetReady(true);
|
|
8415
8918
|
const initWidget = () => {
|
|
8416
|
-
if (cancelled || !
|
|
8919
|
+
if (cancelled || !node) return;
|
|
8417
8920
|
const tp = window.Trustpilot;
|
|
8418
8921
|
if (tp == null ? void 0 : tp.loadFromElement) {
|
|
8419
|
-
tp.loadFromElement(
|
|
8922
|
+
tp.loadFromElement(node, true);
|
|
8420
8923
|
}
|
|
8421
8924
|
};
|
|
8422
8925
|
const existing = document.querySelector(
|
|
8423
8926
|
`script[src="${TRUSTPILOT_SCRIPT_SRC}"]`
|
|
8424
8927
|
);
|
|
8928
|
+
let cleanupScriptListener;
|
|
8425
8929
|
if (existing) {
|
|
8426
8930
|
const tp = window.Trustpilot;
|
|
8427
8931
|
if (tp == null ? void 0 : tp.loadFromElement) {
|
|
8428
8932
|
initWidget();
|
|
8429
8933
|
} else {
|
|
8430
8934
|
existing.addEventListener("load", initWidget, { once: true });
|
|
8935
|
+
cleanupScriptListener = () => existing.removeEventListener("load", initWidget);
|
|
8431
8936
|
}
|
|
8432
|
-
|
|
8433
|
-
|
|
8434
|
-
|
|
8435
|
-
|
|
8937
|
+
} else {
|
|
8938
|
+
const s = document.createElement("script");
|
|
8939
|
+
s.src = TRUSTPILOT_SCRIPT_SRC;
|
|
8940
|
+
s.async = true;
|
|
8941
|
+
s.addEventListener("load", initWidget, { once: true });
|
|
8942
|
+
document.body.appendChild(s);
|
|
8943
|
+
cleanupScriptListener = () => s.removeEventListener("load", initWidget);
|
|
8436
8944
|
}
|
|
8437
|
-
const
|
|
8438
|
-
|
|
8439
|
-
|
|
8440
|
-
|
|
8441
|
-
document.body.appendChild(s);
|
|
8945
|
+
const delay = (_a2 = config.fallbackDelayMs) != null ? _a2 : 3e3;
|
|
8946
|
+
const timeout = setTimeout(() => {
|
|
8947
|
+
if (!cancelled) setDelayPassed(true);
|
|
8948
|
+
}, delay);
|
|
8442
8949
|
return () => {
|
|
8443
8950
|
cancelled = true;
|
|
8444
|
-
|
|
8951
|
+
clearTimeout(timeout);
|
|
8952
|
+
observer.disconnect();
|
|
8953
|
+
cleanupScriptListener == null ? void 0 : cleanupScriptListener();
|
|
8445
8954
|
};
|
|
8446
8955
|
}, [config]);
|
|
8447
8956
|
const sku = Array.isArray(config.sku) ? config.sku.join(",") : config.sku;
|
|
8957
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8958
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8959
|
+
"div",
|
|
8960
|
+
{
|
|
8961
|
+
ref,
|
|
8962
|
+
className: "trustpilot-widget",
|
|
8963
|
+
"data-locale": (_a = config.locale) != null ? _a : "en-US",
|
|
8964
|
+
"data-template-id": (_b = config.templateId) != null ? _b : "5763bccae0a06d08e809ecbb",
|
|
8965
|
+
"data-businessunit-id": config.businessUnitId,
|
|
8966
|
+
"data-style-height": (_c = config.styleHeight) != null ? _c : "700px",
|
|
8967
|
+
"data-style-width": (_d = config.styleWidth) != null ? _d : "100%",
|
|
8968
|
+
"data-sku": sku,
|
|
8969
|
+
"data-no-reviews": (_e = config.noReviews) != null ? _e : "hide",
|
|
8970
|
+
"data-fullwidth": "true",
|
|
8971
|
+
"data-theme": config.theme,
|
|
8972
|
+
"data-token": config.token,
|
|
8973
|
+
"data-scroll-to-list": config.scrollToList ? "true" : void 0,
|
|
8974
|
+
"data-style-alignment": config.styleAlignment,
|
|
8975
|
+
"data-star-color": config.starColor,
|
|
8976
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8977
|
+
"a",
|
|
8978
|
+
{
|
|
8979
|
+
href: (_f = config.fallbackHref) != null ? _f : "https://www.trustpilot.com/",
|
|
8980
|
+
target: "_blank",
|
|
8981
|
+
rel: "noopener noreferrer",
|
|
8982
|
+
children: "Trustpilot"
|
|
8983
|
+
}
|
|
8984
|
+
)
|
|
8985
|
+
}
|
|
8986
|
+
),
|
|
8987
|
+
showFallback && /* @__PURE__ */ jsxRuntime.jsx(TrustpilotFallback, { config })
|
|
8988
|
+
] });
|
|
8989
|
+
}
|
|
8990
|
+
function FallbackStar({ filled, className }) {
|
|
8448
8991
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8449
|
-
"
|
|
8992
|
+
"span",
|
|
8450
8993
|
{
|
|
8451
|
-
|
|
8452
|
-
className:
|
|
8453
|
-
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
|
|
8457
|
-
"
|
|
8458
|
-
|
|
8459
|
-
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
8464
|
-
|
|
8465
|
-
|
|
8466
|
-
|
|
8467
|
-
|
|
8468
|
-
|
|
8469
|
-
|
|
8470
|
-
|
|
8471
|
-
|
|
8472
|
-
|
|
8473
|
-
|
|
8474
|
-
|
|
8994
|
+
"aria-hidden": true,
|
|
8995
|
+
className: cn(
|
|
8996
|
+
"inline-flex items-center justify-center",
|
|
8997
|
+
filled ? "bg-[#00b67a] text-white" : "bg-muted text-muted-foreground",
|
|
8998
|
+
className
|
|
8999
|
+
),
|
|
9000
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", className: "h-[60%] w-[60%]", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" }) })
|
|
9001
|
+
}
|
|
9002
|
+
);
|
|
9003
|
+
}
|
|
9004
|
+
function TrustpilotFallback({ config }) {
|
|
9005
|
+
var _a, _b, _c, _d, _e, _f;
|
|
9006
|
+
const score = (_a = config.fallbackScore) != null ? _a : 4.8;
|
|
9007
|
+
const count = (_b = config.fallbackCount) != null ? _b : 0;
|
|
9008
|
+
const label = (_c = config.fallbackLabel) != null ? _c : "Excellent";
|
|
9009
|
+
const href = (_d = config.fallbackHref) != null ? _d : "https://www.trustpilot.com/";
|
|
9010
|
+
const isDark = config.theme === "dark";
|
|
9011
|
+
const styleHeightPx = parseInt((_e = config.styleHeight) != null ? _e : "", 10);
|
|
9012
|
+
const autoVariant = Number.isFinite(styleHeightPx) && styleHeightPx > 0 && styleHeightPx < 120 ? "mini" : "card";
|
|
9013
|
+
const variant = (_f = config.fallbackVariant) != null ? _f : autoVariant;
|
|
9014
|
+
const filledStars = Math.round(score);
|
|
9015
|
+
if (variant === "mini") {
|
|
9016
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9017
|
+
"a",
|
|
9018
|
+
{
|
|
9019
|
+
href,
|
|
9020
|
+
target: "_blank",
|
|
9021
|
+
rel: "noopener noreferrer",
|
|
9022
|
+
className: cn(
|
|
9023
|
+
"inline-flex items-center gap-2 text-sm font-ui no-underline hover:opacity-80 transition-opacity",
|
|
9024
|
+
isDark ? "text-white" : "text-foreground"
|
|
9025
|
+
),
|
|
9026
|
+
children: [
|
|
9027
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-0.5", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(FallbackStar, { filled: i < filledStars, className: "h-4 w-4 rounded-[2px]" }, i)) }),
|
|
9028
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-bold", children: score.toFixed(1) }),
|
|
9029
|
+
count > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
9030
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(isDark ? "text-white/60" : "text-muted-foreground"), children: "\xB7" }),
|
|
9031
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("text-xs", isDark ? "text-white/80" : "text-muted-foreground"), children: [
|
|
9032
|
+
count.toLocaleString(),
|
|
9033
|
+
" reviews"
|
|
9034
|
+
] })
|
|
9035
|
+
] }),
|
|
9036
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-xs", isDark ? "text-white/60" : "text-muted-foreground"), children: "on Trustpilot" })
|
|
9037
|
+
]
|
|
9038
|
+
}
|
|
9039
|
+
);
|
|
9040
|
+
}
|
|
9041
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9042
|
+
"a",
|
|
9043
|
+
{
|
|
9044
|
+
href,
|
|
9045
|
+
target: "_blank",
|
|
9046
|
+
rel: "noopener noreferrer",
|
|
9047
|
+
className: "block max-w-md mx-auto rounded-2xl border border-border bg-card p-8 text-center no-underline shadow-sm hover:shadow-md transition-shadow",
|
|
9048
|
+
children: [
|
|
9049
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center items-center gap-1 mb-3", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(FallbackStar, { filled: i < filledStars, className: "h-7 w-7 rounded-[3px]" }, i)) }),
|
|
9050
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-2xl font-bold text-foreground font-heading", children: [
|
|
9051
|
+
label,
|
|
9052
|
+
" ",
|
|
9053
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground font-normal", children: [
|
|
9054
|
+
"\xB7 ",
|
|
9055
|
+
score.toFixed(1),
|
|
9056
|
+
" / 5"
|
|
9057
|
+
] })
|
|
9058
|
+
] }),
|
|
9059
|
+
count > 0 && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground mt-2", children: [
|
|
9060
|
+
"Based on ",
|
|
9061
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-foreground", children: count.toLocaleString() }),
|
|
9062
|
+
" reviews"
|
|
9063
|
+
] }),
|
|
9064
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-4", children: "Reviews powered by Trustpilot" }),
|
|
9065
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "mt-5 inline-flex items-center gap-1.5 text-sm font-semibold text-primary border-b border-primary/40 pb-0.5", children: [
|
|
9066
|
+
"Read all reviews on Trustpilot",
|
|
9067
|
+
/* @__PURE__ */ jsxRuntime.jsxs("svg", { className: "h-3.5 w-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
9068
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
|
|
9069
|
+
/* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "12 5 19 12 12 19" })
|
|
9070
|
+
] })
|
|
9071
|
+
] })
|
|
9072
|
+
]
|
|
8475
9073
|
}
|
|
8476
9074
|
);
|
|
8477
9075
|
}
|
|
@@ -8541,11 +9139,11 @@ function ItineraryModal({
|
|
|
8541
9139
|
onNext
|
|
8542
9140
|
}) {
|
|
8543
9141
|
var _a, _b, _c;
|
|
8544
|
-
const [imgIndex, setImgIndex] =
|
|
9142
|
+
const [imgIndex, setImgIndex] = React28__namespace.useState(0);
|
|
8545
9143
|
const images = stop ? [stop.coverImage, ...(_a = stop.images) != null ? _a : []] : [];
|
|
8546
9144
|
const isFirst = (stop == null ? void 0 : stop.dayNumber) === ((_b = allStops[0]) == null ? void 0 : _b.dayNumber);
|
|
8547
9145
|
const isLast = (stop == null ? void 0 : stop.dayNumber) === ((_c = allStops[allStops.length - 1]) == null ? void 0 : _c.dayNumber);
|
|
8548
|
-
|
|
9146
|
+
React28__namespace.useEffect(() => {
|
|
8549
9147
|
setImgIndex(0);
|
|
8550
9148
|
}, [stop == null ? void 0 : stop.dayNumber]);
|
|
8551
9149
|
if (!stop) return null;
|
|
@@ -8672,8 +9270,8 @@ function ItineraryModal({
|
|
|
8672
9270
|
) });
|
|
8673
9271
|
}
|
|
8674
9272
|
function Itinerary({ title, subtitle, stops, className }) {
|
|
8675
|
-
const [activeIndex, setActiveIndex] =
|
|
8676
|
-
const scrollRef =
|
|
9273
|
+
const [activeIndex, setActiveIndex] = React28__namespace.useState(null);
|
|
9274
|
+
const scrollRef = React28__namespace.useRef(null);
|
|
8677
9275
|
const activeStop = activeIndex !== null ? stops[activeIndex] : null;
|
|
8678
9276
|
const scrollBy = (dir) => {
|
|
8679
9277
|
if (!scrollRef.current) return;
|
|
@@ -8765,18 +9363,18 @@ function Lightbox({
|
|
|
8765
9363
|
onClose
|
|
8766
9364
|
}) {
|
|
8767
9365
|
var _a;
|
|
8768
|
-
const [index, setIndex] =
|
|
9366
|
+
const [index, setIndex] = React28__namespace.useState(initialIndex);
|
|
8769
9367
|
const total = photos.length;
|
|
8770
9368
|
const photo = photos[index];
|
|
8771
|
-
const prev =
|
|
9369
|
+
const prev = React28__namespace.useCallback(
|
|
8772
9370
|
() => setIndex((i) => (i - 1 + total) % total),
|
|
8773
9371
|
[total]
|
|
8774
9372
|
);
|
|
8775
|
-
const next =
|
|
9373
|
+
const next = React28__namespace.useCallback(
|
|
8776
9374
|
() => setIndex((i) => (i + 1) % total),
|
|
8777
9375
|
[total]
|
|
8778
9376
|
);
|
|
8779
|
-
|
|
9377
|
+
React28__namespace.useEffect(() => {
|
|
8780
9378
|
const onKey = (e) => {
|
|
8781
9379
|
if (e.key === "Escape") onClose();
|
|
8782
9380
|
if (e.key === "ArrowLeft") prev();
|
|
@@ -8942,7 +9540,7 @@ function GridGallery({
|
|
|
8942
9540
|
initialVisible,
|
|
8943
9541
|
onOpen
|
|
8944
9542
|
}) {
|
|
8945
|
-
const [expanded, setExpanded] =
|
|
9543
|
+
const [expanded, setExpanded] = React28__namespace.useState(false);
|
|
8946
9544
|
const cols = gridCols(photos.length);
|
|
8947
9545
|
const hasMore = photos.length > initialVisible;
|
|
8948
9546
|
const visible = expanded || !hasMore ? photos : photos.slice(0, initialVisible);
|
|
@@ -8967,12 +9565,41 @@ function GridGallery({
|
|
|
8967
9565
|
)
|
|
8968
9566
|
] });
|
|
8969
9567
|
}
|
|
9568
|
+
function CompactGridGallery({
|
|
9569
|
+
photos,
|
|
9570
|
+
initialVisible,
|
|
9571
|
+
onOpen
|
|
9572
|
+
}) {
|
|
9573
|
+
const [expanded, setExpanded] = React28__namespace.useState(false);
|
|
9574
|
+
const hasMore = photos.length > initialVisible;
|
|
9575
|
+
const visible = expanded || !hasMore ? photos : photos.slice(0, initialVisible);
|
|
9576
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
9577
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 lg:grid-cols-4", children: visible.map((p, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
9578
|
+
PhotoTile,
|
|
9579
|
+
{
|
|
9580
|
+
photo: p,
|
|
9581
|
+
index: i,
|
|
9582
|
+
className: "aspect-[4/3]",
|
|
9583
|
+
onClick: () => onOpen(i)
|
|
9584
|
+
},
|
|
9585
|
+
i
|
|
9586
|
+
)) }),
|
|
9587
|
+
hasMore && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9588
|
+
ShowMoreButton,
|
|
9589
|
+
{
|
|
9590
|
+
count: photos.length - initialVisible,
|
|
9591
|
+
expanded,
|
|
9592
|
+
onClick: () => setExpanded((v) => !v)
|
|
9593
|
+
}
|
|
9594
|
+
)
|
|
9595
|
+
] });
|
|
9596
|
+
}
|
|
8970
9597
|
function MasonryGallery({
|
|
8971
9598
|
photos,
|
|
8972
9599
|
initialVisible,
|
|
8973
9600
|
onOpen
|
|
8974
9601
|
}) {
|
|
8975
|
-
const [expanded, setExpanded] =
|
|
9602
|
+
const [expanded, setExpanded] = React28__namespace.useState(false);
|
|
8976
9603
|
const hasMore = photos.length > initialVisible;
|
|
8977
9604
|
const visible = expanded || !hasMore ? photos : photos.slice(0, initialVisible);
|
|
8978
9605
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -9045,7 +9672,7 @@ function FeaturedGallery({
|
|
|
9045
9672
|
photos,
|
|
9046
9673
|
onOpen
|
|
9047
9674
|
}) {
|
|
9048
|
-
const [expanded, setExpanded] =
|
|
9675
|
+
const [expanded, setExpanded] = React28__namespace.useState(false);
|
|
9049
9676
|
const featured = photos.slice(0, 3);
|
|
9050
9677
|
const extra = photos.slice(3);
|
|
9051
9678
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -9212,9 +9839,9 @@ function PhotoGallery({
|
|
|
9212
9839
|
onPhotoClick,
|
|
9213
9840
|
className
|
|
9214
9841
|
}) {
|
|
9215
|
-
const [lightboxIndex, setLightboxIndex] =
|
|
9216
|
-
const [carouselIndex, setCarouselIndex] =
|
|
9217
|
-
const normalised =
|
|
9842
|
+
const [lightboxIndex, setLightboxIndex] = React28__namespace.useState(null);
|
|
9843
|
+
const [carouselIndex, setCarouselIndex] = React28__namespace.useState(0);
|
|
9844
|
+
const normalised = React28__namespace.useMemo(() => photos.map(normalise), [photos]);
|
|
9218
9845
|
const handleOpen = (index) => {
|
|
9219
9846
|
setLightboxIndex(index);
|
|
9220
9847
|
onPhotoClick == null ? void 0 : onPhotoClick(normalised[index].src, index);
|
|
@@ -9256,6 +9883,14 @@ function PhotoGallery({
|
|
|
9256
9883
|
onOpen: handleOpen
|
|
9257
9884
|
}
|
|
9258
9885
|
),
|
|
9886
|
+
variant === "gridCompact" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9887
|
+
CompactGridGallery,
|
|
9888
|
+
{
|
|
9889
|
+
photos: normalised,
|
|
9890
|
+
initialVisible,
|
|
9891
|
+
onOpen: handleOpen
|
|
9892
|
+
}
|
|
9893
|
+
),
|
|
9259
9894
|
variant === "masonry" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9260
9895
|
MasonryGallery,
|
|
9261
9896
|
{
|
|
@@ -9290,7 +9925,7 @@ function ItineraryDay({
|
|
|
9290
9925
|
photoLayout = "rounded",
|
|
9291
9926
|
className
|
|
9292
9927
|
}) {
|
|
9293
|
-
const photoList =
|
|
9928
|
+
const photoList = React28__namespace.useMemo(() => normalisePhotos(photos), [photos]);
|
|
9294
9929
|
const isFullBleed = photoLayout === "fullBleed" || photoLayout === "fullBleedBottom";
|
|
9295
9930
|
const photoPosition = photoLayout === "fullBleedBottom" ? "bottom" : "top";
|
|
9296
9931
|
const gallery = photoList.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9309,13 +9944,16 @@ function ItineraryDay({
|
|
|
9309
9944
|
specs && specs.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-3 sm:gap-2.5", children: specs.map((spec, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9310
9945
|
"li",
|
|
9311
9946
|
{
|
|
9312
|
-
className: "flex
|
|
9947
|
+
className: "flex items-start gap-3 text-base text-foreground font-ui",
|
|
9313
9948
|
children: [
|
|
9314
|
-
/* @__PURE__ */ jsxRuntime.
|
|
9315
|
-
|
|
9316
|
-
|
|
9317
|
-
|
|
9318
|
-
|
|
9949
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-0.5 shrink-0 text-foreground", "aria-hidden": true, children: spec.icon }),
|
|
9950
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
|
|
9951
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-baseline gap-x-2", children: [
|
|
9952
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: spec.label }),
|
|
9953
|
+
spec.detail && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: spec.detail })
|
|
9954
|
+
] }),
|
|
9955
|
+
spec.subdetail && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: spec.subdetail })
|
|
9956
|
+
] })
|
|
9319
9957
|
]
|
|
9320
9958
|
},
|
|
9321
9959
|
i
|
|
@@ -9342,8 +9980,8 @@ function MenuTrip({
|
|
|
9342
9980
|
bold = true,
|
|
9343
9981
|
className
|
|
9344
9982
|
}) {
|
|
9345
|
-
const scrollRef =
|
|
9346
|
-
|
|
9983
|
+
const scrollRef = React28__namespace.useRef(null);
|
|
9984
|
+
React28__namespace.useEffect(() => {
|
|
9347
9985
|
if (!scrollRef.current || !activeSection) return;
|
|
9348
9986
|
const container = scrollRef.current;
|
|
9349
9987
|
const btn = container.querySelector(
|
|
@@ -9534,8 +10172,8 @@ function PricingTrip({
|
|
|
9534
10172
|
className
|
|
9535
10173
|
}) {
|
|
9536
10174
|
const rOuter = sharp ? "rounded-none" : "rounded-2xl";
|
|
9537
|
-
const [showEstimates, setShowEstimates] =
|
|
9538
|
-
const [showPriceInfo, setShowPriceInfo] =
|
|
10175
|
+
const [showEstimates, setShowEstimates] = React28__namespace.useState(false);
|
|
10176
|
+
const [showPriceInfo, setShowPriceInfo] = React28__namespace.useState(false);
|
|
9539
10177
|
if (variant === "compact") {
|
|
9540
10178
|
const showOverlay = showPriceInfo && (!!priceInfo || !!currencyEstimates && currencyEstimates.length > 0);
|
|
9541
10179
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-2", className), children: [
|
|
@@ -9819,8 +10457,7 @@ var VARIANT = {
|
|
|
9819
10457
|
mobileLink: "text-white hover:text-primary-400 border-b border-white/10",
|
|
9820
10458
|
mobileSub: "text-white/70 font-bold hover:text-primary-400 border-b border-white/8",
|
|
9821
10459
|
mobileLangActive: "text-primary-400 font-semibold",
|
|
9822
|
-
mobileLangIdle: "text-white/40 hover:text-primary-400"
|
|
9823
|
-
logoBlend: "mix-blend-screen"
|
|
10460
|
+
mobileLangIdle: "text-white/40 hover:text-primary-400"
|
|
9824
10461
|
},
|
|
9825
10462
|
white: {
|
|
9826
10463
|
header: "bg-white border-b border-border shadow-sm",
|
|
@@ -9836,8 +10473,7 @@ var VARIANT = {
|
|
|
9836
10473
|
mobileLink: "text-foreground/80 hover:text-foreground border-b border-border",
|
|
9837
10474
|
mobileSub: "text-foreground/50 font-bold hover:text-foreground border-b border-border/40",
|
|
9838
10475
|
mobileLangActive: "text-primary font-semibold",
|
|
9839
|
-
mobileLangIdle: "text-muted-foreground hover:text-foreground"
|
|
9840
|
-
logoBlend: "invert mix-blend-multiply"
|
|
10476
|
+
mobileLangIdle: "text-muted-foreground hover:text-foreground"
|
|
9841
10477
|
},
|
|
9842
10478
|
dark: {
|
|
9843
10479
|
header: "bg-neutral-950 border-b border-white/10",
|
|
@@ -9853,8 +10489,7 @@ var VARIANT = {
|
|
|
9853
10489
|
mobileLink: "text-white/80 hover:text-white border-b border-white/8",
|
|
9854
10490
|
mobileSub: "text-white/45 font-bold hover:text-white border-b border-white/5",
|
|
9855
10491
|
mobileLangActive: "text-white font-semibold",
|
|
9856
|
-
mobileLangIdle: "text-white/35 hover:text-white/60"
|
|
9857
|
-
logoBlend: "mix-blend-screen"
|
|
10492
|
+
mobileLangIdle: "text-white/35 hover:text-white/60"
|
|
9858
10493
|
}
|
|
9859
10494
|
};
|
|
9860
10495
|
var DEFAULT_HEADER_LINKS = [
|
|
@@ -9964,7 +10599,9 @@ function LangDropdown({
|
|
|
9964
10599
|
function SiteHeader({
|
|
9965
10600
|
variant = "transparent",
|
|
9966
10601
|
links = DEFAULT_HEADER_LINKS,
|
|
9967
|
-
|
|
10602
|
+
logoSrcLight = "/logo-planetaexo-white.png",
|
|
10603
|
+
logoSrcDark = "/logo-planetaexo-green.png",
|
|
10604
|
+
logoSrc,
|
|
9968
10605
|
logoAlt = "Planeta Exo",
|
|
9969
10606
|
languages = DEFAULT_LANGUAGES,
|
|
9970
10607
|
currentLanguage = "EN",
|
|
@@ -9975,14 +10612,15 @@ function SiteHeader({
|
|
|
9975
10612
|
className
|
|
9976
10613
|
}) {
|
|
9977
10614
|
const t = VARIANT[variant];
|
|
9978
|
-
const
|
|
9979
|
-
const [
|
|
9980
|
-
const [
|
|
9981
|
-
const [
|
|
9982
|
-
const [
|
|
10615
|
+
const resolvedLogo = logoSrc != null ? logoSrc : variant === "white" ? logoSrcDark : logoSrcLight;
|
|
10616
|
+
const [openMenu, setOpenMenu] = React28__namespace.useState(null);
|
|
10617
|
+
const [langOpen, setLangOpen] = React28__namespace.useState(false);
|
|
10618
|
+
const [mobileOpen, setMobileOpen] = React28__namespace.useState(false);
|
|
10619
|
+
const [openMobileSection, setOpenMobileSection] = React28__namespace.useState(null);
|
|
10620
|
+
const [activeLang, setActiveLang] = React28__namespace.useState(currentLanguage);
|
|
9983
10621
|
const toggleMobileSection = (label) => setOpenMobileSection((prev) => prev === label ? null : label);
|
|
9984
|
-
const menuCloseTimer =
|
|
9985
|
-
const langCloseTimer =
|
|
10622
|
+
const menuCloseTimer = React28__namespace.useRef(void 0);
|
|
10623
|
+
const langCloseTimer = React28__namespace.useRef(void 0);
|
|
9986
10624
|
const handleMenuEnter = (label) => {
|
|
9987
10625
|
clearTimeout(menuCloseTimer.current);
|
|
9988
10626
|
setOpenMenu(label);
|
|
@@ -10003,7 +10641,7 @@ function SiteHeader({
|
|
|
10003
10641
|
setOpenMenu(null);
|
|
10004
10642
|
setLangOpen(false);
|
|
10005
10643
|
};
|
|
10006
|
-
|
|
10644
|
+
React28__namespace.useEffect(() => () => {
|
|
10007
10645
|
clearTimeout(menuCloseTimer.current);
|
|
10008
10646
|
clearTimeout(langCloseTimer.current);
|
|
10009
10647
|
}, []);
|
|
@@ -10023,17 +10661,41 @@ function SiteHeader({
|
|
|
10023
10661
|
className
|
|
10024
10662
|
),
|
|
10025
10663
|
children: [
|
|
10026
|
-
variant === "transparent" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-x-0 top-0 h-52 bg-gradient-to-b from-black/
|
|
10664
|
+
variant === "transparent" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-x-0 top-0 h-52 bg-gradient-to-b from-black/70 via-black/30 to-transparent pointer-events-none" }),
|
|
10027
10665
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-center gap-2 px-6 sm:px-10 h-[72px]", children: [
|
|
10028
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10029
|
-
"
|
|
10666
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10667
|
+
"button",
|
|
10030
10668
|
{
|
|
10031
|
-
|
|
10032
|
-
|
|
10033
|
-
|
|
10034
|
-
|
|
10669
|
+
type: "button",
|
|
10670
|
+
onClick: () => setMobileOpen(true),
|
|
10671
|
+
"aria-label": "Open menu",
|
|
10672
|
+
className: cn(
|
|
10673
|
+
"flex lg:hidden h-9 w-9 items-center justify-center rounded-full transition-colors -ml-1.5",
|
|
10674
|
+
t.mobileTrigger
|
|
10675
|
+
),
|
|
10676
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MenuIcon, { className: "h-[18px] w-[18px]" })
|
|
10035
10677
|
}
|
|
10036
|
-
)
|
|
10678
|
+
),
|
|
10679
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10680
|
+
"a",
|
|
10681
|
+
{
|
|
10682
|
+
href: "#",
|
|
10683
|
+
className: cn(
|
|
10684
|
+
"shrink-0 flex items-center",
|
|
10685
|
+
"absolute left-1/2 -translate-x-1/2",
|
|
10686
|
+
"lg:static lg:translate-x-0 lg:mr-4"
|
|
10687
|
+
),
|
|
10688
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10689
|
+
"img",
|
|
10690
|
+
{
|
|
10691
|
+
src: resolvedLogo,
|
|
10692
|
+
alt: logoAlt,
|
|
10693
|
+
className: "h-14 w-auto select-none",
|
|
10694
|
+
draggable: false
|
|
10695
|
+
}
|
|
10696
|
+
)
|
|
10697
|
+
}
|
|
10698
|
+
),
|
|
10037
10699
|
/* @__PURE__ */ jsxRuntime.jsx("nav", { className: "hidden lg:flex items-center gap-0.5 mx-auto", children: links.map((link) => {
|
|
10038
10700
|
var _a, _b;
|
|
10039
10701
|
const hasDropdown = !!((_a = link.items) == null ? void 0 : _a.length);
|
|
@@ -10157,19 +10819,6 @@ function SiteHeader({
|
|
|
10157
10819
|
),
|
|
10158
10820
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserIcon, { className: "h-[18px] w-[18px]" })
|
|
10159
10821
|
}
|
|
10160
|
-
),
|
|
10161
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10162
|
-
"button",
|
|
10163
|
-
{
|
|
10164
|
-
type: "button",
|
|
10165
|
-
onClick: () => setMobileOpen(true),
|
|
10166
|
-
"aria-label": "Open menu",
|
|
10167
|
-
className: cn(
|
|
10168
|
-
"flex lg:hidden h-9 w-9 items-center justify-center rounded-full transition-colors ml-0.5",
|
|
10169
|
-
t.mobileTrigger
|
|
10170
|
-
),
|
|
10171
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MenuIcon, { className: "h-[18px] w-[18px]" })
|
|
10172
|
-
}
|
|
10173
10822
|
)
|
|
10174
10823
|
] })
|
|
10175
10824
|
] }),
|
|
@@ -10185,9 +10834,9 @@ function SiteHeader({
|
|
|
10185
10834
|
/* @__PURE__ */ jsxRuntime.jsx("a", { href: "#", className: "shrink-0 flex items-center", onClick: () => setMobileOpen(false), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10186
10835
|
"img",
|
|
10187
10836
|
{
|
|
10188
|
-
src:
|
|
10837
|
+
src: resolvedLogo,
|
|
10189
10838
|
alt: logoAlt,
|
|
10190
|
-
className:
|
|
10839
|
+
className: "h-14 w-auto select-none",
|
|
10191
10840
|
draggable: false
|
|
10192
10841
|
}
|
|
10193
10842
|
) }),
|
|
@@ -10268,7 +10917,7 @@ function SiteHeader({
|
|
|
10268
10917
|
), children: [
|
|
10269
10918
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: languages.map((lang, i) => {
|
|
10270
10919
|
const isActive = lang.code === activeLang;
|
|
10271
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10920
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React28__namespace.Fragment, { children: [
|
|
10272
10921
|
i > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
|
|
10273
10922
|
"text-xs select-none",
|
|
10274
10923
|
variant === "white" ? "text-border" : "text-white/15"
|
|
@@ -10330,8 +10979,8 @@ function SiteHeader({
|
|
|
10330
10979
|
);
|
|
10331
10980
|
}
|
|
10332
10981
|
function ThemeToggle({ className }) {
|
|
10333
|
-
const [dark, setDark] =
|
|
10334
|
-
|
|
10982
|
+
const [dark, setDark] = React28__namespace.useState(false);
|
|
10983
|
+
React28__namespace.useEffect(() => {
|
|
10335
10984
|
const saved = localStorage.getItem("theme");
|
|
10336
10985
|
const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
10337
10986
|
const isDark = saved === "dark" || !saved && prefersDark;
|
|
@@ -10360,6 +11009,44 @@ function ThemeToggle({ className }) {
|
|
|
10360
11009
|
}
|
|
10361
11010
|
);
|
|
10362
11011
|
}
|
|
11012
|
+
var chipVariants = classVarianceAuthority.cva(
|
|
11013
|
+
"inline-flex items-center rounded-full font-ui font-medium transition-colors whitespace-nowrap",
|
|
11014
|
+
{
|
|
11015
|
+
variants: {
|
|
11016
|
+
variant: {
|
|
11017
|
+
glass: "border border-white/15 bg-black/30 text-white/85 backdrop-blur-sm hover:bg-white/10 hover:border-white/50 hover:text-white",
|
|
11018
|
+
solid: "bg-muted text-foreground/80 hover:bg-primary hover:text-primary-foreground",
|
|
11019
|
+
outline: "border border-border text-foreground/80 hover:bg-primary hover:border-primary hover:text-primary-foreground"
|
|
11020
|
+
},
|
|
11021
|
+
size: {
|
|
11022
|
+
sm: "px-2.5 py-0.5 text-[11px] leading-5",
|
|
11023
|
+
md: "px-3 py-1 text-xs leading-5",
|
|
11024
|
+
lg: "px-4 py-1.5 text-sm leading-5"
|
|
11025
|
+
}
|
|
11026
|
+
},
|
|
11027
|
+
defaultVariants: {
|
|
11028
|
+
variant: "glass",
|
|
11029
|
+
size: "sm"
|
|
11030
|
+
}
|
|
11031
|
+
}
|
|
11032
|
+
);
|
|
11033
|
+
var Chip = React28__namespace.forwardRef(function Chip2(_a, ref) {
|
|
11034
|
+
var _b = _a, { className, variant, size, href, children } = _b, props = __objRest(_b, ["className", "variant", "size", "href", "children"]);
|
|
11035
|
+
const classes = cn(chipVariants({ variant, size }), className);
|
|
11036
|
+
if (href) {
|
|
11037
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11038
|
+
"a",
|
|
11039
|
+
__spreadProps(__spreadValues({
|
|
11040
|
+
ref,
|
|
11041
|
+
href,
|
|
11042
|
+
className: classes
|
|
11043
|
+
}, props), {
|
|
11044
|
+
children
|
|
11045
|
+
})
|
|
11046
|
+
);
|
|
11047
|
+
}
|
|
11048
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", __spreadProps(__spreadValues({ ref, className: classes }, props), { children }));
|
|
11049
|
+
});
|
|
10363
11050
|
function CalendarIcon6() {
|
|
10364
11051
|
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
10365
11052
|
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2" }),
|
|
@@ -10410,19 +11097,125 @@ var statusConfig = {
|
|
|
10410
11097
|
icon: /* @__PURE__ */ jsxRuntime.jsx(TrendingIcon, {})
|
|
10411
11098
|
}
|
|
10412
11099
|
};
|
|
10413
|
-
function
|
|
10414
|
-
|
|
10415
|
-
|
|
10416
|
-
|
|
10417
|
-
|
|
10418
|
-
|
|
10419
|
-
|
|
10420
|
-
|
|
10421
|
-
|
|
10422
|
-
|
|
10423
|
-
|
|
10424
|
-
|
|
10425
|
-
})
|
|
11100
|
+
function HeartIcon({ filled = false }) {
|
|
11101
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11102
|
+
"svg",
|
|
11103
|
+
{
|
|
11104
|
+
width: "16",
|
|
11105
|
+
height: "16",
|
|
11106
|
+
viewBox: "0 0 24 24",
|
|
11107
|
+
fill: filled ? "currentColor" : "none",
|
|
11108
|
+
stroke: "currentColor",
|
|
11109
|
+
strokeWidth: "2",
|
|
11110
|
+
strokeLinecap: "round",
|
|
11111
|
+
strokeLinejoin: "round",
|
|
11112
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" })
|
|
11113
|
+
}
|
|
11114
|
+
);
|
|
11115
|
+
}
|
|
11116
|
+
function TripCardEditorial(props) {
|
|
11117
|
+
const {
|
|
11118
|
+
image,
|
|
11119
|
+
imageAlt = "",
|
|
11120
|
+
title,
|
|
11121
|
+
description,
|
|
11122
|
+
nights,
|
|
11123
|
+
price,
|
|
11124
|
+
href,
|
|
11125
|
+
className,
|
|
11126
|
+
favoritable,
|
|
11127
|
+
favorited: favoritedProp,
|
|
11128
|
+
onFavoriteToggle,
|
|
11129
|
+
location,
|
|
11130
|
+
difficulty,
|
|
11131
|
+
tag
|
|
11132
|
+
} = props;
|
|
11133
|
+
const [internalFav, setInternalFav] = React28__namespace.useState(false);
|
|
11134
|
+
const favorited = favoritedProp != null ? favoritedProp : internalFav;
|
|
11135
|
+
const handleFav = (e) => {
|
|
11136
|
+
e.preventDefault();
|
|
11137
|
+
e.stopPropagation();
|
|
11138
|
+
const next = !favorited;
|
|
11139
|
+
if (favoritedProp === void 0) setInternalFav(next);
|
|
11140
|
+
onFavoriteToggle == null ? void 0 : onFavoriteToggle(next);
|
|
11141
|
+
};
|
|
11142
|
+
const body = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11143
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative aspect-[4/3] overflow-hidden bg-muted", children: [
|
|
11144
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11145
|
+
"img",
|
|
11146
|
+
{
|
|
11147
|
+
src: image,
|
|
11148
|
+
alt: imageAlt,
|
|
11149
|
+
loading: "lazy",
|
|
11150
|
+
className: "absolute inset-0 h-full w-full object-cover transition-transform duration-500 group-hover:scale-105"
|
|
11151
|
+
}
|
|
11152
|
+
),
|
|
11153
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/85 via-black/20 to-transparent" }),
|
|
11154
|
+
tag && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-3 left-3 z-10 max-w-[calc(100%-4.5rem)]", children: /* @__PURE__ */ jsxRuntime.jsx(Chip, { variant: "glass", size: "sm", children: tag }) }),
|
|
11155
|
+
favoritable && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11156
|
+
"button",
|
|
11157
|
+
{
|
|
11158
|
+
type: "button",
|
|
11159
|
+
"aria-label": favorited ? "Remove from favorites" : "Add to favorites",
|
|
11160
|
+
"aria-pressed": favorited,
|
|
11161
|
+
onClick: handleFav,
|
|
11162
|
+
className: cn(
|
|
11163
|
+
"absolute top-3 right-3 flex h-9 w-9 items-center justify-center rounded-full",
|
|
11164
|
+
"border border-white/15 bg-black/30 backdrop-blur-sm",
|
|
11165
|
+
"transition-colors hover:bg-white/10 hover:border-white/50",
|
|
11166
|
+
favorited ? "text-white" : "text-white/85 hover:text-white"
|
|
11167
|
+
),
|
|
11168
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(HeartIcon, { filled: favorited })
|
|
11169
|
+
}
|
|
11170
|
+
),
|
|
11171
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-x-0 bottom-0 p-5 text-white", children: /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg sm:text-xl font-bold font-heading leading-tight", children: title }) })
|
|
11172
|
+
] }),
|
|
11173
|
+
(description || price || nights || location || difficulty) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 bg-card p-6", children: [
|
|
11174
|
+
(location || difficulty) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
|
|
11175
|
+
location ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 text-foreground/85", children: [
|
|
11176
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.MapPinIcon, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
|
|
11177
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-ui font-semibold", children: location })
|
|
11178
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("span", {}),
|
|
11179
|
+
difficulty && /* @__PURE__ */ jsxRuntime.jsx(Chip, { variant: "outline", size: "sm", className: "capitalize text-muted-foreground", children: difficulty })
|
|
11180
|
+
] }),
|
|
11181
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground leading-relaxed line-clamp-3", children: description }),
|
|
11182
|
+
(nights || price) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-auto flex items-center justify-between gap-3", children: [
|
|
11183
|
+
nights ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 text-foreground/80", children: [
|
|
11184
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoonIcon, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
|
|
11185
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-ui font-semibold", children: [
|
|
11186
|
+
nights,
|
|
11187
|
+
" ",
|
|
11188
|
+
nights === 1 ? "night" : "nights"
|
|
11189
|
+
] })
|
|
11190
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("span", {}),
|
|
11191
|
+
price && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base font-bold text-foreground font-ui", children: price })
|
|
11192
|
+
] })
|
|
11193
|
+
] })
|
|
11194
|
+
] });
|
|
11195
|
+
const baseClasses = cn(
|
|
11196
|
+
"group relative flex flex-col overflow-hidden rounded-2xl bg-card border border-border/50",
|
|
11197
|
+
"shadow-md transition-shadow duration-300 hover:shadow-xl",
|
|
11198
|
+
className
|
|
11199
|
+
);
|
|
11200
|
+
return href ? /* @__PURE__ */ jsxRuntime.jsx("a", { href, className: baseClasses, "aria-label": title, children: body }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: baseClasses, children: body });
|
|
11201
|
+
}
|
|
11202
|
+
function TripCard(props) {
|
|
11203
|
+
if (props.variant === "editorial") {
|
|
11204
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TripCardEditorial, __spreadValues({}, props));
|
|
11205
|
+
}
|
|
11206
|
+
const {
|
|
11207
|
+
image,
|
|
11208
|
+
imageAlt = "",
|
|
11209
|
+
status,
|
|
11210
|
+
nights,
|
|
11211
|
+
period,
|
|
11212
|
+
title,
|
|
11213
|
+
description,
|
|
11214
|
+
cta,
|
|
11215
|
+
price,
|
|
11216
|
+
size = "md",
|
|
11217
|
+
className
|
|
11218
|
+
} = props;
|
|
10426
11219
|
const s = sizeConfig[size];
|
|
10427
11220
|
const statusInfo = status ? statusConfig[status] : null;
|
|
10428
11221
|
const meta = [
|
|
@@ -10482,7 +11275,7 @@ function TripCard({
|
|
|
10482
11275
|
);
|
|
10483
11276
|
}
|
|
10484
11277
|
function useHlsVideo(videoRef, src) {
|
|
10485
|
-
|
|
11278
|
+
React28__namespace.useEffect(() => {
|
|
10486
11279
|
if (!src || !videoRef.current) return;
|
|
10487
11280
|
const video = videoRef.current;
|
|
10488
11281
|
if (!src.includes(".m3u8")) return;
|
|
@@ -10519,17 +11312,18 @@ function TripHeader({
|
|
|
10519
11312
|
destination,
|
|
10520
11313
|
duration,
|
|
10521
11314
|
tagline,
|
|
11315
|
+
chips,
|
|
10522
11316
|
belowMeta,
|
|
10523
11317
|
siteHeader,
|
|
10524
11318
|
uiVariant = "v1",
|
|
10525
11319
|
className
|
|
10526
11320
|
}) {
|
|
10527
11321
|
var _a;
|
|
10528
|
-
const [heroIndex, setHeroIndex] =
|
|
10529
|
-
const [videoReady, setVideoReady] =
|
|
10530
|
-
const videoRef =
|
|
11322
|
+
const [heroIndex, setHeroIndex] = React28__namespace.useState(0);
|
|
11323
|
+
const [videoReady, setVideoReady] = React28__namespace.useState(false);
|
|
11324
|
+
const videoRef = React28__namespace.useRef(null);
|
|
10531
11325
|
const isHls = !!(videoUrl == null ? void 0 : videoUrl.includes(".m3u8"));
|
|
10532
|
-
const validImages =
|
|
11326
|
+
const validImages = React28__namespace.useMemo(
|
|
10533
11327
|
() => images.map((u) => u == null ? void 0 : u.trim()).filter(Boolean),
|
|
10534
11328
|
[images]
|
|
10535
11329
|
);
|
|
@@ -10544,7 +11338,7 @@ function TripHeader({
|
|
|
10544
11338
|
const nights = duration ? (_a = duration.nights) != null ? _a : Math.max(duration.days - 1, 1) : null;
|
|
10545
11339
|
const hasMeta = !!(destination || duration);
|
|
10546
11340
|
useHlsVideo(videoRef, isHls ? videoUrl : void 0);
|
|
10547
|
-
|
|
11341
|
+
React28__namespace.useEffect(() => {
|
|
10548
11342
|
if (!videoUrl) return;
|
|
10549
11343
|
const el = videoRef.current;
|
|
10550
11344
|
if (!el) return;
|
|
@@ -10678,15 +11472,15 @@ function TripHeader({
|
|
|
10678
11472
|
]
|
|
10679
11473
|
}
|
|
10680
11474
|
),
|
|
10681
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto w-full max-w-
|
|
11475
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto w-full max-w-6xl px-6 sm:px-8", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10682
11476
|
"div",
|
|
10683
11477
|
{
|
|
10684
11478
|
className: cn(
|
|
10685
11479
|
"relative z-10 pb-10",
|
|
10686
|
-
siteHeader ? "-mt-44" : "-mt-36"
|
|
11480
|
+
chips && chips.length > 0 ? siteHeader ? "-mt-[200px] sm:-mt-[214px]" : "-mt-[168px] sm:-mt-[182px]" : siteHeader ? "-mt-44" : "-mt-36"
|
|
10687
11481
|
),
|
|
10688
11482
|
children: [
|
|
10689
|
-
breadcrumb && breadcrumb.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-3 flex items-center gap-1.5 flex-wrap", children: breadcrumb.map((crumb, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11483
|
+
breadcrumb && breadcrumb.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-3 flex items-center gap-1.5 flex-wrap", children: breadcrumb.map((crumb, i) => /* @__PURE__ */ jsxRuntime.jsxs(React28__namespace.Fragment, { children: [
|
|
10690
11484
|
i > 0 && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, { className: "h-3 w-3 text-white/50 shrink-0" }),
|
|
10691
11485
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-white/70 font-ui hover:text-white/90 cursor-default", children: crumb.label })
|
|
10692
11486
|
] }, i)) }),
|
|
@@ -10712,6 +11506,7 @@ function TripHeader({
|
|
|
10712
11506
|
] })
|
|
10713
11507
|
] })
|
|
10714
11508
|
] }) : tagline ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-sm sm:text-base text-white/80 font-ui", children: tagline }) : null,
|
|
11509
|
+
chips && chips.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 flex flex-wrap items-center gap-1.5", children: chips.map((chip, i) => /* @__PURE__ */ jsxRuntime.jsx(Chip, { href: chip.href, children: chip.label }, i)) }),
|
|
10715
11510
|
belowMeta && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3", children: belowMeta })
|
|
10716
11511
|
]
|
|
10717
11512
|
}
|
|
@@ -10720,6 +11515,427 @@ function TripHeader({
|
|
|
10720
11515
|
}
|
|
10721
11516
|
);
|
|
10722
11517
|
}
|
|
11518
|
+
var VARIANT2 = {
|
|
11519
|
+
light: {
|
|
11520
|
+
footer: "bg-primary-50 text-foreground",
|
|
11521
|
+
heading: "text-foreground",
|
|
11522
|
+
body: "text-foreground/75",
|
|
11523
|
+
muted: "text-foreground/60",
|
|
11524
|
+
link: "text-foreground/85 hover:text-primary-800 underline decoration-foreground/25 underline-offset-4 hover:decoration-primary-800",
|
|
11525
|
+
badgeStroke: "text-foreground/80",
|
|
11526
|
+
/** Inverts white logos so they read on the light background. */
|
|
11527
|
+
badgeFilter: "[filter:invert(1)_brightness(0.2)]",
|
|
11528
|
+
socialBtn: "bg-foreground text-white hover:bg-primary-800",
|
|
11529
|
+
langTrigger: "text-foreground hover:bg-white",
|
|
11530
|
+
langOpen: "text-foreground bg-white",
|
|
11531
|
+
langChevron: "text-foreground/40",
|
|
11532
|
+
bottomBar: "border-t border-foreground/10",
|
|
11533
|
+
bottomText: "text-foreground/60",
|
|
11534
|
+
bottomLink: "text-foreground/80 hover:text-foreground underline decoration-foreground/20 underline-offset-4 hover:decoration-foreground"
|
|
11535
|
+
},
|
|
11536
|
+
dark: {
|
|
11537
|
+
footer: "bg-brand-charcoal text-white",
|
|
11538
|
+
heading: "text-white",
|
|
11539
|
+
body: "text-white/75",
|
|
11540
|
+
muted: "text-white/55",
|
|
11541
|
+
link: "text-white/85 hover:text-primary-400 underline decoration-white/20 underline-offset-4 hover:decoration-primary-400",
|
|
11542
|
+
badgeStroke: "text-white",
|
|
11543
|
+
badgeFilter: "",
|
|
11544
|
+
socialBtn: "bg-white/10 text-white hover:bg-primary-400 hover:text-primary-900",
|
|
11545
|
+
langTrigger: "text-white/85 hover:bg-white/10",
|
|
11546
|
+
langOpen: "text-white bg-white/10",
|
|
11547
|
+
langChevron: "text-white/40",
|
|
11548
|
+
bottomBar: "border-t border-white/10",
|
|
11549
|
+
bottomText: "text-white/55",
|
|
11550
|
+
bottomLink: "text-white/80 hover:text-white underline decoration-white/20 underline-offset-4 hover:decoration-white"
|
|
11551
|
+
}
|
|
11552
|
+
};
|
|
11553
|
+
var DEFAULT_FOOTER_THEMES = [
|
|
11554
|
+
{ label: "Roadtrips", href: "#" },
|
|
11555
|
+
{ label: "Saf\xE1ri", href: "#" },
|
|
11556
|
+
{ label: "Trilhas", href: "#" },
|
|
11557
|
+
{ label: "Caiaque & Canoa", href: "#" },
|
|
11558
|
+
{ label: "Aurora boreal", href: "#" },
|
|
11559
|
+
{ label: "Micro-aventuras", href: "#" },
|
|
11560
|
+
{ label: "Packrafting", href: "#" },
|
|
11561
|
+
{ label: "Glamping", href: "#" },
|
|
11562
|
+
{ label: "Surf", href: "#" },
|
|
11563
|
+
{ label: "Viagens em fam\xEDlia", href: "#" }
|
|
11564
|
+
];
|
|
11565
|
+
var DEFAULT_FOOTER_DESTINATIONS = [
|
|
11566
|
+
{ label: "Brasil", href: "#" },
|
|
11567
|
+
{ label: "Patag\xF4nia", href: "#" },
|
|
11568
|
+
{ label: "Argentina", href: "#" },
|
|
11569
|
+
{ label: "Chile", href: "#" },
|
|
11570
|
+
{ label: "Bol\xEDvia", href: "#" },
|
|
11571
|
+
{ label: "Peru", href: "#" },
|
|
11572
|
+
{ label: "Equador", href: "#" },
|
|
11573
|
+
{ label: "Col\xF4mbia", href: "#" },
|
|
11574
|
+
{ label: "Costa Rica", href: "#" },
|
|
11575
|
+
{ label: "Filipinas", href: "#" }
|
|
11576
|
+
];
|
|
11577
|
+
var DEFAULT_FOOTER_PAGES = [
|
|
11578
|
+
{ label: "Contato", href: "#" },
|
|
11579
|
+
{ label: "Pol\xEDtica de cookies", href: "#" },
|
|
11580
|
+
{ label: "FAQ", href: "#" },
|
|
11581
|
+
{ label: "Sobre n\xF3s", href: "#" }
|
|
11582
|
+
];
|
|
11583
|
+
var DEFAULT_FOOTER_LEGAL = [
|
|
11584
|
+
{ label: "Termos e condi\xE7\xF5es", href: "#" },
|
|
11585
|
+
{ label: "Mapa do site", href: "#" }
|
|
11586
|
+
];
|
|
11587
|
+
var DEFAULT_FOOTER_LANGUAGES = [
|
|
11588
|
+
{ code: "PT", label: "Portugu\xEAs" },
|
|
11589
|
+
{ code: "EN", label: "English" },
|
|
11590
|
+
{ code: "NL", label: "Nederlands" },
|
|
11591
|
+
{ code: "DE", label: "Deutsch" },
|
|
11592
|
+
{ code: "FR", label: "Fran\xE7ais" },
|
|
11593
|
+
{ code: "ES", label: "Espa\xF1ol" }
|
|
11594
|
+
];
|
|
11595
|
+
var DEFAULT_FOOTER_SOCIALS = [
|
|
11596
|
+
{ network: "facebook", href: "#" },
|
|
11597
|
+
{ network: "instagram", href: "#" },
|
|
11598
|
+
{ network: "linkedin", href: "#" }
|
|
11599
|
+
];
|
|
11600
|
+
var DEFAULT_FOOTER_BADGES = [
|
|
11601
|
+
{
|
|
11602
|
+
src: "https://static.planetaexo.com/trips/wp-content/uploads/2025/04/member_of_TLR-white-1.png",
|
|
11603
|
+
alt: "Member of The Long Run",
|
|
11604
|
+
height: 80
|
|
11605
|
+
},
|
|
11606
|
+
{
|
|
11607
|
+
src: "https://static.planetaexo.com/trips/wp-content/uploads/2025/04/atta-member_white.png",
|
|
11608
|
+
alt: "Member \xB7 Adventure Travel Trade Association",
|
|
11609
|
+
height: 56
|
|
11610
|
+
}
|
|
11611
|
+
];
|
|
11612
|
+
var SOCIAL_ICON = {
|
|
11613
|
+
facebook: lucideReact.FacebookIcon,
|
|
11614
|
+
instagram: lucideReact.InstagramIcon,
|
|
11615
|
+
linkedin: lucideReact.LinkedinIcon,
|
|
11616
|
+
youtube: lucideReact.YoutubeIcon,
|
|
11617
|
+
twitter: lucideReact.TwitterIcon
|
|
11618
|
+
};
|
|
11619
|
+
var SOCIAL_LABEL = {
|
|
11620
|
+
facebook: "Facebook",
|
|
11621
|
+
instagram: "Instagram",
|
|
11622
|
+
linkedin: "LinkedIn",
|
|
11623
|
+
youtube: "YouTube",
|
|
11624
|
+
twitter: "Twitter"
|
|
11625
|
+
};
|
|
11626
|
+
function ColumnHeading({
|
|
11627
|
+
children,
|
|
11628
|
+
className
|
|
11629
|
+
}) {
|
|
11630
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11631
|
+
"h3",
|
|
11632
|
+
{
|
|
11633
|
+
className: cn(
|
|
11634
|
+
"font-heading font-black text-base mb-5 tracking-tight",
|
|
11635
|
+
className
|
|
11636
|
+
),
|
|
11637
|
+
children
|
|
11638
|
+
}
|
|
11639
|
+
);
|
|
11640
|
+
}
|
|
11641
|
+
function LanguagePicker({
|
|
11642
|
+
variant,
|
|
11643
|
+
languages,
|
|
11644
|
+
currentLanguage,
|
|
11645
|
+
onChange
|
|
11646
|
+
}) {
|
|
11647
|
+
var _a;
|
|
11648
|
+
const t = VARIANT2[variant];
|
|
11649
|
+
const [open, setOpen] = React28__namespace.useState(false);
|
|
11650
|
+
const ref = React28__namespace.useRef(null);
|
|
11651
|
+
const active = (_a = languages.find((l) => l.code === currentLanguage)) != null ? _a : languages[0];
|
|
11652
|
+
React28__namespace.useEffect(() => {
|
|
11653
|
+
if (!open) return;
|
|
11654
|
+
const onDocClick = (e) => {
|
|
11655
|
+
if (ref.current && !ref.current.contains(e.target)) {
|
|
11656
|
+
setOpen(false);
|
|
11657
|
+
}
|
|
11658
|
+
};
|
|
11659
|
+
document.addEventListener("mousedown", onDocClick);
|
|
11660
|
+
return () => document.removeEventListener("mousedown", onDocClick);
|
|
11661
|
+
}, [open]);
|
|
11662
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: "relative inline-block", children: [
|
|
11663
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11664
|
+
"button",
|
|
11665
|
+
{
|
|
11666
|
+
type: "button",
|
|
11667
|
+
onClick: () => setOpen((v) => !v),
|
|
11668
|
+
"aria-haspopup": "listbox",
|
|
11669
|
+
"aria-expanded": open,
|
|
11670
|
+
className: cn(
|
|
11671
|
+
"inline-flex items-center gap-1 px-3 py-1.5 rounded-full text-sm font-ui transition-colors",
|
|
11672
|
+
t.langTrigger,
|
|
11673
|
+
open && t.langOpen
|
|
11674
|
+
),
|
|
11675
|
+
children: [
|
|
11676
|
+
active == null ? void 0 : active.code,
|
|
11677
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11678
|
+
lucideReact.ChevronDownIcon,
|
|
11679
|
+
{
|
|
11680
|
+
className: cn(
|
|
11681
|
+
"h-3 w-3 transition-transform duration-150",
|
|
11682
|
+
t.langChevron,
|
|
11683
|
+
open && "rotate-180"
|
|
11684
|
+
)
|
|
11685
|
+
}
|
|
11686
|
+
)
|
|
11687
|
+
]
|
|
11688
|
+
}
|
|
11689
|
+
),
|
|
11690
|
+
open && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11691
|
+
"div",
|
|
11692
|
+
{
|
|
11693
|
+
role: "listbox",
|
|
11694
|
+
className: "absolute left-0 bottom-[calc(100%+8px)] min-w-[180px] rounded-xl bg-white shadow-2xl border border-black/8 py-1.5 z-10",
|
|
11695
|
+
children: languages.map((lang) => {
|
|
11696
|
+
const isActive = lang.code === (active == null ? void 0 : active.code);
|
|
11697
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11698
|
+
"button",
|
|
11699
|
+
{
|
|
11700
|
+
type: "button",
|
|
11701
|
+
role: "option",
|
|
11702
|
+
"aria-selected": isActive,
|
|
11703
|
+
onClick: () => {
|
|
11704
|
+
onChange == null ? void 0 : onChange(lang.code);
|
|
11705
|
+
setOpen(false);
|
|
11706
|
+
},
|
|
11707
|
+
className: cn(
|
|
11708
|
+
"flex items-center gap-3 w-full px-5 py-2.5 text-sm font-ui text-left transition-colors hover:bg-muted",
|
|
11709
|
+
isActive ? "text-primary font-semibold" : "text-foreground"
|
|
11710
|
+
),
|
|
11711
|
+
children: [
|
|
11712
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold w-8 shrink-0", children: lang.code }),
|
|
11713
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: lang.label })
|
|
11714
|
+
]
|
|
11715
|
+
},
|
|
11716
|
+
lang.code
|
|
11717
|
+
);
|
|
11718
|
+
})
|
|
11719
|
+
}
|
|
11720
|
+
)
|
|
11721
|
+
] });
|
|
11722
|
+
}
|
|
11723
|
+
function SiteFooter({
|
|
11724
|
+
variant = "dark",
|
|
11725
|
+
brandTitle = "PlanetaEXO",
|
|
11726
|
+
logoSrcLight = "/logo-planetaexo-white.png",
|
|
11727
|
+
logoSrcDark = "/logo-planetaexo-green.png",
|
|
11728
|
+
logoSrc,
|
|
11729
|
+
logoAlt = "PlanetaEXO",
|
|
11730
|
+
logoHref = "#",
|
|
11731
|
+
brandDescription = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11732
|
+
"A PlanetaEXO \xE9 uma ag\xEAncia brasileira especializada em viagens de ecoturismo e aventura. Operamos com guias locais credenciados e parceiros que respeitam comunidades e ecossistemas.",
|
|
11733
|
+
" ",
|
|
11734
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11735
|
+
"a",
|
|
11736
|
+
{
|
|
11737
|
+
href: "#",
|
|
11738
|
+
className: "font-bold underline decoration-current/30 underline-offset-4 hover:decoration-current",
|
|
11739
|
+
children: "Pol\xEDtica de privacidade"
|
|
11740
|
+
}
|
|
11741
|
+
)
|
|
11742
|
+
] }),
|
|
11743
|
+
badges = DEFAULT_FOOTER_BADGES,
|
|
11744
|
+
languages = DEFAULT_FOOTER_LANGUAGES,
|
|
11745
|
+
currentLanguage = "PT",
|
|
11746
|
+
onLanguageChange,
|
|
11747
|
+
address = {
|
|
11748
|
+
title: "Basecamp S\xE3o Paulo",
|
|
11749
|
+
lines: ["Av. Paulista, 1234", "01310-100 S\xE3o Paulo \xB7 Brasil"]
|
|
11750
|
+
},
|
|
11751
|
+
phone = "+55 11 9999-0000",
|
|
11752
|
+
email = "ola@planetaexo.com",
|
|
11753
|
+
socials = DEFAULT_FOOTER_SOCIALS,
|
|
11754
|
+
themesTitle = "Temas",
|
|
11755
|
+
themes = DEFAULT_FOOTER_THEMES,
|
|
11756
|
+
destinationsTitle = "Destinos",
|
|
11757
|
+
destinations = DEFAULT_FOOTER_DESTINATIONS,
|
|
11758
|
+
destinationsMore = { label: "Ver todos os destinos", href: "#" },
|
|
11759
|
+
pagesTitle = "P\xE1ginas",
|
|
11760
|
+
pages = DEFAULT_FOOTER_PAGES,
|
|
11761
|
+
cta = {
|
|
11762
|
+
title: "Colaborar?",
|
|
11763
|
+
label: "parceiros@planetaexo.com",
|
|
11764
|
+
href: "mailto:parceiros@planetaexo.com"
|
|
11765
|
+
},
|
|
11766
|
+
copyright,
|
|
11767
|
+
legalLinks = DEFAULT_FOOTER_LEGAL,
|
|
11768
|
+
className
|
|
11769
|
+
}) {
|
|
11770
|
+
const t = VARIANT2[variant];
|
|
11771
|
+
const resolvedLogo = logoSrc != null ? logoSrc : variant === "light" ? logoSrcDark : logoSrcLight;
|
|
11772
|
+
const year = (/* @__PURE__ */ new Date()).getFullYear();
|
|
11773
|
+
const copy = copyright != null ? copyright : `\xA9 ${year} ${brandTitle}. Todos os direitos reservados.`;
|
|
11774
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("footer", { className: cn(t.footer, className), children: [
|
|
11775
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-7xl mx-auto px-6 sm:px-10 pt-16 pb-10", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-12 gap-x-8 gap-y-12", children: [
|
|
11776
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "lg:col-span-4 space-y-6", children: [
|
|
11777
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11778
|
+
"a",
|
|
11779
|
+
{
|
|
11780
|
+
href: logoHref,
|
|
11781
|
+
className: "inline-flex items-center",
|
|
11782
|
+
"aria-label": logoAlt,
|
|
11783
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11784
|
+
"img",
|
|
11785
|
+
{
|
|
11786
|
+
src: resolvedLogo,
|
|
11787
|
+
alt: logoAlt,
|
|
11788
|
+
className: "h-16 w-auto select-none",
|
|
11789
|
+
draggable: false
|
|
11790
|
+
}
|
|
11791
|
+
)
|
|
11792
|
+
}
|
|
11793
|
+
),
|
|
11794
|
+
brandDescription && /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("font-sans text-sm leading-relaxed", t.body), children: brandDescription }),
|
|
11795
|
+
address && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
11796
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: cn("font-heading font-black text-base", t.heading), children: address.title }),
|
|
11797
|
+
/* @__PURE__ */ jsxRuntime.jsx("address", { className: cn("not-italic text-sm leading-relaxed font-sans", t.body), children: address.lines.map((line, i) => /* @__PURE__ */ jsxRuntime.jsx("div", { children: line }, i)) })
|
|
11798
|
+
] }),
|
|
11799
|
+
(phone || email) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5 text-sm font-ui font-bold", children: [
|
|
11800
|
+
phone && /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: `tel:${phone.replace(/\s+/g, "")}`, className: t.link, children: phone }) }),
|
|
11801
|
+
email && /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: `mailto:${email}`, className: t.link, children: email }) })
|
|
11802
|
+
] }),
|
|
11803
|
+
socials.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: socials.map((s) => {
|
|
11804
|
+
var _a;
|
|
11805
|
+
const Icon = SOCIAL_ICON[s.network];
|
|
11806
|
+
const label = (_a = s.label) != null ? _a : SOCIAL_LABEL[s.network];
|
|
11807
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11808
|
+
"a",
|
|
11809
|
+
{
|
|
11810
|
+
href: s.href,
|
|
11811
|
+
"aria-label": label,
|
|
11812
|
+
className: cn(
|
|
11813
|
+
"flex h-9 w-9 items-center justify-center rounded-full transition-colors",
|
|
11814
|
+
t.socialBtn
|
|
11815
|
+
),
|
|
11816
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "h-4 w-4", strokeWidth: 2.25 })
|
|
11817
|
+
},
|
|
11818
|
+
s.network + s.href
|
|
11819
|
+
);
|
|
11820
|
+
}) }),
|
|
11821
|
+
badges && badges.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap items-center gap-5 pt-2", children: badges.map((b, i) => {
|
|
11822
|
+
var _a, _b;
|
|
11823
|
+
const content = (_b = b.node) != null ? _b : /* @__PURE__ */ jsxRuntime.jsx(
|
|
11824
|
+
"img",
|
|
11825
|
+
{
|
|
11826
|
+
src: b.src,
|
|
11827
|
+
alt: b.alt,
|
|
11828
|
+
style: { height: (_a = b.height) != null ? _a : 56 },
|
|
11829
|
+
className: "block w-auto object-contain",
|
|
11830
|
+
draggable: false
|
|
11831
|
+
}
|
|
11832
|
+
);
|
|
11833
|
+
const wrapper = /* @__PURE__ */ jsxRuntime.jsx(
|
|
11834
|
+
"span",
|
|
11835
|
+
{
|
|
11836
|
+
className: cn(
|
|
11837
|
+
"inline-flex items-center",
|
|
11838
|
+
t.badgeStroke,
|
|
11839
|
+
t.badgeFilter
|
|
11840
|
+
),
|
|
11841
|
+
children: content
|
|
11842
|
+
}
|
|
11843
|
+
);
|
|
11844
|
+
return b.href ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
11845
|
+
"a",
|
|
11846
|
+
{
|
|
11847
|
+
href: b.href,
|
|
11848
|
+
"aria-label": b.alt,
|
|
11849
|
+
className: "hover:opacity-80 transition-opacity",
|
|
11850
|
+
children: wrapper
|
|
11851
|
+
},
|
|
11852
|
+
b.alt + i
|
|
11853
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(React28__namespace.Fragment, { children: wrapper }, b.alt + i);
|
|
11854
|
+
}) })
|
|
11855
|
+
] }),
|
|
11856
|
+
themes.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "lg:col-span-3", children: [
|
|
11857
|
+
/* @__PURE__ */ jsxRuntime.jsx(ColumnHeading, { className: t.heading, children: themesTitle }),
|
|
11858
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-2.5", children: themes.map((c) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11859
|
+
"a",
|
|
11860
|
+
{
|
|
11861
|
+
href: c.href,
|
|
11862
|
+
className: cn("text-sm font-ui font-bold", t.link),
|
|
11863
|
+
children: c.label
|
|
11864
|
+
}
|
|
11865
|
+
) }, c.label)) })
|
|
11866
|
+
] }),
|
|
11867
|
+
destinations.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "lg:col-span-3", children: [
|
|
11868
|
+
/* @__PURE__ */ jsxRuntime.jsx(ColumnHeading, { className: t.heading, children: destinationsTitle }),
|
|
11869
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-2.5", children: destinations.map((c) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11870
|
+
"a",
|
|
11871
|
+
{
|
|
11872
|
+
href: c.href,
|
|
11873
|
+
className: cn("text-sm font-ui font-bold", t.link),
|
|
11874
|
+
children: c.label
|
|
11875
|
+
}
|
|
11876
|
+
) }, c.label)) }),
|
|
11877
|
+
destinationsMore && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11878
|
+
"a",
|
|
11879
|
+
{
|
|
11880
|
+
href: destinationsMore.href,
|
|
11881
|
+
className: cn(
|
|
11882
|
+
"inline-flex items-center gap-1.5 mt-5 text-sm font-ui font-bold",
|
|
11883
|
+
t.link
|
|
11884
|
+
),
|
|
11885
|
+
children: [
|
|
11886
|
+
destinationsMore.label,
|
|
11887
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRightIcon, { className: "h-3.5 w-3.5 no-underline" })
|
|
11888
|
+
]
|
|
11889
|
+
}
|
|
11890
|
+
)
|
|
11891
|
+
] }),
|
|
11892
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "lg:col-span-2 space-y-8", children: [
|
|
11893
|
+
pages.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
11894
|
+
/* @__PURE__ */ jsxRuntime.jsx(ColumnHeading, { className: t.heading, children: pagesTitle }),
|
|
11895
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-2.5", children: pages.map((p) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11896
|
+
"a",
|
|
11897
|
+
{
|
|
11898
|
+
href: p.href,
|
|
11899
|
+
className: cn("text-sm font-ui font-bold", t.link),
|
|
11900
|
+
children: p.label
|
|
11901
|
+
}
|
|
11902
|
+
) }, p.label)) })
|
|
11903
|
+
] }),
|
|
11904
|
+
cta && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
11905
|
+
/* @__PURE__ */ jsxRuntime.jsx(ColumnHeading, { className: t.heading, children: cta.title }),
|
|
11906
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11907
|
+
"a",
|
|
11908
|
+
{
|
|
11909
|
+
href: cta.href,
|
|
11910
|
+
className: cn("text-sm font-ui font-bold break-all", t.link),
|
|
11911
|
+
children: cta.label
|
|
11912
|
+
}
|
|
11913
|
+
)
|
|
11914
|
+
] })
|
|
11915
|
+
] })
|
|
11916
|
+
] }) }),
|
|
11917
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(t.bottomBar), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-7xl mx-auto px-6 sm:px-10 py-4 flex flex-wrap items-center gap-x-6 gap-y-3", children: [
|
|
11918
|
+
languages.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11919
|
+
LanguagePicker,
|
|
11920
|
+
{
|
|
11921
|
+
variant,
|
|
11922
|
+
languages,
|
|
11923
|
+
currentLanguage,
|
|
11924
|
+
onChange: onLanguageChange
|
|
11925
|
+
}
|
|
11926
|
+
),
|
|
11927
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-xs font-ui", t.bottomText), children: copy }),
|
|
11928
|
+
legalLinks.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-wrap items-center gap-x-6 gap-y-2", children: legalLinks.map((l) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11929
|
+
"a",
|
|
11930
|
+
{
|
|
11931
|
+
href: l.href,
|
|
11932
|
+
className: cn("text-xs font-ui font-bold", t.bottomLink),
|
|
11933
|
+
children: l.label
|
|
11934
|
+
}
|
|
11935
|
+
) }, l.label)) })
|
|
11936
|
+
] }) })
|
|
11937
|
+
] });
|
|
11938
|
+
}
|
|
10723
11939
|
function Stars({ count = 5 }) {
|
|
10724
11940
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex gap-0.5", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10725
11941
|
lucideReact.StarIcon,
|
|
@@ -10763,9 +11979,9 @@ function TripPage({
|
|
|
10763
11979
|
images,
|
|
10764
11980
|
videoUrl,
|
|
10765
11981
|
breadcrumb,
|
|
11982
|
+
chips,
|
|
10766
11983
|
highlights,
|
|
10767
|
-
|
|
10768
|
-
keyInfo,
|
|
11984
|
+
howToGetThere,
|
|
10769
11985
|
recommendedFor,
|
|
10770
11986
|
overview,
|
|
10771
11987
|
overviewHighlights,
|
|
@@ -10783,6 +11999,7 @@ function TripPage({
|
|
|
10783
11999
|
meetingPoints,
|
|
10784
12000
|
meetingPoint,
|
|
10785
12001
|
faqs,
|
|
12002
|
+
faqInitialCount = 5,
|
|
10786
12003
|
sectionIcons,
|
|
10787
12004
|
reviews,
|
|
10788
12005
|
trustpilot,
|
|
@@ -10802,11 +12019,12 @@ function TripPage({
|
|
|
10802
12019
|
features,
|
|
10803
12020
|
className
|
|
10804
12021
|
}) {
|
|
10805
|
-
const [activeSection, setActiveSection] =
|
|
10806
|
-
const [accordionValue, setAccordionValue] =
|
|
10807
|
-
const
|
|
12022
|
+
const [activeSection, setActiveSection] = React28__namespace.useState("");
|
|
12023
|
+
const [accordionValue, setAccordionValue] = React28__namespace.useState([]);
|
|
12024
|
+
const [faqsExpanded, setFaqsExpanded] = React28__namespace.useState(false);
|
|
12025
|
+
const accordionSectionIds = React28__namespace.useMemo(
|
|
10808
12026
|
() => /* @__PURE__ */ new Set([
|
|
10809
|
-
"
|
|
12027
|
+
"how-to-get-there",
|
|
10810
12028
|
"what-to-bring",
|
|
10811
12029
|
"weather",
|
|
10812
12030
|
"optional-extras",
|
|
@@ -10817,18 +12035,18 @@ function TripPage({
|
|
|
10817
12035
|
]),
|
|
10818
12036
|
[]
|
|
10819
12037
|
);
|
|
10820
|
-
const [navFloating, setNavFloating] =
|
|
10821
|
-
const [navHidden, setNavHidden] =
|
|
10822
|
-
const [isFloating, setIsFloating] =
|
|
10823
|
-
const [sidebarPos, setSidebarPos] =
|
|
10824
|
-
const [pricingBarVisible, setPricingBarVisible] =
|
|
10825
|
-
const navRef =
|
|
10826
|
-
const navSentinelRef =
|
|
10827
|
-
const sentinelRef =
|
|
10828
|
-
const sidebarPlaceholderRef =
|
|
10829
|
-
const pricingBarRef =
|
|
10830
|
-
const galleryRef =
|
|
10831
|
-
const sections =
|
|
12038
|
+
const [navFloating, setNavFloating] = React28__namespace.useState(false);
|
|
12039
|
+
const [navHidden, setNavHidden] = React28__namespace.useState(false);
|
|
12040
|
+
const [isFloating, setIsFloating] = React28__namespace.useState(false);
|
|
12041
|
+
const [sidebarPos, setSidebarPos] = React28__namespace.useState(null);
|
|
12042
|
+
const [pricingBarVisible, setPricingBarVisible] = React28__namespace.useState(false);
|
|
12043
|
+
const navRef = React28__namespace.useRef(null);
|
|
12044
|
+
const navSentinelRef = React28__namespace.useRef(null);
|
|
12045
|
+
const sentinelRef = React28__namespace.useRef(null);
|
|
12046
|
+
const sidebarPlaceholderRef = React28__namespace.useRef(null);
|
|
12047
|
+
const pricingBarRef = React28__namespace.useRef(null);
|
|
12048
|
+
const galleryRef = React28__namespace.useRef(null);
|
|
12049
|
+
const sections = React28__namespace.useMemo(
|
|
10832
12050
|
() => [
|
|
10833
12051
|
{ id: "overview", label: "Overview", show: !!(overview || (overviewHighlights == null ? void 0 : overviewHighlights.length)) },
|
|
10834
12052
|
{
|
|
@@ -10846,7 +12064,7 @@ function TripPage({
|
|
|
10846
12064
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
10847
12065
|
[]
|
|
10848
12066
|
);
|
|
10849
|
-
|
|
12067
|
+
React28__namespace.useEffect(() => {
|
|
10850
12068
|
const sentinel = navSentinelRef.current;
|
|
10851
12069
|
if (!sentinel) return;
|
|
10852
12070
|
const update = () => setNavFloating(sentinel.getBoundingClientRect().top < 1);
|
|
@@ -10854,7 +12072,7 @@ function TripPage({
|
|
|
10854
12072
|
update();
|
|
10855
12073
|
return () => document.removeEventListener("scroll", update, { capture: true });
|
|
10856
12074
|
}, []);
|
|
10857
|
-
|
|
12075
|
+
React28__namespace.useEffect(() => {
|
|
10858
12076
|
const sentinel = sentinelRef.current;
|
|
10859
12077
|
if (!sentinel) return;
|
|
10860
12078
|
const update = () => setIsFloating(sentinel.getBoundingClientRect().top < 1);
|
|
@@ -10862,7 +12080,7 @@ function TripPage({
|
|
|
10862
12080
|
update();
|
|
10863
12081
|
return () => document.removeEventListener("scroll", update, { capture: true });
|
|
10864
12082
|
}, []);
|
|
10865
|
-
|
|
12083
|
+
React28__namespace.useEffect(() => {
|
|
10866
12084
|
const measure = () => {
|
|
10867
12085
|
if (!sidebarPlaceholderRef.current) return;
|
|
10868
12086
|
const rect = sidebarPlaceholderRef.current.getBoundingClientRect();
|
|
@@ -10872,7 +12090,7 @@ function TripPage({
|
|
|
10872
12090
|
window.addEventListener("resize", measure);
|
|
10873
12091
|
return () => window.removeEventListener("resize", measure);
|
|
10874
12092
|
}, [isFloating]);
|
|
10875
|
-
|
|
12093
|
+
React28__namespace.useEffect(() => {
|
|
10876
12094
|
const check = () => {
|
|
10877
12095
|
var _a;
|
|
10878
12096
|
const target = (_a = galleryRef.current) != null ? _a : pricingBarRef.current;
|
|
@@ -10883,7 +12101,7 @@ function TripPage({
|
|
|
10883
12101
|
check();
|
|
10884
12102
|
return () => document.removeEventListener("scroll", check, { capture: true });
|
|
10885
12103
|
}, []);
|
|
10886
|
-
|
|
12104
|
+
React28__namespace.useEffect(() => {
|
|
10887
12105
|
const check = () => {
|
|
10888
12106
|
if (!pricingBarRef.current) return;
|
|
10889
12107
|
setNavHidden(pricingBarRef.current.getBoundingClientRect().top < window.innerHeight * 0.92);
|
|
@@ -10892,7 +12110,7 @@ function TripPage({
|
|
|
10892
12110
|
check();
|
|
10893
12111
|
return () => document.removeEventListener("scroll", check, { capture: true });
|
|
10894
12112
|
}, []);
|
|
10895
|
-
|
|
12113
|
+
React28__namespace.useEffect(() => {
|
|
10896
12114
|
if (sections.length === 0) return;
|
|
10897
12115
|
setActiveSection(sections[0].id);
|
|
10898
12116
|
const update = () => {
|
|
@@ -10967,6 +12185,7 @@ function TripPage({
|
|
|
10967
12185
|
destination,
|
|
10968
12186
|
duration,
|
|
10969
12187
|
tagline,
|
|
12188
|
+
chips,
|
|
10970
12189
|
siteHeader,
|
|
10971
12190
|
uiVariant,
|
|
10972
12191
|
belowMeta: trustpilotHero ? /* @__PURE__ */ jsxRuntime.jsx(TrustpilotEmbed, { config: trustpilotHero }) : void 0
|
|
@@ -11000,10 +12219,7 @@ function TripPage({
|
|
|
11000
12219
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col lg:flex-row gap-8 mt-4", children: [
|
|
11001
12220
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0 space-y-12 pb-12", children: [
|
|
11002
12221
|
(overview || (overviewHighlights == null ? void 0 : overviewHighlights.length)) && /* @__PURE__ */ jsxRuntime.jsxs("section", { id: "trip-section-overview", className: "scroll-mt-20", children: [
|
|
11003
|
-
/* @__PURE__ */ jsxRuntime.
|
|
11004
|
-
(sectionIcons == null ? void 0 : sectionIcons.overview) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.overview }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-5 w-5 text-primary" }),
|
|
11005
|
-
"Overview"
|
|
11006
|
-
] }),
|
|
12222
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-bold text-foreground font-heading mb-4", children: "Overview" }),
|
|
11007
12223
|
overview && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-lg text-foreground leading-relaxed space-y-3 [&_strong]:font-semibold [&_a]:text-primary [&_a]:underline", children: overview }),
|
|
11008
12224
|
overviewHighlights && overviewHighlights.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: cn("flex flex-col gap-5", overview && "mt-8"), children: overviewHighlights.map((h, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-start gap-4", children: [
|
|
11009
12225
|
h.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-10 w-10 shrink-0 items-center justify-center text-foreground [&_svg]:h-8 [&_svg]:w-8", children: h.icon }),
|
|
@@ -11050,7 +12266,7 @@ function TripPage({
|
|
|
11050
12266
|
}
|
|
11051
12267
|
)
|
|
11052
12268
|
] }),
|
|
11053
|
-
(
|
|
12269
|
+
(howToGetThere || (whatToBring == null ? void 0 : whatToBring.length) || weather || optionalExtras || accommodation || food || (meetingPoints == null ? void 0 : meetingPoints.length) || meetingPoint || termsAndConditions) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11054
12270
|
Accordion,
|
|
11055
12271
|
{
|
|
11056
12272
|
multiple: false,
|
|
@@ -11058,25 +12274,33 @@ function TripPage({
|
|
|
11058
12274
|
onValueChange: setAccordionValue,
|
|
11059
12275
|
className: "border-t border-border",
|
|
11060
12276
|
children: [
|
|
11061
|
-
|
|
12277
|
+
accommodation && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12278
|
+
AccordionItem,
|
|
12279
|
+
{
|
|
12280
|
+
value: "accommodation",
|
|
12281
|
+
id: "trip-section-accommodation",
|
|
12282
|
+
className: "scroll-mt-20 border-b border-border",
|
|
12283
|
+
children: [
|
|
12284
|
+
/* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: "py-5 text-xl font-bold text-foreground font-heading hover:no-underline", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
|
|
12285
|
+
(sectionIcons == null ? void 0 : sectionIcons.accommodation) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.accommodation }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BedDoubleIcon, { className: "h-5 w-5 text-primary" }),
|
|
12286
|
+
"Accommodation"
|
|
12287
|
+
] }) }),
|
|
12288
|
+
/* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base text-foreground leading-relaxed space-y-3 [&_strong]:font-semibold [&_a]:text-primary [&_a]:underline", children: accommodation }) })
|
|
12289
|
+
]
|
|
12290
|
+
}
|
|
12291
|
+
),
|
|
12292
|
+
food && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11062
12293
|
AccordionItem,
|
|
11063
12294
|
{
|
|
11064
|
-
value: "
|
|
11065
|
-
id: "trip-section-
|
|
12295
|
+
value: "food",
|
|
12296
|
+
id: "trip-section-food",
|
|
11066
12297
|
className: "scroll-mt-20 border-b border-border",
|
|
11067
12298
|
children: [
|
|
11068
12299
|
/* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: "py-5 text-xl font-bold text-foreground font-heading hover:no-underline", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
|
|
11069
|
-
(sectionIcons == null ? void 0 : sectionIcons.
|
|
11070
|
-
"
|
|
12300
|
+
(sectionIcons == null ? void 0 : sectionIcons.food) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.food }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UtensilsIcon, { className: "h-5 w-5 text-primary" }),
|
|
12301
|
+
"Food"
|
|
11071
12302
|
] }) }),
|
|
11072
|
-
/* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children:
|
|
11073
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mb-3", children: [
|
|
11074
|
-
group.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: group.icon }),
|
|
11075
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-bold text-foreground font-heading", children: group.title })
|
|
11076
|
-
] }),
|
|
11077
|
-
/* @__PURE__ */ jsxRuntime.jsx(Checklist, { items: group.items }),
|
|
11078
|
-
i < infoGroups.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(Separator, { className: "mt-6" })
|
|
11079
|
-
] }, i)) }) })
|
|
12303
|
+
/* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base text-foreground leading-relaxed space-y-3 [&_strong]:font-semibold [&_a]:text-primary [&_a]:underline", children: food }) })
|
|
11080
12304
|
]
|
|
11081
12305
|
}
|
|
11082
12306
|
),
|
|
@@ -11102,78 +12326,63 @@ function TripPage({
|
|
|
11102
12326
|
]
|
|
11103
12327
|
}
|
|
11104
12328
|
),
|
|
11105
|
-
|
|
12329
|
+
howToGetThere && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11106
12330
|
AccordionItem,
|
|
11107
12331
|
{
|
|
11108
|
-
value: "
|
|
11109
|
-
id: "trip-section-
|
|
12332
|
+
value: "how-to-get-there",
|
|
12333
|
+
id: "trip-section-how-to-get-there",
|
|
11110
12334
|
className: "scroll-mt-20 border-b border-border",
|
|
11111
12335
|
children: [
|
|
11112
12336
|
/* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: "py-5 text-xl font-bold text-foreground font-heading hover:no-underline", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
|
|
11113
|
-
(sectionIcons == null ? void 0 : sectionIcons.
|
|
11114
|
-
"
|
|
12337
|
+
(sectionIcons == null ? void 0 : sectionIcons.howToGetThere) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.howToGetThere }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CompassIcon, { className: "h-5 w-5 text-primary" }),
|
|
12338
|
+
"How to get there"
|
|
11115
12339
|
] }) }),
|
|
11116
|
-
/* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base text-foreground leading-relaxed space-y-3 [&_strong]:font-semibold [&_a]:text-primary [&_a]:underline", children:
|
|
12340
|
+
/* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base text-foreground leading-relaxed space-y-3 [&_strong]:font-semibold [&_a]:text-primary [&_a]:underline", children: howToGetThere }) })
|
|
11117
12341
|
]
|
|
11118
12342
|
}
|
|
11119
12343
|
),
|
|
11120
|
-
|
|
11121
|
-
AccordionItem,
|
|
11122
|
-
{
|
|
11123
|
-
value: "what-to-bring",
|
|
11124
|
-
id: "trip-section-what-to-bring",
|
|
11125
|
-
className: "scroll-mt-20 border-b border-border",
|
|
11126
|
-
children: [
|
|
11127
|
-
/* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: "py-5 text-xl font-bold text-foreground font-heading hover:no-underline", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
|
|
11128
|
-
(sectionIcons == null ? void 0 : sectionIcons.whatToBring) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.whatToBring }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BackpackIcon, { className: "h-5 w-5 text-primary" }),
|
|
11129
|
-
"What to bring"
|
|
11130
|
-
] }) }),
|
|
11131
|
-
/* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx(Checklist, { items: whatToBring, icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4" }) }) })
|
|
11132
|
-
]
|
|
11133
|
-
}
|
|
11134
|
-
),
|
|
11135
|
-
accommodation && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12344
|
+
weather && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11136
12345
|
AccordionItem,
|
|
11137
12346
|
{
|
|
11138
|
-
value: "
|
|
11139
|
-
id: "trip-section-
|
|
12347
|
+
value: "weather",
|
|
12348
|
+
id: "trip-section-weather",
|
|
11140
12349
|
className: "scroll-mt-20 border-b border-border",
|
|
11141
12350
|
children: [
|
|
11142
12351
|
/* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: "py-5 text-xl font-bold text-foreground font-heading hover:no-underline", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
|
|
11143
|
-
(sectionIcons == null ? void 0 : sectionIcons.
|
|
11144
|
-
"
|
|
12352
|
+
(sectionIcons == null ? void 0 : sectionIcons.weather) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.weather }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SunIcon, { className: "h-5 w-5 text-primary" }),
|
|
12353
|
+
"Weather"
|
|
11145
12354
|
] }) }),
|
|
11146
|
-
/* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base text-foreground leading-relaxed space-y-
|
|
12355
|
+
/* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-start gap-3 rounded-xl bg-muted/60 border border-border p-5", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base text-foreground leading-relaxed space-y-2 [&_strong]:font-semibold", children: weather }) }) })
|
|
11147
12356
|
]
|
|
11148
12357
|
}
|
|
11149
12358
|
),
|
|
11150
|
-
|
|
12359
|
+
whatToBring && whatToBring.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11151
12360
|
AccordionItem,
|
|
11152
12361
|
{
|
|
11153
|
-
value: "
|
|
11154
|
-
id: "trip-section-
|
|
12362
|
+
value: "what-to-bring",
|
|
12363
|
+
id: "trip-section-what-to-bring",
|
|
11155
12364
|
className: "scroll-mt-20 border-b border-border",
|
|
11156
12365
|
children: [
|
|
11157
12366
|
/* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: "py-5 text-xl font-bold text-foreground font-heading hover:no-underline", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
|
|
11158
|
-
(sectionIcons == null ? void 0 : sectionIcons.
|
|
11159
|
-
"
|
|
12367
|
+
(sectionIcons == null ? void 0 : sectionIcons.whatToBring) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.whatToBring }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BackpackIcon, { className: "h-5 w-5 text-primary" }),
|
|
12368
|
+
"What to bring"
|
|
11160
12369
|
] }) }),
|
|
11161
|
-
/* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12370
|
+
/* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx(Checklist, { items: whatToBring, icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4" }) }) })
|
|
11162
12371
|
]
|
|
11163
12372
|
}
|
|
11164
12373
|
),
|
|
11165
|
-
|
|
12374
|
+
optionalExtras && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11166
12375
|
AccordionItem,
|
|
11167
12376
|
{
|
|
11168
|
-
value: "
|
|
11169
|
-
id: "trip-section-
|
|
12377
|
+
value: "optional-extras",
|
|
12378
|
+
id: "trip-section-optional-extras",
|
|
11170
12379
|
className: "scroll-mt-20 border-b border-border",
|
|
11171
12380
|
children: [
|
|
11172
12381
|
/* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: "py-5 text-xl font-bold text-foreground font-heading hover:no-underline", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
|
|
11173
|
-
(sectionIcons == null ? void 0 : sectionIcons.
|
|
11174
|
-
"
|
|
12382
|
+
(sectionIcons == null ? void 0 : sectionIcons.optionalExtras) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.optionalExtras }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CherryIcon, { className: "h-5 w-5 text-primary" }),
|
|
12383
|
+
"Optional extras"
|
|
11175
12384
|
] }) }),
|
|
11176
|
-
/* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "
|
|
12385
|
+
/* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base text-foreground leading-relaxed space-y-3 [&_strong]:font-semibold [&_a]:text-primary [&_a]:underline", children: optionalExtras }) })
|
|
11177
12386
|
]
|
|
11178
12387
|
}
|
|
11179
12388
|
),
|
|
@@ -11195,13 +12404,39 @@ function TripPage({
|
|
|
11195
12404
|
]
|
|
11196
12405
|
}
|
|
11197
12406
|
),
|
|
11198
|
-
faqs && faqs.length > 0 &&
|
|
11199
|
-
|
|
11200
|
-
|
|
11201
|
-
|
|
11202
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11203
|
-
|
|
11204
|
-
|
|
12407
|
+
faqs && faqs.length > 0 && (() => {
|
|
12408
|
+
const visibleFaqs = faqsExpanded ? faqs : faqs.slice(0, faqInitialCount);
|
|
12409
|
+
const hiddenCount = faqs.length - visibleFaqs.length;
|
|
12410
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { id: "trip-section-faq", className: "scroll-mt-20", children: [
|
|
12411
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-bold text-foreground font-heading mb-6", children: "FAQ" }),
|
|
12412
|
+
/* @__PURE__ */ jsxRuntime.jsx(Accordion, { variant: "faq", children: visibleFaqs.map((faq, i) => /* @__PURE__ */ jsxRuntime.jsxs(AccordionItem, { value: `faq-${i}`, children: [
|
|
12413
|
+
/* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { children: faq.question }),
|
|
12414
|
+
/* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { children: faq.answer })
|
|
12415
|
+
] }, i)) }),
|
|
12416
|
+
faqs.length > faqInitialCount && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-5 flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12417
|
+
"button",
|
|
12418
|
+
{
|
|
12419
|
+
type: "button",
|
|
12420
|
+
onClick: () => setFaqsExpanded((v) => !v),
|
|
12421
|
+
className: cn(
|
|
12422
|
+
"inline-flex items-center gap-2 rounded-full border border-border bg-background px-5 py-2.5",
|
|
12423
|
+
"text-sm font-semibold text-foreground shadow-sm",
|
|
12424
|
+
"hover:bg-muted transition-colors duration-150",
|
|
12425
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
12426
|
+
),
|
|
12427
|
+
children: faqsExpanded ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
12428
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUpIcon, { className: "h-4 w-4 text-muted-foreground" }),
|
|
12429
|
+
"Show less"
|
|
12430
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
12431
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "h-4 w-4 text-muted-foreground" }),
|
|
12432
|
+
"See more (",
|
|
12433
|
+
hiddenCount,
|
|
12434
|
+
")"
|
|
12435
|
+
] })
|
|
12436
|
+
}
|
|
12437
|
+
) })
|
|
12438
|
+
] });
|
|
12439
|
+
})(),
|
|
11205
12440
|
trustpilot ? /* @__PURE__ */ jsxRuntime.jsxs("section", { id: "trip-section-reviews", className: "scroll-mt-20", children: [
|
|
11206
12441
|
/* @__PURE__ */ jsxRuntime.jsx(Separator, { className: "mb-10" }),
|
|
11207
12442
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-bold text-foreground font-heading mb-5", children: "What our guests think" }),
|
|
@@ -11290,8 +12525,8 @@ function TripPage({
|
|
|
11290
12525
|
PhotoGallery,
|
|
11291
12526
|
{
|
|
11292
12527
|
photos: gallery,
|
|
11293
|
-
variant: "
|
|
11294
|
-
initialVisible:
|
|
12528
|
+
variant: "gridCompact",
|
|
12529
|
+
initialVisible: 8
|
|
11295
12530
|
}
|
|
11296
12531
|
) }),
|
|
11297
12532
|
gallery && gallery.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { ref: pricingBarRef, className: "mx-auto w-full max-w-6xl px-6 sm:px-8 py-12", children: /* @__PURE__ */ jsxRuntime.jsx("div", { id: "trip-booking-form", className: "rounded-2xl border border-border bg-card p-8 shadow-sm", children: /* @__PURE__ */ jsxRuntime.jsx(BookingForm, { onSubmit: onBook ? (values) => onBook() : void 0 }) }) }),
|
|
@@ -11308,7 +12543,8 @@ function TripPage({
|
|
|
11308
12543
|
currencyEstimates
|
|
11309
12544
|
}
|
|
11310
12545
|
) }),
|
|
11311
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-20 lg:hidden" })
|
|
12546
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-20 lg:hidden" }),
|
|
12547
|
+
/* @__PURE__ */ jsxRuntime.jsx(SiteFooter, {})
|
|
11312
12548
|
]
|
|
11313
12549
|
}
|
|
11314
12550
|
);
|
|
@@ -11414,12 +12650,12 @@ function Toast({
|
|
|
11414
12650
|
duration = 6e3,
|
|
11415
12651
|
className
|
|
11416
12652
|
}) {
|
|
11417
|
-
const [mounted, setMounted] =
|
|
11418
|
-
const [visible, setVisible] =
|
|
11419
|
-
|
|
12653
|
+
const [mounted, setMounted] = React28__namespace.useState(false);
|
|
12654
|
+
const [visible, setVisible] = React28__namespace.useState(true);
|
|
12655
|
+
React28__namespace.useEffect(() => {
|
|
11420
12656
|
setMounted(true);
|
|
11421
12657
|
}, []);
|
|
11422
|
-
|
|
12658
|
+
React28__namespace.useEffect(() => {
|
|
11423
12659
|
if (duration === 0) return;
|
|
11424
12660
|
const t = setTimeout(() => {
|
|
11425
12661
|
setVisible(false);
|
|
@@ -11826,21 +13062,21 @@ function LeadCapturePopup({
|
|
|
11826
13062
|
}) {
|
|
11827
13063
|
var _a;
|
|
11828
13064
|
const config = __spreadValues(__spreadValues({}, DEFAULTS), _config);
|
|
11829
|
-
const [open, setOpen] =
|
|
11830
|
-
const [closing, setClosing] =
|
|
11831
|
-
const [submitted, setSubmitted] =
|
|
11832
|
-
const [submitting, setSubmitting] =
|
|
11833
|
-
const [error, setError] =
|
|
11834
|
-
const [name, setName] =
|
|
11835
|
-
const [email, setEmail] =
|
|
11836
|
-
const [travelDate, setTravelDate] =
|
|
11837
|
-
const panelRef =
|
|
11838
|
-
const nameRef =
|
|
11839
|
-
const show =
|
|
13065
|
+
const [open, setOpen] = React28.useState(false);
|
|
13066
|
+
const [closing, setClosing] = React28.useState(false);
|
|
13067
|
+
const [submitted, setSubmitted] = React28.useState(false);
|
|
13068
|
+
const [submitting, setSubmitting] = React28.useState(false);
|
|
13069
|
+
const [error, setError] = React28.useState(null);
|
|
13070
|
+
const [name, setName] = React28.useState("");
|
|
13071
|
+
const [email, setEmail] = React28.useState("");
|
|
13072
|
+
const [travelDate, setTravelDate] = React28.useState("");
|
|
13073
|
+
const panelRef = React28.useRef(null);
|
|
13074
|
+
const nameRef = React28.useRef(null);
|
|
13075
|
+
const show = React28.useCallback(() => {
|
|
11840
13076
|
if (isDismissed()) return;
|
|
11841
13077
|
setOpen(true);
|
|
11842
13078
|
}, []);
|
|
11843
|
-
|
|
13079
|
+
React28.useEffect(() => {
|
|
11844
13080
|
var _a2;
|
|
11845
13081
|
if (isDismissed()) return;
|
|
11846
13082
|
if (config.trigger === "delay") {
|
|
@@ -11867,7 +13103,7 @@ function LeadCapturePopup({
|
|
|
11867
13103
|
return () => window.removeEventListener("scroll", handler);
|
|
11868
13104
|
}
|
|
11869
13105
|
}, [config.trigger, config.delaySeconds, config.scrollPercent, show]);
|
|
11870
|
-
|
|
13106
|
+
React28.useEffect(() => {
|
|
11871
13107
|
if (open && !submitted) {
|
|
11872
13108
|
requestAnimationFrame(() => {
|
|
11873
13109
|
var _a2;
|
|
@@ -11875,7 +13111,7 @@ function LeadCapturePopup({
|
|
|
11875
13111
|
});
|
|
11876
13112
|
}
|
|
11877
13113
|
}, [open, submitted]);
|
|
11878
|
-
const close =
|
|
13114
|
+
const close = React28.useCallback(() => {
|
|
11879
13115
|
setClosing(true);
|
|
11880
13116
|
setDismissed(config.dismissDays);
|
|
11881
13117
|
setTimeout(() => {
|
|
@@ -11883,7 +13119,7 @@ function LeadCapturePopup({
|
|
|
11883
13119
|
setClosing(false);
|
|
11884
13120
|
}, 250);
|
|
11885
13121
|
}, [config.dismissDays]);
|
|
11886
|
-
|
|
13122
|
+
React28.useEffect(() => {
|
|
11887
13123
|
if (!open) return;
|
|
11888
13124
|
const handler = (e) => {
|
|
11889
13125
|
if (e.key === "Escape") close();
|
|
@@ -11891,7 +13127,7 @@ function LeadCapturePopup({
|
|
|
11891
13127
|
document.addEventListener("keydown", handler);
|
|
11892
13128
|
return () => document.removeEventListener("keydown", handler);
|
|
11893
13129
|
}, [open, close]);
|
|
11894
|
-
const onOverlayClick =
|
|
13130
|
+
const onOverlayClick = React28.useCallback(
|
|
11895
13131
|
(e) => {
|
|
11896
13132
|
if (panelRef.current && !panelRef.current.contains(e.target)) {
|
|
11897
13133
|
close();
|