@soma-vertical-web/multi-lib 1.0.32 → 1.0.33

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 (64) hide show
  1. package/cms/ContentTypes/Search/SearchContent.d.ts +1 -1
  2. package/cms/Sections/ProductCarousel/request.d.ts +0 -4
  3. package/cms/index.d.ts +1 -1
  4. package/contexts/contexts/GlobalContext.d.ts +1 -1
  5. package/contexts/contexts/plp/PLPInfiniteContext.tsx.d.ts +1 -1
  6. package/contexts/contexts/search/Facets.d.ts +1 -1
  7. package/contexts/contexts/search/Products.d.ts +1 -1
  8. package/contexts/contexts/search/QueryFacets.d.ts +5 -0
  9. package/contexts/contexts/search/QueryProducts.d.ts +5 -0
  10. package/contexts/contexts/search/RootTank.d.ts +9 -0
  11. package/contexts/contexts/search/TopSearches.d.ts +1 -1
  12. package/contexts/hooks/useOperations.d.ts +1 -1
  13. package/contexts/index.d.ts +4 -4
  14. package/contexts/store/plp-scroll.d.ts +3 -0
  15. package/data/api/cms/content-type/index.d.ts +1 -1
  16. package/data/api/fetchProxy.d.ts +9 -0
  17. package/data/api/user/index.d.ts +2 -2
  18. package/data/helpers/plp/index.d.ts +1 -2
  19. package/data/index.d.ts +6 -5
  20. package/index-BFjIPkXv.js +4 -0
  21. package/{index-BM8vTUKg.mjs → index-CIVkR1d_.mjs} +776 -712
  22. package/index-CXSKhXO3.js +4 -0
  23. package/index-ekZLWJ5-.mjs +2686 -0
  24. package/index.js +16 -16
  25. package/index.mjs +6518 -6803
  26. package/index2.js +2 -2
  27. package/index2.mjs +101 -97
  28. package/layout/index.d.ts +4 -4
  29. package/layout/team-component/AddToCart/AddToCart.d.ts +1 -1
  30. package/layout/team-component/AddToCart/Composite/Card/Card.d.ts +1 -1
  31. package/layout/team-component/AddToCart/Composite/Card/Content.d.ts +1 -1
  32. package/layout/team-component/AddToCart/Composite/Card/StyleSize.d.ts +1 -1
  33. package/layout/template/MiniCart/Composite/Card/Card.d.ts +1 -1
  34. package/layout/template/MiniCart/Composite/Card/Composite/Sku.d.ts +1 -1
  35. package/layout/template/MiniCart/Composite/Card/Composite/Style.d.ts +1 -1
  36. package/layout/template/MiniCart/Composite/Card/index.d.ts +2 -2
  37. package/layout/template/MiniCart/Composite/Modal/Body/Body.d.ts +1 -1
  38. package/layout/template/MiniCart/MiniCart.d.ts +1 -1
  39. package/layout/template/MiniCart/index.d.ts +2 -2
  40. package/layout/template/PDC/Composite/InfiniteScroller/Filters/Filters.d.ts +11 -0
  41. package/layout/template/PDC/Composite/InfiniteScroller/Filters/index.d.ts +1 -0
  42. package/layout/template/PDC/Composite/InfiniteScroller/Page/Composite/AnchorPDP.d.ts +7 -0
  43. package/layout/template/PDC/Composite/Products/Products.d.ts +1 -1
  44. package/layout/template/PDC/index.d.ts +1 -1
  45. package/layout/template/QuickShop/Composite/Body.d.ts +1 -1
  46. package/layout/template/QuickShop/Composite/Similars.d.ts +1 -1
  47. package/layout/template/SearchModal/SearchModal.d.ts +1 -1
  48. package/layout/template/SearchResult/Composite/Products.d.ts +7 -0
  49. package/package.json +1 -1
  50. package/style.css +1 -1
  51. package/types/cms/Sections/SectionZone/index.d.ts +0 -1
  52. package/types/contexts/contexts/global.d.ts +1 -0
  53. package/types/contexts/contexts/plp.d.ts +3 -4
  54. package/types/contexts/contexts/search.d.ts +2 -7
  55. package/types/contexts/hooks/index.d.ts +1 -3
  56. package/types/layout/team-components/AddToCart/index.d.ts +1 -5
  57. package/types/layout/team-components/HelpButton/index.d.ts +2 -4
  58. package/types/layout/team-components/ProductCard/index.d.ts +0 -1
  59. package/types/layout/team-components/ProductList/index.d.ts +1 -2
  60. package/types/layout/templates/MiniCart/index.d.ts +0 -2
  61. package/types/layout/templates/PLP/index.d.ts +0 -1
  62. package/types/layout/templates/QuickShop/index.d.ts +1 -2
  63. package/types/layout/templates/SearchModal/index.d.ts +1 -2
  64. package/index-CZjoMPpQ.js +0 -4
