@soma-vertical-web/multi-lib 1.0.19 → 1.0.20

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.
Files changed (36) hide show
  1. package/contexts/contexts/plp/FilterContext.d.ts +1 -1
  2. package/contexts/contexts/plp/PLPContext.d.ts +1 -1
  3. package/contexts/contexts/search/Facets.d.ts +1 -1
  4. package/contexts/contexts/search/Search.d.ts +1 -1
  5. package/contexts/hooks/useSimilars.d.ts +7 -0
  6. package/contexts/index.d.ts +4 -4
  7. package/data/helpers/plp/index.d.ts +2 -2
  8. package/data/helpers/search/facets.d.ts +0 -1
  9. package/data/helpers/search/index.d.ts +0 -4
  10. package/data/helpers/search/search.d.ts +0 -1
  11. package/data/index.d.ts +0 -2
  12. package/index-CpUjW-m9.mjs +1877 -0
  13. package/index-xWhZ_YcF.js +4 -0
  14. package/index.js +17 -17
  15. package/index.mjs +8437 -10416
  16. package/index2.js +1 -1
  17. package/index2.mjs +613 -685
  18. package/layout/index.d.ts +3 -3
  19. package/layout/template/PDC/Composite/Pagination/Pagination.d.ts +1 -1
  20. package/layout/template/PDC/Composite/Products/Products.d.ts +1 -1
  21. package/layout/template/PDC/PDC.d.ts +1 -1
  22. package/layout/template/PDC/index.d.ts +2 -2
  23. package/layout/template/PDP/Composite/Info/MainContent/Similars/index.d.ts +1 -1
  24. package/layout/template/PDP/index.d.ts +2 -2
  25. package/package.json +1 -1
  26. package/server.d.ts +1 -7
  27. package/style.css +1 -1
  28. package/types/cms/Sections/SectionZone/index.d.ts +1 -0
  29. package/types/contexts/contexts/plp.d.ts +9 -42
  30. package/types/contexts/contexts/search.d.ts +15 -34
  31. package/types/contexts/hooks/index.d.ts +12 -0
  32. package/types/layout/team-components/PLPNavigation/index.d.ts +2 -0
  33. package/types/layout/team-components/ProductCard/index.d.ts +1 -0
  34. package/types/layout/team-components/ProductList/index.d.ts +2 -1
  35. package/types/layout/templates/PDP/index.d.ts +1 -2
  36. package/types/layout/templates/PLP/index.d.ts +3 -2
