PageSourceSearch

https://diks.net/_next/static/chunks/1208caqae7u9f.js

js diks.net collected 2026-09-24 10:27:41 UTC 75,256 bytes, 1,551 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="5081701c-2da7-81aa-c8ef-ba9272ad9c72")}catch(e){}}();
2(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined,
3733686, 95044, 
4((__turbopack_context__) => {
5"use strict";
6
7// MERGED MODULE: [project]/src/generated/order/reactQueries.tsx [app-client] (ecmascript)
8;
9var __TURBOPACK__imported__module__954616__ = __turbopack_context__.i(954616);
10var __TURBOPACK__imported__module__266027__ = __turbopack_context__.i(266027);
11var __TURBOPACK__imported__module__912598__ = __turbopack_context__.i(912598);
12var __TURBOPACK__imported__module__197643__ = __turbopack_context__.i(197643);
13// MERGED MODULE: [project]/src/generated/order/apiClient.ts [app-client] (ecmascript)
14;
15async function apiOrderAdd(axiosInstance, body, requestConfig) {
16    const response = await axiosInstance.request({
17        url: "order/line",
18        method: "POST",
19        data: body,
20        ...requestConfig
21    });
22    return response.data;
23}
24async function apiOrderDeviatingLocation(axiosInstance, body, requestConfig) {
25    const response = await axiosInstance.request({
26        url: "order/deviating-location",
27        method: "POST",
28        data: body,
29        ...requestConfig
30    });
31    return response.data;
32}
33async function apiOrderDiscountApply(axiosInstance, body, requestConfig) {
34    const response = await axiosInstance.request({
35        url: "order/discount",
36        method: "POST",
37        data: body,
38        ...requestConfig
39    });
40    return response.data;
41}
42async function apiOrderDiscountRemove(axiosInstance, requestConfig) {
43    const response = await axiosInstance.request({
44        url: "order/discount",
45        method: "DELETE",
46        ...requestConfig
47    });
48    return response.data;
49}
50async function apiOrderOverview(axiosInstance, body, requestConfig) {
51    const response = await axiosInstance.request({
52        url: "order/",
53        method: "POST",
54        data: body,
55        ...requestConfig
56    });
57    return response.data;
58}
59async function apiOrderOverviewCount(axiosInstance, requestConfig) {
60    const response = await axiosInstance.request({
61        url: "order/overview/count",
62        method: "GET",
63        ...requestConfig
64    });
65    return response.data;
66}
67async function apiOrderRemove(axiosInstance, params, requestConfig) {
68    const response = await axiosInstance.request({
69        url: "order/line/".concat(params.lineId),
70        method: "DELETE",
71        ...requestConfig
72    });
73    return response.data;
74}
75async function apiOrderSingle(axiosInstance, params, requestConfig) {
76    const response = await axiosInstance.request({
77        url: "order/line/".concat(params.lineId),
78        method: "GET",
79        ...requestConfig
80    });
81    return response.data;
82}
83async function apiOrderUpdate(axiosInstance, params, body, requestConfig) {
84    const response = await axiosInstance.request({
85        url: "order/line/".concat(params.lineId),
86        method: "PUT",
87        data: body,
88        ...requestConfig
89    });
90    return response.data;
91}
92__turbopack_context__.s([
93    "apiOrderAdd",
94    0,
95    apiOrderAdd,
96    "apiOrderDeviatingLocation",
97    0,
98    apiOrderDeviatingLocation,
99    "apiOrderDiscountApply",
100    0,
101    apiOrderDiscountApply,
102    "apiOrderDiscountRemove",
103    0,
104    apiOrderDiscountRemove,
105    "apiOrderOverview",
106    0,
107    apiOrderOverview,
108    "apiOrderOverviewCount",
109    0,
110    apiOrderOverviewCount,
111    "apiOrderRemove",
112    0,
113    apiOrderRemove,
114    "apiOrderSingle",
115    0,
116    apiOrderSingle,
117    "apiOrderUpdate",
118    0,
119    apiOrderUpdate
120], 95044);
121;
122;
123;
124function useOrderAdd() {
125    let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, hookOptions = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
126    const axiosInstance = (0, __TURBOPACK__imported__module__197643__["useApi"])();
127    const queryClient = (0, __TURBOPACK__imported__module__912598__["useQueryClient"])();
128    if (hookOptions.invalidateQueries) {
129        const originalOnSuccess = options.onSuccess;
130        options.onSuccess = async function(data, variables) {
131            for(var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++){
132                args[_key - 2] = arguments[_key];
133            }
134            queryClient.invalidateQueries({
135                queryKey: [
136                    "order"
137                ]
138            });
139            if (typeof originalOnSuccess === "function") {
140                return await originalOnSuccess(data, variables, ...args);
141            }
142        };
143    }
144    return (0, __TURBOPACK__imported__module__954616__["useMutation"])({
145        mutationFn: (variables)=>apiOrderAdd(axiosInstance, {
146                categoryId: variables["categoryId"],
147                datePickup: variables["datePickup"],
148                dateReturn: variables["dateReturn"],
149                locationPickup: variables["locationPickup"],
150                locationReturn: variables["locationReturn"],
151                expectedKilometers: variables["expectedKilometers"],
152                extraDriverCount: variables["extraDriverCount"],
153                extraYoungDriverCount: variables["extraYoungDriverCount"],
154                insuranceProfileOptionId: variables["insuranceProfileOptionId"],
155                abroadOptionId: variables["abroadOptionId"],
156                selectedAddons: variables["selectedAddons"],
157                referenceText: variables["referenceText"],
158                quantity: variables["quantity"]
159            }, variables === null || variables === void 0 ? void 0 : variables.requestConfig),
160        ...options
161    });
162}
163function useOrderDeviatingLocation() {
164    let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, hookOptions = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
165    const axiosInstance = (0, __TURBOPACK__imported__module__197643__["useApi"])();
166    const queryClient = (0, __TURBOPACK__imported__module__912598__["useQueryClient"])();
167    if (hookOptions.invalidateQueries) {
168        const originalOnSuccess = options.onSuccess;
169        options.onSuccess = async function(data, variables) {
170            for(var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++){
171                args[_key - 2] = arguments[_key];
172            }
173            queryClient.invalidateQueries({
174                queryKey: [
175                    "order"
176                ]
177            });
178            if (typeof originalOnSuccess === "function") {
179                return await originalOnSuccess(data, variables, ...args);
180            }
181        };
182    }
183    return (0, __TURBOPACK__imported__module__954616__["useMutation"])({
184        mutationFn: (variables)=>apiOrderDeviatingLocation(axiosInstance, {
185                pickupLocation: variables["pickupLocation"],
186                returnLocation: variables["returnLocation"]
187            }, variables === null || variables === void 0 ? void 0 : variables.requestConfig),
188        ...options
189    });
190}
191function useOrderDiscountApply() {
192    let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, hookOptions = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
193    const axiosInstance = (0, __TURBOPACK__imported__module__197643__["useApi"])();
194    const queryClient = (0, __TURBOPACK__imported__module__912598__["useQueryClient"])();
195    if (hookOptions.invalidateQueries) {
196        const originalOnSuccess = options.onSuccess;
197        options.onSuccess = async function(data, variables) {
198            for(var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++){
199                args[_key - 2] = arguments[_key];
200            }
201            queryClient.invalidateQueries({
202                queryKey: [
203                    "order"
204                ]
205            });
206            if (typeof originalOnSuccess === "function") {
207                return await originalOnSuccess(data, variables, ...args);
208            }
209        };
210    }
211    return (0, __TURBOPACK__imported__module__954616__["useMutation"])({
212        mutationFn: (variables)=>apiOrderDiscountApply(axiosInstance, {
213                discountCode: variables["discountCode"]
214            }, variables === null || variables === void 0 ? void 0 : variables.requestConfig),
215        ...options
216    });
217}
218function useOrderDiscountRemove() {
219    let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, hookOptions = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
220    const axiosInstance = (0, __TURBOPACK__imported__module__197643__["useApi"])();
221    const queryClient = (0, __TURBOPACK__imported__module__912598__["useQueryClient"])();
222    if (hookOptions.invalidateQueries) {
223        const originalOnSuccess = options.onSuccess;
224        options.onSuccess = async function(data, variables) {
225            for(var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++){
226                args[_key - 2] = arguments[_key];
227            }
228            queryClient.invalidateQueries({
229                queryKey: [
230                    "order"
231                ]
232            });
233            if (typeof originalOnSuccess === "function") {
234                return await originalOnSuccess(data, variables, ...args);
235            }
236        };
237    }
238    return (0, __TURBOPACK__imported__module__954616__["useMutation"])({
239        mutationFn: (variables)=>apiOrderDiscountRemove(axiosInstance, variables === null || variables === void 0 ? void 0 : variables.requestConfig),
240        ...options
241    });
242}
243function useOrderOverview(opts) {
244    var _ref;
245    const axiosInstance = (0, __TURBOPACK__imported__module__197643__["useApi"])();
246    const options = (_ref = opts === null || opts === void 0 ? void 0 : opts.queryOptions) !== null && _ref !== void 0 ? _ref : {};
247    options.enabled = options.enabled === true || options.enabled !== false && opts["locale"] !== undefined && opts["locale"] !== null;
248    return (0, __TURBOPACK__imported__module__266027__["useQuery"])({
249        queryKey: useOrderOverview.queryKey(opts),
250        queryFn: (param)=>{
251            let { signal } = param;
252            var _opts, _requestConfig;
253            if (opts["locale"] === undefined || opts["locale"] === null) {
254                throw new Error("Not all required variables where provided to 'useOrderOverview'. This happens when you manually set 'queryOptions.enabled' or when you use 'refetch'. Both skip the generated 'queryOptions.enabled'. Make sure that all necessary arguments are set.");
255            }
256            (_requestConfig = (_opts = opts).requestConfig) !== null && _requestConfig !== void 0 ? _requestConfig : _opts.requestConfig = {};
257            opts.requestConfig.signal = signal;
258            return apiOrderOverview(axiosInstance, {
259                locale: opts["locale"]
260            }, opts === null || opts === void 0 ? void 0 : opts.requestConfig);
261        },
262        ...options
263    });
264}
265/**
266 * Base key used by useOrderOverview.queryKey()
267 */ useOrderOverview.baseKey = ()=>[
268        "order",
269        "overview"
270    ];
271/**
272 * Query key used by useOrderOverview
273 */ useOrderOverview.queryKey = (opts)=>[
274        ...useOrderOverview.baseKey(),
275        {
276            locale: opts["locale"]
277        }
278    ];
279/**
280 * Fetch useOrderOverview via the queryClient and return the result
281 */ useOrderOverview.fetch = (queryClient, axiosInstance, opts)=>{
282    return queryClient.fetchQuery({
283        queryKey: useOrderOverview.queryKey(opts),
284        queryFn: ()=>{
285            if (opts["locale"] === undefined || opts["locale"] === null) {
286                throw new Error("Not all required variables where provided to 'useOrderOverview.fetchQuery'. This happens when you manually set 'queryOptions.enabled' or when you use 'refetch'. Both skip the generated 'queryOptions.enabled'. Make sure that all necessary arguments are set.");
287            }
288            return apiOrderOverview(axiosInstance, {
289                locale: opts["locale"]
290            }, opts === null || opts === void 0 ? void 0 : opts.requestConfig);
291        }
292    });
293};
294/**
295 * Prefetch useOrderOverview via the queryClient
296 */ useOrderOverview.prefetch = (queryClient, axiosInstance, opts)=>{
297    return queryClient.prefetchQuery({
298        queryKey: useOrderOverview.queryKey(opts),
299        queryFn: ()=>{
300            if (opts["locale"] === undefined || opts["locale"] === null) {
301                throw new Error("Not all required variables where provided to 'useOrderOverview.prefetchQuery'. This happens when you manually set 'queryOptions.enabled' or when you use 'refetch'. Both skip the generated 'queryOptions.enabled'. Make sure that all necessary arguments are set.");
302            }
303            return apiOrderOverview(axiosInstance, {
304                locale: opts["locale"]
305            }, opts === null || opts === void 0 ? void 0 : opts.requestConfig);
306        }
307    });
308};
309/**
310 * Invalidate useOrderOverview via the queryClient
311 */ useOrderOverview.invalidate = (queryClient, opts)=>queryClient.invalidateQueries({
312        queryKey: useOrderOverview.queryKey(opts)
313    });
314/**
315 * Set query data for useOrderOverview via the queryClient
316 */ useOrderOverview.setQueryData = (queryClient, opts, data)=>{
317    if (opts["locale"] === undefined || opts["locale"] === null) {
318        throw new Error("Not all required variables where provided to 'useOrderOverview.setQueryData'. This happens when you manually set 'queryOptions.enabled' or when you use 'refetch'. Both skip the generated 'queryOptions.enabled'. Make sure that all necessary arguments are set.");
319    }
320    return queryClient.setQueryData(useOrderOverview.queryKey(opts), data);
321};
322function useOrderOverviewCount() {
323    let opts = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
324    var _ref;
325    const axiosInstance = (0, __TURBOPACK__imported__module__197643__["useApi"])();
326    const options = (_ref = opts === null || opts === void 0 ? void 0 : opts.queryOptions) !== null && _ref !== void 0 ? _ref : {};
327    return (0, __TURBOPACK__imported__module__266027__["useQuery"])({
328        queryKey: useOrderOverviewCount.queryKey(),
329        queryFn: (param)=>{
330            let { signal } = param;
331            var _opts, _requestConfig;
332            (_requestConfig = (_opts = opts).requestConfig) !== null && _requestConfig !== void 0 ? _requestConfig : _opts.requestConfig = {};
333            opts.requestConfig.signal = signal;
334            return apiOrderOverviewCount(axiosInstance, opts === null || opts === void 0 ? void 0 : opts.requestConfig);
335        },
336        ...options
337    });
338}
339/**
340 * Base key used by useOrderOverviewCount.queryKey()
341 */ useOrderOverviewCount.baseKey = ()=>[
342        "order",
343        "overviewCount"
344    ];
345/**
346 * Query key used by useOrderOverviewCount
347 */ useOrderOverviewCount.queryKey = ()=>[
348        ...useOrderOverviewCount.baseKey()
349    ];
350/**
351 * Fetch useOrderOverviewCount via the queryClient and return the result
352 */ useOrderOverviewCount.fetch = (queryClient, axiosInstance, opts)=>{
353    return queryClient.fetchQuery({
354        queryKey: useOrderOverviewCount.queryKey(),
355        queryFn: ()=>{
356            return apiOrderOverviewCount(axiosInstance, opts === null || opts === void 0 ? void 0 : opts.requestConfig);
357        }
358    });
359};
360/**
361 * Prefetch useOrderOverviewCount via the queryClient
362 */ useOrderOverviewCount.prefetch = (queryClient, axiosInstance, opts)=>{
363    return queryClient.prefetchQuery({
364        queryKey: useOrderOverviewCount.queryKey(),
365        queryFn: ()=>{
366            return apiOrderOverviewCount(axiosInstance, opts === null || opts === void 0 ? void 0 : opts.requestConfig);
367        }
368    });
369};
370/**
371 * Invalidate useOrderOverviewCount via the queryClient
372 */ useOrderOverviewCount.invalidate = (queryClient)=>queryClient.invalidateQueries({
373        queryKey: useOrderOverviewCount.queryKey()
374    });
375/**
376 * Set query data for useOrderOverviewCount via the queryClient
377 */ useOrderOverviewCount.setQueryData = (queryClient, data)=>{
378    return queryClient.setQueryData(useOrderOverviewCount.queryKey(), data);
379};
380function useOrderRemove() {
381    let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, hookOptions = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
382    const axiosInstance = (0, __TURBOPACK__imported__module__197643__["useApi"])();
383    const queryClient = (0, __TURBOPACK__imported__module__912598__["useQueryClient"])();
384    if (hookOptions.invalidateQueries) {
385        const originalOnSuccess = options.onSuccess;
386        options.onSuccess = async function(data, variables) {
387            for(var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++){
388                args[_key - 2] = arguments[_key];
389            }
390            queryClient.invalidateQueries({
391                queryKey: [
392                    "order"
393                ]
394            });
395            if (typeof originalOnSuccess === "function") {
396                return await originalOnSuccess(data, variables, ...args);
397            }
398        };
399    }
400    return (0, __TURBOPACK__imported__module__954616__["useMutation"])({
401        mutationFn: (variables)=>apiOrderRemove(axiosInstance, {
402                lineId: variables["lineId"]
403            }, variables === null || variables === void 0 ? void 0 : variables.requestConfig),
404        ...options
405    });
406}
407function useOrderSingle(opts) {
408    var _ref;
409    const axiosInstance = (0, __TURBOPACK__imported__module__197643__["useApi"])();
410    const options = (_ref = opts === null || opts === void 0 ? void 0 : opts.queryOptions) !== null && _ref !== void 0 ? _ref : {};
411    options.enabled = options.enabled === true || options.enabled !== false && opts["lineId"] !== undefined && opts["lineId"] !== null;
412    return (0, __TURBOPACK__imported__module__266027__["useQuery"])({
413        queryKey: useOrderSingle.queryKey(opts),
414        queryFn: (param)=>{
415            let { signal } = param;
416            var _opts, _requestConfig;
417            if (opts["lineId"] === undefined || opts["lineId"] === null) {
418                throw new Error("Not all required variables where provided to 'useOrderSingle'. This happens when you manually set 'queryOptions.enabled' or when you use 'refetch'. Both skip the generated 'queryOptions.enabled'. Make sure that all necessary arguments are set.");
419            }
420            (_requestConfig = (_opts = opts).requestConfig) !== null && _requestConfig !== void 0 ? _requestConfig : _opts.requestConfig = {};
421            opts.requestConfig.signal = signal;
422            return apiOrderSingle(axiosInstance, {
423                lineId: opts["lineId"]
424            }, opts === null || opts === void 0 ? void 0 : opts.requestConfig);
425        },
426        ...options
427    });
428}
429/**
430 * Base key used by useOrderSingle.queryKey()
431 */ useOrderSingle.baseKey = ()=>[
432        "order",
433        "single"
434    ];
435/**
436 * Query key used by useOrderSingle
437 */ useOrderSingle.queryKey = (opts)=>[
438        ...useOrderSingle.baseKey(),
439        {
440            lineId: opts["lineId"]
441        }
442    ];
443/**
444 * Fetch useOrderSingle via the queryClient and return the result
445 */ useOrderSingle.fetch = (queryClient, axiosInstance, opts)=>{
446    return queryClient.fetchQuery({
447        queryKey: useOrderSingle.queryKey(opts),
448        queryFn: ()=>{
449            if (opts["lineId"] === undefined || opts["lineId"] === null) {
450                throw new Error("Not all required variables where provided to 'useOrderSingle.fetchQuery'. This happens when you manually set 'queryOptions.enabled' or when you use 'refetch'. Both skip the generated 'queryOptions.enabled'. Make sure that all necessary arguments are set.");
451            }
452            return apiOrderSingle(axiosInstance, {
453                lineId: opts["lineId"]
454            }, opts === null || opts === void 0 ? void 0 : opts.requestConfig);
455        }
456    });
457};
458/**
459 * Prefetch useOrderSingle via the queryClient
460 */ useOrderSingle.prefetch = (queryClient, axiosInstance, opts)=>{
461    return queryClient.prefetchQuery({
462        queryKey: useOrderSingle.queryKey(opts),
463        queryFn: ()=>{
464            if (opts["lineId"] === undefined || opts["lineId"] === null) {
465                throw new Error("Not all required variables where provided to 'useOrderSingle.prefetchQuery'. This happens when you manually set 'queryOptions.enabled' or when you use 'refetch'. Both skip the generated 'queryOptions.enabled'. Make sure that all necessary arguments are set.");
466            }
467            return apiOrderSingle(axiosInstance, {
468                lineId: opts["lineId"]
469            }, opts === null || opts === void 0 ? void 0 : opts.requestConfig);
470        }
471    });
472};
473/**
474 * Invalidate useOrderSingle via the queryClient
475 */ useOrderSingle.invalidate = (queryClient, opts)=>queryClient.invalidateQueries({
476        queryKey: useOrderSingle.queryKey(opts)
477    });
478/**
479 * Set query data for useOrderSingle via the queryClient
480 */ useOrderSingle.setQueryData = (queryClient, opts, data)=>{
481    if (opts["lineId"] === undefined || opts["lineId"] === null) {
482        throw new Error("Not all required variables where provided to 'useOrderSingle.setQueryData'. This happens when you manually set 'queryOptions.enabled' or when you use 'refetch'. Both skip the generated 'queryOptions.enabled'. Make sure that all necessary arguments are set.");
483    }
484    return queryClient.setQueryData(useOrderSingle.queryKey(opts), data);
485};
486function useOrderUpdate() {
487    let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, hookOptions = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
488    const axiosInstance = (0, __TURBOPACK__imported__module__197643__["useApi"])();
489    const queryClient = (0, __TURBOPACK__imported__module__912598__["useQueryClient"])();
490    if (hookOptions.invalidateQueries) {
491        const originalOnSuccess = options.onSuccess;
492        options.onSuccess = async function(data, variables) {
493            for(var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++){
494                args[_key - 2] = arguments[_key];
495            }
496            queryClient.invalidateQueries({
497                queryKey: [
498                    "order"
499                ]
500            });
501            if (typeof originalOnSuccess === "function") {
502                return await originalOnSuccess(data, variables, ...args);
503            }
504        };
505    }
506    return (0, __TURBOPACK__imported__module__954616__["useMutation"])({
507        mutationFn: (variables)=>apiOrderUpdate(axiosInstance, {
508                lineId: variables["lineId"]
509            }, {
510                categoryId: variables["categoryId"],
511                datePickup: variables["datePickup"],
512                dateReturn: variables["dateReturn"],
513                locationPickup: variables["locationPickup"],
514                locationReturn: variables["locationReturn"],
515                expectedKilometers: variables["expectedKilometers"],
516                extraDriverCount: variables["extraDriverCount"],
517                extraYoungDriverCount: variables["extraYoungDriverCount"],
518                insuranceProfileOptionId: variables["insuranceProfileOptionId"],
519                abroadOptionId: variables["abroadOptionId"],
520                selectedAddons: variables["selectedAddons"],
521                referenceText: variables["referenceText"],
522                quantity: variables["quantity"]
523            }, variables === null || variables === void 0 ? void 0 : variables.requestConfig),
524        ...options
525    });
526}
527__turbopack_context__.s([
528    "useOrderAdd",
529    0,
530    useOrderAdd,
531    "useOrderDeviatingLocation",
532    0,
533    useOrderDeviatingLocation,
534    "useOrderDiscountApply",
535    0,
536    useOrderDiscountApply,
537    "useOrderDiscountRemove",
538    0,
539    useOrderDiscountRemove,
540    "useOrderOverview",
541    0,
542    useOrderOverview,
543    "useOrderOverviewCount",
544    0,
545    useOrderOverviewCount,
546    "useOrderRemove",
547    0,
548    useOrderRemove,
549    "useOrderSingle",
550    0,
551    useOrderSingle,
552    "useOrderUpdate",
553    0,
554    useOrderUpdate
555], 733686);
556}),
557456998, ((__turbopack_context__) => {
558"use strict";
559
560var __TURBOPACK__imported__module__653145__ = __turbopack_context__.i(653145);
561;
562const t = (r, t, s)=>{
563    if (r && "reportValidity" in r) {
564        const o = (0, __TURBOPACK__imported__module__653145__["get"])(s, t);
565        r.setCustomValidity(o && o.message || ""), r.reportValidity();
566    }
567}, s = (e, r)=>{
568    for(const s in r.fields){
569        const o = r.fields[s];
570        o && o.ref && "reportValidity" in o.ref ? t(o.ref, s, e) : o && o.refs && o.refs.forEach((r)=>t(r, s, e));
571    }
572}, o = (t, o)=>{
573    o.shouldUseNativeValidation && s(t, o);
574    const n = {};
575    for(const s in t){
576        const f = (0, __TURBOPACK__imported__module__653145__["get"])(o.fields, s), c = Object.assign(t[s] || {}, {
577            ref: f && f.refs ? f.refs[0] : f && f.ref
578        });
579        if (i(o.names || Object.keys(t), s)) {
580            const t = Object.assign({}, (0, __TURBOPACK__imported__module__653145__["get"])(n, s));
581            (0, __TURBOPACK__imported__module__653145__["set"])(t, "root", c), (0, __TURBOPACK__imported__module__653145__["set"])(n, s, t);
582        } else (0, __TURBOPACK__imported__module__653145__["set"])(n, s, c);
583    }
584    return n;
585}, i = (e, r)=>{
586    const t = n(r).replace(/[.*+?^${}()|\\]/g, "\\$&");
587    return e.some((e)=>n(e).match("^".concat(t, "\\.\\d+")));
588};
589function n(e) {
590    return e.replace(/\[(\d+)]/g, ".$1").replace(/[[\]]/g, "");
591}
592;
593__turbopack_context__.s([
594    "toNestErrors",
595    0,
596    o,
597    "validateFieldsNatively",
598    0,
599    s
600]);
601}),
602257311, ((__turbopack_context__) => {
603"use strict";
604
605var __TURBOPACK__imported__module__843476__ = __turbopack_context__.i(843476);
606var __TURBOPACK__imported__module__271645__ = __turbopack_context__.i(271645);
607var __TURBOPACK__imported__module__945060__ = __turbopack_context__.i(945060);
608"use client";
609;
610;
611;
612const Input = /*#__PURE__*/ (0, __TURBOPACK__imported__module__271645__["forwardRef"])(function Input(param, ref) {
613    let { id, regexp, className, leftElement, rightElement, showValidIndicator = false, showInvalidIndicator = true, type, value, error, onBlur, describedBy, readOnly, ...props } = param;
614    const [focused, setFocused] = (0, __TURBOPACK__imported__module__271645__["useState"])(false);
615    return /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__843476__["Fragment"], {
616        children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsxs"])("div", {
617            className: (0, __TURBOPACK__imported__module__945060__["cn"])("relative flex rounded-md shadow-sm", className),
618            children: [
619                !!leftElement && leftElement,
620                /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])("input", {
621                    ref: ref,
622                    id: id,
623                    className: (0, __TURBOPACK__imported__module__945060__["cn"])("relative block h-5 w-full rounded border py-1 pl-2 pr-2 text-16 text-dark-400 placeholder-dark-300 md:text-base", {
624                        "border-dark-200 focus:border-dark-200 focus:ring focus:ring-blue-200": !error,
625                        "border-2 border-red-300 focus:border-red-500 focus:ring-4 focus:ring-red-200": !!error,
626                        "rounded-l-none": !!leftElement,
627                        "rounded-r-none": !!rightElement,
628                        "bg-dark-50 cursor-not-allowed": readOnly
629                    }),
630                    readOnly: readOnly,
631                    "aria-invalid": !!error ? "true" : "false",
632                    "aria-describedby": describedBy,
633                    type: type === "number" ? "text" : type,
634                    inputMode: type === "number" ? "numeric" : undefined,
635                    pattern: type === "number" ? "[0-9]*" : undefined,
636                    onFocus: ()=>{
637                        setFocused(true);
638                    },
639                    onBlur: (event)=>{
640                        onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
641                        setFocused(false);
642                    },
643                    onKeyDown: (e)=>{
644                        var _element_selectionStart, _element_selectionEnd;
645                        if (e.metaKey || e.ctrlKey || [
646                            "Backspace",
647                            "Delete",
648                            "Tab",
649                            "Enter",
650                            "ArrowLeft",
651                            "ArrowRight",
652                            "ArrowUp",
653                            "ArrowDown",
654                            "Home",
655                            "End",
656                            "PageUp",
657                            "PageDown"
658                        ].includes(e.key)) {
659                            return;
660                        }
661                        // Predict the next value with respect to the selection
662                        const element = e.currentTarget;
663                        const start = (_element_selectionStart = element.selectionStart) !== null && _element_selectionStart !== void 0 ? _element_selectionStart : element.value.length;
664                        const end = (_element_selectionEnd = element.selectionEnd) !== null && _element_selectionEnd !== void 0 ? _element_selectionEnd : element.value.length;
665                        const next = element.value.slice(0, start) + e.key + element.value.slice(end);
666                        if (regexp && !regexp.test(next)) {
667                            e.preventDefault();
668                        }
669                    },
670                    value: value,
671                    ...props
672                }),
673                !!rightElement && rightElement,
674                !!error && showInvalidIndicator && /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])("div", {
675                    className: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2",
676                    children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])("svg", {
677                        className: "h-3 w-3 text-red-500",
678                        fill: "currentColor",
679                        viewBox: "0 0 20 20",
680                        "aria-hidden": "true",
681                        children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])("path", {
682                            fillRule: "evenodd",
683                            d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z",
684                            clipRule: "evenodd"
685                        })
686                    })
687                }),
688                !error && showValidIndicator && value && value.length > 0 && !focused && /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])("div", {
689                    className: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2",
690                    children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])("svg", {
691                        className: "h-2 w-2 text-green-500",
692                        fill: "currentColor",
693                        viewBox: "0 0 16 11",
694                        "aria-hidden": "true",
695                        children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])("path", {
696                            d: "M1 5l3.935 4L13 1",
697                            stroke: "currentColor",
698                            strokeWidth: "2",
699                            fill: "none",
700                            fillRule: "evenodd"
701                        })
702                    })
703                })
704            ]
705        })
706    });
707});
708const __TURBOPACK__default__export__ = Input;
709__turbopack_context__.s([
710    "default",
711    0,
712    __TURBOPACK__default__export__
713]);
714}),
715105808, ((__turbopack_context__) => {
716"use strict";
717
718var __TURBOPACK__imported__module__843476__ = __turbopack_context__.i(843476);
719;
720function ErrorMessage(param) {
721    let { id, error } = param;
722    if (!error) {
723        return null;
724    }
725    return /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])("p", {
726        id: id.endsWith("-error") ? id : "".concat(id, "-error"),
727        className: "text-sm text-red-600 mt-1",
728        children: typeof error === "string" ? error : error.message
729    });
730}
731__turbopack_context__.s([
732    "default",
733    0,
734    ErrorMessage
735]);
736}),
737880202, ((__turbopack_context__) => {
738"use strict";
739
740var __TURBOPACK__imported__module__247167__ = /*#__PURE__*/ __turbopack_context__.i(247167);
741var __TURBOPACK__imported__module__456998__ = __turbopack_context__.i(456998);
742var __TURBOPACK__imported__module__653145__ = __turbopack_context__.i(653145);
743;
744;
745function o(o, n, a) {
746    return void 0 === a && (a = {}), function(s, i, c) {
747        try {
748            return Promise.resolve(function(t, r) {
749                try {
750                    var u = (null != n && n.context && "development" === ("TURBOPACK compile-time value", "production") && console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"), Promise.resolve(o["sync" === a.mode ? "validateSync" : "validate"](s, Object.assign({
751                        abortEarly: !1
752                    }, n, {
753                        context: i
754                    }))).then(function(t) {
755                        return c.shouldUseNativeValidation && (0, __TURBOPACK__imported__module__456998__["validateFieldsNatively"])({}, c), {
756                            values: a.raw ? Object.assign({}, s) : t,
757                            errors: {}
758                        };
759                    }));
760                } catch (e) {
761                    return r(e);
762                }
763                return u && u.then ? u.then(void 0, r) : u;
764            }(0, function(e) {
765                if (!e.inner) throw e;
766                return {
767                    values: {},
768                    errors: (0, __TURBOPACK__imported__module__456998__["toNestErrors"])((o = e, n = !c.shouldUseNativeValidation && "all" === c.criteriaMode, (o.inner || []).reduce(function(e, t) {
769                        if (e[t.path] || (e[t.path] = {
770                            message: t.message,
771                            type: t.type
772                        }), n) {
773                            var o = e[t.path].types, a = o && o[t.type];
774                            e[t.path] = (0, __TURBOPACK__imported__module__653145__["appendErrors"])(t.path, n, e, t.type, a ? [].concat(a, t.message) : t.message);
775                        }
776                        return e;
777                    }, Object.create(null))), c)
778                };
779                //TURBOPACK unreachable
780                ;
781                var o, n;
782            }));
783        } catch (e) {
784            return Promise.reject(e);
785        }
786    };
787}
788;
789__turbopack_context__.s([
790    "yupResolver",
791    0,
792    o
793]);
794}),
795651409, ((__turbopack_context__) => {
796"use strict";
797
798// MERGED MODULE: [project]/src/generated/authPasswordBased/reactQueries.tsx [app-client] (ecmascript)
799;
800var __TURBOPACK__imported__module__954616__ = __turbopack_context__.i(954616);
801var __TURBOPACK__imported__module__266027__ = __turbopack_context__.i(266027);
802var __TURBOPACK__imported__module__912598__ = __turbopack_context__.i(912598);
803var __TURBOPACK__imported__module__197643__ = __turbopack_context__.i(197643);
804// MERGED MODULE: [project]/src/generated/authPasswordBased/apiClient.ts [app-client] (ecmascript)
805;
806async function apiAuthPasswordBasedForgotPassword(axiosInstance, body, requestConfig) {
807    const response = await axiosInstance.request({
808        url: "auth/password-based/forgot-password",
809        method: "POST",
810        data: body,
811        ...requestConfig
812    });
813    return response.data;
814}
815async function apiAuthPasswordBasedListEmails(axiosInstance, requestConfig) {
816    const response = await axiosInstance.request({
817        url: "auth/password-based/",
818        method: "GET",
819        ...requestConfig
820    });
821    return response.data;
822}
823async function apiAuthPasswordBasedLogin(axiosInstance, body, requestConfig) {
824    const response = await axiosInstance.request({
825        url: "auth/password-based/login",
826        method: "POST",
827        data: body,
828        ...requestConfig
829    });
830    return response.data;
831}
832async function apiAuthPasswordBasedResetPassword(axiosInstance, body, requestConfig) {
833    const response = await axiosInstance.request({
834        url: "auth/password-based/reset-password",
835        method: "POST",
836        data: body,
837        ...requestConfig
838    });
839    return response.data;
840}
841async function apiAuthPasswordBasedUpdateEmail(axiosInstance, body, requestConfig) {
842    const response = await axiosInstance.request({
843        url: "auth/password-based/update-email",
844        method: "POST",
845        data: body,
846        ...requestConfig
847    });
848    return response.data;
849}
850async function apiAuthPasswordBasedUpdatePassword(axiosInstance, body, requestConfig) {
851    const response = await axiosInstance.request({
852        url: "auth/password-based/update-password",
853        method: "POST",
854        data: body,
855        ...requestConfig
856    });
857    return response.data;
858}
859async function apiAuthPasswordBasedVerifyEmail(axiosInstance, body, requestConfig) {
860    const response = await axiosInstance.request({
861        url: "auth/password-based/verify-email",
862        method: "POST",
863        data: body,
864        ...requestConfig
865    });
866    return response.data;
867}
868async function apiAuthPasswordBasedVerifyOtp(axiosInstance, body, requestConfig) {
869    const response = await axiosInstance.request({
870        url: "auth/password-based/verify-otp",
871        method: "POST",
872        data: body,
873        ...requestConfig
874    });
875    return response.data;
876}
877;
878;
879;
880function useAuthPasswordBasedForgotPassword() {
881    let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
882    const axiosInstance = (0, __TURBOPACK__imported__module__197643__["useApi"])();
883    const queryClient = (0, __TURBOPACK__imported__module__912598__["useQueryClient"])();
884    return (0, __TURBOPACK__imported__module__954616__["useMutation"])({
885        mutationFn: (variables)=>apiAuthPasswordBasedForgotPassword(axiosInstance, {
886                email: variables["email"]
887            }, variables === null || variables === void 0 ? void 0 : variables.requestConfig),
888        ...options
889    });
890}
891function useAuthPasswordBasedListEmails() {
892    let opts = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
893    var _ref;
894    const axiosInstance = (0, __TURBOPACK__imported__module__197643__["useApi"])();
895    const options = (_ref = opts === null || opts === void 0 ? void 0 : opts.queryOptions) !== null && _ref !== void 0 ? _ref : {};
896    return (0, __TURBOPACK__imported__module__266027__["useQuery"])({
897        queryKey: useAuthPasswordBasedListEmails.queryKey(),
898        queryFn: (param)=>{
899            let { signal } = param;
900            var _opts, _requestConfig;
901            (_requestConfig = (_opts = opts).requestConfig) !== null && _requestConfig !== void 0 ? _requestConfig : _opts.requestConfig = {};
902            opts.requestConfig.signal = signal;
903            return apiAuthPasswordBasedListEmails(axiosInstance, opts === null || opts === void 0 ? void 0 : opts.requestConfig);
904        },
905        ...options
906    });
907}
908/**
909 * Base key used by useAuthPasswordBasedListEmails.queryKey()
910 */ useAuthPasswordBasedListEmails.baseKey = ()=>[
911        "authPasswordBased",
912        "listEmails"
913    ];
914/**
915 * Query key used by useAuthPasswordBasedListEmails
916 */ useAuthPasswordBasedListEmails.queryKey = ()=>[
917        ...useAuthPasswordBasedListEmails.baseKey()
918    ];
919/**
920 * Fetch useAuthPasswordBasedListEmails via the queryClient and return the result
921 */ useAuthPasswordBasedListEmails.fetch = (queryClient, axiosInstance, opts)=>{
922    return queryClient.fetchQuery({
923        queryKey: useAuthPasswordBasedListEmails.queryKey(),
924        queryFn: ()=>{
925            return apiAuthPasswordBasedListEmails(axiosInstance, opts === null || opts === void 0 ? void 0 : opts.requestConfig);
926        }
927    });
928};
929/**
930 * Prefetch useAuthPasswordBasedListEmails via the queryClient
931 */ useAuthPasswordBasedListEmails.prefetch = (queryClient, axiosInstance, opts)=>{
932    return queryClient.prefetchQuery({
933        queryKey: useAuthPasswordBasedListEmails.queryKey(),
934        queryFn: ()=>{
935            return apiAuthPasswordBasedListEmails(axiosInstance, opts === null || opts === void 0 ? void 0 : opts.requestConfig);
936        }
937    });
938};
939/**
940 * Invalidate useAuthPasswordBasedListEmails via the queryClient
941 */ useAuthPasswordBasedListEmails.invalidate = (queryClient)=>
941queryClient.invalidateQueries({
942        queryKey: useAuthPasswordBasedListEmails.queryKey()
943    });
944/**
945 * Set query data for useAuthPasswordBasedListEmails via the queryClient
946 */ useAuthPasswordBasedListEmails.setQueryData = (queryClient, data)=>{
947    return queryClient.setQueryData(useAuthPasswordBasedListEmails.queryKey(), data);
948};
949function useAuthPasswordBasedLogin() {
950    let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
951    const axiosInstance = (0, __TURBOPACK__imported__module__197643__["useApi"])();
952    const queryClient = (0, __TURBOPACK__imported__module__912598__["useQueryClient"])();
953    return (0, __TURBOPACK__imported__module__954616__["useMutation"])({
954        mutationFn: (variables)=>apiAuthPasswordBasedLogin(axiosInstance, {
955                email: variables["email"],
956                password: variables["password"],
957                device: variables["device"]
958            }, variables === null || variables === void 0 ? void 0 : variables.requestConfig),
959        ...options
960    });
961}
962function useAuthPasswordBasedResetPassword() {
963    let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
964    const axiosInstance = (0, __TURBOPACK__imported__module__197643__["useApi"])();
965    const queryClient = (0, __TURBOPACK__imported__module__912598__["useQueryClient"])();
966    return (0, __TURBOPACK__imported__module__954616__["useMutation"])({
967        mutationFn: (variables)=>apiAuthPasswordBasedResetPassword(axiosInstance, {
968                resetToken: variables["resetToken"],
969                password: variables["password"]
970            }, variables === null || variables === void 0 ? void 0 : variables.requestConfig),
971        ...options
972    });
973}
974function useAuthPasswordBasedUpdateEmail() {
975    let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
976    const axiosInstance = (0, __TURBOPACK__imported__module__197643__["useApi"])();
977    const queryClient = (0, __TURBOPACK__imported__module__912598__["useQueryClient"])();
978    return (0, __TURBOPACK__imported__module__954616__["useMutation"])({
979        mutationFn: (variables)=>apiAuthPasswordBasedUpdateEmail(axiosInstance, {
980                email: variables["email"]
981            }, variables === null || variables === void 0 ? void 0 : variables.requestConfig),
982        ...options
983    });
984}
985function useAuthPasswordBasedUpdatePassword() {
986    let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
987    const axiosInstance = (0, __TURBOPACK__imported__module__197643__["useApi"])();
988    const queryClient = (0, __TURBOPACK__imported__module__912598__["useQueryClient"])();
989    return (0, __TURBOPACK__imported__module__954616__["useMutation"])({
990        mutationFn: (variables)=>apiAuthPasswordBasedUpdatePassword(axiosInstance, {
991                password: variables["password"]
992            }, variables === null || variables === void 0 ? void 0 : variables.requestConfig),
993        ...options
994    });
995}
996function useAuthPasswordBasedVerifyEmail() {
997    let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
998    const axiosInstance = (0, __TURBOPACK__imported__module__197643__["useApi"])();
999    const queryClient = (0, __TURBOPACK__imported__module__912598__["useQueryClient"])();
1000    return (0, __TURBOPACK__imported__module__954616__["useMutation"])({
1001        mutationFn: (variables)=>apiAuthPasswordBasedVerifyEmail(axiosInstance, {
1002                verifyToken: variables["verifyToken"],
1003                device: variables["device"]
1004            }, variables === null || variables === void 0 ? void 0 : variables.requestConfig),
1005        ...options
1006    });
1007}
1008function useAuthPasswordBasedVerifyOtp() {
1009    let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1010    const axiosInstance = (0, __TURBOPACK__imported__module__197643__["useApi"])();
1011    const queryClient = (0, __TURBOPACK__imported__module__912598__["useQueryClient"])();
1012    return (0, __TURBOPACK__imported__module__954616__["useMutation"])({
1013        mutationFn: (variables)=>apiAuthPasswordBasedVerifyOtp(axiosInstance, {
1014                otp: variables["otp"]
1015            }, variables === null || variables === void 0 ? void 0 : variables.requestConfig),
1016        ...options
1017    });
1018}
1019__turbopack_context__.s([
1020    "useAuthPasswordBasedForgotPassword",
1021    0,
1022    useAuthPasswordBasedForgotPassword,
1023    "useAuthPasswordBasedLogin",
1024    0,
1025    useAuthPasswordBasedLogin,
1026    "useAuthPasswordBasedResetPassword",
1027    0,
1028    useAuthPasswordBasedResetPassword,
1029    "useAuthPasswordBasedUpdateEmail",
1030    0,
1031    useAuthPasswordBasedUpdateEmail,
1032    "useAuthPasswordBasedUpdatePassword",
1033    0,
1034    useAuthPasswordBasedUpdatePassword
1035], 651409);
1036}),
1037230671, ((__turbopack_context__) => {
1038"use strict";
1039
1040// MERGED MODULE: [project]/src/components/LoginModal.tsx [app-client] (ecmascript)
1041;
1042var __TURBOPACK__imported__module__843476__ = __turbopack_context__.i(843476);
1043var __TURBOPACK__imported__module__854878__ = __turbopack_context__.i(854878);
1044var __TURBOPACK__imported__module__880202__ = __turbopack_context__.i(880202);
1045var __TURBOPACK__imported__module__183330__ = __turbopack_context__.i(183330);
1046var __TURBOPACK__imported__module__662537__ = __turbopack_context__.i(662537);
1047var __TURBOPACK__imported__module__912598__ = __turbopack_context__.i(912598);
1048var __TURBOPACK__imported__module__653145__ = __turbopack_context__.i(653145);
1049var __TURBOPACK__imported__module__846696__ = __turbopack_context__.i(846696);
1050var __TURBOPACK__imported__module__499683__ = __turbopack_context__.i(499683);
1051var __TURBOPACK__imported__module__768834__ = __turbopack_context__.i(768834);
1052var __TURBOPACK__imported__module__857686__ = __turbopack_context__.i(857686);
1053var __TURBOPACK__imported__module__432082__ = __turbopack_context__.i(432082);
1054var __TURBOPACK__imported__module__541378__ = __turbopack_context__.i(541378);
1055var __TURBOPACK__imported__module__372225__ = __turbopack_context__.i(372225);
1056var __TURBOPACK__imported__module__710007__ = __turbopack_context__.i(710007);
1057var __TURBOPACK__imported__module__991548__ = __turbopack_context__.i(991548);
1058// MERGED MODULE: [project]/src/components/SideModal.tsx [app-client] (ecmascript)
1059;
1060var __TURBOPACK__imported__module__843476__1 = __TURBOPACK__imported__module__843476__;
1061var __TURBOPACK__imported__module__854878__1 = __TURBOPACK__imported__module__854878__;
1062var __TURBOPACK__imported__module__88653__ = __turbopack_context__.i(88653);
1063var __TURBOPACK__imported__module__532181__ = __turbopack_context__.i(532181);
1064var __TURBOPACK__imported__module__945060__ = __turbopack_context__.i(945060);
1065"use client";
1066;
1067;
1068;
1069;
1070function SideModal(param) {
1071    let { children, isOpen, className, onRequestClose, size = "small", focusRef, ...props } = param;
1072    return /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__1["jsx"])(__TURBOPACK__imported__module__88653__["AnimatePresence"], {
1073        children: isOpen && /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__1["jsx"])(__TURBOPACK__imported__module__854878__1["Dialog"], {
1074            static: true,
1075            className: (0, __TURBOPACK__imported__module__945060__["cn"])("fixed inset-0 z-70 overflow-y-auto", className),
1076            open: isOpen,
1077            onClose: onRequestClose,
1078            initialFocus: focusRef,
1079            children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__1["jsxs"])("div", {
1080                className: "relative flex w-full h-full min-h-dvh px-1 py-4 text-center sm:p-0 overflow-hidden",
1081                children: [
1082                    /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__1["jsx"])(__TURBOPACK__imported__module__854878__1["DialogBackdrop"], {
1083                        as: __TURBOPACK__imported__module__532181__["motion"].div,
1084                        initial: {
1085                            opacity: 0
1086                        },
1087                        animate: {
1088                            opacity: 1,
1089                            transition: {
1090                                duration: 0.3,
1091                                ease: "easeOut"
1092                            }
1093                        },
1094                        exit: {
1095                            opacity: 0,
1096                            transition: {
1097                                duration: 0.2,
1098                                ease: "easeIn"
1099                            }
1100                        },
1101                        className: "fixed inset-0 bg-brand-500/50"
1102                    }),
1103                    /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__1["jsx"])("span", {
1104                        className: "hidden sm:inline-block sm:h-dvh sm:align-middle",
1105                        "aria-hidden": "true",
1106                        children: "​"
1107                    }),
1108                    /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__1["jsx"])(__TURBOPACK__imported__module__854878__1["DialogPanel"], {
1109                        as: __TURBOPACK__imported__module__532181__["motion"].div,
1110                        initial: {
1111                            opacity: 0,
1112                            x: "100%"
1113                        },
1114                        animate: {
1115                            opacity: 1,
1116                            x: 0,
1117                            transition: {
1118                                duration: 0.3,
1119                                ease: "easeOut"
1120                            }
1121                        },
1122                        exit: {
1123                            opacity: 0,
1124                            x: "100%",
1125                            transition: {
1126                                duration: 0.2,
1127                                ease: "easeIn"
1128                            }
1129                        },
1130                        className: (0, __TURBOPACK__imported__module__945060__["cn"])("absolute top-0 right-0 h-full w-full text-left", {
1131                            "max-w-2xl": size === "large",
1132                            "max-w-xl": size === "medium",
1133                            "max-w-md": size === "small"
1134                        }),
1135                        ...props,
1136                        children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__1["jsx"])("div", {
1137                            className: "relative h-full w-full rounded-l overflow-y-scroll p-0 shadow bg-white",
1138                            children: children
1139                        })
1140                    })
1141                ]
1142            })
1143        })
1144    });
1145}
1146function SideModalCloseButton(param) {
1147    let { className, ...props } = param;
1148    return /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__1["jsx"])("button", {
1149        type: "button",
1150        className: (0, __TURBOPACK__imported__module__945060__["cn"])("flex shrink-0 items-center justify-center focus:ring focus:ring-blue-200", className),
1151        ...props,
1152        children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__1["jsx"])("svg", {
1153            width: "16",
1154            height: "16",
1155            className: "text-dark-500",
1156            children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__1["jsxs"])("g", {
1157                fill: "none",
1158                fillRule: "evenodd",
1159                children: [
1160                    /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__1["jsx"])("path", {
1161                        d: "M0 0h16v16H0z"
1162                    }),
1163                    /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__1["jsx"])("path", {
1164                        stroke: "currentColor",
1165                        strokeWidth: "2",
1166                        d: "M1 1l14 14M15 1L1 15"
1167                    })
1168                ]
1169            })
1170        })
1171    });
1172}
1173const __TURBOPACK__default__export__ = SideModal;
1174var __TURBOPACK__imported__module__105808__ = __turbopack_context__.i(105808);
1175var __TURBOPACK__imported__module__257311__ = __turbopack_context__.i(257311);
1176var __TURBOPACK__imported__module__964628__ = __turbopack_context__.i(964628);
1177var __TURBOPACK__imported__module__177413__ = __turbopack_context__.i(177413);
1178var __TURBOPACK__imported__module__265487__ = __turbopack_context__.i(265487);
1179var __TURBOPACK__imported__module__86480__ = __turbopack_context__.i(86480);
1180var __TURBOPACK__imported__module__651409__ = __turbopack_context__.i(651409);
1181var __TURBOPACK__imported__module__197643__ = __turbopack_context__.i(197643);
1182var __TURBOPACK__imported__module__773447__ = __turbopack_context__.i(773447);
1183var __TURBOPACK__imported__module__948148__ = __turbopack_context__.i(948148);
1184var __TURBOPACK__imported__module__945060__1 = __TURBOPACK__imported__module__945060__;
1185var __TURBOPACK__imported__module__614537__ = __turbopack_context__.i(614537);
1186"use client";
1187;
1188;
1189;
1190;
1191;
1192;
1193;
1194;
1195;
1196;
1197;
1198;
1199;
1200;
1201;
1202;
1203;
1204;
1205;
1206;
1207;
1208;
1209;
1210;
1211;
1212;
1213;
1214const useLoginModalState = (0, __TURBOPACK__imported__module__768834__["create"])((set)=>({
1215        isOpen: false,
1216        onLogin: null,
1217        open: (options)=>{
1218            var _ref;
1219            return set({
1220                isOpen: true,
1221                onLogin: (_ref = options === null || options === void 0 ? void 0 : options.onLogin) !== null && _ref !== void 0 ? _ref : null
1222            });
1223        },
1224        close: ()=>set({
1225                isOpen: false,
1226                onLogin: null
1227            })
1228    }));
1229function LoginModal(param) {
1230    let { isOpen, onLogin } = param;
1231    const t = (0, __TURBOPACK__imported__module__948148__["useTranslations"])();
1232    const queryClient = (0, __TURBOPACK__imported__module__912598__["useQueryClient"])();
1233    const pathname = (0, __TURBOPACK__imported__module__614537__["usePathname"])();
1234    const router = (0, __TURBOPACK__imported__module__614537__["useRouter"])();
1235    const api = (0, __TURBOPACK__imported__module__197643__["useApi"])();
1236    const { mutate: login, isPending: isLoading } = (0, __TURBOPACK__imported__module__651409__["useAuthPasswordBasedLogin"])({
1237        onSuccess: async (data)=>{
1238            __TURBOPACK__imported__module__183330__["addBreadcrumb"]({
1239                message: "[Login] Token pair received from backend"
1240            });
1241            (0, __TURBOPACK__imported__module__432082__["dataLayer"])({
1242                event: "account_login"
1243            });
1244            (0, __TURBOPACK__imported__module__541378__["createSession"])(data, {
1245                isLoggedIn: true
1246            });
1247            try {
1248                const [accountResult, preferencesResult] = await Promise.allSettled([
1249                    queryClient.fetchQuery({
1250                        queryKey: __TURBOPACK__imported__module__177413__["useAccountMe"].queryKey(),
1251                        queryFn: ()=>(0, __TURBOPACK__imported__module__964628__["apiAccountMe"])(api)
1252                    }),
1253                    queryClient.fetchQuery({
1254                        queryKey: __TURBOPACK__imported__module__177413__["useAccountGetAppPreferences"].queryKey(),
1255                        queryFn: ()=>(0, __TURBOPACK__imported__module__964628__["apiAccountGetAppPreferences"])(api)
1256                    })
1257                ]);
1258                const account = accountResult.status === "fulfilled" ? accountResult.value : undefined;
1259                const preferences = preferencesResult.status === "fulfilled" ? preferencesResult.value : undefined;
1260                if (!account) {
1261                    return;
1262                }
1263                (0, __TURBOPACK__imported__module__541378__["setAccountType"])(account.type);
1264                __TURBOPACK__imported__module__857686__["default"].userLoggedIn({
1265                    account,
1266                    preferences
1267                });
1268            } catch (unused) {
1269            // noop
1270            }
1271            void queryClient.prefetchQuery({
1272                queryKey: __TURBOPACK__imported__module__86480__["useAuthMe"].queryKey(),
1273                queryFn: ()=>{
1274                    return (0, __TURBOPACK__imported__module__265487__["apiAuthMe"])(api);
1275                }
1276            });
1277            onLogin === null || onLogin === void 0 ? void 0 : onLogin();
1278            useLoginModalState.getState().close();
1279            router.refresh();
1280            void queryClient.invalidateQueries();
1281        },
1282        onError: (error)=>{
1283            var _error_response, _error_response_data, _error_response1;
1284            if (!!((_error_response = error.response) === null || _error_response === void 0 ? void 0 : _error_response.data)) {
1285                var _error_response_data1, _error_response2, _error_response3;
1286                __TURBOPACK__imported__module__183330__["addBreadcrumb"]({
1287                    category: "api",
1288                    level: "error",
1289                    message: (_error_response2 = error.response) === null || _error_response2 === void 0 ? void 0 : (_error_response_data1 = _error_response2.data) === null || _error_response_data1 === void 0 ? void 0 : _error_response_data1.key,
1290                    data: (_error_response3 = error.response) === null || _error_response3 === void 0 ? void 0 : _error_response3.data
1291                });
1292            }
1293            __TURBOPACK__imported__module__662537__["captureException"](error);
1294            let description = t("auth.form.notifications.error");
1295            switch(error === null || error === void 0 ? void 0 : (_error_response1 = error.response) === null || _error_response1 === void 0 ? void 0 : (_error_response_data = _error_response1.data) === null || _error_response_data === void 0 ? void 0 : _error_response_data.key){
1296                case "authPasswordBased.login.emailNotVerified":
1297                    description = t("auth.authPasswordBased.login.emailNotVerified");
1298                    break;
1299                case "authPasswordBased.login.invalidEmailPasswordCombination":
1300                    description = t("auth.authPasswordBased.login.invalidEmailPasswordCombination");
1301                    break;
1302                case "authPasswordBased.login.unknownEmail":
1303                    description = t("auth.authPasswordBased.login.unknownEmail");
1304            }
1305            __TURBOPACK__imported__module__846696__["toast"].custom((id)=>/*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__991548__["default"], {
1306                    variant: "error",
1307                    description: description,
1308                    onDismiss: ()=>__TURBOPACK__imported__module__846696__["toast"].dismiss(id)
1309                }));
1310        }
1311    });
1312    const LoginSchema = __TURBOPACK__imported__module__499683__["object"]().shape({
1313        email: __TURBOPACK__imported__module__499683__["string"]().required("".concat(t("auth.form.email"), " ").concat(t("auth.form.validation.required"))),
1314        password: __TURBOPACK__imported__module__499683__["string"]().required("".concat(t("auth.form.password"), " ").concat(t("auth.form.validation.required")))
1315    });
1316    const { handleSubmit, formState: { errors }, register } = (0, __TURBOPACK__imported__module__653145__["useForm"])({
1317        defaultValues: {
1318            email: "",
1319            password: ""
1320        },
1321        resolver: (0, __TURBOPACK__imported__module__880202__["yupResolver"])(LoginSchema)
1322    });
1323    const close = useLoginModalState((state)=>state.close);
1324    return /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__default__export__, {
1325        isOpen: isOpen,
1326        onRequestClose: close,
1327        className: "fixed right-0",
1328        children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsxs"])("div", {
1329            className: "px-2 sm:px-4 pt-2 pb-5",
1330            children: [
1331                /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsxs"])("div", {
1332                    className: "flex justify-between items-center pb-2 sm:pb-0 sm:justify-end",
1333                    children: [
1334                        /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__372225__["default"], {
1335                            className: "h-auto w-11 sm:hidden"
1336                        }),
1337                        /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsxs"])("button", {
1338                            type: "button",
1339                            onClick: close,
1340                            className: "flex justify-end hover:bg-blue-50 focus:ring focus:ring-blue-200 p-1 rounded",
1341                            children: [
1342                                /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsxs"])("svg", {
1343                                    "aria-hidden": "true",
1344                                    xmlns: "http://www.w3.org/2000/svg",
1345                                    width: "16",
1346                                    height: "16",
1347                                    viewBox: "0 0 16 16",
1348                                    fill: "none",
1349                                    className: "text-dark-500",
1350                                    children: [
1351                                        /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])("path", {
1352                                            d: "M1 1L15 15",
1353                                            stroke: "currentColor",
1354                                            strokeWidth: "2"
1355                                        }),
1356                                        /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])("path", {
1357                                            d: "M15 1L1 15",
1358                                            stroke: "currentColor",
1359                                            strokeWidth: "2"
1360                                        })
1361                                    ]
1362                                }),
1363                                /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])("span", {
1364                                    className: "sr-only",
1365                                    children: t("login.close")
1366                                })
1367                            ]
1368                        })
1369                    ]
1370                }),
1371                /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsxs"])("div", {
1372                    children: [
1373                        /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsxs"])("div", {
1374                            className: "border-b border-brand-100 pb-1",
1375                            children: [
1376                                /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__854878__["DialogTitle"], {
1377                                    className: "text-md font-semibold text-dark-500 sm:text-lg lg:text-xl mb-2",
1378                                    children: t("login.login")
1379                                }),
1380                                /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])("h3", {
1381                                    className: "font-semibold text-dark-500 sm:text-md xl:text-lg mb-[4px]",
1382                                    children: t("login.existingCustomers")
1383                                })
1384                            ]
1385                        }),
1386                        /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])("p", {
1387                            className: "mt-2 text-sm text-dark-400 md:text-base",
1388                            children: t("login.loginWithDiksAccount")
1389                        }),
1390                        /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsxs"])("form", {
1391                            onSubmit: handleSubmit((values)=>login(values)),
1392                            className: "mt-2 space-y-1 md:space-y-2",
1393                            children: [
1394                                /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsxs"])("div", {
1395                                    children: [
1396                                        /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsxs"])("label", {
1397                                            htmlFor: "email",
1398                                            className: "mb-1 block text-dark-500",
1399                                            children: [
1400                                                t("login.form.email"),
1401                                                "*"
1402                                            ]
1403                                        }),
1404                                        /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__257311__["default"], {
1405                                            id: "email",
1406                                            className: "flex-1",
1407                                            type: "email",
1408                                            ...register("email"),
1409                                            error: errors.email
1410                                        }),
1411                                        /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__105808__["default"], {
1412                                            id: "email-error",
1413                                            error: errors.email
1414                                        })
1415                                    ]
1416                                }),
1417                                /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsxs"])("div", {
1418                                    children: [
1419                                        /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsxs"])("label", {
1420                                            htmlFor: "password",
1421                                            className: "mb-1 block text-dark-500",
1422                                            children: [
1423                                                t("login.form.password"),
1424                                                "*"
1425                                            ]
1426                                        }),
1427                                        /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__257311__["default"], {
1428                                            id: "password",
1429                                            type: "password",
1430                                            className: "flex-1",
1431                                            autoComplete: "current-password",
1432                                            ...register("password"),
1433                                            error: errors.password
1434                                        }),
1435                                        /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__105808__["default"], {
1436                                            id: "password-error",
1437                                            error: errors.password
1438                                        }),
1439                                        /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])("div", {
1440                                            className: "mt-1 mb-2 flex justify-end font-semibold text-blue-500",
1441                                            children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__614537__["Link"], {
1442                                                "data-testid": "password-forget",
1443                                                href: "/account/wachtwoord-vergeten",
1444                                                onClick: close,
1445                                                children: t("login.form.forgotPassword")
1446                                            })
1447                                        })
1448                                    ]
1449                                }),
1450                                /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__710007__["default"], {
1451                                    variant: "blue",
1452                                    type: "submit",
1453                                    className: "w-full justify-center",
1454                                    isLoading: isLoading,
1455                                    "data-testid": "login",
1456                                    children: t("login.form.login")
1457                                })
1458                            ]
1459                        })
1460                    ]
1461                }),
1462                pathname === "/winkelwagen" && /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsxs"])("div", {
1463                    children: [
1464                        /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsxs"])("div", {
1465                            className: "flex items-center mt-4",
1466                            children: [
1467                                /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])("div", {
1468                                    className: "w-full h-[1px] bg-dark-200"
1469                                }),
1470                                /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])("div", {
1471                                    className: "mx-3",
1472                                    children: t("login.or")
1473                                }),
1474                                /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])("div", {
1475                                    className: "w-full h-[1px] bg-dark-200"
1476                                })
1477                            ]
1478                        }),
1479                        /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsxs"])("div", {
1480                            children: [
1481                                /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__710007__["ButtonLink"], {
1482                                    className: "mt-2 w-full justify-center",
1483                                    variant: "alternative",
1484                                    render: (props)=>/*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__614537__["Link"], {
1485                                            "data-testid": "guest",
1486                                            ...props,
1487                                            href: "/reserveren",
1488                                            onClick: close,
1489                                            children: t("login.withoutAccount.buttonText")
1490                                        })
1491                                }),
1492                                /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])("span", {
1493                                    className: "mt-3 block text-sm text-dark-400 md:text-base",
1494                                    children: t.rich("login.withoutAccount.explanation.description", {
1495                                        link: (chunks)=>// @ts-expect-error: Unable to specify unknown URL in routings
1496                                            /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__614537__["Link"], {
1497                                                href: "/privacybeleid",
1498                                                target: "_blank",
1499                                                className: "underline",
1500                                                onClick: close,
1501                                                children: chunks
1502                                            })
1503                                    })
1504                                })
1505                            ]
1506                        })
1507                    ]
1508                }),
1509                /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsxs"])("div", {
1510                    className: (0, __TURBOPACK__imported__module__945060__1["cn"])(pathname === "/winkelwagen" ? "mt-3" : "mt-5"),
1511                    children: [
1512                        /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])("div", {
1513                            className: "border-b border-brand-100 pb-1",
1514                            children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])("h3", {
1515                                className: "font-semibold text-dark-500 sm:text-md xl:text-lg mb-[4px]",
1516                                children: t("login.register.title")
1517                            })
1518                        }),
1519                        /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__710007__["ButtonLink"], {
1520                            className: "mt-2 w-full justify-center",
1521                            variant: "blue",
1522                            render: (props)=>/*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__614537__["Link"], {
1523                                    "data-testid": "register",
1524                                    ...props,
1525                                    href: "/account/account-aanmaken",
1526                                    onClick: close,
1527                                    children: t("login.register.buttonText")
1528                                })
1529                        }),
1530                        /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])("p", {
1531                            className: "mt-3 mb-3 text-sm text-dark-400 md:text-base",
1532                            children: t("login.register.description")
1533                        })
1534                    ]
1535                })
1536            ]
1537        })
1538    });
1539}
1540__turbopack_context__.s([
1541    "default",
1542    0,
1543    LoginModal,
1544    "useLoginModalState",
1545    0,
1546    useLoginModalState
1547], 230671);
1548}),
1549]);
1550
1551//# debugId=5081701c-2da7-81aa-c8ef-ba9272ad9c72

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.