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