@@ -0,0 +1,2686 @@
1
+ import * as U from "yup";
2
+ import { jsxs as Pt, Fragment as rn, jsx as B } from "react/jsx-runtime";
3
+ import { Utils as nn } from "@soma-vertical-web/core-components";
4
+ const ot = (t, e = !0) => Intl.NumberFormat("pt-BR", {
5
+ style: "currency",
6
+ currency: "BRL",
7
+ minimumFractionDigits: e ? 2 : 0
8
+ }).format(t), on = ({ valueInCents: t, hasFree: e, freeTaxMessage: r }) => t === 0 ? e ? r : ot(0) : ot(t / 100), an = (t, e) => {
9
+ const n = (t - e) * 100 / t;
10
+ return Math.floor(n);
11
+ }, or = (t, e) => {
12
+ const [r, n] = t.split(e);
13
+ return { name: r.trim(), size: n ? n.trim() : "" };
14
+ }, ln = (t, e) => {
15
+ if (!t)
16
+ return {};
17
+ const [r, n] = t.split(e);
18
+ return { color: r == null ? void 0 : r.trim(), size: n == null ? void 0 : n.trim() };
19
+ }, cn = (t, e = "tamanho") => {
20
+ if (t.additionalProperty) {
21
+ const [r] = t.additionalProperty;
22
+ return r != null && r.name ? r.name.toLocaleLowerCase() === e ? r.value : t.name : "";
23
+ }
24
+ return t.name;
25
+ }, sn = (t, e) => t.replace(e, "").trim(), un = (t) => t.replace(/\//g, ""), fn = ({ items: t, NAME_SPLIT_SYMBOL: e }) => {
26
+ const r = {
27
+ price: 0,
28
+ listPrice: 0,
29
+ installments: {
30
+ count: 0,
31
+ value: 0
32
+ }
33
+ }, n = (i, l) => {
34
+ var u;
35
+ l && (l.sellerId = i.sellerId, l.sellerName = i.sellerName, l.available = !0, l.isSellerDefault = i.sellerDefault);
36
+ const {
37
+ Price: s,
38
+ ListPrice: f,
39
+ PaymentOptions: { installmentOptions: c }
40
+ } = i.commertialOffer;
41
+ r.price = s, r.listPrice = f;
42
+ const p = (u = c == null ? void 0 : c[0]) == null ? void 0 : u.installments;
43
+ if (p) {
44
+ const { count: y, value: d } = p[p.length - 1];
45
+ r.installments = {
46
+ count: y,
47
+ value: d / 100
48
+ };
49
+ }
50
+ };
51
+ let o = !0;
52
+ const a = t.reduce((i, l) => {
53
+ var c;
54
+ const s = {
55
+ name: l.name,
56
+ sku: l.itemId,
57
+ value: ((c = l.Tamanho) == null ? void 0 : c[0]) ?? or(l.nameComplete ?? l.name, e).size,
58
+ available: !1,
59
+ sellerId: "",
60
+ sellerName: "",
61
+ isSellerDefault: !1
62
+ }, f = l.sellers.filter((p) => (p.sellerDefault && p.commertialOffer.IsAvailable && (s.available = !0, n(p, s)), p.commertialOffer.IsAvailable));
63
+ return !s.isSellerDefault && f.length > 0 && (s.available = !0, n(f[0], {
64
+ ...s,
65
+ sellerId: f[0].sellerId,
66
+ sellerName: f[0].sellerName
67
+ })), s.available === !1 && (o = !1), i.push(s), i;
68
+ }, []);
69
+ return {
70
+ ...r,
71
+ sizes: a,
72
+ allSizesAvailable: o
73
+ };
74
+ }, pn = (t) => t ? !t.offers.offers.find(({ quantity: e = 0 }) => e > 0) : !1, dn = (t, e) => {
75
+ const r = t.find(
76
+ (n) => n.availability.includes("InStock") && n.quantity && n.listPrice > 0 && n.seller.identifier === e
77
+ );
78
+ return r || t.find(
79
+ (n) => n.availability.includes("InStock") && n.quantity && n.listPrice > 0
80
+ );
81
+ }, yn = ({ images: t, TEXTURE_IMAGE: e }) => t.find((r) => e.includes(r.imageLabel)) ?? t[0], vn = (t, e) => {
82
+ const r = /\/ids\/(\d+)\//, n = t.match(r);
83
+ return n ? t.replace(
84
+ `/${n[1]}/`,
85
+ `/${n[1]}-${e.width}-${e.height}/`
86
+ ) : t;
87
+ }, mn = (t, e) => {
88
+ const r = /\/ids\/(\d+)-(\d+)-(\d+)\//, n = t.match(r);
89
+ return n ? t.replace(
90
+ `/${n[1]}-${n[2]}-${n[3]}/`,
91
+ `/${n[1]}-${e.width}-${e.height}/`
92
+ ) : t;
93
+ }, gn = ({
94
+ images: t,
95
+ label: e
96
+ }) => {
97
+ const r = t.filter(
98
+ (n) => n.keywords === e.first || n.keywords === e.second || n.alternateName === e.first || n.alternateName === e.second
99
+ );
100
+ return r.length === 0 ? t.slice(0, 2) : r;
101
+ }, hn = (t) => {
102
+ const [e, r] = t.split("/").map(Number);
103
+ if (Number.isNaN(e) || Number.isNaN(r))
104
+ throw new Error("[ERROR ASPECT RATIO IMAGE]: Invalid aspect ratio format");
105
+ return r / e;
106
+ }, _n = (t, e, r) => {
107
+ e && (t ? (e.getAttribute("src") || (e.src = r ?? ""), e.play()) : e.pause());
108
+ }, yl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
109
+ __proto__: null,
110
+ disableSKU: pn,
111
+ formatPriceToCurrency: ot,
112
+ freightParsePrice: on,
113
+ getAspectRatio: hn,
114
+ getColorAndSizeFromSkuName: ln,
115
+ getDiscountPercent: an,
116
+ getFirstImages: gn,
117
+ getProductNameWithoutSku: sn,
118
+ getSKUName: cn,
119
+ getSkuInfos: fn,
120
+ getThumbImage: yn,
121
+ getValidOffer: dn,
122
+ removeSlashes: un,
123
+ resizingImg: vn,
124
+ setVideoPlay: _n,
125
+ splitNameAndSizeFromFullName: or,
126
+ updatedResizedImg: mn
127
+ }, Symbol.toStringTag, { value: "Module" })), En = {
128
+ attachment: "ATTACHMENT",
129
+ specification: "SPECIFICATION",
130
+ attribute: "ATTRIBUTE"
131
+ }, T = Promise.resolve(!1), Sn = {
132
+ id: "",
133
+ isOpen: !1,
134
+ items: [],
135
+ loading: !1,
136
+ marketingData: null,
137
+ messages: [],
138
+ openTextField: {},
139
+ paymentData: null,
140
+ shippingData: null,
141
+ totalizers: [],
142
+ itemMetadata: [],
143
+ recentlyAddedProducts: [],
144
+ addCoupon: () => T,
145
+ addItem: () => T,
146
+ addSellerCode: () => T,
147
+ addMarketingData: () => T,
148
+ emptyCart: () => ({}),
149
+ removeItem: () => T,
150
+ setIsOpen: () => ({}),
151
+ shipping: () => T,
152
+ shippingUpdate: () => T,
153
+ toggleServiceToProduct: () => T,
154
+ updateItemQuantity: () => T,
155
+ insertProfileEmail: () => T,
156
+ setRecentlyAddedProducts: () => ({})
157
+ }, pt = (t) => t === 0, ar = (t, e) => {
158
+ if (!t || t.length === 0)
159
+ return [];
160
+ let r = "";
161
+ const n = [], o = t.match(/\d+/g) ?? [];
162
+ for (const a of o) {
163
+ const i = e[Number(a)];
164
+ i && (r += (r ? "/" : "") + i, n.push(r));
165
+ }
166
+ return n;
167
+ }, ir = (t, e) => {
168
+ const {
169
+ availability: r,
170
+ additionalInfo: { brandName: n },
171
+ bundleItems: o,
172
+ id: a,
173
+ uniqueId: i,
174
+ detailUrl: l,
175
+ ean: s,
176
+ imageUrl: f,
177
+ name: c,
178
+ listPrice: p,
179
+ quantity: u,
180
+ price: y,
181
+ priceDefinition: d,
182
+ productCategories: g,
183
+ productCategoryIds: h,
184
+ productId: b,
185
+ refId: P,
186
+ seller: m,
187
+ referenceId: R,
188
+ offerings: I,
189
+ productRefId: $,
190
+ skuName: C,
191
+ sellingPrice: k
192
+ } = t;
193
+ return {
194
+ availability: r,
195
+ bundleItems: o,
196
+ referenceId: R,
197
+ productRefId: $,
198
+ id: a,
199
+ ean: s,
200
+ uniqueId: i,
201
+ itemOffered: {
202
+ additionalProperty: [],
203
+ brand: {
204
+ name: n
205
+ },
206
+ categories: ar(h, g),
207
+ categoriesIds: h,
208
+ gtin: P,
209
+ image: [
210
+ {
211
+ alternateName: (e == null ? void 0 : e.MAIN_IMAGE) ?? "1",
212
+ url: f
213
+ }
214
+ ],
215
+ name: c,
216
+ isVariationOf: {
217
+ name: c,
218
+ productGroupID: b
219
+ },
220
+ sku: a,
221
+ slug: l,
222
+ skuName: C
223
+ },
224
+ listPrice: p,
225
+ quantity: u,
226
+ offerings: I,
227
+ price: y,
228
+ priceDefinition: d,
229
+ sellingPrice: k,
230
+ seller: m
231
+ };
232
+ }, An = (t, e) => {
233
+ const r = t.map((n) => ({
234
+ id: n.uniqueId,
235
+ quantity: n.quantity,
236
+ seller: n.seller
237
+ }));
238
+ return Array.isArray(e) ? [...r, ...e] : [...r, e];
239
+ }, bn = (t, e) => {
240
+ const r = t.find((n) => n.id === e);
241
+ if (r) {
242
+ const n = t.map((o, a) => {
243
+ var i, l;
244
+ return {
245
+ id: ((i = o.itemOffered) == null ? void 0 : i.sku) ?? "",
246
+ index: a,
247
+ quantity: (r == null ? void 0 : r.id) === ((l = o.itemOffered) == null ? void 0 : l.sku) ? 0 : o.quantity,
248
+ seller: o.seller ?? ""
249
+ };
250
+ });
251
+ return {
252
+ updateItems: n,
253
+ filterItems: n.filter((o) => o.id !== e)
254
+ };
255
+ }
256
+ return { updateItems: [], filterItems: [] };
257
+ }, On = (t, e, r) => t.filter(
258
+ (n) => n.availability !== "withoutStock" && n.availability !== "https://schema.org/OutOfStock"
259
+ ).map(
260
+ (n, o) => {
261
+ var a, i;
262
+ return n.id === e ? {
263
+ id: n.id,
264
+ index: o,
265
+ quantity: r,
266
+ seller: n.seller,
267
+ sku: ((a = n.itemOffered) == null ? void 0 : a.sku) ?? ""
268
+ } : {
269
+ id: n.id,
270
+ index: o,
271
+ quantity: n.quantity,
272
+ seller: n.seller,
273
+ sku: ((i = n.itemOffered) == null ? void 0 : i.sku) ?? ""
274
+ };
275
+ }
276
+ ), Pn = (t, e) => t.filter((r) => r.availability !== "withoutStock").findIndex(({ id: r }) => r === e), Rn = (t, e) => {
277
+ var r;
278
+ return Array.isArray(t) ? (((r = t == null ? void 0 : t.find((n) => {
279
+ var o;
280
+ return ((o = n == null ? void 0 : n.id) == null ? void 0 : o.toLowerCase()) === e;
281
+ })) == null ? void 0 : r.value) ?? 0) / 100 : 0;
282
+ }, In = (t) => {
283
+ const e = t.reduce((o, a) => {
284
+ const i = pt(a.price) ? 0 : a.quantity;
285
+ return o + i;
286
+ }, 0), r = t.reduce(
287
+ (o, a) => o + a.price * a.quantity,
288
+ 0
289
+ ), n = t.reduce(
290
+ (o, a) => o + a.listPrice * a.quantity,
291
+ 0
292
+ );
293
+ return {
294
+ totalItems: e,
295
+ total: r,
296
+ subTotal: n
297
+ };
298
+ }, wn = (t) => Array.isArray(t) ? t.filter((e) => e.availability !== "withoutStock").reduce((e, r) => e + (pt(r == null ? void 0 : r.price) ? 0 : r.quantity), 0) : 0, dt = (t, e) => {
299
+ const { items: r, orderFormId: n, ...o } = t;
300
+ return {
301
+ ...o,
302
+ id: n,
303
+ items: Array.isArray(r) ? r.map((a) => ir(a, e)) : []
304
+ };
305
+ }, Tn = (t, e) => {
306
+ const r = t.find((n) => n.id === e);
307
+ return r ? r.availability === "unavailableItemFulfillment" : !1;
308
+ }, Cn = (t, e) => {
309
+ const r = t.sku, n = t.isVariantOf.hasVariant.find((o) => o.sku === r);
310
+ return n ? n.name.split(e)[1] : "--";
311
+ }, Nn = (t, e, r = !1) => !t && e !== "" ? { code: 300, value: e, statusOk: r } : t === e ? { code: 200, value: e, statusOk: r } : { code: 400, value: e, statusOk: r }, Dn = (t, e) => {
312
+ const r = /* @__PURE__ */ new Set();
313
+ return [t, ...e].filter(
314
+ (n) => !r.has(n) && r.add(n),
315
+ r
316
+ );
317
+ }, xn = (t, e) => e && Array.isArray(e) && e.find((n) => n.id === t) ? Promise.resolve(t) : Promise.resolve(!1), Fn = (t, e) => e ? Promise.resolve(t[e]) : Promise.resolve(!1), Mn = async (t) => {
318
+ try {
319
+ const e = await t();
320
+ if (typeof e != "boolean")
321
+ return e;
322
+ } catch (e) {
323
+ console.error(`[Error orderForm]: ${e}`);
324
+ }
325
+ return !1;
326
+ }, $n = (t, e) => {
327
+ if (e !== -1) {
328
+ const r = Number(t);
329
+ return r ? r + 1 : 1;
330
+ }
331
+ return t ?? 1;
332
+ }, Ln = (t, e) => Array.isArray(t) ? t.filter(
333
+ (r) => e == null ? void 0 : e.some((n) => n.id === r.id)
334
+ ) : [], Un = async (t, e) => t.then((r) => [...r ?? [], ...e ?? []]), Bn = async (t, e, r, n) => {
335
+ const { priority: o = "auto", body: a } = e;
336
+ return fetch(t, {
337
+ // priority,
338
+ headers: {
339
+ "Content-Type": "application/json"
340
+ },
341
+ priority: o,
342
+ method: "POST",
343
+ body: JSON.stringify(a)
344
+ }).then(async (i) => {
345
+ const l = await i.json();
346
+ return r ? l : dt(l, n);
347
+ });
348
+ }, Gn = (t, e, r) => ({
349
+ notifications: [
350
+ ...t.notifications,
351
+ { id: Date.now(), message: e, callback: r }
352
+ ]
353
+ }), kn = (t) => [...Array.isArray(t) ? t : [t], "faststore"], jn = (t) => {
354
+ const e = t.get("utm_source") || V("utm_source"), r = t.get("utm_campaign") || V("utm_campaign"), n = t.get("utm_medium") || V("utm_medium"), o = t.get("utmi_cp") || V("utmi_cp"), a = t.get("utmi_pc") || V("utmi_pc"), i = t.get("utmi_p") || V("utmi_p");
355
+ return {
356
+ ...e && { utmSource: e },
357
+ ...n && { utmMedium: n },
358
+ ...r && { utmCampaign: r },
359
+ ...o && { utmiCampaign: o },
360
+ ...a && { utmiPart: a },
361
+ ...i && { utmipage: i }
362
+ };
363
+ }, V = (t) => {
364
+ if (!t || typeof window > "u")
365
+ return;
366
+ const e = window.location.href;
367
+ t = t.replace(/[[\]]/g, "\\$&");
368
+ const r = new RegExp("[?&]" + t + "(=([^&#]*)|&|#|$)"), n = r.exec(e);
369
+ return n ? n[2] ? decodeURIComponent(n[2].replace(/\+/g, " ")) : "" : null;
370
+ }, Hn = (t, e, r = "BR") => {
371
+ const n = e, o = {
372
+ country: r,
373
+ addressType: "",
374
+ postalCode: t || null,
375
+ city: "",
376
+ state: "",
377
+ street: "",
378
+ number: "",
379
+ neighborhood: "",
380
+ complement: "",
381
+ reference: "",
382
+ geoCoordinates: []
383
+ };
384
+ if (n) {
385
+ const a = typeof n == "object" && "latitude" in n ? n.latitude : null, i = typeof n == "object" && "longitude" in n ? n.longitude : null;
386
+ o.geoCoordinates = typeof a == "number" && typeof i == "number" ? { latitude: a, longitude: i } : null;
387
+ }
388
+ return [o];
389
+ }, vl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
390
+ __proto__: null,
391
+ VALUE_REFERENCES: En,
392
+ addItemOrder: An,
393
+ addNotification: Gn,
394
+ createItemOrder: ir,
395
+ createNewAddress: Hn,
396
+ fetchCartAPI: Bn,
397
+ findItemIndex: Pn,
398
+ findOptions: Ln,
399
+ findTotalizerValue: Rn,
400
+ getCategories: ar,
401
+ getCode: Nn,
402
+ getQuantity: $n,
403
+ getRemoveId: xn,
404
+ getSize: Cn,
405
+ getTotalItems: wn,
406
+ getTotalizer: In,
407
+ getUrlParameter: V,
408
+ getValue: Fn,
409
+ initialState: Sn,
410
+ isGift: pt,
411
+ marketingTagsBuilder: kn,
412
+ mergeOptionsPromise: Un,
413
+ mountMarketingData: jn,
414
+ orderFormValues: dt,
415
+ promiseDefault: T,
416
+ removeQuantity: bn,
417
+ updateItemSellerExternal: Tn,
418
+ updateOrderFormPromise: Mn,
419
+ updateQuantity: On,
420
+ wishlistArray: Dn
421
+ }, Symbol.toStringTag, { value: "Module" })), at = { baseUrl: "" }, ml = (t) => {
422
+ at.baseUrl || Object.defineProperty(at, "baseUrl", {
423
+ value: `https://${t}.myvtex.com`,
424
+ writable: !1,
425
+ configurable: !1
426
+ });
427
+ }, lr = (t, e) => fetch(`${at.baseUrl}${t}`, e), gl = async (t, e, r = !1, n) => {
428
+ const { priority: o = "auto", body: a } = e, i = await lr(t, {
429
+ headers: { "Content-Type": "application/json" },
430
+ method: "POST",
431
+ body: JSON.stringify(a),
432
+ priority: o
433
+ });
434
+ if (!i.ok) {
435
+ const s = await i.json().catch(() => ({ message: "Unknown error" }));
436
+ throw new Error(s.message || `HTTP ${i.status}`);
437
+ }
438
+ const l = await i.json();
439
+ return r ? l : dt(l, n);
440
+ }, Rt = "fuzzy", It = "operator", qn = (t) => ({
441
+ isDepartment: t != null && t.length ? t[0].key === "category-1" : !1
442
+ }), hl = (t, e) => {
443
+ const r = decodeURIComponent(e ?? "").slice(1).split("/");
444
+ return t.map((n) => {
445
+ if (n.key === "category-2" && n.__typename === "FacetBoolean") {
446
+ const o = n.values;
447
+ return {
448
+ ...n,
449
+ values: o.filter(
450
+ (a) => !r.find(
451
+ (i) => i.toLowerCase() === a.value || i.toLowerCase() === a.name.toLowerCase()
452
+ )
453
+ )
454
+ };
455
+ }
456
+ return n;
457
+ });
458
+ }, cr = (t, e) => e ? t === "category-1" : !1, Xn = (t) => t.key === "operator" && (t.value === "and" || t.value === "or"), Wn = (t) => t.type === "TEXT", Vn = (t) => t.key === "fuzzy" && (t.value === "0" || t.value === "1" || t.value === "auto"), zn = (t) => {
459
+ const { key: e, name: r, values: n } = t;
460
+ return {
461
+ __typename: "FacetBoolean",
462
+ key: e,
463
+ label: r,
464
+ values: n.slice().sort((o, a) => o.name.localeCompare(a.name))
465
+ };
466
+ }, Kn = ({ key: t, values: e }) => ({
467
+ __typename: "FacetRange",
468
+ key: t,
469
+ values: e
470
+ }), _l = (t, e, r) => {
471
+ if (!(t instanceof Object) || !("facets" in t))
472
+ return [];
473
+ const { facets: n = [] } = t, o = e != null && e.length ? e[0].key === "category-1" : !1;
474
+ return n.filter(
475
+ (i) => !r || !cr(i.key, o)
476
+ ).map(
477
+ (i) => Wn(i) ? zn(i) : Kn(i)
478
+ );
479
+ }, El = (t, e) => {
480
+ const r = t.find(({ key: o }) => o === Rt) ?? null, n = t.find(({ key: o }) => o === It) ?? null;
481
+ r && Vn(r) && e.append(Rt, r.value), n && Xn(n) && e.append(It, n.value);
482
+ }, Yn = (t) => t.map((e) => {
483
+ const [r, n] = e.split("/");
484
+ return { key: r, value: n };
485
+ }), Sl = (t, e) => {
486
+ const r = decodeURIComponent(e ?? "").slice(1).split("/"), n = t.filter(({ value: a }) => !r.includes(decodeURIComponent(a))).map((a) => ({
487
+ ...a,
488
+ value: decodeURIComponent(a.value)
489
+ })), { isDepartment: o } = qn(n);
490
+ return n == null ? void 0 : n.filter((a) => !cr(a.key, o));
491
+ }, Al = ({ pathname: t, searchParams: e }, r) => {
492
+ const n = e.get("sort") ?? "", o = e.get("query") ?? null, a = parseInt(e.get("page") ?? "1", 10);
493
+ return {
494
+ sort: n,
495
+ facets: Yn(r),
496
+ term: o,
497
+ base: o ? "" : t,
498
+ page: a
499
+ };
500
+ }, bl = (t) => {
501
+ const e = new URLSearchParams();
502
+ return Object.entries(t).forEach(([r, n]) => {
503
+ Array.isArray(n) ? n.forEach((o) => e.append(r, o)) : n !== void 0 && e.append(r, n);
504
+ }), e;
505
+ }, Ol = (t, e, r = 24, n = 1, o) => {
506
+ const a = `/search?query=${e ?? ""}&count=${r}&page=${n}${o ? `&sort=${o.replace("_", ":")}` : ""}`;
507
+ t.push(a);
508
+ };
509
+ var wt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
510
+ function Qn(t) {
511
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
512
+ }
513
+ function Jn(t) {
514
+ if (t.__esModule) return t;
515
+ var e = t.default;
516
+ if (typeof e == "function") {
517
+ var r = function n() {
518
+ return this instanceof n ? Reflect.construct(e, arguments, this.constructor) : e.apply(this, arguments);
519
+ };
520
+ r.prototype = e.prototype;
521
+ } else r = {};
522
+ return Object.defineProperty(r, "__esModule", { value: !0 }), Object.keys(t).forEach(function(n) {
523
+ var o = Object.getOwnPropertyDescriptor(t, n);
524
+ Object.defineProperty(r, n, o.get ? o : {
525
+ enumerable: !0,
526
+ get: function() {
527
+ return t[n];
528
+ }
529
+ });
530
+ }), r;
531
+ }
532
+ var Zn = {};
533
+ (function(t) {
534
+ Object.defineProperty(t, "__esModule", {
535
+ value: !0
536
+ }), Object.defineProperty(t, "removeTrailingSlash", {
537
+ enumerable: !0,
538
+ get: function() {
539
+ return e;
540
+ }
541
+ });
542
+ function e(r) {
543
+ return r.replace(/\/$/, "") || "/";
544
+ }
545
+ })(Zn);
546
+ var yt = {};
547
+ (function(t) {
548
+ Object.defineProperty(t, "__esModule", {
549
+ value: !0
550
+ }), Object.defineProperty(t, "parsePath", {
551
+ enumerable: !0,
552
+ get: function() {
553
+ return e;
554
+ }
555
+ });
556
+ function e(r) {
557
+ const n = r.indexOf("#"), o = r.indexOf("?"), a = o > -1 && (n < 0 || o < n);
558
+ return a || n > -1 ? {
559
+ pathname: r.substring(0, a ? o : n),
560
+ query: a ? r.substring(o, n > -1 ? n : void 0) : "",
561
+ hash: n > -1 ? r.slice(n) : ""
562
+ } : {
563
+ pathname: r,
564
+ query: "",
565
+ hash: ""
566
+ };
567
+ }
568
+ })(yt);
569
+ var sr = {};
570
+ (function(t) {
571
+ Object.defineProperty(t, "__esModule", {
572
+ value: !0
573
+ }), Object.defineProperty(t, "pathHasPrefix", {
574
+ enumerable: !0,
575
+ get: function() {
576
+ return r;
577
+ }
578
+ });
579
+ const e = yt;
580
+ function r(n, o) {
581
+ if (typeof n != "string")
582
+ return !1;
583
+ const { pathname: a } = (0, e.parsePath)(n);
584
+ return a === o || a.startsWith(o + "/");
585
+ }
586
+ })(sr);
587
+ var eo = {};
588
+ (function(t) {
589
+ Object.defineProperty(t, "__esModule", {
590
+ value: !0
591
+ });
592
+ function e(tn, bt) {
593
+ for (var Ot in bt) Object.defineProperty(tn, Ot, {
594
+ enumerable: !0,
595
+ get: bt[Ot]
596
+ });
597
+ }
598
+ e(t, {
599
+ ACTION_SUFFIX: function() {
600
+ return s;
601
+ },
602
+ APP_DIR_ALIAS: function() {
603
+ return Q;
604
+ },
605
+ CACHE_ONE_YEAR: function() {
606
+ return R;
607
+ },
608
+ DOT_NEXT_ALIAS: function() {
609
+ return L;
610
+ },
611
+ ESLINT_DEFAULT_DIRS: function() {
612
+ return Qr;
613
+ },
614
+ GSP_NO_RETURNED_VALUE: function() {
615
+ return Xr;
616
+ },
617
+ GSSP_COMPONENT_MEMBER_ERROR: function() {
618
+ return zr;
619
+ },
620
+ GSSP_NO_RETURNED_VALUE: function() {
621
+ return Wr;
622
+ },
623
+ INSTRUMENTATION_HOOK_FILENAME: function() {
624
+ return C;
625
+ },
626
+ MIDDLEWARE_FILENAME: function() {
627
+ return I;
628
+ },
629
+ MIDDLEWARE_LOCATION_REGEXP: function() {
630
+ return $;
631
+ },
632
+ NEXT_BODY_SUFFIX: function() {
633
+ return p;
634
+ },
635
+ NEXT_CACHE_IMPLICIT_TAG_ID: function() {
636
+ return m;
637
+ },
638
+ NEXT_CACHE_REVALIDATED_TAGS_HEADER: function() {
639
+ return d;
640
+ },
641
+ NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER: function() {
642
+ return g;
643
+ },
644
+ NEXT_CACHE_SOFT_TAGS_HEADER: function() {
645
+ return y;
646
+ },
647
+ NEXT_CACHE_SOFT_TAG_MAX_LENGTH: function() {
648
+ return P;
649
+ },
650
+ NEXT_CACHE_TAGS_HEADER: function() {
651
+ return u;
652
+ },
653
+ NEXT_CACHE_TAG_MAX_ITEMS: function() {
654
+ return h;
655
+ },
656
+ NEXT_CACHE_TAG_MAX_LENGTH: function() {
657
+ return b;
658
+ },
659
+ NEXT_DATA_SUFFIX: function() {
660
+ return f;
661
+ },
662
+ NEXT_INTERCEPTION_MARKER_PREFIX: function() {
663
+ return n;
664
+ },
665
+ NEXT_META_SUFFIX: function() {
666
+ return c;
667
+ },
668
+ NEXT_QUERY_PARAM_PREFIX: function() {
669
+ return r;
670
+ },
671
+ NON_STANDARD_NODE_ENV: function() {
672
+ return Kr;
673
+ },
674
+ PAGES_DIR_ALIAS: function() {
675
+ return k;
676
+ },
677
+ PRERENDER_REVALIDATE_HEADER: function() {
678
+ return o;
679
+ },
680
+ PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER: function() {
681
+ return a;
682
+ },
683
+ PUBLIC_DIR_MIDDLEWARE_CONFLICT: function() {
684
+ return ae;
685
+ },
686
+ ROOT_DIR_ALIAS: function() {
687
+ return N;
688
+ },
689
+ RSC_ACTION_CLIENT_WRAPPER_ALIAS: function() {
690
+ return W;
691
+ },
692
+ RSC_ACTION_ENCRYPTION_ALIAS: function() {
693
+ return w;
694
+ },
695
+ RSC_ACTION_PROXY_ALIAS: function() {
696
+ return D;
697
+ },
698
+ RSC_ACTION_VALIDATE_ALIAS: function() {
699
+ return O;
700
+ },
701
+ RSC_MOD_REF_PROXY_ALIAS: function() {
702
+ return j;
703
+ },
704
+ RSC_PREFETCH_SUFFIX: function() {
705
+ return i;
706
+ },
707
+ RSC_SUFFIX: function() {
708
+ return l;
709
+ },
710
+ SERVER_PROPS_EXPORT_ERROR: function() {
711
+ return qr;
712
+ },
713
+ SERVER_PROPS_GET_INIT_PROPS_CONFLICT: function() {
714
+ return ge;
715
+ },
716
+ SERVER_PROPS_SSG_CONFLICT: function() {
717
+ return ie;
718
+ },
719
+ SERVER_RUNTIME: function() {
720
+ return Jr;
721
+ },
722
+ SSG_FALLBACK_EXPORT_ERROR: function() {
723
+ return Yr;
724
+ },
725
+ SSG_GET_INITIAL_PROPS_CONFLICT: function() {
726
+ return $e;
727
+ },
728
+ STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR: function() {
729
+ return Hr;
730
+ },
731
+ UNSTABLE_REVALIDATE_RENAME_ERROR: function() {
732
+ return Vr;
733
+ },
734
+ WEBPACK_LAYERS: function() {
735
+ return Zr;
736
+ },
737
+ WEBPACK_RESOURCE_QUERIES: function() {
738
+ return en;
739
+ }
740
+ });
741
+ const r = "nxtP", n = "nxtI", o = "x-prerender-revalidate", a = "x-prerender-revalidate-if-generated", i = ".prefetch.rsc", l = ".rsc", s = ".action", f = ".json", c = ".meta", p = ".body", u = "x-next-cache-tags", y = "x-next-cache-soft-tags", d = "x-next-revalidated-tags", g = "x-next-revalidate-tag-token", h = 128, b = 256, P = 1024, m = "_N_T_", R = 31536e3, I = "middleware", $ = `(?:src/)?${I}`, C = "instrumentation", k = "private-next-pages", L = "private-dot-next", N = "private-next-root-dir", Q = "private-next-app-dir", j = "private-next-rsc-mod-ref-proxy", O = "private-next-rsc-action-validate", D = "private-next-rsc-server-reference", w = "private-next-rsc-action-encryption", W = "private-next-rsc-action-client-wrapper", ae = "You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict", $e = "You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps", ge = "You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.", ie = "You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps", Hr = "can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props", qr = "pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export", Xr = "Your `getStaticProps` function did not return an object. Did you forget to add a `return`?", Wr = "Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?", Vr = "The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.", zr = "can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member", Kr = 'You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env', Yr = "Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export", Qr = [
742
+ "app",
743
+ "pages",
744
+ "components",
745
+ "lib",
746
+ "src"
747
+ ], Jr = {
748
+ edge: "edge",
749
+ experimentalEdge: "experimental-edge",
750
+ nodejs: "nodejs"
751
+ }, S = {
752
+ /**
753
+ * The layer for the shared code between the client and server bundles.
754
+ */
755
+ shared: "shared",
756
+ /**
757
+ * React Server Components layer (rsc).
758
+ */
759
+ reactServerComponents: "rsc",
760
+ /**
761
+ * Server Side Rendering layer for app (ssr).
762
+ */
763
+ serverSideRendering: "ssr",
764
+ /**
765
+ * The browser client bundle layer for actions.
766
+ */
767
+ actionBrowser: "action-browser",
768
+ /**
769
+ * The layer for the API routes.
770
+ */
771
+ api: "api",
772
+ /**
773
+ * The layer for the middleware code.
774
+ */
775
+ middleware: "middleware",
776
+ /**
777
+ * The layer for the instrumentation hooks.
778
+ */
779
+ instrument: "instrument",
780
+ /**
781
+ * The layer for assets on the edge.
782
+ */
783
+ edgeAsset: "edge-asset",
784
+ /**
785
+ * The browser client bundle layer for App directory.
786
+ */
787
+ appPagesBrowser: "app-pages-browser",
788
+ /**
789
+ * The server bundle layer for metadata routes.
790
+ */
791
+ appMetadataRoute: "app-metadata-route",
792
+ /**
793
+ * The layer for the server bundle for App Route handlers.
794
+ */
795
+ appRouteHandler: "app-route-handler"
796
+ }, Zr = {
797
+ ...S,
798
+ GROUP: {
799
+ serverOnly: [
800
+ S.reactServerComponents,
801
+ S.actionBrowser,
802
+ S.appMetadataRoute,
803
+ S.appRouteHandler,
804
+ S.instrument
805
+ ],
806
+ clientOnly: [
807
+ S.serverSideRendering,
808
+ S.appPagesBrowser
809
+ ],
810
+ nonClientServerTarget: [
811
+ // middleware and pages api
812
+ S.middleware,
813
+ S.api
814
+ ],
815
+ app: [
816
+ S.reactServerComponents,
817
+ S.actionBrowser,
818
+ S.appMetadataRoute,
819
+ S.appRouteHandler,
820
+ S.serverSideRendering,
821
+ S.appPagesBrowser,
822
+ S.shared,
823
+ S.instrument
824
+ ]
825
+ }
826
+ }, en = {
827
+ edgeSSREntry: "__next_edge_ssr_entry__",
828
+ metadata: "__next_metadata__",
829
+ metadataRoute: "__next_metadata_route__",
830
+ metadataImageMeta: "__next_metadata_image_meta__"
831
+ };
832
+ })(eo);
833
+ var to = {}, ur = {};
834
+ (function(t) {
835
+ Object.defineProperty(t, "__esModule", {
836
+ value: !0
837
+ }), Object.defineProperty(t, "addPathPrefix", {
838
+ enumerable: !0,
839
+ get: function() {
840
+ return r;
841
+ }
842
+ });
843
+ const e = yt;
844
+ function r(n, o) {
845
+ if (!n.startsWith("/") || !o)
846
+ return n;
847
+ const { pathname: a, query: i, hash: l } = (0, e.parsePath)(n);
848
+ return "" + o + a + i + l;
849
+ }
850
+ })(ur);
851
+ (function(t) {
852
+ Object.defineProperty(t, "__esModule", {
853
+ value: !0
854
+ }), Object.defineProperty(t, "addLocale", {
855
+ enumerable: !0,
856
+ get: function() {
857
+ return n;
858
+ }
859
+ });
860
+ const e = ur, r = sr;
861
+ function n(o, a, i, l) {
862
+ if (!a || a === i) return o;
863
+ const s = o.toLowerCase();
864
+ return !l && ((0, r.pathHasPrefix)(s, "/api") || (0, r.pathHasPrefix)(s, "/" + a.toLowerCase())) ? o : (0, e.addPathPrefix)(o, "/" + a);
865
+ }
866
+ })(to);
867
+ var ro = {};
868
+ (function(t) {
869
+ Object.defineProperty(t, "__esModule", {
870
+ value: !0
871
+ }), Object.defineProperty(t, "normalizeLocalePath", {
872
+ enumerable: !0,
873
+ get: function() {
874
+ return e;
875
+ }
876
+ });
877
+ function e(r, n) {
878
+ let o;
879
+ const a = r.split("/");
880
+ return (n || []).some((i) => a[1] && a[1].toLowerCase() === i.toLowerCase() ? (o = i, a.splice(1, 1), r = a.join("/") || "/", !0) : !1), {
881
+ pathname: r,
882
+ detectedLocale: o
883
+ };
884
+ }
885
+ })(ro);
886
+ var no = {};
887
+ (function(t) {
888
+ Object.defineProperty(t, "__esModule", {
889
+ value: !0
890
+ }), Object.defineProperty(t, "detectDomainLocale", {
891
+ enumerable: !0,
892
+ get: function() {
893
+ return e;
894
+ }
895
+ });
896
+ function e(r, n, o) {
897
+ if (r) {
898
+ o && (o = o.toLowerCase());
899
+ for (const l of r) {
900
+ var a, i;
901
+ const s = (a = l.domain) == null ? void 0 : a.split(":", 1)[0].toLowerCase();
902
+ if (n === s || o === l.defaultLocale.toLowerCase() || (i = l.locales) != null && i.some((f) => f.toLowerCase() === o))
903
+ return l;
904
+ }
905
+ }
906
+ }
907
+ })(no);
908
+ const oo = (t = "") => t.charAt(0).toUpperCase() + t.slice(1), Tt = (t, e = " ") => !t || typeof t == "string" && t.length === 0 ? t : (Array.isArray(t) ? t : t.split("-")).map(oo).join(e), ao = ({ canonical: t, seo: e, slug: r }) => {
909
+ const n = Array.isArray(r) ? r.join(", ") : r;
910
+ return {
911
+ id: 0,
912
+ Title: `${Array.isArray(r) ? r.map((a) => Tt(a)).join(",") : Tt(r)} - ${e.title}`,
913
+ MetaTagDescription: e.description,
914
+ name: n,
915
+ hasChildren: !1,
916
+ url: t,
917
+ children: []
918
+ };
919
+ }, io = ({ canonical: t, category: e, previousImages: r, seo: n }) => ({
920
+ category: String(e == null ? void 0 : e.id),
921
+ title: (e == null ? void 0 : e.Title) ?? n.title,
922
+ description: (e == null ? void 0 : e.MetaTagDescription) ?? n.description,
923
+ alternates: { canonical: t },
924
+ openGraph: {
925
+ type: "website",
926
+ title: (e == null ? void 0 : e.Title) ?? n.title,
927
+ description: (e == null ? void 0 : e.MetaTagDescription) ?? n.description,
928
+ images: Array.isArray(r) ? [...r] : []
929
+ }
930
+ }), lo = ({ items: t, parent: e, apiUrl: r, find: n }) => {
931
+ const o = t.find(
932
+ (i) => i.url.replace(r, "") === decodeURIComponent(e.toLowerCase())
933
+ );
934
+ return (o == null ? void 0 : o.children.find(
935
+ (i) => i.name.toLowerCase() === decodeURIComponent(String(n))
936
+ )) ?? o;
937
+ }, co = (t) => {
938
+ t instanceof Error ? (console.error(`[ERROR CATEGORY INFO]: ${t.message}`), console.error(t.stack)) : console.error("[ERROR CATEGORY INFO]: Unknown error", t);
939
+ }, so = /* @__PURE__ */ new Set([
940
+ "brand",
941
+ "category",
942
+ "department",
943
+ "subcategory",
944
+ "collection",
945
+ "cluster"
946
+ ]), uo = (t) => typeof (t == null ? void 0 : t.pageType) == "string" && so.has(t == null ? void 0 : t.pageType.toLowerCase()), fo = (t) => ({
947
+ collection: t.Coleção,
948
+ categoryId: t.categoryId,
949
+ current_collection: t["Coleção Atual"],
950
+ items: t.items
951
+ }), po = (t, e) => t.reduce((r, n) => {
952
+ if (n.items.filter(
953
+ (i) => i.sellers.find((l) => l.commertialOffer.IsAvailable)
954
+ ).length === 0 || (r == null ? void 0 : r.find((i) => (i == null ? void 0 : i.productId) === (n == null ? void 0 : n.productId))) !== void 0)
955
+ return r;
956
+ const a = n.items[0].images.find(
957
+ (i) => e.includes(i.imageLabel)
958
+ );
959
+ return r.push({
960
+ slug: `/${n.linkText}/p`,
961
+ productId: n == null ? void 0 : n.productId,
962
+ textureImage: (a == null ? void 0 : a.imageUrl) ?? "",
963
+ textureAlt: (a == null ? void 0 : a.imageText) ?? ""
964
+ }), r;
965
+ }, []), Pl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
966
+ __proto__: null,
967
+ createEmptySeoCategory: ao,
968
+ createSeoCategory: io,
969
+ findCategory: lo,
970
+ formattedSimilars: po,
971
+ isCollectionPageType: uo,
972
+ notFindCategoryError: co,
973
+ responseAdapter: fo
974
+ }, Symbol.toStringTag, { value: "Module" })), he = {
975
+ "responsive-mobile-flex": "_responsive-mobile-flex_1e0ai_1",
976
+ "responsive-desktop-flex": "_responsive-desktop-flex_1e0ai_15",
977
+ "responsive-mobile-block": "_responsive-mobile-block_1e0ai_30",
978
+ "responsive-desktop-block": "_responsive-desktop-block_1e0ai_41"
979
+ }, fr = async (t, e = {}) => {
980
+ const { method: r = "GET", body: n, headers: o = {}, priority: a = "auto", cache: i = "default" } = e;
981
+ return fetch(t, {
982
+ method: r,
983
+ headers: {
984
+ ...o,
985
+ Accept: "application/json",
986
+ "Content-Type": "application/json"
987
+ },
988
+ priority: a,
989
+ cache: i,
990
+ ...n ? { body: JSON.stringify(n) } : {}
991
+ // not body in get
992
+ }).then((l) => l.json()).catch((l) => {
993
+ console.error("[ERROR FETCH VTEX]", l);
994
+ });
995
+ }, le = /* @__PURE__ */ new Map();
996
+ async function Rl(t, e = {}) {
997
+ var r;
998
+ try {
999
+ const { abort: n = !1 } = e, o = new AbortController();
1000
+ n && (le.has(t) && ((r = le.get(t)) == null || r.abort(), le.delete(t)), le.set(t, o));
1001
+ const a = fr(t, {
1002
+ ...e,
1003
+ ...n ? { signal: o.signal } : {}
1004
+ });
1005
+ return n && le.delete(t), a;
1006
+ } catch (n) {
1007
+ if (n.name === "AbortError") {
1008
+ console.log(`[REQUEST CANCELLED]: ${t}`);
1009
+ return;
1010
+ }
1011
+ throw console.error(`[ERROR API]: ${n.message}`), n;
1012
+ }
1013
+ }
1014
+ const yo = U.object({
1015
+ orderFormId: U.string().required(),
1016
+ coupon: U.string().nullable(),
1017
+ utmSource: U.string().optional(),
1018
+ utmMedium: U.string().optional(),
1019
+ utmCampaign: U.string().optional(),
1020
+ utmiCampaign: U.string().optional(),
1021
+ utmiPart: U.string().optional(),
1022
+ utmipage: U.string().optional()
1023
+ });
1024
+ async function vo({
1025
+ apiUrl: t,
1026
+ body: e
1027
+ }) {
1028
+ if (!e) {
1029
+ console.error("[ERROR FETCHING] Body is required");
1030
+ return;
1031
+ }
1032
+ await yo.validate(e);
1033
+ const { orderFormId: r, utmiPart: n, coupon: o, ...a } = e, i = `${t}/api/checkout/pub/orderForm/${r}/attachments/marketingData`;
1034
+ return fr(i, {
1035
+ method: "POST",
1036
+ body: {
1037
+ orderFormId: r,
1038
+ utmiPart: n ?? r,
1039
+ coupon: o ?? null,
1040
+ ...a
1041
+ }
1042
+ });
1043
+ }
1044
+ const Il = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1045
+ __proto__: null,
1046
+ postMediaData: vo
1047
+ }, Symbol.toStringTag, { value: "Module" })), wl = ({
1048
+ children: t,
1049
+ data: e,
1050
+ SectionZone: r,
1051
+ className: n
1052
+ }) => {
1053
+ var c, p;
1054
+ const o = ((c = e == null ? void 0 : e.filter((u) => {
1055
+ var y, d;
1056
+ return ((d = (y = u.config) == null ? void 0 : y.responsive) == null ? void 0 : d.deviceType) === "mobile";
1057
+ })[0]) == null ? void 0 : c.sections) || [], a = ((p = e == null ? void 0 : e.filter((u) => {
1058
+ var y, d;
1059
+ return ((d = (y = u.config) == null ? void 0 : y.responsive) == null ? void 0 : d.deviceType) === "desktop";
1060
+ })[0]) == null ? void 0 : p.sections) || [], i = o.slice(0, 1), l = o.slice(1, o.length), s = a.slice(0, 1), f = a.slice(1, a.length);
1061
+ return /* @__PURE__ */ Pt(rn, { children: [
1062
+ /* @__PURE__ */ Pt("div", { className: n, children: [
1063
+ /* @__PURE__ */ B("div", { className: he["responsive-mobile-flex"], children: /* @__PURE__ */ B(r, { data: i ?? [] }) }),
1064
+ /* @__PURE__ */ B("div", { className: he["responsive-desktop-flex"], children: /* @__PURE__ */ B(r, { data: s ?? [] }) })
1065
+ ] }),
1066
+ t,
1067
+ /* @__PURE__ */ B("div", { className: he["responsive-mobile-flex"], children: /* @__PURE__ */ B(r, { data: l ?? [] }) }),
1068
+ /* @__PURE__ */ B("div", { className: he["responsive-desktop-flex"], children: /* @__PURE__ */ B(r, { data: f ?? [] }) }),
1069
+ /* @__PURE__ */ B(nn.Divider, {})
1070
+ ] });
1071
+ };
1072
+ var oe = TypeError;
1073
+ const mo = {}, go = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1074
+ __proto__: null,
1075
+ default: mo
1076
+ }, Symbol.toStringTag, { value: "Module" })), ho = /* @__PURE__ */ Jn(go);
1077
+ var vt = typeof Map == "function" && Map.prototype, Le = Object.getOwnPropertyDescriptor && vt ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, Pe = vt && Le && typeof Le.get == "function" ? Le.get : null, Ct = vt && Map.prototype.forEach, mt = typeof Set == "function" && Set.prototype, Ue = Object.getOwnPropertyDescriptor && mt ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, Re = mt && Ue && typeof Ue.get == "function" ? Ue.get : null, Nt = mt && Set.prototype.forEach, _o = typeof WeakMap == "function" && WeakMap.prototype, se = _o ? WeakMap.prototype.has : null, Eo = typeof WeakSet == "function" && WeakSet.prototype, ue = Eo ? WeakSet.prototype.has : null, So = typeof WeakRef == "function" && WeakRef.prototype, Dt = So ? WeakRef.prototype.deref : null, Ao = Boolean.prototype.valueOf, bo = Object.prototype.toString, Oo = Function.prototype.toString, Po = String.prototype.match, gt = String.prototype.slice, H = String.prototype.replace, Ro = String.prototype.toUpperCase, xt = String.prototype.toLowerCase, pr = RegExp.prototype.test, Ft = Array.prototype.concat, M = Array.prototype.join, Io = Array.prototype.slice, Mt = Math.floor, it = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, Be = Object.getOwnPropertySymbols, lt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, re = typeof Symbol == "function" && typeof Symbol.iterator == "object", fe = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === re || !0) ? Symbol.toStringTag : null, dr = Object.prototype.propertyIsEnumerable, $t = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(t) {
1078
+ return t.__proto__;
1079
+ } : null);
1080
+ function Lt(t, e) {
1081
+ if (t === 1 / 0 || t === -1 / 0 || t !== t || t && t > -1e3 && t < 1e3 || pr.call(/e/, e))
1082
+ return e;
1083
+ var r = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
1084
+ if (typeof t == "number") {
1085
+ var n = t < 0 ? -Mt(-t) : Mt(t);
1086
+ if (n !== t) {
1087
+ var o = String(n), a = gt.call(e, o.length + 1);
1088
+ return H.call(o, r, "$&_") + "." + H.call(H.call(a, /([0-9]{3})/g, "$&_"), /_$/, "");
1089
+ }
1090
+ }
1091
+ return H.call(e, r, "$&_");
1092
+ }
1093
+ var ct = ho, Ut = ct.custom, Bt = mr(Ut) ? Ut : null, yr = {
1094
+ __proto__: null,
1095
+ double: '"',
1096
+ single: "'"
1097
+ }, wo = {
1098
+ __proto__: null,
1099
+ double: /(["\\])/g,
1100
+ single: /(['\\])/g
1101
+ }, Ce = function t(e, r, n, o) {
1102
+ var a = r || {};
1103
+ if (G(a, "quoteStyle") && !G(yr, a.quoteStyle))
1104
+ throw new TypeError('option "quoteStyle" must be "single" or "double"');
1105
+ if (G(a, "maxStringLength") && (typeof a.maxStringLength == "number" ? a.maxStringLength < 0 && a.maxStringLength !== 1 / 0 : a.maxStringLength !== null))
1106
+ throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
1107
+ var i = G(a, "customInspect") ? a.customInspect : !0;
1108
+ if (typeof i != "boolean" && i !== "symbol")
1109
+ throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
1110
+ if (G(a, "indent") && a.indent !== null && a.indent !== " " && !(parseInt(a.indent, 10) === a.indent && a.indent > 0))
1111
+ throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
1112
+ if (G(a, "numericSeparator") && typeof a.numericSeparator != "boolean")
1113
+ throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
1114
+ var l = a.numericSeparator;
1115
+ if (typeof e > "u")
1116
+ return "undefined";
1117
+ if (e === null)
1118
+ return "null";
1119
+ if (typeof e == "boolean")
1120
+ return e ? "true" : "false";
1121
+ if (typeof e == "string")
1122
+ return hr(e, a);
1123
+ if (typeof e == "number") {
1124
+ if (e === 0)
1125
+ return 1 / 0 / e > 0 ? "0" : "-0";
1126
+ var s = String(e);
1127
+ return l ? Lt(e, s) : s;
1128
+ }
1129
+ if (typeof e == "bigint") {
1130
+ var f = String(e) + "n";
1131
+ return l ? Lt(e, f) : f;
1132
+ }
1133
+ var c = typeof a.depth > "u" ? 5 : a.depth;
1134
+ if (typeof n > "u" && (n = 0), n >= c && c > 0 && typeof e == "object")
1135
+ return st(e) ? "[Array]" : "[Object]";
1136
+ var p = Wo(a, n);
1137
+ if (typeof o > "u")
1138
+ o = [];
1139
+ else if (gr(o, e) >= 0)
1140
+ return "[Circular]";
1141
+ function u(O, D, w) {
1142
+ if (D && (o = Io.call(o), o.push(D)), w) {
1143
+ var W = {
1144
+ depth: a.depth
1145
+ };
1146
+ return G(a, "quoteStyle") && (W.quoteStyle = a.quoteStyle), t(O, W, n + 1, o);
1147
+ }
1148
+ return t(O, a, n + 1, o);
1149
+ }
1150
+ if (typeof e == "function" && !Gt(e)) {
1151
+ var y = Lo(e), d = _e(e, u);
1152
+ return "[Function" + (y ? ": " + y : " (anonymous)") + "]" + (d.length > 0 ? " { " + M.call(d, ", ") + " }" : "");
1153
+ }
1154
+ if (mr(e)) {
1155
+ var g = re ? H.call(String(e), /^(Symbol\(.*\))_[^)]*$/, "$1") : lt.call(e);
1156
+ return typeof e == "object" && !re ? ce(g) : g;
1157
+ }
1158
+ if (Ho(e)) {
1159
+ for (var h = "<" + xt.call(String(e.nodeName)), b = e.attributes || [], P = 0; P < b.length; P++)
1160
+ h += " " + b[P].name + "=" + vr(To(b[P].value), "double", a);
1161
+ return h += ">", e.childNodes && e.childNodes.length && (h += "..."), h += "</" + xt.call(String(e.nodeName)) + ">", h;
1162
+ }
1163
+ if (st(e)) {
1164
+ if (e.length === 0)
1165
+ return "[]";
1166
+ var m = _e(e, u);
1167
+ return p && !Xo(m) ? "[" + ut(m, p) + "]" : "[ " + M.call(m, ", ") + " ]";
1168
+ }
1169
+ if (No(e)) {
1170
+ var R = _e(e, u);
1171
+ return !("cause" in Error.prototype) && "cause" in e && !dr.call(e, "cause") ? "{ [" + String(e) + "] " + M.call(Ft.call("[cause]: " + u(e.cause), R), ", ") + " }" : R.length === 0 ? "[" + String(e) + "]" : "{ [" + String(e) + "] " + M.call(R, ", ") + " }";
1172
+ }
1173
+ if (typeof e == "object" && i) {
1174
+ if (Bt && typeof e[Bt] == "function" && ct)
1175
+ return ct(e, { depth: c - n });
1176
+ if (i !== "symbol" && typeof e.inspect == "function")
1177
+ return e.inspect();
1178
+ }
1179
+ if (Uo(e)) {
1180
+ var I = [];
1181
+ return Ct && Ct.call(e, function(O, D) {
1182
+ I.push(u(D, e, !0) + " => " + u(O, e));
1183
+ }), kt("Map", Pe.call(e), I, p);
1184
+ }
1185
+ if (ko(e)) {
1186
+ var $ = [];
1187
+ return Nt && Nt.call(e, function(O) {
1188
+ $.push(u(O, e));
1189
+ }), kt("Set", Re.call(e), $, p);
1190
+ }
1191
+ if (Bo(e))
1192
+ return Ge("WeakMap");
1193
+ if (jo(e))
1194
+ return Ge("WeakSet");
1195
+ if (Go(e))
1196
+ return Ge("WeakRef");
1197
+ if (xo(e))
1198
+ return ce(u(Number(e)));
1199
+ if (Mo(e))
1200
+ return ce(u(it.call(e)));
1201
+ if (Fo(e))
1202
+ return ce(Ao.call(e));
1203
+ if (Do(e))
1204
+ return ce(u(String(e)));
1205
+ if (typeof window < "u" && e === window)
1206
+ return "{ [object Window] }";
1207
+ if (typeof globalThis < "u" && e === globalThis || typeof wt < "u" && e === wt)
1208
+ return "{ [object globalThis] }";
1209
+ if (!Co(e) && !Gt(e)) {
1210
+ var C = _e(e, u), k = $t ? $t(e) === Object.prototype : e instanceof Object || e.constructor === Object, L = e instanceof Object ? "" : "null prototype", N = !k && fe && Object(e) === e && fe in e ? gt.call(X(e), 8, -1) : L ? "Object" : "", Q = k || typeof e.constructor != "function" ? "" : e.constructor.name ? e.constructor.name + " " : "", j = Q + (N || L ? "[" + M.call(Ft.call([], N || [], L || []), ": ") + "] " : "");
1211
+ return C.length === 0 ? j + "{}" : p ? j + "{" + ut(C, p) + "}" : j + "{ " + M.call(C, ", ") + " }";
1212
+ }
1213
+ return String(e);
1214
+ };
1215
+ function vr(t, e, r) {
1216
+ var n = r.quoteStyle || e, o = yr[n];
1217
+ return o + t + o;
1218
+ }
1219
+ function To(t) {
1220
+ return H.call(String(t), /"/g, "&quot;");
1221
+ }
1222
+ function Y(t) {
1223
+ return !fe || !(typeof t == "object" && (fe in t || typeof t[fe] < "u"));
1224
+ }
1225
+ function st(t) {
1226
+ return X(t) === "[object Array]" && Y(t);
1227
+ }
1228
+ function Co(t) {
1229
+ return X(t) === "[object Date]" && Y(t);
1230
+ }
1231
+ function Gt(t) {
1232
+ return X(t) === "[object RegExp]" && Y(t);
1233
+ }
1234
+ function No(t) {
1235
+ return X(t) === "[object Error]" && Y(t);
1236
+ }
1237
+ function Do(t) {
1238
+ return X(t) === "[object String]" && Y(t);
1239
+ }
1240
+ function xo(t) {
1241
+ return X(t) === "[object Number]" && Y(t);
1242
+ }
1243
+ function Fo(t) {
1244
+ return X(t) === "[object Boolean]" && Y(t);
1245
+ }
1246
+ function mr(t) {
1247
+ if (re)
1248
+ return t && typeof t == "object" && t instanceof Symbol;
1249
+ if (typeof t == "symbol")
1250
+ return !0;
1251
+ if (!t || typeof t != "object" || !lt)
1252
+ return !1;
1253
+ try {
1254
+ return lt.call(t), !0;
1255
+ } catch {
1256
+ }
1257
+ return !1;
1258
+ }
1259
+ function Mo(t) {
1260
+ if (!t || typeof t != "object" || !it)
1261
+ return !1;
1262
+ try {
1263
+ return it.call(t), !0;
1264
+ } catch {
1265
+ }
1266
+ return !1;
1267
+ }
1268
+ var $o = Object.prototype.hasOwnProperty || function(t) {
1269
+ return t in this;
1270
+ };
1271
+ function G(t, e) {
1272
+ return $o.call(t, e);
1273
+ }
1274
+ function X(t) {
1275
+ return bo.call(t);
1276
+ }
1277
+ function Lo(t) {
1278
+ if (t.name)
1279
+ return t.name;
1280
+ var e = Po.call(Oo.call(t), /^function\s*([\w$]+)/);
1281
+ return e ? e[1] : null;
1282
+ }
1283
+ function gr(t, e) {
1284
+ if (t.indexOf)
1285
+ return t.indexOf(e);
1286
+ for (var r = 0, n = t.length; r < n; r++)
1287
+ if (t[r] === e)
1288
+ return r;
1289
+ return -1;
1290
+ }
1291
+ function Uo(t) {
1292
+ if (!Pe || !t || typeof t != "object")
1293
+ return !1;
1294
+ try {
1295
+ Pe.call(t);
1296
+ try {
1297
+ Re.call(t);
1298
+ } catch {
1299
+ return !0;
1300
+ }
1301
+ return t instanceof Map;
1302
+ } catch {
1303
+ }
1304
+ return !1;
1305
+ }
1306
+ function Bo(t) {
1307
+ if (!se || !t || typeof t != "object")
1308
+ return !1;
1309
+ try {
1310
+ se.call(t, se);
1311
+ try {
1312
+ ue.call(t, ue);
1313
+ } catch {
1314
+ return !0;
1315
+ }
1316
+ return t instanceof WeakMap;
1317
+ } catch {
1318
+ }
1319
+ return !1;
1320
+ }
1321
+ function Go(t) {
1322
+ if (!Dt || !t || typeof t != "object")
1323
+ return !1;
1324
+ try {
1325
+ return Dt.call(t), !0;
1326
+ } catch {
1327
+ }
1328
+ return !1;
1329
+ }
1330
+ function ko(t) {
1331
+ if (!Re || !t || typeof t != "object")
1332
+ return !1;
1333
+ try {
1334
+ Re.call(t);
1335
+ try {
1336
+ Pe.call(t);
1337
+ } catch {
1338
+ return !0;
1339
+ }
1340
+ return t instanceof Set;
1341
+ } catch {
1342
+ }
1343
+ return !1;
1344
+ }
1345
+ function jo(t) {
1346
+ if (!ue || !t || typeof t != "object")
1347
+ return !1;
1348
+ try {
1349
+ ue.call(t, ue);
1350
+ try {
1351
+ se.call(t, se);
1352
+ } catch {
1353
+ return !0;
1354
+ }
1355
+ return t instanceof WeakSet;
1356
+ } catch {
1357
+ }
1358
+ return !1;
1359
+ }
1360
+ function Ho(t) {
1361
+ return !t || typeof t != "object" ? !1 : typeof HTMLElement < "u" && t instanceof HTMLElement ? !0 : typeof t.nodeName == "string" && typeof t.getAttribute == "function";
1362
+ }
1363
+ function hr(t, e) {
1364
+ if (t.length > e.maxStringLength) {
1365
+ var r = t.length - e.maxStringLength, n = "... " + r + " more character" + (r > 1 ? "s" : "");
1366
+ return hr(gt.call(t, 0, e.maxStringLength), e) + n;
1367
+ }
1368
+ var o = wo[e.quoteStyle || "single"];
1369
+ o.lastIndex = 0;
1370
+ var a = H.call(H.call(t, o, "\\$1"), /[\x00-\x1f]/g, qo);
1371
+ return vr(a, "single", e);
1372
+ }
1373
+ function qo(t) {
1374
+ var e = t.charCodeAt(0), r = {
1375
+ 8: "b",
1376
+ 9: "t",
1377
+ 10: "n",
1378
+ 12: "f",
1379
+ 13: "r"
1380
+ }[e];
1381
+ return r ? "\\" + r : "\\x" + (e < 16 ? "0" : "") + Ro.call(e.toString(16));
1382
+ }
1383
+ function ce(t) {
1384
+ return "Object(" + t + ")";
1385
+ }
1386
+ function Ge(t) {
1387
+ return t + " { ? }";
1388
+ }
1389
+ function kt(t, e, r, n) {
1390
+ var o = n ? ut(r, n) : M.call(r, ", ");
1391
+ return t + " (" + e + ") {" + o + "}";
1392
+ }
1393
+ function Xo(t) {
1394
+ for (var e = 0; e < t.length; e++)
1395
+ if (gr(t[e], `
1396
+ `) >= 0)
1397
+ return !1;
1398
+ return !0;
1399
+ }
1400
+ function Wo(t, e) {
1401
+ var r;
1402
+ if (t.indent === " ")
1403
+ r = " ";
1404
+ else if (typeof t.indent == "number" && t.indent > 0)
1405
+ r = M.call(Array(t.indent + 1), " ");
1406
+ else
1407
+ return null;
1408
+ return {
1409
+ base: r,
1410
+ prev: M.call(Array(e + 1), r)
1411
+ };
1412
+ }
1413
+ function ut(t, e) {
1414
+ if (t.length === 0)
1415
+ return "";
1416
+ var r = `
1417
+ ` + e.prev + e.base;
1418
+ return r + M.call(t, "," + r) + `
1419
+ ` + e.prev;
1420
+ }
1421
+ function _e(t, e) {
1422
+ var r = st(t), n = [];
1423
+ if (r) {
1424
+ n.length = t.length;
1425
+ for (var o = 0; o < t.length; o++)
1426
+ n[o] = G(t, o) ? e(t[o], t) : "";
1427
+ }
1428
+ var a = typeof Be == "function" ? Be(t) : [], i;
1429
+ if (re) {
1430
+ i = {};
1431
+ for (var l = 0; l < a.length; l++)
1432
+ i["$" + a[l]] = a[l];
1433
+ }
1434
+ for (var s in t)
1435
+ G(t, s) && (r && String(Number(s)) === s && s < t.length || re && i["$" + s] instanceof Symbol || (pr.call(/[^\w$]/, s) ? n.push(e(s, t) + ": " + e(t[s], t)) : n.push(s + ": " + e(t[s], t))));
1436
+ if (typeof Be == "function")
1437
+ for (var f = 0; f < a.length; f++)
1438
+ dr.call(t, a[f]) && n.push("[" + e(a[f]) + "]: " + e(t[a[f]], t));
1439
+ return n;
1440
+ }
1441
+ var Vo = Ce, zo = oe, Ne = function(t, e, r) {
1442
+ for (var n = t, o; (o = n.next) != null; n = o)
1443
+ if (o.key === e)
1444
+ return n.next = o.next, r || (o.next = /** @type {NonNullable<typeof list.next>} */
1445
+ t.next, t.next = o), o;
1446
+ }, Ko = function(t, e) {
1447
+ if (t) {
1448
+ var r = Ne(t, e);
1449
+ return r && r.value;
1450
+ }
1451
+ }, Yo = function(t, e, r) {
1452
+ var n = Ne(t, e);
1453
+ n ? n.value = r : t.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */
1454
+ {
1455
+ // eslint-disable-line no-param-reassign, no-extra-parens
1456
+ key: e,
1457
+ next: t.next,
1458
+ value: r
1459
+ };
1460
+ }, Qo = function(t, e) {
1461
+ return t ? !!Ne(t, e) : !1;
1462
+ }, Jo = function(t, e) {
1463
+ if (t)
1464
+ return Ne(t, e, !0);
1465
+ }, Zo = function() {
1466
+ var e, r = {
1467
+ assert: function(n) {
1468
+ if (!r.has(n))
1469
+ throw new zo("Side channel does not contain " + Vo(n));
1470
+ },
1471
+ delete: function(n) {
1472
+ var o = e && e.next, a = Jo(e, n);
1473
+ return a && o && o === a && (e = void 0), !!a;
1474
+ },
1475
+ get: function(n) {
1476
+ return Ko(e, n);
1477
+ },
1478
+ has: function(n) {
1479
+ return Qo(e, n);
1480
+ },
1481
+ set: function(n, o) {
1482
+ e || (e = {
1483
+ next: void 0
1484
+ }), Yo(
1485
+ /** @type {NonNullable<typeof $o>} */
1486
+ e,
1487
+ n,
1488
+ o
1489
+ );
1490
+ }
1491
+ };
1492
+ return r;
1493
+ }, _r = Object, ea = Error, ta = EvalError, ra = RangeError, na = ReferenceError, oa = SyntaxError, aa = URIError, ia = Math.abs, la = Math.floor, ca = Math.max, sa = Math.min, ua = Math.pow, fa = Math.round, pa = Number.isNaN || function(e) {
1494
+ return e !== e;
1495
+ }, da = pa, ya = function(e) {
1496
+ return da(e) || e === 0 ? e : e < 0 ? -1 : 1;
1497
+ }, va = Object.getOwnPropertyDescriptor, Se = va;
1498
+ if (Se)
1499
+ try {
1500
+ Se([], "length");
1501
+ } catch {
1502
+ Se = null;
1503
+ }
1504
+ var Er = Se, Ae = Object.defineProperty || !1;
1505
+ if (Ae)
1506
+ try {
1507
+ Ae({}, "a", { value: 1 });
1508
+ } catch {
1509
+ Ae = !1;
1510
+ }
1511
+ var ma = Ae, ke, jt;
1512
+ function ga() {
1513
+ return jt || (jt = 1, ke = function() {
1514
+ if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
1515
+ return !1;
1516
+ if (typeof Symbol.iterator == "symbol")
1517
+ return !0;
1518
+ var e = {}, r = Symbol("test"), n = Object(r);
1519
+ if (typeof r == "string" || Object.prototype.toString.call(r) !== "[object Symbol]" || Object.prototype.toString.call(n) !== "[object Symbol]")
1520
+ return !1;
1521
+ var o = 42;
1522
+ e[r] = o;
1523
+ for (var a in e)
1524
+ return !1;
1525
+ if (typeof Object.keys == "function" && Object.keys(e).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(e).length !== 0)
1526
+ return !1;
1527
+ var i = Object.getOwnPropertySymbols(e);
1528
+ if (i.length !== 1 || i[0] !== r || !Object.prototype.propertyIsEnumerable.call(e, r))
1529
+ return !1;
1530
+ if (typeof Object.getOwnPropertyDescriptor == "function") {
1531
+ var l = (
1532
+ /** @type {PropertyDescriptor} */
1533
+ Object.getOwnPropertyDescriptor(e, r)
1534
+ );
1535
+ if (l.value !== o || l.enumerable !== !0)
1536
+ return !1;
1537
+ }
1538
+ return !0;
1539
+ }), ke;
1540
+ }
1541
+ var je, Ht;
1542
+ function ha() {
1543
+ if (Ht) return je;
1544
+ Ht = 1;
1545
+ var t = typeof Symbol < "u" && Symbol, e = ga();
1546
+ return je = function() {
1547
+ return typeof t != "function" || typeof Symbol != "function" || typeof t("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : e();
1548
+ }, je;
1549
+ }
1550
+ var He, qt;
1551
+ function Sr() {
1552
+ return qt || (qt = 1, He = typeof Reflect < "u" && Reflect.getPrototypeOf || null), He;
1553
+ }
1554
+ var qe, Xt;
1555
+ function Ar() {
1556
+ if (Xt) return qe;
1557
+ Xt = 1;
1558
+ var t = _r;
1559
+ return qe = t.getPrototypeOf || null, qe;
1560
+ }
1561
+ var Xe, Wt;
1562
+ function _a() {
1563
+ if (Wt) return Xe;
1564
+ Wt = 1;
1565
+ var t = "Function.prototype.bind called on incompatible ", e = Object.prototype.toString, r = Math.max, n = "[object Function]", o = function(s, f) {
1566
+ for (var c = [], p = 0; p < s.length; p += 1)
1567
+ c[p] = s[p];
1568
+ for (var u = 0; u < f.length; u += 1)
1569
+ c[u + s.length] = f[u];
1570
+ return c;
1571
+ }, a = function(s, f) {
1572
+ for (var c = [], p = f, u = 0; p < s.length; p += 1, u += 1)
1573
+ c[u] = s[p];
1574
+ return c;
1575
+ }, i = function(l, s) {
1576
+ for (var f = "", c = 0; c < l.length; c += 1)
1577
+ f += l[c], c + 1 < l.length && (f += s);
1578
+ return f;
1579
+ };
1580
+ return Xe = function(s) {
1581
+ var f = this;
1582
+ if (typeof f != "function" || e.apply(f) !== n)
1583
+ throw new TypeError(t + f);
1584
+ for (var c = a(arguments, 1), p, u = function() {
1585
+ if (this instanceof p) {
1586
+ var b = f.apply(
1587
+ this,
1588
+ o(c, arguments)
1589
+ );
1590
+ return Object(b) === b ? b : this;
1591
+ }
1592
+ return f.apply(
1593
+ s,
1594
+ o(c, arguments)
1595
+ );
1596
+ }, y = r(0, f.length - c.length), d = [], g = 0; g < y; g++)
1597
+ d[g] = "$" + g;
1598
+ if (p = Function("binder", "return function (" + i(d, ",") + "){ return binder.apply(this,arguments); }")(u), f.prototype) {
1599
+ var h = function() {
1600
+ };
1601
+ h.prototype = f.prototype, p.prototype = new h(), h.prototype = null;
1602
+ }
1603
+ return p;
1604
+ }, Xe;
1605
+ }
1606
+ var We, Vt;
1607
+ function De() {
1608
+ if (Vt) return We;
1609
+ Vt = 1;
1610
+ var t = _a();
1611
+ return We = Function.prototype.bind || t, We;
1612
+ }
1613
+ var Ve, zt;
1614
+ function ht() {
1615
+ return zt || (zt = 1, Ve = Function.prototype.call), Ve;
1616
+ }
1617
+ var ze, Kt;
1618
+ function br() {
1619
+ return Kt || (Kt = 1, ze = Function.prototype.apply), ze;
1620
+ }
1621
+ var Ea = typeof Reflect < "u" && Reflect && Reflect.apply, Sa = De(), Aa = br(), ba = ht(), Oa = Ea, Pa = Oa || Sa.call(ba, Aa), Ra = De(), Ia = oe, wa = ht(), Ta = Pa, Or = function(e) {
1622
+ if (e.length < 1 || typeof e[0] != "function")
1623
+ throw new Ia("a function is required");
1624
+ return Ta(Ra, wa, e);
1625
+ }, Ke, Yt;
1626
+ function Ca() {
1627
+ if (Yt) return Ke;
1628
+ Yt = 1;
1629
+ var t = Or, e = Er, r;
1630
+ try {
1631
+ r = /** @type {{ __proto__?: typeof Array.prototype }} */
1632
+ [].__proto__ === Array.prototype;
1633
+ } catch (i) {
1634
+ if (!i || typeof i != "object" || !("code" in i) || i.code !== "ERR_PROTO_ACCESS")
1635
+ throw i;
1636
+ }
1637
+ var n = !!r && e && e(
1638
+ Object.prototype,
1639
+ /** @type {keyof typeof Object.prototype} */
1640
+ "__proto__"
1641
+ ), o = Object, a = o.getPrototypeOf;
1642
+ return Ke = n && typeof n.get == "function" ? t([n.get]) : typeof a == "function" ? (
1643
+ /** @type {import('./get')} */
1644
+ function(l) {
1645
+ return a(l == null ? l : o(l));
1646
+ }
1647
+ ) : !1, Ke;
1648
+ }
1649
+ var Ye, Qt;
1650
+ function Na() {
1651
+ if (Qt) return Ye;
1652
+ Qt = 1;
1653
+ var t = Sr(), e = Ar(), r = Ca();
1654
+ return Ye = t ? function(o) {
1655
+ return t(o);
1656
+ } : e ? function(o) {
1657
+ if (!o || typeof o != "object" && typeof o != "function")
1658
+ throw new TypeError("getProto: not an object");
1659
+ return e(o);
1660
+ } : r ? function(o) {
1661
+ return r(o);
1662
+ } : null, Ye;
1663
+ }
1664
+ var Qe, Jt;
1665
+ function Da() {
1666
+ if (Jt) return Qe;
1667
+ Jt = 1;
1668
+ var t = Function.prototype.call, e = Object.prototype.hasOwnProperty, r = De();
1669
+ return Qe = r.call(t, e), Qe;
1670
+ }
1671
+ var v, xa = _r, Fa = ea, Ma = ta, $a = ra, La = na, ne = oa, te = oe, Ua = aa, Ba = ia, Ga = la, ka = ca, ja = sa, Ha = ua, qa = fa, Xa = ya, Pr = Function, Je = function(t) {
1672
+ try {
1673
+ return Pr('"use strict"; return (' + t + ").constructor;")();
1674
+ } catch {
1675
+ }
1676
+ }, de = Er, Wa = ma, Ze = function() {
1677
+ throw new te();
1678
+ }, Va = de ? function() {
1679
+ try {
1680
+ return arguments.callee, Ze;
1681
+ } catch {
1682
+ try {
1683
+ return de(arguments, "callee").get;
1684
+ } catch {
1685
+ return Ze;
1686
+ }
1687
+ }
1688
+ }() : Ze, J = ha()(), A = Na(), za = Ar(), Ka = Sr(), Rr = br(), ye = ht(), ee = {}, Ya = typeof Uint8Array > "u" || !A ? v : A(Uint8Array), K = {
1689
+ __proto__: null,
1690
+ "%AggregateError%": typeof AggregateError > "u" ? v : AggregateError,
1691
+ "%Array%": Array,
1692
+ "%ArrayBuffer%": typeof ArrayBuffer > "u" ? v : ArrayBuffer,
1693
+ "%ArrayIteratorPrototype%": J && A ? A([][Symbol.iterator]()) : v,
1694
+ "%AsyncFromSyncIteratorPrototype%": v,
1695
+ "%AsyncFunction%": ee,
1696
+ "%AsyncGenerator%": ee,
1697
+ "%AsyncGeneratorFunction%": ee,
1698
+ "%AsyncIteratorPrototype%": ee,
1699
+ "%Atomics%": typeof Atomics > "u" ? v : Atomics,
1700
+ "%BigInt%": typeof BigInt > "u" ? v : BigInt,
1701
+ "%BigInt64Array%": typeof BigInt64Array > "u" ? v : BigInt64Array,
1702
+ "%BigUint64Array%": typeof BigUint64Array > "u" ? v : BigUint64Array,
1703
+ "%Boolean%": Boolean,
1704
+ "%DataView%": typeof DataView > "u" ? v : DataView,
1705
+ "%Date%": Date,
1706
+ "%decodeURI%": decodeURI,
1707
+ "%decodeURIComponent%": decodeURIComponent,
1708
+ "%encodeURI%": encodeURI,
1709
+ "%encodeURIComponent%": encodeURIComponent,
1710
+ "%Error%": Fa,
1711
+ "%eval%": eval,
1712
+ // eslint-disable-line no-eval
1713
+ "%EvalError%": Ma,
1714
+ "%Float16Array%": typeof Float16Array > "u" ? v : Float16Array,
1715
+ "%Float32Array%": typeof Float32Array > "u" ? v : Float32Array,
1716
+ "%Float64Array%": typeof Float64Array > "u" ? v : Float64Array,
1717
+ "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? v : FinalizationRegistry,
1718
+ "%Function%": Pr,
1719
+ "%GeneratorFunction%": ee,
1720
+ "%Int8Array%": typeof Int8Array > "u" ? v : Int8Array,
1721
+ "%Int16Array%": typeof Int16Array > "u" ? v : Int16Array,
1722
+ "%Int32Array%": typeof Int32Array > "u" ? v : Int32Array,
1723
+ "%isFinite%": isFinite,
1724
+ "%isNaN%": isNaN,
1725
+ "%IteratorPrototype%": J && A ? A(A([][Symbol.iterator]())) : v,
1726
+ "%JSON%": typeof JSON == "object" ? JSON : v,
1727
+ "%Map%": typeof Map > "u" ? v : Map,
1728
+ "%MapIteratorPrototype%": typeof Map > "u" || !J || !A ? v : A((/* @__PURE__ */ new Map())[Symbol.iterator]()),
1729
+ "%Math%": Math,
1730
+ "%Number%": Number,
1731
+ "%Object%": xa,
1732
+ "%Object.getOwnPropertyDescriptor%": de,
1733
+ "%parseFloat%": parseFloat,
1734
+ "%parseInt%": parseInt,
1735
+ "%Promise%": typeof Promise > "u" ? v : Promise,
1736
+ "%Proxy%": typeof Proxy > "u" ? v : Proxy,
1737
+ "%RangeError%": $a,
1738
+ "%ReferenceError%": La,
1739
+ "%Reflect%": typeof Reflect > "u" ? v : Reflect,
1740
+ "%RegExp%": RegExp,
1741
+ "%Set%": typeof Set > "u" ? v : Set,
1742
+ "%SetIteratorPrototype%": typeof Set > "u" || !J || !A ? v : A((/* @__PURE__ */ new Set())[Symbol.iterator]()),
1743
+ "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? v : SharedArrayBuffer,
1744
+ "%String%": String,
1745
+ "%StringIteratorPrototype%": J && A ? A(""[Symbol.iterator]()) : v,
1746
+ "%Symbol%": J ? Symbol : v,
1747
+ "%SyntaxError%": ne,
1748
+ "%ThrowTypeError%": Va,
1749
+ "%TypedArray%": Ya,
1750
+ "%TypeError%": te,
1751
+ "%Uint8Array%": typeof Uint8Array > "u" ? v : Uint8Array,
1752
+ "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? v : Uint8ClampedArray,
1753
+ "%Uint16Array%": typeof Uint16Array > "u" ? v : Uint16Array,
1754
+ "%Uint32Array%": typeof Uint32Array > "u" ? v : Uint32Array,
1755
+ "%URIError%": Ua,
1756
+ "%WeakMap%": typeof WeakMap > "u" ? v : WeakMap,
1757
+ "%WeakRef%": typeof WeakRef > "u" ? v : WeakRef,
1758
+ "%WeakSet%": typeof WeakSet > "u" ? v : WeakSet,
1759
+ "%Function.prototype.call%": ye,
1760
+ "%Function.prototype.apply%": Rr,
1761
+ "%Object.defineProperty%": Wa,
1762
+ "%Object.getPrototypeOf%": za,
1763
+ "%Math.abs%": Ba,
1764
+ "%Math.floor%": Ga,
1765
+ "%Math.max%": ka,
1766
+ "%Math.min%": ja,
1767
+ "%Math.pow%": Ha,
1768
+ "%Math.round%": qa,
1769
+ "%Math.sign%": Xa,
1770
+ "%Reflect.getPrototypeOf%": Ka
1771
+ };
1772
+ if (A)
1773
+ try {
1774
+ null.error;
1775
+ } catch (t) {
1776
+ var Qa = A(A(t));
1777
+ K["%Error.prototype%"] = Qa;
1778
+ }
1779
+ var Ja = function t(e) {
1780
+ var r;
1781
+ if (e === "%AsyncFunction%")
1782
+ r = Je("async function () {}");
1783
+ else if (e === "%GeneratorFunction%")
1784
+ r = Je("function* () {}");
1785
+ else if (e === "%AsyncGeneratorFunction%")
1786
+ r = Je("async function* () {}");
1787
+ else if (e === "%AsyncGenerator%") {
1788
+ var n = t("%AsyncGeneratorFunction%");
1789
+ n && (r = n.prototype);
1790
+ } else if (e === "%AsyncIteratorPrototype%") {
1791
+ var o = t("%AsyncGenerator%");
1792
+ o && A && (r = A(o.prototype));
1793
+ }
1794
+ return K[e] = r, r;
1795
+ }, Zt = {
1796
+ __proto__: null,
1797
+ "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
1798
+ "%ArrayPrototype%": ["Array", "prototype"],
1799
+ "%ArrayProto_entries%": ["Array", "prototype", "entries"],
1800
+ "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
1801
+ "%ArrayProto_keys%": ["Array", "prototype", "keys"],
1802
+ "%ArrayProto_values%": ["Array", "prototype", "values"],
1803
+ "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
1804
+ "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
1805
+ "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
1806
+ "%BooleanPrototype%": ["Boolean", "prototype"],
1807
+ "%DataViewPrototype%": ["DataView", "prototype"],
1808
+ "%DatePrototype%": ["Date", "prototype"],
1809
+ "%ErrorPrototype%": ["Error", "prototype"],
1810
+ "%EvalErrorPrototype%": ["EvalError", "prototype"],
1811
+ "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
1812
+ "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
1813
+ "%FunctionPrototype%": ["Function", "prototype"],
1814
+ "%Generator%": ["GeneratorFunction", "prototype"],
1815
+ "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
1816
+ "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
1817
+ "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
1818
+ "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
1819
+ "%JSONParse%": ["JSON", "parse"],
1820
+ "%JSONStringify%": ["JSON", "stringify"],
1821
+ "%MapPrototype%": ["Map", "prototype"],
1822
+ "%NumberPrototype%": ["Number", "prototype"],
1823
+ "%ObjectPrototype%": ["Object", "prototype"],
1824
+ "%ObjProto_toString%": ["Object", "prototype", "toString"],
1825
+ "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
1826
+ "%PromisePrototype%": ["Promise", "prototype"],
1827
+ "%PromiseProto_then%": ["Promise", "prototype", "then"],
1828
+ "%Promise_all%": ["Promise", "all"],
1829
+ "%Promise_reject%": ["Promise", "reject"],
1830
+ "%Promise_resolve%": ["Promise", "resolve"],
1831
+ "%RangeErrorPrototype%": ["RangeError", "prototype"],
1832
+ "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
1833
+ "%RegExpPrototype%": ["RegExp", "prototype"],
1834
+ "%SetPrototype%": ["Set", "prototype"],
1835
+ "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
1836
+ "%StringPrototype%": ["String", "prototype"],
1837
+ "%SymbolPrototype%": ["Symbol", "prototype"],
1838
+ "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
1839
+ "%TypedArrayPrototype%": ["TypedArray", "prototype"],
1840
+ "%TypeErrorPrototype%": ["TypeError", "prototype"],
1841
+ "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
1842
+ "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
1843
+ "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
1844
+ "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
1845
+ "%URIErrorPrototype%": ["URIError", "prototype"],
1846
+ "%WeakMapPrototype%": ["WeakMap", "prototype"],
1847
+ "%WeakSetPrototype%": ["WeakSet", "prototype"]
1848
+ }, ve = De(), Ie = Da(), Za = ve.call(ye, Array.prototype.concat), ei = ve.call(Rr, Array.prototype.splice), er = ve.call(ye, String.prototype.replace), we = ve.call(ye, String.prototype.slice), ti = ve.call(ye, RegExp.prototype.exec), ri = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, ni = /\\(\\)?/g, oi = function(e) {
1849
+ var r = we(e, 0, 1), n = we(e, -1);
1850
+ if (r === "%" && n !== "%")
1851
+ throw new ne("invalid intrinsic syntax, expected closing `%`");
1852
+ if (n === "%" && r !== "%")
1853
+ throw new ne("invalid intrinsic syntax, expected opening `%`");
1854
+ var o = [];
1855
+ return er(e, ri, function(a, i, l, s) {
1856
+ o[o.length] = l ? er(s, ni, "$1") : i || a;
1857
+ }), o;
1858
+ }, ai = function(e, r) {
1859
+ var n = e, o;
1860
+ if (Ie(Zt, n) && (o = Zt[n], n = "%" + o[0] + "%"), Ie(K, n)) {
1861
+ var a = K[n];
1862
+ if (a === ee && (a = Ja(n)), typeof a > "u" && !r)
1863
+ throw new te("intrinsic " + e + " exists, but is not available. Please file an issue!");
1864
+ return {
1865
+ alias: o,
1866
+ name: n,
1867
+ value: a
1868
+ };
1869
+ }
1870
+ throw new ne("intrinsic " + e + " does not exist!");
1871
+ }, _t = function(e, r) {
1872
+ if (typeof e != "string" || e.length === 0)
1873
+ throw new te("intrinsic name must be a non-empty string");
1874
+ if (arguments.length > 1 && typeof r != "boolean")
1875
+ throw new te('"allowMissing" argument must be a boolean');
1876
+ if (ti(/^%?[^%]*%?$/, e) === null)
1877
+ throw new ne("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
1878
+ var n = oi(e), o = n.length > 0 ? n[0] : "", a = ai("%" + o + "%", r), i = a.name, l = a.value, s = !1, f = a.alias;
1879
+ f && (o = f[0], ei(n, Za([0, 1], f)));
1880
+ for (var c = 1, p = !0; c < n.length; c += 1) {
1881
+ var u = n[c], y = we(u, 0, 1), d = we(u, -1);
1882
+ if ((y === '"' || y === "'" || y === "`" || d === '"' || d === "'" || d === "`") && y !== d)
1883
+ throw new ne("property names with quotes must have matching quotes");
1884
+ if ((u === "constructor" || !p) && (s = !0), o += "." + u, i = "%" + o + "%", Ie(K, i))
1885
+ l = K[i];
1886
+ else if (l != null) {
1887
+ if (!(u in l)) {
1888
+ if (!r)
1889
+ throw new te("base intrinsic for " + e + " exists, but the property is not available.");
1890
+ return;
1891
+ }
1892
+ if (de && c + 1 >= n.length) {
1893
+ var g = de(l, u);
1894
+ p = !!g, p && "get" in g && !("originalValue" in g.get) ? l = g.get : l = l[u];
1895
+ } else
1896
+ p = Ie(l, u), l = l[u];
1897
+ p && !s && (K[i] = l);
1898
+ }
1899
+ }
1900
+ return l;
1901
+ }, Ir = _t, wr = Or, ii = wr([Ir("%String.prototype.indexOf%")]), Tr = function(e, r) {
1902
+ var n = (
1903
+ /** @type {(this: unknown, ...args: unknown[]) => unknown} */
1904
+ Ir(e, !!r)
1905
+ );
1906
+ return typeof n == "function" && ii(e, ".prototype.") > -1 ? wr(
1907
+ /** @type {const} */
1908
+ [n]
1909
+ ) : n;
1910
+ }, li = _t, me = Tr, ci = Ce, si = oe, tr = li("%Map%", !0), ui = me("Map.prototype.get", !0), fi = me("Map.prototype.set", !0), pi = me("Map.prototype.has", !0), di = me("Map.prototype.delete", !0), yi = me("Map.prototype.size", !0), Cr = !!tr && /** @type {Exclude<import('.'), false>} */
1911
+ function() {
1912
+ var e, r = {
1913
+ assert: function(n) {
1914
+ if (!r.has(n))
1915
+ throw new si("Side channel does not contain " + ci(n));
1916
+ },
1917
+ delete: function(n) {
1918
+ if (e) {
1919
+ var o = di(e, n);
1920
+ return yi(e) === 0 && (e = void 0), o;
1921
+ }
1922
+ return !1;
1923
+ },
1924
+ get: function(n) {
1925
+ if (e)
1926
+ return ui(e, n);
1927
+ },
1928
+ has: function(n) {
1929
+ return e ? pi(e, n) : !1;
1930
+ },
1931
+ set: function(n, o) {
1932
+ e || (e = new tr()), fi(e, n, o);
1933
+ }
1934
+ };
1935
+ return r;
1936
+ }, vi = _t, xe = Tr, mi = Ce, Ee = Cr, gi = oe, Z = vi("%WeakMap%", !0), hi = xe("WeakMap.prototype.get", !0), _i = xe("WeakMap.prototype.set", !0), Ei = xe("WeakMap.prototype.has", !0), Si = xe("WeakMap.prototype.delete", !0), Ai = Z ? (
1937
+ /** @type {Exclude<import('.'), false>} */
1938
+ function() {
1939
+ var e, r, n = {
1940
+ assert: function(o) {
1941
+ if (!n.has(o))
1942
+ throw new gi("Side channel does not contain " + mi(o));
1943
+ },
1944
+ delete: function(o) {
1945
+ if (Z && o && (typeof o == "object" || typeof o == "function")) {
1946
+ if (e)
1947
+ return Si(e, o);
1948
+ } else if (Ee && r)
1949
+ return r.delete(o);
1950
+ return !1;
1951
+ },
1952
+ get: function(o) {
1953
+ return Z && o && (typeof o == "object" || typeof o == "function") && e ? hi(e, o) : r && r.get(o);
1954
+ },
1955
+ has: function(o) {
1956
+ return Z && o && (typeof o == "object" || typeof o == "function") && e ? Ei(e, o) : !!r && r.has(o);
1957
+ },
1958
+ set: function(o, a) {
1959
+ Z && o && (typeof o == "object" || typeof o == "function") ? (e || (e = new Z()), _i(e, o, a)) : Ee && (r || (r = Ee()), r.set(o, a));
1960
+ }
1961
+ };
1962
+ return n;
1963
+ }
1964
+ ) : Ee, bi = oe, Oi = Ce, Pi = Zo, Ri = Cr, Ii = Ai, wi = Ii || Ri || Pi, Nr = function() {
1965
+ var e, r = {
1966
+ assert: function(n) {
1967
+ if (!r.has(n))
1968
+ throw new bi("Side channel does not contain " + Oi(n));
1969
+ },
1970
+ delete: function(n) {
1971
+ return !!e && e.delete(n);
1972
+ },
1973
+ get: function(n) {
1974
+ return e && e.get(n);
1975
+ },
1976
+ has: function(n) {
1977
+ return !!e && e.has(n);
1978
+ },
1979
+ set: function(n, o) {
1980
+ e || (e = wi()), e.set(n, o);
1981
+ }
1982
+ };
1983
+ return r;
1984
+ }, Ti = String.prototype.replace, Ci = /%20/g, et = {
1985
+ RFC1738: "RFC1738",
1986
+ RFC3986: "RFC3986"
1987
+ }, Et = {
1988
+ default: et.RFC3986,
1989
+ formatters: {
1990
+ RFC1738: function(t) {
1991
+ return Ti.call(t, Ci, "+");
1992
+ },
1993
+ RFC3986: function(t) {
1994
+ return String(t);
1995
+ }
1996
+ },
1997
+ RFC1738: et.RFC1738,
1998
+ RFC3986: et.RFC3986
1999
+ }, Ni = Et, Di = Nr, tt = Object.prototype.hasOwnProperty, z = Array.isArray, Fe = Di(), Dr = function(e, r) {
2000
+ return Fe.set(e, r), e;
2001
+ }, Te = function(e) {
2002
+ return Fe.has(e);
2003
+ }, ft = function(e) {
2004
+ return Fe.get(e);
2005
+ }, xr = function(e, r) {
2006
+ Fe.set(e, r);
2007
+ }, x = function() {
2008
+ for (var t = [], e = 0; e < 256; ++e)
2009
+ t.push("%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase());
2010
+ return t;
2011
+ }(), xi = function(e) {
2012
+ for (; e.length > 1; ) {
2013
+ var r = e.pop(), n = r.obj[r.prop];
2014
+ if (z(n)) {
2015
+ for (var o = [], a = 0; a < n.length; ++a)
2016
+ typeof n[a] < "u" && o.push(n[a]);
2017
+ r.obj[r.prop] = o;
2018
+ }
2019
+ }
2020
+ }, St = function(e, r) {
2021
+ for (var n = r && r.plainObjects ? { __proto__: null } : {}, o = 0; o < e.length; ++o)
2022
+ typeof e[o] < "u" && (n[o] = e[o]);
2023
+ return n;
2024
+ }, Fi = function t(e, r, n) {
2025
+ if (!r)
2026
+ return e;
2027
+ if (typeof r != "object" && typeof r != "function") {
2028
+ if (z(e))
2029
+ e.push(r);
2030
+ else if (e && typeof e == "object")
2031
+ if (Te(e)) {
2032
+ var o = ft(e) + 1;
2033
+ e[o] = r, xr(e, o);
2034
+ } else (n && (n.plainObjects || n.allowPrototypes) || !tt.call(Object.prototype, r)) && (e[r] = !0);
2035
+ else
2036
+ return [e, r];
2037
+ return e;
2038
+ }
2039
+ if (!e || typeof e != "object") {
2040
+ if (Te(r)) {
2041
+ for (var a = Object.keys(r), i = n && n.plainObjects ? { __proto__: null, 0: e } : { 0: e }, l = 0; l < a.length; l++) {
2042
+ var s = parseInt(a[l], 10);
2043
+ i[s + 1] = r[a[l]];
2044
+ }
2045
+ return Dr(i, ft(r) + 1);
2046
+ }
2047
+ return [e].concat(r);
2048
+ }
2049
+ var f = e;
2050
+ return z(e) && !z(r) && (f = St(e, n)), z(e) && z(r) ? (r.forEach(function(c, p) {
2051
+ if (tt.call(e, p)) {
2052
+ var u = e[p];
2053
+ u && typeof u == "object" && c && typeof c == "object" ? e[p] = t(u, c, n) : e.push(c);
2054
+ } else
2055
+ e[p] = c;
2056
+ }), e) : Object.keys(r).reduce(function(c, p) {
2057
+ var u = r[p];
2058
+ return tt.call(c, p) ? c[p] = t(c[p], u, n) : c[p] = u, c;
2059
+ }, f);
2060
+ }, Mi = function(e, r) {
2061
+ return Object.keys(r).reduce(function(n, o) {
2062
+ return n[o] = r[o], n;
2063
+ }, e);
2064
+ }, $i = function(t, e, r) {
2065
+ var n = t.replace(/\+/g, " ");
2066
+ if (r === "iso-8859-1")
2067
+ return n.replace(/%[0-9a-f]{2}/gi, unescape);
2068
+ try {
2069
+ return decodeURIComponent(n);
2070
+ } catch {
2071
+ return n;
2072
+ }
2073
+ }, rt = 1024, Li = function(e, r, n, o, a) {
2074
+ if (e.length === 0)
2075
+ return e;
2076
+ var i = e;
2077
+ if (typeof e == "symbol" ? i = Symbol.prototype.toString.call(e) : typeof e != "string" && (i = String(e)), n === "iso-8859-1")
2078
+ return escape(i).replace(/%u[0-9a-f]{4}/gi, function(y) {
2079
+ return "%26%23" + parseInt(y.slice(2), 16) + "%3B";
2080
+ });
2081
+ for (var l = "", s = 0; s < i.length; s += rt) {
2082
+ for (var f = i.length >= rt ? i.slice(s, s + rt) : i, c = [], p = 0; p < f.length; ++p) {
2083
+ var u = f.charCodeAt(p);
2084
+ if (u === 45 || u === 46 || u === 95 || u === 126 || u >= 48 && u <= 57 || u >= 65 && u <= 90 || u >= 97 && u <= 122 || a === Ni.RFC1738 && (u === 40 || u === 41)) {
2085
+ c[c.length] = f.charAt(p);
2086
+ continue;
2087
+ }
2088
+ if (u < 128) {
2089
+ c[c.length] = x[u];
2090
+ continue;
2091
+ }
2092
+ if (u < 2048) {
2093
+ c[c.length] = x[192 | u >> 6] + x[128 | u & 63];
2094
+ continue;
2095
+ }
2096
+ if (u < 55296 || u >= 57344) {
2097
+ c[c.length] = x[224 | u >> 12] + x[128 | u >> 6 & 63] + x[128 | u & 63];
2098
+ continue;
2099
+ }
2100
+ p += 1, u = 65536 + ((u & 1023) << 10 | f.charCodeAt(p) & 1023), c[c.length] = x[240 | u >> 18] + x[128 | u >> 12 & 63] + x[128 | u >> 6 & 63] + x[128 | u & 63];
2101
+ }
2102
+ l += c.join("");
2103
+ }
2104
+ return l;
2105
+ }, Ui = function(e) {
2106
+ for (var r = [{ obj: { o: e }, prop: "o" }], n = [], o = 0; o < r.length; ++o)
2107
+ for (var a = r[o], i = a.obj[a.prop], l = Object.keys(i), s = 0; s < l.length; ++s) {
2108
+ var f = l[s], c = i[f];
2109
+ typeof c == "object" && c !== null && n.indexOf(c) === -1 && (r.push({ obj: i, prop: f }), n.push(c));
2110
+ }
2111
+ return xi(r), e;
2112
+ }, Bi = function(e) {
2113
+ return Object.prototype.toString.call(e) === "[object RegExp]";
2114
+ }, Gi = function(e) {
2115
+ return !e || typeof e != "object" ? !1 : !!(e.constructor && e.constructor.isBuffer && e.constructor.isBuffer(e));
2116
+ }, ki = function(e, r, n, o) {
2117
+ if (Te(e)) {
2118
+ var a = ft(e) + 1;
2119
+ return e[a] = r, xr(e, a), e;
2120
+ }
2121
+ var i = [].concat(e, r);
2122
+ return i.length > n ? Dr(St(i, { plainObjects: o }), i.length - 1) : i;
2123
+ }, ji = function(e, r) {
2124
+ if (z(e)) {
2125
+ for (var n = [], o = 0; o < e.length; o += 1)
2126
+ n.push(r(e[o]));
2127
+ return n;
2128
+ }
2129
+ return r(e);
2130
+ }, Fr = {
2131
+ arrayToObject: St,
2132
+ assign: Mi,
2133
+ combine: ki,
2134
+ compact: Ui,
2135
+ decode: $i,
2136
+ encode: Li,
2137
+ isBuffer: Gi,
2138
+ isOverflow: Te,
2139
+ isRegExp: Bi,
2140
+ maybeMap: ji,
2141
+ merge: Fi
2142
+ }, Mr = Nr, be = Fr, pe = Et, Hi = Object.prototype.hasOwnProperty, $r = {
2143
+ brackets: function(e) {
2144
+ return e + "[]";
2145
+ },
2146
+ comma: "comma",
2147
+ indices: function(e, r) {
2148
+ return e + "[" + r + "]";
2149
+ },
2150
+ repeat: function(e) {
2151
+ return e;
2152
+ }
2153
+ }, F = Array.isArray, qi = Array.prototype.push, Lr = function(t, e) {
2154
+ qi.apply(t, F(e) ? e : [e]);
2155
+ }, Xi = Date.prototype.toISOString, rr = pe.default, E = {
2156
+ addQueryPrefix: !1,
2157
+ allowDots: !1,
2158
+ allowEmptyArrays: !1,
2159
+ arrayFormat: "indices",
2160
+ charset: "utf-8",
2161
+ charsetSentinel: !1,
2162
+ commaRoundTrip: !1,
2163
+ delimiter: "&",
2164
+ encode: !0,
2165
+ encodeDotInKeys: !1,
2166
+ encoder: be.encode,
2167
+ encodeValuesOnly: !1,
2168
+ filter: void 0,
2169
+ format: rr,
2170
+ formatter: pe.formatters[rr],
2171
+ // deprecated
2172
+ indices: !1,
2173
+ serializeDate: function(e) {
2174
+ return Xi.call(e);
2175
+ },
2176
+ skipNulls: !1,
2177
+ strictNullHandling: !1
2178
+ }, Wi = function(e) {
2179
+ return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "symbol" || typeof e == "bigint";
2180
+ }, nt = {}, Vi = function t(e, r, n, o, a, i, l, s, f, c, p, u, y, d, g, h, b, P) {
2181
+ for (var m = e, R = P, I = 0, $ = !1; (R = R.get(nt)) !== void 0 && !$; ) {
2182
+ var C = R.get(e);
2183
+ if (I += 1, typeof C < "u") {
2184
+ if (C === I)
2185
+ throw new RangeError("Cyclic object value");
2186
+ $ = !0;
2187
+ }
2188
+ typeof R.get(nt) > "u" && (I = 0);
2189
+ }
2190
+ if (typeof c == "function" ? m = c(r, m) : m instanceof Date ? m = y(m) : n === "comma" && F(m) && (m = be.maybeMap(m, function(ie) {
2191
+ return ie instanceof Date ? y(ie) : ie;
2192
+ })), m === null) {
2193
+ if (i)
2194
+ return f && !h ? f(r, E.encoder, b, "key", d) : r;
2195
+ m = "";
2196
+ }
2197
+ if (Wi(m) || be.isBuffer(m)) {
2198
+ if (f) {
2199
+ var k = h ? r : f(r, E.encoder, b, "key", d);
2200
+ return [g(k) + "=" + g(f(m, E.encoder, b, "value", d))];
2201
+ }
2202
+ return [g(r) + "=" + g(String(m))];
2203
+ }
2204
+ var L = [];
2205
+ if (typeof m > "u")
2206
+ return L;
2207
+ var N;
2208
+ if (n === "comma" && F(m))
2209
+ h && f && (m = be.maybeMap(m, f)), N = [{ value: m.length > 0 ? m.join(",") || null : void 0 }];
2210
+ else if (F(c))
2211
+ N = c;
2212
+ else {
2213
+ var Q = Object.keys(m);
2214
+ N = p ? Q.sort(p) : Q;
2215
+ }
2216
+ var j = s ? String(r).replace(/\./g, "%2E") : String(r), O = o && F(m) && m.length === 1 ? j + "[]" : j;
2217
+ if (a && F(m) && m.length === 0)
2218
+ return O + "[]";
2219
+ for (var D = 0; D < N.length; ++D) {
2220
+ var w = N[D], W = typeof w == "object" && w && typeof w.value < "u" ? w.value : m[w];
2221
+ if (!(l && W === null)) {
2222
+ var ae = u && s ? String(w).replace(/\./g, "%2E") : String(w), $e = F(m) ? typeof n == "function" ? n(O, ae) : O : O + (u ? "." + ae : "[" + ae + "]");
2223
+ P.set(e, I);
2224
+ var ge = Mr();
2225
+ ge.set(nt, P), Lr(L, t(
2226
+ W,
2227
+ $e,
2228
+ n,
2229
+ o,
2230
+ a,
2231
+ i,
2232
+ l,
2233
+ s,
2234
+ n === "comma" && h && F(m) ? null : f,
2235
+ c,
2236
+ p,
2237
+ u,
2238
+ y,
2239
+ d,
2240
+ g,
2241
+ h,
2242
+ b,
2243
+ ge
2244
+ ));
2245
+ }
2246
+ }
2247
+ return L;
2248
+ }, zi = function(e) {
2249
+ if (!e)
2250
+ return E;
2251
+ if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
2252
+ throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
2253
+ if (typeof e.encodeDotInKeys < "u" && typeof e.encodeDotInKeys != "boolean")
2254
+ throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
2255
+ if (e.encoder !== null && typeof e.encoder < "u" && typeof e.encoder != "function")
2256
+ throw new TypeError("Encoder has to be a function.");
2257
+ var r = e.charset || E.charset;
2258
+ if (typeof e.charset < "u" && e.charset !== "utf-8" && e.charset !== "iso-8859-1")
2259
+ throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
2260
+ var n = pe.default;
2261
+ if (typeof e.format < "u") {
2262
+ if (!Hi.call(pe.formatters, e.format))
2263
+ throw new TypeError("Unknown format option provided.");
2264
+ n = e.format;
2265
+ }
2266
+ var o = pe.formatters[n], a = E.filter;
2267
+ (typeof e.filter == "function" || F(e.filter)) && (a = e.filter);
2268
+ var i;
2269
+ if (e.arrayFormat in $r ? i = e.arrayFormat : "indices" in e ? i = e.indices ? "indices" : "repeat" : i = E.arrayFormat, "commaRoundTrip" in e && typeof e.commaRoundTrip != "boolean")
2270
+ throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
2271
+ var l = typeof e.allowDots > "u" ? e.encodeDotInKeys === !0 ? !0 : E.allowDots : !!e.allowDots;
2272
+ return {
2273
+ addQueryPrefix: typeof e.addQueryPrefix == "boolean" ? e.addQueryPrefix : E.addQueryPrefix,
2274
+ allowDots: l,
2275
+ allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : E.allowEmptyArrays,
2276
+ arrayFormat: i,
2277
+ charset: r,
2278
+ charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : E.charsetSentinel,
2279
+ commaRoundTrip: !!e.commaRoundTrip,
2280
+ delimiter: typeof e.delimiter > "u" ? E.delimiter : e.delimiter,
2281
+ encode: typeof e.encode == "boolean" ? e.encode : E.encode,
2282
+ encodeDotInKeys: typeof e.encodeDotInKeys == "boolean" ? e.encodeDotInKeys : E.encodeDotInKeys,
2283
+ encoder: typeof e.encoder == "function" ? e.encoder : E.encoder,
2284
+ encodeValuesOnly: typeof e.encodeValuesOnly == "boolean" ? e.encodeValuesOnly : E.encodeValuesOnly,
2285
+ filter: a,
2286
+ format: n,
2287
+ formatter: o,
2288
+ serializeDate: typeof e.serializeDate == "function" ? e.serializeDate : E.serializeDate,
2289
+ skipNulls: typeof e.skipNulls == "boolean" ? e.skipNulls : E.skipNulls,
2290
+ sort: typeof e.sort == "function" ? e.sort : null,
2291
+ strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : E.strictNullHandling
2292
+ };
2293
+ }, Ki = function(t, e) {
2294
+ var r = t, n = zi(e), o, a;
2295
+ typeof n.filter == "function" ? (a = n.filter, r = a("", r)) : F(n.filter) && (a = n.filter, o = a);
2296
+ var i = [];
2297
+ if (typeof r != "object" || r === null)
2298
+ return "";
2299
+ var l = $r[n.arrayFormat], s = l === "comma" && n.commaRoundTrip;
2300
+ o || (o = Object.keys(r)), n.sort && o.sort(n.sort);
2301
+ for (var f = Mr(), c = 0; c < o.length; ++c) {
2302
+ var p = o[c], u = r[p];
2303
+ n.skipNulls && u === null || Lr(i, Vi(
2304
+ u,
2305
+ p,
2306
+ l,
2307
+ s,
2308
+ n.allowEmptyArrays,
2309
+ n.strictNullHandling,
2310
+ n.skipNulls,
2311
+ n.encodeDotInKeys,
2312
+ n.encode ? n.encoder : null,
2313
+ n.filter,
2314
+ n.sort,
2315
+ n.allowDots,
2316
+ n.serializeDate,
2317
+ n.format,
2318
+ n.formatter,
2319
+ n.encodeValuesOnly,
2320
+ n.charset,
2321
+ f
2322
+ ));
2323
+ }
2324
+ var y = i.join(n.delimiter), d = n.addQueryPrefix === !0 ? "?" : "";
2325
+ return n.charsetSentinel && (n.charset === "iso-8859-1" ? d += "utf8=%26%2310003%3B&" : d += "utf8=%E2%9C%93&"), y.length > 0 ? d + y : "";
2326
+ }, q = Fr, Oe = Object.prototype.hasOwnProperty, nr = Array.isArray, _ = {
2327
+ allowDots: !1,
2328
+ allowEmptyArrays: !1,
2329
+ allowPrototypes: !1,
2330
+ allowSparse: !1,
2331
+ arrayLimit: 20,
2332
+ charset: "utf-8",
2333
+ charsetSentinel: !1,
2334
+ comma: !1,
2335
+ decodeDotInKeys: !1,
2336
+ decoder: q.decode,
2337
+ delimiter: "&",
2338
+ depth: 5,
2339
+ duplicates: "combine",
2340
+ ignoreQueryPrefix: !1,
2341
+ interpretNumericEntities: !1,
2342
+ parameterLimit: 1e3,
2343
+ parseArrays: !0,
2344
+ plainObjects: !1,
2345
+ strictDepth: !1,
2346
+ strictNullHandling: !1,
2347
+ throwOnLimitExceeded: !1
2348
+ }, Yi = function(t) {
2349
+ return t.replace(/&#(\d+);/g, function(e, r) {
2350
+ return String.fromCharCode(parseInt(r, 10));
2351
+ });
2352
+ }, Ur = function(t, e, r) {
2353
+ if (t && typeof t == "string" && e.comma && t.indexOf(",") > -1)
2354
+ return t.split(",");
2355
+ if (e.throwOnLimitExceeded && r >= e.arrayLimit)
2356
+ throw new RangeError("Array limit exceeded. Only " + e.arrayLimit + " element" + (e.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
2357
+ return t;
2358
+ }, Qi = "utf8=%26%2310003%3B", Ji = "utf8=%E2%9C%93", Zi = function(e, r) {
2359
+ var n = { __proto__: null }, o = r.ignoreQueryPrefix ? e.replace(/^\?/, "") : e;
2360
+ o = o.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
2361
+ var a = r.parameterLimit === 1 / 0 ? void 0 : r.parameterLimit, i = o.split(
2362
+ r.delimiter,
2363
+ r.throwOnLimitExceeded ? a + 1 : a
2364
+ );
2365
+ if (r.throwOnLimitExceeded && i.length > a)
2366
+ throw new RangeError("Parameter limit exceeded. Only " + a + " parameter" + (a === 1 ? "" : "s") + " allowed.");
2367
+ var l = -1, s, f = r.charset;
2368
+ if (r.charsetSentinel)
2369
+ for (s = 0; s < i.length; ++s)
2370
+ i[s].indexOf("utf8=") === 0 && (i[s] === Ji ? f = "utf-8" : i[s] === Qi && (f = "iso-8859-1"), l = s, s = i.length);
2371
+ for (s = 0; s < i.length; ++s)
2372
+ if (s !== l) {
2373
+ var c = i[s], p = c.indexOf("]="), u = p === -1 ? c.indexOf("=") : p + 1, y, d;
2374
+ if (u === -1 ? (y = r.decoder(c, _.decoder, f, "key"), d = r.strictNullHandling ? null : "") : (y = r.decoder(c.slice(0, u), _.decoder, f, "key"), y !== null && (d = q.maybeMap(
2375
+ Ur(
2376
+ c.slice(u + 1),
2377
+ r,
2378
+ nr(n[y]) ? n[y].length : 0
2379
+ ),
2380
+ function(h) {
2381
+ return r.decoder(h, _.decoder, f, "value");
2382
+ }
2383
+ ))), d && r.interpretNumericEntities && f === "iso-8859-1" && (d = Yi(String(d))), c.indexOf("[]=") > -1 && (d = nr(d) ? [d] : d), y !== null) {
2384
+ var g = Oe.call(n, y);
2385
+ g && r.duplicates === "combine" ? n[y] = q.combine(
2386
+ n[y],
2387
+ d,
2388
+ r.arrayLimit,
2389
+ r.plainObjects
2390
+ ) : (!g || r.duplicates === "last") && (n[y] = d);
2391
+ }
2392
+ }
2393
+ return n;
2394
+ }, el = function(t, e, r, n) {
2395
+ var o = 0;
2396
+ if (t.length > 0 && t[t.length - 1] === "[]") {
2397
+ var a = t.slice(0, -1).join("");
2398
+ o = Array.isArray(e) && e[a] ? e[a].length : 0;
2399
+ }
2400
+ for (var i = n ? e : Ur(e, r, o), l = t.length - 1; l >= 0; --l) {
2401
+ var s, f = t[l];
2402
+ if (f === "[]" && r.parseArrays)
2403
+ q.isOverflow(i) ? s = i : s = r.allowEmptyArrays && (i === "" || r.strictNullHandling && i === null) ? [] : q.combine(
2404
+ [],
2405
+ i,
2406
+ r.arrayLimit,
2407
+ r.plainObjects
2408
+ );
2409
+ else {
2410
+ s = r.plainObjects ? { __proto__: null } : {};
2411
+ var c = f.charAt(0) === "[" && f.charAt(f.length - 1) === "]" ? f.slice(1, -1) : f, p = r.decodeDotInKeys ? c.replace(/%2E/g, ".") : c, u = parseInt(p, 10);
2412
+ !r.parseArrays && p === "" ? s = { 0: i } : !isNaN(u) && f !== p && String(u) === p && u >= 0 && r.parseArrays && u <= r.arrayLimit ? (s = [], s[u] = i) : p !== "__proto__" && (s[p] = i);
2413
+ }
2414
+ i = s;
2415
+ }
2416
+ return i;
2417
+ }, tl = function(e, r) {
2418
+ var n = r.allowDots ? e.replace(/\.([^.[]+)/g, "[$1]") : e;
2419
+ if (r.depth <= 0)
2420
+ return !r.plainObjects && Oe.call(Object.prototype, n) && !r.allowPrototypes ? void 0 : [n];
2421
+ var o = /(\[[^[\]]*])/, a = /(\[[^[\]]*])/g, i = o.exec(n), l = i ? n.slice(0, i.index) : n, s = [];
2422
+ if (l) {
2423
+ if (!r.plainObjects && Oe.call(Object.prototype, l) && !r.allowPrototypes)
2424
+ return;
2425
+ s.push(l);
2426
+ }
2427
+ for (var f = 0; (i = a.exec(n)) !== null && f < r.depth; ) {
2428
+ f += 1;
2429
+ var c = i[1].slice(1, -1);
2430
+ if (!r.plainObjects && Oe.call(Object.prototype, c) && !r.allowPrototypes)
2431
+ return;
2432
+ s.push(i[1]);
2433
+ }
2434
+ if (i) {
2435
+ if (r.strictDepth === !0)
2436
+ throw new RangeError("Input depth exceeded depth option of " + r.depth + " and strictDepth is true");
2437
+ s.push("[" + n.slice(i.index) + "]");
2438
+ }
2439
+ return s;
2440
+ }, rl = function(e, r, n, o) {
2441
+ if (e) {
2442
+ var a = tl(e, n);
2443
+ if (a)
2444
+ return el(a, r, n, o);
2445
+ }
2446
+ }, nl = function(e) {
2447
+ if (!e)
2448
+ return _;
2449
+ if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
2450
+ throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
2451
+ if (typeof e.decodeDotInKeys < "u" && typeof e.decodeDotInKeys != "boolean")
2452
+ throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");
2453
+ if (e.decoder !== null && typeof e.decoder < "u" && typeof e.decoder != "function")
2454
+ throw new TypeError("Decoder has to be a function.");
2455
+ if (typeof e.charset < "u" && e.charset !== "utf-8" && e.charset !== "iso-8859-1")
2456
+ throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
2457
+ if (typeof e.throwOnLimitExceeded < "u" && typeof e.throwOnLimitExceeded != "boolean")
2458
+ throw new TypeError("`throwOnLimitExceeded` option must be a boolean");
2459
+ var r = typeof e.charset > "u" ? _.charset : e.charset, n = typeof e.duplicates > "u" ? _.duplicates : e.duplicates;
2460
+ if (n !== "combine" && n !== "first" && n !== "last")
2461
+ throw new TypeError("The duplicates option must be either combine, first, or last");
2462
+ var o = typeof e.allowDots > "u" ? e.decodeDotInKeys === !0 ? !0 : _.allowDots : !!e.allowDots;
2463
+ return {
2464
+ allowDots: o,
2465
+ allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : _.allowEmptyArrays,
2466
+ allowPrototypes: typeof e.allowPrototypes == "boolean" ? e.allowPrototypes : _.allowPrototypes,
2467
+ allowSparse: typeof e.allowSparse == "boolean" ? e.allowSparse : _.allowSparse,
2468
+ arrayLimit: typeof e.arrayLimit == "number" ? e.arrayLimit : _.arrayLimit,
2469
+ charset: r,
2470
+ charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : _.charsetSentinel,
2471
+ comma: typeof e.comma == "boolean" ? e.comma : _.comma,
2472
+ decodeDotInKeys: typeof e.decodeDotInKeys == "boolean" ? e.decodeDotInKeys : _.decodeDotInKeys,
2473
+ decoder: typeof e.decoder == "function" ? e.decoder : _.decoder,
2474
+ delimiter: typeof e.delimiter == "string" || q.isRegExp(e.delimiter) ? e.delimiter : _.delimiter,
2475
+ // eslint-disable-next-line no-implicit-coercion, no-extra-parens
2476
+ depth: typeof e.depth == "number" || e.depth === !1 ? +e.depth : _.depth,
2477
+ duplicates: n,
2478
+ ignoreQueryPrefix: e.ignoreQueryPrefix === !0,
2479
+ interpretNumericEntities: typeof e.interpretNumericEntities == "boolean" ? e.interpretNumericEntities : _.interpretNumericEntities,
2480
+ parameterLimit: typeof e.parameterLimit == "number" ? e.parameterLimit : _.parameterLimit,
2481
+ parseArrays: e.parseArrays !== !1,
2482
+ plainObjects: typeof e.plainObjects == "boolean" ? e.plainObjects : _.plainObjects,
2483
+ strictDepth: typeof e.strictDepth == "boolean" ? !!e.strictDepth : _.strictDepth,
2484
+ strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : _.strictNullHandling,
2485
+ throwOnLimitExceeded: typeof e.throwOnLimitExceeded == "boolean" ? e.throwOnLimitExceeded : !1
2486
+ };
2487
+ }, ol = function(t, e) {
2488
+ var r = nl(e);
2489
+ if (t === "" || t === null || typeof t > "u")
2490
+ return r.plainObjects ? { __proto__: null } : {};
2491
+ for (var n = typeof t == "string" ? Zi(t, r) : t, o = r.plainObjects ? { __proto__: null } : {}, a = Object.keys(n), i = 0; i < a.length; ++i) {
2492
+ var l = a[i], s = rl(l, n[l], r, typeof t == "string");
2493
+ o = q.merge(o, s, r);
2494
+ }
2495
+ return r.allowSparse === !0 ? o : q.compact(o);
2496
+ }, al = Ki, il = ol, ll = Et, cl = {
2497
+ formats: ll,
2498
+ parse: il,
2499
+ stringify: al
2500
+ };
2501
+ const sl = /* @__PURE__ */ Qn(cl);
2502
+ async function Me(t, e = {}, r) {
2503
+ const { cms: n = "cms" } = e;
2504
+ return fetch(`${t.href}?${sl.stringify(e)}`, {
2505
+ method: "GET",
2506
+ cache: r ? "no-store" : "default",
2507
+ headers: {
2508
+ Accept: "application/json",
2509
+ "Content-Type": "application/json",
2510
+ "strapi-encode-source-maps": n === "strapi" && r ? "true" : "false"
2511
+ // strapi
2512
+ }
2513
+ });
2514
+ }
2515
+ function At(t, e) {
2516
+ return !(e != null && e.cms) || (e == null ? void 0 : e.cms) === "vtex" ? `https://${e == null ? void 0 : e.storeId}.myvtex.com/_v/cms/api/${e == null ? void 0 : e.name}/${t}` : String(
2517
+ new URL(`api/${t}`, process.env.NEXT_PUBLIC_API_URL)
2518
+ );
2519
+ }
2520
+ function Br(t) {
2521
+ return Array.isArray(t) && t.length > 0 ? t[0] : Array.isArray(t) ? null : t;
2522
+ }
2523
+ async function Gr(t, e = [], r = {}) {
2524
+ var n;
2525
+ if ((r == null ? void 0 : r.contentType) === t) {
2526
+ const o = (r == null ? void 0 : r.previewMode) === "true", a = (r == null ? void 0 : r.documentId) ?? "", i = a && ((n = String(a)) != null && n.length) ? `/${r.documentId}` : "", l = new URL(At(`${t}${i}`, r)), s = await Me(l, r, o);
2527
+ if (!s.ok)
2528
+ return console.error(`[Error fetching preview data]: ${t} - status: ${s.statusText}`), [];
2529
+ const f = await s.json(), c = e.findIndex((p) => p.documentId === f.id);
2530
+ return c !== -1 ? (e[c] = f, [...e]) : [f, ...e];
2531
+ }
2532
+ return e;
2533
+ }
2534
+ const Tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2535
+ __proto__: null,
2536
+ createUrl: At,
2537
+ fetchCMS: Me,
2538
+ mergePreviewDocument: Gr,
2539
+ spreadStrapiData: Br
2540
+ }, Symbol.toStringTag, { value: "Module" }));
2541
+ async function kr(t, e = {}, r) {
2542
+ const n = !!(e != null && e.previewMode), o = await Me(t, e, n);
2543
+ if (!o.ok)
2544
+ return console.log(
2545
+ `Failed to fetch Strapi (url=${String(t)}, status=${o.status})`
2546
+ ), { status: 404, data: [], error: String(o.status) };
2547
+ const { data: a } = await o.json();
2548
+ return a ? {
2549
+ status: 200,
2550
+ data: r ? Br(a) : a
2551
+ } : { status: 404, data: [], error: "No data found" };
2552
+ }
2553
+ async function jr(t, e, r = {}) {
2554
+ const n = (r == null ? void 0 : r.previewId) ?? "", o = (r == null ? void 0 : r.previewMode) === "true", a = { ...r, versionId: n }, i = [];
2555
+ let l = 1, s = 0, f = !0;
2556
+ try {
2557
+ do {
2558
+ const c = await Me(e, { ...a, page: l }, o).then((p) => p.json()).catch((p) => (console.error("Error fetching VTEX CMS data:", p), console.error("Error URL:", e.toString()), null));
2559
+ l === 1 && (s = c.totalItems), Array.isArray(c == null ? void 0 : c.data) && i.push(...c.data), f = !!(c != null && c.hasNextPage), l++;
2560
+ } while (f && i.length < s);
2561
+ if (o && i.length > 0) {
2562
+ if (!t || !n)
2563
+ throw new Error(
2564
+ "contentType and previewId are required for preview mode in vtexCMSData"
2565
+ );
2566
+ const c = await Gr(
2567
+ t,
2568
+ i,
2569
+ a
2570
+ );
2571
+ return {
2572
+ status: c.length > 0 ? 200 : 404,
2573
+ data: c
2574
+ };
2575
+ }
2576
+ return {
2577
+ status: i.length ? 200 : 404,
2578
+ data: i
2579
+ };
2580
+ } catch (c) {
2581
+ return {
2582
+ status: 500,
2583
+ data: [],
2584
+ error: c instanceof Error ? c.message : String(c)
2585
+ };
2586
+ }
2587
+ }
2588
+ const Cl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2589
+ __proto__: null,
2590
+ strapiCMSData: kr,
2591
+ vtexCMSData: jr
2592
+ }, Symbol.toStringTag, { value: "Module" }));
2593
+ async function ul({
2594
+ contentType: t,
2595
+ documentId: e,
2596
+ versionId: r,
2597
+ CMS_PROJECT_NAME: n
2598
+ }) {
2599
+ const o = e && e.length ? `/${e}` : "", a = r && r.length ? `?versionId=${r}` : "";
2600
+ return lr(
2601
+ `/cms/api/${n}/${t}${o}${a}`,
2602
+ { cache: "no-cache" }
2603
+ );
2604
+ }
2605
+ async function fl(t, e = {}, r) {
2606
+ const { cms: n = "vtex" } = e ?? {};
2607
+ try {
2608
+ const o = new URL(At(t, e));
2609
+ return n !== "vtex" ? kr(o, e, r) : jr(t, o, e);
2610
+ } catch (o) {
2611
+ return console.error(`[Fetch ContentType Error CMS ${n}]`, o), r ? { status: 400, data: null } : { status: 200, data: [] };
2612
+ }
2613
+ }
2614
+ const Nl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2615
+ __proto__: null,
2616
+ fetchContentType: fl,
2617
+ getCMSContentType: ul
2618
+ }, Symbol.toStringTag, { value: "Module" }));
2619
+ export {
2620
+ vo as $,
2621
+ pn as A,
2622
+ yl as B,
2623
+ vl as C,
2624
+ ot as D,
2625
+ mn as E,
2626
+ on as F,
2627
+ dn as G,
2628
+ yt as H,
2629
+ Zn as I,
2630
+ sr as J,
2631
+ eo as K,
2632
+ to as L,
2633
+ ro as M,
2634
+ no as N,
2635
+ ur as O,
2636
+ Qn as P,
2637
+ po as Q,
2638
+ an as R,
2639
+ gn as S,
2640
+ _n as T,
2641
+ he as U,
2642
+ kn as V,
2643
+ sn as W,
2644
+ vn as X,
2645
+ Sl as Y,
2646
+ hl as Z,
2647
+ Ol as _,
2648
+ fn as a,
2649
+ fl as a0,
2650
+ wl as a1,
2651
+ fr as a2,
2652
+ El as a3,
2653
+ Rl as a4,
2654
+ _l as a5,
2655
+ bl as a6,
2656
+ Il as a7,
2657
+ Nl as a8,
2658
+ Tl as a9,
2659
+ Cl as aa,
2660
+ Pl as ab,
2661
+ yn as b,
2662
+ An as c,
2663
+ On as d,
2664
+ xn as e,
2665
+ Gn as f,
2666
+ ln as g,
2667
+ Ln as h,
2668
+ Sn as i,
2669
+ Mn as j,
2670
+ Fn as k,
2671
+ T as l,
2672
+ Un as m,
2673
+ Hn as n,
2674
+ ml as o,
2675
+ gl as p,
2676
+ jn as q,
2677
+ bn as r,
2678
+ or as s,
2679
+ Nn as t,
2680
+ Tn as u,
2681
+ Pn as v,
2682
+ $n as w,
2683
+ lr as x,
2684
+ Al as y,
2685
+ cn as z
2686
+ };