@heycater/qualification-funnel 1.19.22 → 1.19.23
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/heycater-funnel.iife.js +1506 -173
- package/dist/index.cjs.js +1490 -157
- package/dist/index.esm.js +3014 -164
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -2,13 +2,13 @@ var _a;
|
|
|
2
2
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import React__default, { createContext, useContext, useMemo, useReducer, useCallback, useEffect, useRef, useState, isValidElement, cloneElement, Children, forwardRef, useLayoutEffect } from "react";
|
|
5
|
-
import { darken as darken$1, lighten as lighten$1, ButtonBase as ButtonBase$2, Typography as Typography$1, useMediaQuery, Input as Input$
|
|
5
|
+
import { darken as darken$1, lighten as lighten$1, ButtonBase as ButtonBase$2, Typography as Typography$1, useMediaQuery, Input as Input$2, IconButton as IconButton$2, useTheme as useTheme$1, FormControlLabel, Tooltip, Menu, Hidden, SnackbarContent, Snackbar, TextField, CircularProgress, Modal, ThemeProvider as ThemeProvider$1, StylesProvider as StylesProvider$1, CssBaseline } from "@material-ui/core";
|
|
6
6
|
import { useTranslation, initReactI18next, I18nextProvider } from "react-i18next";
|
|
7
|
-
import styled, { css as css$1, createGlobalStyle, ThemeProvider } from "styled-components";
|
|
7
|
+
import styled, { css as css$1, keyframes, createGlobalStyle, ThemeProvider } from "styled-components";
|
|
8
8
|
import { gql, useQuery, useClient, mapExchange, Client, cacheExchange, fetchExchange, Provider } from "urql";
|
|
9
9
|
import { breakpoints as breakpoints$1, compose, display, flexbox, palette, positions, sizing, spacing, typography, borders, shadows as shadows$1, createUnarySpacing } from "@material-ui/system";
|
|
10
10
|
import i18next from "i18next";
|
|
11
|
-
import { DayPicker, useActiveModifiers, useDayPicker, Day, Row, useNavigation, IconLeft, IconRight } from "react-day-picker";
|
|
11
|
+
import { DayPicker, useActiveModifiers, useDayPicker, Day, Row as Row$1, useNavigation, IconLeft, IconRight } from "react-day-picker";
|
|
12
12
|
import { useFormikContext, useField, getIn as getIn$1, Form, Formik, Field } from "formik";
|
|
13
13
|
import * as ReactDOM from "react-dom";
|
|
14
14
|
import { useInView } from "react-intersection-observer";
|
|
@@ -298,12 +298,12 @@ const FormControl = ({
|
|
|
298
298
|
if (required) {
|
|
299
299
|
classes.push("hc-form-control--required");
|
|
300
300
|
}
|
|
301
|
-
return /* @__PURE__ */ jsx(FormWrapper$
|
|
301
|
+
return /* @__PURE__ */ jsx(FormWrapper$3, { className: classes.join(" "), children: childrenWithProps });
|
|
302
302
|
};
|
|
303
|
-
const FormWrapper$
|
|
303
|
+
const FormWrapper$3 = styled.div`
|
|
304
304
|
margin-bottom: ${(props) => props.theme.spacing(2)}px;
|
|
305
305
|
`;
|
|
306
|
-
const Input = styled.input`
|
|
306
|
+
const Input$1 = styled.input`
|
|
307
307
|
background-color: ${(props) => props.theme.palette.text.disabled};
|
|
308
308
|
font-family: ${(props) => props.theme.typography.fontFamily};
|
|
309
309
|
font-weight: ${(props) => props.theme.typography.body1.fontWeight};
|
|
@@ -398,7 +398,7 @@ const ProgressIndicator = ({ stepCount, currentStep }) => {
|
|
|
398
398
|
" ",
|
|
399
399
|
t2("qualification:steps")
|
|
400
400
|
] }),
|
|
401
|
-
/* @__PURE__ */ jsx(ProgressBar, { percent: percent2 })
|
|
401
|
+
/* @__PURE__ */ jsx(ProgressBar$1, { percent: percent2 })
|
|
402
402
|
] });
|
|
403
403
|
};
|
|
404
404
|
const Wrapper$6 = styled.div`
|
|
@@ -414,7 +414,7 @@ const Wrapper$6 = styled.div`
|
|
|
414
414
|
gap: ${({ theme }) => theme.spacing(2)}px;
|
|
415
415
|
}
|
|
416
416
|
`;
|
|
417
|
-
const ProgressBar = styled.div`
|
|
417
|
+
const ProgressBar$1 = styled.div`
|
|
418
418
|
height: 10px;
|
|
419
419
|
background: ${(props) => props.theme.palette.grey[100]};
|
|
420
420
|
position: relative;
|
|
@@ -459,7 +459,7 @@ const StyledContainer$1 = styled(Box).withConfig({
|
|
|
459
459
|
|
|
460
460
|
width: clamp(100px, 100%, var(--maxWidthIncludingPadding));
|
|
461
461
|
`;
|
|
462
|
-
const Container = StyledContainer$1;
|
|
462
|
+
const Container$4 = StyledContainer$1;
|
|
463
463
|
const QUALIFICATION_STATUS = {
|
|
464
464
|
initial: "initial",
|
|
465
465
|
answering: "answering",
|
|
@@ -4991,6 +4991,7 @@ const CITY_VALUES = [
|
|
|
4991
4991
|
"duesseldorf",
|
|
4992
4992
|
"koeln",
|
|
4993
4993
|
"stuttgart",
|
|
4994
|
+
"wien",
|
|
4994
4995
|
"london",
|
|
4995
4996
|
"other"
|
|
4996
4997
|
];
|
|
@@ -7157,6 +7158,109 @@ const teamSizeQuestion = Object.freeze(
|
|
|
7157
7158
|
]
|
|
7158
7159
|
})
|
|
7159
7160
|
);
|
|
7161
|
+
const EVENT_TYPES = [
|
|
7162
|
+
"lunch",
|
|
7163
|
+
"breakfast",
|
|
7164
|
+
"party",
|
|
7165
|
+
"meeting",
|
|
7166
|
+
"conference",
|
|
7167
|
+
"workshop",
|
|
7168
|
+
"other"
|
|
7169
|
+
];
|
|
7170
|
+
const EVENT_TYPE_MAPPINGS = {
|
|
7171
|
+
lunch: {
|
|
7172
|
+
service_type: "meetings_events",
|
|
7173
|
+
catering_category: "business_lunch"
|
|
7174
|
+
},
|
|
7175
|
+
breakfast: {
|
|
7176
|
+
service_type: "meetings_events",
|
|
7177
|
+
catering_category: "breakfast"
|
|
7178
|
+
},
|
|
7179
|
+
party: {
|
|
7180
|
+
service_type: "meetings_events",
|
|
7181
|
+
catering_category: "buffet"
|
|
7182
|
+
},
|
|
7183
|
+
meeting: {
|
|
7184
|
+
service_type: "meetings_events",
|
|
7185
|
+
catering_category: "fingerfood"
|
|
7186
|
+
},
|
|
7187
|
+
conference: {
|
|
7188
|
+
service_type: "full_service_event",
|
|
7189
|
+
catering_category: "buffet"
|
|
7190
|
+
},
|
|
7191
|
+
workshop: {
|
|
7192
|
+
service_type: "meetings_events",
|
|
7193
|
+
catering_category: "business_lunch"
|
|
7194
|
+
},
|
|
7195
|
+
other: {
|
|
7196
|
+
service_type: "meetings_events",
|
|
7197
|
+
catering_category: "other"
|
|
7198
|
+
}
|
|
7199
|
+
};
|
|
7200
|
+
const EVENT_TYPE_ITEMS = [
|
|
7201
|
+
{
|
|
7202
|
+
value: "lunch",
|
|
7203
|
+
labelDe: "Mittagessen",
|
|
7204
|
+
labelEn: "Lunch",
|
|
7205
|
+
iconName: "lunch"
|
|
7206
|
+
},
|
|
7207
|
+
{
|
|
7208
|
+
value: "breakfast",
|
|
7209
|
+
labelDe: "Frühstück",
|
|
7210
|
+
labelEn: "Breakfast",
|
|
7211
|
+
iconName: "breakfast"
|
|
7212
|
+
},
|
|
7213
|
+
{
|
|
7214
|
+
value: "party",
|
|
7215
|
+
labelDe: "Firmenfeier",
|
|
7216
|
+
labelEn: "Company Party",
|
|
7217
|
+
iconName: "party"
|
|
7218
|
+
},
|
|
7219
|
+
{
|
|
7220
|
+
value: "meeting",
|
|
7221
|
+
labelDe: "Meeting",
|
|
7222
|
+
labelEn: "Meeting",
|
|
7223
|
+
iconName: "meeting"
|
|
7224
|
+
},
|
|
7225
|
+
{
|
|
7226
|
+
value: "conference",
|
|
7227
|
+
labelDe: "Konferenz/Messe",
|
|
7228
|
+
labelEn: "Conference/Trade Show",
|
|
7229
|
+
iconName: "conference"
|
|
7230
|
+
},
|
|
7231
|
+
{
|
|
7232
|
+
value: "workshop",
|
|
7233
|
+
labelDe: "Workshop/Teamtag",
|
|
7234
|
+
labelEn: "Workshop/Team Day",
|
|
7235
|
+
iconName: "workshop"
|
|
7236
|
+
}
|
|
7237
|
+
];
|
|
7238
|
+
function mapEventTypeToServiceAndCategory(eventType) {
|
|
7239
|
+
return EVENT_TYPE_MAPPINGS[eventType];
|
|
7240
|
+
}
|
|
7241
|
+
const eventTypeQuestion = Object.freeze(
|
|
7242
|
+
createSelectorQuestion({
|
|
7243
|
+
id: "event_type",
|
|
7244
|
+
getValidator: () => {
|
|
7245
|
+
return yup.mixed().oneOf([...EVENT_TYPES]).required();
|
|
7246
|
+
},
|
|
7247
|
+
getItems: () => {
|
|
7248
|
+
return EVENT_TYPE_ITEMS.map((item) => ({
|
|
7249
|
+
value: item.value,
|
|
7250
|
+
labelEn: item.labelEn,
|
|
7251
|
+
labelDe: item.labelDe
|
|
7252
|
+
}));
|
|
7253
|
+
}
|
|
7254
|
+
})
|
|
7255
|
+
);
|
|
7256
|
+
const dateUnknownQuestion = Object.freeze(
|
|
7257
|
+
createQuestion({
|
|
7258
|
+
id: "date_unknown",
|
|
7259
|
+
getValidator: () => {
|
|
7260
|
+
return yup.boolean();
|
|
7261
|
+
}
|
|
7262
|
+
})
|
|
7263
|
+
);
|
|
7160
7264
|
const questions$2 = {
|
|
7161
7265
|
leadType: leadTypeQuestion,
|
|
7162
7266
|
peopleCount: peopleCountQuestion,
|
|
@@ -7187,7 +7291,9 @@ const SCHEMA_QUESTIONS = {
|
|
|
7187
7291
|
number_of_vegetarians: numberOfVegetariansQuestion,
|
|
7188
7292
|
number_of_carnivore: numberOfCarnivoresQuestion,
|
|
7189
7293
|
team_size: teamSizeQuestion,
|
|
7190
|
-
delivery_frequency: deliveryFrequencyQuestion
|
|
7294
|
+
delivery_frequency: deliveryFrequencyQuestion,
|
|
7295
|
+
event_type: eventTypeQuestion,
|
|
7296
|
+
date_unknown: dateUnknownQuestion
|
|
7191
7297
|
};
|
|
7192
7298
|
const STEP_IDS = {
|
|
7193
7299
|
serviceSelection: "service_selection",
|
|
@@ -8444,7 +8550,7 @@ function isDataInStorageInvalid(data) {
|
|
|
8444
8550
|
})
|
|
8445
8551
|
});
|
|
8446
8552
|
validator.validateSync(data);
|
|
8447
|
-
const cityItems = cityQuestion.getItems({});
|
|
8553
|
+
const cityItems = cityQuestion.getItems({ answers: {} });
|
|
8448
8554
|
if (cityItems.length === 1) {
|
|
8449
8555
|
const storedData = data;
|
|
8450
8556
|
const cityStep2 = (_b = (_a2 = storedData.qualification) == null ? void 0 : _a2.steps) == null ? void 0 : _b.find((s3) => s3.id === "city");
|
|
@@ -8474,7 +8580,7 @@ const EmbeddedQuestionControls = ({ onBackground, mode = "embedded" }) => {
|
|
|
8474
8580
|
const isLastStep = Boolean(step2 && stepIndex === steps2.length - 1);
|
|
8475
8581
|
const enabledSteps = state.qualification.steps.filter((q2) => !q2.disabled);
|
|
8476
8582
|
const StyledButton = isFullscreen ? FullscreenButton : EmbeddedButton;
|
|
8477
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(Container, { size: "sm", display: "flex", flexDirection: "column", children: [
|
|
8583
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(Container$4, { size: "sm", display: "flex", flexDirection: "column", children: [
|
|
8478
8584
|
!isFullscreen && /* @__PURE__ */ jsx(
|
|
8479
8585
|
Box,
|
|
8480
8586
|
{
|
|
@@ -9552,7 +9658,7 @@ const EmbeddedQuestionLayout = ({
|
|
|
9552
9658
|
const stepIndex = step2 ? steps2.findIndex(({ id }) => id === step2.id) : -1;
|
|
9553
9659
|
const showSelectedAnswerPills = state.status === QUALIFICATION_STATUS.answering && stepIndex > 0;
|
|
9554
9660
|
return /* @__PURE__ */ jsxs(
|
|
9555
|
-
Container,
|
|
9661
|
+
Container$4,
|
|
9556
9662
|
{
|
|
9557
9663
|
size: effectiveContainerSize,
|
|
9558
9664
|
disableGutters,
|
|
@@ -9605,7 +9711,7 @@ const EmbeddedQuestionLayout = ({
|
|
|
9605
9711
|
/* @__PURE__ */ jsx(Box, { textAlign: "center", mb: isFullscreen ? 4 : 2, maxWidth: isFullscreen ? 650 : 550, mx: "auto", children: typeof title === "string" ? isFullscreen ? /* @__PURE__ */ jsxs(FullscreenTitle, { children: [
|
|
9606
9712
|
title,
|
|
9607
9713
|
" "
|
|
9608
|
-
] }) : /* @__PURE__ */ jsxs(Subtitle$
|
|
9714
|
+
] }) : /* @__PURE__ */ jsxs(Subtitle$2, { variant: "subtitle2", children: [
|
|
9609
9715
|
title,
|
|
9610
9716
|
" "
|
|
9611
9717
|
] }) : title }),
|
|
@@ -9623,7 +9729,7 @@ const EmbeddedQuestionLayout = ({
|
|
|
9623
9729
|
}
|
|
9624
9730
|
),
|
|
9625
9731
|
!isFullscreen && /* @__PURE__ */ jsx(
|
|
9626
|
-
Container,
|
|
9732
|
+
Container$4,
|
|
9627
9733
|
{
|
|
9628
9734
|
mt: "auto",
|
|
9629
9735
|
size: answerContainerSize,
|
|
@@ -9643,7 +9749,7 @@ const EmbeddedQuestionLayout = ({
|
|
|
9643
9749
|
}
|
|
9644
9750
|
),
|
|
9645
9751
|
isFullscreen && /* @__PURE__ */ jsxs(StickyFooter, { children: [
|
|
9646
|
-
showSelectedAnswerPills && /* @__PURE__ */ jsx(Container, { size: answerContainerSize, disableGutters, children: /* @__PURE__ */ jsx(
|
|
9752
|
+
showSelectedAnswerPills && /* @__PURE__ */ jsx(Container$4, { size: answerContainerSize, disableGutters, children: /* @__PURE__ */ jsx(
|
|
9647
9753
|
Box,
|
|
9648
9754
|
{
|
|
9649
9755
|
bgcolor: "white",
|
|
@@ -9680,7 +9786,7 @@ const WrapperBox$1 = styled(Box)`
|
|
|
9680
9786
|
const TextWrapper = styled.div`
|
|
9681
9787
|
color: var(--embedded-text-color, inherit);
|
|
9682
9788
|
`;
|
|
9683
|
-
const Subtitle$
|
|
9789
|
+
const Subtitle$2 = styled(Typography)`
|
|
9684
9790
|
font-weight: 600;
|
|
9685
9791
|
font-size: 16px;
|
|
9686
9792
|
white-space: pre-line;
|
|
@@ -9818,7 +9924,7 @@ const QuantityStepperField = ({
|
|
|
9818
9924
|
)
|
|
9819
9925
|
] });
|
|
9820
9926
|
};
|
|
9821
|
-
const StepperInput$1 = styled(Input$
|
|
9927
|
+
const StepperInput$1 = styled(Input$2)`
|
|
9822
9928
|
.MuiInputBase-input {
|
|
9823
9929
|
text-align: center !important;
|
|
9824
9930
|
background-color: ${(props) => props.theme.palette.text.disabled} !important;
|
|
@@ -10043,7 +10149,7 @@ function PriceStepperField({
|
|
|
10043
10149
|
)
|
|
10044
10150
|
] });
|
|
10045
10151
|
}
|
|
10046
|
-
const StepperInput = styled(Input$
|
|
10152
|
+
const StepperInput = styled(Input$2)`
|
|
10047
10153
|
.MuiInputBase-input {
|
|
10048
10154
|
text-align: center !important;
|
|
10049
10155
|
background-color: ${(props) => props.theme.palette.text.disabled} !important;
|
|
@@ -10161,6 +10267,9 @@ function trackAnswerSelected(context, answer) {
|
|
|
10161
10267
|
if (context.city) {
|
|
10162
10268
|
properties.city = context.city;
|
|
10163
10269
|
}
|
|
10270
|
+
if (context.funnel_variant) {
|
|
10271
|
+
properties.funnel_variant = context.funnel_variant;
|
|
10272
|
+
}
|
|
10164
10273
|
captureEvent("qf_v14_answer_selected", properties);
|
|
10165
10274
|
}
|
|
10166
10275
|
function trackFormSubmitted(context, metadata) {
|
|
@@ -10179,6 +10288,9 @@ function trackFormSubmitted(context, metadata) {
|
|
|
10179
10288
|
if (context.city) {
|
|
10180
10289
|
properties.city = context.city;
|
|
10181
10290
|
}
|
|
10291
|
+
if (context.funnel_variant) {
|
|
10292
|
+
properties.funnel_variant = context.funnel_variant;
|
|
10293
|
+
}
|
|
10182
10294
|
captureEvent("qf_v14_form_submitted", properties);
|
|
10183
10295
|
}
|
|
10184
10296
|
function trackCompleted(context) {
|
|
@@ -10196,6 +10308,9 @@ function trackCompleted(context) {
|
|
|
10196
10308
|
if (context.city) {
|
|
10197
10309
|
properties.city = context.city;
|
|
10198
10310
|
}
|
|
10311
|
+
if (context.funnel_variant) {
|
|
10312
|
+
properties.funnel_variant = context.funnel_variant;
|
|
10313
|
+
}
|
|
10199
10314
|
captureEvent("qf_v14_completed", properties);
|
|
10200
10315
|
}
|
|
10201
10316
|
function trackAbandoned(context, lastStep) {
|
|
@@ -10215,6 +10330,9 @@ function trackAbandoned(context, lastStep) {
|
|
|
10215
10330
|
if (context.city) {
|
|
10216
10331
|
properties.city = context.city;
|
|
10217
10332
|
}
|
|
10333
|
+
if (context.funnel_variant) {
|
|
10334
|
+
properties.funnel_variant = context.funnel_variant;
|
|
10335
|
+
}
|
|
10218
10336
|
captureEvent("qf_v14_abandoned", properties);
|
|
10219
10337
|
}
|
|
10220
10338
|
function trackStarted(context, initialStepId) {
|
|
@@ -10223,6 +10341,9 @@ function trackStarted(context, initialStepId) {
|
|
|
10223
10341
|
session_id: context.session_id,
|
|
10224
10342
|
initial_step: initialStepId
|
|
10225
10343
|
};
|
|
10344
|
+
if (context.funnel_variant) {
|
|
10345
|
+
properties.funnel_variant = context.funnel_variant;
|
|
10346
|
+
}
|
|
10226
10347
|
captureEvent("qf_v14_started", properties);
|
|
10227
10348
|
trackOptimeleonConversion("funnel_started");
|
|
10228
10349
|
}
|
|
@@ -10481,7 +10602,7 @@ function BudgetQuestionWithPeopleCount() {
|
|
|
10481
10602
|
}
|
|
10482
10603
|
}
|
|
10483
10604
|
) }),
|
|
10484
|
-
/* @__PURE__ */ jsx(Divider, { my: 4 }),
|
|
10605
|
+
/* @__PURE__ */ jsx(Divider$1, { my: 4 }),
|
|
10485
10606
|
/* @__PURE__ */ jsx(Box, { mb: 2, children: /* @__PURE__ */ jsx(Typography, { as: "label", htmlFor: pricePerPersonQuestion.id, children: t2("common:questions.budgetProPerson") }) }),
|
|
10486
10607
|
/* @__PURE__ */ jsx(Box, { mb: 2, children: /* @__PURE__ */ jsx(
|
|
10487
10608
|
PriceStepperField,
|
|
@@ -10528,7 +10649,7 @@ const ErrorWrapper = styled.div`
|
|
|
10528
10649
|
color: #F95524;
|
|
10529
10650
|
font-weight: 500;
|
|
10530
10651
|
`;
|
|
10531
|
-
const Divider = styled(Box)`
|
|
10652
|
+
const Divider$1 = styled(Box)`
|
|
10532
10653
|
height: 2px;
|
|
10533
10654
|
background-color: ${({ theme }) => theme.palette.grey[100]};
|
|
10534
10655
|
width: 100%;
|
|
@@ -10547,7 +10668,7 @@ const Wrapper$4 = styled.div`
|
|
|
10547
10668
|
grid-template-columns: 1fr auto;
|
|
10548
10669
|
}
|
|
10549
10670
|
`;
|
|
10550
|
-
const TilesWrapper = styled(Box)`
|
|
10671
|
+
const TilesWrapper$2 = styled(Box)`
|
|
10551
10672
|
display: flex;
|
|
10552
10673
|
flex-direction: row;
|
|
10553
10674
|
height: auto;
|
|
@@ -10656,7 +10777,7 @@ const BudgetRangeTiles = ({
|
|
|
10656
10777
|
onSelect(range2);
|
|
10657
10778
|
trackAnswer("budget_range", range2);
|
|
10658
10779
|
};
|
|
10659
|
-
return /* @__PURE__ */ jsx(TilesWrapper, { children: BUDGET_RANGE_ITEMS.map((item) => {
|
|
10780
|
+
return /* @__PURE__ */ jsx(TilesWrapper$2, { children: BUDGET_RANGE_ITEMS.map((item) => {
|
|
10660
10781
|
const label = isGerman ? item.labelDe : item.labelEn;
|
|
10661
10782
|
return /* @__PURE__ */ jsxs(
|
|
10662
10783
|
BudgetTile,
|
|
@@ -10952,7 +11073,7 @@ function DatePickerEmbedded() {
|
|
|
10952
11073
|
DayPicker,
|
|
10953
11074
|
{
|
|
10954
11075
|
components: {
|
|
10955
|
-
Caption: CustomCaption,
|
|
11076
|
+
Caption: CustomCaption$1,
|
|
10956
11077
|
Row: OnlyAfterToday,
|
|
10957
11078
|
Day: DayWithOutsideMonthLabel
|
|
10958
11079
|
},
|
|
@@ -10993,7 +11114,7 @@ function DayWithOutsideMonthLabel(props) {
|
|
|
10993
11114
|
}
|
|
10994
11115
|
return /* @__PURE__ */ jsx(Day, { ...props });
|
|
10995
11116
|
}
|
|
10996
|
-
function CustomCaption(props) {
|
|
11117
|
+
function CustomCaption$1(props) {
|
|
10997
11118
|
const { goToMonth, nextMonth, previousMonth } = useNavigation();
|
|
10998
11119
|
const daypicker = useDayPicker();
|
|
10999
11120
|
return /* @__PURE__ */ jsxs(Box, { display: "flex", justifyContent: "space-between", alignItems: "center", py: 1.5, children: [
|
|
@@ -11035,7 +11156,7 @@ function OnlyAfterToday(props) {
|
|
|
11035
11156
|
);
|
|
11036
11157
|
if (!hasDateInMonth) return /* @__PURE__ */ jsx(Fragment, {});
|
|
11037
11158
|
return /* @__PURE__ */ jsx(
|
|
11038
|
-
Row,
|
|
11159
|
+
Row$1,
|
|
11039
11160
|
{
|
|
11040
11161
|
...props,
|
|
11041
11162
|
weekNumber: props.weekNumber + weekOffset,
|
|
@@ -11043,7 +11164,7 @@ function OnlyAfterToday(props) {
|
|
|
11043
11164
|
}
|
|
11044
11165
|
);
|
|
11045
11166
|
}
|
|
11046
|
-
return /* @__PURE__ */ jsx(Row, { ...props });
|
|
11167
|
+
return /* @__PURE__ */ jsx(Row$1, { ...props });
|
|
11047
11168
|
}
|
|
11048
11169
|
const MonthNavigationButton = styled.button`
|
|
11049
11170
|
background-color: transparent;
|
|
@@ -11200,7 +11321,7 @@ const DeliveryFrequencyTiles = ({
|
|
|
11200
11321
|
onSelect(frequency);
|
|
11201
11322
|
trackAnswer("delivery_frequency", frequency);
|
|
11202
11323
|
};
|
|
11203
|
-
return /* @__PURE__ */ jsx(TilesWrapper, { children: DELIVERY_FREQUENCY_ITEMS.map((item) => {
|
|
11324
|
+
return /* @__PURE__ */ jsx(TilesWrapper$2, { children: DELIVERY_FREQUENCY_ITEMS.map((item) => {
|
|
11204
11325
|
const label = isGerman ? item.labelDe : item.labelEn;
|
|
11205
11326
|
const isNotSure = item.value === "not_sure";
|
|
11206
11327
|
return /* @__PURE__ */ jsxs(
|
|
@@ -11285,7 +11406,7 @@ const DietaryStepper = ({ question, autoFocus }) => {
|
|
|
11285
11406
|
justifyContent: { xs: "center", sm: "start" },
|
|
11286
11407
|
children: [
|
|
11287
11408
|
(localizedOptions == null ? void 0 : localizedOptions.image) && /* @__PURE__ */ jsx(IconWrapper$3, { children: /* @__PURE__ */ jsx(
|
|
11288
|
-
StyledImg$
|
|
11409
|
+
StyledImg$2,
|
|
11289
11410
|
{
|
|
11290
11411
|
alt: "",
|
|
11291
11412
|
src: localizedOptions == null ? void 0 : localizedOptions.image
|
|
@@ -11315,7 +11436,7 @@ const IconWrapper$3 = styled.div`
|
|
|
11315
11436
|
justify-content: center;
|
|
11316
11437
|
flex-shrink: 0;
|
|
11317
11438
|
`;
|
|
11318
|
-
const StyledImg$
|
|
11439
|
+
const StyledImg$2 = styled.img`
|
|
11319
11440
|
width: 100%;
|
|
11320
11441
|
height: 100%;
|
|
11321
11442
|
object-fit: contain;
|
|
@@ -11461,7 +11582,7 @@ const ServiceTypeTiles = ({
|
|
|
11461
11582
|
const { i18n } = useTranslation();
|
|
11462
11583
|
const isGerman = i18n.language === "de";
|
|
11463
11584
|
const { trackAnswer } = useTracking();
|
|
11464
|
-
return /* @__PURE__ */ jsx(TilesWrapper, { children: tileIcons$1.map(({ id, Icon, labelDe, labelEn, subtitleDe, subtitleEn }) => {
|
|
11585
|
+
return /* @__PURE__ */ jsx(TilesWrapper$2, { children: tileIcons$1.map(({ id, Icon, labelDe, labelEn, subtitleDe, subtitleEn }) => {
|
|
11465
11586
|
const label = isGerman ? labelDe : labelEn;
|
|
11466
11587
|
const subtitle = isGerman ? subtitleDe : subtitleEn;
|
|
11467
11588
|
return /* @__PURE__ */ jsxs(
|
|
@@ -11553,8 +11674,8 @@ const SubtitleText = styled(Typography)`
|
|
|
11553
11674
|
max-width: 180px;
|
|
11554
11675
|
}
|
|
11555
11676
|
`;
|
|
11556
|
-
const ICON_BASE_PATH = "/artifacts/icons/catering_category";
|
|
11557
|
-
const getIconUrl = (name) => getAssetUrl(`${ICON_BASE_PATH}/${name}.svg`);
|
|
11677
|
+
const ICON_BASE_PATH$1 = "/artifacts/icons/catering_category";
|
|
11678
|
+
const getIconUrl$1 = (name) => getAssetUrl(`${ICON_BASE_PATH$1}/${name}.svg`);
|
|
11558
11679
|
const DEFAULT_IMAGE_SIZE = {
|
|
11559
11680
|
SM: 40,
|
|
11560
11681
|
MD: 60
|
|
@@ -11573,7 +11694,7 @@ const CateringCategoryTiles = ({
|
|
|
11573
11694
|
const cateringCategories = useCateringCategories(items);
|
|
11574
11695
|
const smUp = useBreakpointUp("sm");
|
|
11575
11696
|
const { trackAnswer } = useTracking();
|
|
11576
|
-
return /* @__PURE__ */ jsxs(TilesWrapper, { children: [
|
|
11697
|
+
return /* @__PURE__ */ jsxs(TilesWrapper$2, { children: [
|
|
11577
11698
|
cateringCategories.map(({ src, text, scale, id }) => /* @__PURE__ */ jsxs(
|
|
11578
11699
|
Tile,
|
|
11579
11700
|
{
|
|
@@ -11588,7 +11709,7 @@ const CateringCategoryTiles = ({
|
|
|
11588
11709
|
},
|
|
11589
11710
|
children: [
|
|
11590
11711
|
/* @__PURE__ */ jsx(ImageWrapper, { $scale: scale, children: /* @__PURE__ */ jsx(
|
|
11591
|
-
StyledImg,
|
|
11712
|
+
StyledImg$1,
|
|
11592
11713
|
{
|
|
11593
11714
|
alt: "",
|
|
11594
11715
|
width: smUp ? DEFAULT_IMAGE_SIZE.MD : DEFAULT_IMAGE_SIZE.SM,
|
|
@@ -11630,7 +11751,7 @@ const CateringCategoryTiles = ({
|
|
|
11630
11751
|
)
|
|
11631
11752
|
] });
|
|
11632
11753
|
};
|
|
11633
|
-
const StyledImg = styled.img`
|
|
11754
|
+
const StyledImg$1 = styled.img`
|
|
11634
11755
|
object-fit: contain;
|
|
11635
11756
|
`;
|
|
11636
11757
|
const ImageWrapper = styled(Box)`
|
|
@@ -11655,42 +11776,42 @@ function useCateringCategories(items) {
|
|
|
11655
11776
|
const allCategories = [
|
|
11656
11777
|
{
|
|
11657
11778
|
id: "fingerfood",
|
|
11658
|
-
src: getIconUrl("fingerfood"),
|
|
11779
|
+
src: getIconUrl$1("fingerfood"),
|
|
11659
11780
|
text: t2("occasion.fingerfood")
|
|
11660
11781
|
},
|
|
11661
11782
|
{
|
|
11662
11783
|
id: "buffet",
|
|
11663
|
-
src: getIconUrl("buffet"),
|
|
11784
|
+
src: getIconUrl$1("buffet"),
|
|
11664
11785
|
text: t2("occasion.buffet")
|
|
11665
11786
|
},
|
|
11666
11787
|
{
|
|
11667
11788
|
id: "street_food",
|
|
11668
|
-
src: getIconUrl("street_food"),
|
|
11789
|
+
src: getIconUrl$1("street_food"),
|
|
11669
11790
|
text: t2("occasion.street_food")
|
|
11670
11791
|
},
|
|
11671
11792
|
{
|
|
11672
11793
|
id: "business_lunch",
|
|
11673
|
-
src: getIconUrl("business_lunch"),
|
|
11794
|
+
src: getIconUrl$1("business_lunch"),
|
|
11674
11795
|
text: t2("occasion.business_lunch")
|
|
11675
11796
|
},
|
|
11676
11797
|
{
|
|
11677
11798
|
id: "breakfast",
|
|
11678
|
-
src: getIconUrl("breakfast"),
|
|
11799
|
+
src: getIconUrl$1("breakfast"),
|
|
11679
11800
|
text: t2("occasion.breakfast")
|
|
11680
11801
|
},
|
|
11681
11802
|
{
|
|
11682
11803
|
id: "cakes_and_sweets",
|
|
11683
|
-
src: getIconUrl("cakes_and_sweets"),
|
|
11804
|
+
src: getIconUrl$1("cakes_and_sweets"),
|
|
11684
11805
|
text: t2("occasion.cakes_and_sweets")
|
|
11685
11806
|
},
|
|
11686
11807
|
{
|
|
11687
11808
|
id: "fine_dining",
|
|
11688
|
-
src: getIconUrl("fine_dining"),
|
|
11809
|
+
src: getIconUrl$1("fine_dining"),
|
|
11689
11810
|
text: t2("occasion.fine_dining_short")
|
|
11690
11811
|
},
|
|
11691
11812
|
{
|
|
11692
11813
|
id: "drinks",
|
|
11693
|
-
src: getIconUrl("drinks"),
|
|
11814
|
+
src: getIconUrl$1("drinks"),
|
|
11694
11815
|
text: t2("occasion.drinks_short")
|
|
11695
11816
|
}
|
|
11696
11817
|
];
|
|
@@ -11702,6 +11823,36 @@ function useCateringCategories(items) {
|
|
|
11702
11823
|
}
|
|
11703
11824
|
return preFilteredCategories;
|
|
11704
11825
|
}
|
|
11826
|
+
function Vienna(props) {
|
|
11827
|
+
return /* @__PURE__ */ jsxs(
|
|
11828
|
+
"svg",
|
|
11829
|
+
{
|
|
11830
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11831
|
+
viewBox: "0 0 100 100",
|
|
11832
|
+
fill: "#F95524",
|
|
11833
|
+
...props,
|
|
11834
|
+
children: [
|
|
11835
|
+
/* @__PURE__ */ jsx("circle", { cx: "50", cy: "45", r: "28", fill: "none", stroke: "#F95524", strokeWidth: "2.5" }),
|
|
11836
|
+
/* @__PURE__ */ jsx("circle", { cx: "50", cy: "45", r: "3", fill: "#F95524" }),
|
|
11837
|
+
/* @__PURE__ */ jsx("line", { x1: "50", y1: "17", x2: "50", y2: "73", stroke: "#F95524", strokeWidth: "2" }),
|
|
11838
|
+
/* @__PURE__ */ jsx("line", { x1: "22", y1: "45", x2: "78", y2: "45", stroke: "#F95524", strokeWidth: "2" }),
|
|
11839
|
+
/* @__PURE__ */ jsx("line", { x1: "30", y1: "25", x2: "70", y2: "65", stroke: "#F95524", strokeWidth: "2" }),
|
|
11840
|
+
/* @__PURE__ */ jsx("line", { x1: "70", y1: "25", x2: "30", y2: "65", stroke: "#F95524", strokeWidth: "2" }),
|
|
11841
|
+
/* @__PURE__ */ jsx("line", { x1: "50", y1: "45", x2: "35", y2: "88", stroke: "#F95524", strokeWidth: "2.5" }),
|
|
11842
|
+
/* @__PURE__ */ jsx("line", { x1: "50", y1: "45", x2: "65", y2: "88", stroke: "#F95524", strokeWidth: "2.5" }),
|
|
11843
|
+
/* @__PURE__ */ jsx("line", { x1: "25", y1: "88", x2: "75", y2: "88", stroke: "#F95524", strokeWidth: "2.5" }),
|
|
11844
|
+
/* @__PURE__ */ jsx("rect", { x: "47", y: "14", width: "6", height: "8", rx: "1", fill: "#F95524" }),
|
|
11845
|
+
/* @__PURE__ */ jsx("rect", { x: "47", y: "70", width: "6", height: "8", rx: "1", fill: "#F95524" }),
|
|
11846
|
+
/* @__PURE__ */ jsx("rect", { x: "19", y: "42", width: "6", height: "8", rx: "1", fill: "#F95524" }),
|
|
11847
|
+
/* @__PURE__ */ jsx("rect", { x: "75", y: "42", width: "6", height: "8", rx: "1", fill: "#F95524" }),
|
|
11848
|
+
/* @__PURE__ */ jsx("rect", { x: "27", y: "22", width: "6", height: "8", rx: "1", fill: "#F95524" }),
|
|
11849
|
+
/* @__PURE__ */ jsx("rect", { x: "67", y: "22", width: "6", height: "8", rx: "1", fill: "#F95524" }),
|
|
11850
|
+
/* @__PURE__ */ jsx("rect", { x: "27", y: "62", width: "6", height: "8", rx: "1", fill: "#F95524" }),
|
|
11851
|
+
/* @__PURE__ */ jsx("rect", { x: "67", y: "62", width: "6", height: "8", rx: "1", fill: "#F95524" })
|
|
11852
|
+
]
|
|
11853
|
+
}
|
|
11854
|
+
);
|
|
11855
|
+
}
|
|
11705
11856
|
const tileIcons = [
|
|
11706
11857
|
createIconEntry("berlin", Berlin),
|
|
11707
11858
|
createIconEntry("muenchen", Munich),
|
|
@@ -11724,7 +11875,7 @@ const CityTiles = ({
|
|
|
11724
11875
|
}) => {
|
|
11725
11876
|
const { t: t2 } = useTranslation();
|
|
11726
11877
|
const { trackAnswer } = useTracking();
|
|
11727
|
-
return /* @__PURE__ */ jsx(TilesWrapper, { $size: size, children: tileIcons.map(({ id, Icon, translationKey }) => /* @__PURE__ */ jsxs(
|
|
11878
|
+
return /* @__PURE__ */ jsx(TilesWrapper$2, { $size: size, children: tileIcons.map(({ id, Icon, translationKey }) => /* @__PURE__ */ jsxs(
|
|
11728
11879
|
Tile,
|
|
11729
11880
|
{
|
|
11730
11881
|
$variant: variant,
|
|
@@ -11851,7 +12002,7 @@ const EmbeddedQuestion = ({
|
|
|
11851
12002
|
mode,
|
|
11852
12003
|
title: getTitleContent(title),
|
|
11853
12004
|
ratings,
|
|
11854
|
-
content: /* @__PURE__ */ jsx(Container, { size: "sm", disableGutters: true, children: /* @__PURE__ */ jsx(
|
|
12005
|
+
content: /* @__PURE__ */ jsx(Container$4, { size: "sm", disableGutters: true, children: /* @__PURE__ */ jsx(
|
|
11855
12006
|
CityTiles,
|
|
11856
12007
|
{
|
|
11857
12008
|
size: "md",
|
|
@@ -11902,7 +12053,7 @@ const EmbeddedQuestion = ({
|
|
|
11902
12053
|
subtitle: t2(
|
|
11903
12054
|
"qualification:embeddedFunnel.dietaryRestrictions.subtitle"
|
|
11904
12055
|
),
|
|
11905
|
-
content: /* @__PURE__ */ jsx(Container, { size: MAX_WIDTH_OF_WHITE_WRAPPER, children: /* @__PURE__ */ jsx(WhiteWrapper, { children: /* @__PURE__ */ jsx(Box, { py: 3, px: 2, children: /* @__PURE__ */ jsx(DietaryDistribution, {}) }) }) })
|
|
12056
|
+
content: /* @__PURE__ */ jsx(Container$4, { size: MAX_WIDTH_OF_WHITE_WRAPPER, children: /* @__PURE__ */ jsx(WhiteWrapper, { children: /* @__PURE__ */ jsx(Box, { py: 3, px: 2, children: /* @__PURE__ */ jsx(DietaryDistribution, {}) }) }) })
|
|
11906
12057
|
}
|
|
11907
12058
|
);
|
|
11908
12059
|
case steps$2.eventDateAndLeadType.id: {
|
|
@@ -11913,7 +12064,7 @@ const EmbeddedQuestion = ({
|
|
|
11913
12064
|
wrapper: ((_c = slides == null ? void 0 : slides.dateAndLead) == null ? void 0 : _c.whiteWrapper) ? "white" : "transparent",
|
|
11914
12065
|
ratings,
|
|
11915
12066
|
title: getTitleContent(title),
|
|
11916
|
-
content: /* @__PURE__ */ jsx(Container, { size: MAX_WIDTH_OF_WHITE_WRAPPER, children: /* @__PURE__ */ jsx(WhiteWrapper, { children: /* @__PURE__ */ jsx(Box, { py: 4, children: /* @__PURE__ */ jsx(DatePickerEmbedded, {}) }) }) })
|
|
12067
|
+
content: /* @__PURE__ */ jsx(Container$4, { size: MAX_WIDTH_OF_WHITE_WRAPPER, children: /* @__PURE__ */ jsx(WhiteWrapper, { children: /* @__PURE__ */ jsx(Box, { py: 4, children: /* @__PURE__ */ jsx(DatePickerEmbedded, {}) }) }) })
|
|
11917
12068
|
}
|
|
11918
12069
|
);
|
|
11919
12070
|
}
|
|
@@ -11925,7 +12076,7 @@ const EmbeddedQuestion = ({
|
|
|
11925
12076
|
wrapper: ((_d = slides == null ? void 0 : slides.budgetAndPeople) == null ? void 0 : _d.whiteWrapper) ? "white" : "transparent",
|
|
11926
12077
|
ratings,
|
|
11927
12078
|
title: getTitleContent(title),
|
|
11928
|
-
content: /* @__PURE__ */ jsx(Container, { size: MAX_WIDTH_OF_WHITE_WRAPPER, children: /* @__PURE__ */ jsx(WhiteWrapper, { children: /* @__PURE__ */ jsx(Box, { py: 4, children: /* @__PURE__ */ jsx(BudgetQuestionWithPeopleCount, {}) }) }) })
|
|
12079
|
+
content: /* @__PURE__ */ jsx(Container$4, { size: MAX_WIDTH_OF_WHITE_WRAPPER, children: /* @__PURE__ */ jsx(WhiteWrapper, { children: /* @__PURE__ */ jsx(Box, { py: 4, children: /* @__PURE__ */ jsx(BudgetQuestionWithPeopleCount, {}) }) }) })
|
|
11929
12080
|
}
|
|
11930
12081
|
);
|
|
11931
12082
|
case steps$2.serviceSelection.id:
|
|
@@ -11935,7 +12086,7 @@ const EmbeddedQuestion = ({
|
|
|
11935
12086
|
mode,
|
|
11936
12087
|
title: getTitleContent(title),
|
|
11937
12088
|
ratings,
|
|
11938
|
-
content: /* @__PURE__ */ jsx(Container, { size: "sm", disableGutters: true, children: /* @__PURE__ */ jsx(
|
|
12089
|
+
content: /* @__PURE__ */ jsx(Container$4, { size: "sm", disableGutters: true, children: /* @__PURE__ */ jsx(
|
|
11939
12090
|
ServiceTypeTiles,
|
|
11940
12091
|
{
|
|
11941
12092
|
variant: highlightColor,
|
|
@@ -11956,7 +12107,7 @@ const EmbeddedQuestion = ({
|
|
|
11956
12107
|
mode,
|
|
11957
12108
|
title: getTitleContent(title),
|
|
11958
12109
|
ratings,
|
|
11959
|
-
content: /* @__PURE__ */ jsx(Container, { size: MAX_WIDTH_OF_WHITE_WRAPPER, children: /* @__PURE__ */ jsx(WhiteWrapper, { children: /* @__PURE__ */ jsx(Box, { py: 4, children: /* @__PURE__ */ jsx(
|
|
12110
|
+
content: /* @__PURE__ */ jsx(Container$4, { size: MAX_WIDTH_OF_WHITE_WRAPPER, children: /* @__PURE__ */ jsx(WhiteWrapper, { children: /* @__PURE__ */ jsx(Box, { py: 4, children: /* @__PURE__ */ jsx(
|
|
11960
12111
|
TeamSizeInput,
|
|
11961
12112
|
{
|
|
11962
12113
|
label: t2("qualification:embeddedFunnel.teamSize.label", (_e = teamSizeQuestion.content) == null ? void 0 : _e.titleDe),
|
|
@@ -11976,7 +12127,7 @@ const EmbeddedQuestion = ({
|
|
|
11976
12127
|
mode,
|
|
11977
12128
|
title: getTitleContent(title),
|
|
11978
12129
|
ratings,
|
|
11979
|
-
content: /* @__PURE__ */ jsxs(Container, { size: "sm", disableGutters: true, children: [
|
|
12130
|
+
content: /* @__PURE__ */ jsxs(Container$4, { size: "sm", disableGutters: true, children: [
|
|
11980
12131
|
/* @__PURE__ */ jsx(
|
|
11981
12132
|
DeliveryFrequencyTiles,
|
|
11982
12133
|
{
|
|
@@ -12000,7 +12151,7 @@ const EmbeddedQuestion = ({
|
|
|
12000
12151
|
mode,
|
|
12001
12152
|
title: getTitleContent(title),
|
|
12002
12153
|
ratings,
|
|
12003
|
-
content: /* @__PURE__ */ jsx(Container, { size: MAX_WIDTH_OF_WHITE_WRAPPER, children: /* @__PURE__ */ jsx(WhiteWrapper, { children: /* @__PURE__ */ jsx(Box, { py: 4, children: /* @__PURE__ */ jsx(
|
|
12154
|
+
content: /* @__PURE__ */ jsx(Container$4, { size: MAX_WIDTH_OF_WHITE_WRAPPER, children: /* @__PURE__ */ jsx(WhiteWrapper, { children: /* @__PURE__ */ jsx(Box, { py: 4, children: /* @__PURE__ */ jsx(
|
|
12004
12155
|
TeamSizeInput,
|
|
12005
12156
|
{
|
|
12006
12157
|
label: t2("common:questions.min_order_number"),
|
|
@@ -12020,7 +12171,7 @@ const EmbeddedQuestion = ({
|
|
|
12020
12171
|
mode,
|
|
12021
12172
|
title: getTitleContent(title),
|
|
12022
12173
|
ratings,
|
|
12023
|
-
content: /* @__PURE__ */ jsxs(Container, { size: "sm", disableGutters: true, children: [
|
|
12174
|
+
content: /* @__PURE__ */ jsxs(Container$4, { size: "sm", disableGutters: true, children: [
|
|
12024
12175
|
/* @__PURE__ */ jsx(
|
|
12025
12176
|
BudgetRangeTiles,
|
|
12026
12177
|
{
|
|
@@ -14740,7 +14891,7 @@ function NavbarBase({
|
|
|
14740
14891
|
const isMediumScreen = useBreakpointUp("md");
|
|
14741
14892
|
const mobile = !isMediumScreen;
|
|
14742
14893
|
const { t: t2 } = useTranslation("common");
|
|
14743
|
-
return /* @__PURE__ */ jsx(Navbar, { bgcolor, children: /* @__PURE__ */ jsx(Container, { size: "md", children: /* @__PURE__ */ jsxs(Box, { display: "flex", justifyContent: "space-between", alignItems: "center", children: [
|
|
14894
|
+
return /* @__PURE__ */ jsx(Navbar, { bgcolor, children: /* @__PURE__ */ jsx(Container$4, { size: "md", children: /* @__PURE__ */ jsxs(Box, { display: "flex", justifyContent: "space-between", alignItems: "center", children: [
|
|
14744
14895
|
/* @__PURE__ */ jsx(NavbarLogo, { href: logoHref }),
|
|
14745
14896
|
isMediumScreen && ratings && /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(
|
|
14746
14897
|
Box,
|
|
@@ -14750,10 +14901,10 @@ function NavbarBase({
|
|
|
14750
14901
|
alignItems: "center",
|
|
14751
14902
|
flexWrap: "nowrap",
|
|
14752
14903
|
children: /* @__PURE__ */ jsxs(TrustedShopsBox, { children: [
|
|
14753
|
-
/* @__PURE__ */ jsx(Stars, { children: /* @__PURE__ */ jsx(TrustedShopsStars, {}) }),
|
|
14904
|
+
/* @__PURE__ */ jsx(Stars$1, { children: /* @__PURE__ */ jsx(TrustedShopsStars, {}) }),
|
|
14754
14905
|
/* @__PURE__ */ jsxs(Text, { children: [
|
|
14755
14906
|
/* @__PURE__ */ jsx("strong", { children: formatRating(getRating(ratings)) }),
|
|
14756
|
-
/* @__PURE__ */ jsxs(RatingText, { children: [
|
|
14907
|
+
/* @__PURE__ */ jsxs(RatingText$1, { children: [
|
|
14757
14908
|
" ",
|
|
14758
14909
|
t2("trustedShops.ratingText")
|
|
14759
14910
|
] })
|
|
@@ -14932,11 +15083,11 @@ const TrustedShopsBox = styled(Box)`
|
|
|
14932
15083
|
gap: 10px;
|
|
14933
15084
|
text-decoration: none;
|
|
14934
15085
|
`;
|
|
14935
|
-
const Stars = styled(Box)`
|
|
15086
|
+
const Stars$1 = styled(Box)`
|
|
14936
15087
|
width: 100%;
|
|
14937
15088
|
min-width: 70px;
|
|
14938
15089
|
`;
|
|
14939
|
-
const RatingText = styled.span`
|
|
15090
|
+
const RatingText$1 = styled.span`
|
|
14940
15091
|
flex-shrink: 0;
|
|
14941
15092
|
`;
|
|
14942
15093
|
const RatingCount = styled.span`
|
|
@@ -17502,11 +17653,11 @@ var KeyframesRule = /* @__PURE__ */ function() {
|
|
|
17502
17653
|
}();
|
|
17503
17654
|
var keyRegExp$1 = /@keyframes\s+/;
|
|
17504
17655
|
var refRegExp$1 = /\$([\w-]+)/g;
|
|
17505
|
-
var findReferencedKeyframe = function findReferencedKeyframe2(val,
|
|
17656
|
+
var findReferencedKeyframe = function findReferencedKeyframe2(val, keyframes2) {
|
|
17506
17657
|
if (typeof val === "string") {
|
|
17507
17658
|
return val.replace(refRegExp$1, function(match2, name) {
|
|
17508
|
-
if (name in
|
|
17509
|
-
return
|
|
17659
|
+
if (name in keyframes2) {
|
|
17660
|
+
return keyframes2[name];
|
|
17510
17661
|
}
|
|
17511
17662
|
process.env.NODE_ENV !== "production" ? warning(false, '[JSS] Referenced keyframes rule "' + name + '" is not defined.') : void 0;
|
|
17512
17663
|
return match2;
|
|
@@ -17514,9 +17665,9 @@ var findReferencedKeyframe = function findReferencedKeyframe2(val, keyframes) {
|
|
|
17514
17665
|
}
|
|
17515
17666
|
return val;
|
|
17516
17667
|
};
|
|
17517
|
-
var replaceRef = function replaceRef2(style, prop,
|
|
17668
|
+
var replaceRef = function replaceRef2(style, prop, keyframes2) {
|
|
17518
17669
|
var value = style[prop];
|
|
17519
|
-
var refKeyframe = findReferencedKeyframe(value,
|
|
17670
|
+
var refKeyframe = findReferencedKeyframe(value, keyframes2);
|
|
17520
17671
|
if (refKeyframe !== value) {
|
|
17521
17672
|
style[prop] = refKeyframe;
|
|
17522
17673
|
}
|
|
@@ -23875,7 +24026,7 @@ var styles$1 = function styles26(theme) {
|
|
|
23875
24026
|
function isDeleteKeyboardEvent(keyboardEvent) {
|
|
23876
24027
|
return keyboardEvent.key === "Backspace" || keyboardEvent.key === "Delete";
|
|
23877
24028
|
}
|
|
23878
|
-
var Chip = /* @__PURE__ */ React.forwardRef(function Chip2(props, ref2) {
|
|
24029
|
+
var Chip$1 = /* @__PURE__ */ React.forwardRef(function Chip2(props, ref2) {
|
|
23879
24030
|
var avatarProp = props.avatar, classes = props.classes, className = props.className, clickableProp = props.clickable, _props$color = props.color, color = _props$color === void 0 ? "default" : _props$color, ComponentProp = props.component, deleteIconProp = props.deleteIcon, _props$disabled = props.disabled, disabled = _props$disabled === void 0 ? false : _props$disabled, iconProp = props.icon, label = props.label, onClick = props.onClick, onDelete = props.onDelete, onKeyDown = props.onKeyDown, onKeyUp = props.onKeyUp, _props$size = props.size, size = _props$size === void 0 ? "medium" : _props$size, _props$variant = props.variant, variant = _props$variant === void 0 ? "default" : _props$variant, other = _objectWithoutProperties(props, ["avatar", "classes", "className", "clickable", "color", "component", "deleteIcon", "disabled", "icon", "label", "onClick", "onDelete", "onKeyDown", "onKeyUp", "size", "variant"]);
|
|
23880
24031
|
var chipRef = React.useRef(null);
|
|
23881
24032
|
var handleRef = useForkRef(chipRef, ref2);
|
|
@@ -23955,7 +24106,7 @@ var Chip = /* @__PURE__ */ React.forwardRef(function Chip2(props, ref2) {
|
|
|
23955
24106
|
className: clsx(classes.label, small && classes.labelSmall)
|
|
23956
24107
|
}, label), deleteIcon);
|
|
23957
24108
|
});
|
|
23958
|
-
process.env.NODE_ENV !== "production" ? Chip.propTypes = {
|
|
24109
|
+
process.env.NODE_ENV !== "production" ? Chip$1.propTypes = {
|
|
23959
24110
|
// ----------------------------- Warning --------------------------------
|
|
23960
24111
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
23961
24112
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
@@ -24037,9 +24188,9 @@ process.env.NODE_ENV !== "production" ? Chip.propTypes = {
|
|
|
24037
24188
|
*/
|
|
24038
24189
|
variant: PropTypes.oneOf(["default", "outlined"])
|
|
24039
24190
|
} : void 0;
|
|
24040
|
-
const Chip$
|
|
24191
|
+
const Chip$2 = withStyles(styles$1, {
|
|
24041
24192
|
name: "MuiChip"
|
|
24042
|
-
})(Chip);
|
|
24193
|
+
})(Chip$1);
|
|
24043
24194
|
function useControlled(_ref3) {
|
|
24044
24195
|
var controlled = _ref3.controlled, defaultProp = _ref3.default, name = _ref3.name, _ref$state = _ref3.state, state = _ref$state === void 0 ? "value" : _ref$state;
|
|
24045
24196
|
var _React$useRef = React.useRef(controlled !== void 0), isControlled = _React$useRef.current;
|
|
@@ -25188,7 +25339,7 @@ var Autocomplete = /* @__PURE__ */ React.forwardRef(function Autocomplete2(props
|
|
|
25188
25339
|
startAdornment = renderTags(value, getCustomizedTagProps);
|
|
25189
25340
|
} else {
|
|
25190
25341
|
startAdornment = value.map(function(option, index) {
|
|
25191
|
-
return /* @__PURE__ */ React.createElement(Chip$
|
|
25342
|
+
return /* @__PURE__ */ React.createElement(Chip$2, _extends$2({
|
|
25192
25343
|
label: getOptionLabel(option),
|
|
25193
25344
|
size
|
|
25194
25345
|
}, getCustomizedTagProps({
|
|
@@ -26247,7 +26398,7 @@ function AutocompleteAddress({
|
|
|
26247
26398
|
return /* @__PURE__ */ jsx("div", { ref: params.InputProps.ref, children: /* @__PURE__ */ jsx(FormControl, { error: showError, required, children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
26248
26399
|
label && /* @__PURE__ */ jsx(InputLabel, { required: true, htmlFor: field.name, children: label }),
|
|
26249
26400
|
/* @__PURE__ */ jsx(
|
|
26250
|
-
Input,
|
|
26401
|
+
Input$1,
|
|
26251
26402
|
{
|
|
26252
26403
|
name: "delivery_address",
|
|
26253
26404
|
placeholder,
|
|
@@ -26493,7 +26644,7 @@ function FormikFormField({
|
|
|
26493
26644
|
ref: inputRef
|
|
26494
26645
|
}
|
|
26495
26646
|
) : /* @__PURE__ */ jsx(
|
|
26496
|
-
Input,
|
|
26647
|
+
Input$1,
|
|
26497
26648
|
{
|
|
26498
26649
|
...field,
|
|
26499
26650
|
type: type2,
|
|
@@ -26541,7 +26692,7 @@ function PhoneField({ label, name, formik, helperText }) {
|
|
|
26541
26692
|
helperText && /* @__PURE__ */ jsx(FormHelperText, { children: helperText })
|
|
26542
26693
|
] });
|
|
26543
26694
|
}
|
|
26544
|
-
const StyledInput = styled(Input)`
|
|
26695
|
+
const StyledInput = styled(Input$1)`
|
|
26545
26696
|
border-color: ${(props) => props.$hasError ? props.theme.palette.error.main : "transparent"};
|
|
26546
26697
|
`;
|
|
26547
26698
|
function Success({ isUkLead = false }) {
|
|
@@ -26568,18 +26719,18 @@ function Success({ isUkLead = false }) {
|
|
|
26568
26719
|
alt: ""
|
|
26569
26720
|
}
|
|
26570
26721
|
) }),
|
|
26571
|
-
/* @__PURE__ */ jsx(Title, { children: t2("embeddedFunnel.success.title") }),
|
|
26572
|
-
/* @__PURE__ */ jsx(Box, { mt: 4, children: /* @__PURE__ */ jsx(Subtitle, { children: t2("embeddedFunnel.success.subtitle") }) })
|
|
26722
|
+
/* @__PURE__ */ jsx(Title$2, { children: t2("embeddedFunnel.success.title") }),
|
|
26723
|
+
/* @__PURE__ */ jsx(Box, { mt: 4, children: /* @__PURE__ */ jsx(Subtitle$1, { children: t2("embeddedFunnel.success.subtitle") }) })
|
|
26573
26724
|
] }) }) })
|
|
26574
26725
|
] });
|
|
26575
26726
|
}
|
|
26576
|
-
const Title = styled(Typography)`
|
|
26727
|
+
const Title$2 = styled(Typography)`
|
|
26577
26728
|
font-size: 20px;
|
|
26578
26729
|
font-weight: 700;
|
|
26579
26730
|
text-align: center;
|
|
26580
26731
|
margin-bottom: ${({ theme }) => theme.spacing(4)}px;
|
|
26581
26732
|
`;
|
|
26582
|
-
const Subtitle = styled(Typography)`
|
|
26733
|
+
const Subtitle$1 = styled(Typography)`
|
|
26583
26734
|
font-size: 16px;
|
|
26584
26735
|
font-weight: 400;
|
|
26585
26736
|
text-align: center;
|
|
@@ -26807,8 +26958,17 @@ function useRequestForm() {
|
|
|
26807
26958
|
);
|
|
26808
26959
|
}
|
|
26809
26960
|
const leadSource = ((_c = qualification.leadSource) == null ? void 0 : _c.includes("/events")) ? "events-landingpage" : "Qualification Funnel";
|
|
26961
|
+
const answers = qualification.answers;
|
|
26962
|
+
const isRedesignFunnel = !!answers.event_type;
|
|
26963
|
+
const peopleCount = answers.min_order_number || 0;
|
|
26964
|
+
const dietaryDefaults = isRedesignFunnel ? {
|
|
26965
|
+
number_of_carnivore: peopleCount,
|
|
26966
|
+
number_of_vegans: 0,
|
|
26967
|
+
number_of_vegetarians: 0
|
|
26968
|
+
} : {};
|
|
26810
26969
|
return {
|
|
26811
|
-
...
|
|
26970
|
+
...answers,
|
|
26971
|
+
...dietaryDefaults,
|
|
26812
26972
|
...values2,
|
|
26813
26973
|
phone: values2.phone || "",
|
|
26814
26974
|
catererSlug: (_d = qualification == null ? void 0 : qualification.selectedCaterer) == null ? void 0 : _d.slug,
|
|
@@ -26843,9 +27003,10 @@ function useRequestForm() {
|
|
|
26843
27003
|
if (isLeadOnlyFunnel || isUkLead) {
|
|
26844
27004
|
try {
|
|
26845
27005
|
const leadSource = ((_b = qualification == null ? void 0 : qualification.leadSource) == null ? void 0 : _b.includes("/events")) ? "events-landingpage" : "Qualification Funnel";
|
|
27006
|
+
const answers = (qualification == null ? void 0 : qualification.answers) || {};
|
|
26846
27007
|
const response = await createQfLead({
|
|
26847
27008
|
...values2,
|
|
26848
|
-
...
|
|
27009
|
+
...answers,
|
|
26849
27010
|
leadSource,
|
|
26850
27011
|
conversionUrl: window.location.href,
|
|
26851
27012
|
entranceUrl: getCookie("entrance_url"),
|
|
@@ -27047,7 +27208,7 @@ function RequestForm({ header = null }) {
|
|
|
27047
27208
|
actions.setRequest(values2);
|
|
27048
27209
|
redirectToCustomerAccountRequest(redirectRoute);
|
|
27049
27210
|
};
|
|
27050
|
-
const
|
|
27211
|
+
const SubmitButton2 = ({ isFormValid }) => {
|
|
27051
27212
|
const content = /* @__PURE__ */ jsxs(
|
|
27052
27213
|
Button,
|
|
27053
27214
|
{
|
|
@@ -27220,7 +27381,7 @@ function RequestForm({ header = null }) {
|
|
|
27220
27381
|
`${pill.stepId}_${pill.text}`
|
|
27221
27382
|
)) })
|
|
27222
27383
|
] }),
|
|
27223
|
-
/* @__PURE__ */ jsx(Box, { ref: ref2, children: /* @__PURE__ */ jsx(
|
|
27384
|
+
/* @__PURE__ */ jsx(Box, { ref: ref2, children: /* @__PURE__ */ jsx(SubmitButton2, { isFormValid: formik.isValid }) })
|
|
27224
27385
|
] });
|
|
27225
27386
|
}
|
|
27226
27387
|
}
|
|
@@ -27296,7 +27457,7 @@ function EmbeddedRequestPage({ ratings }) {
|
|
|
27296
27457
|
"aria-labelledby": TITLE_ID,
|
|
27297
27458
|
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
27298
27459
|
/* @__PURE__ */ jsx(Box, { position: xsDown ? "relative" : "absolute", left: "0", right: "0", children: /* @__PURE__ */ jsx(NavbarBase, { ratings, bgcolor: "white", showLogin: true }) }),
|
|
27299
|
-
/* @__PURE__ */ jsx(PageWrapper, { children: /* @__PURE__ */ jsxs(FormWrapper$
|
|
27460
|
+
/* @__PURE__ */ jsx(PageWrapper, { children: /* @__PURE__ */ jsxs(FormWrapper$2, { children: [
|
|
27300
27461
|
/* @__PURE__ */ jsx(Box, { visibility: xsDown ? "hidden" : "visible", children: /* @__PURE__ */ jsx(CateringCategoryBackgroundImage, { category: cateringCategory }) }),
|
|
27301
27462
|
/* @__PURE__ */ jsx(FormContainer, { children: /* @__PURE__ */ jsx(StyledBox, { py: xsDown ? 1 : 4, pt: 2, children: /* @__PURE__ */ jsx(
|
|
27302
27463
|
RequestForm,
|
|
@@ -27333,7 +27494,7 @@ const PageWrapper = styled.div`
|
|
|
27333
27494
|
pointer-events: none;
|
|
27334
27495
|
}
|
|
27335
27496
|
`;
|
|
27336
|
-
const FormWrapper$
|
|
27497
|
+
const FormWrapper$2 = styled.div`
|
|
27337
27498
|
min-height: 100vh;
|
|
27338
27499
|
|
|
27339
27500
|
${({ theme }) => theme.breakpoints.up("sm")} {
|
|
@@ -30132,88 +30293,2765 @@ const LoadingIndicator = ({ variant }) => {
|
|
|
30132
30293
|
const WrapperBox = styled(Box)`
|
|
30133
30294
|
color: var(--embedded-text-color, inherit);
|
|
30134
30295
|
`;
|
|
30135
|
-
|
|
30136
|
-
|
|
30137
|
-
|
|
30138
|
-
|
|
30139
|
-
|
|
30140
|
-
|
|
30141
|
-
|
|
30142
|
-
|
|
30143
|
-
|
|
30144
|
-
|
|
30145
|
-
|
|
30296
|
+
const REDESIGN_COLORS = {
|
|
30297
|
+
orange: "#F95524",
|
|
30298
|
+
mainText: "#000416",
|
|
30299
|
+
secondaryText: "#585858",
|
|
30300
|
+
beige: "#F5F2ED",
|
|
30301
|
+
white: "#FFFFFF",
|
|
30302
|
+
white200: "#F7F7F8",
|
|
30303
|
+
border: "#EBEBEB",
|
|
30304
|
+
success: "#2E8B4A",
|
|
30305
|
+
successLight: "#EAF4EC",
|
|
30306
|
+
error: "#D1381C",
|
|
30307
|
+
muted: "#8a8a8a",
|
|
30308
|
+
railConnector: "#DCD6CB",
|
|
30309
|
+
railInactive: "#E7E2D9",
|
|
30310
|
+
railMuted: "#a8a29a",
|
|
30311
|
+
inputBorder: "#E4E4E4",
|
|
30312
|
+
disabledOrange: "#FBC7B5",
|
|
30313
|
+
orangeLighter: "#FFF6F2",
|
|
30314
|
+
starColor: "#FFC53D",
|
|
30315
|
+
progressBg: "#F1EDE7"
|
|
30316
|
+
};
|
|
30317
|
+
const REDESIGN_FONTS = {
|
|
30318
|
+
family: "'Poppins', system-ui, -apple-system, 'Helvetica Neue', sans-serif",
|
|
30319
|
+
weight: {
|
|
30320
|
+
regular: 400,
|
|
30321
|
+
medium: 500,
|
|
30322
|
+
semibold: 600
|
|
30323
|
+
},
|
|
30324
|
+
letterSpacing: {
|
|
30325
|
+
tight: "-0.02em"
|
|
30326
|
+
}
|
|
30327
|
+
};
|
|
30328
|
+
const REDESIGN_SPACING = {
|
|
30329
|
+
railWidth: "392px",
|
|
30330
|
+
railPadding: "38px",
|
|
30331
|
+
stepCircleSize: "30px",
|
|
30332
|
+
connectorHeight: "18px"
|
|
30333
|
+
};
|
|
30334
|
+
const CITY_LABELS = {
|
|
30335
|
+
berlin: "Berlin",
|
|
30336
|
+
muenchen: "München",
|
|
30337
|
+
"frankfurt-am-main": "Frankfurt a.M.",
|
|
30338
|
+
hamburg: "Hamburg",
|
|
30339
|
+
duesseldorf: "Düsseldorf",
|
|
30340
|
+
koeln: "Köln",
|
|
30341
|
+
stuttgart: "Stuttgart",
|
|
30342
|
+
wien: "Wien",
|
|
30343
|
+
other: "Andere Stadt"
|
|
30344
|
+
};
|
|
30345
|
+
const EVENT_LABELS_DE = {
|
|
30346
|
+
lunch: "Mittagessen",
|
|
30347
|
+
breakfast: "Frühstück",
|
|
30348
|
+
party: "Firmenfeier",
|
|
30349
|
+
meeting: "Meeting",
|
|
30350
|
+
conference: "Konferenz / Messe",
|
|
30351
|
+
workshop: "Workshop / Teamtag",
|
|
30352
|
+
other: "Individueller Anlass"
|
|
30353
|
+
};
|
|
30354
|
+
const EVENT_LABELS_EN = {
|
|
30355
|
+
lunch: "Lunch",
|
|
30356
|
+
breakfast: "Breakfast",
|
|
30357
|
+
party: "Company Party",
|
|
30358
|
+
meeting: "Meeting",
|
|
30359
|
+
conference: "Conference / Fair",
|
|
30360
|
+
workshop: "Workshop / Team Day",
|
|
30361
|
+
other: "Other Event"
|
|
30362
|
+
};
|
|
30363
|
+
const LOADING_STEPS_DE = [
|
|
30364
|
+
"Ort und Termin werden geprüft",
|
|
30365
|
+
"Passende Caterer werden gesucht",
|
|
30366
|
+
"Deine Anfrage wird vorbereitet"
|
|
30367
|
+
];
|
|
30368
|
+
const LOADING_STEPS_EN = [
|
|
30369
|
+
"Checking location and date",
|
|
30370
|
+
"Finding matching caterers",
|
|
30371
|
+
"Preparing your request"
|
|
30372
|
+
];
|
|
30373
|
+
const CITY_ITEMS = [
|
|
30374
|
+
{ value: "berlin", labelDe: "Berlin", labelEn: "Berlin" },
|
|
30375
|
+
{ value: "muenchen", labelDe: "München", labelEn: "Munich" },
|
|
30376
|
+
{ value: "frankfurt-am-main", labelDe: "Frankfurt a.M.", labelEn: "Frankfurt" },
|
|
30377
|
+
{ value: "hamburg", labelDe: "Hamburg", labelEn: "Hamburg" },
|
|
30378
|
+
{ value: "duesseldorf", labelDe: "Düsseldorf", labelEn: "Düsseldorf" },
|
|
30379
|
+
{ value: "koeln", labelDe: "Köln", labelEn: "Cologne" },
|
|
30380
|
+
{ value: "stuttgart", labelDe: "Stuttgart", labelEn: "Stuttgart" },
|
|
30381
|
+
{ value: "wien", labelDe: "Wien", labelEn: "Vienna" },
|
|
30382
|
+
{ value: "other", labelDe: "Andere Stadt", labelEn: "Other City" }
|
|
30383
|
+
];
|
|
30384
|
+
const RedesignCityTiles = ({ selected, onSelect }) => {
|
|
30385
|
+
var _a2;
|
|
30386
|
+
const { i18n } = useTranslation();
|
|
30387
|
+
const isGerman = (_a2 = i18n.language) == null ? void 0 : _a2.startsWith("de");
|
|
30388
|
+
return /* @__PURE__ */ jsx(TilesWrapper$1, { children: CITY_ITEMS.map((item) => {
|
|
30389
|
+
const label = isGerman ? item.labelDe : item.labelEn;
|
|
30390
|
+
const isSelected = selected === item.value;
|
|
30391
|
+
return /* @__PURE__ */ jsxs(
|
|
30392
|
+
CityTile,
|
|
30393
|
+
{
|
|
30394
|
+
$selected: isSelected,
|
|
30395
|
+
id: `tile__city--${item.value}`,
|
|
30396
|
+
"data-ph-capture-attribute-value": item.value,
|
|
30397
|
+
onClick: (e2) => {
|
|
30398
|
+
e2.currentTarget.blur();
|
|
30399
|
+
onSelect(item.value);
|
|
30400
|
+
},
|
|
30401
|
+
children: [
|
|
30402
|
+
isSelected && /* @__PURE__ */ jsx(SelectionBadge$1, { children: /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "#fff", strokeWidth: "3.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M20 6L9 17l-5-5" }) }) }),
|
|
30403
|
+
/* @__PURE__ */ jsx(IconContainer$1, { children: /* @__PURE__ */ jsx(CityIcon, { city: item.value }) }),
|
|
30404
|
+
/* @__PURE__ */ jsx(TileLabel$1, { children: label })
|
|
30405
|
+
]
|
|
30406
|
+
},
|
|
30407
|
+
item.value
|
|
30408
|
+
);
|
|
30409
|
+
}) });
|
|
30410
|
+
};
|
|
30411
|
+
const CITY_ICON_MAP = {
|
|
30412
|
+
berlin: Berlin,
|
|
30413
|
+
muenchen: Munich,
|
|
30414
|
+
"frankfurt-am-main": FrankfurtMain,
|
|
30415
|
+
hamburg: Hamburg,
|
|
30416
|
+
duesseldorf: Dusseldorf,
|
|
30417
|
+
koeln: Cologne,
|
|
30418
|
+
stuttgart: Stuttgart,
|
|
30419
|
+
wien: Vienna,
|
|
30420
|
+
other: Other
|
|
30421
|
+
};
|
|
30422
|
+
const CityIcon = ({ city }) => {
|
|
30423
|
+
const IconComponent = CITY_ICON_MAP[city] || Other;
|
|
30424
|
+
return /* @__PURE__ */ jsx(IconComponent, { height: "46px" });
|
|
30425
|
+
};
|
|
30426
|
+
const popIn$1 = keyframes`
|
|
30427
|
+
0% { transform: scale(0.4); opacity: 0; }
|
|
30428
|
+
60% { transform: scale(1.12); }
|
|
30429
|
+
100% { transform: scale(1); opacity: 1; }
|
|
30430
|
+
`;
|
|
30431
|
+
const TilesWrapper$1 = styled.div`
|
|
30432
|
+
display: grid;
|
|
30433
|
+
grid-template-columns: repeat(2, 1fr);
|
|
30434
|
+
gap: 10px;
|
|
30435
|
+
width: 100%;
|
|
30436
|
+
|
|
30437
|
+
@media (min-width: 640px) {
|
|
30438
|
+
display: flex;
|
|
30439
|
+
flex-wrap: wrap;
|
|
30440
|
+
gap: 14px;
|
|
30441
|
+
justify-content: center;
|
|
30442
|
+
max-width: 790px;
|
|
30443
|
+
}
|
|
30444
|
+
`;
|
|
30445
|
+
const CityTile = styled.button`
|
|
30446
|
+
position: relative;
|
|
30447
|
+
background: ${({ $selected }) => $selected ? REDESIGN_COLORS.orangeLighter : REDESIGN_COLORS.white};
|
|
30448
|
+
border-radius: 12px;
|
|
30449
|
+
padding: 16px 12px;
|
|
30450
|
+
display: flex;
|
|
30451
|
+
flex-direction: column;
|
|
30452
|
+
align-items: center;
|
|
30453
|
+
gap: 10px;
|
|
30454
|
+
cursor: pointer;
|
|
30455
|
+
transition: all 0.15s;
|
|
30456
|
+
box-sizing: border-box;
|
|
30457
|
+
border: ${({ $selected }) => $selected ? `2px solid ${REDESIGN_COLORS.orange}` : `1px solid ${REDESIGN_COLORS.border}`};
|
|
30458
|
+
min-height: 144px;
|
|
30459
|
+
justify-content: center;
|
|
30460
|
+
|
|
30461
|
+
@media (min-width: 640px) {
|
|
30462
|
+
width: 144px;
|
|
30463
|
+
height: 144px;
|
|
30464
|
+
padding: 16px 12px;
|
|
30465
|
+
}
|
|
30466
|
+
|
|
30467
|
+
@media (max-width: 639px) {
|
|
30468
|
+
height: 118px;
|
|
30469
|
+
padding: 12px 8px;
|
|
30470
|
+
}
|
|
30471
|
+
|
|
30472
|
+
&:hover {
|
|
30473
|
+
border-color: ${REDESIGN_COLORS.orange};
|
|
30474
|
+
transform: translateY(-1px);
|
|
30475
|
+
}
|
|
30476
|
+
|
|
30477
|
+
&:focus {
|
|
30478
|
+
outline: none;
|
|
30479
|
+
box-shadow: 0 0 0 3px rgba(249, 85, 36, 0.2);
|
|
30480
|
+
}
|
|
30481
|
+
`;
|
|
30482
|
+
const SelectionBadge$1 = styled.div`
|
|
30483
|
+
position: absolute;
|
|
30484
|
+
top: 9px;
|
|
30485
|
+
right: 9px;
|
|
30486
|
+
width: 22px;
|
|
30487
|
+
height: 22px;
|
|
30488
|
+
border-radius: 50%;
|
|
30489
|
+
background: ${REDESIGN_COLORS.success};
|
|
30490
|
+
display: flex;
|
|
30491
|
+
align-items: center;
|
|
30492
|
+
justify-content: center;
|
|
30493
|
+
animation: ${popIn$1} 0.3s both;
|
|
30494
|
+
`;
|
|
30495
|
+
const IconContainer$1 = styled.div`
|
|
30496
|
+
display: flex;
|
|
30497
|
+
align-items: center;
|
|
30498
|
+
justify-content: center;
|
|
30499
|
+
height: 60px;
|
|
30500
|
+
color: ${REDESIGN_COLORS.orange};
|
|
30501
|
+
|
|
30502
|
+
@media (max-width: 639px) {
|
|
30503
|
+
height: 50px;
|
|
30504
|
+
}
|
|
30505
|
+
`;
|
|
30506
|
+
const TileLabel$1 = styled.span`
|
|
30507
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
30508
|
+
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
30509
|
+
font-size: 14px;
|
|
30510
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
30511
|
+
text-align: center;
|
|
30512
|
+
line-height: 1.25;
|
|
30513
|
+
height: 34px;
|
|
30514
|
+
display: flex;
|
|
30515
|
+
align-items: center;
|
|
30516
|
+
justify-content: center;
|
|
30517
|
+
`;
|
|
30518
|
+
const ICON_BASE_PATH = "/artifacts/icons/catering_category";
|
|
30519
|
+
const getIconUrl = (name) => getAssetUrl(`${ICON_BASE_PATH}/${name}.svg`);
|
|
30520
|
+
const EVENT_TYPE_TO_ICON = {
|
|
30521
|
+
lunch: "business_lunch",
|
|
30522
|
+
breakfast: "breakfast",
|
|
30523
|
+
party: "buffet",
|
|
30524
|
+
meeting: "fingerfood",
|
|
30525
|
+
conference: "buffet",
|
|
30526
|
+
workshop: "business_lunch"
|
|
30527
|
+
};
|
|
30528
|
+
const EventTypeTiles = ({
|
|
30529
|
+
onSelect,
|
|
30530
|
+
selected
|
|
30531
|
+
}) => {
|
|
30532
|
+
var _a2;
|
|
30533
|
+
const { i18n } = useTranslation();
|
|
30534
|
+
const isGerman = (_a2 = i18n.language) == null ? void 0 : _a2.startsWith("de");
|
|
30535
|
+
return /* @__PURE__ */ jsx(TilesWrapper, { children: EVENT_TYPE_ITEMS.map((item) => {
|
|
30536
|
+
const label = isGerman ? item.labelDe : item.labelEn;
|
|
30537
|
+
const isSelected = selected === item.value;
|
|
30538
|
+
return /* @__PURE__ */ jsxs(
|
|
30539
|
+
EventTile,
|
|
30540
|
+
{
|
|
30541
|
+
$selected: isSelected,
|
|
30542
|
+
id: `tile__event-type--${item.value}`,
|
|
30543
|
+
"data-ph-capture-attribute-value": item.value,
|
|
30544
|
+
onClick: (e2) => {
|
|
30545
|
+
e2.currentTarget.blur();
|
|
30546
|
+
onSelect(item.value);
|
|
30547
|
+
},
|
|
30548
|
+
children: [
|
|
30549
|
+
isSelected && /* @__PURE__ */ jsx(SelectionBadge, { children: /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "#fff", strokeWidth: "3.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M20 6L9 17l-5-5" }) }) }),
|
|
30550
|
+
/* @__PURE__ */ jsx(IconContainer, { children: /* @__PURE__ */ jsx(EventIcon, { iconName: item.iconName }) }),
|
|
30551
|
+
/* @__PURE__ */ jsx(TileLabel, { children: label.includes("/") ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
30552
|
+
label.split("/")[0],
|
|
30553
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
30554
|
+
label.split("/")[1]
|
|
30555
|
+
] }) : label })
|
|
30556
|
+
]
|
|
30557
|
+
},
|
|
30558
|
+
item.value
|
|
30559
|
+
);
|
|
30560
|
+
}) });
|
|
30561
|
+
};
|
|
30562
|
+
const EventIcon = ({ iconName }) => {
|
|
30563
|
+
const mappedIcon = EVENT_TYPE_TO_ICON[iconName];
|
|
30564
|
+
if (!mappedIcon) {
|
|
30565
|
+
return /* @__PURE__ */ jsx(QuestionMark, { height: "46px" });
|
|
30566
|
+
}
|
|
30567
|
+
return /* @__PURE__ */ jsx(
|
|
30568
|
+
StyledImg,
|
|
30569
|
+
{
|
|
30570
|
+
alt: "",
|
|
30571
|
+
width: 46,
|
|
30572
|
+
height: 46,
|
|
30573
|
+
src: getIconUrl(mappedIcon)
|
|
30146
30574
|
}
|
|
30147
|
-
|
|
30148
|
-
|
|
30149
|
-
|
|
30150
|
-
|
|
30151
|
-
|
|
30152
|
-
|
|
30153
|
-
|
|
30154
|
-
|
|
30155
|
-
|
|
30156
|
-
|
|
30157
|
-
|
|
30158
|
-
|
|
30159
|
-
|
|
30160
|
-
|
|
30161
|
-
|
|
30162
|
-
|
|
30163
|
-
|
|
30164
|
-
|
|
30165
|
-
|
|
30166
|
-
|
|
30167
|
-
|
|
30168
|
-
|
|
30169
|
-
|
|
30170
|
-
|
|
30171
|
-
|
|
30172
|
-
|
|
30173
|
-
|
|
30174
|
-
|
|
30175
|
-
|
|
30176
|
-
|
|
30177
|
-
|
|
30178
|
-
|
|
30179
|
-
|
|
30180
|
-
|
|
30181
|
-
|
|
30182
|
-
|
|
30183
|
-
|
|
30184
|
-
|
|
30185
|
-
|
|
30186
|
-
|
|
30187
|
-
|
|
30188
|
-
|
|
30189
|
-
|
|
30190
|
-
|
|
30191
|
-
|
|
30192
|
-
|
|
30193
|
-
|
|
30194
|
-
|
|
30195
|
-
|
|
30196
|
-
|
|
30197
|
-
|
|
30198
|
-
|
|
30199
|
-
}
|
|
30200
|
-
|
|
30201
|
-
|
|
30202
|
-
|
|
30203
|
-
|
|
30204
|
-
|
|
30205
|
-
|
|
30206
|
-
|
|
30207
|
-
|
|
30208
|
-
|
|
30209
|
-
|
|
30210
|
-
|
|
30211
|
-
|
|
30212
|
-
|
|
30213
|
-
|
|
30214
|
-
|
|
30215
|
-
|
|
30216
|
-
|
|
30575
|
+
);
|
|
30576
|
+
};
|
|
30577
|
+
const StyledImg = styled.img`
|
|
30578
|
+
object-fit: contain;
|
|
30579
|
+
`;
|
|
30580
|
+
const popIn = keyframes`
|
|
30581
|
+
0% { transform: scale(0.4); opacity: 0; }
|
|
30582
|
+
60% { transform: scale(1.12); }
|
|
30583
|
+
100% { transform: scale(1); opacity: 1; }
|
|
30584
|
+
`;
|
|
30585
|
+
const TilesWrapper = styled.div`
|
|
30586
|
+
display: grid;
|
|
30587
|
+
grid-template-columns: repeat(2, 1fr);
|
|
30588
|
+
gap: 10px;
|
|
30589
|
+
width: 100%;
|
|
30590
|
+
|
|
30591
|
+
@media (min-width: 640px) {
|
|
30592
|
+
display: flex;
|
|
30593
|
+
flex-wrap: wrap;
|
|
30594
|
+
gap: 14px;
|
|
30595
|
+
justify-content: center;
|
|
30596
|
+
max-width: 620px;
|
|
30597
|
+
}
|
|
30598
|
+
`;
|
|
30599
|
+
const EventTile = styled.button`
|
|
30600
|
+
position: relative;
|
|
30601
|
+
background: ${({ $selected }) => $selected ? REDESIGN_COLORS.orangeLighter : REDESIGN_COLORS.white};
|
|
30602
|
+
border-radius: 12px;
|
|
30603
|
+
padding: 16px 12px;
|
|
30604
|
+
display: flex;
|
|
30605
|
+
flex-direction: column;
|
|
30606
|
+
align-items: center;
|
|
30607
|
+
gap: 10px;
|
|
30608
|
+
cursor: pointer;
|
|
30609
|
+
transition: all 0.15s;
|
|
30610
|
+
box-sizing: border-box;
|
|
30611
|
+
border: ${({ $selected }) => $selected ? `2px solid ${REDESIGN_COLORS.orange}` : `1px solid ${REDESIGN_COLORS.border}`};
|
|
30612
|
+
min-height: 144px;
|
|
30613
|
+
justify-content: center;
|
|
30614
|
+
|
|
30615
|
+
@media (min-width: 640px) {
|
|
30616
|
+
width: 144px;
|
|
30617
|
+
height: 144px;
|
|
30618
|
+
padding: 16px 12px;
|
|
30619
|
+
}
|
|
30620
|
+
|
|
30621
|
+
@media (max-width: 639px) {
|
|
30622
|
+
height: 118px;
|
|
30623
|
+
padding: 12px 8px;
|
|
30624
|
+
}
|
|
30625
|
+
|
|
30626
|
+
&:hover {
|
|
30627
|
+
border-color: ${REDESIGN_COLORS.orange};
|
|
30628
|
+
transform: translateY(-1px);
|
|
30629
|
+
}
|
|
30630
|
+
|
|
30631
|
+
&:focus {
|
|
30632
|
+
outline: none;
|
|
30633
|
+
box-shadow: 0 0 0 3px rgba(249, 85, 36, 0.2);
|
|
30634
|
+
}
|
|
30635
|
+
`;
|
|
30636
|
+
const SelectionBadge = styled.div`
|
|
30637
|
+
position: absolute;
|
|
30638
|
+
top: 9px;
|
|
30639
|
+
right: 9px;
|
|
30640
|
+
width: 22px;
|
|
30641
|
+
height: 22px;
|
|
30642
|
+
border-radius: 50%;
|
|
30643
|
+
background: ${REDESIGN_COLORS.success};
|
|
30644
|
+
display: flex;
|
|
30645
|
+
align-items: center;
|
|
30646
|
+
justify-content: center;
|
|
30647
|
+
animation: ${popIn} 0.3s both;
|
|
30648
|
+
`;
|
|
30649
|
+
const IconContainer = styled.div`
|
|
30650
|
+
display: flex;
|
|
30651
|
+
align-items: center;
|
|
30652
|
+
justify-content: center;
|
|
30653
|
+
height: 60px;
|
|
30654
|
+
color: ${REDESIGN_COLORS.orange};
|
|
30655
|
+
|
|
30656
|
+
@media (max-width: 639px) {
|
|
30657
|
+
height: 50px;
|
|
30658
|
+
}
|
|
30659
|
+
`;
|
|
30660
|
+
const TileLabel = styled.span`
|
|
30661
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
30662
|
+
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
30663
|
+
font-size: 14px;
|
|
30664
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
30665
|
+
text-align: center;
|
|
30666
|
+
line-height: 1.25;
|
|
30667
|
+
height: 34px;
|
|
30668
|
+
display: flex;
|
|
30669
|
+
align-items: center;
|
|
30670
|
+
justify-content: center;
|
|
30671
|
+
`;
|
|
30672
|
+
const SimpleDatePicker = ({
|
|
30673
|
+
value,
|
|
30674
|
+
onChange,
|
|
30675
|
+
isMultiDay = false,
|
|
30676
|
+
onMultiDayChange
|
|
30677
|
+
}) => {
|
|
30678
|
+
var _a2;
|
|
30679
|
+
const { i18n } = useTranslation();
|
|
30680
|
+
const router = useRouter();
|
|
30681
|
+
const isGerman = (_a2 = i18n.language) == null ? void 0 : _a2.startsWith("de");
|
|
30682
|
+
const minimumDate = add(/* @__PURE__ */ new Date(), { days: DEFAULT_LEAD_DAYS });
|
|
30683
|
+
const [month, setMonth] = useState(value || minimumDate);
|
|
30684
|
+
return /* @__PURE__ */ jsx(Container$3, { children: /* @__PURE__ */ jsxs(DateRow, { children: [
|
|
30685
|
+
/* @__PURE__ */ jsxs(CalendarCard, { children: [
|
|
30686
|
+
/* @__PURE__ */ jsx(
|
|
30687
|
+
DayPicker,
|
|
30688
|
+
{
|
|
30689
|
+
components: {
|
|
30690
|
+
Caption: CustomCaption
|
|
30691
|
+
},
|
|
30692
|
+
formatters: {
|
|
30693
|
+
formatWeekdayName: (day, options) => format(day, "EEEEE", { locale: options == null ? void 0 : options.locale })
|
|
30694
|
+
},
|
|
30695
|
+
month,
|
|
30696
|
+
onDayClick: (date2) => {
|
|
30697
|
+
onChange(date2);
|
|
30698
|
+
},
|
|
30699
|
+
selected: value,
|
|
30700
|
+
fromDate: minimumDate,
|
|
30701
|
+
onMonthChange: setMonth,
|
|
30702
|
+
captionLayout: "buttons",
|
|
30703
|
+
locale: router.locale ? localeToDateLocaleMapping[router.locale] : void 0,
|
|
30704
|
+
showOutsideDays: true,
|
|
30705
|
+
mode: "single"
|
|
30706
|
+
}
|
|
30707
|
+
),
|
|
30708
|
+
/* @__PURE__ */ jsx(LeadTimeNote, { children: isGerman ? `Vorlaufzeit mind. ${DEFAULT_LEAD_DAYS} Tage` : `Min. ${DEFAULT_LEAD_DAYS} days lead time` })
|
|
30709
|
+
] }),
|
|
30710
|
+
/* @__PURE__ */ jsx(SideOptions, { children: /* @__PURE__ */ jsxs(ToggleCard, { onClick: () => onMultiDayChange == null ? void 0 : onMultiDayChange(!isMultiDay), children: [
|
|
30711
|
+
/* @__PURE__ */ jsxs(ToggleRow, { children: [
|
|
30712
|
+
/* @__PURE__ */ jsx(ToggleSwitch, { $active: isMultiDay, children: /* @__PURE__ */ jsx(ToggleKnob, {}) }),
|
|
30713
|
+
/* @__PURE__ */ jsx(ToggleLabel, { children: isGerman ? "Mein Event geht über mehrere Tage" : "My event spans multiple days" })
|
|
30714
|
+
] }),
|
|
30715
|
+
/* @__PURE__ */ jsx(ToggleDescription, { children: isGerman ? "Sag uns einfach den Starttag – die restlichen Tage planen wir gemeinsam." : "Just tell us the start date – we'll plan the remaining days together." })
|
|
30716
|
+
] }) })
|
|
30717
|
+
] }) });
|
|
30718
|
+
};
|
|
30719
|
+
function CustomCaption(props) {
|
|
30720
|
+
const { goToMonth, nextMonth, previousMonth } = useNavigation();
|
|
30721
|
+
const daypicker = useDayPicker();
|
|
30722
|
+
const canGoPrevious = !!previousMonth;
|
|
30723
|
+
return /* @__PURE__ */ jsxs(CaptionContainer, { children: [
|
|
30724
|
+
/* @__PURE__ */ jsx(
|
|
30725
|
+
NavButton,
|
|
30726
|
+
{
|
|
30727
|
+
type: "button",
|
|
30728
|
+
disabled: !canGoPrevious,
|
|
30729
|
+
onClick: () => previousMonth && goToMonth(previousMonth),
|
|
30730
|
+
children: /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M15 18l-6-6 6-6" }) })
|
|
30731
|
+
}
|
|
30732
|
+
),
|
|
30733
|
+
/* @__PURE__ */ jsx(MonthLabel, { children: format(props.displayMonth, "MMMM yyyy", { locale: daypicker.locale }) }),
|
|
30734
|
+
/* @__PURE__ */ jsx(
|
|
30735
|
+
NavButton,
|
|
30736
|
+
{
|
|
30737
|
+
type: "button",
|
|
30738
|
+
disabled: !nextMonth,
|
|
30739
|
+
onClick: () => nextMonth && goToMonth(nextMonth),
|
|
30740
|
+
children: /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M9 18l6-6-6-6" }) })
|
|
30741
|
+
}
|
|
30742
|
+
)
|
|
30743
|
+
] });
|
|
30744
|
+
}
|
|
30745
|
+
const Container$3 = styled.div`
|
|
30746
|
+
display: flex;
|
|
30747
|
+
flex-direction: column;
|
|
30748
|
+
align-items: center;
|
|
30749
|
+
width: 100%;
|
|
30750
|
+
max-width: 720px;
|
|
30751
|
+
margin: 0 auto;
|
|
30752
|
+
`;
|
|
30753
|
+
const DateRow = styled.div`
|
|
30754
|
+
display: flex;
|
|
30755
|
+
flex-direction: column;
|
|
30756
|
+
gap: 14px;
|
|
30757
|
+
width: 100%;
|
|
30758
|
+
align-items: center;
|
|
30759
|
+
|
|
30760
|
+
@media (min-width: 768px) {
|
|
30761
|
+
flex-direction: row;
|
|
30762
|
+
align-items: flex-start;
|
|
30763
|
+
justify-content: center;
|
|
30764
|
+
gap: 24px;
|
|
30765
|
+
}
|
|
30766
|
+
`;
|
|
30767
|
+
const CalendarCard = styled.div`
|
|
30768
|
+
background: ${REDESIGN_COLORS.white};
|
|
30769
|
+
border-radius: 32px;
|
|
30770
|
+
padding: 20px 24px;
|
|
30771
|
+
box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.06);
|
|
30772
|
+
|
|
30773
|
+
.rdp {
|
|
30774
|
+
--rdp-accent-color: ${REDESIGN_COLORS.orange};
|
|
30775
|
+
--rdp-background-color: ${REDESIGN_COLORS.orangeLighter};
|
|
30776
|
+
--rdp-cell-size: 38px;
|
|
30777
|
+
margin: 0;
|
|
30778
|
+
}
|
|
30779
|
+
|
|
30780
|
+
.rdp-month {
|
|
30781
|
+
margin: 0;
|
|
30782
|
+
}
|
|
30783
|
+
|
|
30784
|
+
.rdp-table {
|
|
30785
|
+
width: 100%;
|
|
30786
|
+
table-layout: fixed;
|
|
30787
|
+
border-collapse: collapse;
|
|
30788
|
+
}
|
|
30789
|
+
|
|
30790
|
+
.rdp-head_cell {
|
|
30791
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
30792
|
+
font-size: 12px;
|
|
30793
|
+
font-weight: ${REDESIGN_FONTS.weight.medium};
|
|
30794
|
+
color: ${REDESIGN_COLORS.muted};
|
|
30795
|
+
}
|
|
30796
|
+
|
|
30797
|
+
.rdp-button {
|
|
30798
|
+
border-radius: 50%;
|
|
30799
|
+
transition: all 0.15s ease;
|
|
30800
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
30801
|
+
font-weight: ${REDESIGN_FONTS.weight.regular};
|
|
30802
|
+
font-size: 14px;
|
|
30803
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
30804
|
+
}
|
|
30805
|
+
|
|
30806
|
+
.rdp-button:hover:not([disabled]):not(.rdp-day_selected) {
|
|
30807
|
+
background-color: rgba(249, 85, 36, 0.08);
|
|
30808
|
+
}
|
|
30809
|
+
|
|
30810
|
+
.rdp-day_selected,
|
|
30811
|
+
.rdp-day_selected:hover {
|
|
30812
|
+
background: ${REDESIGN_COLORS.orange};
|
|
30813
|
+
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
30814
|
+
color: white;
|
|
30815
|
+
}
|
|
30816
|
+
|
|
30817
|
+
.rdp-day_outside {
|
|
30818
|
+
color: #d8d8d8;
|
|
30819
|
+
}
|
|
30820
|
+
|
|
30821
|
+
.rdp-day_disabled {
|
|
30822
|
+
color: #c8c8c8;
|
|
30823
|
+
}
|
|
30824
|
+
`;
|
|
30825
|
+
const SideOptions = styled.div`
|
|
30826
|
+
display: flex;
|
|
30827
|
+
flex-direction: column;
|
|
30828
|
+
gap: 12px;
|
|
30829
|
+
flex: 1;
|
|
30830
|
+
max-width: 300px;
|
|
30831
|
+
`;
|
|
30832
|
+
const ToggleCard = styled.div`
|
|
30833
|
+
background: ${REDESIGN_COLORS.white200};
|
|
30834
|
+
border-radius: 12px;
|
|
30835
|
+
padding: 18px 20px;
|
|
30836
|
+
cursor: pointer;
|
|
30837
|
+
`;
|
|
30838
|
+
const ToggleRow = styled.div`
|
|
30839
|
+
display: flex;
|
|
30840
|
+
align-items: center;
|
|
30841
|
+
gap: 12px;
|
|
30842
|
+
margin-bottom: 8px;
|
|
30843
|
+
`;
|
|
30844
|
+
const ToggleSwitch = styled.div`
|
|
30845
|
+
width: 42px;
|
|
30846
|
+
height: 24px;
|
|
30847
|
+
border-radius: 100px;
|
|
30848
|
+
padding: 2px;
|
|
30849
|
+
flex: none;
|
|
30850
|
+
transition: all 0.2s;
|
|
30851
|
+
background: ${({ $active }) => $active ? REDESIGN_COLORS.orange : "#d4d4d4"};
|
|
30852
|
+
display: flex;
|
|
30853
|
+
justify-content: ${({ $active }) => $active ? "flex-end" : "flex-start"};
|
|
30854
|
+
`;
|
|
30855
|
+
const ToggleKnob = styled.div`
|
|
30856
|
+
width: 20px;
|
|
30857
|
+
height: 20px;
|
|
30858
|
+
border-radius: 50%;
|
|
30859
|
+
background: ${REDESIGN_COLORS.white};
|
|
30860
|
+
`;
|
|
30861
|
+
const ToggleLabel = styled.span`
|
|
30862
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
30863
|
+
font-size: 14.5px;
|
|
30864
|
+
font-weight: ${REDESIGN_FONTS.weight.medium};
|
|
30865
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
30866
|
+
`;
|
|
30867
|
+
const ToggleDescription = styled.p`
|
|
30868
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
30869
|
+
font-size: 12px;
|
|
30870
|
+
color: ${REDESIGN_COLORS.muted};
|
|
30871
|
+
margin: 0;
|
|
30872
|
+
line-height: 1.45;
|
|
30873
|
+
`;
|
|
30874
|
+
const CaptionContainer = styled.div`
|
|
30875
|
+
display: flex;
|
|
30876
|
+
justify-content: space-between;
|
|
30877
|
+
align-items: center;
|
|
30878
|
+
margin-bottom: 16px;
|
|
30879
|
+
`;
|
|
30880
|
+
const NavButton = styled.button`
|
|
30881
|
+
background: transparent;
|
|
30882
|
+
border: none;
|
|
30883
|
+
cursor: pointer;
|
|
30884
|
+
display: flex;
|
|
30885
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
30886
|
+
|
|
30887
|
+
&:disabled {
|
|
30888
|
+
color: #d8d8d8;
|
|
30889
|
+
cursor: default;
|
|
30890
|
+
}
|
|
30891
|
+
`;
|
|
30892
|
+
const MonthLabel = styled.b`
|
|
30893
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
30894
|
+
font-size: 16px;
|
|
30895
|
+
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
30896
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
30897
|
+
`;
|
|
30898
|
+
const LeadTimeNote = styled.p`
|
|
30899
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
30900
|
+
font-size: 12px;
|
|
30901
|
+
color: ${REDESIGN_COLORS.muted};
|
|
30902
|
+
margin: 12px 0 0;
|
|
30903
|
+
text-align: center;
|
|
30904
|
+
`;
|
|
30905
|
+
const PRESETS = [10, 25, 50, 100];
|
|
30906
|
+
const BudgetPeopleStep = ({
|
|
30907
|
+
peopleCount,
|
|
30908
|
+
budgetPerPerson: budgetPerPerson2,
|
|
30909
|
+
onPeopleCountChange,
|
|
30910
|
+
onBudgetPerPersonChange
|
|
30911
|
+
}) => {
|
|
30912
|
+
var _a2;
|
|
30913
|
+
const { i18n } = useTranslation();
|
|
30914
|
+
const isGerman = (_a2 = i18n.language) == null ? void 0 : _a2.startsWith("de");
|
|
30915
|
+
const totalBudget = peopleCount * budgetPerPerson2;
|
|
30916
|
+
const formattedTotal = totalBudget.toLocaleString("de-DE");
|
|
30917
|
+
const handlePeopleIncrement = useCallback(() => {
|
|
30918
|
+
onPeopleCountChange(peopleCount + 5);
|
|
30919
|
+
}, [peopleCount, onPeopleCountChange]);
|
|
30920
|
+
const handlePeopleDecrement = useCallback(() => {
|
|
30921
|
+
onPeopleCountChange(Math.max(1, peopleCount - 5));
|
|
30922
|
+
}, [peopleCount, onPeopleCountChange]);
|
|
30923
|
+
const handleBudgetIncrement = useCallback(() => {
|
|
30924
|
+
onBudgetPerPersonChange(budgetPerPerson2 + 5);
|
|
30925
|
+
}, [budgetPerPerson2, onBudgetPerPersonChange]);
|
|
30926
|
+
const handleBudgetDecrement = useCallback(() => {
|
|
30927
|
+
onBudgetPerPersonChange(Math.max(5, budgetPerPerson2 - 5));
|
|
30928
|
+
}, [budgetPerPerson2, onBudgetPerPersonChange]);
|
|
30929
|
+
return /* @__PURE__ */ jsx(Container$2, { children: /* @__PURE__ */ jsxs(Card, { children: [
|
|
30930
|
+
/* @__PURE__ */ jsxs(Row, { children: [
|
|
30931
|
+
/* @__PURE__ */ jsx(Label, { children: isGerman ? "Personenanzahl" : "Number of people" }),
|
|
30932
|
+
/* @__PURE__ */ jsxs(InputGroup, { children: [
|
|
30933
|
+
/* @__PURE__ */ jsx(StepButton, { onClick: handlePeopleDecrement, children: "−" }),
|
|
30934
|
+
/* @__PURE__ */ jsx(ValueDisplay, { children: peopleCount }),
|
|
30935
|
+
/* @__PURE__ */ jsx(StepButton, { onClick: handlePeopleIncrement, children: "+" })
|
|
30936
|
+
] })
|
|
30937
|
+
] }),
|
|
30938
|
+
/* @__PURE__ */ jsx(PresetRow, { children: PRESETS.map((preset) => /* @__PURE__ */ jsx(
|
|
30939
|
+
PresetButton,
|
|
30940
|
+
{
|
|
30941
|
+
$selected: peopleCount === preset,
|
|
30942
|
+
onClick: () => onPeopleCountChange(preset),
|
|
30943
|
+
children: preset
|
|
30944
|
+
},
|
|
30945
|
+
preset
|
|
30946
|
+
)) }),
|
|
30947
|
+
/* @__PURE__ */ jsx(Divider, {}),
|
|
30948
|
+
/* @__PURE__ */ jsxs(Row, { children: [
|
|
30949
|
+
/* @__PURE__ */ jsxs(Label, { children: [
|
|
30950
|
+
"Budget ",
|
|
30951
|
+
isGerman ? "pro Person" : "per person"
|
|
30952
|
+
] }),
|
|
30953
|
+
/* @__PURE__ */ jsxs(InputGroup, { children: [
|
|
30954
|
+
/* @__PURE__ */ jsx(StepButton, { onClick: handleBudgetDecrement, children: "−" }),
|
|
30955
|
+
/* @__PURE__ */ jsxs(ValueDisplay, { children: [
|
|
30956
|
+
budgetPerPerson2,
|
|
30957
|
+
" €"
|
|
30958
|
+
] }),
|
|
30959
|
+
/* @__PURE__ */ jsx(StepButton, { onClick: handleBudgetIncrement, children: "+" })
|
|
30960
|
+
] })
|
|
30961
|
+
] }),
|
|
30962
|
+
/* @__PURE__ */ jsxs(TotalRow, { children: [
|
|
30963
|
+
/* @__PURE__ */ jsxs(TotalLabel, { children: [
|
|
30964
|
+
isGerman ? "Gesamtbudget" : "Total budget",
|
|
30965
|
+
" ",
|
|
30966
|
+
/* @__PURE__ */ jsx(NetLabel, { children: "netto" })
|
|
30967
|
+
] }),
|
|
30968
|
+
/* @__PURE__ */ jsxs(TotalValue, { children: [
|
|
30969
|
+
formattedTotal,
|
|
30970
|
+
" €"
|
|
30971
|
+
] })
|
|
30972
|
+
] })
|
|
30973
|
+
] }) });
|
|
30974
|
+
};
|
|
30975
|
+
const Container$2 = styled.div`
|
|
30976
|
+
width: 100%;
|
|
30977
|
+
max-width: 560px;
|
|
30978
|
+
margin: 0 auto;
|
|
30979
|
+
display: flex;
|
|
30980
|
+
flex-direction: column;
|
|
30981
|
+
align-items: center;
|
|
30982
|
+
`;
|
|
30983
|
+
const Card = styled.div`
|
|
30984
|
+
width: 100%;
|
|
30985
|
+
background: ${REDESIGN_COLORS.white200};
|
|
30986
|
+
border-radius: 20px;
|
|
30987
|
+
padding: 28px 32px;
|
|
30988
|
+
`;
|
|
30989
|
+
const Row = styled.div`
|
|
30990
|
+
display: flex;
|
|
30991
|
+
justify-content: space-between;
|
|
30992
|
+
align-items: center;
|
|
30993
|
+
margin-bottom: 16px;
|
|
30994
|
+
`;
|
|
30995
|
+
const Label = styled.span`
|
|
30996
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
30997
|
+
font-size: 15px;
|
|
30998
|
+
font-weight: ${REDESIGN_FONTS.weight.medium};
|
|
30999
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
31000
|
+
`;
|
|
31001
|
+
const InputGroup = styled.div`
|
|
31002
|
+
display: flex;
|
|
31003
|
+
align-items: center;
|
|
31004
|
+
gap: 10px;
|
|
31005
|
+
`;
|
|
31006
|
+
const StepButton = styled.button`
|
|
31007
|
+
width: 40px;
|
|
31008
|
+
height: 40px;
|
|
31009
|
+
border-radius: 12px;
|
|
31010
|
+
border: 1px solid ${REDESIGN_COLORS.inputBorder};
|
|
31011
|
+
background: ${REDESIGN_COLORS.white};
|
|
31012
|
+
font-size: 20px;
|
|
31013
|
+
color: ${REDESIGN_COLORS.secondaryText};
|
|
31014
|
+
cursor: pointer;
|
|
31015
|
+
display: flex;
|
|
31016
|
+
align-items: center;
|
|
31017
|
+
justify-content: center;
|
|
31018
|
+
transition: all 0.15s;
|
|
31019
|
+
|
|
31020
|
+
&:hover {
|
|
31021
|
+
border-color: ${REDESIGN_COLORS.orange};
|
|
31022
|
+
color: ${REDESIGN_COLORS.orange};
|
|
31023
|
+
}
|
|
31024
|
+
|
|
31025
|
+
&:active {
|
|
31026
|
+
transform: scale(0.95);
|
|
31027
|
+
}
|
|
31028
|
+
`;
|
|
31029
|
+
const ValueDisplay = styled.div`
|
|
31030
|
+
width: 96px;
|
|
31031
|
+
height: 40px;
|
|
31032
|
+
border-radius: 12px;
|
|
31033
|
+
background: ${REDESIGN_COLORS.white};
|
|
31034
|
+
border: 1px solid ${REDESIGN_COLORS.inputBorder};
|
|
31035
|
+
display: flex;
|
|
31036
|
+
align-items: center;
|
|
31037
|
+
justify-content: center;
|
|
31038
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
31039
|
+
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
31040
|
+
font-size: 16px;
|
|
31041
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
31042
|
+
`;
|
|
31043
|
+
const PresetRow = styled.div`
|
|
31044
|
+
display: flex;
|
|
31045
|
+
gap: 8px;
|
|
31046
|
+
margin-bottom: 20px;
|
|
31047
|
+
`;
|
|
31048
|
+
const PresetButton = styled.button`
|
|
31049
|
+
width: 44px;
|
|
31050
|
+
height: 44px;
|
|
31051
|
+
border-radius: 50%;
|
|
31052
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
31053
|
+
font-size: 13px;
|
|
31054
|
+
cursor: pointer;
|
|
31055
|
+
display: flex;
|
|
31056
|
+
align-items: center;
|
|
31057
|
+
justify-content: center;
|
|
31058
|
+
text-align: center;
|
|
31059
|
+
line-height: 1;
|
|
31060
|
+
flex: none;
|
|
31061
|
+
box-sizing: border-box;
|
|
31062
|
+
transition: all 0.15s;
|
|
31063
|
+
background: ${({ $selected }) => $selected ? REDESIGN_COLORS.orange : REDESIGN_COLORS.white};
|
|
31064
|
+
color: ${({ $selected }) => $selected ? "#fff" : REDESIGN_COLORS.secondaryText};
|
|
31065
|
+
border: 1px solid ${({ $selected }) => $selected ? REDESIGN_COLORS.orange : REDESIGN_COLORS.inputBorder};
|
|
31066
|
+
font-weight: ${({ $selected }) => $selected ? REDESIGN_FONTS.weight.semibold : REDESIGN_FONTS.weight.regular};
|
|
31067
|
+
|
|
31068
|
+
&:hover {
|
|
31069
|
+
border-color: ${REDESIGN_COLORS.orange};
|
|
31070
|
+
}
|
|
31071
|
+
`;
|
|
31072
|
+
const Divider = styled.div`
|
|
31073
|
+
height: 1px;
|
|
31074
|
+
background: ${REDESIGN_COLORS.inputBorder};
|
|
31075
|
+
margin: 4px 0 20px;
|
|
31076
|
+
`;
|
|
31077
|
+
const TotalRow = styled.div`
|
|
31078
|
+
display: flex;
|
|
31079
|
+
justify-content: space-between;
|
|
31080
|
+
align-items: center;
|
|
31081
|
+
margin-top: 8px;
|
|
31082
|
+
`;
|
|
31083
|
+
const TotalLabel = styled.span`
|
|
31084
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
31085
|
+
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
31086
|
+
font-size: 16px;
|
|
31087
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
31088
|
+
white-space: nowrap;
|
|
31089
|
+
`;
|
|
31090
|
+
const NetLabel = styled.span`
|
|
31091
|
+
font-weight: ${REDESIGN_FONTS.weight.regular};
|
|
31092
|
+
font-size: 12.5px;
|
|
31093
|
+
color: ${REDESIGN_COLORS.muted};
|
|
31094
|
+
`;
|
|
31095
|
+
const TotalValue = styled.b`
|
|
31096
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
31097
|
+
font-size: 22px;
|
|
31098
|
+
color: ${REDESIGN_COLORS.orange};
|
|
31099
|
+
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
31100
|
+
white-space: nowrap;
|
|
31101
|
+
`;
|
|
31102
|
+
const REDESIGN_STEP_IDS = {
|
|
31103
|
+
city: "redesign_city",
|
|
31104
|
+
eventType: "redesign_event_type",
|
|
31105
|
+
date: "redesign_date",
|
|
31106
|
+
peopleCount: "redesign_people_count",
|
|
31107
|
+
contact: "redesign_contact"
|
|
31108
|
+
};
|
|
31109
|
+
const REDESIGN_STEP_ORDER = [
|
|
31110
|
+
REDESIGN_STEP_IDS.city,
|
|
31111
|
+
REDESIGN_STEP_IDS.eventType,
|
|
31112
|
+
REDESIGN_STEP_IDS.date,
|
|
31113
|
+
REDESIGN_STEP_IDS.peopleCount
|
|
31114
|
+
];
|
|
31115
|
+
const REDESIGN_STEPS = {
|
|
31116
|
+
[REDESIGN_STEP_IDS.city]: {
|
|
31117
|
+
id: REDESIGN_STEP_IDS.city,
|
|
31118
|
+
titleDe: "Wo findet dein Event statt?",
|
|
31119
|
+
titleEn: "Where is your event?",
|
|
31120
|
+
subtitleDe: "Wähle deinen Standort – dort finden wir die passenden Caterer.",
|
|
31121
|
+
subtitleEn: "Choose your location – we'll find the right caterers there.",
|
|
31122
|
+
breadcrumbDe: "Stadt",
|
|
31123
|
+
breadcrumbEn: "City"
|
|
31124
|
+
},
|
|
31125
|
+
[REDESIGN_STEP_IDS.eventType]: {
|
|
31126
|
+
id: REDESIGN_STEP_IDS.eventType,
|
|
31127
|
+
titleDe: "Wofür brauchst du Catering?",
|
|
31128
|
+
titleEn: "What do you need catering for?",
|
|
31129
|
+
breadcrumbDe: "Anlass",
|
|
31130
|
+
breadcrumbEn: "Event Type"
|
|
31131
|
+
},
|
|
31132
|
+
[REDESIGN_STEP_IDS.date]: {
|
|
31133
|
+
id: REDESIGN_STEP_IDS.date,
|
|
31134
|
+
titleDe: "Wann findet dein Event statt?",
|
|
31135
|
+
titleEn: "When is your event?",
|
|
31136
|
+
subtitleDe: "Falls sich der Tag doch noch ändert, ist das kein Problem.",
|
|
31137
|
+
subtitleEn: "If the date changes, that's no problem.",
|
|
31138
|
+
breadcrumbDe: "Datum",
|
|
31139
|
+
breadcrumbEn: "Date"
|
|
31140
|
+
},
|
|
31141
|
+
[REDESIGN_STEP_IDS.peopleCount]: {
|
|
31142
|
+
id: REDESIGN_STEP_IDS.peopleCount,
|
|
31143
|
+
titleDe: "Für wie viele Personen planst du?",
|
|
31144
|
+
titleEn: "How many people are you planning for?",
|
|
31145
|
+
subtitleDe: "Nur eine grobe Angabe – du legst dich noch nicht fest.",
|
|
31146
|
+
subtitleEn: "Just a rough estimate – you're not committing yet.",
|
|
31147
|
+
breadcrumbDe: "Personen",
|
|
31148
|
+
breadcrumbEn: "People"
|
|
31149
|
+
},
|
|
31150
|
+
[REDESIGN_STEP_IDS.contact]: {
|
|
31151
|
+
id: REDESIGN_STEP_IDS.contact,
|
|
31152
|
+
titleDe: "Fast geschafft! Wie können wir dich erreichen?",
|
|
31153
|
+
titleEn: "Almost done! How can we reach you?",
|
|
31154
|
+
breadcrumbDe: "Kontakt",
|
|
31155
|
+
breadcrumbEn: "Contact"
|
|
31156
|
+
}
|
|
31157
|
+
};
|
|
31158
|
+
function getRedesignTotalSteps() {
|
|
31159
|
+
return REDESIGN_STEP_ORDER.length + 1;
|
|
31160
|
+
}
|
|
31161
|
+
const RAIL_DISPLAY_STEPS = [
|
|
31162
|
+
...REDESIGN_STEP_ORDER,
|
|
31163
|
+
REDESIGN_STEP_IDS.contact
|
|
31164
|
+
];
|
|
31165
|
+
const StepRail = ({ currentStepId, onStepClick }) => {
|
|
31166
|
+
var _a2;
|
|
31167
|
+
const { i18n } = useTranslation();
|
|
31168
|
+
const isGerman = (_a2 = i18n.language) == null ? void 0 : _a2.startsWith("de");
|
|
31169
|
+
const currentIndex = RAIL_DISPLAY_STEPS.indexOf(currentStepId);
|
|
31170
|
+
const handleStepClick = (stepId, index) => {
|
|
31171
|
+
if (index < currentIndex && onStepClick && stepId !== REDESIGN_STEP_IDS.contact) {
|
|
31172
|
+
onStepClick(stepId);
|
|
31173
|
+
}
|
|
31174
|
+
};
|
|
31175
|
+
return /* @__PURE__ */ jsxs(RailContainer, { children: [
|
|
31176
|
+
/* @__PURE__ */ jsxs(TopSection, { children: [
|
|
31177
|
+
/* @__PURE__ */ jsx(LogoWrapper$1, { children: /* @__PURE__ */ jsx(Logo, { height: 26 }) }),
|
|
31178
|
+
/* @__PURE__ */ jsx(SectionLabel, { children: isGerman ? "Catering anfragen" : "Request catering" }),
|
|
31179
|
+
/* @__PURE__ */ jsx(Title$1, { children: isGerman ? "In wenigen Schritten zum passenden Catering." : "Get the perfect catering in just a few steps." }),
|
|
31180
|
+
/* @__PURE__ */ jsxs(StepList, { children: [
|
|
31181
|
+
RAIL_DISPLAY_STEPS.map((stepId, index) => {
|
|
31182
|
+
const step2 = REDESIGN_STEPS[stepId];
|
|
31183
|
+
const isActive = index === currentIndex;
|
|
31184
|
+
const isCompleted = index < currentIndex;
|
|
31185
|
+
const breadcrumb = isGerman ? step2.breadcrumbDe : step2.breadcrumbEn;
|
|
31186
|
+
const isClickable = index < currentIndex;
|
|
31187
|
+
return /* @__PURE__ */ jsxs(StepItemWrapper, { children: [
|
|
31188
|
+
index > 0 && /* @__PURE__ */ jsx(Connector, { $completed: index <= currentIndex }),
|
|
31189
|
+
/* @__PURE__ */ jsxs(
|
|
31190
|
+
StepRow,
|
|
31191
|
+
{
|
|
31192
|
+
$clickable: isClickable,
|
|
31193
|
+
onClick: () => handleStepClick(stepId, index),
|
|
31194
|
+
children: [
|
|
31195
|
+
/* @__PURE__ */ jsx(StepCircle, { $isActive: isActive, $isCompleted: isCompleted, children: isCompleted ? /* @__PURE__ */ jsx(CheckIcon$2, {}) : index + 1 }),
|
|
31196
|
+
/* @__PURE__ */ jsx(StepLabel, { $isActive: isActive, $isCompleted: isCompleted, children: breadcrumb })
|
|
31197
|
+
]
|
|
31198
|
+
}
|
|
31199
|
+
)
|
|
31200
|
+
] }, stepId);
|
|
31201
|
+
}),
|
|
31202
|
+
/* @__PURE__ */ jsx(FinalConnector, {}),
|
|
31203
|
+
/* @__PURE__ */ jsxs(OffersRow, { children: [
|
|
31204
|
+
/* @__PURE__ */ jsx(OffersCircle, { children: /* @__PURE__ */ jsx(CheckIconMuted, {}) }),
|
|
31205
|
+
/* @__PURE__ */ jsxs(OffersText, { children: [
|
|
31206
|
+
/* @__PURE__ */ jsxs(OffersTitle, { children: [
|
|
31207
|
+
"3 ",
|
|
31208
|
+
isGerman ? "passende Angebote" : "matching offers"
|
|
31209
|
+
] }),
|
|
31210
|
+
/* @__PURE__ */ jsx(OffersSubtitle, { children: isGerman ? "nach wenigen Stunden" : "within hours" })
|
|
31211
|
+
] })
|
|
31212
|
+
] })
|
|
31213
|
+
] })
|
|
31214
|
+
] }),
|
|
31215
|
+
/* @__PURE__ */ jsx(BottomSection, { children: /* @__PURE__ */ jsxs(RatingRow, { children: [
|
|
31216
|
+
/* @__PURE__ */ jsx(Stars, { children: "★★★★★" }),
|
|
31217
|
+
/* @__PURE__ */ jsxs(RatingText, { children: [
|
|
31218
|
+
/* @__PURE__ */ jsx(RatingNumber, { children: "4.9" }),
|
|
31219
|
+
" · 3800+ ",
|
|
31220
|
+
isGerman ? "Bewertungen" : "Reviews"
|
|
31221
|
+
] })
|
|
31222
|
+
] }) })
|
|
31223
|
+
] });
|
|
31224
|
+
};
|
|
31225
|
+
const CheckIcon$2 = () => /* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "#fff", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M20 6L9 17l-5-5" }) });
|
|
31226
|
+
const CheckIconMuted = () => /* @__PURE__ */ jsx("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M20 6L9 17l-5-5" }) });
|
|
31227
|
+
const RailContainer = styled.div`
|
|
31228
|
+
display: none;
|
|
31229
|
+
|
|
31230
|
+
@media (min-width: 960px) {
|
|
31231
|
+
display: flex;
|
|
31232
|
+
flex-direction: column;
|
|
31233
|
+
justify-content: space-between;
|
|
31234
|
+
width: ${REDESIGN_SPACING.railWidth};
|
|
31235
|
+
flex: none;
|
|
31236
|
+
background: ${REDESIGN_COLORS.beige};
|
|
31237
|
+
padding: ${REDESIGN_SPACING.railPadding} ${REDESIGN_SPACING.railPadding} 34px;
|
|
31238
|
+
min-height: 100vh;
|
|
31239
|
+
}
|
|
31240
|
+
`;
|
|
31241
|
+
const TopSection = styled.div``;
|
|
31242
|
+
const LogoWrapper$1 = styled.div`
|
|
31243
|
+
margin-bottom: 44px;
|
|
31244
|
+
`;
|
|
31245
|
+
const SectionLabel = styled.div`
|
|
31246
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
31247
|
+
font-size: 12px;
|
|
31248
|
+
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
31249
|
+
letter-spacing: 0.04em;
|
|
31250
|
+
text-transform: uppercase;
|
|
31251
|
+
color: ${REDESIGN_COLORS.orange};
|
|
31252
|
+
margin-bottom: 8px;
|
|
31253
|
+
`;
|
|
31254
|
+
const Title$1 = styled.h2`
|
|
31255
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
31256
|
+
font-size: 27px;
|
|
31257
|
+
line-height: 1.2;
|
|
31258
|
+
font-weight: ${REDESIGN_FONTS.weight.medium};
|
|
31259
|
+
letter-spacing: ${REDESIGN_FONTS.letterSpacing.tight};
|
|
31260
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
31261
|
+
margin: 0 0 32px;
|
|
31262
|
+
max-width: 290px;
|
|
31263
|
+
`;
|
|
31264
|
+
const StepList = styled.div``;
|
|
31265
|
+
const StepItemWrapper = styled.div``;
|
|
31266
|
+
const Connector = styled.div`
|
|
31267
|
+
width: 2px;
|
|
31268
|
+
height: ${REDESIGN_SPACING.connectorHeight};
|
|
31269
|
+
margin: 3px 0 3px 14px;
|
|
31270
|
+
background: ${({ $completed }) => $completed ? REDESIGN_COLORS.mainText : REDESIGN_COLORS.railConnector};
|
|
31271
|
+
`;
|
|
31272
|
+
const FinalConnector = styled.div`
|
|
31273
|
+
width: 2px;
|
|
31274
|
+
height: ${REDESIGN_SPACING.connectorHeight};
|
|
31275
|
+
margin: 3px 0 3px 14px;
|
|
31276
|
+
background: ${REDESIGN_COLORS.railConnector};
|
|
31277
|
+
`;
|
|
31278
|
+
const StepRow = styled.div`
|
|
31279
|
+
display: flex;
|
|
31280
|
+
align-items: center;
|
|
31281
|
+
gap: 13px;
|
|
31282
|
+
border-radius: 100px;
|
|
31283
|
+
margin: -4px -8px;
|
|
31284
|
+
padding: 4px 8px;
|
|
31285
|
+
transition: background 0.15s;
|
|
31286
|
+
cursor: ${({ $clickable }) => $clickable ? "pointer" : "default"};
|
|
31287
|
+
|
|
31288
|
+
&:hover {
|
|
31289
|
+
background: ${({ $clickable }) => $clickable ? "rgba(0, 0, 0, 0.03)" : "transparent"};
|
|
31290
|
+
}
|
|
31291
|
+
`;
|
|
31292
|
+
const StepCircle = styled.div`
|
|
31293
|
+
width: ${REDESIGN_SPACING.stepCircleSize};
|
|
31294
|
+
height: ${REDESIGN_SPACING.stepCircleSize};
|
|
31295
|
+
border-radius: 50%;
|
|
31296
|
+
display: flex;
|
|
31297
|
+
align-items: center;
|
|
31298
|
+
justify-content: center;
|
|
31299
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
31300
|
+
font-size: 13px;
|
|
31301
|
+
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
31302
|
+
flex: none;
|
|
31303
|
+
background: ${({ $isActive, $isCompleted }) => {
|
|
31304
|
+
if ($isCompleted) return REDESIGN_COLORS.mainText;
|
|
31305
|
+
if ($isActive) return REDESIGN_COLORS.orange;
|
|
31306
|
+
return REDESIGN_COLORS.railInactive;
|
|
31307
|
+
}};
|
|
31308
|
+
color: ${({ $isActive, $isCompleted }) => {
|
|
31309
|
+
if ($isCompleted || $isActive) return "#fff";
|
|
31310
|
+
return REDESIGN_COLORS.railMuted;
|
|
31311
|
+
}};
|
|
31312
|
+
`;
|
|
31313
|
+
const StepLabel = styled.span`
|
|
31314
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
31315
|
+
font-size: 14px;
|
|
31316
|
+
font-weight: ${({ $isActive }) => $isActive ? REDESIGN_FONTS.weight.semibold : REDESIGN_FONTS.weight.regular};
|
|
31317
|
+
color: ${({ $isActive, $isCompleted }) => {
|
|
31318
|
+
if ($isActive) return REDESIGN_COLORS.mainText;
|
|
31319
|
+
if ($isCompleted) return REDESIGN_COLORS.secondaryText;
|
|
31320
|
+
return REDESIGN_COLORS.railMuted;
|
|
31321
|
+
}};
|
|
31322
|
+
`;
|
|
31323
|
+
const OffersRow = styled.div`
|
|
31324
|
+
display: flex;
|
|
31325
|
+
align-items: center;
|
|
31326
|
+
gap: 13px;
|
|
31327
|
+
`;
|
|
31328
|
+
const OffersCircle = styled.div`
|
|
31329
|
+
width: ${REDESIGN_SPACING.stepCircleSize};
|
|
31330
|
+
height: ${REDESIGN_SPACING.stepCircleSize};
|
|
31331
|
+
border-radius: 50%;
|
|
31332
|
+
flex: none;
|
|
31333
|
+
display: flex;
|
|
31334
|
+
align-items: center;
|
|
31335
|
+
justify-content: center;
|
|
31336
|
+
background: ${REDESIGN_COLORS.railInactive};
|
|
31337
|
+
color: ${REDESIGN_COLORS.muted};
|
|
31338
|
+
`;
|
|
31339
|
+
const OffersText = styled.div``;
|
|
31340
|
+
const OffersTitle = styled.div`
|
|
31341
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
31342
|
+
font-size: 14px;
|
|
31343
|
+
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
31344
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
31345
|
+
line-height: 1.25;
|
|
31346
|
+
`;
|
|
31347
|
+
const OffersSubtitle = styled.div`
|
|
31348
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
31349
|
+
font-size: 12px;
|
|
31350
|
+
color: ${REDESIGN_COLORS.muted};
|
|
31351
|
+
line-height: 1.3;
|
|
31352
|
+
`;
|
|
31353
|
+
const BottomSection = styled.div``;
|
|
31354
|
+
const RatingRow = styled.div`
|
|
31355
|
+
display: flex;
|
|
31356
|
+
align-items: center;
|
|
31357
|
+
gap: 10px;
|
|
31358
|
+
margin-bottom: 16px;
|
|
31359
|
+
`;
|
|
31360
|
+
const Stars = styled.span`
|
|
31361
|
+
color: ${REDESIGN_COLORS.starColor};
|
|
31362
|
+
font-size: 15px;
|
|
31363
|
+
letter-spacing: 1px;
|
|
31364
|
+
`;
|
|
31365
|
+
const RatingText = styled.span`
|
|
31366
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
31367
|
+
font-size: 13px;
|
|
31368
|
+
color: ${REDESIGN_COLORS.secondaryText};
|
|
31369
|
+
`;
|
|
31370
|
+
const RatingNumber = styled.b`
|
|
31371
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
31372
|
+
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
31373
|
+
`;
|
|
31374
|
+
const LoadingScreen = ({ onComplete }) => {
|
|
31375
|
+
var _a2;
|
|
31376
|
+
const { i18n } = useTranslation();
|
|
31377
|
+
const isGerman = (_a2 = i18n.language) == null ? void 0 : _a2.startsWith("de");
|
|
31378
|
+
const [stage, setStage] = useState(0);
|
|
31379
|
+
const loadingSteps = isGerman ? LOADING_STEPS_DE : LOADING_STEPS_EN;
|
|
31380
|
+
useEffect(() => {
|
|
31381
|
+
const timers = [1, 2, 3, 4].map(
|
|
31382
|
+
(n, i2) => setTimeout(() => setStage(n), (i2 + 1) * 1250)
|
|
31383
|
+
);
|
|
31384
|
+
const completeTimer = setTimeout(onComplete, 6400);
|
|
31385
|
+
return () => {
|
|
31386
|
+
timers.forEach(clearTimeout);
|
|
31387
|
+
clearTimeout(completeTimer);
|
|
31388
|
+
};
|
|
31389
|
+
}, [onComplete]);
|
|
31390
|
+
return /* @__PURE__ */ jsxs(Container$1, { children: [
|
|
31391
|
+
/* @__PURE__ */ jsx(LogoWrapper, { children: /* @__PURE__ */ jsx(Logo, { height: 26 }) }),
|
|
31392
|
+
/* @__PURE__ */ jsx(Spinner, {}),
|
|
31393
|
+
/* @__PURE__ */ jsx(Title, { children: isGerman ? "Die Anfrage wird verarbeitet" : "Processing your request" }),
|
|
31394
|
+
/* @__PURE__ */ jsx(Subtitle, { children: isGerman ? "Einen Moment – das dauert nur ein paar Sekunden." : "Just a moment – this only takes a few seconds." }),
|
|
31395
|
+
/* @__PURE__ */ jsx(ProgressBarContainer, { children: /* @__PURE__ */ jsx(ProgressBar, { $progress: Math.min(100, stage * 33.4) }) }),
|
|
31396
|
+
/* @__PURE__ */ jsx(ChecklistContainer, { children: loadingSteps.map((text, i2) => /* @__PURE__ */ jsxs(ChecklistItem, { $active: stage > i2, children: [
|
|
31397
|
+
/* @__PURE__ */ jsx(CheckIcon$1, { $visible: stage > i2, children: /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: REDESIGN_COLORS.success, strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M20 6L9 17l-5-5" }) }) }),
|
|
31398
|
+
/* @__PURE__ */ jsx("span", { children: text })
|
|
31399
|
+
] }, i2)) })
|
|
31400
|
+
] });
|
|
31401
|
+
};
|
|
31402
|
+
const spin = keyframes`
|
|
31403
|
+
to { transform: rotate(360deg); }
|
|
31404
|
+
`;
|
|
31405
|
+
const fadeIn$2 = keyframes`
|
|
31406
|
+
from { opacity: 0; transform: translateY(8px); }
|
|
31407
|
+
to { opacity: 1; transform: none; }
|
|
31408
|
+
`;
|
|
31409
|
+
const Container$1 = styled.div`
|
|
31410
|
+
flex: 1;
|
|
31411
|
+
display: flex;
|
|
31412
|
+
flex-direction: column;
|
|
31413
|
+
align-items: center;
|
|
31414
|
+
justify-content: center;
|
|
31415
|
+
padding: 40px 0;
|
|
31416
|
+
text-align: center;
|
|
31417
|
+
animation: ${fadeIn$2} 0.34s cubic-bezier(0.2, 0.8, 0.2, 1) both;
|
|
31418
|
+
`;
|
|
31419
|
+
const LogoWrapper = styled.div`
|
|
31420
|
+
margin-bottom: 40px;
|
|
31421
|
+
`;
|
|
31422
|
+
const Spinner = styled.div`
|
|
31423
|
+
width: 104px;
|
|
31424
|
+
height: 104px;
|
|
31425
|
+
border-radius: 50%;
|
|
31426
|
+
border: 9px solid #FCDDD2;
|
|
31427
|
+
border-top-color: ${REDESIGN_COLORS.orange};
|
|
31428
|
+
animation: ${spin} 1s linear infinite;
|
|
31429
|
+
margin-bottom: 34px;
|
|
31430
|
+
`;
|
|
31431
|
+
const Title = styled.h2`
|
|
31432
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
31433
|
+
font-size: 32px;
|
|
31434
|
+
font-weight: ${REDESIGN_FONTS.weight.medium};
|
|
31435
|
+
letter-spacing: -0.32px;
|
|
31436
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
31437
|
+
margin: 0 0 8px;
|
|
31438
|
+
`;
|
|
31439
|
+
const Subtitle = styled.p`
|
|
31440
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
31441
|
+
color: ${REDESIGN_COLORS.secondaryText};
|
|
31442
|
+
font-size: 14.5px;
|
|
31443
|
+
margin: 0 0 24px;
|
|
31444
|
+
`;
|
|
31445
|
+
const ProgressBarContainer = styled.div`
|
|
31446
|
+
width: 280px;
|
|
31447
|
+
height: 6px;
|
|
31448
|
+
border-radius: 100px;
|
|
31449
|
+
background: ${REDESIGN_COLORS.progressBg};
|
|
31450
|
+
overflow: hidden;
|
|
31451
|
+
margin-bottom: 26px;
|
|
31452
|
+
`;
|
|
31453
|
+
const ProgressBar = styled.div`
|
|
31454
|
+
height: 100%;
|
|
31455
|
+
border-radius: 100px;
|
|
31456
|
+
background: ${REDESIGN_COLORS.orange};
|
|
31457
|
+
transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
31458
|
+
width: ${({ $progress }) => $progress}%;
|
|
31459
|
+
`;
|
|
31460
|
+
const ChecklistContainer = styled.div`
|
|
31461
|
+
display: flex;
|
|
31462
|
+
flex-direction: column;
|
|
31463
|
+
gap: 13px;
|
|
31464
|
+
min-height: 150px;
|
|
31465
|
+
align-items: center;
|
|
31466
|
+
`;
|
|
31467
|
+
const ChecklistItem = styled.div`
|
|
31468
|
+
display: flex;
|
|
31469
|
+
align-items: center;
|
|
31470
|
+
gap: 10px;
|
|
31471
|
+
justify-content: center;
|
|
31472
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
31473
|
+
font-size: 15px;
|
|
31474
|
+
transition: all 0.3s;
|
|
31475
|
+
color: ${({ $active }) => $active ? REDESIGN_COLORS.mainText : "#bdbdbd"};
|
|
31476
|
+
`;
|
|
31477
|
+
const CheckIcon$1 = styled.span`
|
|
31478
|
+
display: flex;
|
|
31479
|
+
opacity: ${({ $visible }) => $visible ? 1 : 0};
|
|
31480
|
+
transition: opacity 0.3s;
|
|
31481
|
+
`;
|
|
31482
|
+
const NEXT_STEPS_DE = [
|
|
31483
|
+
{ title: "Falls wir noch Fragen haben, melden wir uns", desc: "In wenigen Minuten." },
|
|
31484
|
+
{ title: "Du erhältst 3 passende Angebote", desc: "In wenigen Stunden." }
|
|
31485
|
+
];
|
|
31486
|
+
const NEXT_STEPS_EN = [
|
|
31487
|
+
{ title: "If we have questions, we'll reach out", desc: "Within a few minutes." },
|
|
31488
|
+
{ title: "You'll receive 3 matching offers", desc: "Within a few hours." }
|
|
31489
|
+
];
|
|
31490
|
+
const RedesignContactForm = ({
|
|
31491
|
+
onSubmit,
|
|
31492
|
+
onBack,
|
|
31493
|
+
isSubmitting = false
|
|
31494
|
+
}) => {
|
|
31495
|
+
var _a2;
|
|
31496
|
+
const { t: t2, i18n } = useTranslation("qualification");
|
|
31497
|
+
const isGerman = (_a2 = i18n.language) == null ? void 0 : _a2.startsWith("de");
|
|
31498
|
+
const { answerOf } = useQualification();
|
|
31499
|
+
const [commentOpen, setCommentOpen] = useState(false);
|
|
31500
|
+
const [hasSubmitted, setHasSubmitted] = useState(false);
|
|
31501
|
+
const userTouchedRef = useRef({});
|
|
31502
|
+
const markUserTouched = useCallback((fieldName) => {
|
|
31503
|
+
userTouchedRef.current[fieldName] = true;
|
|
31504
|
+
}, []);
|
|
31505
|
+
const shouldShowError = useCallback((fieldName, formikTouched, error) => {
|
|
31506
|
+
const userActuallyTouched = userTouchedRef.current[fieldName];
|
|
31507
|
+
return (hasSubmitted || userActuallyTouched) && !!error;
|
|
31508
|
+
}, [hasSubmitted]);
|
|
31509
|
+
const nextSteps = isGerman ? NEXT_STEPS_DE : NEXT_STEPS_EN;
|
|
31510
|
+
const initialValues = {
|
|
31511
|
+
first_name: "",
|
|
31512
|
+
last_name: "",
|
|
31513
|
+
company: "",
|
|
31514
|
+
email: "",
|
|
31515
|
+
phone: "",
|
|
31516
|
+
deliveryAddressStreet: "",
|
|
31517
|
+
deliveryAddressStreetNumber: "",
|
|
31518
|
+
deliveryAddressPostalCode: "",
|
|
31519
|
+
deliveryAddressCity: "",
|
|
31520
|
+
deliveryAddressCountry: "",
|
|
31521
|
+
comment: ""
|
|
31522
|
+
};
|
|
31523
|
+
const validationSchema = create$2().shape({
|
|
31524
|
+
first_name: create$5().required(isGerman ? "Bitte Vorname eingeben" : "Please enter first name"),
|
|
31525
|
+
last_name: create$5().required(isGerman ? "Bitte Nachname eingeben" : "Please enter last name"),
|
|
31526
|
+
company: create$5().required(isGerman ? "Bitte Firma eingeben" : "Please enter company"),
|
|
31527
|
+
email: create$5().email(isGerman ? "Bitte gültige E-Mail eingeben" : "Please enter valid email").required(isGerman ? "Bitte E-Mail eingeben" : "Please enter email"),
|
|
31528
|
+
phone: create$5().required(isGerman ? "Bitte Telefon eingeben" : "Please enter phone"),
|
|
31529
|
+
deliveryAddressStreet: create$5().min(1).required(),
|
|
31530
|
+
deliveryAddressCity: create$5().min(1).required()
|
|
31531
|
+
});
|
|
31532
|
+
const buildSummaryChips = () => {
|
|
31533
|
+
const chips = [];
|
|
31534
|
+
try {
|
|
31535
|
+
const city = answerOf("city");
|
|
31536
|
+
const eventType = answerOf("event_type");
|
|
31537
|
+
const eventDate = answerOf("event_date");
|
|
31538
|
+
const dateUnknown = answerOf("date_unknown");
|
|
31539
|
+
const peopleCount = answerOf("min_order_number");
|
|
31540
|
+
const pricePerPerson = answerOf("price_per_person");
|
|
31541
|
+
if (city) {
|
|
31542
|
+
chips.push({ label: isGerman ? "Stadt" : "City", value: CITY_LABELS[city] || city });
|
|
31543
|
+
}
|
|
31544
|
+
if (eventType) {
|
|
31545
|
+
const labels2 = isGerman ? EVENT_LABELS_DE : EVENT_LABELS_EN;
|
|
31546
|
+
chips.push({ label: isGerman ? "Anlass" : "Event", value: labels2[eventType] || eventType });
|
|
31547
|
+
}
|
|
31548
|
+
if (dateUnknown) {
|
|
31549
|
+
chips.push({ label: isGerman ? "Datum" : "Date", value: isGerman ? "Noch offen" : "Still open" });
|
|
31550
|
+
} else if (eventDate) {
|
|
31551
|
+
try {
|
|
31552
|
+
const dateObj = eventDate instanceof Date ? eventDate : new Date(eventDate);
|
|
31553
|
+
chips.push({ label: isGerman ? "Datum" : "Date", value: format(dateObj, "dd.MM.yy") });
|
|
31554
|
+
} catch {
|
|
31555
|
+
}
|
|
31556
|
+
}
|
|
31557
|
+
if (typeof peopleCount === "number" && peopleCount > 0) {
|
|
31558
|
+
chips.push({ label: isGerman ? "Personen" : "People", value: `${peopleCount} Pax` });
|
|
31559
|
+
}
|
|
31560
|
+
if (typeof pricePerPerson === "number" && pricePerPerson > 0) {
|
|
31561
|
+
const total2 = (peopleCount || 0) * pricePerPerson;
|
|
31562
|
+
chips.push({ label: "Budget", value: `${total2.toLocaleString("de-DE")} €` });
|
|
31563
|
+
}
|
|
31564
|
+
} catch (e2) {
|
|
31565
|
+
console.error("Error building summary chips:", e2);
|
|
31566
|
+
}
|
|
31567
|
+
return chips;
|
|
31568
|
+
};
|
|
31569
|
+
const handleFormSubmit = useCallback((values2, { setSubmitting }) => {
|
|
31570
|
+
setHasSubmitted(true);
|
|
31571
|
+
const formData = {
|
|
31572
|
+
vorname: values2.first_name,
|
|
31573
|
+
nachname: values2.last_name,
|
|
31574
|
+
firma: values2.company,
|
|
31575
|
+
email: values2.email,
|
|
31576
|
+
telefon: values2.phone,
|
|
31577
|
+
deliveryAddressStreet: values2.deliveryAddressStreet,
|
|
31578
|
+
deliveryAddressStreetNumber: values2.deliveryAddressStreetNumber,
|
|
31579
|
+
deliveryAddressPostalCode: values2.deliveryAddressPostalCode,
|
|
31580
|
+
deliveryAddressCity: values2.deliveryAddressCity,
|
|
31581
|
+
deliveryAddressCountry: values2.deliveryAddressCountry,
|
|
31582
|
+
kommentar: values2.comment
|
|
31583
|
+
};
|
|
31584
|
+
onSubmit(formData);
|
|
31585
|
+
}, [onSubmit]);
|
|
31586
|
+
const summaryChips = buildSummaryChips();
|
|
31587
|
+
return /* @__PURE__ */ jsx(
|
|
31588
|
+
Formik,
|
|
31589
|
+
{
|
|
31590
|
+
initialValues,
|
|
31591
|
+
validationSchema,
|
|
31592
|
+
onSubmit: handleFormSubmit,
|
|
31593
|
+
validateOnMount: false,
|
|
31594
|
+
validateOnBlur: true,
|
|
31595
|
+
validateOnChange: true,
|
|
31596
|
+
children: ({ errors, touched, handleChange, handleBlur, values: values2 }) => /* @__PURE__ */ jsxs(FormWrapper$1, { children: [
|
|
31597
|
+
/* @__PURE__ */ jsx(ScrollableContent, { children: /* @__PURE__ */ jsxs(Container, { children: [
|
|
31598
|
+
/* @__PURE__ */ jsxs(SummaryRow, { children: [
|
|
31599
|
+
/* @__PURE__ */ jsx(SummaryLabel, { children: isGerman ? "Deine Anfrage:" : "Your request:" }),
|
|
31600
|
+
summaryChips.map((chip, index) => /* @__PURE__ */ jsxs(SummaryChip, { children: [
|
|
31601
|
+
/* @__PURE__ */ jsx(CheckIcon, { children: /* @__PURE__ */ jsx("svg", { width: "10", height: "10", viewBox: "0 0 24 24", fill: "none", stroke: REDESIGN_COLORS.success, strokeWidth: "3.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M20 6L9 17l-5-5" }) }) }),
|
|
31602
|
+
chip.value
|
|
31603
|
+
] }, index))
|
|
31604
|
+
] }),
|
|
31605
|
+
/* @__PURE__ */ jsx(NudgeWrap, { children: !commentOpen ? /* @__PURE__ */ jsxs(NudgeClosed, { onClick: () => setCommentOpen(true), children: [
|
|
31606
|
+
/* @__PURE__ */ jsx(NudgeIconWrap, { children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M12 5v14M5 12h14" }) }) }),
|
|
31607
|
+
/* @__PURE__ */ jsxs(NudgeContent, { children: [
|
|
31608
|
+
/* @__PURE__ */ jsx(NudgeTitle, { children: isGerman ? "Du möchtest uns weitere Wünsche mitteilen?" : "Would you like to share additional preferences?" }),
|
|
31609
|
+
/* @__PURE__ */ jsx(NudgeDesc, { children: isGerman ? "Schreib uns Wünsche, Ernährungspräferenzen oder den Ablauf." : "Tell us your preferences, dietary requirements or schedule." })
|
|
31610
|
+
] }),
|
|
31611
|
+
/* @__PURE__ */ jsx(NudgeAction, { children: isGerman ? "Ergänzen" : "Add" })
|
|
31612
|
+
] }) : /* @__PURE__ */ jsxs(NudgeOpen, { children: [
|
|
31613
|
+
/* @__PURE__ */ jsxs(FormLabel, { children: [
|
|
31614
|
+
isGerman ? "Deine Wünsche" : "Your preferences",
|
|
31615
|
+
" ",
|
|
31616
|
+
/* @__PURE__ */ jsxs(OptionalText, { children: [
|
|
31617
|
+
"(",
|
|
31618
|
+
isGerman ? "optional" : "optional",
|
|
31619
|
+
")"
|
|
31620
|
+
] })
|
|
31621
|
+
] }),
|
|
31622
|
+
/* @__PURE__ */ jsx(
|
|
31623
|
+
TextArea,
|
|
31624
|
+
{
|
|
31625
|
+
name: "comment",
|
|
31626
|
+
rows: 3,
|
|
31627
|
+
value: values2.comment,
|
|
31628
|
+
onChange: handleChange,
|
|
31629
|
+
onBlur: handleBlur,
|
|
31630
|
+
placeholder: isGerman ? "z.B. vegetarisch/vegan, glutenfreie Optionen, Anlieferung ab 11 Uhr, Geschirr benötigt …" : "e.g. vegetarian/vegan, gluten-free options, delivery from 11am, dishes needed …"
|
|
31631
|
+
}
|
|
31632
|
+
),
|
|
31633
|
+
/* @__PURE__ */ jsx(FieldHint, { children: isGerman ? "Du kannst das auch später in deinem Account ergänzen." : "You can also add this later in your account." })
|
|
31634
|
+
] }) }),
|
|
31635
|
+
/* @__PURE__ */ jsxs(FormGrid, { children: [
|
|
31636
|
+
/* @__PURE__ */ jsxs(FormField, { children: [
|
|
31637
|
+
/* @__PURE__ */ jsxs(FormLabel, { children: [
|
|
31638
|
+
isGerman ? "Vorname" : "First name",
|
|
31639
|
+
" *"
|
|
31640
|
+
] }),
|
|
31641
|
+
/* @__PURE__ */ jsx(
|
|
31642
|
+
Input,
|
|
31643
|
+
{
|
|
31644
|
+
name: "first_name",
|
|
31645
|
+
value: values2.first_name,
|
|
31646
|
+
onChange: handleChange,
|
|
31647
|
+
onBlur: (e2) => {
|
|
31648
|
+
markUserTouched("first_name");
|
|
31649
|
+
handleBlur(e2);
|
|
31650
|
+
},
|
|
31651
|
+
placeholder: isGerman ? "Vorname" : "First name",
|
|
31652
|
+
$hasError: shouldShowError("first_name", !!touched.first_name, errors.first_name)
|
|
31653
|
+
}
|
|
31654
|
+
),
|
|
31655
|
+
shouldShowError("first_name", !!touched.first_name, errors.first_name) && /* @__PURE__ */ jsx(ErrorText, { children: errors.first_name })
|
|
31656
|
+
] }),
|
|
31657
|
+
/* @__PURE__ */ jsxs(FormField, { children: [
|
|
31658
|
+
/* @__PURE__ */ jsxs(FormLabel, { children: [
|
|
31659
|
+
isGerman ? "Nachname" : "Last name",
|
|
31660
|
+
" *"
|
|
31661
|
+
] }),
|
|
31662
|
+
/* @__PURE__ */ jsx(
|
|
31663
|
+
Input,
|
|
31664
|
+
{
|
|
31665
|
+
name: "last_name",
|
|
31666
|
+
value: values2.last_name,
|
|
31667
|
+
onChange: handleChange,
|
|
31668
|
+
onBlur: (e2) => {
|
|
31669
|
+
markUserTouched("last_name");
|
|
31670
|
+
handleBlur(e2);
|
|
31671
|
+
},
|
|
31672
|
+
placeholder: isGerman ? "Nachname" : "Last name",
|
|
31673
|
+
$hasError: shouldShowError("last_name", !!touched.last_name, errors.last_name)
|
|
31674
|
+
}
|
|
31675
|
+
),
|
|
31676
|
+
shouldShowError("last_name", !!touched.last_name, errors.last_name) && /* @__PURE__ */ jsx(ErrorText, { children: errors.last_name })
|
|
31677
|
+
] }),
|
|
31678
|
+
/* @__PURE__ */ jsxs(FormField, { $fullWidth: true, children: [
|
|
31679
|
+
/* @__PURE__ */ jsxs(FormLabel, { children: [
|
|
31680
|
+
isGerman ? "Firma" : "Company",
|
|
31681
|
+
" *"
|
|
31682
|
+
] }),
|
|
31683
|
+
/* @__PURE__ */ jsx(
|
|
31684
|
+
Input,
|
|
31685
|
+
{
|
|
31686
|
+
name: "company",
|
|
31687
|
+
value: values2.company,
|
|
31688
|
+
onChange: handleChange,
|
|
31689
|
+
onBlur: (e2) => {
|
|
31690
|
+
markUserTouched("company");
|
|
31691
|
+
handleBlur(e2);
|
|
31692
|
+
},
|
|
31693
|
+
placeholder: isGerman ? "Firma" : "Company",
|
|
31694
|
+
$hasError: shouldShowError("company", !!touched.company, errors.company)
|
|
31695
|
+
}
|
|
31696
|
+
),
|
|
31697
|
+
shouldShowError("company", !!touched.company, errors.company) && /* @__PURE__ */ jsx(ErrorText, { children: errors.company })
|
|
31698
|
+
] }),
|
|
31699
|
+
/* @__PURE__ */ jsxs(FormField, { children: [
|
|
31700
|
+
/* @__PURE__ */ jsx(FormLabel, { children: "E-Mail *" }),
|
|
31701
|
+
/* @__PURE__ */ jsx(
|
|
31702
|
+
Input,
|
|
31703
|
+
{
|
|
31704
|
+
type: "email",
|
|
31705
|
+
name: "email",
|
|
31706
|
+
value: values2.email,
|
|
31707
|
+
onChange: handleChange,
|
|
31708
|
+
onBlur: (e2) => {
|
|
31709
|
+
markUserTouched("email");
|
|
31710
|
+
handleBlur(e2);
|
|
31711
|
+
},
|
|
31712
|
+
placeholder: "name@firma.de",
|
|
31713
|
+
$hasError: shouldShowError("email", !!touched.email, errors.email)
|
|
31714
|
+
}
|
|
31715
|
+
),
|
|
31716
|
+
shouldShowError("email", !!touched.email, errors.email) && /* @__PURE__ */ jsx(ErrorText, { children: errors.email })
|
|
31717
|
+
] }),
|
|
31718
|
+
/* @__PURE__ */ jsxs(FormField, { children: [
|
|
31719
|
+
/* @__PURE__ */ jsxs(FormLabel, { children: [
|
|
31720
|
+
isGerman ? "Telefon" : "Phone",
|
|
31721
|
+
" *"
|
|
31722
|
+
] }),
|
|
31723
|
+
/* @__PURE__ */ jsx(
|
|
31724
|
+
Input,
|
|
31725
|
+
{
|
|
31726
|
+
type: "tel",
|
|
31727
|
+
name: "phone",
|
|
31728
|
+
value: values2.phone,
|
|
31729
|
+
onChange: handleChange,
|
|
31730
|
+
onBlur: (e2) => {
|
|
31731
|
+
markUserTouched("phone");
|
|
31732
|
+
handleBlur(e2);
|
|
31733
|
+
},
|
|
31734
|
+
placeholder: "+49 30 56837200",
|
|
31735
|
+
$hasError: shouldShowError("phone", !!touched.phone, errors.phone)
|
|
31736
|
+
}
|
|
31737
|
+
),
|
|
31738
|
+
shouldShowError("phone", !!touched.phone, errors.phone) && /* @__PURE__ */ jsx(ErrorText, { children: errors.phone })
|
|
31739
|
+
] }),
|
|
31740
|
+
/* @__PURE__ */ jsx(FormField, { $fullWidth: true, children: /* @__PURE__ */ jsx(AddressFieldWrapper, { $hideInitialError: !hasSubmitted, children: /* @__PURE__ */ jsx(
|
|
31741
|
+
Field,
|
|
31742
|
+
{
|
|
31743
|
+
name: "delivery_address",
|
|
31744
|
+
label: isGerman ? "Lieferadresse" : "Delivery address",
|
|
31745
|
+
placeholder: isGerman ? "Straße, PLZ, Ort" : "Street, ZIP, City",
|
|
31746
|
+
helperText: isGerman ? "Kannst du später jederzeit anpassen." : "You can adjust this later anytime.",
|
|
31747
|
+
component: AutocompleteAddress,
|
|
31748
|
+
required: true
|
|
31749
|
+
}
|
|
31750
|
+
) }) })
|
|
31751
|
+
] }),
|
|
31752
|
+
/* @__PURE__ */ jsx(Field, { type: "hidden", name: "deliveryAddressStreet" }),
|
|
31753
|
+
/* @__PURE__ */ jsx(Field, { type: "hidden", name: "deliveryAddressStreetNumber" }),
|
|
31754
|
+
/* @__PURE__ */ jsx(Field, { type: "hidden", name: "deliveryAddressPostalCode" }),
|
|
31755
|
+
/* @__PURE__ */ jsx(Field, { type: "hidden", name: "deliveryAddressCity" }),
|
|
31756
|
+
/* @__PURE__ */ jsx(Field, { type: "hidden", name: "deliveryAddressCountry" }),
|
|
31757
|
+
/* @__PURE__ */ jsxs(NextStepsSection, { children: [
|
|
31758
|
+
/* @__PURE__ */ jsx(NextStepsTitle, { children: isGerman ? "So geht es weiter" : "What happens next" }),
|
|
31759
|
+
/* @__PURE__ */ jsx(NextStepsGrid, { children: nextSteps.map((step2, index) => /* @__PURE__ */ jsxs(NextStepItem, { children: [
|
|
31760
|
+
/* @__PURE__ */ jsxs(NextStepDotRow, { children: [
|
|
31761
|
+
/* @__PURE__ */ jsx(NextStepDot, {}),
|
|
31762
|
+
/* @__PURE__ */ jsx(NextStepLine, {})
|
|
31763
|
+
] }),
|
|
31764
|
+
/* @__PURE__ */ jsx(NextStepItemTitle, { children: step2.title }),
|
|
31765
|
+
/* @__PURE__ */ jsx(NextStepItemDesc, { children: step2.desc })
|
|
31766
|
+
] }, index)) })
|
|
31767
|
+
] })
|
|
31768
|
+
] }) }),
|
|
31769
|
+
/* @__PURE__ */ jsxs(FixedFooter, { children: [
|
|
31770
|
+
/* @__PURE__ */ jsxs(FooterTrust, { children: [
|
|
31771
|
+
/* @__PURE__ */ jsxs(TrustItem, { children: [
|
|
31772
|
+
/* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M20 6L9 17l-5-5" }) }),
|
|
31773
|
+
isGerman ? "Deine Anfrage ist kostenlos & unverbindlich" : "Your request is free & non-binding"
|
|
31774
|
+
] }),
|
|
31775
|
+
/* @__PURE__ */ jsxs(TrustItemSecondary, { children: [
|
|
31776
|
+
/* @__PURE__ */ jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
31777
|
+
/* @__PURE__ */ jsx("rect", { x: "4", y: "11", width: "16", height: "10", rx: "2" }),
|
|
31778
|
+
/* @__PURE__ */ jsx("path", { d: "M8 11V7a4 4 0 0 1 8 0v4" })
|
|
31779
|
+
] }),
|
|
31780
|
+
isGerman ? "SSL-verschlüsselt" : "SSL encrypted"
|
|
31781
|
+
] })
|
|
31782
|
+
] }),
|
|
31783
|
+
/* @__PURE__ */ jsxs(ButtonRow$1, { children: [
|
|
31784
|
+
/* @__PURE__ */ jsx(BackButton$1, { type: "button", onClick: onBack, children: isGerman ? "Zurück" : "Back" }),
|
|
31785
|
+
/* @__PURE__ */ jsx(SubmitButton, { type: "submit", disabled: isSubmitting, children: isSubmitting ? isGerman ? "Wird gesendet..." : "Submitting..." : isGerman ? "Anfrage senden" : "Submit request" })
|
|
31786
|
+
] })
|
|
31787
|
+
] })
|
|
31788
|
+
] })
|
|
31789
|
+
}
|
|
31790
|
+
);
|
|
31791
|
+
};
|
|
31792
|
+
const fadeIn$1 = keyframes`
|
|
31793
|
+
from { opacity: 0; transform: translateY(8px); }
|
|
31794
|
+
to { opacity: 1; transform: none; }
|
|
31795
|
+
`;
|
|
31796
|
+
const FormWrapper$1 = styled(Form)`
|
|
31797
|
+
display: flex;
|
|
31798
|
+
flex-direction: column;
|
|
31799
|
+
flex: 1;
|
|
31800
|
+
min-height: 0;
|
|
31801
|
+
width: 100%;
|
|
31802
|
+
`;
|
|
31803
|
+
const ScrollableContent = styled.div`
|
|
31804
|
+
flex: 1;
|
|
31805
|
+
overflow-y: auto;
|
|
31806
|
+
display: flex;
|
|
31807
|
+
flex-direction: column;
|
|
31808
|
+
align-items: center;
|
|
31809
|
+
animation: ${fadeIn$1} 0.34s cubic-bezier(0.2, 0.8, 0.2, 1) both;
|
|
31810
|
+
`;
|
|
31811
|
+
const Container = styled.div`
|
|
31812
|
+
width: 100%;
|
|
31813
|
+
max-width: 520px;
|
|
31814
|
+
margin: 0 auto;
|
|
31815
|
+
padding: 0 16px 20px;
|
|
31816
|
+
|
|
31817
|
+
@media (min-width: 960px) {
|
|
31818
|
+
padding: 0 0 20px;
|
|
31819
|
+
}
|
|
31820
|
+
`;
|
|
31821
|
+
const SummaryRow = styled.div`
|
|
31822
|
+
display: flex;
|
|
31823
|
+
align-items: center;
|
|
31824
|
+
flex-wrap: wrap;
|
|
31825
|
+
gap: 8px;
|
|
31826
|
+
margin-bottom: 20px;
|
|
31827
|
+
padding: 12px 16px;
|
|
31828
|
+
background: ${REDESIGN_COLORS.white200};
|
|
31829
|
+
border-radius: 12px;
|
|
31830
|
+
`;
|
|
31831
|
+
const SummaryLabel = styled.span`
|
|
31832
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
31833
|
+
font-size: 13px;
|
|
31834
|
+
font-weight: ${REDESIGN_FONTS.weight.medium};
|
|
31835
|
+
color: ${REDESIGN_COLORS.secondaryText};
|
|
31836
|
+
`;
|
|
31837
|
+
const SummaryChip = styled.span`
|
|
31838
|
+
display: inline-flex;
|
|
31839
|
+
align-items: center;
|
|
31840
|
+
gap: 5px;
|
|
31841
|
+
padding: 5px 10px;
|
|
31842
|
+
background: ${REDESIGN_COLORS.white};
|
|
31843
|
+
border-radius: 100px;
|
|
31844
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
31845
|
+
font-size: 12.5px;
|
|
31846
|
+
font-weight: ${REDESIGN_FONTS.weight.medium};
|
|
31847
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
31848
|
+
`;
|
|
31849
|
+
const CheckIcon = styled.span`
|
|
31850
|
+
display: flex;
|
|
31851
|
+
`;
|
|
31852
|
+
const NudgeWrap = styled.div`
|
|
31853
|
+
background: ${REDESIGN_COLORS.white200};
|
|
31854
|
+
border-radius: 12px;
|
|
31855
|
+
margin-bottom: 20px;
|
|
31856
|
+
overflow: hidden;
|
|
31857
|
+
`;
|
|
31858
|
+
const NudgeClosed = styled.div`
|
|
31859
|
+
display: flex;
|
|
31860
|
+
align-items: center;
|
|
31861
|
+
gap: 12px;
|
|
31862
|
+
cursor: pointer;
|
|
31863
|
+
padding: 13px 16px;
|
|
31864
|
+
`;
|
|
31865
|
+
const NudgeIconWrap = styled.div`
|
|
31866
|
+
flex: none;
|
|
31867
|
+
width: 30px;
|
|
31868
|
+
height: 30px;
|
|
31869
|
+
border-radius: 500px;
|
|
31870
|
+
background: ${REDESIGN_COLORS.orangeLighter};
|
|
31871
|
+
color: ${REDESIGN_COLORS.orange};
|
|
31872
|
+
display: flex;
|
|
31873
|
+
align-items: center;
|
|
31874
|
+
justify-content: center;
|
|
31875
|
+
`;
|
|
31876
|
+
const NudgeContent = styled.div`
|
|
31877
|
+
flex: 1;
|
|
31878
|
+
`;
|
|
31879
|
+
const NudgeTitle = styled.div`
|
|
31880
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
31881
|
+
font-size: 13.5px;
|
|
31882
|
+
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
31883
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
31884
|
+
line-height: 1.3;
|
|
31885
|
+
`;
|
|
31886
|
+
const NudgeDesc = styled.div`
|
|
31887
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
31888
|
+
font-size: 12px;
|
|
31889
|
+
color: ${REDESIGN_COLORS.muted};
|
|
31890
|
+
line-height: 1.4;
|
|
31891
|
+
margin-top: 1px;
|
|
31892
|
+
`;
|
|
31893
|
+
const NudgeAction = styled.span`
|
|
31894
|
+
flex: none;
|
|
31895
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
31896
|
+
font-size: 12.5px;
|
|
31897
|
+
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
31898
|
+
color: ${REDESIGN_COLORS.orange};
|
|
31899
|
+
`;
|
|
31900
|
+
const NudgeOpen = styled.div`
|
|
31901
|
+
padding: 14px 16px;
|
|
31902
|
+
`;
|
|
31903
|
+
const FormLabel = styled.label`
|
|
31904
|
+
display: block;
|
|
31905
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
31906
|
+
font-size: 13px;
|
|
31907
|
+
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
31908
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
31909
|
+
margin-bottom: 6px;
|
|
31910
|
+
`;
|
|
31911
|
+
const OptionalText = styled.span`
|
|
31912
|
+
color: ${REDESIGN_COLORS.muted};
|
|
31913
|
+
font-weight: ${REDESIGN_FONTS.weight.regular};
|
|
31914
|
+
`;
|
|
31915
|
+
const TextArea = styled.textarea`
|
|
31916
|
+
width: 100%;
|
|
31917
|
+
padding: 13px 16px;
|
|
31918
|
+
border: 1px solid ${REDESIGN_COLORS.inputBorder};
|
|
31919
|
+
border-radius: 12px;
|
|
31920
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
31921
|
+
font-size: 15px;
|
|
31922
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
31923
|
+
background: ${REDESIGN_COLORS.white};
|
|
31924
|
+
resize: vertical;
|
|
31925
|
+
transition: border-color 0.15s;
|
|
31926
|
+
|
|
31927
|
+
&::placeholder {
|
|
31928
|
+
color: #a5a5a5;
|
|
31929
|
+
}
|
|
31930
|
+
|
|
31931
|
+
&:hover {
|
|
31932
|
+
border-color: #cfcfcf;
|
|
31933
|
+
}
|
|
31934
|
+
|
|
31935
|
+
&:focus {
|
|
31936
|
+
outline: none;
|
|
31937
|
+
border-color: ${REDESIGN_COLORS.orange};
|
|
31938
|
+
}
|
|
31939
|
+
`;
|
|
31940
|
+
const FieldHint = styled.div`
|
|
31941
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
31942
|
+
font-size: 11.5px;
|
|
31943
|
+
color: ${REDESIGN_COLORS.muted};
|
|
31944
|
+
margin-top: 5px;
|
|
31945
|
+
`;
|
|
31946
|
+
const FormGrid = styled.div`
|
|
31947
|
+
display: grid;
|
|
31948
|
+
grid-template-columns: 1fr 1fr;
|
|
31949
|
+
gap: 16px;
|
|
31950
|
+
margin-bottom: 22px;
|
|
31951
|
+
|
|
31952
|
+
@media (max-width: 639px) {
|
|
31953
|
+
grid-template-columns: 1fr;
|
|
31954
|
+
}
|
|
31955
|
+
`;
|
|
31956
|
+
const FormField = styled.div`
|
|
31957
|
+
${({ $fullWidth }) => $fullWidth && "grid-column: 1 / -1;"}
|
|
31958
|
+
`;
|
|
31959
|
+
const AddressFieldWrapper = styled.div`
|
|
31960
|
+
position: relative;
|
|
31961
|
+
z-index: 1;
|
|
31962
|
+
|
|
31963
|
+
.MuiFormControl-root {
|
|
31964
|
+
width: 100%;
|
|
31965
|
+
}
|
|
31966
|
+
|
|
31967
|
+
.MuiAutocomplete-root {
|
|
31968
|
+
width: 100%;
|
|
31969
|
+
}
|
|
31970
|
+
|
|
31971
|
+
.MuiAutocomplete-inputRoot {
|
|
31972
|
+
padding: 0 !important;
|
|
31973
|
+
}
|
|
31974
|
+
|
|
31975
|
+
.MuiInputBase-root {
|
|
31976
|
+
width: 100%;
|
|
31977
|
+
padding: 13px 16px;
|
|
31978
|
+
border: 1px solid ${REDESIGN_COLORS.inputBorder};
|
|
31979
|
+
border-radius: 12px;
|
|
31980
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
31981
|
+
font-size: 15px;
|
|
31982
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
31983
|
+
background: ${REDESIGN_COLORS.white};
|
|
31984
|
+
transition: border-color 0.15s;
|
|
31985
|
+
cursor: text;
|
|
31986
|
+
|
|
31987
|
+
&::before, &::after {
|
|
31988
|
+
display: none;
|
|
31989
|
+
}
|
|
31990
|
+
|
|
31991
|
+
&:hover {
|
|
31992
|
+
border-color: #cfcfcf;
|
|
31993
|
+
}
|
|
31994
|
+
|
|
31995
|
+
&.Mui-focused {
|
|
31996
|
+
border-color: ${REDESIGN_COLORS.orange};
|
|
31997
|
+
}
|
|
31998
|
+
|
|
31999
|
+
&.Mui-error {
|
|
32000
|
+
${({ $hideInitialError }) => $hideInitialError && `border-color: ${REDESIGN_COLORS.inputBorder};`}
|
|
32001
|
+
}
|
|
32002
|
+
|
|
32003
|
+
input {
|
|
32004
|
+
padding: 0;
|
|
32005
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32006
|
+
font-size: 15px;
|
|
32007
|
+
cursor: text;
|
|
32008
|
+
|
|
32009
|
+
&::placeholder {
|
|
32010
|
+
color: #a5a5a5;
|
|
32011
|
+
opacity: 1;
|
|
32012
|
+
}
|
|
32013
|
+
}
|
|
32014
|
+
}
|
|
32015
|
+
|
|
32016
|
+
.MuiInputLabel-root {
|
|
32017
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32018
|
+
font-size: 13px;
|
|
32019
|
+
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
32020
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
32021
|
+
position: relative;
|
|
32022
|
+
transform: none;
|
|
32023
|
+
margin-bottom: 6px;
|
|
32024
|
+
pointer-events: none;
|
|
32025
|
+
|
|
32026
|
+
&.Mui-focused {
|
|
32027
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
32028
|
+
}
|
|
32029
|
+
}
|
|
32030
|
+
|
|
32031
|
+
.MuiFormHelperText-root {
|
|
32032
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32033
|
+
font-size: 11.5px;
|
|
32034
|
+
color: ${REDESIGN_COLORS.muted};
|
|
32035
|
+
margin: 5px 0 0;
|
|
32036
|
+
|
|
32037
|
+
&.Mui-error {
|
|
32038
|
+
${({ $hideInitialError }) => $hideInitialError && "display: none;"}
|
|
32039
|
+
color: ${REDESIGN_COLORS.error};
|
|
32040
|
+
}
|
|
32041
|
+
}
|
|
32042
|
+
|
|
32043
|
+
.MuiAutocomplete-listbox {
|
|
32044
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32045
|
+
}
|
|
32046
|
+
|
|
32047
|
+
.MuiAutocomplete-popper {
|
|
32048
|
+
z-index: 1300;
|
|
32049
|
+
}
|
|
32050
|
+
`;
|
|
32051
|
+
const Input = styled.input`
|
|
32052
|
+
width: 100%;
|
|
32053
|
+
padding: 13px 16px;
|
|
32054
|
+
border: 1px solid ${({ $hasError }) => $hasError ? REDESIGN_COLORS.error : REDESIGN_COLORS.inputBorder};
|
|
32055
|
+
border-radius: 12px;
|
|
32056
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32057
|
+
font-size: 15px;
|
|
32058
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
32059
|
+
background: ${REDESIGN_COLORS.white};
|
|
32060
|
+
transition: border-color 0.15s;
|
|
32061
|
+
|
|
32062
|
+
&::placeholder {
|
|
32063
|
+
color: #a5a5a5;
|
|
32064
|
+
}
|
|
32065
|
+
|
|
32066
|
+
&:hover {
|
|
32067
|
+
border-color: ${({ $hasError }) => $hasError ? REDESIGN_COLORS.error : "#cfcfcf"};
|
|
32068
|
+
}
|
|
32069
|
+
|
|
32070
|
+
&:focus {
|
|
32071
|
+
outline: none;
|
|
32072
|
+
border-color: ${({ $hasError }) => $hasError ? REDESIGN_COLORS.error : REDESIGN_COLORS.orange};
|
|
32073
|
+
}
|
|
32074
|
+
`;
|
|
32075
|
+
const ErrorText = styled.span`
|
|
32076
|
+
display: block;
|
|
32077
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32078
|
+
font-size: 11.5px;
|
|
32079
|
+
color: ${REDESIGN_COLORS.error};
|
|
32080
|
+
margin-top: 4px;
|
|
32081
|
+
`;
|
|
32082
|
+
const NextStepsSection = styled.div`
|
|
32083
|
+
width: 100%;
|
|
32084
|
+
margin-bottom: 22px;
|
|
32085
|
+
`;
|
|
32086
|
+
const NextStepsTitle = styled.div`
|
|
32087
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32088
|
+
font-size: 11px;
|
|
32089
|
+
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
32090
|
+
letter-spacing: 0.06em;
|
|
32091
|
+
text-transform: uppercase;
|
|
32092
|
+
color: ${REDESIGN_COLORS.orange};
|
|
32093
|
+
margin-bottom: 12px;
|
|
32094
|
+
`;
|
|
32095
|
+
const NextStepsGrid = styled.div`
|
|
32096
|
+
display: grid;
|
|
32097
|
+
grid-template-columns: 1fr 1fr;
|
|
32098
|
+
gap: 24px;
|
|
32099
|
+
|
|
32100
|
+
@media (max-width: 639px) {
|
|
32101
|
+
grid-template-columns: 1fr;
|
|
32102
|
+
gap: 16px;
|
|
32103
|
+
}
|
|
32104
|
+
`;
|
|
32105
|
+
const NextStepItem = styled.div`
|
|
32106
|
+
display: flex;
|
|
32107
|
+
flex-direction: column;
|
|
32108
|
+
gap: 6px;
|
|
32109
|
+
`;
|
|
32110
|
+
const NextStepDotRow = styled.div`
|
|
32111
|
+
display: flex;
|
|
32112
|
+
align-items: center;
|
|
32113
|
+
gap: 8px;
|
|
32114
|
+
`;
|
|
32115
|
+
const NextStepDot = styled.div`
|
|
32116
|
+
flex: none;
|
|
32117
|
+
width: 7px;
|
|
32118
|
+
height: 7px;
|
|
32119
|
+
border-radius: 500px;
|
|
32120
|
+
background: ${REDESIGN_COLORS.orange};
|
|
32121
|
+
`;
|
|
32122
|
+
const NextStepLine = styled.div`
|
|
32123
|
+
height: 1px;
|
|
32124
|
+
flex: 1;
|
|
32125
|
+
background: ${REDESIGN_COLORS.inputBorder};
|
|
32126
|
+
`;
|
|
32127
|
+
const NextStepItemTitle = styled.div`
|
|
32128
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32129
|
+
font-size: 13px;
|
|
32130
|
+
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
32131
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
32132
|
+
line-height: 1.3;
|
|
32133
|
+
`;
|
|
32134
|
+
const NextStepItemDesc = styled.div`
|
|
32135
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32136
|
+
font-size: 11.5px;
|
|
32137
|
+
color: ${REDESIGN_COLORS.muted};
|
|
32138
|
+
line-height: 1.4;
|
|
32139
|
+
`;
|
|
32140
|
+
const FixedFooter = styled.div`
|
|
32141
|
+
flex: none;
|
|
32142
|
+
padding: 12px 18px 16px;
|
|
32143
|
+
display: flex;
|
|
32144
|
+
flex-direction: column;
|
|
32145
|
+
align-items: center;
|
|
32146
|
+
gap: 12px;
|
|
32147
|
+
border-top: 1px solid #f0f0f0;
|
|
32148
|
+
background: ${REDESIGN_COLORS.white};
|
|
32149
|
+
|
|
32150
|
+
@media (min-width: 960px) {
|
|
32151
|
+
padding: 16px 44px 22px;
|
|
32152
|
+
}
|
|
32153
|
+
`;
|
|
32154
|
+
const FooterTrust = styled.div`
|
|
32155
|
+
display: flex;
|
|
32156
|
+
align-items: center;
|
|
32157
|
+
gap: 16px;
|
|
32158
|
+
flex-wrap: wrap;
|
|
32159
|
+
justify-content: center;
|
|
32160
|
+
`;
|
|
32161
|
+
const TrustItem = styled.div`
|
|
32162
|
+
display: flex;
|
|
32163
|
+
align-items: center;
|
|
32164
|
+
gap: 8px;
|
|
32165
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32166
|
+
font-size: 13px;
|
|
32167
|
+
color: ${REDESIGN_COLORS.success};
|
|
32168
|
+
font-weight: ${REDESIGN_FONTS.weight.medium};
|
|
32169
|
+
`;
|
|
32170
|
+
const TrustItemSecondary = styled.div`
|
|
32171
|
+
display: flex;
|
|
32172
|
+
align-items: center;
|
|
32173
|
+
gap: 6px;
|
|
32174
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32175
|
+
font-size: 12.5px;
|
|
32176
|
+
color: ${REDESIGN_COLORS.muted};
|
|
32177
|
+
`;
|
|
32178
|
+
const ButtonRow$1 = styled.div`
|
|
32179
|
+
display: flex;
|
|
32180
|
+
gap: 14px;
|
|
32181
|
+
align-items: center;
|
|
32182
|
+
justify-content: center;
|
|
32183
|
+
`;
|
|
32184
|
+
const BackButton$1 = styled.button`
|
|
32185
|
+
background: ${REDESIGN_COLORS.mainText};
|
|
32186
|
+
color: ${REDESIGN_COLORS.white};
|
|
32187
|
+
padding: 14px 34px;
|
|
32188
|
+
border-radius: 100px;
|
|
32189
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32190
|
+
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
32191
|
+
font-size: 15px;
|
|
32192
|
+
cursor: pointer;
|
|
32193
|
+
border: none;
|
|
32194
|
+
transition: all 0.15s;
|
|
32195
|
+
|
|
32196
|
+
&:hover {
|
|
32197
|
+
background: #1a1e30;
|
|
32198
|
+
}
|
|
32199
|
+
`;
|
|
32200
|
+
const SubmitButton = styled.button`
|
|
32201
|
+
padding: 14px 40px;
|
|
32202
|
+
border-radius: 100px;
|
|
32203
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32204
|
+
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
32205
|
+
font-size: 15px;
|
|
32206
|
+
transition: all 0.15s;
|
|
32207
|
+
border: none;
|
|
32208
|
+
cursor: ${({ disabled }) => disabled ? "not-allowed" : "pointer"};
|
|
32209
|
+
background: ${({ disabled }) => disabled ? REDESIGN_COLORS.disabledOrange : REDESIGN_COLORS.orange};
|
|
32210
|
+
color: ${REDESIGN_COLORS.white};
|
|
32211
|
+
|
|
32212
|
+
&:hover:not(:disabled) {
|
|
32213
|
+
opacity: 0.9;
|
|
32214
|
+
transform: translateY(-1px);
|
|
32215
|
+
}
|
|
32216
|
+
`;
|
|
32217
|
+
const RedesignedFunnel = ({
|
|
32218
|
+
ratings,
|
|
32219
|
+
onCancel,
|
|
32220
|
+
funnelContextRef,
|
|
32221
|
+
updateContext
|
|
32222
|
+
}) => {
|
|
32223
|
+
var _a2;
|
|
32224
|
+
const { i18n } = useTranslation();
|
|
32225
|
+
const isGerman = (_a2 = i18n.language) == null ? void 0 : _a2.startsWith("de");
|
|
32226
|
+
const router = useRouter();
|
|
32227
|
+
const { state, actions, answerOf } = useQualification();
|
|
32228
|
+
const [currentStepIndex, setCurrentStepIndex] = useState(0);
|
|
32229
|
+
const [phase, setPhase] = useState("questions");
|
|
32230
|
+
const [budgetPerPerson2, setBudgetPerPerson] = useState(20);
|
|
32231
|
+
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
32232
|
+
const [submittedData, setSubmittedData] = useState(null);
|
|
32233
|
+
const [redirectUrl, setRedirectUrl] = useState(null);
|
|
32234
|
+
const hasTrackedStart = useRef(false);
|
|
32235
|
+
const { submitAsNewCustomer } = useRequestForm();
|
|
32236
|
+
const currentStepId = REDESIGN_STEP_ORDER[currentStepIndex];
|
|
32237
|
+
const handleCancel = onCancel || (() => window.history.back());
|
|
32238
|
+
useEffect(() => {
|
|
32239
|
+
if (currentStepId === "redesign_people_count") {
|
|
32240
|
+
const existingCount = answerOf("min_order_number");
|
|
32241
|
+
const existingBudget = answerOf("price_per_person");
|
|
32242
|
+
if (existingCount === void 0) {
|
|
32243
|
+
actions.answerQuestion("min_order_number", 100);
|
|
32244
|
+
}
|
|
32245
|
+
if (existingBudget === void 0) {
|
|
32246
|
+
actions.answerQuestion("price_per_person", budgetPerPerson2);
|
|
32247
|
+
}
|
|
32248
|
+
}
|
|
32249
|
+
}, [currentStepId, actions, answerOf, budgetPerPerson2]);
|
|
32250
|
+
useEffect(() => {
|
|
32251
|
+
if (!hasTrackedStart.current && funnelContextRef.current.session_id) {
|
|
32252
|
+
hasTrackedStart.current = true;
|
|
32253
|
+
trackStarted(funnelContextRef.current, currentStepId);
|
|
32254
|
+
}
|
|
32255
|
+
}, [funnelContextRef.current.session_id, currentStepId]);
|
|
32256
|
+
const trackAnswer = useCallback((questionId, value) => {
|
|
32257
|
+
let serializedValue = value;
|
|
32258
|
+
if (value instanceof Date) {
|
|
32259
|
+
serializedValue = format(value, "yyyy-MM-dd");
|
|
32260
|
+
}
|
|
32261
|
+
trackAnswerSelected(funnelContextRef.current, {
|
|
32262
|
+
step_id: currentStepId,
|
|
32263
|
+
step_index: currentStepIndex,
|
|
32264
|
+
question_id: questionId,
|
|
32265
|
+
answer_value: serializedValue,
|
|
32266
|
+
is_last_question: true
|
|
32267
|
+
});
|
|
32268
|
+
}, [funnelContextRef, currentStepIndex, currentStepId]);
|
|
32269
|
+
const nextStep = useCallback(() => {
|
|
32270
|
+
const nextIndex = currentStepIndex + 1;
|
|
32271
|
+
if (nextIndex >= REDESIGN_STEP_ORDER.length) {
|
|
32272
|
+
setPhase("loading");
|
|
32273
|
+
} else {
|
|
32274
|
+
setCurrentStepIndex(nextIndex);
|
|
32275
|
+
}
|
|
32276
|
+
}, [currentStepIndex]);
|
|
32277
|
+
const previousStep = useCallback(() => {
|
|
32278
|
+
if (currentStepIndex > 0) {
|
|
32279
|
+
setCurrentStepIndex(currentStepIndex - 1);
|
|
32280
|
+
}
|
|
32281
|
+
}, [currentStepIndex]);
|
|
32282
|
+
const goToStep = useCallback((stepId) => {
|
|
32283
|
+
const index = REDESIGN_STEP_ORDER.indexOf(stepId);
|
|
32284
|
+
if (index >= 0 && index < currentStepIndex) {
|
|
32285
|
+
setCurrentStepIndex(index);
|
|
32286
|
+
}
|
|
32287
|
+
}, [currentStepIndex]);
|
|
32288
|
+
const handleCitySelect = useCallback((city) => {
|
|
32289
|
+
actions.answerQuestion("city", city);
|
|
32290
|
+
trackAnswer("city", city);
|
|
32291
|
+
updateContext({ city });
|
|
32292
|
+
nextStep();
|
|
32293
|
+
}, [actions, trackAnswer, updateContext, nextStep]);
|
|
32294
|
+
const handleEventTypeSelect = useCallback((eventType) => {
|
|
32295
|
+
const mapping = mapEventTypeToServiceAndCategory(eventType);
|
|
32296
|
+
actions.answerQuestion("event_type", eventType);
|
|
32297
|
+
actions.answerQuestion("service_type", mapping.service_type);
|
|
32298
|
+
actions.answerQuestion("catering_categories", [mapping.catering_category]);
|
|
32299
|
+
trackAnswer("event_type", eventType);
|
|
32300
|
+
updateContext({ service_type: mapping.service_type, total_steps: getRedesignTotalSteps() });
|
|
32301
|
+
nextStep();
|
|
32302
|
+
}, [actions, trackAnswer, updateContext, nextStep]);
|
|
32303
|
+
const handleDateChange = useCallback((date2) => {
|
|
32304
|
+
if (date2) {
|
|
32305
|
+
actions.answerQuestion("event_date", date2);
|
|
32306
|
+
trackAnswer("event_date", date2);
|
|
32307
|
+
}
|
|
32308
|
+
}, [actions, trackAnswer]);
|
|
32309
|
+
const handleMultiDayChange = useCallback((isMultiDay) => {
|
|
32310
|
+
actions.answerQuestion("is_multi_day", isMultiDay);
|
|
32311
|
+
trackAnswer("is_multi_day", isMultiDay);
|
|
32312
|
+
}, [actions, trackAnswer]);
|
|
32313
|
+
const handlePeopleCountChange2 = useCallback((count) => {
|
|
32314
|
+
actions.answerQuestion("min_order_number", count);
|
|
32315
|
+
trackAnswer("min_order_number", count);
|
|
32316
|
+
}, [actions, trackAnswer]);
|
|
32317
|
+
const handleBudgetPerPersonChange = useCallback((budget) => {
|
|
32318
|
+
setBudgetPerPerson(budget);
|
|
32319
|
+
actions.answerQuestion("price_per_person", budget);
|
|
32320
|
+
trackAnswer("price_per_person", budget);
|
|
32321
|
+
}, [actions, trackAnswer]);
|
|
32322
|
+
const handleLoadingComplete = useCallback(() => {
|
|
32323
|
+
setPhase("contact");
|
|
32324
|
+
}, []);
|
|
32325
|
+
const handleContactFormSubmit = useCallback(async (formData) => {
|
|
32326
|
+
setIsSubmitting(true);
|
|
32327
|
+
try {
|
|
32328
|
+
const buildValues = {
|
|
32329
|
+
first_name: formData.vorname,
|
|
32330
|
+
last_name: formData.nachname,
|
|
32331
|
+
company: formData.firma,
|
|
32332
|
+
email: formData.email,
|
|
32333
|
+
phone: formData.telefon,
|
|
32334
|
+
deliveryAddressStreet: formData.deliveryAddressStreet,
|
|
32335
|
+
deliveryAddressStreetNumber: formData.deliveryAddressStreetNumber,
|
|
32336
|
+
deliveryAddressPostalCode: formData.deliveryAddressPostalCode,
|
|
32337
|
+
deliveryAddressCity: formData.deliveryAddressCity,
|
|
32338
|
+
deliveryAddressCountry: formData.deliveryAddressCountry || "Germany",
|
|
32339
|
+
comment: formData.kommentar
|
|
32340
|
+
};
|
|
32341
|
+
const response = await submitAsNewCustomer(buildValues);
|
|
32342
|
+
const { signInToken, opportunity } = response || {};
|
|
32343
|
+
if (opportunity == null ? void 0 : opportunity.id) {
|
|
32344
|
+
const accountUrl = signInToken ? `/${router.locale}/account/requests/${opportunity.id}?one_time_sign_in_token=${signInToken}` : `/${router.locale}/account/external/requests/${opportunity.id}`;
|
|
32345
|
+
setRedirectUrl(accountUrl);
|
|
32346
|
+
}
|
|
32347
|
+
trackCompleted(funnelContextRef.current);
|
|
32348
|
+
setSubmittedData(formData);
|
|
32349
|
+
setPhase("done");
|
|
32350
|
+
} catch (error) {
|
|
32351
|
+
console.error("Failed to submit request:", error);
|
|
32352
|
+
setIsSubmitting(false);
|
|
32353
|
+
}
|
|
32354
|
+
}, [submitAsNewCustomer, funnelContextRef, router.locale]);
|
|
32355
|
+
const handleContactBack = useCallback(() => {
|
|
32356
|
+
setPhase("questions");
|
|
32357
|
+
setCurrentStepIndex(REDESIGN_STEP_ORDER.length - 1);
|
|
32358
|
+
}, []);
|
|
32359
|
+
const canContinue = useCallback(() => {
|
|
32360
|
+
switch (currentStepId) {
|
|
32361
|
+
case "redesign_city":
|
|
32362
|
+
return !!answerOf("city");
|
|
32363
|
+
case "redesign_event_type":
|
|
32364
|
+
return !!answerOf("event_type");
|
|
32365
|
+
case "redesign_date":
|
|
32366
|
+
return !!answerOf("event_date");
|
|
32367
|
+
case "redesign_people_count":
|
|
32368
|
+
const count = answerOf("min_order_number");
|
|
32369
|
+
return typeof count === "number" && count > 0;
|
|
32370
|
+
default:
|
|
32371
|
+
return false;
|
|
32372
|
+
}
|
|
32373
|
+
}, [currentStepId, answerOf]);
|
|
32374
|
+
const buildSelectionChips = () => {
|
|
32375
|
+
const chips2 = [];
|
|
32376
|
+
const city = answerOf("city");
|
|
32377
|
+
const eventType = answerOf("event_type");
|
|
32378
|
+
const eventDate = answerOf("event_date");
|
|
32379
|
+
if (city) {
|
|
32380
|
+
chips2.push(CITY_LABELS[city] || city);
|
|
32381
|
+
}
|
|
32382
|
+
if (eventType && currentStepIndex >= 2) {
|
|
32383
|
+
const labels2 = isGerman ? EVENT_LABELS_DE : EVENT_LABELS_EN;
|
|
32384
|
+
chips2.push(labels2[eventType] || eventType);
|
|
32385
|
+
}
|
|
32386
|
+
if (currentStepIndex >= 3 && eventDate) {
|
|
32387
|
+
chips2.push(format(eventDate, "dd.MM.yy"));
|
|
32388
|
+
}
|
|
32389
|
+
return chips2;
|
|
32390
|
+
};
|
|
32391
|
+
if (phase === "loading") {
|
|
32392
|
+
return /* @__PURE__ */ jsx(FunnelContainer, { children: /* @__PURE__ */ jsx(MainContent, { $fullWidth: true, children: /* @__PURE__ */ jsx(LoadingScreen, { onComplete: handleLoadingComplete }) }) });
|
|
32393
|
+
}
|
|
32394
|
+
if (phase === "contact") {
|
|
32395
|
+
const contactTitle = isGerman ? "Fast geschafft – nur noch deine Kontaktdaten" : "Almost done – just your contact details";
|
|
32396
|
+
const contactSubtitle = isGerman ? "Danach meldet sich dein Cateringexperte und schickt dir passende Angebote." : "Your catering expert will then get in touch and send you matching offers.";
|
|
32397
|
+
return /* @__PURE__ */ jsxs(FunnelContainer, { children: [
|
|
32398
|
+
/* @__PURE__ */ jsx(StepRail, { currentStepId: REDESIGN_STEP_IDS.contact, onStepClick: () => {
|
|
32399
|
+
} }),
|
|
32400
|
+
/* @__PURE__ */ jsxs(MainContent, { children: [
|
|
32401
|
+
/* @__PURE__ */ jsxs(MobileHeader, { children: [
|
|
32402
|
+
/* @__PURE__ */ jsx(MobileLogoWrapper, { children: /* @__PURE__ */ jsx(Logo, { height: 20 }) }),
|
|
32403
|
+
/* @__PURE__ */ jsx(MobileStepInfo, { children: /* @__PURE__ */ jsx(MobileStepCount, { children: isGerman ? `Schritt 5 von 5` : `Step 5 of 5` }) }),
|
|
32404
|
+
/* @__PURE__ */ jsx(MobileProgressBar, { children: /* @__PURE__ */ jsx(MobileProgress, { $progress: 100 }) })
|
|
32405
|
+
] }),
|
|
32406
|
+
/* @__PURE__ */ jsxs(DesktopTopBar, { children: [
|
|
32407
|
+
/* @__PURE__ */ jsx(CancelText, { onClick: handleCancel, children: isGerman ? "Abbrechen" : "Cancel" }),
|
|
32408
|
+
/* @__PURE__ */ jsx(DesktopStepCount, { children: isGerman ? `Schritt 5 von 5` : `Step 5 of 5` })
|
|
32409
|
+
] }),
|
|
32410
|
+
/* @__PURE__ */ jsxs(ContactContentArea, { children: [
|
|
32411
|
+
/* @__PURE__ */ jsx(StepTitle, { children: contactTitle }),
|
|
32412
|
+
/* @__PURE__ */ jsx(StepSubtitle, { children: contactSubtitle }),
|
|
32413
|
+
/* @__PURE__ */ jsx(
|
|
32414
|
+
RedesignContactForm,
|
|
32415
|
+
{
|
|
32416
|
+
onSubmit: handleContactFormSubmit,
|
|
32417
|
+
onBack: handleContactBack,
|
|
32418
|
+
isSubmitting
|
|
32419
|
+
}
|
|
32420
|
+
)
|
|
32421
|
+
] })
|
|
32422
|
+
] })
|
|
32423
|
+
] });
|
|
32424
|
+
}
|
|
32425
|
+
if (phase === "done") {
|
|
32426
|
+
const firstName = (submittedData == null ? void 0 : submittedData.vorname) || "";
|
|
32427
|
+
const email = (submittedData == null ? void 0 : submittedData.email) || "";
|
|
32428
|
+
const doneSteps = isGerman ? [
|
|
32429
|
+
{ n: "1", title: "Wir prüfen deine Anfrage", desc: "Unser Team schaut sich deine Anfrage an." },
|
|
32430
|
+
{ n: "2", title: "Du erhältst Angebote", desc: "Innerhalb weniger Stunden bekommst du bis zu 3 passende Angebote." },
|
|
32431
|
+
{ n: "3", title: "Buche deinen Favoriten", desc: "Vergleiche die Angebote und buche, wenn du bereit bist." }
|
|
32432
|
+
] : [
|
|
32433
|
+
{ n: "1", title: "We review your request", desc: "Our team will look at your request." },
|
|
32434
|
+
{ n: "2", title: "You receive offers", desc: "Within a few hours you'll receive up to 3 matching offers." },
|
|
32435
|
+
{ n: "3", title: "Book your favorite", desc: "Compare the offers and book when you're ready." }
|
|
32436
|
+
];
|
|
32437
|
+
return /* @__PURE__ */ jsx(FunnelContainer, { children: /* @__PURE__ */ jsx(MainContent, { $fullWidth: true, children: /* @__PURE__ */ jsxs(DoneScreen, { children: [
|
|
32438
|
+
/* @__PURE__ */ jsx(DoneLogoWrapper, { children: /* @__PURE__ */ jsx(Logo, { height: 24 }) }),
|
|
32439
|
+
/* @__PURE__ */ jsxs(DoneBadge, { children: [
|
|
32440
|
+
/* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M20 6L9 17l-5-5" }) }),
|
|
32441
|
+
isGerman ? "Anfrage gesendet" : "Request sent"
|
|
32442
|
+
] }),
|
|
32443
|
+
/* @__PURE__ */ jsx(DoneTitle, { children: isGerman ? `Danke, ${firstName}!` : `Thank you, ${firstName}!` }),
|
|
32444
|
+
/* @__PURE__ */ jsx(DoneSubtitle, { children: isGerman ? "Wir haben deine Anfrage erhalten und stellen jetzt passende Angebote für dich zusammen." : "We have received your request and are now putting together matching offers for you." }),
|
|
32445
|
+
/* @__PURE__ */ jsxs(DoneCard, { children: [
|
|
32446
|
+
/* @__PURE__ */ jsx(DoneStepsTitle, { children: isGerman ? "So geht es weiter" : "What happens next" }),
|
|
32447
|
+
/* @__PURE__ */ jsx(DoneStepsList, { children: doneSteps.map((step2) => /* @__PURE__ */ jsxs(DoneStepItem, { children: [
|
|
32448
|
+
/* @__PURE__ */ jsx(DoneStepNumber, { children: step2.n }),
|
|
32449
|
+
/* @__PURE__ */ jsxs(DoneStepContent, { children: [
|
|
32450
|
+
/* @__PURE__ */ jsx(DoneStepItemTitle, { children: step2.title }),
|
|
32451
|
+
/* @__PURE__ */ jsx(DoneStepItemDesc, { children: step2.desc })
|
|
32452
|
+
] })
|
|
32453
|
+
] }, step2.n)) })
|
|
32454
|
+
] }),
|
|
32455
|
+
/* @__PURE__ */ jsx(DoneEmailNote, { children: isGerman ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32456
|
+
"Eine Bestätigung ist unterwegs an ",
|
|
32457
|
+
/* @__PURE__ */ jsx("strong", { children: email }),
|
|
32458
|
+
"."
|
|
32459
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32460
|
+
"A confirmation is on its way to ",
|
|
32461
|
+
/* @__PURE__ */ jsx("strong", { children: email }),
|
|
32462
|
+
"."
|
|
32463
|
+
] }) }),
|
|
32464
|
+
redirectUrl && /* @__PURE__ */ jsx(DoneCTA, { onClick: () => window.location.href = redirectUrl, children: isGerman ? "Zu meiner Anfrage" : "View my request" })
|
|
32465
|
+
] }) }) });
|
|
32466
|
+
}
|
|
32467
|
+
const currentStep = REDESIGN_STEPS[currentStepId];
|
|
32468
|
+
const stepTitle = isGerman ? currentStep.titleDe : currentStep.titleEn;
|
|
32469
|
+
const stepSubtitle = isGerman ? currentStep.subtitleDe : currentStep.subtitleEn;
|
|
32470
|
+
const totalSteps = getRedesignTotalSteps();
|
|
32471
|
+
const chips = buildSelectionChips();
|
|
32472
|
+
const showBack = currentStepIndex > 0;
|
|
32473
|
+
const showChips = currentStepIndex >= 1 && chips.length > 0;
|
|
32474
|
+
const renderStepContent = () => {
|
|
32475
|
+
switch (currentStepId) {
|
|
32476
|
+
case "redesign_city":
|
|
32477
|
+
return /* @__PURE__ */ jsx(
|
|
32478
|
+
RedesignCityTiles,
|
|
32479
|
+
{
|
|
32480
|
+
selected: answerOf("city"),
|
|
32481
|
+
onSelect: handleCitySelect
|
|
32482
|
+
}
|
|
32483
|
+
);
|
|
32484
|
+
case "redesign_event_type":
|
|
32485
|
+
return /* @__PURE__ */ jsx(
|
|
32486
|
+
EventTypeTiles,
|
|
32487
|
+
{
|
|
32488
|
+
selected: answerOf("event_type"),
|
|
32489
|
+
onSelect: handleEventTypeSelect,
|
|
32490
|
+
variant: "primary"
|
|
32491
|
+
}
|
|
32492
|
+
);
|
|
32493
|
+
case "redesign_date":
|
|
32494
|
+
return /* @__PURE__ */ jsx(
|
|
32495
|
+
SimpleDatePicker,
|
|
32496
|
+
{
|
|
32497
|
+
value: answerOf("event_date"),
|
|
32498
|
+
onChange: handleDateChange,
|
|
32499
|
+
isMultiDay: !!answerOf("is_multi_day"),
|
|
32500
|
+
onMultiDayChange: handleMultiDayChange
|
|
32501
|
+
}
|
|
32502
|
+
);
|
|
32503
|
+
case "redesign_people_count":
|
|
32504
|
+
return /* @__PURE__ */ jsx(
|
|
32505
|
+
BudgetPeopleStep,
|
|
32506
|
+
{
|
|
32507
|
+
peopleCount: answerOf("min_order_number") || 100,
|
|
32508
|
+
budgetPerPerson: budgetPerPerson2,
|
|
32509
|
+
onPeopleCountChange: handlePeopleCountChange2,
|
|
32510
|
+
onBudgetPerPersonChange: handleBudgetPerPersonChange
|
|
32511
|
+
}
|
|
32512
|
+
);
|
|
32513
|
+
default:
|
|
32514
|
+
return null;
|
|
32515
|
+
}
|
|
32516
|
+
};
|
|
32517
|
+
return /* @__PURE__ */ jsxs(FunnelContainer, { children: [
|
|
32518
|
+
/* @__PURE__ */ jsx(StepRail, { currentStepId, onStepClick: goToStep }),
|
|
32519
|
+
/* @__PURE__ */ jsxs(MainContent, { children: [
|
|
32520
|
+
/* @__PURE__ */ jsxs(MobileHeader, { children: [
|
|
32521
|
+
/* @__PURE__ */ jsx(MobileLogoWrapper, { children: /* @__PURE__ */ jsx(Logo, { height: 20 }) }),
|
|
32522
|
+
/* @__PURE__ */ jsxs(MobileStepInfo, { children: [
|
|
32523
|
+
/* @__PURE__ */ jsx(MobileStepCount, { children: isGerman ? `Schritt ${currentStepIndex + 1} von ${totalSteps}` : `Step ${currentStepIndex + 1} of ${totalSteps}` }),
|
|
32524
|
+
/* @__PURE__ */ jsx(MobileCancelButton, { onClick: handleCancel, children: isGerman ? "Abbrechen" : "Cancel" })
|
|
32525
|
+
] }),
|
|
32526
|
+
/* @__PURE__ */ jsx(MobileProgressBar, { children: /* @__PURE__ */ jsx(MobileProgress, { $progress: (currentStepIndex + 1) / totalSteps * 100 }) })
|
|
32527
|
+
] }),
|
|
32528
|
+
/* @__PURE__ */ jsxs(DesktopTopBar, { children: [
|
|
32529
|
+
/* @__PURE__ */ jsx(CancelText, { onClick: handleCancel, children: isGerman ? "Abbrechen" : "Cancel" }),
|
|
32530
|
+
/* @__PURE__ */ jsx(DesktopStepCount, { children: isGerman ? `Schritt ${currentStepIndex + 1} von ${totalSteps}` : `Step ${currentStepIndex + 1} of ${totalSteps}` })
|
|
32531
|
+
] }),
|
|
32532
|
+
/* @__PURE__ */ jsxs(ContentArea, { children: [
|
|
32533
|
+
/* @__PURE__ */ jsx(StepTitle, { children: stepTitle }),
|
|
32534
|
+
stepSubtitle && /* @__PURE__ */ jsx(StepSubtitle, { children: stepSubtitle }),
|
|
32535
|
+
/* @__PURE__ */ jsx(StepContent, { children: renderStepContent() })
|
|
32536
|
+
] }),
|
|
32537
|
+
/* @__PURE__ */ jsxs(FooterBar, { children: [
|
|
32538
|
+
showChips && /* @__PURE__ */ jsxs(ChipRow, { children: [
|
|
32539
|
+
/* @__PURE__ */ jsx(ChipLabel, { children: isGerman ? "Deine Auswahl:" : "Your selection:" }),
|
|
32540
|
+
chips.map((chip, index) => /* @__PURE__ */ jsx(Chip, { children: chip }, index))
|
|
32541
|
+
] }),
|
|
32542
|
+
/* @__PURE__ */ jsxs(TrustText, { children: [
|
|
32543
|
+
/* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M20 6L9 17l-5-5" }) }),
|
|
32544
|
+
isGerman ? "Deine Anfrage ist kostenlos & unverbindlich" : "Your request is free & non-binding"
|
|
32545
|
+
] }),
|
|
32546
|
+
/* @__PURE__ */ jsxs(ButtonRow, { children: [
|
|
32547
|
+
showBack && /* @__PURE__ */ jsx(BackButton, { type: "button", onClick: previousStep, children: isGerman ? "Zurück" : "Back" }),
|
|
32548
|
+
/* @__PURE__ */ jsx(
|
|
32549
|
+
ContinueButton,
|
|
32550
|
+
{
|
|
32551
|
+
type: "button",
|
|
32552
|
+
onClick: nextStep,
|
|
32553
|
+
disabled: !canContinue(),
|
|
32554
|
+
children: isGerman ? "Weiter" : "Continue"
|
|
32555
|
+
}
|
|
32556
|
+
)
|
|
32557
|
+
] })
|
|
32558
|
+
] })
|
|
32559
|
+
] })
|
|
32560
|
+
] });
|
|
32561
|
+
};
|
|
32562
|
+
const fadeIn = keyframes`
|
|
32563
|
+
from { opacity: 0; transform: translateY(8px); }
|
|
32564
|
+
to { opacity: 1; transform: none; }
|
|
32565
|
+
`;
|
|
32566
|
+
const FunnelContainer = styled.div`
|
|
32567
|
+
display: flex;
|
|
32568
|
+
min-height: 100vh;
|
|
32569
|
+
background: ${REDESIGN_COLORS.white};
|
|
32570
|
+
`;
|
|
32571
|
+
const MainContent = styled.div`
|
|
32572
|
+
flex: 1;
|
|
32573
|
+
display: flex;
|
|
32574
|
+
flex-direction: column;
|
|
32575
|
+
min-width: 0;
|
|
32576
|
+
${({ $fullWidth }) => $fullWidth && "width: 100%;"}
|
|
32577
|
+
`;
|
|
32578
|
+
const MobileHeader = styled.div`
|
|
32579
|
+
flex: none;
|
|
32580
|
+
padding: 16px 18px 10px;
|
|
32581
|
+
|
|
32582
|
+
@media (min-width: 960px) {
|
|
32583
|
+
display: none;
|
|
32584
|
+
}
|
|
32585
|
+
`;
|
|
32586
|
+
const MobileLogoWrapper = styled.div`
|
|
32587
|
+
margin-bottom: 12px;
|
|
32588
|
+
`;
|
|
32589
|
+
const MobileStepInfo = styled.div`
|
|
32590
|
+
display: flex;
|
|
32591
|
+
align-items: center;
|
|
32592
|
+
justify-content: space-between;
|
|
32593
|
+
margin-bottom: 12px;
|
|
32594
|
+
`;
|
|
32595
|
+
const MobileStepCount = styled.span`
|
|
32596
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32597
|
+
font-size: 12px;
|
|
32598
|
+
color: ${REDESIGN_COLORS.muted};
|
|
32599
|
+
`;
|
|
32600
|
+
const MobileCancelButton = styled.button`
|
|
32601
|
+
background: none;
|
|
32602
|
+
border: none;
|
|
32603
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32604
|
+
font-size: 12px;
|
|
32605
|
+
color: ${REDESIGN_COLORS.muted};
|
|
32606
|
+
cursor: pointer;
|
|
32607
|
+
padding: 0;
|
|
32608
|
+
`;
|
|
32609
|
+
const MobileProgressBar = styled.div`
|
|
32610
|
+
height: 4px;
|
|
32611
|
+
border-radius: 100px;
|
|
32612
|
+
background: ${REDESIGN_COLORS.progressBg};
|
|
32613
|
+
overflow: hidden;
|
|
32614
|
+
`;
|
|
32615
|
+
const MobileProgress = styled.div`
|
|
32616
|
+
height: 100%;
|
|
32617
|
+
border-radius: 100px;
|
|
32618
|
+
background: ${REDESIGN_COLORS.orange};
|
|
32619
|
+
transition: width 0.3s ease;
|
|
32620
|
+
width: ${({ $progress }) => $progress}%;
|
|
32621
|
+
`;
|
|
32622
|
+
const DesktopTopBar = styled.div`
|
|
32623
|
+
display: none;
|
|
32624
|
+
|
|
32625
|
+
@media (min-width: 960px) {
|
|
32626
|
+
display: flex;
|
|
32627
|
+
justify-content: space-between;
|
|
32628
|
+
align-items: center;
|
|
32629
|
+
padding: 22px 44px;
|
|
32630
|
+
flex: none;
|
|
32631
|
+
}
|
|
32632
|
+
`;
|
|
32633
|
+
const CancelText = styled.span`
|
|
32634
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32635
|
+
font-size: 14px;
|
|
32636
|
+
color: ${REDESIGN_COLORS.muted};
|
|
32637
|
+
cursor: pointer;
|
|
32638
|
+
|
|
32639
|
+
&:hover {
|
|
32640
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
32641
|
+
}
|
|
32642
|
+
`;
|
|
32643
|
+
const DesktopStepCount = styled.span`
|
|
32644
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32645
|
+
font-size: 13px;
|
|
32646
|
+
color: ${REDESIGN_COLORS.muted};
|
|
32647
|
+
`;
|
|
32648
|
+
const ContentArea = styled.div`
|
|
32649
|
+
flex: 1;
|
|
32650
|
+
display: flex;
|
|
32651
|
+
flex-direction: column;
|
|
32652
|
+
align-items: center;
|
|
32653
|
+
justify-content: center;
|
|
32654
|
+
overflow-y: auto;
|
|
32655
|
+
padding: 14px 18px 10px;
|
|
32656
|
+
animation: ${fadeIn} 0.34s cubic-bezier(0.2, 0.8, 0.2, 1) both;
|
|
32657
|
+
|
|
32658
|
+
@media (min-width: 960px) {
|
|
32659
|
+
padding: 40px 44px 20px;
|
|
32660
|
+
}
|
|
32661
|
+
`;
|
|
32662
|
+
const StepTitle = styled.h1`
|
|
32663
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32664
|
+
font-size: 23px;
|
|
32665
|
+
line-height: 1.22;
|
|
32666
|
+
letter-spacing: -0.32px;
|
|
32667
|
+
font-weight: ${REDESIGN_FONTS.weight.medium};
|
|
32668
|
+
text-align: center;
|
|
32669
|
+
margin: 0 0 6px;
|
|
32670
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
32671
|
+
|
|
32672
|
+
@media (min-width: 640px) {
|
|
32673
|
+
font-size: 32px;
|
|
32674
|
+
line-height: 1.2;
|
|
32675
|
+
letter-spacing: -0.32px;
|
|
32676
|
+
}
|
|
32677
|
+
`;
|
|
32678
|
+
const StepSubtitle = styled.p`
|
|
32679
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32680
|
+
font-size: 13.5px;
|
|
32681
|
+
color: #585858;
|
|
32682
|
+
text-align: center;
|
|
32683
|
+
margin: 0 0 20px;
|
|
32684
|
+
max-width: 500px;
|
|
32685
|
+
|
|
32686
|
+
@media (min-width: 640px) {
|
|
32687
|
+
font-size: 15px;
|
|
32688
|
+
margin: 0 0 28px;
|
|
32689
|
+
}
|
|
32690
|
+
`;
|
|
32691
|
+
const StepContent = styled.div`
|
|
32692
|
+
width: 100%;
|
|
32693
|
+
max-width: 800px;
|
|
32694
|
+
margin-top: 24px;
|
|
32695
|
+
display: flex;
|
|
32696
|
+
flex-direction: column;
|
|
32697
|
+
align-items: center;
|
|
32698
|
+
|
|
32699
|
+
@media (min-width: 960px) {
|
|
32700
|
+
margin-top: 32px;
|
|
32701
|
+
}
|
|
32702
|
+
`;
|
|
32703
|
+
const FooterBar = styled.div`
|
|
32704
|
+
position: sticky;
|
|
32705
|
+
bottom: 0;
|
|
32706
|
+
left: 0;
|
|
32707
|
+
right: 0;
|
|
32708
|
+
padding: 12px 18px 16px;
|
|
32709
|
+
display: flex;
|
|
32710
|
+
flex-direction: column;
|
|
32711
|
+
align-items: center;
|
|
32712
|
+
gap: 9px;
|
|
32713
|
+
border-top: 1px solid #f0f0f0;
|
|
32714
|
+
background: ${REDESIGN_COLORS.white};
|
|
32715
|
+
z-index: 10;
|
|
32716
|
+
|
|
32717
|
+
@media (min-width: 960px) {
|
|
32718
|
+
padding: 16px 44px 22px;
|
|
32719
|
+
gap: 12px;
|
|
32720
|
+
}
|
|
32721
|
+
`;
|
|
32722
|
+
const ChipRow = styled.div`
|
|
32723
|
+
display: flex;
|
|
32724
|
+
align-items: center;
|
|
32725
|
+
gap: 6px;
|
|
32726
|
+
flex-wrap: wrap;
|
|
32727
|
+
justify-content: center;
|
|
32728
|
+
|
|
32729
|
+
@media (min-width: 960px) {
|
|
32730
|
+
gap: 8px;
|
|
32731
|
+
}
|
|
32732
|
+
`;
|
|
32733
|
+
const ChipLabel = styled.span`
|
|
32734
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32735
|
+
font-size: 11px;
|
|
32736
|
+
color: #9a9a9a;
|
|
32737
|
+
|
|
32738
|
+
@media (min-width: 640px) {
|
|
32739
|
+
font-size: 13px;
|
|
32740
|
+
}
|
|
32741
|
+
`;
|
|
32742
|
+
const TrustText = styled.div`
|
|
32743
|
+
display: flex;
|
|
32744
|
+
align-items: center;
|
|
32745
|
+
gap: 8px;
|
|
32746
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32747
|
+
font-size: 13px;
|
|
32748
|
+
font-weight: ${REDESIGN_FONTS.weight.medium};
|
|
32749
|
+
color: ${REDESIGN_COLORS.success};
|
|
32750
|
+
`;
|
|
32751
|
+
const Chip = styled.span`
|
|
32752
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32753
|
+
font-size: 13px;
|
|
32754
|
+
font-weight: ${REDESIGN_FONTS.weight.medium};
|
|
32755
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
32756
|
+
background: ${REDESIGN_COLORS.beige};
|
|
32757
|
+
padding: 6px 12px;
|
|
32758
|
+
border-radius: 100px;
|
|
32759
|
+
`;
|
|
32760
|
+
const ButtonRow = styled.div`
|
|
32761
|
+
display: flex;
|
|
32762
|
+
gap: 14px;
|
|
32763
|
+
align-items: center;
|
|
32764
|
+
justify-content: center;
|
|
32765
|
+
`;
|
|
32766
|
+
const BackButton = styled.button`
|
|
32767
|
+
background: ${REDESIGN_COLORS.mainText};
|
|
32768
|
+
color: ${REDESIGN_COLORS.white};
|
|
32769
|
+
padding: 14px 34px;
|
|
32770
|
+
border-radius: 100px;
|
|
32771
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32772
|
+
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
32773
|
+
font-size: 15px;
|
|
32774
|
+
cursor: pointer;
|
|
32775
|
+
border: none;
|
|
32776
|
+
transition: all 0.15s;
|
|
32777
|
+
|
|
32778
|
+
&:hover {
|
|
32779
|
+
background: #1a1e30;
|
|
32780
|
+
}
|
|
32781
|
+
`;
|
|
32782
|
+
const ContinueButton = styled.button`
|
|
32783
|
+
padding: 14px 40px;
|
|
32784
|
+
border-radius: 100px;
|
|
32785
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32786
|
+
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
32787
|
+
font-size: 15px;
|
|
32788
|
+
transition: all 0.15s;
|
|
32789
|
+
border: none;
|
|
32790
|
+
cursor: ${({ disabled }) => disabled ? "not-allowed" : "pointer"};
|
|
32791
|
+
background: ${({ disabled }) => disabled ? REDESIGN_COLORS.disabledOrange : REDESIGN_COLORS.orange};
|
|
32792
|
+
color: ${REDESIGN_COLORS.white};
|
|
32793
|
+
pointer-events: ${({ disabled }) => disabled ? "none" : "auto"};
|
|
32794
|
+
|
|
32795
|
+
&:hover:not(:disabled) {
|
|
32796
|
+
opacity: 0.9;
|
|
32797
|
+
transform: translateY(-1px);
|
|
32798
|
+
}
|
|
32799
|
+
`;
|
|
32800
|
+
const ContactContentArea = styled.div`
|
|
32801
|
+
flex: 1;
|
|
32802
|
+
display: flex;
|
|
32803
|
+
flex-direction: column;
|
|
32804
|
+
align-items: center;
|
|
32805
|
+
min-height: 0;
|
|
32806
|
+
padding: 14px 18px 0;
|
|
32807
|
+
|
|
32808
|
+
@media (min-width: 960px) {
|
|
32809
|
+
padding: 12px 44px 0;
|
|
32810
|
+
}
|
|
32811
|
+
`;
|
|
32812
|
+
const DoneScreen = styled.div`
|
|
32813
|
+
flex: 1;
|
|
32814
|
+
display: flex;
|
|
32815
|
+
flex-direction: column;
|
|
32816
|
+
align-items: center;
|
|
32817
|
+
justify-content: center;
|
|
32818
|
+
padding: 48px 24px;
|
|
32819
|
+
text-align: center;
|
|
32820
|
+
animation: ${fadeIn} 0.34s cubic-bezier(0.2, 0.8, 0.2, 1) both;
|
|
32821
|
+
`;
|
|
32822
|
+
const DoneLogoWrapper = styled.div`
|
|
32823
|
+
margin-bottom: 26px;
|
|
32824
|
+
`;
|
|
32825
|
+
const DoneBadge = styled.div`
|
|
32826
|
+
display: inline-flex;
|
|
32827
|
+
align-items: center;
|
|
32828
|
+
gap: 8px;
|
|
32829
|
+
background: ${REDESIGN_COLORS.successLight};
|
|
32830
|
+
color: ${REDESIGN_COLORS.success};
|
|
32831
|
+
padding: 6px 14px;
|
|
32832
|
+
border-radius: 100px;
|
|
32833
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32834
|
+
font-size: 12.5px;
|
|
32835
|
+
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
32836
|
+
margin-bottom: 14px;
|
|
32837
|
+
`;
|
|
32838
|
+
const DoneTitle = styled.h1`
|
|
32839
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32840
|
+
font-size: 32px;
|
|
32841
|
+
font-weight: ${REDESIGN_FONTS.weight.medium};
|
|
32842
|
+
letter-spacing: -0.32px;
|
|
32843
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
32844
|
+
margin: 0 0 8px;
|
|
32845
|
+
`;
|
|
32846
|
+
const DoneSubtitle = styled.p`
|
|
32847
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32848
|
+
color: ${REDESIGN_COLORS.secondaryText};
|
|
32849
|
+
font-size: 15px;
|
|
32850
|
+
margin: 0 0 30px;
|
|
32851
|
+
max-width: 500px;
|
|
32852
|
+
`;
|
|
32853
|
+
const DoneCard = styled.div`
|
|
32854
|
+
width: 100%;
|
|
32855
|
+
max-width: 560px;
|
|
32856
|
+
background: ${REDESIGN_COLORS.beige};
|
|
32857
|
+
border-radius: 32px;
|
|
32858
|
+
padding: 24px 28px;
|
|
32859
|
+
margin-bottom: 28px;
|
|
32860
|
+
text-align: left;
|
|
32861
|
+
`;
|
|
32862
|
+
const DoneStepsTitle = styled.div`
|
|
32863
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32864
|
+
font-size: 11px;
|
|
32865
|
+
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
32866
|
+
letter-spacing: 0.06em;
|
|
32867
|
+
text-transform: uppercase;
|
|
32868
|
+
color: ${REDESIGN_COLORS.orange};
|
|
32869
|
+
margin-bottom: 16px;
|
|
32870
|
+
`;
|
|
32871
|
+
const DoneStepsList = styled.div`
|
|
32872
|
+
display: flex;
|
|
32873
|
+
flex-direction: column;
|
|
32874
|
+
gap: 16px;
|
|
32875
|
+
`;
|
|
32876
|
+
const DoneStepItem = styled.div`
|
|
32877
|
+
display: flex;
|
|
32878
|
+
gap: 13px;
|
|
32879
|
+
align-items: flex-start;
|
|
32880
|
+
`;
|
|
32881
|
+
const DoneStepNumber = styled.div`
|
|
32882
|
+
flex: none;
|
|
32883
|
+
width: 24px;
|
|
32884
|
+
height: 24px;
|
|
32885
|
+
border-radius: 50%;
|
|
32886
|
+
background: ${REDESIGN_COLORS.white};
|
|
32887
|
+
color: ${REDESIGN_COLORS.orange};
|
|
32888
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32889
|
+
font-size: 12px;
|
|
32890
|
+
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
32891
|
+
display: flex;
|
|
32892
|
+
align-items: center;
|
|
32893
|
+
justify-content: center;
|
|
32894
|
+
`;
|
|
32895
|
+
const DoneStepContent = styled.div``;
|
|
32896
|
+
const DoneStepItemTitle = styled.div`
|
|
32897
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32898
|
+
font-size: 14px;
|
|
32899
|
+
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
32900
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
32901
|
+
line-height: 1.35;
|
|
32902
|
+
`;
|
|
32903
|
+
const DoneStepItemDesc = styled.div`
|
|
32904
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32905
|
+
font-size: 12.5px;
|
|
32906
|
+
color: #8a8580;
|
|
32907
|
+
line-height: 1.45;
|
|
32908
|
+
margin-top: 2px;
|
|
32909
|
+
`;
|
|
32910
|
+
const DoneEmailNote = styled.p`
|
|
32911
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32912
|
+
font-size: 13px;
|
|
32913
|
+
color: ${REDESIGN_COLORS.muted};
|
|
32914
|
+
margin: 0 0 22px;
|
|
32915
|
+
max-width: 460px;
|
|
32916
|
+
|
|
32917
|
+
strong {
|
|
32918
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
32919
|
+
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
32920
|
+
}
|
|
32921
|
+
`;
|
|
32922
|
+
const DoneCTA = styled.span`
|
|
32923
|
+
background: ${REDESIGN_COLORS.orange};
|
|
32924
|
+
color: ${REDESIGN_COLORS.white};
|
|
32925
|
+
padding: 13px 30px;
|
|
32926
|
+
border-radius: 100px;
|
|
32927
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32928
|
+
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
32929
|
+
font-size: 15px;
|
|
32930
|
+
cursor: pointer;
|
|
32931
|
+
transition: all 0.15s;
|
|
32932
|
+
|
|
32933
|
+
&:hover {
|
|
32934
|
+
opacity: 0.9;
|
|
32935
|
+
}
|
|
32936
|
+
`;
|
|
32937
|
+
function useAbandonmentTracking(funnelContextRef, state) {
|
|
32938
|
+
const hasTrackedAbandonmentRef = useRef(false);
|
|
32939
|
+
const hasCompletedRef = useRef(false);
|
|
32940
|
+
useEffect(() => {
|
|
32941
|
+
if (state.status === QUALIFICATION_STATUS.answered || state.status === QUALIFICATION_STATUS.qualifiedForRequest || state.status === QUALIFICATION_STATUS.qualifiedForMarketplace || state.status === QUALIFICATION_STATUS.qualifiedForCate) {
|
|
32942
|
+
hasCompletedRef.current = true;
|
|
32943
|
+
return;
|
|
32944
|
+
}
|
|
32945
|
+
if (state.status !== QUALIFICATION_STATUS.answering) {
|
|
32946
|
+
hasTrackedAbandonmentRef.current = false;
|
|
32947
|
+
return;
|
|
32948
|
+
}
|
|
32949
|
+
if (!("qualification" in state)) return;
|
|
32950
|
+
const stateSnapshot = {
|
|
32951
|
+
stepId: state.qualification.step.id,
|
|
32952
|
+
stepIndex: state.qualification.stepIndex
|
|
32953
|
+
};
|
|
32954
|
+
const handleAbandonment = () => {
|
|
32955
|
+
if (hasTrackedAbandonmentRef.current) return;
|
|
32956
|
+
if (hasCompletedRef.current) return;
|
|
32957
|
+
trackAbandoned(funnelContextRef.current, {
|
|
32958
|
+
step_id: stateSnapshot.stepId,
|
|
32959
|
+
step_index: stateSnapshot.stepIndex
|
|
32960
|
+
});
|
|
32961
|
+
hasTrackedAbandonmentRef.current = true;
|
|
32962
|
+
};
|
|
32963
|
+
let invisibilityTimeout;
|
|
32964
|
+
const handleVisibilityChange2 = () => {
|
|
32965
|
+
if (document.hidden) {
|
|
32966
|
+
invisibilityTimeout = setTimeout(handleAbandonment, 3e3);
|
|
32967
|
+
} else {
|
|
32968
|
+
clearTimeout(invisibilityTimeout);
|
|
32969
|
+
}
|
|
32970
|
+
};
|
|
32971
|
+
document.addEventListener("visibilitychange", handleVisibilityChange2);
|
|
32972
|
+
return () => {
|
|
32973
|
+
document.removeEventListener("visibilitychange", handleVisibilityChange2);
|
|
32974
|
+
clearTimeout(invisibilityTimeout);
|
|
32975
|
+
};
|
|
32976
|
+
}, [
|
|
32977
|
+
state.status,
|
|
32978
|
+
"qualification" in state && "step" in state.qualification ? state.qualification.step.id : null
|
|
32979
|
+
]);
|
|
32980
|
+
}
|
|
32981
|
+
const FEATURE_FLAG_NAME = "qf_redesign_v1";
|
|
32982
|
+
function useFunnelVariant() {
|
|
32983
|
+
const forceRedesign = typeof window !== "undefined" && window.location.search.includes("variant=redesign");
|
|
32984
|
+
const [variant, setVariant] = useState(forceRedesign ? "redesign" : "control");
|
|
32985
|
+
useEffect(() => {
|
|
32986
|
+
if (forceRedesign) {
|
|
32987
|
+
setVariant("redesign");
|
|
32988
|
+
return;
|
|
32989
|
+
}
|
|
32990
|
+
if (typeof window === "undefined" || !window.posthog) {
|
|
32991
|
+
return;
|
|
32992
|
+
}
|
|
32993
|
+
const posthog = window.posthog;
|
|
32994
|
+
const checkFlag = () => {
|
|
32995
|
+
var _a2;
|
|
32996
|
+
const flagValue = (_a2 = posthog.getFeatureFlag) == null ? void 0 : _a2.call(posthog, FEATURE_FLAG_NAME);
|
|
32997
|
+
if (flagValue === "redesign") {
|
|
32998
|
+
setVariant("redesign");
|
|
32999
|
+
} else {
|
|
33000
|
+
setVariant("control");
|
|
33001
|
+
}
|
|
33002
|
+
};
|
|
33003
|
+
checkFlag();
|
|
33004
|
+
if (posthog.onFeatureFlags) {
|
|
33005
|
+
posthog.onFeatureFlags(checkFlag);
|
|
33006
|
+
}
|
|
33007
|
+
}, [forceRedesign]);
|
|
33008
|
+
return variant;
|
|
33009
|
+
}
|
|
33010
|
+
const EmbeddedFunnel = React__default.forwardRef(
|
|
33011
|
+
({
|
|
33012
|
+
onBackground,
|
|
33013
|
+
highlightColor,
|
|
33014
|
+
ratings,
|
|
33015
|
+
slides,
|
|
33016
|
+
renderTitle,
|
|
33017
|
+
titleTranslationKeys,
|
|
33018
|
+
LayoutComponent = EmbeddedQuestionLayout,
|
|
33019
|
+
mode = "embedded",
|
|
33020
|
+
onCancel
|
|
33021
|
+
}, ref2) => {
|
|
33022
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
33023
|
+
const scrollHelperRef = useRef(null);
|
|
33024
|
+
const funnelVariant = useFunnelVariant();
|
|
33025
|
+
const { state, actions, canContinue } = useQualification({});
|
|
33026
|
+
const funnelContext = useRef({
|
|
33027
|
+
session_id: "",
|
|
33028
|
+
funnel_mode: mode,
|
|
33029
|
+
service_type: "",
|
|
33030
|
+
total_steps: 0,
|
|
33031
|
+
funnel_variant: funnelVariant
|
|
33032
|
+
});
|
|
33033
|
+
const updateContext = useCallback((patch) => {
|
|
33034
|
+
funnelContext.current = { ...funnelContext.current, ...patch };
|
|
33035
|
+
if (typeof sessionStorage !== "undefined" && funnelContext.current.session_id) {
|
|
33036
|
+
try {
|
|
33037
|
+
sessionStorage.setItem(
|
|
33038
|
+
`funnel_context_${funnelContext.current.session_id}`,
|
|
33039
|
+
JSON.stringify(funnelContext.current)
|
|
33040
|
+
);
|
|
33041
|
+
} catch (e2) {
|
|
33042
|
+
}
|
|
33043
|
+
}
|
|
33044
|
+
}, []);
|
|
33045
|
+
useEffect(() => {
|
|
33046
|
+
cleanupOldTrackingSessions();
|
|
33047
|
+
}, []);
|
|
33048
|
+
useEffect(() => {
|
|
33049
|
+
if (funnelVariant) {
|
|
33050
|
+
updateContext({ funnel_variant: funnelVariant });
|
|
33051
|
+
}
|
|
33052
|
+
}, [funnelVariant, updateContext]);
|
|
33053
|
+
useLayoutEffect(() => {
|
|
33054
|
+
var _a3, _b2, _c2;
|
|
30217
33055
|
if (!("qualification" in state)) return;
|
|
30218
33056
|
const sessionId = ((_a3 = state.qualification.sessionInfo) == null ? void 0 : _a3.sessionId) || "";
|
|
30219
33057
|
const totalSteps = state.qualification.steps.filter((s3) => !s3.disabled).length;
|
|
@@ -30283,6 +33121,19 @@ const EmbeddedFunnel = React__default.forwardRef(
|
|
|
30283
33121
|
if (state.status !== QUALIFICATION_STATUS.answered && state.status !== QUALIFICATION_STATUS.answering && state.status !== QUALIFICATION_STATUS.qualifiedForRequest) {
|
|
30284
33122
|
return null;
|
|
30285
33123
|
}
|
|
33124
|
+
const isFullscreen = mode === "fullscreen";
|
|
33125
|
+
const shouldUseRedesign = isFullscreen && funnelVariant === "redesign";
|
|
33126
|
+
if (shouldUseRedesign) {
|
|
33127
|
+
return /* @__PURE__ */ jsx(
|
|
33128
|
+
RedesignedFunnel,
|
|
33129
|
+
{
|
|
33130
|
+
ratings,
|
|
33131
|
+
onCancel,
|
|
33132
|
+
funnelContextRef: funnelContext,
|
|
33133
|
+
updateContext
|
|
33134
|
+
}
|
|
33135
|
+
);
|
|
33136
|
+
}
|
|
30286
33137
|
const stepId = state.status === "answering" && ((_d = state.qualification.step) == null ? void 0 : _d.id) || "";
|
|
30287
33138
|
const onKeyPress = (event) => {
|
|
30288
33139
|
if (event.key === "Enter" && canContinue) {
|
|
@@ -30320,7 +33171,6 @@ const EmbeddedFunnel = React__default.forwardRef(
|
|
|
30320
33171
|
if (stepId === "event_date" && ((_j = slides == null ? void 0 : slides.dateAndLead) == null ? void 0 : _j.whiteWrapper)) {
|
|
30321
33172
|
textColor = "dark";
|
|
30322
33173
|
}
|
|
30323
|
-
const isFullscreen = mode === "fullscreen";
|
|
30324
33174
|
const enabledSteps = state.qualification.steps.filter((q2) => !q2.disabled);
|
|
30325
33175
|
const handleCancel = onCancel || (() => window.history.back());
|
|
30326
33176
|
return /* @__PURE__ */ jsxs(
|