@teamnovu/kit-shopware-composables 0.0.22 → 0.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { inject as Y, unref as o, computed as c, reactive as Z, watch as H, toRef as W } from "vue";
1
+ import { inject as Y, unref as i, computed as c, reactive as Z, watch as H, toRef as W } from "vue";
2
2
  import { until as J } from "@vueuse/core";
3
- import { queryOptions as P, useQuery as Q, useQueryClient as C, useMutation as v } from "@tanstack/vue-query";
3
+ import { queryOptions as C, useQuery as P, useQueryClient as S, useMutation as h } from "@tanstack/vue-query";
4
4
  import "@teamnovu/kit-shopware-api-client";
5
5
  const _ = Symbol("shopwareClient");
6
6
  function g() {
@@ -13,29 +13,29 @@ const F = {
13
13
  all: () => ["context"]
14
14
  }, ee = {
15
15
  all: () => ["language"]
16
- }, B = {
16
+ }, k = {
17
17
  all: () => ["category"],
18
- lists: () => [...B.all(), "list"],
18
+ lists: () => [...k.all(), "list"],
19
19
  list: (e) => [
20
- ...B.all(),
20
+ ...k.all(),
21
21
  "list",
22
22
  {
23
23
  body: e
24
24
  }
25
25
  ]
26
- }, b = {
26
+ }, D = {
27
27
  all: () => ["navigation"],
28
- lists: () => [...b.all(), "list"],
28
+ lists: () => [...D.all(), "list"],
29
29
  list: (e) => [
30
- ...b.all(),
30
+ ...D.all(),
31
31
  "list",
32
32
  {
33
33
  body: e
34
34
  }
35
35
  ],
36
- details: () => [...b.all(), "detail"],
36
+ details: () => [...D.all(), "detail"],
37
37
  detail: (e, s, t) => [
38
- ...b.all(),
38
+ ...D.all(),
39
39
  "detail",
40
40
  {
41
41
  activeId: e,
@@ -43,34 +43,41 @@ const F = {
43
43
  body: t
44
44
  }
45
45
  ]
46
- }, w = {
46
+ }, A = {
47
47
  all: () => ["product"],
48
- lists: () => [...w.all(), "list"],
48
+ lists: () => [...A.all(), "list"],
49
49
  list: (e, s) => [
50
- ...w.all(),
50
+ ...A.all(),
51
51
  "list",
52
52
  {
53
53
  url: e,
54
54
  body: s
55
55
  }
56
56
  ],
57
- details: () => [...w.all(), "detail"],
57
+ details: () => [...A.all(), "detail"],
58
58
  customDetail: (e, s) => [
59
- ...w.details(),
59
+ ...A.details(),
60
60
  "custom",
61
61
  {
62
62
  url: e,
63
63
  body: s
64
64
  }
65
65
  ],
66
- detail: (e) => [
67
- ...w.details(),
66
+ headlessDetail: (e) => [
67
+ ...A.details(),
68
68
  {
69
69
  body: e
70
70
  }
71
71
  ],
72
+ detail: (e, s) => [
73
+ ...A.details(),
74
+ e,
75
+ {
76
+ body: s
77
+ }
78
+ ],
72
79
  search: (e) => [
73
- ...w.all(),
80
+ ...A.all(),
74
81
  "search",
75
82
  {
76
83
  body: e
@@ -94,11 +101,11 @@ const F = {
94
101
  ],
95
102
  details: () => [...R.all(), "detail"],
96
103
  detail: (e, s) => [...R.details(), e, ...s ? [{ body: s }] : []]
97
- }, D = {
104
+ }, B = {
98
105
  all: () => ["shippingMethod"],
99
- lists: () => [...D.all(), "list"],
106
+ lists: () => [...B.all(), "list"],
100
107
  list: (e) => [
101
- ...D.all(),
108
+ ...B.all(),
102
109
  "list",
103
110
  {
104
111
  body: e
@@ -157,10 +164,10 @@ const F = {
157
164
  ]
158
165
  };
159
166
  function p(e) {
160
- const s = o(e);
167
+ const s = i(e);
161
168
  return Object.fromEntries(
162
169
  Object.entries(s ?? {}).map(
163
- ([t, n]) => [t, o(n)]
170
+ ([t, n]) => [t, i(n)]
164
171
  )
165
172
  );
166
173
  }
@@ -170,7 +177,7 @@ function ne(e) {
170
177
  var n;
171
178
  return (n = p(e)) == null ? void 0 : n.body;
172
179
  }));
173
- return P({
180
+ return C({
174
181
  queryKey: t,
175
182
  queryFn: ({ signal: n }) => s.query(te, {
176
183
  ...p(e),
@@ -179,33 +186,33 @@ function ne(e) {
179
186
  });
180
187
  }
181
188
  function se(e) {
182
- return Q(ne(e));
189
+ return P(ne(e));
183
190
  }
184
191
  const V = (e) => {
185
192
  const s = e.replace(/\/?$/, "");
186
193
  return s.startsWith("/") ? s.slice(1) : s;
187
- }, ft = (e) => `/${V(e)}`;
188
- function vt(e, s, t) {
189
- const n = C();
194
+ }, vt = (e) => `/${V(e)}`;
195
+ function qt(e, s, t) {
196
+ const n = S();
190
197
  return {
191
198
  onMutate: async (r) => {
192
199
  await n.cancelQueries({ queryKey: e });
193
200
  const a = n.getQueryData(e);
194
201
  if (n.setQueryData(e, (u) => s(r, u)), t) {
195
- const u = o(t), i = o(u.onMutate);
196
- i == null || i(r);
202
+ const u = i(t), o = i(u.onMutate);
203
+ o == null || o(r);
197
204
  }
198
205
  return { previousValue: a };
199
206
  },
200
207
  onError: (r, a, u) => {
201
208
  if (u && n.setQueryData(e, u.previousValue), t) {
202
- const i = o(t), f = o(i.onError);
209
+ const o = i(t), f = i(o.onError);
203
210
  f == null || f(r, a, u);
204
211
  }
205
212
  },
206
213
  onSettled: (...r) => {
207
214
  if (n.invalidateQueries({ queryKey: e }), t) {
208
- const a = o(t), u = o(a.onSettled);
215
+ const a = i(t), u = i(a.onSettled);
209
216
  u == null || u(...r);
210
217
  }
211
218
  }
@@ -214,7 +221,7 @@ function vt(e, s, t) {
214
221
  const re = "readContext get /context";
215
222
  function ae(e) {
216
223
  const s = g();
217
- return P({
224
+ return C({
218
225
  queryKey: F.all(),
219
226
  queryFn: ({ signal: t }) => s.query(re, {
220
227
  ...p(e),
@@ -222,28 +229,28 @@ function ae(e) {
222
229
  })
223
230
  });
224
231
  }
225
- function k(e) {
226
- return Q(ae(e));
232
+ function b(e) {
233
+ return P(ae(e));
227
234
  }
228
235
  const ue = "updateContext patch /context";
229
236
  function $(e) {
230
- const s = g(), t = C();
231
- return v({
237
+ const s = g(), t = S();
238
+ return h({
232
239
  ...e,
233
240
  mutationFn: async (n) => (t.cancelQueries({ queryKey: F.all() }), s.query(ue, {
234
241
  body: n
235
242
  })),
236
243
  onSuccess: async (n, r, a) => {
237
- var u, i;
244
+ var u, o;
238
245
  await Promise.all([
239
246
  t.invalidateQueries({ queryKey: F.all() }),
240
247
  t.invalidateQueries({ queryKey: L.get() })
241
- ]), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
248
+ ]), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
242
249
  }
243
250
  });
244
251
  }
245
- function ht() {
246
- const e = $(), s = k(), t = se(), n = c(() => s.isFetching.value || e.isPending.value), r = async (d) => {
252
+ function Ct() {
253
+ const e = $(), s = b(), t = se(), n = c(() => s.isFetching.value || e.isPending.value), r = async (d) => {
247
254
  await e.mutateAsync({
248
255
  billingAddressId: d.id
249
256
  }), await J(n).toBe(!1);
@@ -254,7 +261,7 @@ function ht() {
254
261
  }, u = c(() => {
255
262
  var d, M;
256
263
  return (M = (d = s.data.value) == null ? void 0 : d.customer) == null ? void 0 : M.activeBillingAddress;
257
- }), i = c(() => {
264
+ }), o = c(() => {
258
265
  var d, M;
259
266
  return (M = (d = s.data.value) == null ? void 0 : d.customer) == null ? void 0 : M.activeShippingAddress;
260
267
  }), f = c(() => {
@@ -265,12 +272,12 @@ function ht() {
265
272
  return M.id !== ((O = u.value) == null ? void 0 : O.id);
266
273
  }
267
274
  )) ?? [];
268
- }), S = c(() => {
275
+ }), Q = c(() => {
269
276
  var d;
270
277
  return ((d = t.data.value) == null ? void 0 : d.elements.filter(
271
278
  (M) => {
272
279
  var O;
273
- return M.id !== ((O = i.value) == null ? void 0 : O.id);
280
+ return M.id !== ((O = o.value) == null ? void 0 : O.id);
274
281
  }
275
282
  )) ?? [];
276
283
  });
@@ -282,19 +289,19 @@ function ht() {
282
289
  setShippingAddress: a,
283
290
  isSaving: n,
284
291
  activeBillingAddress: u,
285
- activeShippingAddress: i,
292
+ activeShippingAddress: o,
286
293
  inactiveBillingAddresses: f,
287
- inactiveShippingAddresses: S
294
+ inactiveShippingAddresses: Q
288
295
  };
289
296
  }
290
- const ie = "readOrder post /order";
291
- function oe(e) {
297
+ const oe = "readOrder post /order";
298
+ function ie(e) {
292
299
  const s = g(), t = U.detail(e);
293
- return P({
300
+ return C({
294
301
  queryKey: t,
295
302
  queryFn: async ({ signal: n }) => {
296
303
  const r = p(e);
297
- return s.query(ie, {
304
+ return s.query(oe, {
298
305
  ...r,
299
306
  signal: n
300
307
  });
@@ -302,11 +309,11 @@ function oe(e) {
302
309
  });
303
310
  }
304
311
  function ce(e) {
305
- return Q(oe(e));
312
+ return P(ie(e));
306
313
  }
307
- function qt(e, s) {
314
+ function Pt(e, s) {
308
315
  const t = c(() => {
309
- const l = o(e);
316
+ const l = i(e);
310
317
  if (l)
311
318
  return {
312
319
  body: {
@@ -330,13 +337,13 @@ function qt(e, s) {
330
337
  }), u = c(() => {
331
338
  var l, m, q;
332
339
  return (q = (m = (l = r.value) == null ? void 0 : l.stateMachineState) == null ? void 0 : m.translated) == null ? void 0 : q.name;
333
- }), i = c(() => {
340
+ }), o = c(() => {
334
341
  var l, m;
335
342
  return (m = (l = r.value) == null ? void 0 : l.stateMachineState) == null ? void 0 : m.technicalName;
336
343
  }), f = c(() => {
337
344
  var l, m;
338
345
  return (m = (l = r.value) == null ? void 0 : l.price) == null ? void 0 : m.totalPrice;
339
- }), S = c(() => {
346
+ }), Q = c(() => {
340
347
  var l, m;
341
348
  return (m = (l = r.value) == null ? void 0 : l.price) == null ? void 0 : m.positionPrice;
342
349
  }), d = c(() => {
@@ -362,7 +369,7 @@ function qt(e, s) {
362
369
  var l, m, q;
363
370
  return (q = (m = (l = r.value) == null ? void 0 : l.deliveries) == null ? void 0 : m[0]) == null ? void 0 : q.shippingOrderAddress;
364
371
  }
365
- ), h = c(() => {
372
+ ), v = c(() => {
366
373
  var m, q;
367
374
  const l = (m = r.value) == null ? void 0 : m.transactions;
368
375
  if (l != null && l.length)
@@ -372,33 +379,33 @@ function qt(e, s) {
372
379
  const l = (m = r.value) == null ? void 0 : m.deliveries;
373
380
  if (l != null && l.length)
374
381
  return (q = l.at(-1)) == null ? void 0 : q.shippingMethod;
375
- }), A = c(() => {
382
+ }), w = c(() => {
376
383
  var m;
377
- const l = o(e);
384
+ const l = i(e);
378
385
  return ((m = a.value) == null ? void 0 : m[l]) ?? !1;
379
386
  });
380
387
  return {
381
388
  order: r,
382
389
  status: u,
383
- statusTechnicalName: i,
390
+ statusTechnicalName: o,
384
391
  total: f,
385
- subtotal: S,
392
+ subtotal: Q,
386
393
  shippingCosts: d,
387
394
  shippingAddress: y,
388
395
  billingAddress: O,
389
396
  personalDetails: M,
390
397
  shippingMethod: K,
391
- paymentMethod: h,
392
- paymentChangeable: A,
398
+ paymentMethod: v,
399
+ paymentChangeable: w,
393
400
  orderQuery: n
394
401
  };
395
402
  }
396
- function Ct(e) {
403
+ function St(e) {
397
404
  const s = c(() => {
398
405
  var r, a;
399
- return (a = (r = o(e)) == null ? void 0 : r.transactions) == null ? void 0 : a.find((u) => {
400
- var i;
401
- return ((i = u.paymentMethod) == null ? void 0 : i.active) === !0;
406
+ return (a = (r = i(e)) == null ? void 0 : r.transactions) == null ? void 0 : a.find((u) => {
407
+ var o;
408
+ return ((o = u.paymentMethod) == null ? void 0 : o.active) === !0;
402
409
  });
403
410
  }), t = c(() => {
404
411
  var r;
@@ -414,66 +421,66 @@ function Ct(e) {
414
421
  };
415
422
  }
416
423
  const le = "createCustomerAddress post /account/address";
417
- function St(e) {
418
- const s = g(), t = C();
419
- return v({
424
+ function Qt(e) {
425
+ const s = g(), t = S();
426
+ return h({
420
427
  ...e,
421
428
  mutationFn: async (n) => s.query(le, p(n)),
422
429
  onSuccess: async (n, r, a) => {
423
- var u, i;
424
- await t.invalidateQueries({ queryKey: R.lists() }), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
430
+ var u, o;
431
+ await t.invalidateQueries({ queryKey: R.lists() }), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
425
432
  }
426
433
  });
427
434
  }
428
435
  const de = "deleteCustomerAddress delete /account/address/{addressId}";
429
- function Pt(e) {
430
- const s = g(), t = C();
431
- return v({
436
+ function Mt(e) {
437
+ const s = g(), t = S();
438
+ return h({
432
439
  ...e,
433
440
  mutationFn: async (n) => s.query(de, p(n)),
434
441
  onSuccess: async (n, r, a) => {
435
- var u, i;
436
- await t.invalidateQueries({ queryKey: R.lists() }), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
442
+ var u, o;
443
+ await t.invalidateQueries({ queryKey: R.lists() }), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
437
444
  }
438
445
  });
439
446
  }
440
447
  const ye = "updateCustomerAddress patch /account/address/{addressId}";
441
- function Qt(e) {
442
- const s = g(), t = C();
443
- return v({
448
+ function Ot(e) {
449
+ const s = g(), t = S();
450
+ return h({
444
451
  ...e,
445
452
  mutationFn: async (n) => s.query(ye, p(n)),
446
453
  onSuccess: async (n, r, a) => {
447
- var i, f;
454
+ var o, f;
448
455
  const { addressId: u } = p(r).params;
449
456
  t.setQueryData(R.detail(u), n), await Promise.all([
450
457
  t.invalidateQueries({ queryKey: R.lists() }),
451
458
  t.invalidateQueries({
452
459
  queryKey: R.detail(p(r).params.addressId),
453
- predicate: (S) => S.queryKey.at(-1) !== u
460
+ predicate: (Q) => Q.queryKey.at(-1) !== u
454
461
  })
455
- ]), await ((f = o((i = o(e)) == null ? void 0 : i.onSuccess)) == null ? void 0 : f(n, r, a));
462
+ ]), await ((f = i((o = i(e)) == null ? void 0 : o.onSuccess)) == null ? void 0 : f(n, r, a));
456
463
  }
457
464
  });
458
465
  }
459
466
  const pe = "addLineItem post /checkout/cart/line-item";
460
- function Mt(e) {
461
- const s = g(), t = C();
462
- return v({
467
+ function Kt(e) {
468
+ const s = g(), t = S();
469
+ return h({
463
470
  ...e,
464
471
  mutationFn: async (n) => s.query(pe, {
465
472
  body: n
466
473
  }),
467
474
  onSuccess: async (n, r, a) => {
468
- var u, i;
469
- t.setQueryData(L.get(), n), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
475
+ var u, o;
476
+ t.setQueryData(L.get(), n), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
470
477
  }
471
478
  });
472
479
  }
473
480
  const ge = "readCart get /checkout/cart";
474
481
  function me(e) {
475
482
  const s = g(), t = L.get();
476
- return P({
483
+ return C({
477
484
  queryKey: t,
478
485
  queryFn: async ({ signal: n }) => s.query(ge, {
479
486
  ...p(e),
@@ -481,58 +488,58 @@ function me(e) {
481
488
  })
482
489
  });
483
490
  }
484
- function Ot() {
485
- return Q(me());
491
+ function At() {
492
+ return P(me());
486
493
  }
487
494
  const fe = "removeLineItem post /checkout/cart/line-item/delete";
488
- function Kt(e) {
489
- const s = g(), t = C();
490
- return v({
495
+ function wt(e) {
496
+ const s = g(), t = S();
497
+ return h({
491
498
  ...e,
492
499
  mutationFn: async (n) => s.query(fe, {
493
500
  body: n
494
501
  }),
495
502
  onSuccess: async (n, r, a) => {
496
- var u, i;
497
- t.setQueryData(L.get(), n), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
503
+ var u, o;
504
+ t.setQueryData(L.get(), n), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
498
505
  }
499
506
  });
500
507
  }
501
- const ve = "updateLineItem patch /checkout/cart/line-item";
502
- function At(e) {
503
- const s = g(), t = C();
504
- return v({
508
+ const he = "updateLineItem patch /checkout/cart/line-item";
509
+ function Rt(e) {
510
+ const s = g(), t = S();
511
+ return h({
505
512
  ...e,
506
- mutationFn: async (n) => s.query(ve, {
513
+ mutationFn: async (n) => s.query(he, {
507
514
  body: n
508
515
  }),
509
516
  onSuccess: async (n, r, a) => {
510
- var u, i;
511
- t.setQueryData(L.get(), n), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
517
+ var u, o;
518
+ t.setQueryData(L.get(), n), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
512
519
  }
513
520
  });
514
521
  }
515
- const he = "createOrder post /checkout/order";
516
- function wt(e) {
517
- const s = g(), t = C();
518
- return v({
522
+ const ve = "createOrder post /checkout/order";
523
+ function Ft(e) {
524
+ const s = g(), t = S();
525
+ return h({
519
526
  ...e,
520
- mutationFn: async (n) => s.query(he, p(n)),
527
+ mutationFn: async (n) => s.query(ve, p(n)),
521
528
  onSuccess: async (n, r, a) => {
522
- var u, i;
529
+ var u, o;
523
530
  await Promise.all([
524
531
  // Clear cart after successful order creation
525
532
  t.invalidateQueries({ queryKey: L.get() }),
526
533
  // Invalidate order list to refetch data
527
534
  t.invalidateQueries({ queryKey: U.lists() })
528
- ]), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
535
+ ]), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
529
536
  }
530
537
  });
531
538
  }
532
539
  const qe = "readLanguages post /language";
533
540
  function Ce(e) {
534
541
  const s = g();
535
- return P({
542
+ return C({
536
543
  queryKey: ee.all(),
537
544
  queryFn: ({ signal: t }) => s.query(qe, {
538
545
  ...p(e),
@@ -540,56 +547,56 @@ function Ce(e) {
540
547
  })
541
548
  });
542
549
  }
543
- function Rt(e) {
544
- return Q(Ce(e));
550
+ function Lt(e) {
551
+ return P(Ce(e));
545
552
  }
546
- const Se = "readCountry post /country", Pe = function(s) {
553
+ const Pe = "readCountry post /country", Se = function(s) {
547
554
  const t = g(), n = j.list(s);
548
- return P({
555
+ return C({
549
556
  queryKey: n,
550
557
  queryFn: async ({ signal: r }) => {
551
558
  const a = p(s);
552
- return t.query(Se, {
559
+ return t.query(Pe, {
553
560
  ...a,
554
561
  signal: r
555
562
  });
556
563
  }
557
564
  });
558
565
  };
559
- function Ft(e) {
560
- return Q(Pe(e));
566
+ function It(e) {
567
+ return P(Se(e));
561
568
  }
562
569
  const Qe = "changeEmail post /account/change-email";
563
- function Lt(e) {
564
- const s = g(), t = C();
565
- return v({
570
+ function xt(e) {
571
+ const s = g(), t = S();
572
+ return h({
566
573
  ...e,
567
574
  mutationFn: async (n) => s.query(Qe, p(n)),
568
575
  onSuccess: async (n, r, a) => {
569
- var u, i;
570
- await t.invalidateQueries({ queryKey: I.all() }), await t.invalidateQueries({ queryKey: F.all() }), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
576
+ var u, o;
577
+ await t.invalidateQueries({ queryKey: I.all() }), await t.invalidateQueries({ queryKey: F.all() }), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
571
578
  }
572
579
  });
573
580
  }
574
581
  const Me = "changeProfile post /account/change-profile";
575
- function It(e) {
576
- const s = g(), t = C();
577
- return v({
582
+ function Ut(e) {
583
+ const s = g(), t = S();
584
+ return h({
578
585
  ...e,
579
586
  mutationFn: async (n) => s.query(Me, p(n)),
580
587
  onSuccess: async (n, r, a) => {
581
- var u, i;
588
+ var u, o;
582
589
  await Promise.all([
583
590
  t.invalidateQueries({ queryKey: I.all() }),
584
591
  t.invalidateQueries({ queryKey: F.all() })
585
- ]), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
592
+ ]), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
586
593
  }
587
594
  });
588
595
  }
589
596
  const Oe = "loginCustomer post /account/login";
590
- function xt(e) {
591
- const s = g(), t = C();
592
- return v({
597
+ function Dt(e) {
598
+ const s = g(), t = S();
599
+ return h({
593
600
  ...e,
594
601
  mutationFn: async (n) => {
595
602
  const r = await s.queryRaw(Oe, {
@@ -598,104 +605,104 @@ function xt(e) {
598
605
  return a && (s.contextToken = a), r.json();
599
606
  },
600
607
  onSuccess: async (n, r, a) => {
601
- var u, i;
608
+ var u, o;
602
609
  await Promise.all([
603
610
  t.resetQueries({ queryKey: F.all() }),
604
611
  t.invalidateQueries({ queryKey: L.get() }),
605
612
  t.invalidateQueries({ queryKey: I.all() })
606
- ]), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
613
+ ]), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
607
614
  }
608
615
  });
609
616
  }
610
617
  const Ke = "logoutCustomer post /account/logout";
611
- function Ut(e) {
612
- const s = g(), t = C();
613
- return v({
618
+ function bt(e) {
619
+ const s = g(), t = S();
620
+ return h({
614
621
  ...e,
615
622
  mutationFn: async (n) => s.query(Ke, p(n)),
616
623
  onSuccess: async (n, r, a) => {
617
- var u, i;
624
+ var u, o;
618
625
  await Promise.all([
619
626
  t.resetQueries({ queryKey: F.all() }),
620
627
  t.invalidateQueries({ queryKey: L.get() }),
621
628
  t.invalidateQueries({ queryKey: I.all() })
622
- ]), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
629
+ ]), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
623
630
  }
624
631
  });
625
632
  }
626
633
  const Ae = "readCustomer post /account/customer";
627
634
  function we(e) {
628
635
  const s = g(), t = I.detail(c(() => p(e).body ?? {}));
629
- return P({
636
+ return C({
630
637
  queryKey: t,
631
638
  queryFn: async () => s.query(Ae, p(e))
632
639
  });
633
640
  }
634
641
  function Re(e) {
635
- return Q(we(e));
642
+ return P(we(e));
636
643
  }
637
644
  const Fe = "register post /account/register";
638
- function bt(e) {
639
- const s = g(), t = C();
640
- return v({
645
+ function kt(e) {
646
+ const s = g(), t = S();
647
+ return h({
641
648
  ...e,
642
649
  mutationFn: async (n) => s.query(Fe, p(n)),
643
650
  onSuccess: async (n, r, a) => {
644
- var u, i;
645
- await t.invalidateQueries({ queryKey: I.all() }), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
651
+ var u, o;
652
+ await t.invalidateQueries({ queryKey: I.all() }), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
646
653
  }
647
654
  });
648
655
  }
649
656
  const Le = "defaultBillingAddress patch /account/address/default-billing/{addressId}";
650
- function kt(e) {
651
- const s = g(), t = C();
652
- return v({
657
+ function Bt(e) {
658
+ const s = g(), t = S();
659
+ return h({
653
660
  ...e,
654
661
  mutationFn: async (n) => s.query(Le, p(n)),
655
662
  onSuccess: async (n, r, a) => {
656
- var u, i;
663
+ var u, o;
657
664
  await Promise.all([
658
665
  t.invalidateQueries({ queryKey: I.all() }),
659
666
  t.invalidateQueries({ queryKey: F.all() })
660
- ]), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
667
+ ]), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
661
668
  }
662
669
  });
663
670
  }
664
671
  const Ie = "defaultShippingAddress patch /account/address/default-shipping/{addressId}";
665
- function Bt(e) {
666
- const s = g(), t = C();
667
- return v({
672
+ function Nt(e) {
673
+ const s = g(), t = S();
674
+ return h({
668
675
  ...e,
669
676
  mutationFn: async (n) => s.query(Ie, p(n)),
670
677
  onSuccess: async (n, r, a) => {
671
- var u, i;
678
+ var u, o;
672
679
  await Promise.all([
673
680
  t.invalidateQueries({ queryKey: I.all() }),
674
681
  t.invalidateQueries({ queryKey: F.all() })
675
- ]), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
682
+ ]), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
676
683
  }
677
684
  });
678
685
  }
679
686
  const xe = "deleteCustomer delete /account/customer";
680
- function Dt(e) {
681
- const s = g(), t = C();
682
- return v({
687
+ function Tt(e) {
688
+ const s = g(), t = S();
689
+ return h({
683
690
  ...e,
684
691
  mutationFn: async (n) => s.query(xe, p(n)),
685
692
  onSuccess: async (n, r, a) => {
686
- var u, i;
693
+ var u, o;
687
694
  await Promise.all([
688
695
  t.resetQueries({ queryKey: I.all() }),
689
696
  t.resetQueries({ queryKey: F.all() }),
690
697
  t.resetQueries({ queryKey: L.get() })
691
- ]), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
698
+ ]), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
692
699
  }
693
700
  });
694
701
  }
695
702
  const Ue = "registerConfirm post /account/register-confirm";
696
- function Nt(e) {
703
+ function Et(e) {
697
704
  const s = g();
698
- return v({
705
+ return h({
699
706
  ...e,
700
707
  mutationFn: async (t) => {
701
708
  const n = await s.queryRaw(Ue, {
@@ -705,67 +712,67 @@ function Nt(e) {
705
712
  },
706
713
  onSuccess: async (t, n, r) => {
707
714
  var a, u;
708
- await ((u = o((a = o(e)) == null ? void 0 : a.onSuccess)) == null ? void 0 : u(t, n, r));
715
+ await ((u = i((a = i(e)) == null ? void 0 : a.onSuccess)) == null ? void 0 : u(t, n, r));
709
716
  }
710
717
  });
711
718
  }
712
- const be = "sendRecoveryMail post /account/recovery-password";
713
- function Tt(e) {
719
+ const De = "sendRecoveryMail post /account/recovery-password";
720
+ function jt(e) {
714
721
  const s = g();
715
- return v({
722
+ return h({
716
723
  ...e,
717
- mutationFn: async (t) => s.query(be, p(t)),
724
+ mutationFn: async (t) => s.query(De, p(t)),
718
725
  onSuccess: async (t, n, r) => {
719
726
  var a, u;
720
- await ((u = o((a = o(e)) == null ? void 0 : a.onSuccess)) == null ? void 0 : u(t, n, r));
727
+ await ((u = i((a = i(e)) == null ? void 0 : a.onSuccess)) == null ? void 0 : u(t, n, r));
721
728
  }
722
729
  });
723
730
  }
724
- const ke = "changePassword post /account/change-password";
725
- function Et(e) {
731
+ const be = "changePassword post /account/change-password";
732
+ function Vt(e) {
726
733
  const s = g();
727
- return v({
734
+ return h({
728
735
  ...e,
729
- mutationFn: async (t) => s.query(ke, p(t)),
736
+ mutationFn: async (t) => s.query(be, p(t)),
730
737
  onSuccess: async (t, n, r) => {
731
738
  var a, u;
732
- await ((u = o((a = o(e)) == null ? void 0 : a.onSuccess)) == null ? void 0 : u(t, n, r));
739
+ await ((u = i((a = i(e)) == null ? void 0 : a.onSuccess)) == null ? void 0 : u(t, n, r));
733
740
  }
734
741
  });
735
742
  }
736
- const Be = "imitateCustomerLogin post /account/login/imitate-customer";
737
- function De(e) {
743
+ const ke = "imitateCustomerLogin post /account/login/imitate-customer";
744
+ function Be(e) {
738
745
  const s = g(), t = I.imitateLogin(c(() => p(e).body ?? {}));
739
- return P({
746
+ return C({
740
747
  queryKey: t,
741
- queryFn: async () => s.query(Be, p(e))
748
+ queryFn: async () => s.query(ke, p(e))
742
749
  });
743
750
  }
744
- function jt(e) {
745
- return Q(De(e));
751
+ function $t(e) {
752
+ return P(Be(e));
746
753
  }
747
754
  const Ne = "recoveryPassword post /account/recovery-password-confirm";
748
- function Vt(e) {
755
+ function zt(e) {
749
756
  const s = g();
750
- return v({
757
+ return h({
751
758
  ...e,
752
759
  mutationFn: async (t) => s.query(Ne, p(t)),
753
760
  onSuccess: async (t, n, r) => {
754
761
  var a, u;
755
- await ((u = o((a = o(e)) == null ? void 0 : a.onSuccess)) == null ? void 0 : u(t, n, r));
762
+ await ((u = i((a = i(e)) == null ? void 0 : a.onSuccess)) == null ? void 0 : u(t, n, r));
756
763
  }
757
764
  });
758
765
  }
759
766
  const Te = "readNavigation post /navigation/{activeId}/{rootId}", Ee = function(s, t, n) {
760
- const r = g(), a = b.detail(s, t, n);
761
- return P({
767
+ const r = g(), a = D.detail(s, t, n);
768
+ return C({
762
769
  queryKey: a,
763
770
  queryFn: async ({ signal: u }) => {
764
- const i = o(s), f = o(t), S = p(n);
771
+ const o = i(s), f = i(t), Q = p(n);
765
772
  return r.query(Te, {
766
- ...S,
773
+ ...Q,
767
774
  params: {
768
- activeId: i,
775
+ activeId: o,
769
776
  rootId: f
770
777
  },
771
778
  signal: u
@@ -773,8 +780,8 @@ const Te = "readNavigation post /navigation/{activeId}/{rootId}", Ee = function(
773
780
  }
774
781
  });
775
782
  };
776
- function $t(e, s, t) {
777
- return Q(Ee(e, s, t));
783
+ function Gt(e, s, t) {
784
+ return P(Ee(e, s, t));
778
785
  }
779
786
  const je = "readPaymentMethod post /payment-method";
780
787
  function Ve(e) {
@@ -782,7 +789,7 @@ function Ve(e) {
782
789
  var n;
783
790
  return (n = p(e)) == null ? void 0 : n.body;
784
791
  }));
785
- return P({
792
+ return C({
786
793
  queryKey: t,
787
794
  queryFn: ({ signal: n }) => s.query(je, {
788
795
  ...p(e),
@@ -791,35 +798,35 @@ function Ve(e) {
791
798
  });
792
799
  }
793
800
  function $e(e) {
794
- return Q(Ve(e));
801
+ return P(Ve(e));
795
802
  }
796
803
  const ze = "handlePaymentMethod post /handle-payment";
797
- function zt(e) {
798
- const s = g(), t = C();
799
- return v({
804
+ function Ht(e) {
805
+ const s = g(), t = S();
806
+ return h({
800
807
  ...e,
801
808
  mutationFn: async (n) => s.query(ze, p(n)),
802
809
  onSuccess: async (n, r, a) => {
803
- var u, i;
804
- await t.invalidateQueries({ queryKey: L.get() }), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
810
+ var u, o;
811
+ await t.invalidateQueries({ queryKey: L.get() }), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
805
812
  }
806
813
  });
807
814
  }
808
815
  const Ge = "orderSetPayment post /order/payment";
809
- function Gt(e) {
810
- const s = g(), t = C();
811
- return v({
816
+ function Wt(e) {
817
+ const s = g(), t = S();
818
+ return h({
812
819
  ...e,
813
820
  mutationFn: async (n) => s.query(Ge, p(n)),
814
821
  onSuccess: async (n, r, a) => {
815
- var u, i;
816
- await t.invalidateQueries({ queryKey: U.all() }), await ((i = o((u = o(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : i(n, r, a));
822
+ var u, o;
823
+ await t.invalidateQueries({ queryKey: U.all() }), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, r, a));
817
824
  }
818
825
  });
819
826
  }
820
827
  const He = "readCategoryList post /category", We = function(s) {
821
- const t = g(), n = B.list(s);
822
- return P({
828
+ const t = g(), n = k.list(s);
829
+ return C({
823
830
  queryKey: n,
824
831
  queryFn: async ({ signal: r }) => t.query(He, {
825
832
  ...p(s),
@@ -827,13 +834,13 @@ const He = "readCategoryList post /category", We = function(s) {
827
834
  })
828
835
  });
829
836
  };
830
- function Ht(e) {
831
- return Q(We(e));
837
+ function Jt(e) {
838
+ return P(We(e));
832
839
  }
833
840
  const Je = "readCompactProductListing post /novu/headless/product-listing/{seoUrl}";
834
841
  function Xe(e, s) {
835
- const t = g(), n = w.list(e, s);
836
- return P({
842
+ const t = g(), n = A.list(e, s);
843
+ return C({
837
844
  queryKey: n,
838
845
  queryFn: async ({ signal: r }) => {
839
846
  const a = p(s);
@@ -841,20 +848,20 @@ function Xe(e, s) {
841
848
  ...a,
842
849
  params: {
843
850
  ...a.params,
844
- seoUrl: V(o(e))
851
+ seoUrl: V(i(e))
845
852
  },
846
853
  signal: r
847
854
  });
848
855
  }
849
856
  });
850
857
  }
851
- function Wt(e, s) {
852
- return Q(Xe(e, s));
858
+ function Xt(e, s) {
859
+ return P(Xe(e, s));
853
860
  }
854
861
  const Ye = "readCustomProductDetail post /novu/headless/product/{seoUrl}";
855
862
  function Ze(e, s) {
856
- const t = g(), n = w.customDetail(e, s);
857
- return P({
863
+ const t = g(), n = A.customDetail(e, s);
864
+ return C({
858
865
  queryKey: n,
859
866
  queryFn: async ({ signal: r }) => {
860
867
  const a = p(s);
@@ -862,20 +869,20 @@ function Ze(e, s) {
862
869
  ...a,
863
870
  params: {
864
871
  ...a.params,
865
- seoUrl: V(o(e))
872
+ seoUrl: V(i(e))
866
873
  },
867
874
  signal: r
868
875
  });
869
876
  }
870
877
  });
871
878
  }
872
- function Jt(e, s) {
873
- return Q(Ze(e, s));
879
+ function Yt(e, s) {
880
+ return P(Ze(e, s));
874
881
  }
875
882
  const _e = "searchPage post /search";
876
883
  function et(e) {
877
- const s = g(), t = w.search(e);
878
- return P({
884
+ const s = g(), t = A.search(e);
885
+ return C({
879
886
  queryKey: t,
880
887
  queryFn: async ({ signal: n }) => {
881
888
  const r = p(e);
@@ -886,13 +893,13 @@ function et(e) {
886
893
  }
887
894
  });
888
895
  }
889
- function Xt(e) {
890
- return Q(et(e));
896
+ function Zt(e) {
897
+ return P(et(e));
891
898
  }
892
899
  const tt = "readProduct post /product";
893
900
  function nt(e) {
894
- const s = g(), t = w.detail(e);
895
- return P({
901
+ const s = g(), t = A.headlessDetail(e);
902
+ return C({
896
903
  queryKey: t,
897
904
  queryFn: async ({ signal: n }) => {
898
905
  const r = p(e);
@@ -903,71 +910,92 @@ function nt(e) {
903
910
  }
904
911
  });
905
912
  }
906
- function Yt(e) {
907
- return Q(nt(e));
913
+ function _t(e) {
914
+ return P(nt(e));
908
915
  }
909
- const st = "readSalutation post /salutation", rt = function(s) {
910
- const t = g(), n = E.list(s);
911
- return P({
916
+ const st = "readProductDetail post /product/{productId}";
917
+ function rt(e, s) {
918
+ const t = g(), n = A.detail(e, s);
919
+ return C({
912
920
  queryKey: n,
913
921
  queryFn: async ({ signal: r }) => {
914
922
  const a = p(s);
915
923
  return t.query(st, {
924
+ ...a,
925
+ params: {
926
+ ...a.params,
927
+ productId: i(e)
928
+ },
929
+ signal: r
930
+ });
931
+ }
932
+ });
933
+ }
934
+ function en(e, s) {
935
+ return P(rt(e, s));
936
+ }
937
+ const at = "readSalutation post /salutation", ut = function(s) {
938
+ const t = g(), n = E.list(s);
939
+ return C({
940
+ queryKey: n,
941
+ queryFn: async ({ signal: r }) => {
942
+ const a = p(s);
943
+ return t.query(at, {
916
944
  ...a,
917
945
  signal: r
918
946
  });
919
947
  }
920
948
  });
921
949
  };
922
- function Zt(e) {
923
- return Q(rt(e));
950
+ function tn(e) {
951
+ return P(ut(e));
924
952
  }
925
- const at = "readSeoUrl post /seo-url", ut = function(s) {
953
+ const ot = "readSeoUrl post /seo-url", it = function(s) {
926
954
  const t = g(), n = T.list(s);
927
- return P({
955
+ return C({
928
956
  queryKey: n,
929
957
  queryFn: async ({ signal: r }) => {
930
958
  const a = p(s);
931
- return t.query(at, {
959
+ return t.query(ot, {
932
960
  ...a,
933
961
  signal: r
934
962
  });
935
963
  }
936
964
  });
937
965
  };
938
- function _t(e) {
939
- return Q(ut(e));
966
+ function nn(e) {
967
+ return P(it(e));
940
968
  }
941
- const it = "readShippingMethod post /shipping-method";
942
- function ot(e) {
943
- const s = g(), t = D.list(c(() => {
969
+ const ct = "readShippingMethod post /shipping-method";
970
+ function lt(e) {
971
+ const s = g(), t = B.list(c(() => {
944
972
  var n;
945
973
  return (n = p(e)) == null ? void 0 : n.body;
946
974
  }));
947
- return P({
975
+ return C({
948
976
  queryKey: t,
949
- queryFn: ({ signal: n }) => s.query(it, {
977
+ queryFn: ({ signal: n }) => s.query(ct, {
950
978
  ...p(e),
951
979
  signal: n
952
980
  })
953
981
  });
954
982
  }
955
- function ct(e) {
956
- return Q(ot(e));
983
+ function dt(e) {
984
+ return P(lt(e));
957
985
  }
958
- function en() {
959
- const e = k(), s = $(), t = $e({
986
+ function sn() {
987
+ const e = b(), s = $(), t = $e({
960
988
  query: {
961
989
  onlyAvailable: !0
962
990
  }
963
- }), n = c(() => s.isPending.value), r = async (i) => s.mutateAsync({
964
- paymentMethodId: i
991
+ }), n = c(() => s.isPending.value), r = async (o) => s.mutateAsync({
992
+ paymentMethodId: o
965
993
  }), a = c(() => {
966
- var i, f;
967
- return (f = (i = e.data) == null ? void 0 : i.value) == null ? void 0 : f.paymentMethod;
994
+ var o, f;
995
+ return (f = (o = e.data) == null ? void 0 : o.value) == null ? void 0 : f.paymentMethod;
968
996
  }), u = c(() => {
969
- var i, f, S;
970
- return ((S = (f = (i = t.data) == null ? void 0 : i.value) == null ? void 0 : f.elements) == null ? void 0 : S.sort((d, M) => (d.position ?? 0) - (M.position ?? 0))) ?? [];
997
+ var o, f, Q;
998
+ return ((Q = (f = (o = t.data) == null ? void 0 : o.value) == null ? void 0 : f.elements) == null ? void 0 : Q.sort((d, M) => (d.position ?? 0) - (M.position ?? 0))) ?? [];
971
999
  });
972
1000
  return {
973
1001
  contextUpdateMutation: s,
@@ -979,19 +1007,19 @@ function en() {
979
1007
  paymentMethods: u
980
1008
  };
981
1009
  }
982
- function tn() {
983
- const e = k(), s = $(), t = ct({
1010
+ function rn() {
1011
+ const e = b(), s = $(), t = dt({
984
1012
  query: {
985
1013
  onlyAvailable: !0
986
1014
  }
987
- }), n = c(() => s.isPending.value), r = async (i) => s.mutateAsync({
988
- shippingMethodId: i
1015
+ }), n = c(() => s.isPending.value), r = async (o) => s.mutateAsync({
1016
+ shippingMethodId: o
989
1017
  }), a = c(() => {
990
- var i, f;
991
- return (f = (i = e.data) == null ? void 0 : i.value) == null ? void 0 : f.shippingMethod;
1018
+ var o, f;
1019
+ return (f = (o = e.data) == null ? void 0 : o.value) == null ? void 0 : f.shippingMethod;
992
1020
  }), u = c(() => {
993
- var i, f;
994
- return ((f = (i = t.data) == null ? void 0 : i.value) == null ? void 0 : f.elements.sort((S, d) => (S.position ?? 0) - (d.position ?? 0))) ?? [];
1021
+ var o, f;
1022
+ return ((f = (o = t.data) == null ? void 0 : o.value) == null ? void 0 : f.elements.sort((Q, d) => (Q.position ?? 0) - (d.position ?? 0))) ?? [];
995
1023
  });
996
1024
  return {
997
1025
  contextUpdateMutation: s,
@@ -1003,7 +1031,7 @@ function tn() {
1003
1031
  shippingMethods: u
1004
1032
  };
1005
1033
  }
1006
- const lt = (e, s) => {
1034
+ const yt = (e, s) => {
1007
1035
  var n;
1008
1036
  const t = (n = e == null ? void 0 : e.extensions) == null ? void 0 : n.novuSeoUrls;
1009
1037
  if (Array.isArray(s)) {
@@ -1011,52 +1039,52 @@ const lt = (e, s) => {
1011
1039
  return r ? (t == null ? void 0 : t[r]) ?? "" : "";
1012
1040
  }
1013
1041
  return (t == null ? void 0 : t[s]) ?? "";
1014
- }, nn = () => {
1015
- const e = k(), s = c(() => {
1042
+ }, an = () => {
1043
+ const e = b(), s = c(() => {
1016
1044
  var t, n, r;
1017
1045
  return ((r = (n = (t = e.data) == null ? void 0 : t.value) == null ? void 0 : n.context) == null ? void 0 : r.languageIdChain) ?? [];
1018
1046
  });
1019
1047
  return (t, n) => {
1020
1048
  const r = [n, ...s.value];
1021
- return lt(o(t), o(r));
1049
+ return yt(i(t), i(r));
1022
1050
  };
1023
1051
  };
1024
- function sn(e) {
1052
+ function un(e) {
1025
1053
  const { total: s, limit: t, page: n, totalCountMode: r } = e ?? {}, a = Z({
1026
1054
  page: n ?? 1,
1027
1055
  total: s ?? 0,
1028
1056
  limit: t,
1029
1057
  totalCountMode: r
1030
- }), u = c(() => a.limit === void 0 ? 1 : Math.max(1, Math.ceil(a.total / a.limit))), i = c({
1058
+ }), u = c(() => a.limit === void 0 ? 1 : Math.max(1, Math.ceil(a.total / a.limit))), o = c({
1031
1059
  get() {
1032
1060
  return a.page;
1033
1061
  },
1034
1062
  set(O) {
1035
- a.page = Math.max(1, Math.min(o(u), O));
1063
+ a.page = Math.max(1, Math.min(i(u), O));
1036
1064
  }
1037
1065
  });
1038
1066
  H(
1039
- [() => o(u), () => a],
1067
+ [() => i(u), () => a],
1040
1068
  ([O, y]) => {
1041
1069
  a.page = Math.min(O, a.page), a.total = y.total ?? 0, a.limit = y.limit;
1042
1070
  }
1043
1071
  );
1044
- const f = c(() => a.page === o(u)), S = c(() => a.page === 1), d = c(() => ({
1072
+ const f = c(() => a.page === i(u)), Q = c(() => a.page === 1), d = c(() => ({
1045
1073
  p: a.page,
1046
1074
  limit: a.limit,
1047
1075
  "total-count-mode": a.totalCountMode ?? "none"
1048
1076
  })), M = (O) => {
1049
- H(() => o(O), (y) => {
1077
+ H(() => i(O), (y) => {
1050
1078
  y && (a.total = (y == null ? void 0 : y.total) ?? 0, a.limit = (y == null ? void 0 : y.limit) ?? 0);
1051
1079
  });
1052
1080
  };
1053
1081
  return {
1054
- page: o(i),
1082
+ page: i(o),
1055
1083
  total: W(a, "total"),
1056
1084
  limit: W(a, "limit"),
1057
1085
  pageCount: u,
1058
1086
  isLastPage: f,
1059
- isFirstPage: S,
1087
+ isFirstPage: Q,
1060
1088
  usePaginationSync: M,
1061
1089
  // This can be used to pass the pagination options directly to the query options
1062
1090
  queryOptions: d
@@ -1073,32 +1101,32 @@ function X(e) {
1073
1101
  unitPrice: n
1074
1102
  }));
1075
1103
  }
1076
- function rn(e) {
1104
+ function on(e) {
1077
1105
  const s = c(() => {
1078
1106
  var y;
1079
1107
  return (y = e.value) == null ? void 0 : y.calculatedCheapestPrice;
1080
1108
  }), t = c(
1081
1109
  () => {
1082
- var y, h, K, A, l;
1083
- return (((h = (y = e.value) == null ? void 0 : y.calculatedPrices) == null ? void 0 : h.length) ?? 0) > 0 ? (A = (K = e.value) == null ? void 0 : K.calculatedPrices) == null ? void 0 : A[0] : (l = e.value) == null ? void 0 : l.calculatedPrice;
1110
+ var y, v, K, w, l;
1111
+ return (((v = (y = e.value) == null ? void 0 : y.calculatedPrices) == null ? void 0 : v.length) ?? 0) > 0 ? (w = (K = e.value) == null ? void 0 : K.calculatedPrices) == null ? void 0 : w[0] : (l = e.value) == null ? void 0 : l.calculatedPrice;
1084
1112
  }
1085
1113
  ), n = c(() => {
1086
1114
  var y;
1087
1115
  return (y = t == null ? void 0 : t.value) == null ? void 0 : y.referencePrice;
1088
1116
  }), r = c(() => {
1089
- var y, h;
1090
- return (((h = (y = e.value) == null ? void 0 : y.calculatedPrices) == null ? void 0 : h.length) ?? 0) > 1;
1117
+ var y, v;
1118
+ return (((v = (y = e.value) == null ? void 0 : y.calculatedPrices) == null ? void 0 : v.length) ?? 0) > 1;
1091
1119
  }), a = c(
1092
1120
  () => {
1093
- var y, h, K, A, l, m;
1094
- return !!((y = e.value) != null && y.parentId) && ((K = (h = e.value) == null ? void 0 : h.calculatedCheapestPrice) == null ? void 0 : K.hasRange) && ((A = t == null ? void 0 : t.value) == null ? void 0 : A.unitPrice) !== ((l = s == null ? void 0 : s.value) == null ? void 0 : l.unitPrice) && ((m = s == null ? void 0 : s.value) == null ? void 0 : m.unitPrice);
1121
+ var y, v, K, w, l, m;
1122
+ return !!((y = e.value) != null && y.parentId) && ((K = (v = e.value) == null ? void 0 : v.calculatedCheapestPrice) == null ? void 0 : K.hasRange) && ((w = t == null ? void 0 : t.value) == null ? void 0 : w.unitPrice) !== ((l = s == null ? void 0 : s.value) == null ? void 0 : l.unitPrice) && ((m = s == null ? void 0 : s.value) == null ? void 0 : m.unitPrice);
1095
1123
  }
1096
1124
  ), u = c(
1097
1125
  () => {
1098
- var y, h;
1099
- return r.value && X(e.value).length > 1 ? (h = (y = e.value) == null ? void 0 : y.calculatedPrices) == null ? void 0 : h.reduce((K, A) => A.unitPrice < K.unitPrice ? A : K) : t.value;
1126
+ var y, v;
1127
+ return r.value && X(e.value).length > 1 ? (v = (y = e.value) == null ? void 0 : y.calculatedPrices) == null ? void 0 : v.reduce((K, w) => w.unitPrice < K.unitPrice ? w : K) : t.value;
1100
1128
  }
1101
- ), i = c(
1129
+ ), o = c(
1102
1130
  () => {
1103
1131
  var y;
1104
1132
  return (y = u.value) == null ? void 0 : y.unitPrice;
@@ -1108,21 +1136,21 @@ function rn(e) {
1108
1136
  var y;
1109
1137
  return (y = u.value) == null ? void 0 : y.totalPrice;
1110
1138
  }
1111
- ), S = c(
1139
+ ), Q = c(
1112
1140
  () => u.value
1113
1141
  ), d = c(() => {
1114
- var y, h;
1115
- return !!((h = (y = u.value) == null ? void 0 : y.listPrice) != null && h.percentage);
1142
+ var y, v;
1143
+ return !!((v = (y = u.value) == null ? void 0 : y.listPrice) != null && v.percentage);
1116
1144
  }), M = c(
1117
1145
  () => {
1118
- var y, h, K;
1119
- return (K = (h = (y = e.value) == null ? void 0 : y.calculatedPrice) == null ? void 0 : h.regulationPrice) == null ? void 0 : K.price;
1146
+ var y, v, K;
1147
+ return (K = (v = (y = e.value) == null ? void 0 : y.calculatedPrice) == null ? void 0 : v.regulationPrice) == null ? void 0 : K.price;
1120
1148
  }
1121
1149
  ), O = c(() => X(e.value));
1122
1150
  return {
1123
- price: S,
1151
+ price: Q,
1124
1152
  totalPrice: f,
1125
- unitPrice: i,
1153
+ unitPrice: o,
1126
1154
  displayFromVariants: a,
1127
1155
  displayFrom: r,
1128
1156
  tierPrices: O,
@@ -1131,7 +1159,7 @@ function rn(e) {
1131
1159
  regulationPrice: M
1132
1160
  };
1133
1161
  }
1134
- function dt(e, s) {
1162
+ function pt(e, s) {
1135
1163
  var n;
1136
1164
  const t = (n = e.extensions) == null ? void 0 : n.variants;
1137
1165
  return s.length === 0 ? (t == null ? void 0 : t.find((r) => {
@@ -1142,16 +1170,16 @@ function dt(e, s) {
1142
1170
  return (a = r.optionIds) == null ? void 0 : a.every((u) => s.includes(u));
1143
1171
  });
1144
1172
  }
1145
- function an(e, s) {
1146
- return c(() => dt(o(e), o(s)));
1173
+ function cn(e, s) {
1174
+ return c(() => pt(i(e), i(s)));
1147
1175
  }
1148
- function un(e) {
1176
+ function ln(e) {
1149
1177
  return c(() => {
1150
1178
  var s, t, n, r, a, u;
1151
- return !!((t = (s = o(e)) == null ? void 0 : s.customer) != null && t.id) && !!((r = (n = o(e)) == null ? void 0 : n.customer) != null && r.active) && !((u = (a = o(e)) == null ? void 0 : a.customer) != null && u.guest);
1179
+ return !!((t = (s = i(e)) == null ? void 0 : s.customer) != null && t.id) && !!((r = (n = i(e)) == null ? void 0 : n.customer) != null && r.active) && !((u = (a = i(e)) == null ? void 0 : a.customer) != null && u.guest);
1152
1180
  });
1153
1181
  }
1154
- function on(e) {
1182
+ function dn(e) {
1155
1183
  const s = Re(e ? { body: e } : void 0), t = c(() => {
1156
1184
  var d;
1157
1185
  return (d = s.data) == null ? void 0 : d.value;
@@ -1173,7 +1201,7 @@ function on(e) {
1173
1201
  var d;
1174
1202
  return ((d = t.value) == null ? void 0 : d.defaultBillingAddressId) || null;
1175
1203
  }
1176
- ), i = c(
1204
+ ), o = c(
1177
1205
  () => {
1178
1206
  var d;
1179
1207
  return ((d = t.value) == null ? void 0 : d.defaultShippingAddressId) || null;
@@ -1183,7 +1211,7 @@ function on(e) {
1183
1211
  var d;
1184
1212
  return ((d = t.value) == null ? void 0 : d.defaultBillingAddress) || null;
1185
1213
  }
1186
- ), S = c(
1214
+ ), Q = c(
1187
1215
  () => {
1188
1216
  var d;
1189
1217
  return ((d = t.value) == null ? void 0 : d.defaultShippingAddress) || null;
@@ -1196,104 +1224,106 @@ function on(e) {
1196
1224
  isCustomerSession: r,
1197
1225
  isGuestSession: a,
1198
1226
  defaultBillingAddressId: u,
1199
- defaultShippingAddressId: i,
1227
+ defaultShippingAddressId: o,
1200
1228
  userDefaultBillingAddress: f,
1201
- userDefaultShippingAddress: S,
1229
+ userDefaultShippingAddress: Q,
1202
1230
  // Expose queries and mutations directly
1203
1231
  customerQuery: s
1204
1232
  };
1205
1233
  }
1206
1234
  export {
1207
- ft as absolutizeSeoUrl,
1235
+ vt as absolutizeSeoUrl,
1208
1236
  R as addressKeys,
1209
1237
  L as cartKeys,
1210
- B as categoryKeys,
1238
+ k as categoryKeys,
1211
1239
  F as contextKeys,
1212
1240
  j as countryKeys,
1213
1241
  I as customerKeys,
1214
- dt as getProductVariantForOptions,
1242
+ pt as getProductVariantForOptions,
1215
1243
  ee as languageKey,
1216
- b as navigationKeys,
1244
+ D as navigationKeys,
1217
1245
  U as orderKeys,
1218
1246
  N as paymentKeys,
1219
- w as productKeys,
1247
+ A as productKeys,
1220
1248
  je as readPaymentMethodOperation,
1221
- it as readShippingMethodOperation,
1249
+ ct as readShippingMethodOperation,
1222
1250
  V as relativizeSeoUrl,
1223
1251
  E as salutationKeys,
1224
1252
  T as seoUrlKeys,
1225
- D as shippingKeys,
1253
+ B as shippingKeys,
1226
1254
  _ as shopwareClientKey,
1227
1255
  p as unrefOptions,
1228
- Mt as useAddLineItemMutation,
1229
- Lt as useChangeEmailMutation,
1230
- Et as useChangePasswordMutation,
1231
- It as useChangeProfileMutation,
1232
- ht as useCheckoutAddresses,
1233
- St as useCreateCustomerAddressMutation,
1234
- wt as useCreateOrderMutation,
1235
- kt as useDefaultBillingAddressMutation,
1236
- Bt as useDefaultShippingAddressMutation,
1237
- Pt as useDeleteCustomerAddressMutation,
1238
- Dt as useDeleteCustomerMutation,
1239
- zt as useHandlePaymentMutation,
1240
- jt as useImitateCustomerLoginQuery,
1241
- De as useImitateCustomerLoginQueryOptions,
1242
- un as useIsLoggedIn,
1256
+ Kt as useAddLineItemMutation,
1257
+ xt as useChangeEmailMutation,
1258
+ Vt as useChangePasswordMutation,
1259
+ Ut as useChangeProfileMutation,
1260
+ Ct as useCheckoutAddresses,
1261
+ Qt as useCreateCustomerAddressMutation,
1262
+ Ft as useCreateOrderMutation,
1263
+ Bt as useDefaultBillingAddressMutation,
1264
+ Nt as useDefaultShippingAddressMutation,
1265
+ Mt as useDeleteCustomerAddressMutation,
1266
+ Tt as useDeleteCustomerMutation,
1267
+ Ht as useHandlePaymentMutation,
1268
+ $t as useImitateCustomerLoginQuery,
1269
+ Be as useImitateCustomerLoginQueryOptions,
1270
+ ln as useIsLoggedIn,
1243
1271
  se as useListAddressQuery,
1244
1272
  ne as useListAddressQueryOptions,
1245
- xt as useLoginCustomerMutation,
1246
- Ut as useLogoutCustomerMutation,
1247
- vt as useOptimistic,
1248
- qt as useOrderDetails,
1249
- Ct as useOrderPayment,
1250
- Gt as useOrderSetPaymentMutation,
1251
- sn as usePagination,
1252
- en as usePaymentMethods,
1253
- rn as useProductPrice,
1254
- an as useProductVariantForOptions,
1255
- Ot as useReadCartQuery,
1273
+ Dt as useLoginCustomerMutation,
1274
+ bt as useLogoutCustomerMutation,
1275
+ qt as useOptimistic,
1276
+ Pt as useOrderDetails,
1277
+ St as useOrderPayment,
1278
+ Wt as useOrderSetPaymentMutation,
1279
+ un as usePagination,
1280
+ sn as usePaymentMethods,
1281
+ on as useProductPrice,
1282
+ cn as useProductVariantForOptions,
1283
+ At as useReadCartQuery,
1256
1284
  me as useReadCartQueryOptions,
1257
- Ht as useReadCategoryListQuery,
1285
+ Jt as useReadCategoryListQuery,
1258
1286
  We as useReadCategoryListQueryOptions,
1259
- Wt as useReadCompactProductListingQuery,
1287
+ Xt as useReadCompactProductListingQuery,
1260
1288
  Xe as useReadCompactProductListingQueryOptions,
1261
- k as useReadContextQuery,
1289
+ b as useReadContextQuery,
1262
1290
  ae as useReadContextQueryOptions,
1263
- Ft as useReadCountryQuery,
1264
- Pe as useReadCountryQueryOptions,
1291
+ It as useReadCountryQuery,
1292
+ Se as useReadCountryQueryOptions,
1265
1293
  Ze as useReadCustomProductDetailOptions,
1266
- Jt as useReadCustomProductDetailQuery,
1294
+ Yt as useReadCustomProductDetailQuery,
1267
1295
  Re as useReadCustomerQuery,
1268
1296
  we as useReadCustomerQueryOptions,
1269
- Rt as useReadLanguageQuery,
1297
+ Lt as useReadLanguageQuery,
1270
1298
  Ce as useReadLanguageQueryOptions,
1271
- $t as useReadNavigationQuery,
1299
+ Gt as useReadNavigationQuery,
1272
1300
  Ee as useReadNavigationQueryOptions,
1273
1301
  ce as useReadOrderQuery,
1274
- oe as useReadOrderQueryOptions,
1302
+ ie as useReadOrderQueryOptions,
1275
1303
  $e as useReadPaymentMethodQuery,
1276
1304
  Ve as useReadPaymentMethodQueryOptions,
1277
- Yt as useReadProductQuery,
1305
+ en as useReadProductDetailQuery,
1306
+ rt as useReadProductDetailQueryOptions,
1307
+ _t as useReadProductQuery,
1278
1308
  nt as useReadProductQueryOptions,
1279
- Zt as useReadSalutationQuery,
1280
- rt as useReadSalutationQueryOptions,
1281
- _t as useReadSeoUrlQuery,
1282
- ut as useReadSeoUrlQueryOptions,
1283
- ct as useReadShippingMethodQuery,
1284
- ot as useReadShippingMethodQueryOptions,
1285
- Vt as useRecoveryPasswordMutation,
1286
- Nt as useRegisterConfirmMutation,
1287
- bt as useRegisterCustomerMutation,
1288
- Kt as useRemoveLineItemMutation,
1289
- Xt as useSearchPageQuery,
1309
+ tn as useReadSalutationQuery,
1310
+ ut as useReadSalutationQueryOptions,
1311
+ nn as useReadSeoUrlQuery,
1312
+ it as useReadSeoUrlQueryOptions,
1313
+ dt as useReadShippingMethodQuery,
1314
+ lt as useReadShippingMethodQueryOptions,
1315
+ zt as useRecoveryPasswordMutation,
1316
+ Et as useRegisterConfirmMutation,
1317
+ kt as useRegisterCustomerMutation,
1318
+ wt as useRemoveLineItemMutation,
1319
+ Zt as useSearchPageQuery,
1290
1320
  et as useSearchPageQueryOptions,
1291
- Tt as useSendRecoveryMailMutation,
1292
- nn as useSeoUrl,
1293
- tn as useShippingMethods,
1321
+ jt as useSendRecoveryMailMutation,
1322
+ an as useSeoUrl,
1323
+ rn as useShippingMethods,
1294
1324
  g as useShopwareQueryClient,
1295
1325
  $ as useUpdateContextMutation,
1296
- Qt as useUpdateCustomerAddressMutation,
1297
- At as useUpdateLineItemMutation,
1298
- on as useUser
1326
+ Ot as useUpdateCustomerAddressMutation,
1327
+ Rt as useUpdateLineItemMutation,
1328
+ dn as useUser
1299
1329
  };