@soma-vertical-web/multi-lib 0.0.48 → 0.0.50

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/index2.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  import * as n from "yup";
2
- import { f as se, r as w, a as ae, b as ie, d as ce, e as le, c as ue, p as de } from "./__vite-browser-external-C4n7rb1H.mjs";
3
- import { jsxs as z, Fragment as G, jsx as I } from "react/jsx-runtime";
4
- import { Utils as j, helpers as B } from "@soma-vertical-web/core-components";
2
+ import { r as N, g as v, S as se, a as ae, f as ie, b as ce, d as le, c as ue, p as de, e as pe } from "./index-VkanwPXK.mjs";
3
+ import { jsxs as z, Fragment as _, jsx as I } from "react/jsx-runtime";
4
+ import { Utils as j, helpers as G } from "@soma-vertical-web/core-components";
5
5
  import me from "sanitize-html";
6
- const g = async (e, t = {}) => {
6
+ const f = async (e, t = {}) => {
7
7
  const { method: o = "GET", body: r, headers: s = {}, priority: a = "auto", cache: i = "default" } = t;
8
8
  return fetch(e, {
9
9
  method: o,
@@ -19,17 +19,17 @@ const g = async (e, t = {}) => {
19
19
  }).then((c) => c.json()).catch((c) => {
20
20
  console.error("[ERROR FETCH VTEX]", c);
21
21
  });
22
- }, P = /* @__PURE__ */ new Map();
23
- async function pe(e, t = {}) {
22
+ }, w = /* @__PURE__ */ new Map();
23
+ async function ge(e, t = {}) {
24
24
  var o;
25
25
  try {
26
26
  const { abort: r = !1 } = t, s = new AbortController();
27
- r && (P.has(e) && ((o = P.get(e)) == null || o.abort(), P.delete(e)), P.set(e, s));
28
- const a = g(e, {
27
+ r && (w.has(e) && ((o = w.get(e)) == null || o.abort(), w.delete(e)), w.set(e, s));
28
+ const a = f(e, {
29
29
  ...t,
30
30
  ...r ? { signal: s.signal } : {}
31
31
  });
32
- return r && P.delete(e), a;
32
+ return r && w.delete(e), a;
33
33
  } catch (r) {
34
34
  if (r.name === "AbortError") {
35
35
  console.log(`[REQUEST CANCELLED]: ${e}`);
@@ -42,14 +42,14 @@ const fe = n.object({
42
42
  country: n.string().length(3, "Country code must be 3 characters long").required("Country is required"),
43
43
  postalCode: n.string().nullable()
44
44
  });
45
- async function ge({ apiUrl: e, body: t, fetchOptions: o }) {
45
+ async function he({ apiUrl: e, body: t, fetchOptions: o }) {
46
46
  if (!t) {
47
47
  console.error("[ERROR FETCHING] Body is required");
48
48
  return;
49
49
  }
50
50
  await fe.validate(t);
51
51
  const { country: r, postalCode: s } = t;
52
- return await g(
52
+ return await f(
53
53
  `${e}/api/checkout/pub/postal-code/${r}/${s}`,
54
54
  {
55
55
  method: "POST",
@@ -58,7 +58,7 @@ async function ge({ apiUrl: e, body: t, fetchOptions: o }) {
58
58
  }
59
59
  );
60
60
  }
61
- const he = n.object({
61
+ const Ie = n.object({
62
62
  orderFormId: n.string().nullable(),
63
63
  sellerCode: n.string().nullable(),
64
64
  sellerName: n.string().nullable()
@@ -72,9 +72,9 @@ async function Q({
72
72
  console.error("[ERROR FETCHING] Body is required");
73
73
  return;
74
74
  }
75
- await he.validate(t);
75
+ await Ie.validate(t);
76
76
  const { orderFormId: r, sellerCode: s, sellerName: a } = t, i = s ? `${s.trim()} - ${a}` : null;
77
- return g(
77
+ return f(
78
78
  `${e}/api/checkout/pub/orderForm/${r}/attachments/openTextField`,
79
79
  {
80
80
  method: "POST",
@@ -85,22 +85,22 @@ async function Q({
85
85
  }
86
86
  );
87
87
  }
88
- const Ie = n.object({
88
+ const ye = n.object({
89
89
  orderFormId: n.string().nullable(),
90
90
  sellerCode: n.string().nullable(),
91
91
  marketingData: n.object()
92
92
  });
93
- async function J({ apiUrl: e, body: t, fetchOptions: o }) {
93
+ async function K({ apiUrl: e, body: t, fetchOptions: o }) {
94
94
  if (!t) {
95
95
  console.error("[ERROR FETCHING] Body is required");
96
96
  return;
97
97
  }
98
- await Ie.validate(t);
98
+ await ye.validate(t);
99
99
  const { orderFormId: r, sellerCode: s, marketingData: a } = t, i = s ? {
100
100
  utmCampaign: s ? s.toUpperCase() : "",
101
101
  utmiCampaign: s ? "codigodavendedora" : "semcodigo"
102
102
  } : {};
103
- return g(
103
+ return f(
104
104
  `${e}/api/checkout/pub/orderForm/${r}/attachments/marketingData`,
105
105
  {
106
106
  method: "POST",
@@ -117,14 +117,14 @@ const be = n.object({
117
117
  sellerCode: n.string().nullable(),
118
118
  sellerName: n.string().nullable()
119
119
  });
120
- async function ye({ apiUrl: e, body: t, fetchOptions: o }) {
120
+ async function Ce({ apiUrl: e, body: t, fetchOptions: o }) {
121
121
  if (!t) {
122
122
  console.error("[ERROR FETCHING] Body is required");
123
123
  return;
124
124
  }
125
125
  await be.validate(t);
126
126
  const r = await Q({ apiUrl: e, body: t, fetchOptions: o });
127
- return J({
127
+ return K({
128
128
  apiUrl: e,
129
129
  body: {
130
130
  ...t,
@@ -133,11 +133,11 @@ async function ye({ apiUrl: e, body: t, fetchOptions: o }) {
133
133
  fetchOptions: o
134
134
  });
135
135
  }
136
- const ve = n.object({
136
+ const Re = n.object({
137
137
  orderFormId: n.string().nullable(),
138
138
  coupon: n.string().nullable()
139
139
  });
140
- async function Ce({
140
+ async function ve({
141
141
  apiUrl: e,
142
142
  body: t,
143
143
  fetchOptions: o
@@ -146,9 +146,9 @@ async function Ce({
146
146
  console.error("[ERROR FETCHING] Body is required");
147
147
  return;
148
148
  }
149
- await ve.validate(t);
149
+ await Re.validate(t);
150
150
  const { coupon: r = "", orderFormId: s } = t;
151
- return g(
151
+ return f(
152
152
  `${e}/api/checkout/pub/orderForm/${s}/coupons`,
153
153
  {
154
154
  method: "POST",
@@ -157,12 +157,12 @@ async function Ce({
157
157
  }
158
158
  );
159
159
  }
160
- const Re = n.object({
160
+ const Fe = n.object({
161
161
  appId: n.string().required("App ID is required"),
162
162
  orderFormId: n.string().nullable(),
163
163
  key: n.array().of(n.string())
164
164
  });
165
- async function Fe({
165
+ async function Te({
166
166
  apiUrl: e,
167
167
  body: t,
168
168
  fetchOptions: o
@@ -171,9 +171,9 @@ async function Fe({
171
171
  console.error("[ERROR FETCHING] Body is required");
172
172
  return;
173
173
  }
174
- await Re.validate(t);
174
+ await Fe.validate(t);
175
175
  const { appId: r = "faststore", orderFormId: s, key: a } = t;
176
- return g(
176
+ return f(
177
177
  `${e}/api/checkout/pub/orderForm/${s}/customData/${r}/${a}`,
178
178
  {
179
179
  method: "PUT",
@@ -181,23 +181,23 @@ async function Fe({
181
181
  }
182
182
  );
183
183
  }
184
- const $e = n.object().shape({
184
+ const Se = n.object().shape({
185
185
  name: n.string().required("Attachment name is required"),
186
186
  content: n.object().nullable()
187
187
  });
188
188
  var M;
189
- const Se = n.object().shape({
190
- attachments: (M = n.array().of($e)) == null ? void 0 : M.nullable(),
189
+ const Oe = n.object().shape({
190
+ attachments: (M = n.array().of(Se)) == null ? void 0 : M.nullable(),
191
191
  id: n.string().required("ID of SKU is required"),
192
192
  index: n.number().integer().nullable(),
193
193
  quantity: n.number().integer().nullable(),
194
194
  seller: n.string().required("Seller is required"),
195
195
  price: n.number().integer()
196
- }), Oe = n.object({
196
+ }), Ee = n.object({
197
197
  orderFormId: n.string().required("OrderFormId is required"),
198
- orderItems: n.array().of(Se)
198
+ orderItems: n.array().of(Oe)
199
199
  });
200
- async function Te({
200
+ async function qe({
201
201
  apiUrl: e,
202
202
  body: t,
203
203
  fetchOptions: o
@@ -206,9 +206,9 @@ async function Te({
206
206
  console.error("[ERROR FETCHING] Body is required");
207
207
  return;
208
208
  }
209
- await Oe.validate(t);
209
+ await Ee.validate(t);
210
210
  const { orderFormId: r, orderItems: s } = t;
211
- return g(
211
+ return f(
212
212
  `${e}/api/checkout/pub/orderForm/${r}/items`,
213
213
  {
214
214
  method: "POST",
@@ -217,10 +217,10 @@ async function Te({
217
217
  }
218
218
  );
219
219
  }
220
- const Ee = n.object({
220
+ const $e = n.object({
221
221
  orderFormId: n.string().nullable()
222
222
  });
223
- async function qe({
223
+ async function Pe({
224
224
  apiUrl: e,
225
225
  body: t,
226
226
  fetchOptions: o
@@ -229,9 +229,9 @@ async function qe({
229
229
  console.error("[ERROR FETCHING] Body is required");
230
230
  return;
231
231
  }
232
- await Ee.validate(t);
232
+ await $e.validate(t);
233
233
  const { orderFormId: r } = t;
234
- return g(
234
+ return f(
235
235
  `${e}/api/checkout/pub/orderForm/${r}/items/removeAll`,
236
236
  {
237
237
  method: "POST",
@@ -244,16 +244,16 @@ const Ae = n.object().shape({
244
244
  content: n.object().nullable()
245
245
  });
246
246
  var x;
247
- const ke = n.object().shape({
247
+ const we = n.object().shape({
248
248
  attachments: (x = n.array().of(Ae)) == null ? void 0 : x.nullable(),
249
249
  id: n.string().required("ID of SKU is required"),
250
250
  index: n.number().integer().nullable(),
251
251
  quantity: n.number().integer().nullable(),
252
252
  seller: n.string().required("Seller is required"),
253
253
  price: n.number().integer()
254
- }), Pe = n.object({
254
+ }), ke = n.object({
255
255
  orderFormId: n.string().nullable(),
256
- orderItems: n.array().of(ke)
256
+ orderItems: n.array().of(we)
257
257
  });
258
258
  async function Ne({
259
259
  apiUrl: e,
@@ -264,9 +264,9 @@ async function Ne({
264
264
  console.error("[ERROR FETCHING] Body is required");
265
265
  return;
266
266
  }
267
- await Pe.validate(t);
267
+ await ke.validate(t);
268
268
  const { orderFormId: r, orderItems: s } = t;
269
- return g(
269
+ return f(
270
270
  `${e}/api/checkout/pub/orderForm/${r}/items/update`,
271
271
  {
272
272
  method: "POST",
@@ -275,10 +275,10 @@ async function Ne({
275
275
  }
276
276
  );
277
277
  }
278
- const we = n.object({
278
+ const je = n.object({
279
279
  orderFormId: n.string().nullable()
280
280
  });
281
- async function je({
281
+ async function De({
282
282
  apiUrl: e,
283
283
  body: t,
284
284
  fetchOptions: o
@@ -287,9 +287,9 @@ async function je({
287
287
  console.error("[ERROR FETCHING] Body is required");
288
288
  return;
289
289
  }
290
- await we.validate(t);
290
+ await je.validate(t);
291
291
  const { orderFormId: r } = t;
292
- return g(
292
+ return f(
293
293
  `${e}/api/checkout/pub/orderForm/${r}/messages/clear`,
294
294
  {
295
295
  method: "POST",
@@ -297,30 +297,30 @@ async function je({
297
297
  }
298
298
  );
299
299
  }
300
- const De = n.object({
300
+ const He = n.object({
301
301
  id: n.string().nullable(),
302
302
  // id offering
303
303
  itemIndex: n.number().nullable(),
304
304
  orderFormId: n.string().nullable(),
305
305
  remove: n.boolean().nullable()
306
306
  });
307
- async function He({ apiUrl: e, body: t, fetchOptions: o }) {
307
+ async function _e({ apiUrl: e, body: t, fetchOptions: o }) {
308
308
  if (!t) {
309
309
  console.error("[ERROR FETCHING] Body is required");
310
310
  return;
311
311
  }
312
- await De.validate(t);
312
+ await He.validate(t);
313
313
  const { itemIndex: r, orderFormId: s, id: a, remove: i } = t, c = i ? `/${a}/remove` : "", u = `${e}/api/checkout/pub/orderForm/${s}/items/${r}/offerings${c}`;
314
- return g(u, {
314
+ return f(u, {
315
315
  method: "POST",
316
316
  body: { id: a },
317
317
  ...o
318
318
  });
319
319
  }
320
- const _e = n.object({
320
+ const Be = n.object({
321
321
  orderFormId: n.string().nullable()
322
322
  });
323
- async function Be({
323
+ async function Ge({
324
324
  apiUrl: e,
325
325
  body: t,
326
326
  fetchOptions: o,
@@ -331,13 +331,13 @@ async function Be({
331
331
  console.error("[ERROR FETCHING] Body is required");
332
332
  return;
333
333
  }
334
- await _e.validate(t);
334
+ await Be.validate(t);
335
335
  const s = new URLSearchParams({
336
336
  refreshOutdatedData: "true"
337
337
  }), a = t.orderFormId && ((i = r.orderFormPurchaseId) == null ? void 0 : i.value) !== t.orderFormId ? `${e}/api/checkout/pub/orderForm/${t.orderFormId}?${String(s)}` : `${e}/api/checkout/pub/orderForm`;
338
- return g(a, { method: "GET", ...o });
338
+ return f(a, { method: "GET", ...o });
339
339
  }
340
- const Ge = n.object({
340
+ const Le = n.object({
341
341
  orderFormId: n.string().nullable(),
342
342
  email: n.string().email().required(),
343
343
  firstName: n.string().required(),
@@ -355,9 +355,9 @@ async function Ue({
355
355
  console.error("[ERROR FETCHING] Body is required");
356
356
  return;
357
357
  }
358
- await Ge.validate(t);
358
+ await Le.validate(t);
359
359
  const { orderFormId: r, ...s } = t;
360
- return g(
360
+ return f(
361
361
  `${e}/api/checkout/pub/orderForm/${r}/attachments/clientProfileData`,
362
362
  {
363
363
  method: "POST",
@@ -369,7 +369,7 @@ async function Ue({
369
369
  const Ve = n.object({
370
370
  sellerCode: n.string().nullable()
371
371
  });
372
- async function Le({
372
+ async function Me({
373
373
  apiUrl: e,
374
374
  body: t,
375
375
  fetchOptions: o
@@ -380,7 +380,7 @@ async function Le({
380
380
  }
381
381
  await Ve.validate(t);
382
382
  const { sellerCode: r = "" } = t;
383
- return g(
383
+ return f(
384
384
  `${e}/api/dataentities/VD/search?_fields=id,cod,name,ativo&cod=${r}`,
385
385
  {
386
386
  method: "GET",
@@ -391,12 +391,12 @@ async function Le({
391
391
  }
392
392
  );
393
393
  }
394
- const Me = n.object().shape({
394
+ const xe = n.object().shape({
395
395
  country: n.string().length(3, "Country code must be 3 characters long").required("Country is required"),
396
396
  orderFormId: n.string().nullable(),
397
397
  postalCode: n.string().nullable()
398
398
  });
399
- async function xe({
399
+ async function ze({
400
400
  apiUrl: e,
401
401
  body: t,
402
402
  fetchOptions: o
@@ -405,7 +405,7 @@ async function xe({
405
405
  console.error("[ERROR FETCHING] Body is required");
406
406
  return;
407
407
  }
408
- await Me.validate(t);
408
+ await xe.validate(t);
409
409
  const { country: r, orderFormId: s, postalCode: a } = t, i = a ? {
410
410
  address: {
411
411
  addressType: "residential",
@@ -416,7 +416,7 @@ async function xe({
416
416
  logisticsInfo: [],
417
417
  clearAddressIfPostalCodeNotFound: !0
418
418
  };
419
- return g(
419
+ return f(
420
420
  `${e}/api/checkout/pub/orderForm/${s}/attachments/shippingData`,
421
421
  {
422
422
  method: "POST",
@@ -425,7 +425,7 @@ async function xe({
425
425
  }
426
426
  );
427
427
  }
428
- const ze = n.object().shape({
428
+ const Qe = n.object().shape({
429
429
  orderFormId: n.string().nullable(),
430
430
  options: n.array().of(
431
431
  n.object().shape({
@@ -453,14 +453,14 @@ const ze = n.object().shape({
453
453
  })
454
454
  )
455
455
  });
456
- async function Qe({ apiUrl: e, body: t, fetchOptions: o }) {
456
+ async function Ke({ apiUrl: e, body: t, fetchOptions: o }) {
457
457
  if (!t) {
458
458
  console.error("[ERROR FETCHING] Body is required");
459
459
  return;
460
460
  }
461
- await ze.validate(t);
461
+ await Qe.validate(t);
462
462
  const { orderFormId: r, options: s, selectedAddresses: a } = t;
463
- return g(
463
+ return f(
464
464
  `${e}/api/checkout/pub/orderForm/${r}/attachments/shippingData`,
465
465
  {
466
466
  method: "POST",
@@ -481,7 +481,7 @@ const Je = n.object({
481
481
  latitude: n.number().required()
482
482
  })
483
483
  });
484
- async function Ke({ apiUrl: e, body: t, fetchOptions: o }) {
484
+ async function We({ apiUrl: e, body: t, fetchOptions: o }) {
485
485
  if (!t) {
486
486
  console.error("[ERROR FETCHING] Body is required");
487
487
  return;
@@ -491,7 +491,7 @@ async function Ke({ apiUrl: e, body: t, fetchOptions: o }) {
491
491
  return a ? i.append("postalCode", a) : i.append(
492
492
  "geoCoordinates",
493
493
  `${s == null ? void 0 : s.longitude};${s == null ? void 0 : s.latitude}`
494
- ), await g(
494
+ ), await f(
495
495
  `${e}/api/checkout/pub/regions/?${i.toString()}`,
496
496
  {
497
497
  method: "GET",
@@ -499,22 +499,22 @@ async function Ke({ apiUrl: e, body: t, fetchOptions: o }) {
499
499
  }
500
500
  );
501
501
  }
502
- const We = n.object({
502
+ const Xe = n.object({
503
503
  id: n.string().required("ID of SKU is required"),
504
504
  quantity: n.number().integer().required("Quantity of item is required"),
505
505
  seller: n.string()
506
- }), Xe = n.object({
507
- items: n.array().of(We),
506
+ }), Ye = n.object({
507
+ items: n.array().of(Xe),
508
508
  country: n.string().length(3, "Country code must be 3 characters long").required("Country is required"),
509
509
  postalCode: n.string().nullable(),
510
510
  geoCoordinates: n.array().nullable().of(n.number()).length(2)
511
511
  });
512
- async function Ye({ apiUrl: e, body: t, fetchOptions: o }) {
512
+ async function Ze({ apiUrl: e, body: t, fetchOptions: o }) {
513
513
  if (!t) {
514
514
  console.error("[ERROR FETCHING] Body is required");
515
515
  return;
516
516
  }
517
- return await Xe.validate(t), g(
517
+ return await Ye.validate(t), f(
518
518
  `${e}/api/checkout/pub/orderForms/simulation`,
519
519
  {
520
520
  method: "POST",
@@ -523,94 +523,94 @@ async function Ye({ apiUrl: e, body: t, fetchOptions: o }) {
523
523
  }
524
524
  );
525
525
  }
526
- const Ze = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
526
+ const et = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
527
527
  __proto__: null,
528
- getMasterDataSellerCode: Le,
529
- getOrderForm: Be,
530
- postOrderFormAddCoupon: Ce,
528
+ getMasterDataSellerCode: Me,
529
+ getOrderForm: Ge,
530
+ postOrderFormAddCoupon: ve,
531
531
  postOrderFormAttachClientProfileData: Ue,
532
- postOrderFormAttachOrderFormData: ye,
533
- postOrderFormAttachShippingData: xe,
534
- postOrderFormAttachmentsMarketingData: J,
532
+ postOrderFormAttachOrderFormData: Ce,
533
+ postOrderFormAttachShippingData: ze,
534
+ postOrderFormAttachmentsMarketingData: K,
535
535
  postOrderFormAttachmentsOpenTextField: Q,
536
- postOrderFormClearMessages: je,
537
- postOrderFormFreightSimulation: Ye,
538
- postOrderFormItems: Te,
539
- postOrderFormRegion: Ke,
540
- postOrderFormRemoveAllItems: qe,
536
+ postOrderFormClearMessages: De,
537
+ postOrderFormFreightSimulation: Ze,
538
+ postOrderFormItems: qe,
539
+ postOrderFormRegion: We,
540
+ postOrderFormRemoveAllItems: Pe,
541
541
  postOrderFormUpdateItems: Ne,
542
- postOrderFormUpdateShippingData: Qe,
543
- postOrderformAddress: ge,
544
- putOrderFormCustomData: Fe,
545
- updateOrderFormOffering: He
546
- }, Symbol.toStringTag, { value: "Module" })), et = n.object({
542
+ postOrderFormUpdateShippingData: Ke,
543
+ postOrderformAddress: he,
544
+ putOrderFormCustomData: Te,
545
+ updateOrderFormOffering: _e
546
+ }, Symbol.toStringTag, { value: "Module" })), tt = n.object({
547
547
  skuId: n.string()
548
548
  });
549
- async function tt({ apiUrl: e, body: t, fetchOptions: o }) {
549
+ async function rt({ apiUrl: e, body: t, fetchOptions: o }) {
550
550
  if (!t) {
551
551
  console.error("[ERROR FETCHING] Body is required");
552
552
  return;
553
553
  }
554
- await et.validate(t);
554
+ await tt.validate(t);
555
555
  const { skuId: r } = t;
556
- return g(
556
+ return f(
557
557
  `${e}/api/catalog/pvt/stockkeepingunitkit?parentSkuId=${r}`,
558
558
  {
559
559
  ...o
560
560
  }
561
561
  );
562
562
  }
563
- const rt = n.object({
563
+ const ot = n.object({
564
564
  ids: n.array().of(n.string().required("ID are required")).required("IDs are required")
565
565
  });
566
- async function ot({ apiUrl: e, body: t, fetchOptions: o }) {
566
+ async function nt({ apiUrl: e, body: t, fetchOptions: o }) {
567
567
  if (!t) {
568
568
  console.error("[ERROR FETCHING] Body is required");
569
569
  return;
570
570
  }
571
- await rt.validate(t);
571
+ await ot.validate(t);
572
572
  const { ids: r } = t;
573
- return g(
573
+ return f(
574
574
  `${e}/api/catalog_system/pub/products/search?fq=${r.map((s) => `productId:${s}`).join("&fq=")}`,
575
575
  {
576
576
  ...o
577
577
  }
578
578
  );
579
579
  }
580
- const nt = n.object({
580
+ const st = n.object({
581
581
  productId: n.number().required("Product ID is required")
582
582
  });
583
- async function st({ apiUrl: e, body: t, fetchOptions: o }) {
583
+ async function at({ apiUrl: e, body: t, fetchOptions: o }) {
584
584
  if (!t) {
585
585
  console.error("[ERROR FETCHING] Body is required");
586
586
  return;
587
587
  }
588
- await nt.validate(t);
588
+ await st.validate(t);
589
589
  const { productId: r } = t;
590
- return g(
590
+ return f(
591
591
  `${e}/api/catalog_system/pub/products/crossselling/similars/${r.toString()}`,
592
592
  {
593
593
  ...o
594
594
  }
595
595
  );
596
596
  }
597
- const at = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
597
+ const it = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
598
598
  __proto__: null,
599
- getCatalogKitProducts: tt,
600
- getCatalogProducts: ot,
601
- getCatalogSimilars: st
602
- }, Symbol.toStringTag, { value: "Module" })), it = (e = "") => e.charAt(0).toUpperCase() + e.slice(1), U = (e, t = " ") => !e || typeof e == "string" && e.length === 0 ? e : (Array.isArray(e) ? e : e.split("-")).map(it).join(t), ct = ({ canonical: e, seo: t, slug: o }) => {
599
+ getCatalogKitProducts: rt,
600
+ getCatalogProducts: nt,
601
+ getCatalogSimilars: at
602
+ }, Symbol.toStringTag, { value: "Module" })), ct = (e = "") => e.charAt(0).toUpperCase() + e.slice(1), L = (e, t = " ") => !e || typeof e == "string" && e.length === 0 ? e : (Array.isArray(e) ? e : e.split("-")).map(ct).join(t), lt = ({ canonical: e, seo: t, slug: o }) => {
603
603
  const r = Array.isArray(o) ? o.join(", ") : o;
604
604
  return {
605
605
  id: 0,
606
- Title: `${Array.isArray(o) ? o.map((a) => U(a)).join(",") : U(o)} - ${t.title}`,
606
+ Title: `${Array.isArray(o) ? o.map((a) => L(a)).join(",") : L(o)} - ${t.title}`,
607
607
  MetaTagDescription: t.description,
608
608
  name: r,
609
609
  hasChildren: !1,
610
610
  url: e,
611
611
  children: []
612
612
  };
613
- }, lt = ({ canonical: e, category: t, previousImages: o, seo: r }) => ({
613
+ }, ut = ({ canonical: e, category: t, previousImages: o, seo: r }) => ({
614
614
  category: String(t == null ? void 0 : t.id),
615
615
  title: (t == null ? void 0 : t.Title) ?? r.title,
616
616
  description: (t == null ? void 0 : t.MetaTagDescription) ?? r.description,
@@ -621,14 +621,14 @@ const at = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
621
621
  description: (t == null ? void 0 : t.MetaTagDescription) ?? r.description,
622
622
  images: Array.isArray(o) ? [...o] : []
623
623
  }
624
- }), ut = ({ items: e, parent: t, apiUrl: o, find: r }) => {
624
+ }), dt = ({ items: e, parent: t, apiUrl: o, find: r }) => {
625
625
  const s = e.find(
626
626
  (i) => i.url.replace(o, "") === decodeURIComponent(t.toLowerCase())
627
627
  );
628
628
  return (s == null ? void 0 : s.children.find(
629
629
  (i) => i.name.toLowerCase() === decodeURIComponent(String(r))
630
630
  )) ?? s;
631
- }, dt = (e) => {
631
+ }, pt = (e) => {
632
632
  e instanceof Error ? (console.error(`[ERROR CATEGORY INFO]: ${e.message}`), console.error(e.stack)) : console.error("[ERROR CATEGORY INFO]: Unknown error", e);
633
633
  }, mt = /* @__PURE__ */ new Set([
634
634
  "brand",
@@ -637,12 +637,12 @@ const at = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
637
637
  "subcategory",
638
638
  "collection",
639
639
  "cluster"
640
- ]), pt = (e) => typeof (e == null ? void 0 : e.pageType) == "string" && mt.has(e == null ? void 0 : e.pageType.toLowerCase()), ft = (e) => ({
640
+ ]), gt = (e) => typeof (e == null ? void 0 : e.pageType) == "string" && mt.has(e == null ? void 0 : e.pageType.toLowerCase()), ft = (e) => ({
641
641
  collection: e.Coleção,
642
642
  categoryId: e.categoryId,
643
643
  current_collection: e["Coleção Atual"],
644
644
  items: e.items
645
- }), gt = (e, t) => e.reduce((o, r) => {
645
+ }), ht = (e, t) => e.reduce((o, r) => {
646
646
  if (r.items.filter(
647
647
  (i) => i.sellers.find((c) => c.commertialOffer.IsAvailable)
648
648
  ).length === 0 || (o == null ? void 0 : o.find((i) => (i == null ? void 0 : i.productId) === (r == null ? void 0 : r.productId))) !== void 0)
@@ -656,122 +656,16 @@ const at = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
656
656
  textureImage: (a == null ? void 0 : a.imageUrl) ?? "",
657
657
  textureAlt: (a == null ? void 0 : a.imageText) ?? ""
658
658
  }), o;
659
- }, []), ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
659
+ }, []), It = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
660
660
  __proto__: null,
661
- createEmptySeoCategory: ct,
662
- createSeoCategory: lt,
663
- findCategory: ut,
664
- formattedSimilars: gt,
665
- isCollectionPageType: pt,
666
- notFindCategoryError: dt,
661
+ createEmptySeoCategory: lt,
662
+ createSeoCategory: ut,
663
+ findCategory: dt,
664
+ formattedSimilars: ht,
665
+ isCollectionPageType: gt,
666
+ notFindCategoryError: pt,
667
667
  responseAdapter: ft
668
- }, Symbol.toStringTag, { value: "Module" }));
669
- async function It({ contentType: e, storeId: t, CMS_PROJECT_NAME: o, NextCookies: r }) {
670
- const s = await R({
671
- contentType: e,
672
- storeId: t,
673
- CMS_PROJECT_NAME: o,
674
- NextCookies: r
675
- });
676
- if (s.status === 200) {
677
- const a = {
678
- timestamp: (/* @__PURE__ */ new Date()).toISOString(),
679
- contentType: e,
680
- data: s.data
681
- };
682
- console.log("Resultado da chamada:", s);
683
- const i = `backup-${e}-${Date.now()}.json`;
684
- return await se.writeFile(
685
- `./backups/${i}`,
686
- JSON.stringify(a, null, 2),
687
- "utf-8"
688
- ), { success: !0, fileName: i };
689
- }
690
- return { success: !1, error: s.error || "No data to backup" };
691
- }
692
- async function bt(e) {
693
- return It(e);
694
- }
695
- async function yt({
696
- contentType: e,
697
- documentId: t,
698
- versionId: o,
699
- storeId: r,
700
- CMS_PROJECT_NAME: s
701
- }) {
702
- const a = t && t.length ? `/${t}` : "", i = o && o.length ? `?versionId=${o}` : "";
703
- return fetch(
704
- `https://${r}.myvtex.com/_v/cms/api/${s}/${e}${a}${i}`,
705
- { cache: "no-cache" }
706
- );
707
- }
708
- async function vt({
709
- contentType: e,
710
- documents: t,
711
- NextCookies: o,
712
- CMS_PROJECT_NAME: r,
713
- storeId: s
714
- }) {
715
- var i;
716
- const a = JSON.parse(
717
- ((i = o().get("cms_preview_data")) == null ? void 0 : i.value) ?? "{}"
718
- );
719
- if (a && (a == null ? void 0 : a.contentType) === e) {
720
- const c = a.documentId && a.documentId.length ? `/${a.documentId}` : "", u = a != null && a.versionId && (a != null && a.versionId.length) ? `?versionId=${a == null ? void 0 : a.versionId}` : "", h = await (await fetch(
721
- `https://${s}.myvtex.com/_v/cms/api/${r}/${e}${c}${u}`,
722
- { cache: "no-store" }
723
- )).json(), l = t.filter(
724
- (m) => h.id !== m.documentId
725
- );
726
- return l.unshift(h), l;
727
- }
728
- return t;
729
- }
730
- async function R({
731
- contentType: e,
732
- NextCookies: t,
733
- CMS_PROJECT_NAME: o,
734
- storeId: r
735
- }) {
736
- var d, h;
737
- const s = JSON.parse(
738
- ((d = t().get("cms_preview_data")) == null ? void 0 : d.value) ?? "{}"
739
- ), a = [];
740
- let i = 1, c = 0, u = !0;
741
- try {
742
- do {
743
- const m = await (await fetch(
744
- `https://${r}.myvtex.com/_v/cms/api/${o}/${e}?page=${i}`
745
- )).json();
746
- i === 1 && (c = m.totalItems), (h = m == null ? void 0 : m.data) != null && h.length && a.push(...m.data), u = m.hasNextPage, i++;
747
- } while (u && a.length < c);
748
- if (s.previewMode && a.length) {
749
- const l = await vt({
750
- contentType: e,
751
- documents: a,
752
- NextCookies: t,
753
- CMS_PROJECT_NAME: o,
754
- storeId: r
755
- });
756
- return {
757
- status: l.length > 0 ? 200 : 404,
758
- data: l ?? []
759
- };
760
- }
761
- return {
762
- status: a.length ? 200 : 404,
763
- data: a
764
- };
765
- } catch (l) {
766
- return { status: "error", data: [], error: l };
767
- }
768
- }
769
- const Ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
770
- __proto__: null,
771
- cmsBackup: bt,
772
- getCMSContentType: yt,
773
- getContentType: R
774
- }, Symbol.toStringTag, { value: "Module" })), Rt = ({
668
+ }, Symbol.toStringTag, { value: "Module" })), yt = ({
775
669
  slug: e,
776
670
  data: t,
777
671
  SectionZone: o,
@@ -779,22 +673,22 @@ const Ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
779
673
  }) => {
780
674
  const s = t == null ? void 0 : t.find(
781
675
  (h) => {
782
- var l, m, f, p;
783
- return ((m = (l = h.config) == null ? void 0 : l.responsive) == null ? void 0 : m.deviceType) === "desktop" && ((p = (f = h.config) == null ? void 0 : f.seo) == null ? void 0 : p.slug) === e;
676
+ var d, g, m, p;
677
+ return ((g = (d = h.config) == null ? void 0 : d.responsive) == null ? void 0 : g.deviceType) === "desktop" && ((p = (m = h.config) == null ? void 0 : m.seo) == null ? void 0 : p.slug) === e;
784
678
  }
785
679
  ), a = s == null ? void 0 : s.config.responsive.gapCustom, i = s == null ? void 0 : s.config.responsive.gapSections, c = t == null ? void 0 : t.find(
786
680
  (h) => {
787
- var l, m, f, p;
788
- return ((m = (l = h.config) == null ? void 0 : l.responsive) == null ? void 0 : m.deviceType) === "mobile" && ((p = (f = h.config) == null ? void 0 : f.seo) == null ? void 0 : p.slug) === e;
681
+ var d, g, m, p;
682
+ return ((g = (d = h.config) == null ? void 0 : d.responsive) == null ? void 0 : g.deviceType) === "mobile" && ((p = (m = h.config) == null ? void 0 : m.seo) == null ? void 0 : p.slug) === e;
789
683
  }
790
- ), u = c == null ? void 0 : c.config.responsive.gapCustom, d = c == null ? void 0 : c.config.responsive.gapSections;
791
- return /* @__PURE__ */ z(G, { children: [
684
+ ), u = c == null ? void 0 : c.config.responsive.gapCustom, l = c == null ? void 0 : c.config.responsive.gapSections;
685
+ return /* @__PURE__ */ z(_, { children: [
792
686
  /* @__PURE__ */ I(
793
687
  j.Column,
794
688
  {
795
689
  gap: a && i ? i : r,
796
- className: B.classNameConcat(
797
- w["responsive-desktop-flex"],
690
+ className: G.classNameConcat(
691
+ N["responsive-desktop-flex"],
798
692
  "utils-column-modifier"
799
693
  ),
800
694
  children: /* @__PURE__ */ I(o, { data: (s == null ? void 0 : s.sections) ?? [] })
@@ -803,27 +697,27 @@ const Ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
803
697
  /* @__PURE__ */ I(
804
698
  j.Column,
805
699
  {
806
- gap: u && d ? d : r,
807
- className: B.classNameConcat(
808
- w["responsive-mobile-flex"],
700
+ gap: u && l ? l : r,
701
+ className: G.classNameConcat(
702
+ N["responsive-mobile-flex"],
809
703
  "utils-column-modifier"
810
704
  ),
811
705
  children: /* @__PURE__ */ I(o, { data: (c == null ? void 0 : c.sections) ?? [] })
812
706
  }
813
707
  )
814
708
  ] });
815
- }, Ft = async ({
709
+ }, bt = async ({
816
710
  slug: e,
817
711
  SectionZone: t,
818
712
  COMMON_PAGE_COLUMN_GAP: o,
819
713
  ...r
820
714
  }) => {
821
- const { data: s } = await R({
715
+ const { data: s } = await v({
822
716
  contentType: "common_page",
823
717
  ...r
824
718
  });
825
719
  return /* @__PURE__ */ I(
826
- Rt,
720
+ yt,
827
721
  {
828
722
  data: s,
829
723
  slug: e,
@@ -831,7 +725,7 @@ const Ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
831
725
  COMMON_PAGE_COLUMN_GAP: o
832
726
  }
833
727
  );
834
- }, $t = async ({
728
+ }, Ct = async ({
835
729
  PAYMENT_FLAGS_DICTIONARY: e,
836
730
  PAYMENT_FLAGS: t,
837
731
  LEGAL_INFORMATION_TEXT: o,
@@ -841,31 +735,31 @@ const Ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
841
735
  FooterSupport: i,
842
736
  ...c
843
737
  }) => {
844
- var l, m, f, p, S, F, $, O, T, E, b, q;
845
- const { data: u } = await R({
738
+ var d, g, m, p, S, F, T, O, E, q, y, $;
739
+ const { data: u } = await v({
846
740
  contentType: "footer",
847
741
  ...c
848
- }), d = Array.isArray(u) && ((m = (l = u[0]) == null ? void 0 : l.name) == null ? void 0 : m.toLowerCase()) === "footer" ? u[0] : null, h = {
849
- ...(f = d == null ? void 0 : d.paymentInfo) == null ? void 0 : f.paymentInfo,
742
+ }), l = Array.isArray(u) && ((g = (d = u[0]) == null ? void 0 : d.name) == null ? void 0 : g.toLowerCase()) === "footer" ? u[0] : null, h = {
743
+ ...(m = l == null ? void 0 : l.paymentInfo) == null ? void 0 : m.paymentInfo,
850
744
  acceptedFlags: Array.isArray(
851
- (p = d == null ? void 0 : d.paymentInfo) == null ? void 0 : p.paymentInfo.acceptedFlags
852
- ) ? (S = d == null ? void 0 : d.paymentInfo) == null ? void 0 : S.paymentInfo.acceptedFlags.filter((y) => !!e[y]).map(
853
- (y) => e[y]
745
+ (p = l == null ? void 0 : l.paymentInfo) == null ? void 0 : p.paymentInfo.acceptedFlags
746
+ ) ? (S = l == null ? void 0 : l.paymentInfo) == null ? void 0 : S.paymentInfo.acceptedFlags.filter((b) => !!e[b]).map(
747
+ (b) => e[b]
854
748
  ) : []
855
749
  };
856
- return d ? /* @__PURE__ */ I(
750
+ return l ? /* @__PURE__ */ I(
857
751
  a,
858
752
  {
859
- data: { ...d },
860
- socialInfo: (F = d.socialMedia) == null ? void 0 : F.socialMedia,
861
- socialMedias: (O = ($ = d.socialMedia) == null ? void 0 : $.socialMedia) == null ? void 0 : O.medias,
753
+ data: { ...l },
754
+ socialInfo: (F = l.socialMedia) == null ? void 0 : F.socialMedia,
755
+ socialMedias: (O = (T = l.socialMedia) == null ? void 0 : T.socialMedia) == null ? void 0 : O.medias,
862
756
  payments: h,
863
757
  adornment: {
864
- ...(E = (T = d.supportInfo) == null ? void 0 : T.supportInfo) != null && E.content ? {
758
+ ...(q = (E = l.supportInfo) == null ? void 0 : E.supportInfo) != null && q.content ? {
865
759
  bottom: /* @__PURE__ */ I(
866
760
  i,
867
761
  {
868
- content: (q = (b = d.supportInfo) == null ? void 0 : b.supportInfo) == null ? void 0 : q.content,
762
+ content: ($ = (y = l.supportInfo) == null ? void 0 : y.supportInfo) == null ? void 0 : $.content,
869
763
  CONSTANTS: {
870
764
  ICONS: s,
871
765
  PAYMENT_FLAGS: t,
@@ -874,22 +768,22 @@ const Ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
874
768
  }
875
769
  )
876
770
  } : {},
877
- ...d.sections.length ? { top: /* @__PURE__ */ I(r, { data: d.sections }) } : {}
771
+ ...l.sections.length ? { top: /* @__PURE__ */ I(r, { data: l.sections }) } : {}
878
772
  },
879
773
  LEGAL_INFORMATION_TEXT: o,
880
774
  ICONS: s
881
775
  }
882
- ) : /* @__PURE__ */ I(G, {});
883
- }, St = async ({
776
+ ) : /* @__PURE__ */ I(_, {});
777
+ }, Rt = async ({
884
778
  children: e,
885
779
  ClientHeaderProvider: t,
886
780
  ...o
887
781
  }) => {
888
782
  var a, i, c, u;
889
- const { data: r } = await R({
783
+ const { data: r } = await v({
890
784
  contentType: "header",
891
785
  ...o
892
- }), s = (a = r[0]) == null ? void 0 : a.sections.map((d) => d.data);
786
+ }), s = (a = r[0]) == null ? void 0 : a.sections.map((l) => l.data);
893
787
  return /* @__PURE__ */ I(
894
788
  t,
895
789
  {
@@ -902,7 +796,7 @@ const Ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
902
796
  children: e
903
797
  }
904
798
  );
905
- }, Ot = async ({
799
+ }, vt = async ({
906
800
  children: e,
907
801
  productId: t,
908
802
  COMMON_PAGE_COLUMN_GAP: o,
@@ -910,7 +804,7 @@ const Ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
910
804
  PDPContentProvider: s,
911
805
  ...a
912
806
  }) => {
913
- const { data: i } = await R({
807
+ const { data: i } = await v({
914
808
  contentType: "product_page",
915
809
  ...a
916
810
  });
@@ -924,9 +818,9 @@ const Ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
924
818
  children: e
925
819
  }
926
820
  );
927
- }, Tt = {
821
+ }, Ft = {
928
822
  "column-modifier": "_column-modifier_1tqap_1"
929
- }, Et = async ({
823
+ }, Tt = async ({
930
824
  children: e,
931
825
  slug: t,
932
826
  SectionZone: o,
@@ -934,37 +828,37 @@ const Ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
934
828
  PLPContentProvider: s,
935
829
  ...a
936
830
  }) => {
937
- const { data: i } = await R({
831
+ const { data: i } = await v({
938
832
  contentType: "categories_page",
939
833
  ...a
940
834
  }), c = i.find(
941
- (l) => {
942
- var m, f, p;
943
- return ((m = l.config) == null ? void 0 : m.seo.slug) === t && ((p = (f = l.config) == null ? void 0 : f.responsive) == null ? void 0 : p.deviceType) === "desktop";
835
+ (d) => {
836
+ var g, m, p;
837
+ return ((g = d.config) == null ? void 0 : g.seo.slug) === t && ((p = (m = d.config) == null ? void 0 : m.responsive) == null ? void 0 : p.deviceType) === "desktop";
944
838
  }
945
839
  ), u = i.find(
946
- (l) => {
947
- var m, f, p;
948
- return ((m = l.config) == null ? void 0 : m.seo.slug) === t && ((p = (f = l.config) == null ? void 0 : f.responsive) == null ? void 0 : p.deviceType) === "mobile";
840
+ (d) => {
841
+ var g, m, p;
842
+ return ((g = d.config) == null ? void 0 : g.seo.slug) === t && ((p = (m = d.config) == null ? void 0 : m.responsive) == null ? void 0 : p.deviceType) === "mobile";
949
843
  }
950
- ), d = i.find(
951
- (l) => {
952
- var m, f, p;
953
- return ((m = l.config) == null ? void 0 : m.seo.slug) === "default" && ((p = (f = l.config) == null ? void 0 : f.responsive) == null ? void 0 : p.deviceType) === "desktop";
844
+ ), l = i.find(
845
+ (d) => {
846
+ var g, m, p;
847
+ return ((g = d.config) == null ? void 0 : g.seo.slug) === "default" && ((p = (m = d.config) == null ? void 0 : m.responsive) == null ? void 0 : p.deviceType) === "desktop";
954
848
  }
955
849
  ), h = i.find(
956
- (l) => {
957
- var m, f, p;
958
- return ((m = l.config) == null ? void 0 : m.seo.slug) === "default" && ((p = (f = l.config) == null ? void 0 : f.responsive) == null ? void 0 : p.deviceType) === "mobile";
850
+ (d) => {
851
+ var g, m, p;
852
+ return ((g = d.config) == null ? void 0 : g.seo.slug) === "default" && ((p = (m = d.config) == null ? void 0 : m.responsive) == null ? void 0 : p.deviceType) === "mobile";
959
853
  }
960
854
  );
961
- return /* @__PURE__ */ z(G, { children: [
855
+ return /* @__PURE__ */ z(_, { children: [
962
856
  /* @__PURE__ */ I(
963
857
  j.Column,
964
858
  {
965
- className: B.classNameConcat(
966
- w["responsive-desktop-flex"],
967
- Tt["column-modifier"]
859
+ className: G.classNameConcat(
860
+ N["responsive-desktop-flex"],
861
+ Ft["column-modifier"]
968
862
  ),
969
863
  style: {
970
864
  minHeight: "100vh"
@@ -972,7 +866,7 @@ const Ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
972
866
  children: /* @__PURE__ */ I(
973
867
  s,
974
868
  {
975
- data: c ?? d,
869
+ data: c ?? l,
976
870
  device: "desktop",
977
871
  SectionZone: o,
978
872
  COMMON_PAGE_COLUMN_GAP_PDC: r,
@@ -981,7 +875,7 @@ const Ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
981
875
  )
982
876
  }
983
877
  ),
984
- /* @__PURE__ */ I(j.Column, { className: w["responsive-mobile-flex"], children: /* @__PURE__ */ I(
878
+ /* @__PURE__ */ I(j.Column, { className: N["responsive-mobile-flex"], children: /* @__PURE__ */ I(
985
879
  s,
986
880
  {
987
881
  data: u ?? h,
@@ -992,43 +886,117 @@ const Ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
992
886
  }
993
887
  ) })
994
888
  ] });
889
+ }, St = async ({ slug: e, ...t }) => {
890
+ var i, c, u;
891
+ const { data: o } = await v({
892
+ contentType: "redirect_to_search",
893
+ ...t
894
+ }), r = ((u = (c = (i = o[0]) == null ? void 0 : i.redirectToSearch) == null ? void 0 : c.redirectToSearch) == null ? void 0 : u.paths) ?? [];
895
+ if (!!!r.length)
896
+ return {
897
+ slug: e,
898
+ query: null,
899
+ redirect: !1
900
+ };
901
+ const a = r.find(
902
+ (l) => {
903
+ var h, d;
904
+ return ((h = l.path) == null ? void 0 : h.replace(/\//g, "-").toLowerCase()) === e.replace(/\//g, "-").toLowerCase() || ((d = l.path) == null ? void 0 : d.replace(/\//g, "-").toLowerCase()) === `/${e}`.replace(/\//g, "-").toLowerCase();
905
+ }
906
+ );
907
+ return a ? {
908
+ slug: e,
909
+ query: a == null ? void 0 : a.searchQuery,
910
+ redirect: !0,
911
+ collectionId: a == null ? void 0 : a.collectionId,
912
+ filters: a == null ? void 0 : a.filters,
913
+ sort: a == null ? void 0 : a.sort
914
+ } : {
915
+ slug: e,
916
+ query: null,
917
+ redirect: !1,
918
+ collectionId: null,
919
+ filters: null,
920
+ sort: null
921
+ };
922
+ }, Ot = async ({ slug: e, ...t }) => {
923
+ var i, c, u;
924
+ const { data: o } = await v({
925
+ contentType: "redirect_to_search",
926
+ ...t
927
+ }), r = ((u = (c = (i = o[0]) == null ? void 0 : i.redirectToSearch) == null ? void 0 : c.redirectToSearch) == null ? void 0 : u.paths) ?? [];
928
+ if (!!!r.length)
929
+ return null;
930
+ const a = r.find(
931
+ (l) => {
932
+ var h, d;
933
+ return ((h = l.path) == null ? void 0 : h.replace(/\//g, "-").toLowerCase()) === e.replace(/\//g, "-").toLowerCase() || ((d = l.path) == null ? void 0 : d.replace(/\//g, "-").toLowerCase()) === `/${e}`.replace(/\//g, "-").toLowerCase();
934
+ }
935
+ );
936
+ return a ? {
937
+ slug: e,
938
+ title: a.pageTitle,
939
+ description: a.pageDescription
940
+ } : null;
941
+ }, Et = async ({
942
+ children: e,
943
+ SectionZone: t,
944
+ className: o,
945
+ ...r
946
+ }) => {
947
+ const { data: s } = await v({
948
+ contentType: "search_page",
949
+ ...r
950
+ });
951
+ return Array.isArray(s) && s.length > 0 ? /* @__PURE__ */ I(
952
+ se,
953
+ {
954
+ data: s,
955
+ SectionZone: t,
956
+ className: o,
957
+ children: e
958
+ }
959
+ ) : /* @__PURE__ */ I(_, { children: e });
995
960
  }, qt = async ({
996
961
  ClientTipbarContent: e,
997
962
  ...t
998
963
  }) => {
999
- const { data: o } = await R({
964
+ const { data: o } = await v({
1000
965
  contentType: "tipbar",
1001
966
  ...t
1002
967
  });
1003
968
  return /* @__PURE__ */ I(e, { data: o });
1004
- }, At = {
1005
- CommonPageContent: Ft,
1006
- HeaderContent: St,
969
+ }, $t = {
970
+ CommonPageContent: bt,
971
+ HeaderContent: Rt,
1007
972
  TipbarContent: qt,
1008
- FooterContent: $t,
1009
- PLPContent: Et,
1010
- PDPContent: Ot
1011
- }, sr = { Components: At }, kt = n.object({
973
+ FooterContent: Ct,
974
+ PLPContent: Tt,
975
+ PDPContent: vt,
976
+ getRedirectData: St,
977
+ getPLPSynteticMetaData: Ot,
978
+ SearchPageContent: Et
979
+ }, nr = { Components: $t }, Pt = n.object({
1012
980
  query: n.string()
1013
981
  });
1014
- async function Pt({ apiUrl: e, body: t, fetchOptions: o }) {
982
+ async function At({ apiUrl: e, body: t, fetchOptions: o }) {
1015
983
  if (!t) {
1016
984
  console.error("[ERROR FETCHING] Body is required");
1017
985
  return;
1018
986
  }
1019
- await kt.validate(t);
987
+ await Pt.validate(t);
1020
988
  const { query: r = "" } = t, s = new URLSearchParams({ query: r });
1021
- return g(
989
+ return f(
1022
990
  `${e}/api/io/_v/api/intelligent-search/autocomplete_suggestions?${s.toString()}`,
1023
991
  {
1024
992
  ...o
1025
993
  }
1026
994
  );
1027
995
  }
1028
- const Nt = (e, t) => me(e, t), wt = (e) => ({
996
+ const wt = (e, t) => me(e, t), kt = (e) => ({
1029
997
  ...e,
1030
- description: e.description ? Nt(e.description) : e.description
1031
- }), jt = ({
998
+ description: e.description ? wt(e.description) : e.description
999
+ }), Nt = ({
1032
1000
  offer: e,
1033
1001
  seller: t,
1034
1002
  product: o
@@ -1036,10 +1004,10 @@ const Nt = (e, t) => me(e, t), wt = (e) => ({
1036
1004
  ...e,
1037
1005
  product: o,
1038
1006
  seller: t
1039
- }), K = (e, t) => ({
1007
+ }), J = (e, t) => ({
1040
1008
  ...e,
1041
- isVariantOf: wt(t)
1042
- }), Dt = (e) => e ? "https://schema.org/InStock" : "https://schema.org/OutOfStock", N = (e) => e.AvailableQuantity > 0, V = (e) => e.spotPrice ?? 0, Ht = (e) => e.Price ?? 0, W = (e, t) => N(e) && !N(t) ? -1 : !N(e) && N(t) ? 1 : V(e) - V(t), _t = (e, t) => {
1009
+ isVariantOf: kt(t)
1010
+ }), jt = (e) => e ? "https://schema.org/InStock" : "https://schema.org/OutOfStock", k = (e) => e.AvailableQuantity > 0, U = (e) => e.spotPrice ?? 0, Dt = (e) => e.Price ?? 0, W = (e, t) => k(e) && !k(t) ? -1 : !k(e) && k(t) ? 1 : U(e) - U(t), Ht = (e, t) => {
1043
1011
  let o = 0;
1044
1012
  for (let r = 1; r < e.length; r++)
1045
1013
  t(e[o], e[r]) > 0 && (o = r);
@@ -1050,7 +1018,7 @@ const Nt = (e, t) => me(e, t), wt = (e) => ({
1050
1018
  offer: s.commertialOffer,
1051
1019
  sku: r
1052
1020
  }))
1053
- ), o = _t(
1021
+ ), o = Ht(
1054
1022
  t,
1055
1023
  ({ offer: r }, { offer: s }) => W(r, s)
1056
1024
  );
@@ -1065,11 +1033,11 @@ const Nt = (e, t) => me(e, t), wt = (e) => ({
1065
1033
  attachment: "ATTACHMENT",
1066
1034
  specification: "SPECIFICATION",
1067
1035
  attribute: "ATTRIBUTE"
1068
- }, Bt = (e) => ({
1036
+ }, _t = (e) => ({
1069
1037
  name: e.name,
1070
1038
  value: e.content,
1071
1039
  valueReference: D.attachment
1072
- }), Gt = (e) => ({
1040
+ }), Bt = (e) => ({
1073
1041
  propertyID: e.id,
1074
1042
  name: e.name,
1075
1043
  value: e.value,
@@ -1086,23 +1054,23 @@ const Nt = (e, t) => me(e, t), wt = (e) => ({
1086
1054
  name: i,
1087
1055
  value: "",
1088
1056
  valueReference: D.specification
1089
- }), s = Array.isArray(o) ? o.map(Bt) : [], a = t ? t.map(Gt) : [];
1057
+ }), s = Array.isArray(o) ? o.map(_t) : [], a = t ? t.map(Bt) : [];
1090
1058
  return [
1091
1059
  ...r,
1092
1060
  ...s,
1093
1061
  ...a
1094
1062
  ];
1095
- }, L = "ÁÄÂÀÃÅČÇĆĎÉĚËÈÊẼĔȆÍÌÎÏŇÑÓÖÒÔÕØŘŔŠŤÚŮÜÙÛÝŸŽáäâàãåčçćďéěëèêẽĕȇíìîïňñóöòôõøðřŕšťúůüùûýÿžþÞĐđ߯a", Ut = "AAAAAACCCDEEEEEEEEIIIINNOOOOOORRSTUUUUUYYZaaaaaacccdeeeeeeeeiiiinnooooooorrstuuuuuyyzbBDdBAa", Vt = (e) => {
1063
+ }, V = "ÁÄÂÀÃÅČÇĆĎÉĚËÈÊẼĔȆÍÌÎÏŇÑÓÖÒÔÕØŘŔŠŤÚŮÜÙÛÝŸŽáäâàãåčçćďéěëèêẽĕȇíìîïňñóöòôõøðřŕšťúůüùûýÿžþÞĐđ߯a", Gt = "AAAAAACCCDEEEEEEEEIIIINNOOOOOORRSTUUUUUYYZaaaaaacccdeeeeeeeeiiiinnooooooorrstuuuuuyyzbBDdBAa", Lt = (e) => {
1096
1064
  let t = e.slice(0);
1097
- for (let o = 0; o < L.length; o++)
1065
+ for (let o = 0; o < V.length; o++)
1098
1066
  t = t.replace(
1099
- new RegExp(L.charAt(o), "g"),
1100
- Ut.charAt(o)
1067
+ new RegExp(V.charAt(o), "g"),
1068
+ Gt.charAt(o)
1101
1069
  );
1102
1070
  return t;
1103
- }, Lt = (e) => e.replace(/[·/_,:]/, "-"), Z = (e) => {
1071
+ }, Ut = (e) => e.replace(/[·/_,:]/, "-"), Z = (e) => {
1104
1072
  const o = e.replace(/,/g, "").replace(/[*+~.()'"!:@&\[\]`/ %$#?{}|><=_^]/g, "-");
1105
- return Lt(Vt(o)).toLowerCase();
1073
+ return Ut(Lt(o)).toLowerCase();
1106
1074
  }, ee = (e) => `/${e}/p`, te = (e) => {
1107
1075
  const t = Math.max(
1108
1076
  ...e.map((r) => r.NumberOfInstallments)
@@ -1119,7 +1087,7 @@ const Nt = (e, t) => me(e, t), wt = (e) => ({
1119
1087
  listPrice: 0,
1120
1088
  sellerDefault: !1
1121
1089
  }, s = e.map(
1122
- (a) => jt({
1090
+ (a) => Nt({
1123
1091
  offer: a.commertialOffer,
1124
1092
  seller: a,
1125
1093
  product: t
@@ -1127,7 +1095,7 @@ const Nt = (e, t) => me(e, t), wt = (e) => ({
1127
1095
  ).sort(W).map((a) => (a.seller.sellerId === "1" && a.AvailableQuantity > 0 && (o.price = a.Price, o.listPrice = a.ListPrice, o.sellerDefault = !0), {
1128
1096
  availability: a.AvailableQuantity > 0,
1129
1097
  listPrice: a.ListPrice,
1130
- price: Ht(a),
1098
+ price: Dt(a),
1131
1099
  priceValidUntil: a.PriceValidUntil,
1132
1100
  priceCurrency: "BRL",
1133
1101
  installments: a.Installments,
@@ -1149,7 +1117,7 @@ const Nt = (e, t) => me(e, t), wt = (e) => ({
1149
1117
  name: r,
1150
1118
  offers: {
1151
1119
  offers: s.map(({ sellerId: i, commertialOffer: c }) => ({
1152
- availability: Dt(c.AvailableQuantity > 0),
1120
+ availability: jt(c.AvailableQuantity > 0),
1153
1121
  listPrice: c.ListPrice,
1154
1122
  price: c.Price,
1155
1123
  quantity: c.AvailableQuantity,
@@ -1161,8 +1129,8 @@ const Nt = (e, t) => me(e, t), wt = (e) => ({
1161
1129
  sku: o
1162
1130
  // slug: getSlug('', itemId), // getSlug('', itemId) que tipo de slug é esse?
1163
1131
  };
1164
- }, Mt = (e) => {
1165
- var y;
1132
+ }, Vt = (e) => {
1133
+ var b;
1166
1134
  const {
1167
1135
  attributes: t,
1168
1136
  referenceId: o,
@@ -1172,34 +1140,34 @@ const Nt = (e, t) => me(e, t), wt = (e) => ({
1172
1140
  name: i,
1173
1141
  sellers: c,
1174
1142
  videos: u,
1175
- variations: d
1143
+ variations: l
1176
1144
  } = e, {
1177
1145
  brand: h,
1178
- categories: l,
1179
- categoriesIds: m,
1180
- description: f,
1146
+ categories: d,
1147
+ categoriesIds: g,
1148
+ description: m,
1181
1149
  linkText: p,
1182
1150
  productClusters: S,
1183
1151
  clusterHighlights: F,
1184
- productName: $,
1152
+ productName: T,
1185
1153
  properties: O,
1186
- productId: T
1187
- } = r, E = l.slice().reverse(), b = re(c, e.isVariantOf), q = te(b.offers[0].installments);
1154
+ productId: E
1155
+ } = r, q = d.slice().reverse(), y = re(c, e.isVariantOf), $ = te(y.offers[0].installments);
1188
1156
  return {
1189
1157
  sku: a,
1190
- gtin: ((y = o[0]) == null ? void 0 : y.Value) ?? "",
1191
- name: $ ?? i,
1192
- description: f,
1158
+ gtin: ((b = o[0]) == null ? void 0 : b.Value) ?? "",
1159
+ name: T ?? i,
1160
+ description: m,
1193
1161
  releaseDate: r.releaseDate ?? "",
1194
1162
  slug: p,
1195
1163
  video: u[0],
1196
- categories: l,
1197
- categoriesIds: m,
1198
- id: T,
1164
+ categories: d,
1165
+ categoriesIds: g,
1166
+ id: E,
1199
1167
  brand: { name: h, brandName: h },
1200
1168
  seo: {
1201
- description: f,
1202
- title: $,
1169
+ description: m,
1170
+ title: T,
1203
1171
  canonical: ee(p)
1204
1172
  },
1205
1173
  cluster: {
@@ -1207,36 +1175,36 @@ const Nt = (e, t) => me(e, t), wt = (e) => ({
1207
1175
  highlights: F
1208
1176
  },
1209
1177
  properties: O,
1210
- availability: { status: b.offers[0].availability },
1178
+ availability: { status: y.offers[0].availability },
1211
1179
  breadcrumbList: {
1212
1180
  itemListElement: [
1213
- ...E.map((v, k) => {
1214
- const C = v.split("/"), A = C[C.length - 2], _ = C.map(Z).join("/");
1181
+ ...q.map((C, A) => {
1182
+ const R = C.split("/"), P = R[R.length - 2], B = R.map(Z).join("/");
1215
1183
  return {
1216
- name: A,
1217
- item: _,
1218
- position: k + 1
1184
+ name: P,
1185
+ item: B,
1186
+ position: A + 1
1219
1187
  };
1220
1188
  }),
1221
1189
  {
1222
1190
  name: r.productName,
1223
1191
  item: p,
1224
- position: l.length + 1
1192
+ position: d.length + 1
1225
1193
  }
1226
1194
  ],
1227
- numberOfItems: l.length
1195
+ numberOfItems: d.length
1228
1196
  },
1229
1197
  image: Y(s),
1230
- offers: b,
1231
- additionalProperty: H(d, t, []),
1198
+ offers: y,
1199
+ additionalProperty: H(l, t, []),
1232
1200
  isVariantOf: {
1233
1201
  productGroupID: r.productId,
1234
- hasVariant: r.items.map((v) => oe(v))
1202
+ hasVariant: r.items.map((C) => oe(C))
1235
1203
  },
1236
- installments: q
1204
+ installments: $
1237
1205
  };
1238
- }, xt = (e) => {
1239
- var y;
1206
+ }, Mt = (e) => {
1207
+ var b;
1240
1208
  const {
1241
1209
  attributes: t,
1242
1210
  referenceId: o,
@@ -1246,35 +1214,35 @@ const Nt = (e, t) => me(e, t), wt = (e) => ({
1246
1214
  name: i,
1247
1215
  sellers: c,
1248
1216
  Videos: u,
1249
- variations: d
1217
+ variations: l
1250
1218
  } = e, {
1251
1219
  brand: h,
1252
- categories: l,
1253
- categoriesIds: m,
1254
- description: f,
1220
+ categories: d,
1221
+ categoriesIds: g,
1222
+ description: m,
1255
1223
  linkText: p,
1256
1224
  productClusters: S,
1257
1225
  productName: F,
1258
- Coleção: $,
1226
+ Coleção: T,
1259
1227
  "ID Coleção": O,
1260
- productId: T
1261
- } = r, E = l.slice().reverse(), b = re(c, e.isVariantOf), q = te(b.offers[0].installments);
1228
+ productId: E
1229
+ } = r, q = d.slice().reverse(), y = re(c, e.isVariantOf), $ = te(y.offers[0].installments);
1262
1230
  return {
1263
1231
  sku: a,
1264
- gtin: ((y = o[0]) == null ? void 0 : y.Value) ?? "",
1232
+ gtin: ((b = o[0]) == null ? void 0 : b.Value) ?? "",
1265
1233
  name: F ?? i,
1266
- description: f,
1234
+ description: m,
1267
1235
  releaseDate: r.releaseDate ?? "",
1268
1236
  slug: p,
1269
1237
  video: u[0],
1270
- categories: l,
1271
- categoriesIds: m,
1272
- collection: $,
1238
+ categories: d,
1239
+ categoriesIds: g,
1240
+ collection: T,
1273
1241
  collectionId: O,
1274
- id: T,
1242
+ id: E,
1275
1243
  brand: { name: h, brandName: h },
1276
1244
  seo: {
1277
- description: f,
1245
+ description: m,
1278
1246
  title: F,
1279
1247
  canonical: ee(p)
1280
1248
  },
@@ -1283,68 +1251,68 @@ const Nt = (e, t) => me(e, t), wt = (e) => ({
1283
1251
  highlights: []
1284
1252
  // TODO: add highlights
1285
1253
  },
1286
- availability: { status: b.offers[0].availability },
1254
+ availability: { status: y.offers[0].availability },
1287
1255
  breadcrumbList: {
1288
1256
  itemListElement: [
1289
- ...E.map((v, k) => {
1290
- const C = v.split("/"), A = C[C.length - 2], _ = C.map(Z).join("/");
1257
+ ...q.map((C, A) => {
1258
+ const R = C.split("/"), P = R[R.length - 2], B = R.map(Z).join("/");
1291
1259
  return {
1292
- name: A,
1293
- item: _,
1294
- position: k + 1
1260
+ name: P,
1261
+ item: B,
1262
+ position: A + 1
1295
1263
  };
1296
1264
  }),
1297
1265
  {
1298
1266
  name: r.productName,
1299
1267
  item: p,
1300
- position: l.length + 1
1268
+ position: d.length + 1
1301
1269
  }
1302
1270
  ],
1303
- numberOfItems: l.length
1271
+ numberOfItems: d.length
1304
1272
  },
1305
1273
  image: Y(s),
1306
- offers: b,
1307
- additionalProperty: H(d, t, []),
1274
+ offers: y,
1275
+ additionalProperty: H(l, t, []),
1308
1276
  isVariantOf: {
1309
1277
  productGroupID: r.productId,
1310
- hasVariant: r.items.map((v) => {
1311
- const { variations: k } = v, C = k.map((A) => ({
1312
- name: A,
1313
- values: v[A]
1278
+ hasVariant: r.items.map((C) => {
1279
+ const { variations: A } = C, R = A.map((P) => ({
1280
+ name: P,
1281
+ values: C[P]
1314
1282
  }));
1315
1283
  return {
1316
- ...oe(v),
1284
+ ...oe(C),
1317
1285
  additionalProperty: H(
1318
- C,
1286
+ R,
1319
1287
  t,
1320
1288
  []
1321
1289
  )
1322
1290
  };
1323
1291
  })
1324
1292
  },
1325
- installments: q
1293
+ installments: $
1326
1294
  };
1327
- }, zt = n.array().of(n.object({
1295
+ }, xt = n.array().of(n.object({
1328
1296
  key: n.string().required(),
1329
1297
  value: n.string().required()
1330
1298
  })).required("Facets are required");
1331
- async function Qt({ apiUrl: e, body: t, fetchOptions: o }) {
1299
+ async function zt({ apiUrl: e, body: t, fetchOptions: o }) {
1332
1300
  if (!t) {
1333
1301
  console.error("[ERROR FETCHING] Body is required");
1334
1302
  return;
1335
1303
  }
1336
- await zt.validate(t);
1304
+ await xt.validate(t);
1337
1305
  const r = new URLSearchParams({}), s = t.map(({ key: i, value: c }) => `${i}/${c}`).join("/");
1338
1306
  ae(t, r);
1339
1307
  const a = `${e}/api/catalog_system/pub/products/crossselling/${s}`;
1340
- return g(a, {
1308
+ return f(a, {
1341
1309
  cache: "no-store",
1342
1310
  ...o
1343
1311
  }).then((i) => i.map((u) => {
1344
- const d = X(u.items);
1345
- return d && K(d, u);
1312
+ const l = X(u.items);
1313
+ return l && J(l, u);
1346
1314
  }).filter((u) => !!u).map((u) => ({
1347
- node: xt(u)
1315
+ node: Mt(u)
1348
1316
  })));
1349
1317
  }
1350
1318
  const ne = ({
@@ -1363,20 +1331,20 @@ const ne = ({
1363
1331
  count: i,
1364
1332
  sort: c = "",
1365
1333
  facets: u = [],
1366
- type: d,
1334
+ type: l,
1367
1335
  hideUnavailableItems: h = !0,
1368
- locale: l = ""
1369
- } = t, m = new URLSearchParams({
1336
+ locale: d = ""
1337
+ } = t, g = new URLSearchParams({
1370
1338
  page: a.toString(),
1371
1339
  count: (i == null ? void 0 : i.toString()) ?? (r == null ? void 0 : r.ITEMS_PER_PAGE) ?? 24,
1372
1340
  query: s,
1373
1341
  sort: c,
1374
- locale: l
1342
+ locale: d
1375
1343
  });
1376
- h !== void 0 && m.append("hideUnavailableItems", h.toString());
1377
- const f = u.map((p) => `${p.key}/${p.value}`).join("/") ?? "";
1378
- return pe(
1379
- `${e}/api/io/_v/api/intelligent-search/${d}/${f}?${m.toString()}`,
1344
+ h !== void 0 && g.append("hideUnavailableItems", h.toString());
1345
+ const m = u.map((p) => `${p.key}/${p.value}`).join("/") ?? "";
1346
+ return ge(
1347
+ `${e}/api/io/_v/api/intelligent-search/${l}/${m}?${g.toString()}`,
1380
1348
  {
1381
1349
  headers: {
1382
1350
  Accept: "application/json",
@@ -1386,7 +1354,7 @@ const ne = ({
1386
1354
  }
1387
1355
  );
1388
1356
  };
1389
- async function Jt({ body: e, extraData: t, ...o }) {
1357
+ async function Qt({ body: e, extraData: t, ...o }) {
1390
1358
  if (!e) {
1391
1359
  console.error("[ERROR FETCHING] Body is required");
1392
1360
  return;
@@ -1400,7 +1368,7 @@ async function Jt({ body: e, extraData: t, ...o }) {
1400
1368
  ...o
1401
1369
  }), s = (r == null ? void 0 : r.products.map((c) => {
1402
1370
  const u = X(c.items);
1403
- return u && K(u, c);
1371
+ return u && J(u, c);
1404
1372
  }).filter((c) => !!c)) ?? [], {
1405
1373
  pagination: a,
1406
1374
  recordsFiltered: i
@@ -1416,7 +1384,7 @@ async function Jt({ body: e, extraData: t, ...o }) {
1416
1384
  total: a.count
1417
1385
  },
1418
1386
  products: s.map((c, u) => ({
1419
- node: Mt(c),
1387
+ node: Vt(c),
1420
1388
  cursor: u.toString()
1421
1389
  }))
1422
1390
  }
@@ -1442,51 +1410,51 @@ async function Kt({ body: e, extraData: t, ...o }) {
1442
1410
  }
1443
1411
  };
1444
1412
  }
1445
- const Wt = n.object({
1413
+ const Jt = n.object({
1446
1414
  query: n.string().optional(),
1447
1415
  locale: n.string().optional()
1448
1416
  });
1449
- async function Xt({ apiUrl: e, body: t, fetchOptions: o }) {
1417
+ async function Wt({ apiUrl: e, body: t, fetchOptions: o }) {
1450
1418
  if (!t) {
1451
1419
  console.error("[ERROR FETCHING] Body is required");
1452
1420
  return;
1453
1421
  }
1454
- await Wt.validate(t);
1422
+ await Jt.validate(t);
1455
1423
  const { query: r = "", locale: s = "default_locale" } = t, a = new URLSearchParams({ query: r, locale: s });
1456
- return g(
1424
+ return f(
1457
1425
  `${e}/api/io/_v/api/intelligent-search/search_suggestions?${a.toString()}`,
1458
1426
  {
1459
1427
  ...o
1460
1428
  }
1461
1429
  );
1462
1430
  }
1463
- async function Yt({ apiUrl: e }) {
1464
- return g(`${e}/api/io/_v/api/intelligent-search/top_searches`);
1431
+ async function Xt({ apiUrl: e }) {
1432
+ return f(`${e}/api/io/_v/api/intelligent-search/top_searches`);
1465
1433
  }
1466
- const Zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1434
+ const Yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1467
1435
  __proto__: null,
1468
- getSearchAutoCompleteSuggestions: Pt,
1469
- getSearchCrossellingProducts: Qt,
1436
+ getSearchAutoCompleteSuggestions: At,
1437
+ getSearchCrossellingProducts: zt,
1470
1438
  getSearchFacets: Kt,
1471
- getSearchProducts: Jt,
1472
- getSearchSuggestedTerms: Xt,
1473
- getSearchTopSearchs: Yt
1474
- }, Symbol.toStringTag, { value: "Module" })), er = {
1439
+ getSearchProducts: Qt,
1440
+ getSearchSuggestedTerms: Wt,
1441
+ getSearchTopSearchs: Xt
1442
+ }, Symbol.toStringTag, { value: "Module" })), Zt = {
1475
1443
  parseSearchState: de,
1476
1444
  convertSearchParams: ue,
1477
1445
  filterNonRootFacets: le,
1478
1446
  filterNonCategorySelected: ce
1447
+ }, sr = {
1448
+ checkout: et,
1449
+ catalog: it,
1450
+ cms: pe,
1451
+ search: Yt
1479
1452
  }, ar = {
1480
- checkout: Ze,
1481
- catalog: at,
1482
- cms: Ct,
1453
+ catalog: It,
1483
1454
  search: Zt
1484
- }, ir = {
1485
- catalog: ht,
1486
- search: er
1487
1455
  };
1488
1456
  export {
1489
- ar as serverAPIs,
1490
- sr as serverCMS,
1491
- ir as serverHelpers
1457
+ sr as serverAPIs,
1458
+ nr as serverCMS,
1459
+ ar as serverHelpers
1492
1460
  };