package/index2.mjs CHANGED
@@ -1,64 +1,64 @@
1
- import { jsx as b, jsxs as N, Fragment as B } from "react/jsx-runtime";
2
- import { z as S, r as j, S as ce, A as le, B as ue, a as de, q as M, C as me, D as pe, E as fe, p as ge, F as he } from "./index-67k__dSl.mjs";
3
- import { Utils as D, helpers as _ } from "@soma-vertical-web/core-components";
4
- import * as a from "yup";
5
- import ye from "sanitize-html";
6
- const be = async ({
1
+ import { jsx as b, jsxs as G, Fragment as B } from "react/jsx-runtime";
2
+ import { x as S, r as k, S as se, y as oe, z as ie, a as ce, v as le, t as ue, A as de, p as me, B as pe, C as fe, D as ge, e as he, E as ye } from "./index-CpUjW-m9.mjs";
3
+ import { Utils as j, helpers as D } from "@soma-vertical-web/core-components";
4
+ import * as n from "yup";
5
+ import be from "sanitize-html";
6
+ const Ie = async ({
7
7
  children: t,
8
8
  ClientCartProvider: e,
9
- ...n
9
+ ...a
10
10
  }) => {
11
11
  const { data: r } = await S(
12
12
  "mini_cart",
13
- n
13
+ a
14
14
  );
15
15
  return /* @__PURE__ */ b(e, { ...r ? Array.isArray(r) ? { data: r[0] } : { data: r } : {}, children: t });
16
- }, Ie = ({
16
+ }, Re = ({
17
17
  slug: t,
18
18
  data: e,
19
- SectionZone: n,
19
+ SectionZone: a,
20
20
  COMMON_PAGE_COLUMN_GAP: r,
21
21
  identifyWhoIsFirst: s
22
22
  }) => {
23
23
  const o = e == null ? void 0 : e.find(
24
24
  (d) => {
25
- var C, f, p, y;
26
- return ((f = (C = d.config) == null ? void 0 : C.responsive) == null ? void 0 : f.deviceType) === "desktop" && ((y = (p = d.config) == null ? void 0 : p.seo) == null ? void 0 : y.slug) === t;
25
+ var R, f, p, y;
26
+ return ((f = (R = d.config) == null ? void 0 : R.responsive) == null ? void 0 : f.deviceType) === "desktop" && ((y = (p = d.config) == null ? void 0 : p.seo) == null ? void 0 : y.slug) === t;
27
27
  }
28
- ), i = o == null ? void 0 : o.config.responsive.gapCustom, l = o == null ? void 0 : o.config.responsive.gapSections, c = e == null ? void 0 : e.find(
28
+ ), i = o == null ? void 0 : o.config.responsive.gapCustom, u = o == null ? void 0 : o.config.responsive.gapSections, c = e == null ? void 0 : e.find(
29
29
  (d) => {
30
- var C, f, p, y;
31
- return ((f = (C = d.config) == null ? void 0 : C.responsive) == null ? void 0 : f.deviceType) === "mobile" && ((y = (p = d.config) == null ? void 0 : p.seo) == null ? void 0 : y.slug) === t;
30
+ var R, f, p, y;
31
+ return ((f = (R = d.config) == null ? void 0 : R.responsive) == null ? void 0 : f.deviceType) === "mobile" && ((y = (p = d.config) == null ? void 0 : p.seo) == null ? void 0 : y.slug) === t;
32
32
  }
33
- ), m = c == null ? void 0 : c.config.responsive.gapCustom, u = c == null ? void 0 : c.config.responsive.gapSections;
34
- return /* @__PURE__ */ N(B, { children: [
33
+ ), m = c == null ? void 0 : c.config.responsive.gapCustom, l = c == null ? void 0 : c.config.responsive.gapSections;
34
+ return /* @__PURE__ */ G(B, { children: [
35
35
  /* @__PURE__ */ b(
36
- D.Column,
36
+ j.Column,
37
37
  {
38
- gap: i && l ? l : r,
39
- className: _.classNameConcat(
40
- j["responsive-desktop-flex"],
38
+ gap: i && u ? u : r,
39
+ className: D.classNameConcat(
40
+ k["responsive-desktop-flex"],
41
41
  "utils-column-modifier"
42
42
  ),
43
- children: /* @__PURE__ */ b(n, { data: (o == null ? void 0 : o.sections) ?? [], identifyWhoIsFirst: s })
43
+ children: /* @__PURE__ */ b(a, { data: (o == null ? void 0 : o.sections) ?? [], identifyWhoIsFirst: s })
44
44
  }
45
45
  ),
46
46
  /* @__PURE__ */ b(
47
- D.Column,
47
+ j.Column,
48
48
  {
49
- gap: m && u ? u : r,
50
- className: _.classNameConcat(
51
- j["responsive-mobile-flex"],
49
+ gap: m && l ? l : r,
50
+ className: D.classNameConcat(
51
+ k["responsive-mobile-flex"],
52
52
  "utils-column-modifier"
53
53
  ),
54
- children: /* @__PURE__ */ b(n, { data: (c == null ? void 0 : c.sections) ?? [], identifyWhoIsFirst: s })
54
+ children: /* @__PURE__ */ b(a, { data: (c == null ? void 0 : c.sections) ?? [], identifyWhoIsFirst: s })
55
55
  }
56
56
  )
57
57
  ] });
58
58
  }, Ce = async ({
59
59
  slug: t,
60
60
  SectionZone: e,
61
- COMMON_PAGE_COLUMN_GAP: n,
61
+ COMMON_PAGE_COLUMN_GAP: a,
62
62
  identifyWhoIsFirst: r = !1,
63
63
  ...s
64
64
  }) => {
@@ -67,39 +67,39 @@ const be = async ({
67
67
  s
68
68
  );
69
69
  return !o || !Array.isArray(o) || o.length === 0 ? null : /* @__PURE__ */ b(
70
- Ie,
70
+ Re,
71
71
  {
72
72
  data: o,
73
73
  slug: t,
74
74
  SectionZone: e,
75
- COMMON_PAGE_COLUMN_GAP: n,
75
+ COMMON_PAGE_COLUMN_GAP: a,
76
76
  identifyWhoIsFirst: r
77
77
  }
78
78
  );
79
- }, Re = async ({
79
+ }, ve = async ({
80
80
  children: t,
81
81
  ClientFlagsAndTagsProvider: e,
82
- ...n
82
+ ...a
83
83
  }) => {
84
84
  const { data: r } = await S(
85
85
  "flags_and_tags",
86
- n
86
+ a
87
87
  );
88
88
  return !r || !Array.isArray(r) ? null : /* @__PURE__ */ b(e, { data: r[0], children: t });
89
- }, ve = async ({
89
+ }, Se = async ({
90
90
  className: t,
91
91
  PAYMENT_FLAGS_DICTIONARY: e,
92
- PAYMENT_FLAGS: n,
92
+ PAYMENT_FLAGS: a,
93
93
  LEGAL_INFORMATION_TEXT: r,
94
94
  ICONS: s,
95
95
  SectionZone: o,
96
96
  Footer: i,
97
- FooterSupport: l,
97
+ FooterSupport: u,
98
98
  hasFooterStamps: c,
99
99
  ...m
100
100
  }) => {
101
- var f, p, y, I, F, O, $, g, E, R, T;
102
- const { data: u } = await S("footer", m), d = Array.isArray(u) && ((f = u[0]) == null ? void 0 : f.type) === "footer" ? u[0] : null, C = {
101
+ var f, p, y, I, T, q, O, g, E, C, F;
102
+ const { data: l } = await S("footer", m), d = Array.isArray(l) && ((f = l[0]) == null ? void 0 : f.type) === "footer" ? l[0] : null, R = {
103
103
  ...(p = d == null ? void 0 : d.paymentInfo) == null ? void 0 : p.paymentInfo,
104
104
  acceptedFlags: Array.isArray(
105
105
  (y = d == null ? void 0 : d.paymentInfo) == null ? void 0 : y.paymentInfo.acceptedFlags
@@ -112,19 +112,19 @@ const be = async ({
112
112
  {
113
113
  className: t,
114
114
  data: { ...d },
115
- socialInfo: (F = d.socialMedia) == null ? void 0 : F.socialMedia,
116
- socialMedias: ($ = (O = d.socialMedia) == null ? void 0 : O.socialMedia) == null ? void 0 : $.medias,
117
- payments: C,
115
+ socialInfo: (T = d.socialMedia) == null ? void 0 : T.socialMedia,
116
+ socialMedias: (O = (q = d.socialMedia) == null ? void 0 : q.socialMedia) == null ? void 0 : O.medias,
117
+ payments: R,
118
118
  hasFooterStamps: c,
119
119
  adornment: {
120
120
  ...(E = (g = d.supportInfo) == null ? void 0 : g.supportInfo) != null && E.content ? {
121
121
  bottom: /* @__PURE__ */ b(
122
- l,
122
+ u,
123
123
  {
124
- content: (T = (R = d.supportInfo) == null ? void 0 : R.supportInfo) == null ? void 0 : T.content,
124
+ content: (F = (C = d.supportInfo) == null ? void 0 : C.supportInfo) == null ? void 0 : F.content,
125
125
  CONSTANTS: {
126
126
  ICONS: s,
127
- PAYMENT_FLAGS: n,
127
+ PAYMENT_FLAGS: a,
128
128
  PAYMENT_FLAGS_DICTIONARY: e
129
129
  }
130
130
  }
@@ -136,15 +136,15 @@ const be = async ({
136
136
  ICONS: s
137
137
  }
138
138
  ) : null;
139
- }, Se = async ({
139
+ }, Ee = async ({
140
140
  children: t,
141
141
  ClientHeaderProvider: e,
142
- ...n
142
+ ...a
143
143
  }) => {
144
- var o, i, l, c, m, u;
144
+ var o, i, u, c, m, l;
145
145
  const { data: r } = await S(
146
146
  "header",
147
- n
147
+ a
148
148
  ), s = Array.isArray(r) ? r[0] : void 0;
149
149
  return /* @__PURE__ */ b(
150
150
  e,
@@ -152,22 +152,22 @@ const be = async ({
152
152
  headerData: {
153
153
  ...((o = s == null ? void 0 : s.layerConfig) == null ? void 0 : o.config) ?? {},
154
154
  subMenus: ((i = s == null ? void 0 : s.sections) == null ? void 0 : i.map((d) => d.data)) ?? [],
155
- categories: ((c = (l = s == null ? void 0 : s.categories) == null ? void 0 : l.categories) == null ? void 0 : c.items) ?? [],
156
- navigationLinks: ((u = (m = s == null ? void 0 : s.navigationLinks) == null ? void 0 : m.navigationLinks) == null ? void 0 : u.items) ?? []
155
+ categories: ((c = (u = s == null ? void 0 : s.categories) == null ? void 0 : u.categories) == null ? void 0 : c.items) ?? [],
156
+ navigationLinks: ((l = (m = s == null ? void 0 : s.navigationLinks) == null ? void 0 : m.navigationLinks) == null ? void 0 : l.items) ?? []
157
157
  },
158
158
  children: t
159
159
  }
160
160
  );
161
- }, Ee = (t) => {
162
- var i, l;
163
- const e = (l = (i = t[0]) == null ? void 0 : i.items) == null ? void 0 : l.items;
161
+ }, Fe = (t) => {
162
+ var i, u;
163
+ const e = (u = (i = t[0]) == null ? void 0 : i.items) == null ? void 0 : u.items;
164
164
  if ((e == null ? void 0 : e.items.length) === 0 || t.length === 0)
165
165
  return {
166
166
  iconLabel: "",
167
167
  label: "",
168
168
  content: []
169
169
  };
170
- const n = e == null ? void 0 : e.iconLabel, r = e == null ? void 0 : e.label, s = e == null ? void 0 : e.helpButtonSize, o = e.items.map(
170
+ const a = e == null ? void 0 : e.iconLabel, r = e == null ? void 0 : e.label, s = e == null ? void 0 : e.helpButtonSize, o = e.items.map(
171
171
  (c, m) => ({
172
172
  type: c.type,
173
173
  id: `${m.toString()}-${c.title.toLowerCase()}`,
@@ -182,7 +182,7 @@ const be = async ({
182
182
  })
183
183
  );
184
184
  return {
185
- iconLabel: n,
185
+ iconLabel: a,
186
186
  label: r,
187
187
  helpButtonSize: s,
188
188
  content: o
@@ -190,7 +190,7 @@ const be = async ({
190
190
  }, Te = async ({
191
191
  HelpButton: t,
192
192
  ICONS: e,
193
- className: n,
193
+ className: a,
194
194
  ...r
195
195
  }) => {
196
196
  const { data: s } = await S(
@@ -199,36 +199,36 @@ const be = async ({
199
199
  );
200
200
  if (!s || !Array.isArray(s) || s.length === 0)
201
201
  return null;
202
- const o = Ee(s);
202
+ const o = Fe(s);
203
203
  return /* @__PURE__ */ b(
204
204
  t,
205
205
  {
206
206
  data: o,
207
207
  ICONS: e,
208
- className: n
208
+ className: a
209
209
  }
210
210
  );
211
- }, Fe = async ({
211
+ }, qe = async ({
212
212
  SectionZone: t,
213
213
  LPCadastro: e,
214
- ...n
214
+ ...a
215
215
  }) => {
216
216
  var c;
217
217
  const { data: r } = await S(
218
218
  "lp_cadastro",
219
- n
219
+ a
220
220
  );
221
221
  if (!r || !Array.isArray(r) || r.length === 0)
222
222
  return null;
223
- const [s] = r, o = (s == null ? void 0 : s.sections) || [], i = ((c = s == null ? void 0 : s.content) == null ? void 0 : c.conteúdo) || {}, l = s == null ? void 0 : s.sections;
224
- return /* @__PURE__ */ N(B, { children: [
223
+ const [s] = r, o = (s == null ? void 0 : s.sections) || [], i = ((c = s == null ? void 0 : s.content) == null ? void 0 : c.conteúdo) || {}, u = s == null ? void 0 : s.sections;
224
+ return /* @__PURE__ */ G(B, { children: [
225
225
  /* @__PURE__ */ b(e, { sections: o, content: i }),
226
- /* @__PURE__ */ b(t, { data: l })
226
+ /* @__PURE__ */ b(t, { data: u })
227
227
  ] });
228
228
  }, Oe = async ({
229
229
  LPLOJAS_TEMPLATE_RETURN_BUTTON: t,
230
230
  ICONS: e,
231
- entity: n,
231
+ entity: a,
232
232
  showVendor: r,
233
233
  LPStoresClientWrapper: s,
234
234
  ...o
@@ -238,7 +238,7 @@ const be = async ({
238
238
  return /* @__PURE__ */ b(
239
239
  s,
240
240
  {
241
- entity: n,
241
+ entity: a,
242
242
  content: c,
243
243
  data: i,
244
244
  showVendor: r,
@@ -249,7 +249,7 @@ const be = async ({
249
249
  }, $e = async ({
250
250
  children: t,
251
251
  productId: e,
252
- COMMON_PAGE_COLUMN_GAP: n,
252
+ COMMON_PAGE_COLUMN_GAP: a,
253
253
  SectionZone: r,
254
254
  PDPContentProvider: s,
255
255
  ...o
@@ -263,56 +263,56 @@ const be = async ({
263
263
  {
264
264
  data: i[0],
265
265
  productId: e,
266
- COMMON_PAGE_COLUMN_GAP: n,
266
+ COMMON_PAGE_COLUMN_GAP: a,
267
267
  SectionZone: r,
268
268
  children: t
269
269
  }
270
270
  );
271
- }, qe = {
271
+ }, Pe = {
272
272
  "column-modifier": "_column-modifier_1tqap_1"
273
273
  }, Ae = async ({
274
274
  className: t,
275
275
  children: e,
276
- slug: n,
276
+ slug: a,
277
277
  SectionZone: r,
278
278
  COMMON_PAGE_COLUMN_GAP_PDC: s,
279
279
  PLPContentProvider: o,
280
280
  ...i
281
281
  }) => {
282
- const { data: l } = await S(
282
+ const { data: u } = await S(
283
283
  "categories_page",
284
284
  i
285
285
  );
286
- if (!l || !Array.isArray(l))
286
+ if (!u || !Array.isArray(u))
287
287
  return null;
288
- const c = l.find(
288
+ const c = u.find(
289
289
  (f) => {
290
290
  var p, y, I;
291
- return ((p = f.config) == null ? void 0 : p.seo.slug) === n && ((I = (y = f.config) == null ? void 0 : y.responsive) == null ? void 0 : I.deviceType) === "desktop";
291
+ return ((p = f.config) == null ? void 0 : p.seo.slug) === a && ((I = (y = f.config) == null ? void 0 : y.responsive) == null ? void 0 : I.deviceType) === "desktop";
292
292
  }
293
- ), m = l.find(
293
+ ), m = u.find(
294
294
  (f) => {
295
295
  var p, y, I;
296
- return ((p = f.config) == null ? void 0 : p.seo.slug) === n && ((I = (y = f.config) == null ? void 0 : y.responsive) == null ? void 0 : I.deviceType) === "mobile";
296
+ return ((p = f.config) == null ? void 0 : p.seo.slug) === a && ((I = (y = f.config) == null ? void 0 : y.responsive) == null ? void 0 : I.deviceType) === "mobile";
297
297
  }
298
- ), u = l.find(
298
+ ), l = u.find(
299
299
  (f) => {
300
300
  var p, y, I;
301
301
  return ((p = f.config) == null ? void 0 : p.seo.slug) === "default" && ((I = (y = f.config) == null ? void 0 : y.responsive) == null ? void 0 : I.deviceType) === "desktop";
302
302
  }
303
- ), d = l.find(
303
+ ), d = u.find(
304
304
  (f) => {
305
305
  var p, y, I;
306
306
  return ((p = f.config) == null ? void 0 : p.seo.slug) === "default" && ((I = (y = f.config) == null ? void 0 : y.responsive) == null ? void 0 : I.deviceType) === "mobile";
307
307
  }
308
- ), C = Array.isArray(t) ? t : [t];
309
- return /* @__PURE__ */ N(B, { children: [
308
+ ), R = Array.isArray(t) ? t : [t];
309
+ return /* @__PURE__ */ G(B, { children: [
310
310
  /* @__PURE__ */ b(
311
- D.Column,
311
+ j.Column,
312
312
  {
313
- className: _.classNameConcat(
314
- j["responsive-desktop-flex"],
315
- [qe["column-modifier"], ...C]
313
+ className: D.classNameConcat(
314
+ k["responsive-desktop-flex"],
315
+ [Pe["column-modifier"], ...R]
316
316
  ),
317
317
  style: {
318
318
  minHeight: "100vh"
@@ -320,7 +320,7 @@ const be = async ({
320
320
  children: /* @__PURE__ */ b(
321
321
  o,
322
322
  {
323
- data: c ?? u,
323
+ data: c ?? l,
324
324
  device: "desktop",
325
325
  SectionZone: r,
326
326
  COMMON_PAGE_COLUMN_GAP_PDC: s,
@@ -329,7 +329,7 @@ const be = async ({
329
329
  )
330
330
  }
331
331
  ),
332
- /* @__PURE__ */ b(D.Column, { className: _.classNameConcat(j["responsive-mobile-flex"], t), children: /* @__PURE__ */ b(
332
+ /* @__PURE__ */ b(j.Column, { className: D.classNameConcat(k["responsive-mobile-flex"], t), children: /* @__PURE__ */ b(
333
333
  o,
334
334
  {
335
335
  data: m ?? d,
@@ -340,19 +340,19 @@ const be = async ({
340
340
  }
341
341
  ) })
342
342
  ] });
343
- }, Pe = async ({ slug: t, ...e }) => {
344
- var i, l, c;
345
- const { data: n } = await S(
343
+ }, we = async ({ slug: t, ...e }) => {
344
+ var i, u, c;
345
+ const { data: a } = await S(
346
346
  "redirect_to_search",
347
347
  e
348
348
  );
349
- if (!n || !Array.isArray(n))
349
+ if (!a || !Array.isArray(a))
350
350
  return {
351
351
  slug: t,
352
352
  query: null,
353
353
  redirect: !1
354
354
  };
355
- const r = ((c = (l = (i = n[0]) == null ? void 0 : i.redirectToSearch) == null ? void 0 : l.redirectToSearch) == null ? void 0 : c.paths) ?? [];
355
+ const r = ((c = (u = (i = a[0]) == null ? void 0 : i.redirectToSearch) == null ? void 0 : u.redirectToSearch) == null ? void 0 : c.paths) ?? [];
356
356
  if (!!!r.length)
357
357
  return {
358
358
  slug: t,
@@ -361,8 +361,8 @@ const be = async ({
361
361
  };
362
362
  const o = r.find(
363
363
  (m) => {
364
- var u, d;
365
- return ((u = m.path) == null ? void 0 : u.replace(/\//g, "-").toLowerCase()) === t.replace(/\//g, "-").toLowerCase() || ((d = m.path) == null ? void 0 : d.replace(/\//g, "-").toLowerCase()) === `/${t}`.replace(/\//g, "-").toLowerCase();
364
+ var l, d;
365
+ return ((l = m.path) == null ? void 0 : l.replace(/\//g, "-").toLowerCase()) === t.replace(/\//g, "-").toLowerCase() || ((d = m.path) == null ? void 0 : d.replace(/\//g, "-").toLowerCase()) === `/${t}`.replace(/\//g, "-").toLowerCase();
366
366
  }
367
367
  );
368
368
  return o ? {
@@ -380,21 +380,21 @@ const be = async ({
380
380
  filters: null,
381
381
  sort: null
382
382
  };
383
- }, we = async ({ slug: t, ...e }) => {
384
- var i, l, c;
385
- const { data: n } = await S(
383
+ }, Ne = async ({ slug: t, ...e }) => {
384
+ var i, u, c;
385
+ const { data: a } = await S(
386
386
  "redirect_to_search",
387
387
  e
388
388
  );
389
- if (!n || !Array.isArray(n))
389
+ if (!a || !Array.isArray(a))
390
390
  return null;
391
- const r = ((c = (l = (i = n[0]) == null ? void 0 : i.redirectToSearch) == null ? void 0 : l.redirectToSearch) == null ? void 0 : c.paths) ?? [];
391
+ const r = ((c = (u = (i = a[0]) == null ? void 0 : i.redirectToSearch) == null ? void 0 : u.redirectToSearch) == null ? void 0 : c.paths) ?? [];
392
392
  if (!!!r.length)
393
393
  return null;
394
394
  const o = r.find(
395
395
  (m) => {
396
- var u, d;
397
- return ((u = m.path) == null ? void 0 : u.replace(/\//g, "-").toLowerCase()) === t.replace(/\//g, "-").toLowerCase() || ((d = m.path) == null ? void 0 : d.replace(/\//g, "-").toLowerCase()) === `/${t}`.replace(/\//g, "-").toLowerCase();
396
+ var l, d;
397
+ return ((l = m.path) == null ? void 0 : l.replace(/\//g, "-").toLowerCase()) === t.replace(/\//g, "-").toLowerCase() || ((d = m.path) == null ? void 0 : d.replace(/\//g, "-").toLowerCase()) === `/${t}`.replace(/\//g, "-").toLowerCase();
398
398
  }
399
399
  );
400
400
  return o ? {
@@ -402,10 +402,10 @@ const be = async ({
402
402
  title: o.pageTitle,
403
403
  description: o.pageDescription
404
404
  } : null;
405
- }, Ne = async ({
405
+ }, ke = async ({
406
406
  children: t,
407
407
  SectionZone: e,
408
- className: n,
408
+ className: a,
409
409
  ...r
410
410
  }) => {
411
411
  const { data: s } = await S(
@@ -413,42 +413,42 @@ const be = async ({
413
413
  r
414
414
  );
415
415
  return Array.isArray(s) && s.length > 0 ? /* @__PURE__ */ b(
416
- ce,
416
+ se,
417
417
  {
418
418
  data: s,
419
419
  SectionZone: e,
420
- className: n,
420
+ className: a,
421
421
  children: t
422
422
  }
423
423
  ) : /* @__PURE__ */ b(B, { children: "children" });
424
- }, ke = async ({
424
+ }, je = async ({
425
425
  ClientTipbarContent: t,
426
426
  ...e
427
427
  }) => {
428
- const { data: n } = await S(
428
+ const { data: a } = await S(
429
429
  "tipbar",
430
430
  e
431
431
  );
432
- return /* @__PURE__ */ b(t, { data: n });
433
- }, je = {
432
+ return /* @__PURE__ */ b(t, { data: a });
433
+ }, De = {
434
434
  CommonPageContent: Ce,
435
- CartContent: be,
436
- FlagsAndTagsContent: Re,
437
- HeaderContent: Se,
438
- TipbarContent: ke,
439
- FooterContent: ve,
435
+ CartContent: Ie,
436
+ FlagsAndTagsContent: ve,
437
+ HeaderContent: Ee,
438
+ TipbarContent: je,
439
+ FooterContent: Se,
440
440
  PLPContent: Ae,
441
441
  PDPContent: $e,
442
- getRedirectData: Pe,
443
- getPLPSynteticMetaData: we,
444
- SearchPageContent: Ne,
442
+ getRedirectData: we,
443
+ getPLPSynteticMetaData: Ne,
444
+ SearchPageContent: ke,
445
445
  HelpButtonContent: Te,
446
- LPCadastroContent: Fe,
446
+ LPCadastroContent: qe,
447
447
  LPLojasContent: Oe
448
- }, Sr = { Components: je }, h = async (t, e = {}) => {
449
- const { method: n = "GET", body: r, headers: s = {}, priority: o = "auto", cache: i = "default" } = e;
448
+ }, gr = { Components: De }, h = async (t, e = {}) => {
449
+ const { method: a = "GET", body: r, headers: s = {}, priority: o = "auto", cache: i = "default" } = e;
450
450
  return fetch(t, {
451
- method: n,
451
+ method: a,
452
452
  headers: {
453
453
  ...s,
454
454
  Accept: "application/json",
@@ -458,15 +458,15 @@ const be = async ({
458
458
  cache: i,
459
459
  ...r ? { body: JSON.stringify(r) } : {}
460
460
  // not body in get
461
- }).then((l) => l.json()).catch((l) => {
462
- console.error("[ERROR FETCH VTEX]", l);
461
+ }).then((u) => u.json()).catch((u) => {
462
+ console.error("[ERROR FETCH VTEX]", u);
463
463
  });
464
464
  }, w = /* @__PURE__ */ new Map();
465
- async function De(t, e = {}) {
466
- var n;
465
+ async function _e(t, e = {}) {
466
+ var a;
467
467
  try {
468
468
  const { abort: r = !1 } = e, s = new AbortController();
469
- r && (w.has(t) && ((n = w.get(t)) == null || n.abort(), w.delete(t)), w.set(t, s));
469
+ r && (w.has(t) && ((a = w.get(t)) == null || a.abort(), w.delete(t)), w.set(t, s));
470
470
  const o = h(t, {
471
471
  ...e,
472
472
  ...r ? { signal: s.signal } : {}
@@ -480,35 +480,35 @@ async function De(t, e = {}) {
480
480
  throw console.error(`[ERROR API]: ${r.message}`), r;
481
481
  }
482
482
  }
483
- const _e = a.object({
484
- country: a.string().length(3, "Country code must be 3 characters long").required("Country is required"),
485
- postalCode: a.string().nullable()
483
+ const He = n.object({
484
+ country: n.string().length(3, "Country code must be 3 characters long").required("Country is required"),
485
+ postalCode: n.string().nullable()
486
486
  });
487
- async function He({ apiUrl: t, body: e, fetchOptions: n }) {
487
+ async function Be({ apiUrl: t, body: e, fetchOptions: a }) {
488
488
  if (!e) {
489
489
  console.error("[ERROR FETCHING] Body is required");
490
490
  return;
491
491
  }
492
- await _e.validate(e);
492
+ await He.validate(e);
493
493
  const { country: r, postalCode: s } = e;
494
494
  return await h(
495
495
  `${t}/api/checkout/pub/postal-code/${r}/${s}`,
496
496
  {
497
497
  method: "POST",
498
498
  body: e,
499
- ...n
499
+ ...a
500
500
  }
501
501
  );
502
502
  }
503
- const Le = a.object({
504
- orderFormId: a.string().nullable(),
505
- sellerCode: a.string().nullable(),
506
- sellerName: a.string().nullable()
503
+ const Le = n.object({
504
+ orderFormId: n.string().nullable(),
505
+ sellerCode: n.string().nullable(),
506
+ sellerName: n.string().nullable()
507
507
  });
508
- async function K({
508
+ async function z({
509
509
  apiUrl: t,
510
510
  body: e,
511
- fetchOptions: n
511
+ fetchOptions: a
512
512
  }) {
513
513
  if (!e) {
514
514
  console.error("[ERROR FETCHING] Body is required");
@@ -523,29 +523,29 @@ async function K({
523
523
  body: {
524
524
  value: i
525
525
  },
526
- ...n
526
+ ...a
527
527
  }
528
528
  );
529
529
  }
530
- const Be = a.object({
531
- orderFormId: a.string().nullable(),
532
- sellerCode: a.string().nullable(),
533
- marketingData: a.object()
530
+ const Ge = n.object({
531
+ orderFormId: n.string().nullable(),
532
+ sellerCode: n.string().nullable(),
533
+ marketingData: n.object()
534
534
  });
535
- async function J({
535
+ async function Q({
536
536
  apiUrl: t,
537
537
  body: e,
538
- extraData: n = {},
538
+ extraData: a = {},
539
539
  fetchOptions: r
540
540
  }) {
541
541
  if (!e) {
542
542
  console.error("[ERROR FETCHING] Body is required");
543
543
  return;
544
544
  }
545
- await Be.validate(e);
546
- const { orderFormId: s, sellerCode: o, marketingData: i } = e, l = o ? {
545
+ await Ge.validate(e);
546
+ const { orderFormId: s, sellerCode: o, marketingData: i } = e, u = o ? {
547
547
  utmCampaign: o ? o.toUpperCase() : "",
548
- utmiCampaign: o ? `${n.VENDOR_CODE}` : "semcodigo"
548
+ utmiCampaign: o ? `${a.VENDOR_CODE}` : "semcodigo"
549
549
  } : {};
550
550
  return h(
551
551
  `${t}/api/checkout/pub/orderForm/${s}/attachments/marketingData`,
@@ -553,67 +553,67 @@ async function J({
553
553
  method: "POST",
554
554
  body: {
555
555
  ...i,
556
- ...l
556
+ ...u
557
557
  },
558
558
  ...r
559
559
  }
560
560
  );
561
561
  }
562
- const Ge = a.object({
563
- orderFormId: a.string().nullable(),
564
- sellerCode: a.string().nullable(),
565
- sellerName: a.string().nullable()
562
+ const Me = n.object({
563
+ orderFormId: n.string().nullable(),
564
+ sellerCode: n.string().nullable(),
565
+ sellerName: n.string().nullable()
566
566
  });
567
- async function Me({ apiUrl: t, body: e, fetchOptions: n, extraData: r }) {
567
+ async function Ue({ apiUrl: t, body: e, fetchOptions: a, extraData: r }) {
568
568
  if (!e) {
569
569
  console.error("[ERROR FETCHING] Body is required");
570
570
  return;
571
571
  }
572
- await Ge.validate(e);
573
- const s = await K({ apiUrl: t, body: e, fetchOptions: n });
574
- return J({
572
+ await Me.validate(e);
573
+ const s = await z({ apiUrl: t, body: e, fetchOptions: a });
574
+ return Q({
575
575
  apiUrl: t,
576
576
  body: {
577
577
  ...e,
578
578
  marketingData: s == null ? void 0 : s.marketingData
579
579
  },
580
580
  extraData: r,
581
- fetchOptions: n
581
+ fetchOptions: a
582
582
  });
583
583
  }
584
- const Ue = a.object({
585
- orderFormId: a.string().nullable(),
586
- coupon: a.string().nullable()
584
+ const Ve = n.object({
585
+ orderFormId: n.string().nullable(),
586
+ coupon: n.string().nullable()
587
587
  });
588
- async function Ve({
588
+ async function xe({
589
589
  apiUrl: t,
590
590
  body: e,
591
- fetchOptions: n
591
+ fetchOptions: a
592
592
  }) {
593
593
  if (!e) {
594
594
  console.error("[ERROR FETCHING] Body is required");
595
595
  return;
596
596
  }
597
- await Ue.validate(e);
597
+ await Ve.validate(e);
598
598
  const { coupon: r = "", orderFormId: s } = e;
599
599
  return h(
600
600
  `${t}/api/checkout/pub/orderForm/${s}/coupons`,
601
601
  {
602
602
  method: "POST",
603
603
  body: { text: r },
604
- ...n
604
+ ...a
605
605
  }
606
606
  );
607
607
  }
608
- const ze = a.object({
609
- appId: a.string().required("App ID is required"),
610
- orderFormId: a.string().nullable(),
611
- key: a.array().of(a.string())
608
+ const ze = n.object({
609
+ appId: n.string().required("App ID is required"),
610
+ orderFormId: n.string().nullable(),
611
+ key: n.array().of(n.string())
612
612
  });
613
- async function xe({
613
+ async function Qe({
614
614
  apiUrl: t,
615
615
  body: e,
616
- fetchOptions: n
616
+ fetchOptions: a
617
617
  }) {
618
618
  if (!e) {
619
619
  console.error("[ERROR FETCHING] Body is required");
@@ -625,111 +625,111 @@ async function xe({
625
625
  `${t}/api/checkout/pub/orderForm/${s}/customData/${r}/${o}`,
626
626
  {
627
627
  method: "PUT",
628
- ...n
628
+ ...a
629
629
  }
630
630
  );
631
631
  }
632
- const Qe = a.object().shape({
633
- name: a.string().required("Attachment name is required"),
634
- content: a.object().nullable()
632
+ const Ke = n.object().shape({
633
+ name: n.string().required("Attachment name is required"),
634
+ content: n.object().nullable()
635
635
  });
636
- var x;
637
- const Ke = a.object().shape({
638
- attachments: (x = a.array().of(Qe)) == null ? void 0 : x.nullable(),
639
- id: a.string().required("ID of SKU is required"),
640
- index: a.number().integer().nullable(),
641
- quantity: a.number().integer().nullable(),
642
- seller: a.string().required("Seller is required"),
643
- price: a.number().integer()
644
- }), Je = a.object({
645
- orderFormId: a.string().required("OrderFormId is required"),
646
- orderItems: a.array().of(Ke)
636
+ var V;
637
+ const Je = n.object().shape({
638
+ attachments: (V = n.array().of(Ke)) == null ? void 0 : V.nullable(),
639
+ id: n.string().required("ID of SKU is required"),
640
+ index: n.number().integer().nullable(),
641
+ quantity: n.number().integer().nullable(),
642
+ seller: n.string().required("Seller is required"),
643
+ price: n.number().integer()
644
+ }), We = n.object({
645
+ orderFormId: n.string().required("OrderFormId is required"),
646
+ orderItems: n.array().of(Je)
647
647
  });
648
- async function Ye({
648
+ async function Xe({
649
649
  apiUrl: t,
650
650
  body: e,
651
- fetchOptions: n
651
+ fetchOptions: a
652
652
  }) {
653
653
  if (!e) {
654
654
  console.error("[ERROR FETCHING] Body is required");
655
655
  return;
656
656
  }
657
- await Je.validate(e);
657
+ await We.validate(e);
658
658
  const { orderFormId: r, orderItems: s } = e;
659
659
  return h(
660
660
  `${t}/api/checkout/pub/orderForm/${r}/items`,
661
661
  {
662
662
  method: "POST",
663
663
  body: { orderItems: s },
664
- ...n
664
+ ...a
665
665
  }
666
666
  );
667
667
  }
668
- const We = a.object({
669
- orderFormId: a.string().nullable()
668
+ const Ye = n.object({
669
+ orderFormId: n.string().nullable()
670
670
  });
671
- async function Xe({
671
+ async function Ze({
672
672
  apiUrl: t,
673
673
  body: e,
674
- fetchOptions: n
674
+ fetchOptions: a
675
675
  }) {
676
676
  if (!e) {
677
677
  console.error("[ERROR FETCHING] Body is required");
678
678
  return;
679
679
  }
680
- await We.validate(e);
680
+ await Ye.validate(e);
681
681
  const { orderFormId: r } = e;
682
682
  return h(
683
683
  `${t}/api/checkout/pub/orderForm/${r}/items/removeAll`,
684
684
  {
685
685
  method: "POST",
686
- ...n
686
+ ...a
687
687
  }
688
688
  );
689
689
  }
690
- const Ze = a.object().shape({
691
- name: a.string().required("Attachment name is required"),
692
- content: a.object().nullable()
690
+ const et = n.object().shape({
691
+ name: n.string().required("Attachment name is required"),
692
+ content: n.object().nullable()
693
693
  });
694
- var Q;
695
- const et = a.object().shape({
696
- attachments: (Q = a.array().of(Ze)) == null ? void 0 : Q.nullable(),
697
- id: a.string().required("ID of SKU is required"),
698
- index: a.number().integer().nullable(),
699
- quantity: a.number().integer().nullable(),
700
- seller: a.string().required("Seller is required"),
701
- price: a.number().integer()
702
- }), tt = a.object({
703
- orderFormId: a.string().nullable(),
704
- orderItems: a.array().of(et)
694
+ var x;
695
+ const tt = n.object().shape({
696
+ attachments: (x = n.array().of(et)) == null ? void 0 : x.nullable(),
697
+ id: n.string().required("ID of SKU is required"),
698
+ index: n.number().integer().nullable(),
699
+ quantity: n.number().integer().nullable(),
700
+ seller: n.string().required("Seller is required"),
701
+ price: n.number().integer()
702
+ }), rt = n.object({
703
+ orderFormId: n.string().nullable(),
704
+ orderItems: n.array().of(tt)
705
705
  });
706
- async function rt({
706
+ async function at({
707
707
  apiUrl: t,
708
708
  body: e,
709
- fetchOptions: n
709
+ fetchOptions: a
710
710
  }) {
711
711
  if (!e) {
712
712
  console.error("[ERROR FETCHING] Body is required");
713
713
  return;
714
714
  }
715
- await tt.validate(e);
715
+ await rt.validate(e);
716
716
  const { orderFormId: r, orderItems: s } = e;
717
717
  return h(
718
718
  `${t}/api/checkout/pub/orderForm/${r}/items/update`,
719
719
  {
720
720
  method: "POST",
721
721
  body: { orderItems: s },
722
- ...n
722
+ ...a
723
723
  }
724
724
  );
725
725
  }
726
- const nt = a.object({
727
- orderFormId: a.string().nullable()
726
+ const nt = n.object({
727
+ orderFormId: n.string().nullable()
728
728
  });
729
- async function at({
729
+ async function st({
730
730
  apiUrl: t,
731
731
  body: e,
732
- fetchOptions: n
732
+ fetchOptions: a
733
733
  }) {
734
734
  if (!e) {
735
735
  console.error("[ERROR FETCHING] Body is required");
@@ -741,37 +741,37 @@ async function at({
741
741
  `${t}/api/checkout/pub/orderForm/${r}/messages/clear`,
742
742
  {
743
743
  method: "POST",
744
- ...n
744
+ ...a
745
745
  }
746
746
  );
747
747
  }
748
- const st = a.object({
749
- id: a.string().nullable(),
748
+ const ot = n.object({
749
+ id: n.string().nullable(),
750
750
  // id offering
751
- itemIndex: a.number().nullable(),
752
- orderFormId: a.string().nullable(),
753
- remove: a.boolean().nullable()
751
+ itemIndex: n.number().nullable(),
752
+ orderFormId: n.string().nullable(),
753
+ remove: n.boolean().nullable()
754
754
  });
755
- async function ot({ apiUrl: t, body: e, fetchOptions: n }) {
755
+ async function it({ apiUrl: t, body: e, fetchOptions: a }) {
756
756
  if (!e) {
757
757
  console.error("[ERROR FETCHING] Body is required");
758
758
  return;
759
759
  }
760
- await st.validate(e);
761
- const { itemIndex: r, orderFormId: s, id: o, remove: i } = e, l = i ? `/${o}/remove` : "", c = `${t}/api/checkout/pub/orderForm/${s}/items/${r}/offerings${l}`;
760
+ await ot.validate(e);
761
+ const { itemIndex: r, orderFormId: s, id: o, remove: i } = e, u = i ? `/${o}/remove` : "", c = `${t}/api/checkout/pub/orderForm/${s}/items/${r}/offerings${u}`;
762
762
  return h(c, {
763
763
  method: "POST",
764
764
  body: { id: o },
765
- ...n
765
+ ...a
766
766
  });
767
767
  }
768
- const it = a.object({
769
- orderFormId: a.string().nullable()
768
+ const ct = n.object({
769
+ orderFormId: n.string().nullable()
770
770
  });
771
- async function ct({
771
+ async function lt({
772
772
  apiUrl: t,
773
773
  body: e,
774
- fetchOptions: n,
774
+ fetchOptions: a,
775
775
  extraData: r
776
776
  }) {
777
777
  var i;
@@ -779,58 +779,58 @@ async function ct({
779
779
  console.error("[ERROR FETCHING] Body is required");
780
780
  return;
781
781
  }
782
- await it.validate(e);
782
+ await ct.validate(e);
783
783
  const s = new URLSearchParams({
784
784
  refreshOutdatedData: "true"
785
785
  }), o = e.orderFormId && ((i = r.orderFormPurchaseId) == null ? void 0 : i.value) !== e.orderFormId ? `${t}/api/checkout/pub/orderForm/${e.orderFormId}?${String(s)}` : `${t}/api/checkout/pub/orderForm`;
786
- return h(o, { method: "GET", ...n });
786
+ return h(o, { method: "GET", ...a });
787
787
  }
788
- const lt = a.object({
789
- orderFormId: a.string().nullable(),
790
- email: a.string().email().required(),
791
- firstName: a.string().required(),
792
- lastName: a.string().required(),
793
- documentType: a.string().required(),
794
- document: a.string().required(),
795
- phone: a.string().matches(/^\+\d{1,3}\d{10,11}$/)
788
+ const ut = n.object({
789
+ orderFormId: n.string().nullable(),
790
+ email: n.string().email().required(),
791
+ firstName: n.string().required(),
792
+ lastName: n.string().required(),
793
+ documentType: n.string().required(),
794
+ document: n.string().required(),
795
+ phone: n.string().matches(/^\+\d{1,3}\d{10,11}$/)
796
796
  });
797
- async function ut({
797
+ async function dt({
798
798
  apiUrl: t,
799
799
  body: e,
800
- fetchOptions: n
800
+ fetchOptions: a
801
801
  }) {
802
802
  if (!e) {
803
803
  console.error("[ERROR FETCHING] Body is required");
804
804
  return;
805
805
  }
806
- await lt.validate(e);
806
+ await ut.validate(e);
807
807
  const { orderFormId: r, ...s } = e;
808
808
  return h(
809
809
  `${t}/api/checkout/pub/orderForm/${r}/attachments/clientProfileData`,
810
810
  {
811
811
  method: "POST",
812
812
  body: { ...s },
813
- ...n
813
+ ...a
814
814
  }
815
815
  );
816
816
  }
817
- const dt = a.object({
818
- sellerCode: a.string().nullable()
817
+ const mt = n.object({
818
+ sellerCode: n.string().nullable()
819
819
  });
820
- async function mt({
820
+ async function pt({
821
821
  apiUrl: t,
822
822
  body: e,
823
- extraData: n,
823
+ extraData: a,
824
824
  fetchOptions: r
825
825
  }) {
826
826
  if (!e) {
827
827
  console.error("[ERROR FETCHING] Body is required");
828
828
  return;
829
829
  }
830
- await dt.validate(e);
830
+ await mt.validate(e);
831
831
  const { sellerCode: s = "" } = e;
832
832
  return h(
833
- `${t}/api/dataentities/${n.ENTITIES}/search?_fields=${n.FIELDS}&${n.FILTER}=${s}`,
833
+ `${t}/api/dataentities/${a.ENTITIES}/search?_fields=${a.FIELDS}&${a.FILTER}=${s}`,
834
834
  {
835
835
  method: "GET",
836
836
  headers: {
@@ -840,21 +840,21 @@ async function mt({
840
840
  }
841
841
  );
842
842
  }
843
- const pt = a.object().shape({
844
- country: a.string().length(3, "Country code must be 3 characters long").required("Country is required"),
845
- orderFormId: a.string().nullable(),
846
- postalCode: a.string().nullable()
843
+ const ft = n.object().shape({
844
+ country: n.string().length(3, "Country code must be 3 characters long").required("Country is required"),
845
+ orderFormId: n.string().nullable(),
846
+ postalCode: n.string().nullable()
847
847
  });
848
- async function ft({
848
+ async function gt({
849
849
  apiUrl: t,
850
850
  body: e,
851
- fetchOptions: n
851
+ fetchOptions: a
852
852
  }) {
853
853
  if (!e) {
854
854
  console.error("[ERROR FETCHING] Body is required");
855
855
  return;
856
856
  }
857
- await pt.validate(e);
857
+ await ft.validate(e);
858
858
  const { country: r, orderFormId: s, postalCode: o } = e, i = o ? {
859
859
  address: {
860
860
  addressType: "residential",
@@ -870,44 +870,44 @@ async function ft({
870
870
  {
871
871
  method: "POST",
872
872
  body: i,
873
- ...n
873
+ ...a
874
874
  }
875
875
  );
876
876
  }
877
- const gt = a.object().shape({
878
- orderFormId: a.string().nullable(),
879
- options: a.array().of(
880
- a.object().shape({
881
- itemIndex: a.number(),
882
- selectedDeliveryChannel: a.string(),
883
- selectedSla: a.string()
877
+ const ht = n.object().shape({
878
+ orderFormId: n.string().nullable(),
879
+ options: n.array().of(
880
+ n.object().shape({
881
+ itemIndex: n.number(),
882
+ selectedDeliveryChannel: n.string(),
883
+ selectedSla: n.string()
884
884
  })
885
885
  ),
886
- selectedAddresses: a.array().of(
887
- a.object().shape({
888
- addressId: a.string().required(),
889
- addressType: a.string().required(),
890
- city: a.string().nullable(),
891
- complement: a.string().nullable(),
892
- country: a.string().required().length(3),
893
- geoCoordinates: a.array().of(a.number()).required().min(0),
894
- isDisposable: a.boolean().required(),
895
- neighborhood: a.string().nullable(),
896
- number: a.string().nullable(),
897
- postalCode: a.string().required(),
898
- receiverName: a.string().nullable(),
899
- reference: a.string().nullable(),
900
- state: a.string().nullable(),
901
- street: a.string().nullable()
886
+ selectedAddresses: n.array().of(
887
+ n.object().shape({
888
+ addressId: n.string().required(),
889
+ addressType: n.string().required(),
890
+ city: n.string().nullable(),
891
+ complement: n.string().nullable(),
892
+ country: n.string().required().length(3),
893
+ geoCoordinates: n.array().of(n.number()).required().min(0),
894
+ isDisposable: n.boolean().required(),
895
+ neighborhood: n.string().nullable(),
896
+ number: n.string().nullable(),
897
+ postalCode: n.string().required(),
898
+ receiverName: n.string().nullable(),
899
+ reference: n.string().nullable(),
900
+ state: n.string().nullable(),
901
+ street: n.string().nullable()
902
902
  })
903
903
  )
904
904
  });
905
- async function ht({ apiUrl: t, body: e, fetchOptions: n }) {
905
+ async function yt({ apiUrl: t, body: e, fetchOptions: a }) {
906
906
  if (!e) {
907
907
  console.error("[ERROR FETCHING] Body is required");
908
908
  return;
909
909
  }
910
- await gt.validate(e);
910
+ await ht.validate(e);
911
911
  const { orderFormId: r, options: s, selectedAddresses: o } = e;
912
912
  return h(
913
913
  `${t}/api/checkout/pub/orderForm/${r}/attachments/shippingData`,
@@ -918,24 +918,24 @@ async function ht({ apiUrl: t, body: e, fetchOptions: n }) {
918
918
  clearAddressIfPostalCodeNotFound: !1,
919
919
  logisticsInfo: s
920
920
  },
921
- ...n
921
+ ...a
922
922
  }
923
923
  );
924
924
  }
925
- const yt = a.object({
926
- country: a.string().length(3, "Country code must be 3 characters long").required("Country is required"),
927
- postalCode: a.string().nullable(),
928
- geoCoordinates: a.object().shape({
929
- longitude: a.number().required(),
930
- latitude: a.number().required()
925
+ const bt = n.object({
926
+ country: n.string().length(3, "Country code must be 3 characters long").required("Country is required"),
927
+ postalCode: n.string().nullable(),
928
+ geoCoordinates: n.object().shape({
929
+ longitude: n.number().required(),
930
+ latitude: n.number().required()
931
931
  })
932
932
  });
933
- async function bt({ apiUrl: t, body: e, fetchOptions: n }) {
933
+ async function It({ apiUrl: t, body: e, fetchOptions: a }) {
934
934
  if (!e) {
935
935
  console.error("[ERROR FETCHING] Body is required");
936
936
  return;
937
937
  }
938
- await yt.validate(e);
938
+ await bt.validate(e);
939
939
  const { country: r = "", geoCoordinates: s, postalCode: o = "" } = e, i = new URLSearchParams({ country: String(r) });
940
940
  return o ? i.append("postalCode", o) : i.append(
941
941
  "geoCoordinates",
@@ -944,21 +944,21 @@ async function bt({ apiUrl: t, body: e, fetchOptions: n }) {
944
944
  `${t}/api/checkout/pub/regions/?${i.toString()}`,
945
945
  {
946
946
  method: "GET",
947
- ...n
947
+ ...a
948
948
  }
949
949
  );
950
950
  }
951
- const It = a.object({
952
- id: a.string().required("ID of SKU is required"),
953
- quantity: a.number().integer().required("Quantity of item is required"),
954
- seller: a.string()
955
- }), Ct = a.object({
956
- items: a.array().of(It),
957
- country: a.string().length(3, "Country code must be 3 characters long").required("Country is required"),
958
- postalCode: a.string().nullable(),
959
- geoCoordinates: a.array().nullable().of(a.number()).length(2)
951
+ const Rt = n.object({
952
+ id: n.string().required("ID of SKU is required"),
953
+ quantity: n.number().integer().required("Quantity of item is required"),
954
+ seller: n.string()
955
+ }), Ct = n.object({
956
+ items: n.array().of(Rt),
957
+ country: n.string().length(3, "Country code must be 3 characters long").required("Country is required"),
958
+ postalCode: n.string().nullable(),
959
+ geoCoordinates: n.array().nullable().of(n.number()).length(2)
960
960
  });
961
- async function Rt({ apiUrl: t, body: e, fetchOptions: n }) {
961
+ async function vt({ apiUrl: t, body: e, fetchOptions: a }) {
962
962
  if (!e) {
963
963
  console.error("[ERROR FETCHING] Body is required");
964
964
  return;
@@ -968,51 +968,51 @@ async function Rt({ apiUrl: t, body: e, fetchOptions: n }) {
968
968
  {
969
969
  method: "POST",
970
970
  body: e,
971
- ...n
971
+ ...a
972
972
  }
973
973
  );
974
974
  }
975
- const vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
975
+ const St = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
976
976
  __proto__: null,
977
- getMasterDataSellerCode: mt,
978
- getOrderForm: ct,
979
- postOrderFormAddCoupon: Ve,
980
- postOrderFormAttachClientProfileData: ut,
981
- postOrderFormAttachOrderFormData: Me,
982
- postOrderFormAttachShippingData: ft,
983
- postOrderFormAttachmentsMarketingData: J,
984
- postOrderFormAttachmentsOpenTextField: K,
985
- postOrderFormClearMessages: at,
986
- postOrderFormFreightSimulation: Rt,
987
- postOrderFormItems: Ye,
988
- postOrderFormRegion: bt,
989
- postOrderFormRemoveAllItems: Xe,
990
- postOrderFormUpdateItems: rt,
991
- postOrderFormUpdateShippingData: ht,
992
- postOrderformAddress: He,
993
- putOrderFormCustomData: xe,
994
- updateOrderFormOffering: ot
995
- }, Symbol.toStringTag, { value: "Module" })), St = a.object({
996
- skuId: a.string()
977
+ getMasterDataSellerCode: pt,
978
+ getOrderForm: lt,
979
+ postOrderFormAddCoupon: xe,
980
+ postOrderFormAttachClientProfileData: dt,
981
+ postOrderFormAttachOrderFormData: Ue,
982
+ postOrderFormAttachShippingData: gt,
983
+ postOrderFormAttachmentsMarketingData: Q,
984
+ postOrderFormAttachmentsOpenTextField: z,
985
+ postOrderFormClearMessages: st,
986
+ postOrderFormFreightSimulation: vt,
987
+ postOrderFormItems: Xe,
988
+ postOrderFormRegion: It,
989
+ postOrderFormRemoveAllItems: Ze,
990
+ postOrderFormUpdateItems: at,
991
+ postOrderFormUpdateShippingData: yt,
992
+ postOrderformAddress: Be,
993
+ putOrderFormCustomData: Qe,
994
+ updateOrderFormOffering: it
995
+ }, Symbol.toStringTag, { value: "Module" })), Et = n.object({
996
+ skuId: n.string()
997
997
  });
998
- async function Et({ apiUrl: t, body: e, fetchOptions: n }) {
998
+ async function Ft({ apiUrl: t, body: e, fetchOptions: a }) {
999
999
  if (!e) {
1000
1000
  console.error("[ERROR FETCHING] Body is required");
1001
1001
  return;
1002
1002
  }
1003
- await St.validate(e);
1003
+ await Et.validate(e);
1004
1004
  const { skuId: r } = e;
1005
1005
  return h(
1006
1006
  `${t}/api/catalog/pvt/stockkeepingunitkit?parentSkuId=${r}`,
1007
1007
  {
1008
- ...n
1008
+ ...a
1009
1009
  }
1010
1010
  );
1011
1011
  }
1012
- const Tt = a.object({
1013
- ids: a.array().of(a.string().required("ID are required")).required("IDs are required")
1012
+ const Tt = n.object({
1013
+ ids: n.array().of(n.string().required("ID are required")).required("IDs are required")
1014
1014
  });
1015
- async function Ft({ apiUrl: t, body: e, fetchOptions: n }) {
1015
+ async function qt({ apiUrl: t, body: e, fetchOptions: a }) {
1016
1016
  if (!e) {
1017
1017
  console.error("[ERROR FETCHING] Body is required");
1018
1018
  return;
@@ -1022,14 +1022,14 @@ async function Ft({ apiUrl: t, body: e, fetchOptions: n }) {
1022
1022
  return h(
1023
1023
  `${t}/api/catalog_system/pub/products/search?fq=${r.map((s) => `productId:${s}`).join("&fq=")}`,
1024
1024
  {
1025
- ...n
1025
+ ...a
1026
1026
  }
1027
1027
  );
1028
1028
  }
1029
- const Ot = a.object({
1030
- productId: a.number().required("Product ID is required")
1029
+ const Ot = n.object({
1030
+ productId: n.number().required("Product ID is required")
1031
1031
  });
1032
- async function $t({ apiUrl: t, body: e, fetchOptions: n }) {
1032
+ async function $t({ apiUrl: t, body: e, fetchOptions: a }) {
1033
1033
  if (!e) {
1034
1034
  console.error("[ERROR FETCHING] Body is required");
1035
1035
  return;
@@ -1039,22 +1039,22 @@ async function $t({ apiUrl: t, body: e, fetchOptions: n }) {
1039
1039
  return h(
1040
1040
  `${t}/api/catalog_system/pub/products/crossselling/similars/${r.toString()}`,
1041
1041
  {
1042
- ...n
1042
+ ...a
1043
1043
  }
1044
1044
  );
1045
1045
  }
1046
- const qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1046
+ const Pt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1047
1047
  __proto__: null,
1048
- getCatalogKitProducts: Et,
1049
- getCatalogProducts: Ft,
1048
+ getCatalogKitProducts: Ft,
1049
+ getCatalogProducts: qt,
1050
1050
  getCatalogSimilars: $t
1051
- }, Symbol.toStringTag, { value: "Module" })), At = a.object({
1052
- query: a.string()
1051
+ }, Symbol.toStringTag, { value: "Module" })), At = n.object({
1052
+ query: n.string()
1053
1053
  });
1054
- async function Pt({
1054
+ async function wt({
1055
1055
  apiUrl: t,
1056
1056
  body: e,
1057
- fetchOptions: n
1057
+ fetchOptions: a
1058
1058
  }) {
1059
1059
  if (!e) {
1060
1060
  console.error("[ERROR FETCHING] Body is required");
@@ -1065,113 +1065,113 @@ async function Pt({
1065
1065
  return h(
1066
1066
  `${t}/api/io/_v/api/intelligent-search/autocomplete_suggestions?${s.toString()}`,
1067
1067
  {
1068
- ...n
1068
+ ...a
1069
1069
  }
1070
1070
  );
1071
1071
  }
1072
- const wt = (t, e) => ye(t, e), Nt = (t) => ({
1072
+ const Nt = (t, e) => be(t, e), kt = (t) => ({
1073
1073
  ...t,
1074
- description: t.description ? wt(t.description) : t.description
1075
- }), kt = ({
1074
+ description: t.description ? Nt(t.description) : t.description
1075
+ }), jt = ({
1076
1076
  offer: t,
1077
1077
  seller: e,
1078
- product: n
1078
+ product: a
1079
1079
  }) => ({
1080
1080
  ...t,
1081
- product: n,
1081
+ product: a,
1082
1082
  seller: e
1083
- }), Y = (t, e) => ({
1083
+ }), K = (t, e) => ({
1084
1084
  ...t,
1085
- isVariantOf: Nt(e)
1086
- }), jt = (t) => t ? "https://schema.org/InStock" : "https://schema.org/OutOfStock", k = (t) => t.AvailableQuantity > 0, U = (t) => t.spotPrice ?? 0, Dt = (t) => t.Price ?? 0, W = (t, e) => k(t) && !k(e) ? -1 : !k(t) && k(e) ? 1 : U(t) - U(e), _t = (t, e) => {
1087
- let n = 0;
1085
+ isVariantOf: kt(e)
1086
+ }), Dt = (t) => t ? "https://schema.org/InStock" : "https://schema.org/OutOfStock", N = (t) => t.AvailableQuantity > 0, M = (t) => t.spotPrice ?? 0, _t = (t) => t.Price ?? 0, J = (t, e) => N(t) && !N(e) ? -1 : !N(t) && N(e) ? 1 : M(t) - M(e), Ht = (t, e) => {
1087
+ let a = 0;
1088
1088
  for (let r = 1; r < t.length; r++)
1089
- e(t[n], t[r]) > 0 && (n = r);
1090
- return t[n];
1091
- }, X = (t) => {
1089
+ e(t[a], t[r]) > 0 && (a = r);
1090
+ return t[a];
1091
+ }, W = (t) => {
1092
1092
  const e = t.flatMap(
1093
1093
  (r) => r.sellers.map((s) => ({
1094
1094
  offer: s.commertialOffer,
1095
1095
  sku: r
1096
1096
  }))
1097
- ), n = _t(
1097
+ ), a = Ht(
1098
1098
  e,
1099
- ({ offer: r }, { offer: s }) => W(r, s)
1099
+ ({ offer: r }, { offer: s }) => J(r, s)
1100
1100
  );
1101
- return n ? n.sku : t[0];
1102
- }, Z = (t) => t.map(
1103
- ({ imageUrl: e, imageText: n, imageLabel: r }) => ({
1104
- alternateName: n ?? "",
1101
+ return a ? a.sku : t[0];
1102
+ }, X = (t) => t.map(
1103
+ ({ imageUrl: e, imageText: a, imageLabel: r }) => ({
1104
+ alternateName: a ?? "",
1105
1105
  url: e.replace("vteximg.com.br", "vtexassets.com"),
1106
1106
  keywords: r
1107
1107
  })
1108
- ), H = {
1108
+ ), _ = {
1109
1109
  attachment: "ATTACHMENT",
1110
1110
  specification: "SPECIFICATION",
1111
1111
  attribute: "ATTRIBUTE"
1112
- }, Ht = (t) => ({
1112
+ }, Bt = (t) => ({
1113
1113
  name: t.name,
1114
1114
  value: t.content,
1115
- valueReference: H.attachment
1115
+ valueReference: _.attachment
1116
1116
  }), Lt = (t) => ({
1117
1117
  propertyID: t.id,
1118
1118
  name: t.name,
1119
1119
  value: t.value,
1120
1120
  valueReference: {
1121
- valueReference: H.attribute,
1121
+ valueReference: _.attribute,
1122
1122
  visible: t.visible
1123
1123
  }
1124
- }), L = (t, e, n) => {
1125
- const r = t.flatMap(({ name: i, values: l }) => l ? l.map((c) => ({
1124
+ }), H = (t, e, a) => {
1125
+ const r = t.flatMap(({ name: i, values: u }) => u ? u.map((c) => ({
1126
1126
  name: i,
1127
1127
  value: c,
1128
- valueReference: H.specification
1128
+ valueReference: _.specification
1129
1129
  })) : {
1130
1130
  name: i,
1131
1131
  value: "",
1132
- valueReference: H.specification
1133
- }), s = Array.isArray(n) ? n.map(Ht) : [], o = e ? e.map(Lt) : [];
1132
+ valueReference: _.specification
1133
+ }), s = Array.isArray(a) ? a.map(Bt) : [], o = e ? e.map(Lt) : [];
1134
1134
  return [
1135
1135
  ...r,
1136
1136
  ...s,
1137
1137
  ...o
1138
1138
  ];
1139
- }, V = "ÁÄÂÀÃÅČÇĆĎÉĚËÈÊẼĔȆÍÌÎÏŇÑÓÖÒÔÕØŘŔŠŤÚŮÜÙÛÝŸŽáäâàãåčçćďéěëèêẽĕȇíìîïňñóöòôõøðřŕšťúůüùûýÿžþÞĐđ߯a", Bt = "AAAAAACCCDEEEEEEEEIIIINNOOOOOORRSTUUUUUYYZaaaaaacccdeeeeeeeeiiiinnooooooorrstuuuuuyyzbBDdBAa", Gt = (t) => {
1139
+ }, U = "ÁÄÂÀÃÅČÇĆĎÉĚËÈÊẼĔȆÍÌÎÏŇÑÓÖÒÔÕØŘŔŠŤÚŮÜÙÛÝŸŽáäâàãåčçćďéěëèêẽĕȇíìîïňñóöòôõøðřŕšťúůüùûýÿžþÞĐđ߯a", Gt = "AAAAAACCCDEEEEEEEEIIIINNOOOOOORRSTUUUUUYYZaaaaaacccdeeeeeeeeiiiinnooooooorrstuuuuuyyzbBDdBAa", Mt = (t) => {
1140
1140
  let e = t.slice(0);
1141
- for (let n = 0; n < V.length; n++)
1141
+ for (let a = 0; a < U.length; a++)
1142
1142
  e = e.replace(
1143
- new RegExp(V.charAt(n), "g"),
1144
- Bt.charAt(n)
1143
+ new RegExp(U.charAt(a), "g"),
1144
+ Gt.charAt(a)
1145
1145
  );
1146
1146
  return e;
1147
- }, Mt = (t) => t.replace(/[·/_,:]/, "-"), ee = (t) => {
1148
- const n = t.replace(/,/g, "").replace(/[*+~.()'"!:@&\[\]`/ %$#?{}|><=_^]/g, "-");
1149
- return Mt(Gt(n)).toLowerCase();
1150
- }, te = (t) => `/${t}/p`, re = (t) => {
1147
+ }, Ut = (t) => t.replace(/[·/_,:]/, "-"), Y = (t) => {
1148
+ const a = t.replace(/,/g, "").replace(/[*+~.()'"!:@&\[\]`/ %$#?{}|><=_^]/g, "-");
1149
+ return Ut(Mt(a)).toLowerCase();
1150
+ }, Z = (t) => `/${t}/p`, ee = (t) => {
1151
1151
  const e = Math.max(
1152
1152
  ...t.map((r) => r.NumberOfInstallments)
1153
- ), n = t.find(
1153
+ ), a = t.find(
1154
1154
  (r) => r.NumberOfInstallments === e
1155
1155
  );
1156
1156
  return {
1157
- count: (n == null ? void 0 : n.NumberOfInstallments) ?? 0,
1158
- value: (n == null ? void 0 : n.Value) ?? 0
1157
+ count: (a == null ? void 0 : a.NumberOfInstallments) ?? 0,
1158
+ value: (a == null ? void 0 : a.Value) ?? 0
1159
1159
  };
1160
- }, ne = (t, e) => {
1161
- const n = {
1160
+ }, te = (t, e) => {
1161
+ const a = {
1162
1162
  price: 0,
1163
1163
  listPrice: 0,
1164
1164
  sellerDefault: !1
1165
1165
  }, s = t.map(
1166
- (o) => kt({
1166
+ (o) => jt({
1167
1167
  offer: o.commertialOffer,
1168
1168
  seller: o,
1169
1169
  product: e
1170
1170
  })
1171
- ).sort(W).map((o) => (o.seller.sellerId === "1" && o.AvailableQuantity > 0 && (n.price = o.Price, n.listPrice = o.ListPrice, n.sellerDefault = !0), {
1171
+ ).sort(J).map((o) => (o.seller.sellerId === "1" && o.AvailableQuantity > 0 && (a.price = o.Price, a.listPrice = o.ListPrice, a.sellerDefault = !0), {
1172
1172
  availability: o.AvailableQuantity > 0,
1173
1173
  listPrice: o.ListPrice,
1174
- price: Dt(o),
1174
+ price: _t(o),
1175
1175
  priceValidUntil: o.PriceValidUntil,
1176
1176
  priceCurrency: "BRL",
1177
1177
  installments: o.Installments,
@@ -1182,85 +1182,85 @@ const wt = (t, e) => ye(t, e), Nt = (t) => ({
1182
1182
  }
1183
1183
  }));
1184
1184
  return {
1185
- lowPrice: n.sellerDefault ? n.price : s[0].price,
1186
- highPrice: n.sellerDefault ? n.listPrice : s[0].listPrice,
1185
+ lowPrice: a.sellerDefault ? a.price : s[0].price,
1186
+ highPrice: a.sellerDefault ? a.listPrice : s[0].listPrice,
1187
1187
  offers: s
1188
1188
  };
1189
- }, ae = (t) => {
1190
- const { attributes: e, itemId: n, name: r, sellers: s, variations: o } = t;
1189
+ }, re = (t) => {
1190
+ const { attributes: e, itemId: a, name: r, sellers: s, variations: o } = t;
1191
1191
  return {
1192
- additionalProperty: L(o, e, []),
1192
+ additionalProperty: H(o, e, []),
1193
1193
  name: r,
1194
1194
  offers: {
1195
- offers: s == null ? void 0 : s.map(({ sellerId: i, commertialOffer: l }) => ({
1196
- availability: jt(l.AvailableQuantity > 0),
1197
- listPrice: l.ListPrice,
1198
- price: l.Price,
1199
- quantity: l.AvailableQuantity,
1195
+ offers: s == null ? void 0 : s.map(({ sellerId: i, commertialOffer: u }) => ({
1196
+ availability: Dt(u.AvailableQuantity > 0),
1197
+ listPrice: u.ListPrice,
1198
+ price: u.Price,
1199
+ quantity: u.AvailableQuantity,
1200
1200
  seller: {
1201
1201
  identifier: i
1202
1202
  }
1203
1203
  }))
1204
1204
  },
1205
- sku: n
1205
+ sku: a
1206
1206
  // slug: getSlug('', itemId), // getSlug('', itemId) que tipo de slug é esse?
1207
1207
  };
1208
- }, Ut = (t) => {
1208
+ }, Vt = (t) => {
1209
1209
  var v;
1210
1210
  const {
1211
1211
  attributes: e,
1212
- referenceId: n,
1212
+ referenceId: a,
1213
1213
  isVariantOf: r,
1214
1214
  images: s,
1215
1215
  itemId: o,
1216
1216
  name: i,
1217
- sellers: l,
1217
+ sellers: u,
1218
1218
  videos: c,
1219
1219
  variations: m
1220
1220
  } = t, {
1221
- brand: u,
1221
+ brand: l,
1222
1222
  categories: d,
1223
- categoriesIds: C,
1223
+ categoriesIds: R,
1224
1224
  description: f,
1225
1225
  linkText: p,
1226
1226
  productClusters: y,
1227
1227
  clusterHighlights: I,
1228
- productName: F,
1229
- properties: O,
1230
- productId: $,
1228
+ productName: T,
1229
+ properties: q,
1230
+ productId: O,
1231
1231
  productReference: g
1232
- } = r, E = d.slice().reverse(), R = ne(l, t.isVariantOf), T = re(R.offers[0].installments);
1232
+ } = r, E = d.slice().reverse(), C = te(u, t.isVariantOf), F = ee(C.offers[0].installments);
1233
1233
  return {
1234
1234
  sku: o,
1235
- gtin: ((v = n == null ? void 0 : n[0]) == null ? void 0 : v.Value) ?? g ?? "",
1236
- name: F ?? i,
1235
+ gtin: ((v = a == null ? void 0 : a[0]) == null ? void 0 : v.Value) ?? g ?? "",
1236
+ name: T ?? i,
1237
1237
  description: f,
1238
1238
  releaseDate: r.releaseDate ?? "",
1239
1239
  slug: p,
1240
1240
  video: c[0],
1241
1241
  categories: d,
1242
- categoriesIds: C,
1243
- id: $,
1244
- brand: { name: u, brandName: u },
1242
+ categoriesIds: R,
1243
+ id: O,
1244
+ brand: { name: l, brandName: l },
1245
1245
  seo: {
1246
1246
  description: f,
1247
- title: F,
1248
- canonical: te(p)
1247
+ title: T,
1248
+ canonical: Z(p)
1249
1249
  },
1250
1250
  cluster: {
1251
1251
  generals: y,
1252
1252
  highlights: I
1253
1253
  },
1254
- properties: O,
1255
- availability: { status: R.offers[0].availability },
1254
+ properties: q,
1255
+ availability: { status: C.offers[0].availability },
1256
1256
  breadcrumbList: {
1257
1257
  itemListElement: [
1258
- ...E.map((A, P) => {
1259
- const q = A.split("/"), G = q[q.length - 2], ie = q.map(ee).join("/");
1258
+ ...E.map((P, A) => {
1259
+ const $ = P.split("/"), L = $[$.length - 2], ne = $.map(Y).join("/");
1260
1260
  return {
1261
- name: G,
1262
- item: ie,
1263
- position: P + 1
1261
+ name: L,
1262
+ item: ne,
1263
+ position: A + 1
1264
1264
  };
1265
1265
  }),
1266
1266
  {
@@ -1271,57 +1271,57 @@ const wt = (t, e) => ye(t, e), Nt = (t) => ({
1271
1271
  ],
1272
1272
  numberOfItems: d.length
1273
1273
  },
1274
- image: Z(s),
1275
- offers: R,
1276
- additionalProperty: L(m, e, []),
1274
+ image: X(s),
1275
+ offers: C,
1276
+ additionalProperty: H(m, e, []),
1277
1277
  isVariantOf: {
1278
1278
  productGroupID: r.productId,
1279
- hasVariant: r.items.map((A) => ae(A))
1279
+ hasVariant: r.items.map((P) => re(P))
1280
1280
  },
1281
- installments: T
1281
+ installments: F
1282
1282
  };
1283
- }, Vt = (t) => {
1284
- var T;
1283
+ }, xt = (t) => {
1284
+ var F;
1285
1285
  const {
1286
1286
  attributes: e,
1287
- referenceId: n,
1287
+ referenceId: a,
1288
1288
  isVariantOf: r,
1289
1289
  images: s,
1290
1290
  itemId: o,
1291
1291
  name: i,
1292
- sellers: l,
1292
+ sellers: u,
1293
1293
  Videos: c,
1294
1294
  variations: m
1295
1295
  } = t, {
1296
- brand: u,
1296
+ brand: l,
1297
1297
  categories: d,
1298
- categoriesIds: C,
1298
+ categoriesIds: R,
1299
1299
  description: f,
1300
1300
  linkText: p,
1301
1301
  productClusters: y,
1302
1302
  productName: I,
1303
- Coleção: F,
1304
- "ID Coleção": O,
1305
- productId: $
1306
- } = r, g = d.slice().reverse(), E = ne(l, t.isVariantOf), R = re(E.offers[0].installments);
1303
+ Coleção: T,
1304
+ "ID Coleção": q,
1305
+ productId: O
1306
+ } = r, g = d.slice().reverse(), E = te(u, t.isVariantOf), C = ee(E.offers[0].installments);
1307
1307
  return {
1308
1308
  sku: o,
1309
- gtin: ((T = n[0]) == null ? void 0 : T.Value) ?? "",
1309
+ gtin: ((F = a[0]) == null ? void 0 : F.Value) ?? "",
1310
1310
  name: I ?? i,
1311
1311
  description: f,
1312
1312
  releaseDate: r.releaseDate ?? "",
1313
1313
  slug: p,
1314
1314
  video: c[0],
1315
1315
  categories: d,
1316
- categoriesIds: C,
1317
- collection: F,
1318
- collectionId: O,
1319
- id: $,
1320
- brand: { name: u, brandName: u },
1316
+ categoriesIds: R,
1317
+ collection: T,
1318
+ collectionId: q,
1319
+ id: O,
1320
+ brand: { name: l, brandName: l },
1321
1321
  seo: {
1322
1322
  description: f,
1323
1323
  title: I,
1324
- canonical: te(p)
1324
+ canonical: Z(p)
1325
1325
  },
1326
1326
  cluster: {
1327
1327
  generals: y,
@@ -1331,12 +1331,12 @@ const wt = (t, e) => ye(t, e), Nt = (t) => ({
1331
1331
  availability: { status: E.offers[0].availability },
1332
1332
  breadcrumbList: {
1333
1333
  itemListElement: [
1334
- ...g.map((v, A) => {
1335
- const P = v.split("/"), q = P[P.length - 2], G = P.map(ee).join("/");
1334
+ ...g.map((v, P) => {
1335
+ const A = v.split("/"), $ = A[A.length - 2], L = A.map(Y).join("/");
1336
1336
  return {
1337
- name: q,
1338
- item: G,
1339
- position: A + 1
1337
+ name: $,
1338
+ item: L,
1339
+ position: P + 1
1340
1340
  };
1341
1341
  }),
1342
1342
  {
@@ -1347,55 +1347,55 @@ const wt = (t, e) => ye(t, e), Nt = (t) => ({
1347
1347
  ],
1348
1348
  numberOfItems: d.length
1349
1349
  },
1350
- image: Z(s),
1350
+ image: X(s),
1351
1351
  offers: E,
1352
- additionalProperty: L(m, e, []),
1352
+ additionalProperty: H(m, e, []),
1353
1353
  isVariantOf: {
1354
1354
  productGroupID: r.productId,
1355
1355
  hasVariant: r.items.map((v) => {
1356
- const { variations: A } = v, P = A.map((q) => ({
1357
- name: q,
1358
- values: v[q]
1356
+ const { variations: P } = v, A = P.map(($) => ({
1357
+ name: $,
1358
+ values: v[$]
1359
1359
  }));
1360
1360
  return {
1361
- ...ae(v),
1362
- additionalProperty: L(
1363
- P,
1361
+ ...re(v),
1362
+ additionalProperty: H(
1363
+ A,
1364
1364
  e,
1365
1365
  []
1366
1366
  )
1367
1367
  };
1368
1368
  })
1369
1369
  },
1370
- installments: R
1370
+ installments: C
1371
1371
  };
1372
- }, zt = a.array().of(a.object({
1373
- key: a.string().required(),
1374
- value: a.string().required()
1372
+ }, zt = n.array().of(n.object({
1373
+ key: n.string().required(),
1374
+ value: n.string().required()
1375
1375
  })).required("Facets are required");
1376
- async function xt({ apiUrl: t, body: e, fetchOptions: n }) {
1376
+ async function Qt({ apiUrl: t, body: e, fetchOptions: a }) {
1377
1377
  if (!e) {
1378
1378
  console.error("[ERROR FETCHING] Body is required");
1379
1379
  return;
1380
1380
  }
1381
1381
  await zt.validate(e);
1382
- const r = new URLSearchParams({}), s = e.map(({ key: i, value: l }) => `${i}/${l}`).join("/");
1383
- le(e, r);
1382
+ const r = new URLSearchParams({}), s = e.map(({ key: i, value: u }) => `${i}/${u}`).join("/");
1383
+ oe(e, r);
1384
1384
  const o = `${t}/api/catalog_system/pub/products/crossselling/${s}`;
1385
1385
  return h(o, {
1386
1386
  cache: "no-store",
1387
- ...n
1387
+ ...a
1388
1388
  }).then((i) => i.map((c) => {
1389
- const m = X(c.items);
1390
- return m && Y(m, c);
1389
+ const m = W(c.items);
1390
+ return m && K(m, c);
1391
1391
  }).filter((c) => !!c).map((c) => ({
1392
- node: Vt(c)
1392
+ node: xt(c)
1393
1393
  })));
1394
1394
  }
1395
- const se = ({
1395
+ const ae = ({
1396
1396
  apiUrl: t,
1397
1397
  body: e,
1398
- fetchOptions: n,
1398
+ fetchOptions: a,
1399
1399
  extraData: r
1400
1400
  }) => {
1401
1401
  if (!e) {
@@ -1406,47 +1406,47 @@ const se = ({
1406
1406
  query: s = "",
1407
1407
  page: o = 1,
1408
1408
  count: i,
1409
- sort: l = "",
1409
+ sort: u = "",
1410
1410
  facets: c = [],
1411
1411
  type: m,
1412
- hideUnavailableItems: u = !0,
1412
+ hideUnavailableItems: l = !0,
1413
1413
  locale: d = ""
1414
- } = e, C = new URLSearchParams({
1414
+ } = e, R = new URLSearchParams({
1415
1415
  page: o.toString(),
1416
1416
  count: (i == null ? void 0 : i.toString()) ?? (r == null ? void 0 : r.ITEMS_PER_PAGE) ?? 24,
1417
1417
  query: s,
1418
- sort: l,
1418
+ sort: u,
1419
1419
  locale: d
1420
1420
  });
1421
- u !== void 0 && C.append("hideUnavailableItems", u.toString());
1421
+ l !== void 0 && R.append("hideUnavailableItems", l.toString());
1422
1422
  const f = c.map((p) => `${p.key}/${p.value}`).join("/") ?? "";
1423
- return De(
1424
- `${t}/api/io/_v/api/intelligent-search/${m}/${f}?${C.toString()}`,
1423
+ return _e(
1424
+ `${t}/api/io/_v/api/intelligent-search/${m}/${f}?${R.toString()}`,
1425
1425
  {
1426
1426
  headers: {
1427
1427
  Accept: "application/json",
1428
1428
  "content-type": "application/json"
1429
1429
  },
1430
- ...n
1430
+ ...a
1431
1431
  }
1432
1432
  );
1433
1433
  };
1434
- async function Qt({ body: t, extraData: e, ...n }) {
1434
+ async function Kt({ body: t, extraData: e, ...a }) {
1435
1435
  if (!t) {
1436
1436
  console.error("[ERROR FETCHING] Body is required");
1437
1437
  return;
1438
1438
  }
1439
- const r = await se({
1439
+ const r = await ae({
1440
1440
  body: {
1441
1441
  ...t,
1442
1442
  type: "product_search"
1443
1443
  },
1444
1444
  extraData: e,
1445
- ...n
1446
- }), s = (r == null ? void 0 : r.products.map((l) => {
1447
- const c = X(l.items);
1448
- return c && Y(c, l);
1449
- }).filter((l) => !!l)) ?? [], {
1445
+ ...a
1446
+ }), s = (r == null ? void 0 : r.products.map((u) => {
1447
+ const c = W(u.items);
1448
+ return c && K(c, u);
1449
+ }).filter((u) => !!u)) ?? [], {
1450
1450
  pagination: o,
1451
1451
  recordsFiltered: i
1452
1452
  } = r;
@@ -1460,115 +1460,115 @@ async function Qt({ body: t, extraData: e, ...n }) {
1460
1460
  count: i,
1461
1461
  total: o.count
1462
1462
  },
1463
- products: s.map((l, c) => ({
1464
- node: Ut(l),
1463
+ products: s.map((u, c) => ({
1464
+ node: Vt(u),
1465
1465
  cursor: c.toString()
1466
1466
  }))
1467
1467
  }
1468
1468
  };
1469
1469
  }
1470
- async function Kt({ body: t, extraData: e, ...n }) {
1470
+ async function Jt({ body: t, extraData: e, ...a }) {
1471
1471
  if (!t) {
1472
1472
  console.error("[ERROR FETCHING] Body is required");
1473
1473
  return;
1474
1474
  }
1475
- const r = await se({
1475
+ const r = await ae({
1476
1476
  body: {
1477
1477
  ...t,
1478
1478
  type: "facets"
1479
1479
  },
1480
1480
  extraData: e,
1481
- ...n
1481
+ ...a
1482
1482
  });
1483
1483
  return !r || !r.facets ? (console.error("[ERROR FETCHING] No facets found"), { data: { facets: [] } }) : {
1484
1484
  data: {
1485
1485
  ...r,
1486
- facets: ue(r, t == null ? void 0 : t.selectedFacets, (t == null ? void 0 : t.query) ?? "")
1486
+ facets: ie(r, t == null ? void 0 : t.selectedFacets, (t == null ? void 0 : t.query) ?? "")
1487
1487
  }
1488
1488
  };
1489
1489
  }
1490
- const Jt = a.object({
1491
- query: a.string().optional(),
1492
- locale: a.string().optional()
1490
+ const Wt = n.object({
1491
+ query: n.string().optional(),
1492
+ locale: n.string().optional()
1493
1493
  });
1494
- async function Yt({ apiUrl: t, body: e, fetchOptions: n }) {
1494
+ async function Xt({ apiUrl: t, body: e, fetchOptions: a }) {
1495
1495
  if (!e) {
1496
1496
  console.error("[ERROR FETCHING] Body is required");
1497
1497
  return;
1498
1498
  }
1499
- await Jt.validate(e);
1499
+ await Wt.validate(e);
1500
1500
  const { query: r = "", locale: s = "default_locale" } = e, o = new URLSearchParams({ query: r, locale: s });
1501
1501
  return h(
1502
1502
  `${t}/api/io/_v/api/intelligent-search/search_suggestions?${o.toString()}`,
1503
1503
  {
1504
- ...n
1504
+ ...a
1505
1505
  }
1506
1506
  );
1507
1507
  }
1508
- async function Wt({ apiUrl: t }) {
1508
+ async function Yt({ apiUrl: t }) {
1509
1509
  return h(`${t}/api/io/_v/api/intelligent-search/top_searches`);
1510
1510
  }
1511
- const Xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1511
+ const Zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1512
1512
  __proto__: null,
1513
- getSearchAutoCompleteSuggestions: Pt,
1514
- getSearchCrossellingProducts: xt,
1515
- getSearchFacets: Kt,
1516
- getSearchProducts: Qt,
1517
- getSearchSuggestedTerms: Yt,
1518
- getSearchTopSearchs: Wt
1519
- }, Symbol.toStringTag, { value: "Module" })), Zt = a.object({
1520
- masterDataEntity: a.string().nonNullable(),
1521
- payload: a.object().shape({}).nullable()
1513
+ getSearchAutoCompleteSuggestions: wt,
1514
+ getSearchCrossellingProducts: Qt,
1515
+ getSearchFacets: Jt,
1516
+ getSearchProducts: Kt,
1517
+ getSearchSuggestedTerms: Xt,
1518
+ getSearchTopSearchs: Yt
1519
+ }, Symbol.toStringTag, { value: "Module" })), er = n.object({
1520
+ masterDataEntity: n.string().nonNullable(),
1521
+ payload: n.object().shape({}).nullable()
1522
1522
  });
1523
- async function er({
1523
+ async function tr({
1524
1524
  apiUrl: t,
1525
1525
  body: e,
1526
- fetchOptions: n
1526
+ fetchOptions: a
1527
1527
  }) {
1528
1528
  if (!e) {
1529
1529
  console.error("[ERROR FETCHING] Body is required");
1530
1530
  return;
1531
1531
  }
1532
- await Zt.validate(e);
1532
+ await er.validate(e);
1533
1533
  const { masterDataEntity: r, payload: s } = e, o = `${t}/api/dataentities/${r}/documents`;
1534
1534
  return h(o, {
1535
1535
  method: "POST",
1536
1536
  body: {
1537
1537
  payload: s
1538
1538
  },
1539
- ...n
1539
+ ...a
1540
1540
  });
1541
1541
  }
1542
- const tr = a.object().shape({
1543
- _where: a.string().optional(),
1544
- _fields: a.string().optional(),
1545
- _sort: a.string().optional(),
1546
- _from: a.number().integer().min(0).optional(),
1547
- _to: a.number().integer().min(0).optional(),
1548
- _keyword: a.string().optional()
1549
- }), rr = a.object({
1550
- masterDataEntity: a.string().required(),
1551
- searchFields: tr,
1552
- headers: a.object().shape({
1553
- "REST-Range": a.string().notRequired()
1542
+ const rr = n.object().shape({
1543
+ _where: n.string().optional(),
1544
+ _fields: n.string().optional(),
1545
+ _sort: n.string().optional(),
1546
+ _from: n.number().integer().min(0).optional(),
1547
+ _to: n.number().integer().min(0).optional(),
1548
+ _keyword: n.string().optional()
1549
+ }), ar = n.object({
1550
+ masterDataEntity: n.string().required(),
1551
+ searchFields: rr,
1552
+ headers: n.object().shape({
1553
+ "REST-Range": n.string().notRequired()
1554
1554
  })
1555
1555
  });
1556
1556
  async function nr({
1557
1557
  apiUrl: t,
1558
1558
  body: e,
1559
- fetchOptions: n
1559
+ fetchOptions: a
1560
1560
  }) {
1561
1561
  if (!e) {
1562
1562
  console.error("[ERROR FETCHING] Body is required");
1563
1563
  return;
1564
1564
  }
1565
1565
  const r = new URLSearchParams();
1566
- await rr.validate(e);
1566
+ await ar.validate(e);
1567
1567
  const { masterDataEntity: s, searchFields: o, headers: i } = e;
1568
- o && Object.entries(o).forEach(([m, u]) => {
1569
- r.append(m, String(u));
1568
+ o && Object.entries(o).forEach(([m, l]) => {
1569
+ r.append(m, String(l));
1570
1570
  }), "_fields" in o || r == null || r.append("_fields", "_all");
1571
- let l = [], c = null;
1571
+ let u = [], c = null;
1572
1572
  do {
1573
1573
  c && r.set("_scroll", c);
1574
1574
  const m = await fetch(
@@ -1577,7 +1577,7 @@ async function nr({
1577
1577
  method: "GET",
1578
1578
  headers: {
1579
1579
  "REST-Range": (i == null ? void 0 : i["REST-Range"]) ?? "resources=0-100",
1580
- ...n == null ? void 0 : n.headers
1580
+ ...a == null ? void 0 : a.headers
1581
1581
  },
1582
1582
  cache: "no-store"
1583
1583
  }
@@ -1586,85 +1586,85 @@ async function nr({
1586
1586
  throw new Error(
1587
1587
  `[MasterData] ${m.status} - ${m.statusText}`
1588
1588
  );
1589
- const u = await m.json();
1590
- l.push(...u), c = m.headers.get("x-vtex-md-scroll");
1589
+ const l = await m.json();
1590
+ u.push(...l), c = m.headers.get("x-vtex-md-scroll");
1591
1591
  } while (c);
1592
- return l;
1592
+ return u;
1593
1593
  }
1594
- const ar = a.object({
1595
- dataEntityName: a.string().required(),
1596
- id: a.string().required(),
1597
- fieldsToBeUpdated: a.object().shape({})
1594
+ const sr = n.object({
1595
+ dataEntityName: n.string().required(),
1596
+ id: n.string().required(),
1597
+ fieldsToBeUpdated: n.object().shape({})
1598
1598
  });
1599
- async function sr({
1599
+ async function or({
1600
1600
  apiUrl: t,
1601
1601
  body: e,
1602
- fetchOptions: n
1602
+ fetchOptions: a
1603
1603
  }) {
1604
1604
  if (!e) {
1605
1605
  console.error("[ERROR FETCHING] Body is required");
1606
1606
  return;
1607
1607
  }
1608
- await ar.validate(e);
1608
+ await sr.validate(e);
1609
1609
  const { dataEntityName: r, id: s, fieldsToBeUpdated: o } = e, i = `${t}/api/dataentities/${r}/documents/${s}`;
1610
1610
  return h(i, {
1611
1611
  body: {
1612
1612
  fieldsToBeUpdated: o
1613
1613
  },
1614
1614
  method: "PATCH",
1615
- ...n
1615
+ ...a
1616
1616
  });
1617
1617
  }
1618
- const or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1618
+ const ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1619
1619
  __proto__: null,
1620
1620
  getSearchMasterdata: nr,
1621
- patchUpdateMasterdata: sr,
1622
- postMasterdata: er
1621
+ patchUpdateMasterdata: or,
1622
+ postMasterdata: tr
1623
1623
  }, Symbol.toStringTag, { value: "Module" }));
1624
- async function ir({ body: t, apiUrl: e, extraData: n, fetchOptions: r }) {
1624
+ async function cr({ body: t, apiUrl: e, extraData: a, fetchOptions: r }) {
1625
1625
  const { productIds: s } = t;
1626
1626
  if (!s)
1627
1627
  return console.error("[ERROR FETCHING] productIds is required"), [];
1628
- const { NAME_SPLIT_SYMBOL: o } = n;
1628
+ const { NAME_SPLIT_SYMBOL: o } = a;
1629
1629
  if (!o)
1630
1630
  return console.error("[ERROR FETCHING] NAME_SPLIT_SYMBOL is required"), [];
1631
- const i = s.map((u) => typeof u == "string" || typeof u == "number" ? `productId:${u}` : "").join("&fq="), l = await h(
1631
+ const i = s.map((l) => typeof l == "string" || typeof l == "number" ? `productId:${l}` : "").join("&fq="), u = await h(
1632
1632
  `${e}/api/catalog_system/pub/products/search?fq=${i}`,
1633
1633
  {
1634
1634
  ...r
1635
1635
  }
1636
- ), c = (u) => Object.keys(u).map((d) => ({ id: d, name: u[d] }));
1637
- return l.map((u, d) => {
1638
- var $;
1639
- const { installments: C, price: f, listPrice: p, sizes: y, allSizesAvailable: I } = de({ items: u.items, NAME_SPLIT_SYMBOL: o }), F = I ? !0 : y.some((g) => g.available), O = u.items[0].sellers[0].commertialOffer;
1636
+ ), c = (l) => Object.keys(l).map((d) => ({ id: d, name: l[d] }));
1637
+ return u.map((l, d) => {
1638
+ var O;
1639
+ const { installments: R, price: f, listPrice: p, sizes: y, allSizesAvailable: I } = ce({ items: l.items, NAME_SPLIT_SYMBOL: o }), T = I ? !0 : y.some((g) => g.available), q = l.items[0].sellers[0].commertialOffer;
1640
1640
  return {
1641
1641
  node: {
1642
- sku: u.items[0].itemId,
1643
- gtin: u.productReference,
1644
- name: u.productName,
1645
- description: u.description,
1646
- releaseDate: u.releaseDate,
1647
- slug: u.linkText,
1648
- categories: u.categories,
1649
- categoriesIds: u.categoriesIds,
1650
- id: u.items[0].itemId,
1642
+ sku: l.items[0].itemId,
1643
+ gtin: l.productReference,
1644
+ name: l.productName,
1645
+ description: l.description,
1646
+ releaseDate: l.releaseDate,
1647
+ slug: l.linkText,
1648
+ categories: l.categories,
1649
+ categoriesIds: l.categoriesIds,
1650
+ id: l.items[0].itemId,
1651
1651
  brand: {
1652
- name: u.brand,
1653
- brandName: u.brand
1652
+ name: l.brand,
1653
+ brandName: l.brand
1654
1654
  },
1655
1655
  seo: {
1656
- description: u.description,
1657
- title: u.productName,
1658
- canonical: `/${u.linkText}/p`
1656
+ description: l.description,
1657
+ title: l.productName,
1658
+ canonical: `/${l.linkText}/p`
1659
1659
  },
1660
1660
  cluster: {
1661
- generals: c(u.productClusters),
1662
- highlights: c(u.clusterHighlights)
1661
+ generals: c(l.productClusters),
1662
+ highlights: c(l.clusterHighlights)
1663
1663
  },
1664
1664
  availability: {
1665
- status: F
1665
+ status: T
1666
1666
  },
1667
- image: u.items[0].images.map(
1667
+ image: l.items[0].images.map(
1668
1668
  ({
1669
1669
  imageLabel: g,
1670
1670
  imageUrl: E
@@ -1679,48 +1679,48 @@ async function ir({ body: t, apiUrl: e, extraData: n, fetchOptions: r }) {
1679
1679
  highPrice: p,
1680
1680
  offers: [
1681
1681
  {
1682
- availability: F,
1682
+ availability: T,
1683
1683
  listPrice: p,
1684
1684
  price: f,
1685
- priceValidUntil: O.PriceValidUntil,
1685
+ priceValidUntil: q.PriceValidUntil,
1686
1686
  priceCurrency: "BRL",
1687
- installments: O.Installments,
1687
+ installments: q.Installments,
1688
1688
  lowPrice: f,
1689
- quantity: O.AvailableQuantity,
1689
+ quantity: q.AvailableQuantity,
1690
1690
  seller: {
1691
- identifier: u.items[0].sellers[0].sellerId
1691
+ identifier: l.items[0].sellers[0].sellerId
1692
1692
  }
1693
1693
  }
1694
1694
  ]
1695
1695
  },
1696
- additionalProperty: ($ = u == null ? void 0 : u.skuSpecifications) == null ? void 0 : $.map((g) => ({
1697
- name: u == null ? void 0 : u.skuSpecifications[0].field.name,
1696
+ additionalProperty: (O = l == null ? void 0 : l.skuSpecifications) == null ? void 0 : O.map((g) => ({
1697
+ name: l == null ? void 0 : l.skuSpecifications[0].field.name,
1698
1698
  value: g,
1699
1699
  valueReference: "SPECIFICATION"
1700
1700
  })),
1701
1701
  isVariantOf: {
1702
- productGroupID: u.productId,
1703
- hasVariant: u.items.map((g) => {
1702
+ productGroupID: l.productId,
1703
+ hasVariant: l.items.map((g) => {
1704
1704
  var E;
1705
1705
  return {
1706
1706
  additionalProperty: g == null ? void 0 : g.variations.map(() => {
1707
- var R, T, v;
1707
+ var C, F, v;
1708
1708
  return {
1709
- name: (R = g == null ? void 0 : g.variations) == null ? void 0 : R[0],
1710
- value: (v = g == null ? void 0 : g[(T = g == null ? void 0 : g.variations) == null ? void 0 : T[0]]) == null ? void 0 : v[0],
1709
+ name: (C = g == null ? void 0 : g.variations) == null ? void 0 : C[0],
1710
+ value: (v = g == null ? void 0 : g[(F = g == null ? void 0 : g.variations) == null ? void 0 : F[0]]) == null ? void 0 : v[0],
1711
1711
  valueReference: "SPECIFICATION"
1712
1712
  };
1713
1713
  }),
1714
1714
  name: g.name,
1715
1715
  offers: {
1716
1716
  offers: (E = g.sellers) == null ? void 0 : E.map(
1717
- ({ commertialOffer: R, sellerId: T }) => ({
1717
+ ({ commertialOffer: C, sellerId: F }) => ({
1718
1718
  availability: "https://schema.org/InStock",
1719
- listPrice: R.ListPrice,
1720
- price: R.Price,
1721
- quantity: R.AvailableQuantity,
1719
+ listPrice: C.ListPrice,
1720
+ price: C.Price,
1721
+ quantity: C.AvailableQuantity,
1722
1722
  seller: {
1723
- identifier: T
1723
+ identifier: F
1724
1724
  }
1725
1725
  })
1726
1726
  )
@@ -1730,117 +1730,45 @@ async function ir({ body: t, apiUrl: e, extraData: n, fetchOptions: r }) {
1730
1730
  };
1731
1731
  })
1732
1732
  },
1733
- installments: C
1733
+ installments: R
1734
1734
  },
1735
1735
  cursor: d.toString()
1736
1736
  };
1737
1737
  });
1738
1738
  }
1739
- const cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1739
+ const lr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1740
1740
  __proto__: null,
1741
- getWishlistProducts: ir
1742
- }, Symbol.toStringTag, { value: "Module" })), lr = (t = "") => t.charAt(0).toUpperCase() + t.slice(1), z = (t, e = " ") => !t || typeof t == "string" && t.length === 0 ? t : (Array.isArray(t) ? t : t.split("-")).map(lr).join(e), ur = ({ canonical: t, seo: e, slug: n }) => {
1743
- const r = Array.isArray(n) ? n.join(", ") : n;
1744
- return {
1745
- id: 0,
1746
- Title: `${Array.isArray(n) ? n.map((o) => z(o)).join(",") : z(n)} - ${e.title}`,
1747
- MetaTagDescription: e.description,
1748
- name: r,
1749
- hasChildren: !1,
1750
- url: t,
1751
- children: []
1752
- };
1753
- }, dr = ({ canonical: t, category: e, previousImages: n, seo: r }) => ({
1754
- category: String(e == null ? void 0 : e.id),
1755
- title: (e == null ? void 0 : e.Title) ?? r.title,
1756
- description: (e == null ? void 0 : e.MetaTagDescription) ?? r.description,
1757
- alternates: { canonical: t },
1758
- openGraph: {
1759
- type: "website",
1760
- title: (e == null ? void 0 : e.Title) ?? r.title,
1761
- description: (e == null ? void 0 : e.MetaTagDescription) ?? r.description,
1762
- images: Array.isArray(n) ? [...n] : []
1763
- }
1764
- }), mr = ({ items: t, parent: e, apiUrl: n, find: r }) => {
1765
- const s = t.find(
1766
- (i) => i.url.replace(n, "") === decodeURIComponent(e.toLowerCase())
1767
- );
1768
- return (s == null ? void 0 : s.children.find(
1769
- (i) => i.name.toLowerCase() === decodeURIComponent(String(r))
1770
- )) ?? s;
1771
- }, pr = (t) => {
1772
- t instanceof Error ? (console.error(`[ERROR CATEGORY INFO]: ${t.message}`), console.error(t.stack)) : console.error("[ERROR CATEGORY INFO]: Unknown error", t);
1773
- }, fr = /* @__PURE__ */ new Set([
1774
- "brand",
1775
- "category",
1776
- "department",
1777
- "subcategory",
1778
- "collection",
1779
- "cluster"
1780
- ]), gr = (t) => typeof (t == null ? void 0 : t.pageType) == "string" && fr.has(t == null ? void 0 : t.pageType.toLowerCase()), hr = (t) => ({
1781
- collection: t.Coleção,
1782
- categoryId: t.categoryId,
1783
- current_collection: t["Coleção Atual"],
1784
- items: t.items
1785
- }), oe = (t, e) => t.reduce((n, r) => {
1786
- if (r.items.filter(
1787
- (i) => i.sellers.find((l) => l.commertialOffer.IsAvailable)
1788
- ).length === 0 || (n == null ? void 0 : n.find((i) => (i == null ? void 0 : i.productId) === (r == null ? void 0 : r.productId))) !== void 0)
1789
- return n;
1790
- const o = r.items[0].images.find(
1791
- (i) => e.includes(i.imageLabel)
1792
- );
1793
- return n.push({
1794
- slug: `/${r.linkText}/p`,
1795
- productId: r == null ? void 0 : r.productId,
1796
- textureImage: (o == null ? void 0 : o.imageUrl) ?? "",
1797
- textureAlt: (o == null ? void 0 : o.imageText) ?? ""
1798
- }), n;
1799
- }, []), yr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1800
- __proto__: null,
1801
- createEmptySeoCategory: ur,
1802
- createSeoCategory: dr,
1803
- findCategory: mr,
1804
- formattedSimilars: oe,
1805
- isCollectionPageType: gr,
1806
- notFindCategoryError: pr,
1807
- responseAdapter: hr
1808
- }, Symbol.toStringTag, { value: "Module" })), br = async ({ children: t, apiUrl: e, productId: n, ClientItems: r, PDP_INFO: s, TEXTURE_IMAGE: o, TOGGLE_STYLE_MODIFIER: i }) => {
1809
- const l = await fetch(
1810
- `${e}/api/catalog_system/pub/products/crossselling/similars/${n.toString()}`
1811
- ).then((m) => m.json()), c = oe(l, o);
1812
- return /* @__PURE__ */ N("div", { className: M.similars, children: [
1813
- /* @__PURE__ */ N("div", { className: M["similars-info"], children: [
1814
- /* @__PURE__ */ b("span", { className: M["sections-title"], children: s.product.color_title }),
1815
- t
1816
- ] }),
1817
- /* @__PURE__ */ b(r, { productId: n, similars: c, TOGGLE_STYLE_MODIFIER: i })
1818
- ] });
1819
- }, Er = {
1820
- checkout: vt,
1821
- catalog: qt,
1822
- cms: me,
1823
- search: Xt,
1824
- masterdata: or,
1741
+ getWishlistProducts: cr
1742
+ }, Symbol.toStringTag, { value: "Module" })), ur = {
1743
+ parseSearchState: me,
1744
+ convertSearchParams: de,
1745
+ filterNonRootFacets: ue,
1746
+ filterNonCategorySelected: le
1747
+ }, hr = {
1748
+ checkout: St,
1749
+ catalog: Pt,
1750
+ cms: pe,
1751
+ search: Zt,
1752
+ masterdata: ir,
1825
1753
  wishlist: {
1826
- ...cr
1754
+ ...lr
1827
1755
  }
1828
- }, Tr = {
1829
- catalog: yr,
1830
- search: he,
1831
- product: ge,
1756
+ }, yr = {
1757
+ catalog: ye,
1758
+ search: ur,
1759
+ product: he,
1832
1760
  cms: {
1833
- ...fe,
1834
- ...pe
1761
+ ...ge,
1762
+ ...fe
1835
1763
  }
1836
- }, Fr = {
1764
+ }, br = {
1837
1765
  template: {
1838
- pdp: { PDPSimilars: br }
1766
+ pdp: {}
1839
1767
  }
1840
1768
  };
1841
1769
  export {
1842
- Er as serverAPIs,
1843
- Sr as serverCMS,
1844
- Fr as serverComponents,
1845
- Tr as serverHelpers
1770
+ hr as serverAPIs,
1771
+ gr as serverCMS,
1772
+ br as serverComponents,
1773
+ yr as serverHelpers
1846
1774
  };