@soma-vertical-web/multi-lib 0.0.25 → 0.0.27

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 (67) hide show
  1. package/contexts/hooks/useOperations.d.ts +1 -0
  2. package/data/helpers/cart/index.d.ts +10 -0
  3. package/index.js +20 -20
  4. package/index.mjs +4504 -4444
  5. package/package.json +1 -1
  6. package/style.css +1 -1
  7. package/types/constants.d.ts +1 -0
  8. package/types/contexts/store/cart.d.ts +1 -0
  9. package/types/layout/team-components/Header/index.d.ts +2 -1
  10. package/cms/Sections/Banner/Composite/Slot.d.ts +0 -0
  11. package/cms/Sections/index.d.ts +0 -10
  12. package/cms/api/index.d.ts +0 -11
  13. package/cms/ui/ContentTypes/CommonPage/CommonPage.d.ts +0 -3
  14. package/cms/ui/ContentTypes/CommonPage/DataScreening.d.ts +0 -6
  15. package/cms/ui/ContentTypes/CommonPage/index.d.ts +0 -2
  16. package/cms/ui/ContentTypes/FlagsAndTags/index.d.ts +0 -1
  17. package/cms/ui/ContentTypes/index.d.ts +0 -6
  18. package/cms/ui/Factories/common.d.ts +0 -7
  19. package/cms/ui/Factories/contentType.d.ts +0 -9
  20. package/cms/ui/Factories/index.d.ts +0 -2
  21. package/cms/ui/Factories/section.d.ts +0 -7
  22. package/cms/ui/Sections/Banner/Component.d.ts +0 -7
  23. package/cms/ui/Sections/Banner/Composite/Content.d.ts +0 -4
  24. package/cms/ui/Sections/Banner/Composite/Slot.d.ts +0 -0
  25. package/cms/ui/Sections/Banner/adapter.d.ts +0 -32
  26. package/cms/ui/Sections/Banner/index.d.ts +0 -8
  27. package/cms/ui/Sections/TextContent/Component.d.ts +0 -4
  28. package/cms/ui/Sections/TextContent/Composite/Content.d.ts +0 -3
  29. package/cms/ui/Sections/TextContent/Composite/ContentWrapper.d.ts +0 -3
  30. package/cms/ui/Sections/TextContent/adapter.d.ts +0 -3
  31. package/cms/ui/Sections/TextContent/index.d.ts +0 -8
  32. package/cms/ui/Sections/_common/Accordion.d.ts +0 -2
  33. package/cms/ui/Sections/_common/BannerItem.d.ts +0 -5
  34. package/cms/ui/Sections/_common/TextStructure.d.ts +0 -17
  35. package/cms/ui/Sections/_common/interfaces.d.ts +0 -8
  36. package/cms/ui/Sections/index.d.ts +0 -4
  37. package/data/helpers/product/imageResize.d.ts +0 -8
  38. package/index-B8dtKJc0.mjs +0 -68
  39. package/index-BArDD1Jh.mjs +0 -68
  40. package/index-BCZReEF1.js +0 -4
  41. package/index-BI5_UgNN.mjs +0 -3210
  42. package/index-BK5yScKK.js +0 -1
  43. package/index-BaPdEOcD.js +0 -4
  44. package/index-BcniWgv2.mjs +0 -68
  45. package/index-C3_oOo51.js +0 -1
  46. package/index-C7gBx1Sj.js +0 -4
  47. package/index-CAM8BZOC.mjs +0 -3509
  48. package/index-CG59Ho-O.mjs +0 -3514
  49. package/index-CHaVlwnS.js +0 -1
  50. package/index-CWsS9JhJ.mjs +0 -69
  51. package/index-CqPFy76Q.mjs +0 -3531
  52. package/index-DVeRXseR.js +0 -4
  53. package/index-DXjpbLiy.js +0 -4
  54. package/index-DmJIk8vB.mjs +0 -3210
  55. package/index-Dq-m7diJ.mjs +0 -68
  56. package/index-KIgYoXyH.mjs +0 -3526
  57. package/index-NWyULgUV.js +0 -4
  58. package/index-T-_Ys9t7.mjs +0 -3483
  59. package/index-T1F-4OSy.js +0 -4
  60. package/index-dgE7GGD0.js +0 -4
  61. package/index-fnNrOQ41.js +0 -1
  62. package/index-lWJI65gt.js +0 -1
  63. package/index-tKMO8iJa.mjs +0 -3215
  64. package/layout/team-component/ProductCard/helpers.d.ts +0 -18
  65. package/server-DvV_v1l2.mjs +0 -69
  66. package/server-b0_Jc3E_.js +0 -1
  67. package/types/cms/api/index.d.ts +0 -0
@@ -1,3514 +0,0 @@
1
- var ln = Object.defineProperty;
2
- var dn = (t, e, r) => e in t ? ln(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var je = (t, e, r) => dn(t, typeof e != "symbol" ? e + "" : e, r);
4
- import { jsx as E, jsxs as Q, Fragment as H } from "react/jsx-runtime";
5
- import Se, { createContext as Te, useRef as z, useContext as Ne, useState as ne, useMemo as dt, useEffect as oe } from "react";
6
- import { get as Me, set as De } from "idb-keyval";
7
- import { create as Or } from "zustand";
8
- import { SizesSmallExtended as ue, Mode as fn } from "@soma-vertical-web/foundations";
9
- import { helpers as re, TextStructure as Lt, Utils as Ir, Icon as qt, Button as pn, Timer as G, Banner as ke } from "@soma-vertical-web/core-components";
10
- import { TZDate as jt } from "@date-fns/tz";
11
- import { DefaultDraftBlockRenderMap as mn, convertFromRaw as Sr, CompositeDecorator as hn, EditorState as ft, Editor as Mt } from "draft-js";
12
- const gn = (t, e) => {
13
- const [r, n] = t.split(e);
14
- return { name: r.trim(), size: n ? n.trim() : "" };
15
- }, Tr = (t, e) => {
16
- if (!t)
17
- return {};
18
- const [r, n] = t.split(e);
19
- return { color: r == null ? void 0 : r.trim(), size: n == null ? void 0 : n.trim() };
20
- }, ii = (t, e = "tamanho") => {
21
- if (t.additionalProperty) {
22
- const [r] = t.additionalProperty;
23
- return r != null && r.name ? r.name.toLocaleLowerCase() === e ? r.value : t.name : "";
24
- }
25
- return t.name;
26
- }, ai = (t) => t.replace(/\//g, ""), K = ({ event: t, data: e }) => {
27
- const r = (window == null ? void 0 : window.dataLayer) || [];
28
- e.ecommerce && r.push({
29
- ecommerce: null
30
- }), r.push({ ...t && { event: `custom_${t}` }, ...e });
31
- }, C = {
32
- configs: {
33
- PLP_FILTERS: [{ key: "", label: "", eventLabel: "", order: 0 }],
34
- currency: "BRL",
35
- categoryOff: "bazar",
36
- storeUrl: "https://www.example.com",
37
- MAIN_IMAGE: "1",
38
- // Default main image identifier
39
- NAME_SPLIT_SYMBOL: "-"
40
- },
41
- productEvents: (t, e) => {
42
- const { event: r, commonData: n, customData: i, promotionInfo: o, itemList: s, outsideEcommerceData: a } = t, { availableSizes: u, sizes: l, price: p } = n, d = {
43
- ...r === "view_item" ? {
44
- currency: C.configs.currency,
45
- value: p,
46
- grade_disponivel: u ?? (l ? Nr(l) : "")
47
- } : {},
48
- ...r === "add_to_wishlist" || r === "remove_from_wishlist" ? {
49
- value: p,
50
- currency: C.configs.currency
51
- } : {}
52
- }, c = fe({
53
- data: n,
54
- customData: {
55
- ...i,
56
- ...s,
57
- ...o
58
- },
59
- configs: C.configs
60
- });
61
- K({
62
- event: r,
63
- data: {
64
- ...a,
65
- ecommerce: {
66
- ...s,
67
- ...d,
68
- items: [c]
69
- }
70
- }
71
- }), typeof e == "function" && e(c, d);
72
- },
73
- productListEvent: (t) => {
74
- const {
75
- commonData: { products: e },
76
- promotionInfo: r,
77
- itemList: n,
78
- outsideEcommerceData: i,
79
- customData: o
80
- } = t;
81
- if (e.length === 0)
82
- return;
83
- const s = e.map(({ node: a }, u) => fe({
84
- data: { ...a },
85
- customData: {
86
- ...r,
87
- index: u,
88
- ...o != null && o.item_list_name ? { item_list_name: o == null ? void 0 : o.item_list_name } : n
89
- },
90
- configs: C.configs
91
- }));
92
- K({
93
- event: "view_item_list",
94
- data: {
95
- ...i,
96
- ecommerce: {
97
- ...o != null && o.item_list_name ? { item_list_name: o == null ? void 0 : o.item_list_name } : n,
98
- items: s
99
- }
100
- }
101
- });
102
- },
103
- skuEvents: (t) => {
104
- const {
105
- event: e,
106
- commonData: { products: r },
107
- customData: n,
108
- supportData: { selectedSkus: i, price: o },
109
- //in case of kit price and list price are here
110
- promotionInfo: s,
111
- itemList: a,
112
- outsideEcommerceData: u
113
- } = t;
114
- let l = 0;
115
- const p = r.map((d) => {
116
- var f, g, _, w, b, h, P, v, R;
117
- const c = i == null ? void 0 : i.find(
118
- (I) => (d.productId ?? d.id) === I.productId
119
- );
120
- let m = { ...s, ...a };
121
- if (c) {
122
- const I = Ar(), N = xr(I, c);
123
- N && (m = {
124
- ...m,
125
- ...N
126
- }), e === "add_to_cart" && (s || a) && pt({
127
- persistedData: I,
128
- type: "add",
129
- sku: (c == null ? void 0 : c.id) ?? (c == null ? void 0 : c.sku),
130
- newData: {
131
- promotionInfo: s,
132
- itemList: a
133
- }
134
- }), e === "remove_from_cart" && pt({
135
- persistedData: I,
136
- type: "remove",
137
- sku: (c == null ? void 0 : c.id) ?? (c == null ? void 0 : c.sku)
138
- });
139
- }
140
- l += d.price ?? ((_ = (g = (f = c == null ? void 0 : c.offers) == null ? void 0 : f.offers) == null ? void 0 : g[0]) == null ? void 0 : _.price) ?? 0;
141
- const y = (c == null ? void 0 : c.size) ?? Tr(
142
- (c == null ? void 0 : c.skuName) ?? (c == null ? void 0 : c.name) ?? ((w = d.itemOffered) == null ? void 0 : w.skuName),
143
- C.configs.NAME_SPLIT_SYMBOL
144
- ).size;
145
- return fe({
146
- data: d,
147
- customData: {
148
- ...n,
149
- ...m ?? {
150
- ...s,
151
- ...a
152
- },
153
- item_sku: (c == null ? void 0 : c.id) ?? (c == null ? void 0 : c.sku) ?? ((b = d.itemOffered) == null ? void 0 : b.sku),
154
- quantity: (n == null ? void 0 : n.quantity) ?? d.quantity ?? 1,
155
- item_variant2: y,
156
- seller_id: (c == null ? void 0 : c.sellerId) ?? (c == null ? void 0 : c.seller) ?? ((R = (v = (P = (h = c == null ? void 0 : c.offers) == null ? void 0 : h.offers) == null ? void 0 : P[0]) == null ? void 0 : v.seller) == null ? void 0 : R.identifier) ?? d.seller
157
- },
158
- configs: C.configs
159
- });
160
- });
161
- K({
162
- event: e,
163
- data: {
164
- ...u,
165
- ecommerce: {
166
- value: o ?? l,
167
- currency: C.configs.currency,
168
- items: p
169
- }
170
- }
171
- });
172
- },
173
- filterEvent: (t) => {
174
- var s;
175
- const { commonData: e, customData: r, outsideEcommerceData: n } = t, i = {}, o = {};
176
- Array.isArray(e == null ? void 0 : e.selectedFacets) && ((s = e == null ? void 0 : e.selectedFacets) != null && s.length) && ((e == null ? void 0 : e.selectedFacets).forEach(({ key: a, value: u }) => {
177
- var d;
178
- const l = ((d = C.configs.PLP_FILTERS.find((c) => c.key === a)) == null ? void 0 : d.eventLabel) ?? a, p = (i == null ? void 0 : i[l]) || [];
179
- l === "price_range" && u.replace(":", "-"), i[l] = [...p, u];
180
- }), Object.keys(i).forEach((a) => o[a] = i[a].join(", "))), K({
181
- event: "filter",
182
- data: {
183
- ...n,
184
- ...o,
185
- ...r
186
- }
187
- });
188
- },
189
- viewCartEvent: (t) => {
190
- var p, d, c, m, y, f, g, _, w, b;
191
- const { commonData: e, outsideEcommerceData: r } = t, { cartStore: n } = e;
192
- if (!n)
193
- return;
194
- const i = window.localStorage.getItem("persistedCartEventsData"), o = i ? JSON.parse(i) : {}, s = n.items.map((h) => {
195
- const { promotionInfo: P, itemList: v } = o[h.id] ?? {};
196
- return fe({
197
- data: {
198
- ...h,
199
- price: h.price / 100,
200
- listPrice: h.listPrice / 100
201
- },
202
- customData: {
203
- ...P,
204
- ...v,
205
- item_sku: h.id ?? h.itemOffered.sku,
206
- quantity: h.quantity ?? 1
207
- },
208
- configs: C.configs
209
- });
210
- }), a = (((p = n.totalizers.find((h) => h.name === "Total dos Itens")) == null ? void 0 : p.value) ?? 0) / 100, u = (((d = n.totalizers.find((h) => h.name === "Total dos Descontos")) == null ? void 0 : d.value) ?? 0) / 100, l = ((c = n.marketingData) == null ? void 0 : c.utmiCampaign) === "codigodavendedora" ? (m = n.marketingData) == null ? void 0 : m.utmCampaign : (f = String((y = n.openTextField) == null ? void 0 : y.value)) == null ? void 0 : f.split(" - ")[0];
211
- K({
212
- event: "view_cart",
213
- data: {
214
- ...r,
215
- ecommerce: {
216
- currency: C.configs.currency,
217
- value: a + u,
218
- total_discount: Math.abs(u),
219
- cep_preenchido: !!((_ = (g = n.shippingData) == null ? void 0 : g.address) != null && _.postalCode),
220
- ...l ? { seller_coupon_name: l } : {},
221
- ...((w = n.marketingData) == null ? void 0 : w.coupon) && {
222
- sale_coupon_name: (b = n.marketingData) == null ? void 0 : b.coupon
223
- },
224
- subtotal: a,
225
- items: s
226
- }
227
- }
228
- });
229
- },
230
- readyEvents: (t) => {
231
- const { event: e, readyData: r } = t;
232
- K({
233
- event: e,
234
- data: {
235
- ...r
236
- }
237
- });
238
- }
239
- }, Nr = (t) => t.reduce((e, r) => (r.available && e.push(r.value), e), []).toString(), yn = (t) => {
240
- const e = t.length;
241
- return {
242
- ...t && t.length > 0 ? {
243
- item_category: t[0].includes(C.configs.categoryOff) ? "Bazar" : "Coleção",
244
- ...t[1] ? { item_category2: t[1] } : {},
245
- ...e > 2 ? { item_category3: t[e - 1] } : {}
246
- } : {}
247
- };
248
- }, fe = ({ data: t, customData: e, configs: r }) => ({
249
- ..._n(t, r == null ? void 0 : r.MAIN_IMAGE),
250
- ...vn(t),
251
- ...bn(t),
252
- ...Pn(t),
253
- ...e
254
- }), Cr = () => {
255
- var t, e;
256
- return document ? ((e = (t = window.document.head.querySelector('meta[name="category"]')) == null ? void 0 : t.getAttribute("content")) == null ? void 0 : e.split("_")) ?? [] : [];
257
- }, Ar = () => {
258
- const t = window.localStorage.getItem("persistedCartEventsData");
259
- return t ? JSON.parse(t) : null;
260
- }, xr = (t, e) => t == null ? void 0 : t[e], pt = ({
261
- persistedData: t,
262
- type: e,
263
- sku: r,
264
- newData: n
265
- }) => {
266
- if (!t && e === "add") {
267
- window.localStorage.setItem("persistedCartEventsData", JSON.stringify({ [r]: n }));
268
- return;
269
- }
270
- if (t && e === "add") {
271
- window.localStorage.setItem(
272
- "persistedCartEventsData",
273
- JSON.stringify({ ...t, [r]: n })
274
- );
275
- return;
276
- }
277
- t && e === "remove" && (delete t[r], window.localStorage.setItem("persistedCartEventsData", JSON.stringify(t)));
278
- }, _n = (t, e = "1") => {
279
- var o, s, a, u, l, p, d, c, m, y, f;
280
- const r = t.productReference ?? t.gtin ?? t.productRefId, n = t.image ?? ((s = (o = t.items) == null ? void 0 : o[0]) == null ? void 0 : s.images) ?? ((a = t.itemOffered) == null ? void 0 : a.image), i = n == null ? void 0 : n.find(
281
- (g) => g.alternateName === e || g.imageLabel === e || g.keywords === e
282
- );
283
- return {
284
- item_id: t.productId ?? ((u = t.isVariantOf) == null ? void 0 : u.productGroupID) ?? ((l = t.isVariationOf) == null ? void 0 : l.productGroupID) ?? ((d = (p = t.itemOffered) == null ? void 0 : p.isVariationOf) == null ? void 0 : d.productGroupID),
285
- item_ref: /_\d$/.test(r) ? r.slice(0, -2) : r,
286
- item_name: t.productTitle ?? t.productName ?? t.name ?? gn((c = t.itemOffered) == null ? void 0 : c.name, C.configs.NAME_SPLIT_SYMBOL).name,
287
- item_brand: ((m = t.brand) == null ? void 0 : m.brandName) ?? ((y = t.brand) == null ? void 0 : y.name) ?? t.brand ?? ((f = t.itemOffered) == null ? void 0 : f.brand.name),
288
- item_url: `${C.configs.storeUrl}${t.linkText}/p`,
289
- item_image: (i == null ? void 0 : i.url) ?? (i == null ? void 0 : i.imageUrl)
290
- };
291
- }, Dt = (t) => Array.isArray(t) ? t.reduce((e, r) => (r.length > e.length && (e = r), e), "") : t, vn = (t) => {
292
- var l, p;
293
- const { categories: e, categoriesIds: r } = t, n = e ?? ((l = t.itemOffered) == null ? void 0 : l.categories), i = r ?? ((p = t.itemOffered) == null ? void 0 : p.categoriesIds), o = Dt(n), s = Dt(i), a = o.slice(1, -1).split("/"), u = s.slice(1, -1).split("/");
294
- return {
295
- item_category: a[0].toLowerCase().includes(C.configs.categoryOff) ? "Bazar" : "Coleção",
296
- ...a[1] && { item_category2: a[1] },
297
- ...a.length > 2 && {
298
- item_category3: a[a.length - 1]
299
- },
300
- item_category_id: u[u.length - 1],
301
- ...u.length > 1 && {
302
- item_parent_category_id: u[u.length - 2]
303
- }
304
- };
305
- }, bn = (t) => {
306
- var i, o, s, a, u, l;
307
- const e = ((i = t.itemOffered) == null ? void 0 : i.skuName) ?? ((a = (s = (o = t.isVariantOf) == null ? void 0 : o.hasVariant) == null ? void 0 : s[0]) == null ? void 0 : a.name) ?? ((l = (u = t.items) == null ? void 0 : u[0]) == null ? void 0 : l.name), { color: r, size: n } = Tr(e, C.configs.NAME_SPLIT_SYMBOL);
308
- return {
309
- item_variant: r,
310
- ...t.itemOffered && { item_variant2: n }
311
- };
312
- }, Pn = (t) => {
313
- var u, l;
314
- const { price: e, listPrice: r, installments: n } = t, i = e ?? ((u = t.offers) == null ? void 0 : u.lowPrice) ?? 0, o = r ?? ((l = t.offers) == null ? void 0 : l.highPrice) ?? 0, s = o ? o - i : 0, a = s % 1 === 0 ? s : Number(s.toFixed(2));
315
- return {
316
- ...e && { price: i ?? o },
317
- ...o && {
318
- list_price: o,
319
- discount: a
320
- },
321
- ...n && {
322
- installments: n == null ? void 0 : n.count,
323
- installment_value: n == null ? void 0 : n.value
324
- },
325
- item_currency: C.configs.currency
326
- };
327
- }, Rn = () => {
328
- const [t, e] = Cr(), [r, n] = t.split("-"), i = r.includes("shop") || r.includes("sale") ? r : "";
329
- return {
330
- page_category: i && n ? n : "",
331
- page_departament: i,
332
- id: e,
333
- name: t
334
- };
335
- }, si = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
336
- __proto__: null,
337
- eventsFunctions: C,
338
- findDataInPersistedData: xr,
339
- getAvailablesSizes: Nr,
340
- getCategories: yn,
341
- getPageCategoryAndDepartmentFromSlug: Rn,
342
- getPersistedData: Ar,
343
- getProductListInfoFromHead: Cr,
344
- pushDatalayer: K,
345
- updatePersistedData: pt
346
- }, Symbol.toStringTag, { value: "Module" })), Lr = Te({}), ui = ({ children: t, evtFunctionsConfigs: e }) => {
347
- const r = z({}), n = z(null), i = z(null), o = z({}), s = z({
348
- trigger: !1,
349
- index: 0
350
- }), a = ({
351
- functionKey: p,
352
- data: d,
353
- callBack: c,
354
- timeout: m = 100
355
- }) => {
356
- window.dataLayer || (window.dataLayer = []), C.configs = e;
357
- try {
358
- typeof C[p] == "function" && setTimeout(() => {
359
- var y;
360
- d.promotionInfo = r.current, (y = i.current) != null && y.item_list_name && (d.itemList = i.current), C[p](d, c);
361
- }, m);
362
- } catch (y) {
363
- K({
364
- event: "error_event",
365
- data: {
366
- error_message: (y == null ? void 0 : y.message) ?? y
367
- }
368
- });
369
- }
370
- }, u = ({ content: p }) => {
371
- a({
372
- functionKey: "readyEvents",
373
- data: {
374
- event: "select_content",
375
- readyData: {
376
- content_type: p.replace("::", ":")
377
- }
378
- }
379
- });
380
- }, l = ({
381
- updatePromotionRef: p,
382
- promotion: d,
383
- index: c
384
- }) => {
385
- p && (r.current = {
386
- ...d
387
- }), a({
388
- functionKey: "readyEvents",
389
- data: {
390
- event: "select_promotion",
391
- readyData: {
392
- ecommerce: {
393
- ...d,
394
- ...c !== void 0 && { index: c }
395
- }
396
- }
397
- }
398
- });
399
- };
400
- return /* @__PURE__ */ E(
401
- Lr.Provider,
402
- {
403
- value: {
404
- sendDataLayerEvent: a,
405
- triggerSelectItemEventRef: s,
406
- promotionEventRef: r,
407
- currentLocalRef: n,
408
- itemListRef: i,
409
- cartProductsFullDataRef: o,
410
- handleSelectContent: u,
411
- handleSelectPromotionEvent: l
412
- },
413
- children: t
414
- }
415
- );
416
- }, qr = () => Ne(Lr), En = {
417
- attachment: "ATTACHMENT",
418
- specification: "SPECIFICATION",
419
- attribute: "ATTRIBUTE"
420
- }, k = Promise.resolve(!1), mt = {
421
- id: "",
422
- isOpen: !1,
423
- items: [],
424
- loading: !1,
425
- marketingData: null,
426
- messages: [],
427
- openTextField: {},
428
- paymentData: null,
429
- shippingData: null,
430
- totalizers: [],
431
- itemMetadata: [],
432
- recentlyAddedProducts: [],
433
- addCoupon: () => k,
434
- addItem: () => k,
435
- addSellerCode: () => k,
436
- emptyCart: () => {
437
- },
438
- removeItem: () => k,
439
- setIsOpen: () => {
440
- },
441
- shipping: () => k,
442
- shippingUpdate: () => k,
443
- toggleServiceToProduct: () => k,
444
- updateItemQuantity: () => k,
445
- insertProfileEmail: () => k,
446
- setRecentlyAddedProducts: () => {
447
- }
448
- }, bt = (t) => t === 0, jr = (t, e) => {
449
- if (!t || t.length === 0)
450
- return [];
451
- let r = "";
452
- const n = [], i = t.match(/\d+/g) ?? [];
453
- for (const o of i) {
454
- const s = e[Number(o)];
455
- s && (r += (r ? "/" : "") + s, n.push(r));
456
- }
457
- return n;
458
- }, Mr = (t) => {
459
- const {
460
- availability: e,
461
- additionalInfo: { brandName: r },
462
- bundleItems: n,
463
- id: i,
464
- detailUrl: o,
465
- ean: s,
466
- imageUrl: a,
467
- name: u,
468
- listPrice: l,
469
- quantity: p,
470
- price: d,
471
- priceDefinition: c,
472
- productCategories: m,
473
- productCategoryIds: y,
474
- productId: f,
475
- refId: g,
476
- seller: _,
477
- referenceId: w,
478
- offerings: b,
479
- productRefId: h,
480
- skuName: P,
481
- sellingPrice: v
482
- } = t;
483
- return {
484
- availability: e,
485
- bundleItems: n,
486
- referenceId: w,
487
- productRefId: h,
488
- id: i,
489
- ean: s,
490
- itemOffered: {
491
- additionalProperty: [],
492
- brand: {
493
- name: r
494
- },
495
- categories: jr(y, m),
496
- categoriesIds: y,
497
- gtin: g,
498
- image: [
499
- {
500
- alternateName: "1",
501
- url: a
502
- }
503
- ],
504
- name: u,
505
- isVariationOf: {
506
- name: u,
507
- productGroupID: f
508
- },
509
- sku: i,
510
- slug: o,
511
- skuName: P
512
- },
513
- listPrice: l,
514
- quantity: p,
515
- offerings: b,
516
- price: d,
517
- priceDefinition: c,
518
- sellingPrice: v,
519
- seller: _
520
- };
521
- }, Dr = (t, e) => {
522
- const r = t.map((n) => ({
523
- id: n.id,
524
- quantity: n.quantity,
525
- seller: n.seller
526
- }));
527
- return Array.isArray(e) ? [...r, ...e] : [...r, e];
528
- }, kr = (t, e) => {
529
- const r = t.find((n) => n.id === e);
530
- if (r) {
531
- const n = t.map((i, o) => {
532
- var s, a;
533
- return {
534
- id: ((s = i.itemOffered) == null ? void 0 : s.sku) ?? "",
535
- index: o,
536
- quantity: (r == null ? void 0 : r.id) === ((a = i.itemOffered) == null ? void 0 : a.sku) ? 0 : i.quantity,
537
- seller: i.seller ?? ""
538
- };
539
- });
540
- return {
541
- updateItems: n,
542
- filterItems: n.filter((i) => i.id !== e)
543
- };
544
- }
545
- return { updateItems: [], filterItems: [] };
546
- }, Ur = (t, e, r) => t.filter(
547
- (n) => n.availability !== "withoutStock" && n.availability !== "https://schema.org/OutOfStock"
548
- ).map(
549
- (n, i) => {
550
- var o, s;
551
- return n.id === e ? {
552
- id: n.id,
553
- index: i,
554
- quantity: r,
555
- seller: n.seller,
556
- sku: ((o = n.itemOffered) == null ? void 0 : o.sku) ?? ""
557
- } : {
558
- id: n.id,
559
- index: i,
560
- quantity: n.quantity,
561
- seller: n.seller,
562
- sku: ((s = n.itemOffered) == null ? void 0 : s.sku) ?? ""
563
- };
564
- }
565
- ), wn = (t, e) => t.filter((r) => r.availability !== "withoutStock").findIndex(({ id: r }) => r === e), On = (t, e) => {
566
- var r;
567
- return Array.isArray(t) ? (((r = t == null ? void 0 : t.find((n) => {
568
- var i;
569
- return ((i = n == null ? void 0 : n.id) == null ? void 0 : i.toLowerCase()) === e;
570
- })) == null ? void 0 : r.value) ?? 0) / 100 : 0;
571
- }, In = (t) => {
572
- const e = t.reduce((i, o) => {
573
- const s = bt(o.price) ? 0 : o.quantity;
574
- return i + s;
575
- }, 0), r = t.reduce(
576
- (i, o) => i + o.price * o.quantity,
577
- 0
578
- ), n = t.reduce(
579
- (i, o) => i + o.listPrice * o.quantity,
580
- 0
581
- );
582
- return {
583
- totalItems: e,
584
- total: r,
585
- subTotal: n
586
- };
587
- }, Sn = (t) => Array.isArray(t) ? t.filter((e) => e.availability !== "withoutStock").reduce((e, r) => e + (bt(r == null ? void 0 : r.price) ? 0 : r.quantity), 0) : 0, zr = (t) => {
588
- const {
589
- items: e,
590
- itemMetadata: r,
591
- marketingData: n,
592
- messages: i,
593
- orderFormId: o,
594
- openTextField: s,
595
- paymentData: a,
596
- shippingData: u,
597
- totalizers: l
598
- } = t;
599
- return {
600
- id: o,
601
- itemMetadata: r,
602
- items: Array.isArray(e) ? e.map(Mr) : [],
603
- marketingData: n,
604
- messages: i,
605
- openTextField: s,
606
- paymentData: a,
607
- shippingData: u,
608
- totalizers: l
609
- };
610
- }, Br = (t, e) => {
611
- const r = t.find((n) => n.id === e);
612
- return r ? r.availability === "unavailableItemFulfillment" : !1;
613
- }, Tn = (t, e) => {
614
- const r = t.sku, n = t.isVariantOf.hasVariant.find((i) => i.sku === r);
615
- return n ? n.name.split(e)[1] : "--";
616
- }, 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 }, Cn = (t, e) => {
617
- const r = /* @__PURE__ */ new Set();
618
- return [t, ...e].filter(
619
- (n) => !r.has(n) && r.add(n),
620
- r
621
- );
622
- }, Vr = (t, e) => e && Array.isArray(e) && e.find((n) => n.id === t) ? Promise.resolve(t) : Promise.resolve(!1), Fr = (t, e) => e ? Promise.resolve(t[e]) : Promise.resolve(!1), Wr = async (t) => {
623
- try {
624
- const e = await t();
625
- if (typeof e != "boolean")
626
- return e;
627
- } catch (e) {
628
- console.error(`[Error orderForm]: ${e}`);
629
- }
630
- return !1;
631
- }, An = (t, e) => {
632
- if (e !== -1) {
633
- const r = Number(t);
634
- return r ? r + 1 : 1;
635
- }
636
- return t ?? 1;
637
- }, Hr = (t, e) => Array.isArray(t) ? t.filter(
638
- (r) => e == null ? void 0 : e.some((n) => n.id === r.id)
639
- ) : [], $r = async (t, e) => t.then((r) => [...r ?? [], ...e ?? []]), q = async (t, e, r) => {
640
- const { priority: n = "auto", body: i } = e;
641
- return fetch(t, {
642
- // priority,
643
- headers: {
644
- "Content-Type": "application/json"
645
- },
646
- priority: n,
647
- method: "POST",
648
- body: JSON.stringify(i)
649
- }).then(async (o) => {
650
- const s = await o.json();
651
- return r ? s : zr(s);
652
- });
653
- }, Gr = (t, e, r) => ({
654
- notifications: [
655
- ...t.notifications,
656
- { id: Date.now(), message: e, callback: r }
657
- ]
658
- }), xn = (t) => [...Array.isArray(t) ? t : [t], "faststore"], ci = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
659
- __proto__: null,
660
- VALUE_REFERENCES: En,
661
- addItemOrder: Dr,
662
- addNotification: Gr,
663
- createItemOrder: Mr,
664
- fetchCartAPI: q,
665
- findItemIndex: wn,
666
- findOptions: Hr,
667
- findTotalizerValue: On,
668
- getCategories: jr,
669
- getCode: Nn,
670
- getQuantity: An,
671
- getRemoveId: Vr,
672
- getSize: Tn,
673
- getTotalItems: Sn,
674
- getTotalizer: In,
675
- getValue: Fr,
676
- initialState: mt,
677
- isGift: bt,
678
- marketingTagsBuilder: xn,
679
- mergeOptionsPromise: $r,
680
- orderFormValues: zr,
681
- promiseDefault: k,
682
- removeQuantity: kr,
683
- updateItemSellerExternal: Br,
684
- updateOrderFormPromise: Wr,
685
- updateQuantity: Ur,
686
- wishlistArray: Cn
687
- }, Symbol.toStringTag, { value: "Module" })), Ln = () => {
688
- const t = async (c, m) => q("/api/checkout/order-form/coupon", {
689
- body: {
690
- orderFormId: c,
691
- coupon: m
692
- }
693
- }), e = async (c, m) => {
694
- if (m) {
695
- const y = m.includes(" - ") ? m.split(" - ")[0] : m, f = await q(
696
- "/api/checkout/order-form/seller-code",
697
- {
698
- body: {
699
- orderFormId: c,
700
- sellerCode: y
701
- }
702
- },
703
- !0
704
- );
705
- return q("/api/checkout/order-form/attachments", {
706
- body: {
707
- orderFormId: c,
708
- sellerCode: y,
709
- sellerName: f instanceof Object && "nome" in f ? f == null ? void 0 : f.nome : ""
710
- }
711
- }).then((g) => ({
712
- ...g,
713
- openTextField: {
714
- ...(g == null ? void 0 : g.openTextField) ?? {},
715
- statusOk: (f == null ? void 0 : f.status) ?? !1
716
- }
717
- }));
718
- } else
719
- return q("/api/checkout/order-form/attachments", {
720
- body: {
721
- orderFormId: c,
722
- sellerCode: "",
723
- sellerName: ""
724
- }
725
- });
726
- }, r = async (c, m, y) => q("/api/checkout/order-form/items", {
727
- body: {
728
- orderFormId: c,
729
- orderItems: Dr(m, y)
730
- }
731
- }), n = async (c, m, y, f) => q("/api/checkout/order-form/offerings", {
732
- body: {
733
- id: m,
734
- itemIndex: y,
735
- orderFormId: c,
736
- remove: f
737
- }
738
- }), i = async (c) => q("/api/checkout/order-form/items/remove-all", {
739
- body: { orderFormId: c }
740
- }), o = async (c, m = "low") => q("/api/checkout/order-form", {
741
- priority: m,
742
- body: { orderFormId: c ?? "" }
743
- }), s = async (c, m) => q("/api/checkout/order-form/profile", {
744
- body: {
745
- orderFormId: c,
746
- email: m
747
- }
748
- }), a = async (c, m, y) => {
749
- const f = kr(m, y);
750
- return q("/api/checkout/order-form/items/update", {
751
- body: {
752
- orderItems: f.updateItems,
753
- orderFormId: c
754
- }
755
- });
756
- }, u = async (c, m, y) => q("/api/checkout/order-form/shipping", {
757
- body: {
758
- orderFormId: c,
759
- country: y,
760
- postalCode: m
761
- }
762
- }), l = async (c, m, y) => q("/api/checkout/order-form/shipping/update", {
763
- body: {
764
- orderFormId: c,
765
- options: m,
766
- selectedAddresses: y
767
- }
768
- }), p = async (c, m, y, f) => {
769
- const g = Ur(m, y, f);
770
- return q("/api/checkout/order-form/items/update", {
771
- body: {
772
- orderFormId: c,
773
- orderItems: g
774
- }
775
- });
776
- };
777
- return {
778
- addCoupon: t,
779
- addItem: r,
780
- addSellerCode: e,
781
- giftItem: n,
782
- emptyCart: i,
783
- getOrderForm: o,
784
- insertProfileEmail: s,
785
- removeItem: a,
786
- shipping: u,
787
- shippingUpdate: l,
788
- updateItemQuantity: async (c, m, y, f, g) => p(
789
- c,
790
- m,
791
- y,
792
- f
793
- ).then((_) => _ && Array.isArray(_.items) ? Br(_.items, y) ? p(
794
- c,
795
- m,
796
- y,
797
- g
798
- ) : _ : !1)
799
- };
800
- }, ht = "soma::cart", se = "soma::options", Pt = Or((t, e) => {
801
- const r = Ln(), n = async (i, o, s) => {
802
- t({ loading: !0 });
803
- const a = await Wr(i);
804
- if (typeof a != "boolean") {
805
- t({ ...a });
806
- const u = await $r(
807
- Me(se),
808
- s
809
- );
810
- return De(se, u), Fr(a, o).finally(
811
- () => t({ loading: !1, options: u })
812
- );
813
- }
814
- return k;
815
- };
816
- if (typeof window < "u") {
817
- const i = async (o) => {
818
- if (o) {
819
- const s = await Me(se).then(
820
- (l) => Hr(l, o.items)
821
- );
822
- De(ht, o), De(se, s), t({ ...o, options: s });
823
- const a = new URLSearchParams(window.location.search), u = a.get("utm_campaign") || a.get("utmi_campaign") || "";
824
- u && n(
825
- () => r.addSellerCode(e().id, u.toUpperCase()),
826
- "openTextField"
827
- );
828
- }
829
- };
830
- return Me(ht).then(
831
- (o) => r.getOrderForm(o ? o.id : "").then(i)
832
- // create form
833
- ), {
834
- ...mt,
835
- // coupon
836
- addCoupon: async (o) => n(
837
- () => r.addCoupon(e().id, o),
838
- "marketingData"
839
- ),
840
- // add to cart
841
- addItem: (o, s) => {
842
- n(
843
- () => r.addItem(e().id, e().items, o),
844
- "items",
845
- s
846
- );
847
- },
848
- // seller code
849
- addSellerCode: async (o) => n(
850
- () => r.addSellerCode(e().id, o),
851
- "openTextField"
852
- ),
853
- // empty cart
854
- emptyCart: () => {
855
- n(() => r.emptyCart(e().id));
856
- },
857
- // remove item
858
- removeItem: async (o) => {
859
- const s = await n(
860
- () => r.removeItem(e().id, e().items, o),
861
- // remove item by quantity = 0
862
- "items"
863
- );
864
- return Vr(o, s);
865
- },
866
- // shipping
867
- shipping: async (o, s = "BR") => n(
868
- () => r.shipping(e().id, o, s),
869
- // shipping first selected value,
870
- "shippingData"
871
- ),
872
- // shipping update
873
- shippingUpdate: async (o) => n(
874
- () => {
875
- var s;
876
- return r.shippingUpdate(
877
- e().id,
878
- o,
879
- (s = e().shippingData) == null ? void 0 : s.selectedAddresses
880
- );
881
- },
882
- "shippingData"
883
- ),
884
- // toggle service product
885
- toggleServiceToProduct: async (o, s, a) => n(
886
- () => r.giftItem(e().id, o, s, a),
887
- "items"
888
- ),
889
- // update item
890
- updateItemQuantity: async (o, s, a) => {
891
- const { id: u, items: l } = e();
892
- return n(
893
- () => {
894
- var p;
895
- return r.updateItemQuantity(
896
- u,
897
- l,
898
- o,
899
- s,
900
- ((p = l.find((d) => d.id === o)) == null ? void 0 : p.quantity) ?? 1
901
- );
902
- },
903
- "items",
904
- a ? [a] : void 0
905
- );
906
- },
907
- insertProfileEmail: async (o) => n(
908
- () => r.insertProfileEmail(e().id, o),
909
- "clientProfileData"
910
- ),
911
- setIsOpen: (o) => t({ isOpen: o })
912
- };
913
- }
914
- return mt;
915
- }), qn = () => Pt((t) => t), Kr = Or((t) => ({
916
- notifications: [],
917
- actions: {
918
- addNotification: (e, r) => t(
919
- (n) => Gr(n, e, r)
920
- ),
921
- removeNotification: (e) => t((r) => ({
922
- notifications: r.notifications.filter((n) => n.id !== e)
923
- }))
924
- }
925
- })), jn = () => Kr(
926
- (t) => t.notifications
927
- ), Mn = () => Kr(
928
- (t) => t.actions
929
- ), li = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
930
- __proto__: null,
931
- KEY_INDEXED_OPTIONS: se,
932
- KEY_INDEXED_STORE: ht,
933
- useCartStore: Pt,
934
- useGetCartStoreState: qn,
935
- useGetNotificationActions: Mn,
936
- useGetNotificationsStore: jn
937
- }, Symbol.toStringTag, { value: "Module" })), Dn = 6e3, Qr = Te({}), kn = ({ children: t, ...e }) => {
938
- const { items: r } = Pt(), [n, i] = ne([]), o = z(null), s = dt(() => Array.isArray(n) && n.length > 0 ? n.map((a) => r.find((u) => u.id === a.id)).filter((a) => a !== void 0) : [], [r, n]);
939
- return oe(() => {
940
- n.length && (clearTimeout(o.current ?? 0), o.current = setTimeout(() => {
941
- i([]);
942
- }, Dn));
943
- }, [n]), /* @__PURE__ */ E(
944
- Qr.Provider,
945
- {
946
- value: dt(
947
- () => ({
948
- ...e,
949
- setRecentlyAdded: i,
950
- recentlyAddedProducts: s
951
- }),
952
- [e, i, s]
953
- ),
954
- children: t
955
- }
956
- );
957
- }, di = () => {
958
- const t = Ne(Qr);
959
- if (t === void 0)
960
- throw new Error("useUIContext must be used within a UIProvider");
961
- return t;
962
- };
963
- class Un {
964
- constructor() {
965
- je(this, "events", {});
966
- je(this, "prevData", {});
967
- }
968
- subscribe(e, r) {
969
- return this.events[e] || (this.events[e] = []), this.events[e].push(r), () => {
970
- this.events[e] = this.events[e].filter((n) => n !== r);
971
- };
972
- }
973
- publish(e, r) {
974
- this.events[e] && this.events[e].forEach((n) => {
975
- this.prevData[e] = r, n(r);
976
- });
977
- }
978
- }
979
- const Xr = Te({}), fi = ({ children: t, headerConfigs: e, pathname: r, ...n }) => {
980
- const [i, o] = ne(!0), s = r === "/", a = z(new Un()), u = (d) => d ? {
981
- headerVariant: e.home_default_variant,
982
- bannerVariant: e.home_default_variant,
983
- position: e.home_default_position
984
- } : {
985
- headerVariant: e.default_variant,
986
- bannerVariant: e.default_variant,
987
- position: e.default_position
988
- }, l = u(s), p = z(l);
989
- return oe(() => {
990
- const d = () => {
991
- const c = typeof (window == null ? void 0 : window.navigator) > "u" ? "" : navigator == null ? void 0 : navigator.userAgent, m = window.innerWidth < 1024 || !!c.match(
992
- /Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i
993
- );
994
- i !== m && o(m);
995
- };
996
- return d(), window.addEventListener("resize", d, { passive: !0 }), () => window.removeEventListener("resize", d);
997
- }, [i]), oe(() => {
998
- const d = u(s);
999
- a.current.publish(
1000
- "header:change_variant",
1001
- d.headerVariant
1002
- ), a.current.publish(
1003
- "header:change_position",
1004
- d.position
1005
- ), p.current = d;
1006
- }, [s]), /* @__PURE__ */ E(
1007
- Xr.Provider,
1008
- {
1009
- value: {
1010
- isMobile: i,
1011
- mediatorRef: a,
1012
- currentHeaderConfigsRef: p,
1013
- ...n
1014
- },
1015
- children: /* @__PURE__ */ E(kn, { children: t })
1016
- }
1017
- );
1018
- }, pi = () => Ne(Xr), Yr = Te({}), mi = ({ children: t, ...e }) => /* @__PURE__ */ E(
1019
- Yr.Provider,
1020
- {
1021
- value: {
1022
- ...e
1023
- },
1024
- children: t
1025
- }
1026
- ), Jr = () => Ne(Yr), zn = (t, e) => e.getTime() > t.getTime() ? Math.abs(e.getTime() - t.getTime()) : 0, pe = (t, e) => Math.floor(e === "days" ? t / (1e3 * 60 * 60 * 24) : e === "hours" ? t % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60) : e === "minutes" ? t % (1e3 * 60 * 60) / (1e3 * 60) : t % (1e3 * 60) / 1e3), Bn = (t) => t, Vn = (t) => ({
1027
- ...t.uiWidget ? { "ui:widget": t.uiWidget } : {},
1028
- ...t.uiObjectFieldTemplate ? { "ui:ObjectFieldTemplate": t.uiObjectFieldTemplate } : {}
1029
- }), O = {
1030
- property: Bn,
1031
- widget: Vn
1032
- };
1033
- function Fn(t) {
1034
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
1035
- }
1036
- var gt = { exports: {} }, ce = {};
1037
- ce._ = ce._interop_require_default = Wn;
1038
- function Wn(t) {
1039
- return t && t.__esModule ? t : { default: t };
1040
- }
1041
- var me = { exports: {} }, Ue = {}, kt;
1042
- function Zr() {
1043
- return kt || (kt = 1, function(t) {
1044
- Object.defineProperty(t, "__esModule", {
1045
- value: !0
1046
- });
1047
- function e(s, a) {
1048
- for (var u in a) Object.defineProperty(s, u, {
1049
- enumerable: !0,
1050
- get: a[u]
1051
- });
1052
- }
1053
- e(t, {
1054
- searchParamsToUrlQuery: function() {
1055
- return r;
1056
- },
1057
- urlQueryToSearchParams: function() {
1058
- return i;
1059
- },
1060
- assign: function() {
1061
- return o;
1062
- }
1063
- });
1064
- function r(s) {
1065
- const a = {};
1066
- return s.forEach((u, l) => {
1067
- typeof a[l] > "u" ? a[l] = u : Array.isArray(a[l]) ? a[l].push(u) : a[l] = [
1068
- a[l],
1069
- u
1070
- ];
1071
- }), a;
1072
- }
1073
- function n(s) {
1074
- return typeof s == "string" || typeof s == "number" && !isNaN(s) || typeof s == "boolean" ? String(s) : "";
1075
- }
1076
- function i(s) {
1077
- const a = new URLSearchParams();
1078
- return Object.entries(s).forEach((u) => {
1079
- let [l, p] = u;
1080
- Array.isArray(p) ? p.forEach((d) => a.append(l, n(d))) : a.set(l, n(p));
1081
- }), a;
1082
- }
1083
- function o(s) {
1084
- for (var a = arguments.length, u = new Array(a > 1 ? a - 1 : 0), l = 1; l < a; l++)
1085
- u[l - 1] = arguments[l];
1086
- return u.forEach((p) => {
1087
- Array.from(p.keys()).forEach((d) => s.delete(d)), p.forEach((d, c) => s.append(c, d));
1088
- }), s;
1089
- }
1090
- }(Ue)), Ue;
1091
- }
1092
- var ze = {}, he = {}, Ut;
1093
- function Hn() {
1094
- if (Ut) return he;
1095
- Ut = 1;
1096
- function t(r) {
1097
- if (typeof WeakMap != "function") return null;
1098
- var n = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new WeakMap();
1099
- return (t = function(o) {
1100
- return o ? i : n;
1101
- })(r);
1102
- }
1103
- he._ = he._interop_require_wildcard = e;
1104
- function e(r, n) {
1105
- if (!n && r && r.__esModule) return r;
1106
- if (r === null || typeof r != "object" && typeof r != "function") return { default: r };
1107
- var i = t(n);
1108
- if (i && i.has(r)) return i.get(r);
1109
- var o = {}, s = Object.defineProperty && Object.getOwnPropertyDescriptor;
1110
- for (var a in r)
1111
- if (a !== "default" && Object.prototype.hasOwnProperty.call(r, a)) {
1112
- var u = s ? Object.getOwnPropertyDescriptor(r, a) : null;
1113
- u && (u.get || u.set) ? Object.defineProperty(o, a, u) : o[a] = r[a];
1114
- }
1115
- return o.default = r, i && i.set(r, o), o;
1116
- }
1117
- return he;
1118
- }
1119
- var zt;
1120
- function en() {
1121
- return zt || (zt = 1, function(t) {
1122
- Object.defineProperty(t, "__esModule", {
1123
- value: !0
1124
- });
1125
- function e(u, l) {
1126
- for (var p in l) Object.defineProperty(u, p, {
1127
- enumerable: !0,
1128
- get: l[p]
1129
- });
1130
- }
1131
- e(t, {
1132
- formatUrl: function() {
1133
- return o;
1134
- },
1135
- urlObjectKeys: function() {
1136
- return s;
1137
- },
1138
- formatWithValidation: function() {
1139
- return a;
1140
- }
1141
- });
1142
- const n = /* @__PURE__ */ Hn()._(Zr()), i = /https?|ftp|gopher|file/;
1143
- function o(u) {
1144
- let { auth: l, hostname: p } = u, d = u.protocol || "", c = u.pathname || "", m = u.hash || "", y = u.query || "", f = !1;
1145
- l = l ? encodeURIComponent(l).replace(/%3A/i, ":") + "@" : "", u.host ? f = l + u.host : p && (f = l + (~p.indexOf(":") ? "[" + p + "]" : p), u.port && (f += ":" + u.port)), y && typeof y == "object" && (y = String(n.urlQueryToSearchParams(y)));
1146
- let g = u.search || y && "?" + y || "";
1147
- return d && !d.endsWith(":") && (d += ":"), u.slashes || (!d || i.test(d)) && f !== !1 ? (f = "//" + (f || ""), c && c[0] !== "/" && (c = "/" + c)) : f || (f = ""), m && m[0] !== "#" && (m = "#" + m), g && g[0] !== "?" && (g = "?" + g), c = c.replace(/[?#]/g, encodeURIComponent), g = g.replace("#", "%23"), "" + d + f + c + g + m;
1148
- }
1149
- const s = [
1150
- "auth",
1151
- "hash",
1152
- "host",
1153
- "hostname",
1154
- "href",
1155
- "path",
1156
- "pathname",
1157
- "port",
1158
- "protocol",
1159
- "query",
1160
- "search",
1161
- "slashes"
1162
- ];
1163
- function a(u) {
1164
- return process.env.NODE_ENV === "development" && u !== null && typeof u == "object" && Object.keys(u).forEach((l) => {
1165
- s.includes(l) || console.warn("Unknown key passed via urlObject into url.format: " + l);
1166
- }), o(u);
1167
- }
1168
- }(ze)), ze;
1169
- }
1170
- var Be = {}, Bt;
1171
- function $n() {
1172
- return Bt || (Bt = 1, function(t) {
1173
- Object.defineProperty(t, "__esModule", {
1174
- value: !0
1175
- }), Object.defineProperty(t, "omit", {
1176
- enumerable: !0,
1177
- get: function() {
1178
- return e;
1179
- }
1180
- });
1181
- function e(r, n) {
1182
- const i = {};
1183
- return Object.keys(r).forEach((o) => {
1184
- n.includes(o) || (i[o] = r[o]);
1185
- }), i;
1186
- }
1187
- }(Be)), Be;
1188
- }
1189
- var Ve = {}, Vt;
1190
- function Ce() {
1191
- return Vt || (Vt = 1, function(t) {
1192
- Object.defineProperty(t, "__esModule", {
1193
- value: !0
1194
- });
1195
- function e(h, P) {
1196
- for (var v in P) Object.defineProperty(h, v, {
1197
- enumerable: !0,
1198
- get: P[v]
1199
- });
1200
- }
1201
- e(t, {
1202
- WEB_VITALS: function() {
1203
- return r;
1204
- },
1205
- execOnce: function() {
1206
- return n;
1207
- },
1208
- isAbsoluteUrl: function() {
1209
- return o;
1210
- },
1211
- getLocationOrigin: function() {
1212
- return s;
1213
- },
1214
- getURL: function() {
1215
- return a;
1216
- },
1217
- getDisplayName: function() {
1218
- return u;
1219
- },
1220
- isResSent: function() {
1221
- return l;
1222
- },
1223
- normalizeRepeatedSlashes: function() {
1224
- return p;
1225
- },
1226
- loadGetInitialProps: function() {
1227
- return d;
1228
- },
1229
- SP: function() {
1230
- return c;
1231
- },
1232
- ST: function() {
1233
- return m;
1234
- },
1235
- DecodeError: function() {
1236
- return y;
1237
- },
1238
- NormalizeError: function() {
1239
- return f;
1240
- },
1241
- PageNotFoundError: function() {
1242
- return g;
1243
- },
1244
- MissingStaticPage: function() {
1245
- return _;
1246
- },
1247
- MiddlewareNotFoundError: function() {
1248
- return w;
1249
- },
1250
- stringifyError: function() {
1251
- return b;
1252
- }
1253
- });
1254
- const r = [
1255
- "CLS",
1256
- "FCP",
1257
- "FID",
1258
- "INP",
1259
- "LCP",
1260
- "TTFB"
1261
- ];
1262
- function n(h) {
1263
- let P = !1, v;
1264
- return function() {
1265
- for (var R = arguments.length, I = new Array(R), N = 0; N < R; N++)
1266
- I[N] = arguments[N];
1267
- return P || (P = !0, v = h(...I)), v;
1268
- };
1269
- }
1270
- const i = /^[a-zA-Z][a-zA-Z\d+\-.]*?:/, o = (h) => i.test(h);
1271
- function s() {
1272
- const { protocol: h, hostname: P, port: v } = window.location;
1273
- return h + "//" + P + (v ? ":" + v : "");
1274
- }
1275
- function a() {
1276
- const { href: h } = window.location, P = s();
1277
- return h.substring(P.length);
1278
- }
1279
- function u(h) {
1280
- return typeof h == "string" ? h : h.displayName || h.name || "Unknown";
1281
- }
1282
- function l(h) {
1283
- return h.finished || h.headersSent;
1284
- }
1285
- function p(h) {
1286
- const P = h.split("?");
1287
- return P[0].replace(/\\/g, "/").replace(/\/\/+/g, "/") + (P[1] ? "?" + P.slice(1).join("?") : "");
1288
- }
1289
- async function d(h, P) {
1290
- if (process.env.NODE_ENV !== "production") {
1291
- var v;
1292
- if ((v = h.prototype) != null && v.getInitialProps) {
1293
- const N = '"' + u(h) + '.getInitialProps()" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.';
1294
- throw new Error(N);
1295
- }
1296
- }
1297
- const R = P.res || P.ctx && P.ctx.res;
1298
- if (!h.getInitialProps)
1299
- return P.ctx && P.Component ? {
1300
- pageProps: await d(P.Component, P.ctx)
1301
- } : {};
1302
- const I = await h.getInitialProps(P);
1303
- if (R && l(R))
1304
- return I;
1305
- if (!I) {
1306
- const N = '"' + u(h) + '.getInitialProps()" should resolve to an object. But found "' + I + '" instead.';
1307
- throw new Error(N);
1308
- }
1309
- return process.env.NODE_ENV !== "production" && Object.keys(I).length === 0 && !P.ctx && console.warn("" + u(h) + " returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps"), I;
1310
- }
1311
- const c = typeof performance < "u", m = c && [
1312
- "mark",
1313
- "measure",
1314
- "getEntriesByName"
1315
- ].every((h) => typeof performance[h] == "function");
1316
- class y extends Error {
1317
- }
1318
- class f extends Error {
1319
- }
1320
- class g extends Error {
1321
- constructor(P) {
1322
- super(), this.code = "ENOENT", this.name = "PageNotFoundError", this.message = "Cannot find module for page: " + P;
1323
- }
1324
- }
1325
- class _ extends Error {
1326
- constructor(P, v) {
1327
- super(), this.message = "Failed to load static file for page: " + P + " " + v;
1328
- }
1329
- }
1330
- class w extends Error {
1331
- constructor() {
1332
- super(), this.code = "ENOENT", this.message = "Cannot find the middleware module";
1333
- }
1334
- }
1335
- function b(h) {
1336
- return JSON.stringify({
1337
- message: h.message,
1338
- stack: h.stack
1339
- });
1340
- }
1341
- }(Ve)), Ve;
1342
- }
1343
- var ge = { exports: {} }, Fe = {}, Ft;
1344
- function tn() {
1345
- return Ft || (Ft = 1, function(t) {
1346
- Object.defineProperty(t, "__esModule", {
1347
- value: !0
1348
- }), Object.defineProperty(t, "removeTrailingSlash", {
1349
- enumerable: !0,
1350
- get: function() {
1351
- return e;
1352
- }
1353
- });
1354
- function e(r) {
1355
- return r.replace(/\/$/, "") || "/";
1356
- }
1357
- }(Fe)), Fe;
1358
- }
1359
- var We = {}, Wt;
1360
- function Rt() {
1361
- return Wt || (Wt = 1, function(t) {
1362
- Object.defineProperty(t, "__esModule", {
1363
- value: !0
1364
- }), Object.defineProperty(t, "parsePath", {
1365
- enumerable: !0,
1366
- get: function() {
1367
- return e;
1368
- }
1369
- });
1370
- function e(r) {
1371
- const n = r.indexOf("#"), i = r.indexOf("?"), o = i > -1 && (n < 0 || i < n);
1372
- return o || n > -1 ? {
1373
- pathname: r.substring(0, o ? i : n),
1374
- query: o ? r.substring(i, n > -1 ? n : void 0) : "",
1375
- hash: n > -1 ? r.slice(n) : ""
1376
- } : {
1377
- pathname: r,
1378
- query: "",
1379
- hash: ""
1380
- };
1381
- }
1382
- }(We)), We;
1383
- }
1384
- var Ht;
1385
- function Ae() {
1386
- return Ht || (Ht = 1, function(t, e) {
1387
- Object.defineProperty(e, "__esModule", {
1388
- value: !0
1389
- }), Object.defineProperty(e, "normalizePathTrailingSlash", {
1390
- enumerable: !0,
1391
- get: function() {
1392
- return i;
1393
- }
1394
- });
1395
- const r = tn(), n = Rt(), i = (o) => {
1396
- if (!o.startsWith("/") || process.env.__NEXT_MANUAL_TRAILING_SLASH)
1397
- return o;
1398
- const { pathname: s, query: a, hash: u } = (0, n.parsePath)(o);
1399
- return process.env.__NEXT_TRAILING_SLASH ? /\.[^/]+\/?$/.test(s) ? "" + (0, r.removeTrailingSlash)(s) + a + u : s.endsWith("/") ? "" + s + a + u : s + "/" + a + u : "" + (0, r.removeTrailingSlash)(s) + a + u;
1400
- };
1401
- (typeof e.default == "function" || typeof e.default == "object" && e.default !== null) && typeof e.default.__esModule > "u" && (Object.defineProperty(e.default, "__esModule", { value: !0 }), Object.assign(e.default, e), t.exports = e.default);
1402
- }(ge, ge.exports)), ge.exports;
1403
- }
1404
- var He = {}, ye = { exports: {} }, $e = {}, $t;
1405
- function rn() {
1406
- return $t || ($t = 1, function(t) {
1407
- Object.defineProperty(t, "__esModule", {
1408
- value: !0
1409
- }), Object.defineProperty(t, "pathHasPrefix", {
1410
- enumerable: !0,
1411
- get: function() {
1412
- return r;
1413
- }
1414
- });
1415
- const e = Rt();
1416
- function r(n, i) {
1417
- if (typeof n != "string")
1418
- return !1;
1419
- const { pathname: o } = (0, e.parsePath)(n);
1420
- return o === i || o.startsWith(i + "/");
1421
- }
1422
- }($e)), $e;
1423
- }
1424
- var Gt;
1425
- function Gn() {
1426
- return Gt || (Gt = 1, function(t, e) {
1427
- Object.defineProperty(e, "__esModule", {
1428
- value: !0
1429
- }), Object.defineProperty(e, "hasBasePath", {
1430
- enumerable: !0,
1431
- get: function() {
1432
- return i;
1433
- }
1434
- });
1435
- const r = rn(), n = process.env.__NEXT_ROUTER_BASEPATH || "";
1436
- function i(o) {
1437
- return (0, r.pathHasPrefix)(o, n);
1438
- }
1439
- (typeof e.default == "function" || typeof e.default == "object" && e.default !== null) && typeof e.default.__esModule > "u" && (Object.defineProperty(e.default, "__esModule", { value: !0 }), Object.assign(e.default, e), t.exports = e.default);
1440
- }(ye, ye.exports)), ye.exports;
1441
- }
1442
- var Kt;
1443
- function nn() {
1444
- return Kt || (Kt = 1, function(t) {
1445
- Object.defineProperty(t, "__esModule", {
1446
- value: !0
1447
- }), Object.defineProperty(t, "isLocalURL", {
1448
- enumerable: !0,
1449
- get: function() {
1450
- return n;
1451
- }
1452
- });
1453
- const e = Ce(), r = Gn();
1454
- function n(i) {
1455
- if (!(0, e.isAbsoluteUrl)(i)) return !0;
1456
- try {
1457
- const o = (0, e.getLocationOrigin)(), s = new URL(i, o);
1458
- return s.origin === o && (0, r.hasBasePath)(s.pathname);
1459
- } catch {
1460
- return !1;
1461
- }
1462
- }
1463
- }(He)), He;
1464
- }
1465
- var Ge = {}, Ke = {}, Qt;
1466
- function Kn() {
1467
- return Qt || (Qt = 1, function(t) {
1468
- Object.defineProperty(t, "__esModule", {
1469
- value: !0
1470
- }), Object.defineProperty(t, "getSortedRoutes", {
1471
- enumerable: !0,
1472
- get: function() {
1473
- return r;
1474
- }
1475
- });
1476
- class e {
1477
- insert(i) {
1478
- this._insert(i.split("/").filter(Boolean), [], !1);
1479
- }
1480
- smoosh() {
1481
- return this._smoosh();
1482
- }
1483
- _smoosh(i) {
1484
- i === void 0 && (i = "/");
1485
- const o = [
1486
- ...this.children.keys()
1487
- ].sort();
1488
- this.slugName !== null && o.splice(o.indexOf("[]"), 1), this.restSlugName !== null && o.splice(o.indexOf("[...]"), 1), this.optionalRestSlugName !== null && o.splice(o.indexOf("[[...]]"), 1);
1489
- const s = o.map((a) => this.children.get(a)._smoosh("" + i + a + "/")).reduce((a, u) => [
1490
- ...a,
1491
- ...u
1492
- ], []);
1493
- if (this.slugName !== null && s.push(...this.children.get("[]")._smoosh(i + "[" + this.slugName + "]/")), !this.placeholder) {
1494
- const a = i === "/" ? "/" : i.slice(0, -1);
1495
- if (this.optionalRestSlugName != null)
1496
- throw new Error('You cannot define a route with the same specificity as a optional catch-all route ("' + a + '" and "' + a + "[[..." + this.optionalRestSlugName + ']]").');
1497
- s.unshift(a);
1498
- }
1499
- return this.restSlugName !== null && s.push(...this.children.get("[...]")._smoosh(i + "[..." + this.restSlugName + "]/")), this.optionalRestSlugName !== null && s.push(...this.children.get("[[...]]")._smoosh(i + "[[..." + this.optionalRestSlugName + "]]/")), s;
1500
- }
1501
- _insert(i, o, s) {
1502
- if (i.length === 0) {
1503
- this.placeholder = !1;
1504
- return;
1505
- }
1506
- if (s)
1507
- throw new Error("Catch-all must be the last part of the URL.");
1508
- let a = i[0];
1509
- if (a.startsWith("[") && a.endsWith("]")) {
1510
- let p = function(d, c) {
1511
- if (d !== null && d !== c)
1512
- throw new Error("You cannot use different slug names for the same dynamic path ('" + d + "' !== '" + c + "').");
1513
- o.forEach((m) => {
1514
- if (m === c)
1515
- throw new Error('You cannot have the same slug name "' + c + '" repeat within a single dynamic path');
1516
- if (m.replace(/\W/g, "") === a.replace(/\W/g, ""))
1517
- throw new Error('You cannot have the slug names "' + m + '" and "' + c + '" differ only by non-word symbols within a single dynamic path');
1518
- }), o.push(c);
1519
- }, u = a.slice(1, -1), l = !1;
1520
- if (u.startsWith("[") && u.endsWith("]") && (u = u.slice(1, -1), l = !0), u.startsWith("...") && (u = u.substring(3), s = !0), u.startsWith("[") || u.endsWith("]"))
1521
- throw new Error("Segment names may not start or end with extra brackets ('" + u + "').");
1522
- if (u.startsWith("."))
1523
- throw new Error("Segment names may not start with erroneous periods ('" + u + "').");
1524
- if (s)
1525
- if (l) {
1526
- if (this.restSlugName != null)
1527
- throw new Error('You cannot use both an required and optional catch-all route at the same level ("[...' + this.restSlugName + ']" and "' + i[0] + '" ).');
1528
- p(this.optionalRestSlugName, u), this.optionalRestSlugName = u, a = "[[...]]";
1529
- } else {
1530
- if (this.optionalRestSlugName != null)
1531
- throw new Error('You cannot use both an optional and required catch-all route at the same level ("[[...' + this.optionalRestSlugName + ']]" and "' + i[0] + '").');
1532
- p(this.restSlugName, u), this.restSlugName = u, a = "[...]";
1533
- }
1534
- else {
1535
- if (l)
1536
- throw new Error('Optional route parameters are not yet supported ("' + i[0] + '").');
1537
- p(this.slugName, u), this.slugName = u, a = "[]";
1538
- }
1539
- }
1540
- this.children.has(a) || this.children.set(a, new e()), this.children.get(a)._insert(i.slice(1), o, s);
1541
- }
1542
- constructor() {
1543
- this.placeholder = !0, this.children = /* @__PURE__ */ new Map(), this.slugName = null, this.restSlugName = null, this.optionalRestSlugName = null;
1544
- }
1545
- }
1546
- function r(n) {
1547
- const i = new e();
1548
- return n.forEach((o) => i.insert(o)), i.smoosh();
1549
- }
1550
- }(Ke)), Ke;
1551
- }
1552
- var Qe = {}, Xt;
1553
- function Qn() {
1554
- return Xt || (Xt = 1, function(t) {
1555
- Object.defineProperty(t, "__esModule", {
1556
- value: !0
1557
- }), Object.defineProperty(t, "isDynamicRoute", {
1558
- enumerable: !0,
1559
- get: function() {
1560
- return r;
1561
- }
1562
- });
1563
- const e = /\/\[[^/]+?\](?=\/|$)/;
1564
- function r(n) {
1565
- return e.test(n);
1566
- }
1567
- }(Qe)), Qe;
1568
- }
1569
- var Yt;
1570
- function Xn() {
1571
- return Yt || (Yt = 1, function(t) {
1572
- Object.defineProperty(t, "__esModule", {
1573
- value: !0
1574
- });
1575
- function e(i, o) {
1576
- for (var s in o) Object.defineProperty(i, s, {
1577
- enumerable: !0,
1578
- get: o[s]
1579
- });
1580
- }
1581
- e(t, {
1582
- getSortedRoutes: function() {
1583
- return r.getSortedRoutes;
1584
- },
1585
- isDynamicRoute: function() {
1586
- return n.isDynamicRoute;
1587
- }
1588
- });
1589
- const r = Kn(), n = Qn();
1590
- }(Ge)), Ge;
1591
- }
1592
- var Xe = {}, Ye = {}, Jt;
1593
- function Yn() {
1594
- return Jt || (Jt = 1, function(t) {
1595
- Object.defineProperty(t, "__esModule", {
1596
- value: !0
1597
- }), Object.defineProperty(t, "getRouteMatcher", {
1598
- enumerable: !0,
1599
- get: function() {
1600
- return r;
1601
- }
1602
- });
1603
- const e = Ce();
1604
- function r(n) {
1605
- let { re: i, groups: o } = n;
1606
- return (s) => {
1607
- const a = i.exec(s);
1608
- if (!a)
1609
- return !1;
1610
- const u = (p) => {
1611
- try {
1612
- return decodeURIComponent(p);
1613
- } catch {
1614
- throw new e.DecodeError("failed to decode param");
1615
- }
1616
- }, l = {};
1617
- return Object.keys(o).forEach((p) => {
1618
- const d = o[p], c = a[d.pos];
1619
- c !== void 0 && (l[p] = ~c.indexOf("/") ? c.split("/").map((m) => u(m)) : d.repeat ? [
1620
- u(c)
1621
- ] : u(c));
1622
- }), l;
1623
- };
1624
- }
1625
- }(Ye)), Ye;
1626
- }
1627
- var Je = {}, Ze = {}, et = {}, tt = {}, Zt;
1628
- function Jn() {
1629
- return Zt || (Zt = 1, function(t) {
1630
- Object.defineProperty(t, "__esModule", {
1631
- value: !0
1632
- }), Object.defineProperty(t, "ensureLeadingSlash", {
1633
- enumerable: !0,
1634
- get: function() {
1635
- return e;
1636
- }
1637
- });
1638
- function e(r) {
1639
- return r.startsWith("/") ? r : "/" + r;
1640
- }
1641
- }(tt)), tt;
1642
- }
1643
- var rt = {}, er;
1644
- function Zn() {
1645
- return er || (er = 1, function(t) {
1646
- Object.defineProperty(t, "__esModule", {
1647
- value: !0
1648
- }), Object.defineProperty(t, "isGroupSegment", {
1649
- enumerable: !0,
1650
- get: function() {
1651
- return e;
1652
- }
1653
- });
1654
- function e(r) {
1655
- return r[0] === "(" && r.endsWith(")");
1656
- }
1657
- }(rt)), rt;
1658
- }
1659
- var tr;
1660
- function eo() {
1661
- return tr || (tr = 1, function(t) {
1662
- Object.defineProperty(t, "__esModule", {
1663
- value: !0
1664
- });
1665
- function e(s, a) {
1666
- for (var u in a) Object.defineProperty(s, u, {
1667
- enumerable: !0,
1668
- get: a[u]
1669
- });
1670
- }
1671
- e(t, {
1672
- normalizeAppPath: function() {
1673
- return i;
1674
- },
1675
- normalizeRscPath: function() {
1676
- return o;
1677
- }
1678
- });
1679
- const r = Jn(), n = Zn();
1680
- function i(s) {
1681
- return (0, r.ensureLeadingSlash)(s.split("/").reduce((a, u, l, p) => !u || (0, n.isGroupSegment)(u) || u[0] === "@" || (u === "page" || u === "route") && l === p.length - 1 ? a : a + "/" + u, ""));
1682
- }
1683
- function o(s, a) {
1684
- return a ? s.replace(
1685
- /\.rsc($|\?)/,
1686
- // $1 ensures `?` is preserved
1687
- "$1"
1688
- ) : s;
1689
- }
1690
- }(et)), et;
1691
- }
1692
- var rr;
1693
- function to() {
1694
- return rr || (rr = 1, function(t) {
1695
- Object.defineProperty(t, "__esModule", {
1696
- value: !0
1697
- });
1698
- function e(s, a) {
1699
- for (var u in a) Object.defineProperty(s, u, {
1700
- enumerable: !0,
1701
- get: a[u]
1702
- });
1703
- }
1704
- e(t, {
1705
- INTERCEPTION_ROUTE_MARKERS: function() {
1706
- return n;
1707
- },
1708
- isInterceptionRouteAppPath: function() {
1709
- return i;
1710
- },
1711
- extractInterceptionRouteInformation: function() {
1712
- return o;
1713
- }
1714
- });
1715
- const r = eo(), n = [
1716
- "(..)(..)",
1717
- "(.)",
1718
- "(..)",
1719
- "(...)"
1720
- ];
1721
- function i(s) {
1722
- return s.split("/").find((a) => n.find((u) => a.startsWith(u))) !== void 0;
1723
- }
1724
- function o(s) {
1725
- let a, u, l;
1726
- for (const p of s.split("/"))
1727
- if (u = n.find((d) => p.startsWith(d)), u) {
1728
- [a, l] = s.split(u, 2);
1729
- break;
1730
- }
1731
- if (!a || !u || !l)
1732
- throw new Error(`Invalid interception route: ${s}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`);
1733
- switch (a = (0, r.normalizeAppPath)(a), u) {
1734
- case "(.)":
1735
- a === "/" ? l = `/${l}` : l = a + "/" + l;
1736
- break;
1737
- case "(..)":
1738
- if (a === "/")
1739
- throw new Error(`Invalid interception route: ${s}. Cannot use (..) marker at the root level, use (.) instead.`);
1740
- l = a.split("/").slice(0, -1).concat(l).join("/");
1741
- break;
1742
- case "(...)":
1743
- l = "/" + l;
1744
- break;
1745
- case "(..)(..)":
1746
- const p = a.split("/");
1747
- if (p.length <= 2)
1748
- throw new Error(`Invalid interception route: ${s}. Cannot use (..)(..) marker at the root level or one level up.`);
1749
- l = p.slice(0, -2).concat(l).join("/");
1750
- break;
1751
- default:
1752
- throw new Error("Invariant: unexpected marker");
1753
- }
1754
- return {
1755
- interceptingRoute: a,
1756
- interceptedRoute: l
1757
- };
1758
- }
1759
- }(Ze)), Ze;
1760
- }
1761
- var nt = {}, nr;
1762
- function ro() {
1763
- return nr || (nr = 1, function(t) {
1764
- Object.defineProperty(t, "__esModule", {
1765
- value: !0
1766
- }), Object.defineProperty(t, "escapeStringRegexp", {
1767
- enumerable: !0,
1768
- get: function() {
1769
- return n;
1770
- }
1771
- });
1772
- const e = /[|\\{}()[\]^$+*?.-]/, r = /[|\\{}()[\]^$+*?.-]/g;
1773
- function n(i) {
1774
- return e.test(i) ? i.replace(r, "\\$&") : i;
1775
- }
1776
- }(nt)), nt;
1777
- }
1778
- var or;
1779
- function no() {
1780
- return or || (or = 1, function(t) {
1781
- Object.defineProperty(t, "__esModule", {
1782
- value: !0
1783
- });
1784
- function e(f, g) {
1785
- for (var _ in g) Object.defineProperty(f, _, {
1786
- enumerable: !0,
1787
- get: g[_]
1788
- });
1789
- }
1790
- e(t, {
1791
- getRouteRegex: function() {
1792
- return l;
1793
- },
1794
- getNamedRouteRegex: function() {
1795
- return m;
1796
- },
1797
- getNamedMiddlewareRegex: function() {
1798
- return y;
1799
- }
1800
- });
1801
- const r = to(), n = ro(), i = tn(), o = "nxtP", s = "nxtI";
1802
- function a(f) {
1803
- const g = f.startsWith("[") && f.endsWith("]");
1804
- g && (f = f.slice(1, -1));
1805
- const _ = f.startsWith("...");
1806
- return _ && (f = f.slice(3)), {
1807
- key: f,
1808
- repeat: _,
1809
- optional: g
1810
- };
1811
- }
1812
- function u(f) {
1813
- const g = (0, i.removeTrailingSlash)(f).slice(1).split("/"), _ = {};
1814
- let w = 1;
1815
- return {
1816
- parameterizedRoute: g.map((b) => {
1817
- const h = r.INTERCEPTION_ROUTE_MARKERS.find((v) => b.startsWith(v)), P = b.match(/\[((?:\[.*\])|.+)\]/);
1818
- if (h && P) {
1819
- const { key: v, optional: R, repeat: I } = a(P[1]);
1820
- return _[v] = {
1821
- pos: w++,
1822
- repeat: I,
1823
- optional: R
1824
- }, "/" + (0, n.escapeStringRegexp)(h) + "([^/]+?)";
1825
- } else if (P) {
1826
- const { key: v, repeat: R, optional: I } = a(P[1]);
1827
- return _[v] = {
1828
- pos: w++,
1829
- repeat: R,
1830
- optional: I
1831
- }, R ? I ? "(?:/(.+?))?" : "/(.+?)" : "/([^/]+?)";
1832
- } else
1833
- return "/" + (0, n.escapeStringRegexp)(b);
1834
- }).join(""),
1835
- groups: _
1836
- };
1837
- }
1838
- function l(f) {
1839
- const { parameterizedRoute: g, groups: _ } = u(f);
1840
- return {
1841
- re: new RegExp("^" + g + "(?:/)?$"),
1842
- groups: _
1843
- };
1844
- }
1845
- function p() {
1846
- let f = 0;
1847
- return () => {
1848
- let g = "", _ = ++f;
1849
- for (; _ > 0; )
1850
- g += String.fromCharCode(97 + (_ - 1) % 26), _ = Math.floor((_ - 1) / 26);
1851
- return g;
1852
- };
1853
- }
1854
- function d(f) {
1855
- let { getSafeRouteKey: g, segment: _, routeKeys: w, keyPrefix: b } = f;
1856
- const { key: h, optional: P, repeat: v } = a(_);
1857
- let R = h.replace(/\W/g, "");
1858
- b && (R = "" + b + R);
1859
- let I = !1;
1860
- return (R.length === 0 || R.length > 30) && (I = !0), isNaN(parseInt(R.slice(0, 1))) || (I = !0), I && (R = g()), b ? w[R] = "" + b + h : w[R] = "" + h, v ? P ? "(?:/(?<" + R + ">.+?))?" : "/(?<" + R + ">.+?)" : "/(?<" + R + ">[^/]+?)";
1861
- }
1862
- function c(f, g) {
1863
- const _ = (0, i.removeTrailingSlash)(f).slice(1).split("/"), w = p(), b = {};
1864
- return {
1865
- namedParameterizedRoute: _.map((h) => {
1866
- const P = r.INTERCEPTION_ROUTE_MARKERS.some((R) => h.startsWith(R)), v = h.match(/\[((?:\[.*\])|.+)\]/);
1867
- return P && v ? d({
1868
- getSafeRouteKey: w,
1869
- segment: v[1],
1870
- routeKeys: b,
1871
- keyPrefix: g ? s : void 0
1872
- }) : v ? d({
1873
- getSafeRouteKey: w,
1874
- segment: v[1],
1875
- routeKeys: b,
1876
- keyPrefix: g ? o : void 0
1877
- }) : "/" + (0, n.escapeStringRegexp)(h);
1878
- }).join(""),
1879
- routeKeys: b
1880
- };
1881
- }
1882
- function m(f, g) {
1883
- const _ = c(f, g);
1884
- return {
1885
- ...l(f),
1886
- namedRegex: "^" + _.namedParameterizedRoute + "(?:/)?$",
1887
- routeKeys: _.routeKeys
1888
- };
1889
- }
1890
- function y(f, g) {
1891
- const { parameterizedRoute: _ } = u(f), { catchAll: w = !0 } = g;
1892
- if (_ === "/")
1893
- return {
1894
- namedRegex: "^/" + (w ? ".*" : "") + "$"
1895
- };
1896
- const { namedParameterizedRoute: b } = c(f, !1);
1897
- let h = w ? "(?:(/.*)?)" : "";
1898
- return {
1899
- namedRegex: "^" + b + h + "$"
1900
- };
1901
- }
1902
- }(Je)), Je;
1903
- }
1904
- var ir;
1905
- function oo() {
1906
- return ir || (ir = 1, function(t) {
1907
- Object.defineProperty(t, "__esModule", {
1908
- value: !0
1909
- }), Object.defineProperty(t, "interpolateAs", {
1910
- enumerable: !0,
1911
- get: function() {
1912
- return n;
1913
- }
1914
- });
1915
- const e = Yn(), r = no();
1916
- function n(i, o, s) {
1917
- let a = "";
1918
- const u = (0, r.getRouteRegex)(i), l = u.groups, p = (
1919
- // Try to match the dynamic route against the asPath
1920
- (o !== i ? (0, e.getRouteMatcher)(u)(o) : "") || // Fall back to reading the values from the href
1921
- // TODO: should this take priority; also need to change in the router.
1922
- s
1923
- );
1924
- a = i;
1925
- const d = Object.keys(l);
1926
- return d.every((c) => {
1927
- let m = p[c] || "";
1928
- const { repeat: y, optional: f } = l[c];
1929
- let g = "[" + (y ? "..." : "") + c + "]";
1930
- return f && (g = (m ? "" : "/") + "[" + g + "]"), y && !Array.isArray(m) && (m = [
1931
- m
1932
- ]), (f || c in p) && // Interpolate group into data URL if present
1933
- (a = a.replace(g, y ? m.map(
1934
- // these values should be fully encoded instead of just
1935
- // path delimiter escaped since they are being inserted
1936
- // into the URL and we expect URL encoded segments
1937
- // when parsing dynamic route params
1938
- (_) => encodeURIComponent(_)
1939
- ).join("/") : encodeURIComponent(m)) || "/");
1940
- }) || (a = ""), {
1941
- params: d,
1942
- result: a
1943
- };
1944
- }
1945
- }(Xe)), Xe;
1946
- }
1947
- var ar;
1948
- function io() {
1949
- return ar || (ar = 1, function(t, e) {
1950
- Object.defineProperty(e, "__esModule", {
1951
- value: !0
1952
- }), Object.defineProperty(e, "resolveHref", {
1953
- enumerable: !0,
1954
- get: function() {
1955
- return p;
1956
- }
1957
- });
1958
- const r = Zr(), n = en(), i = $n(), o = Ce(), s = Ae(), a = nn(), u = Xn(), l = oo();
1959
- function p(d, c, m) {
1960
- let y, f = typeof c == "string" ? c : (0, n.formatWithValidation)(c);
1961
- const g = f.match(/^[a-zA-Z]{1,}:\/\//), _ = g ? f.slice(g[0].length) : f;
1962
- if ((_.split("?")[0] || "").match(/(\/\/|\\)/)) {
1963
- console.error("Invalid href '" + f + "' passed to next/router in page: '" + d.pathname + "'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");
1964
- const b = (0, o.normalizeRepeatedSlashes)(_);
1965
- f = (g ? g[0] : "") + b;
1966
- }
1967
- if (!(0, a.isLocalURL)(f))
1968
- return m ? [
1969
- f
1970
- ] : f;
1971
- try {
1972
- y = new URL(f.startsWith("#") ? d.asPath : d.pathname, "http://n");
1973
- } catch {
1974
- y = new URL("/", "http://n");
1975
- }
1976
- try {
1977
- const b = new URL(f, y);
1978
- b.pathname = (0, s.normalizePathTrailingSlash)(b.pathname);
1979
- let h = "";
1980
- if ((0, u.isDynamicRoute)(b.pathname) && b.searchParams && m) {
1981
- const v = (0, r.searchParamsToUrlQuery)(b.searchParams), { result: R, params: I } = (0, l.interpolateAs)(b.pathname, b.pathname, v);
1982
- R && (h = (0, n.formatWithValidation)({
1983
- pathname: R,
1984
- hash: b.hash,
1985
- query: (0, i.omit)(v, I)
1986
- }));
1987
- }
1988
- const P = b.origin === y.origin ? b.href.slice(b.origin.length) : b.href;
1989
- return m ? [
1990
- P,
1991
- h || P
1992
- ] : P;
1993
- } catch {
1994
- return m ? [
1995
- f
1996
- ] : f;
1997
- }
1998
- }
1999
- (typeof e.default == "function" || typeof e.default == "object" && e.default !== null) && typeof e.default.__esModule > "u" && (Object.defineProperty(e.default, "__esModule", { value: !0 }), Object.assign(e.default, e), t.exports = e.default);
2000
- }(me, me.exports)), me.exports;
2001
- }
2002
- var _e = { exports: {} }, ot = {}, it = {}, sr;
2003
- function on() {
2004
- return sr || (sr = 1, function(t) {
2005
- Object.defineProperty(t, "__esModule", {
2006
- value: !0
2007
- }), Object.defineProperty(t, "addPathPrefix", {
2008
- enumerable: !0,
2009
- get: function() {
2010
- return r;
2011
- }
2012
- });
2013
- const e = Rt();
2014
- function r(n, i) {
2015
- if (!n.startsWith("/") || !i)
2016
- return n;
2017
- const { pathname: o, query: s, hash: a } = (0, e.parsePath)(n);
2018
- return "" + i + o + s + a;
2019
- }
2020
- }(it)), it;
2021
- }
2022
- var ur;
2023
- function ao() {
2024
- return ur || (ur = 1, function(t) {
2025
- Object.defineProperty(t, "__esModule", {
2026
- value: !0
2027
- }), Object.defineProperty(t, "addLocale", {
2028
- enumerable: !0,
2029
- get: function() {
2030
- return n;
2031
- }
2032
- });
2033
- const e = on(), r = rn();
2034
- function n(i, o, s, a) {
2035
- if (!o || o === s) return i;
2036
- const u = i.toLowerCase();
2037
- return !a && ((0, r.pathHasPrefix)(u, "/api") || (0, r.pathHasPrefix)(u, "/" + o.toLowerCase())) ? i : (0, e.addPathPrefix)(i, "/" + o);
2038
- }
2039
- }(ot)), ot;
2040
- }
2041
- var cr;
2042
- function so() {
2043
- return cr || (cr = 1, function(t, e) {
2044
- Object.defineProperty(e, "__esModule", {
2045
- value: !0
2046
- }), Object.defineProperty(e, "addLocale", {
2047
- enumerable: !0,
2048
- get: function() {
2049
- return n;
2050
- }
2051
- });
2052
- const r = Ae(), n = function(i) {
2053
- for (var o = arguments.length, s = new Array(o > 1 ? o - 1 : 0), a = 1; a < o; a++)
2054
- s[a - 1] = arguments[a];
2055
- return process.env.__NEXT_I18N_SUPPORT ? (0, r.normalizePathTrailingSlash)(ao().addLocale(i, ...s)) : i;
2056
- };
2057
- (typeof e.default == "function" || typeof e.default == "object" && e.default !== null) && typeof e.default.__esModule > "u" && (Object.defineProperty(e.default, "__esModule", { value: !0 }), Object.assign(e.default, e), t.exports = e.default);
2058
- }(_e, _e.exports)), _e.exports;
2059
- }
2060
- var at = {}, lr;
2061
- function uo() {
2062
- return lr || (lr = 1, function(t) {
2063
- Object.defineProperty(t, "__esModule", {
2064
- value: !0
2065
- }), Object.defineProperty(t, "RouterContext", {
2066
- enumerable: !0,
2067
- get: function() {
2068
- return n;
2069
- }
2070
- });
2071
- const n = (/* @__PURE__ */ ce._(Se)).default.createContext(null);
2072
- process.env.NODE_ENV !== "production" && (n.displayName = "RouterContext");
2073
- }(at)), at;
2074
- }
2075
- var st = {}, dr;
2076
- function co() {
2077
- return dr || (dr = 1, function(t) {
2078
- "use client";
2079
- Object.defineProperty(t, "__esModule", {
2080
- value: !0
2081
- });
2082
- function e(l, p) {
2083
- for (var d in p) Object.defineProperty(l, d, {
2084
- enumerable: !0,
2085
- get: p[d]
2086
- });
2087
- }
2088
- e(t, {
2089
- CacheStates: function() {
2090
- return i;
2091
- },
2092
- AppRouterContext: function() {
2093
- return o;
2094
- },
2095
- LayoutRouterContext: function() {
2096
- return s;
2097
- },
2098
- GlobalLayoutRouterContext: function() {
2099
- return a;
2100
- },
2101
- TemplateContext: function() {
2102
- return u;
2103
- }
2104
- });
2105
- const n = /* @__PURE__ */ ce._(Se);
2106
- var i;
2107
- (function(l) {
2108
- l.LAZY_INITIALIZED = "LAZYINITIALIZED", l.DATA_FETCH = "DATAFETCH", l.READY = "READY";
2109
- })(i || (i = {}));
2110
- const o = n.default.createContext(null), s = n.default.createContext(null), a = n.default.createContext(null), u = n.default.createContext(null);
2111
- process.env.NODE_ENV !== "production" && (o.displayName = "AppRouterContext", s.displayName = "LayoutRouterContext", a.displayName = "GlobalLayoutRouterContext", u.displayName = "TemplateContext");
2112
- }(st)), st;
2113
- }
2114
- var ve = { exports: {} }, be = { exports: {} }, fr;
2115
- function lo() {
2116
- return fr || (fr = 1, function(t, e) {
2117
- Object.defineProperty(e, "__esModule", {
2118
- value: !0
2119
- });
2120
- function r(o, s) {
2121
- for (var a in s) Object.defineProperty(o, a, {
2122
- enumerable: !0,
2123
- get: s[a]
2124
- });
2125
- }
2126
- r(e, {
2127
- requestIdleCallback: function() {
2128
- return n;
2129
- },
2130
- cancelIdleCallback: function() {
2131
- return i;
2132
- }
2133
- });
2134
- const n = typeof self < "u" && self.requestIdleCallback && self.requestIdleCallback.bind(window) || function(o) {
2135
- let s = Date.now();
2136
- return self.setTimeout(function() {
2137
- o({
2138
- didTimeout: !1,
2139
- timeRemaining: function() {
2140
- return Math.max(0, 50 - (Date.now() - s));
2141
- }
2142
- });
2143
- }, 1);
2144
- }, i = typeof self < "u" && self.cancelIdleCallback && self.cancelIdleCallback.bind(window) || function(o) {
2145
- return clearTimeout(o);
2146
- };
2147
- (typeof e.default == "function" || typeof e.default == "object" && e.default !== null) && typeof e.default.__esModule > "u" && (Object.defineProperty(e.default, "__esModule", { value: !0 }), Object.assign(e.default, e), t.exports = e.default);
2148
- }(be, be.exports)), be.exports;
2149
- }
2150
- var pr;
2151
- function fo() {
2152
- return pr || (pr = 1, function(t, e) {
2153
- Object.defineProperty(e, "__esModule", {
2154
- value: !0
2155
- }), Object.defineProperty(e, "useIntersection", {
2156
- enumerable: !0,
2157
- get: function() {
2158
- return l;
2159
- }
2160
- });
2161
- const r = Se, n = lo(), i = typeof IntersectionObserver == "function", o = /* @__PURE__ */ new Map(), s = [];
2162
- function a(p) {
2163
- const d = {
2164
- root: p.root || null,
2165
- margin: p.rootMargin || ""
2166
- }, c = s.find((g) => g.root === d.root && g.margin === d.margin);
2167
- let m;
2168
- if (c && (m = o.get(c), m))
2169
- return m;
2170
- const y = /* @__PURE__ */ new Map(), f = new IntersectionObserver((g) => {
2171
- g.forEach((_) => {
2172
- const w = y.get(_.target), b = _.isIntersecting || _.intersectionRatio > 0;
2173
- w && b && w(b);
2174
- });
2175
- }, p);
2176
- return m = {
2177
- id: d,
2178
- observer: f,
2179
- elements: y
2180
- }, s.push(d), o.set(d, m), m;
2181
- }
2182
- function u(p, d, c) {
2183
- const { id: m, observer: y, elements: f } = a(c);
2184
- return f.set(p, d), y.observe(p), function() {
2185
- if (f.delete(p), y.unobserve(p), f.size === 0) {
2186
- y.disconnect(), o.delete(m);
2187
- const _ = s.findIndex((w) => w.root === m.root && w.margin === m.margin);
2188
- _ > -1 && s.splice(_, 1);
2189
- }
2190
- };
2191
- }
2192
- function l(p) {
2193
- let { rootRef: d, rootMargin: c, disabled: m } = p;
2194
- const y = m || !i, [f, g] = (0, r.useState)(!1), _ = (0, r.useRef)(null), w = (0, r.useCallback)((h) => {
2195
- _.current = h;
2196
- }, []);
2197
- (0, r.useEffect)(() => {
2198
- if (i) {
2199
- if (y || f) return;
2200
- const h = _.current;
2201
- if (h && h.tagName)
2202
- return u(h, (v) => v && g(v), {
2203
- root: d == null ? void 0 : d.current,
2204
- rootMargin: c
2205
- });
2206
- } else if (!f) {
2207
- const h = (0, n.requestIdleCallback)(() => g(!0));
2208
- return () => (0, n.cancelIdleCallback)(h);
2209
- }
2210
- }, [
2211
- y,
2212
- c,
2213
- d,
2214
- f,
2215
- _.current
2216
- ]);
2217
- const b = (0, r.useCallback)(() => {
2218
- g(!1);
2219
- }, []);
2220
- return [
2221
- w,
2222
- f,
2223
- b
2224
- ];
2225
- }
2226
- (typeof e.default == "function" || typeof e.default == "object" && e.default !== null) && typeof e.default.__esModule > "u" && (Object.defineProperty(e.default, "__esModule", { value: !0 }), Object.assign(e.default, e), t.exports = e.default);
2227
- }(ve, ve.exports)), ve.exports;
2228
- }
2229
- var Pe = { exports: {} }, Re = { exports: {} }, ut = {}, mr;
2230
- function po() {
2231
- return mr || (mr = 1, function(t) {
2232
- Object.defineProperty(t, "__esModule", {
2233
- value: !0
2234
- }), Object.defineProperty(t, "normalizeLocalePath", {
2235
- enumerable: !0,
2236
- get: function() {
2237
- return e;
2238
- }
2239
- });
2240
- function e(r, n) {
2241
- let i;
2242
- const o = r.split("/");
2243
- return (n || []).some((s) => o[1] && o[1].toLowerCase() === s.toLowerCase() ? (i = s, o.splice(1, 1), r = o.join("/") || "/", !0) : !1), {
2244
- pathname: r,
2245
- detectedLocale: i
2246
- };
2247
- }
2248
- }(ut)), ut;
2249
- }
2250
- var hr;
2251
- function mo() {
2252
- return hr || (hr = 1, function(t, e) {
2253
- Object.defineProperty(e, "__esModule", {
2254
- value: !0
2255
- }), Object.defineProperty(e, "normalizeLocalePath", {
2256
- enumerable: !0,
2257
- get: function() {
2258
- return r;
2259
- }
2260
- });
2261
- const r = (n, i) => process.env.__NEXT_I18N_SUPPORT ? po().normalizeLocalePath(n, i) : {
2262
- pathname: n,
2263
- detectedLocale: void 0
2264
- };
2265
- (typeof e.default == "function" || typeof e.default == "object" && e.default !== null) && typeof e.default.__esModule > "u" && (Object.defineProperty(e.default, "__esModule", { value: !0 }), Object.assign(e.default, e), t.exports = e.default);
2266
- }(Re, Re.exports)), Re.exports;
2267
- }
2268
- var Ee = { exports: {} }, ct = {}, gr;
2269
- function ho() {
2270
- return gr || (gr = 1, function(t) {
2271
- Object.defineProperty(t, "__esModule", {
2272
- value: !0
2273
- }), Object.defineProperty(t, "detectDomainLocale", {
2274
- enumerable: !0,
2275
- get: function() {
2276
- return e;
2277
- }
2278
- });
2279
- function e(r, n, i) {
2280
- if (r) {
2281
- i && (i = i.toLowerCase());
2282
- for (const a of r) {
2283
- var o, s;
2284
- const u = (o = a.domain) == null ? void 0 : o.split(":")[0].toLowerCase();
2285
- if (n === u || i === a.defaultLocale.toLowerCase() || (s = a.locales) != null && s.some((l) => l.toLowerCase() === i))
2286
- return a;
2287
- }
2288
- }
2289
- }
2290
- }(ct)), ct;
2291
- }
2292
- var yr;
2293
- function go() {
2294
- return yr || (yr = 1, function(t, e) {
2295
- Object.defineProperty(e, "__esModule", {
2296
- value: !0
2297
- }), Object.defineProperty(e, "detectDomainLocale", {
2298
- enumerable: !0,
2299
- get: function() {
2300
- return r;
2301
- }
2302
- });
2303
- const r = function() {
2304
- for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++)
2305
- i[o] = arguments[o];
2306
- if (process.env.__NEXT_I18N_SUPPORT)
2307
- return ho().detectDomainLocale(...i);
2308
- };
2309
- (typeof e.default == "function" || typeof e.default == "object" && e.default !== null) && typeof e.default.__esModule > "u" && (Object.defineProperty(e.default, "__esModule", { value: !0 }), Object.assign(e.default, e), t.exports = e.default);
2310
- }(Ee, Ee.exports)), Ee.exports;
2311
- }
2312
- var _r;
2313
- function yo() {
2314
- return _r || (_r = 1, function(t, e) {
2315
- Object.defineProperty(e, "__esModule", {
2316
- value: !0
2317
- }), Object.defineProperty(e, "getDomainLocale", {
2318
- enumerable: !0,
2319
- get: function() {
2320
- return i;
2321
- }
2322
- });
2323
- const r = Ae(), n = process.env.__NEXT_ROUTER_BASEPATH || "";
2324
- function i(o, s, a, u) {
2325
- if (process.env.__NEXT_I18N_SUPPORT) {
2326
- const l = mo().normalizeLocalePath, p = go().detectDomainLocale, d = s || l(o, a).detectedLocale, c = p(u, void 0, d);
2327
- if (c) {
2328
- const m = "http" + (c.http ? "" : "s") + "://", y = d === c.defaultLocale ? "" : "/" + d;
2329
- return "" + m + c.domain + (0, r.normalizePathTrailingSlash)("" + n + y + o);
2330
- }
2331
- return !1;
2332
- } else
2333
- return !1;
2334
- }
2335
- (typeof e.default == "function" || typeof e.default == "object" && e.default !== null) && typeof e.default.__esModule > "u" && (Object.defineProperty(e.default, "__esModule", { value: !0 }), Object.assign(e.default, e), t.exports = e.default);
2336
- }(Pe, Pe.exports)), Pe.exports;
2337
- }
2338
- var we = { exports: {} }, vr;
2339
- function _o() {
2340
- return vr || (vr = 1, function(t, e) {
2341
- Object.defineProperty(e, "__esModule", {
2342
- value: !0
2343
- }), Object.defineProperty(e, "addBasePath", {
2344
- enumerable: !0,
2345
- get: function() {
2346
- return o;
2347
- }
2348
- });
2349
- const r = on(), n = Ae(), i = process.env.__NEXT_ROUTER_BASEPATH || "";
2350
- function o(s, a) {
2351
- return (0, n.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH && !a ? s : (0, r.addPathPrefix)(s, i));
2352
- }
2353
- (typeof e.default == "function" || typeof e.default == "object" && e.default !== null) && typeof e.default.__esModule > "u" && (Object.defineProperty(e.default, "__esModule", { value: !0 }), Object.assign(e.default, e), t.exports = e.default);
2354
- }(we, we.exports)), we.exports;
2355
- }
2356
- var Oe = { exports: {} }, br;
2357
- function vo() {
2358
- return br || (br = 1, function(t, e) {
2359
- Object.defineProperty(e, "__esModule", {
2360
- value: !0
2361
- });
2362
- function r(d, c) {
2363
- for (var m in c) Object.defineProperty(d, m, {
2364
- enumerable: !0,
2365
- get: c[m]
2366
- });
2367
- }
2368
- r(e, {
2369
- PrefetchKind: function() {
2370
- return p;
2371
- },
2372
- ACTION_REFRESH: function() {
2373
- return n;
2374
- },
2375
- ACTION_NAVIGATE: function() {
2376
- return i;
2377
- },
2378
- ACTION_RESTORE: function() {
2379
- return o;
2380
- },
2381
- ACTION_SERVER_PATCH: function() {
2382
- return s;
2383
- },
2384
- ACTION_PREFETCH: function() {
2385
- return a;
2386
- },
2387
- ACTION_FAST_REFRESH: function() {
2388
- return u;
2389
- },
2390
- ACTION_SERVER_ACTION: function() {
2391
- return l;
2392
- }
2393
- });
2394
- const n = "refresh", i = "navigate", o = "restore", s = "server-patch", a = "prefetch", u = "fast-refresh", l = "server-action";
2395
- var p;
2396
- (function(d) {
2397
- d.AUTO = "auto", d.FULL = "full", d.TEMPORARY = "temporary";
2398
- })(p || (p = {})), (typeof e.default == "function" || typeof e.default == "object" && e.default !== null) && typeof e.default.__esModule > "u" && (Object.defineProperty(e.default, "__esModule", { value: !0 }), Object.assign(e.default, e), t.exports = e.default);
2399
- }(Oe, Oe.exports)), Oe.exports;
2400
- }
2401
- (function(t, e) {
2402
- "use client";
2403
- Object.defineProperty(e, "__esModule", {
2404
- value: !0
2405
- }), Object.defineProperty(e, "default", {
2406
- enumerable: !0,
2407
- get: function() {
2408
- return P;
2409
- }
2410
- });
2411
- const n = /* @__PURE__ */ ce._(Se), i = io(), o = nn(), s = en(), a = Ce(), u = so(), l = uo(), p = co(), d = fo(), c = yo(), m = _o(), y = vo(), f = /* @__PURE__ */ new Set();
2412
- function g(v, R, I, N, x, M) {
2413
- if (typeof window > "u" || !M && !(0, o.isLocalURL)(R))
2414
- return;
2415
- if (!N.bypassPrefetchedCheck) {
2416
- const $ = (
2417
- // Let the link's locale prop override the default router locale.
2418
- typeof N.locale < "u" ? N.locale : "locale" in v ? v.locale : void 0
2419
- ), X = R + "%" + I + "%" + $;
2420
- if (f.has(X))
2421
- return;
2422
- f.add(X);
2423
- }
2424
- const Y = M ? v.prefetch(R, x) : v.prefetch(R, I, N);
2425
- Promise.resolve(Y).catch(($) => {
2426
- if (process.env.NODE_ENV !== "production")
2427
- throw $;
2428
- });
2429
- }
2430
- function _(v) {
2431
- const I = v.currentTarget.getAttribute("target");
2432
- return I && I !== "_self" || v.metaKey || v.ctrlKey || v.shiftKey || v.altKey || // triggers resource download
2433
- v.nativeEvent && v.nativeEvent.which === 2;
2434
- }
2435
- function w(v, R, I, N, x, M, Y, $, X, xe) {
2436
- const { nodeName: Le } = v.currentTarget;
2437
- if (Le.toUpperCase() === "A" && (_(v) || // app-router supports external urls out of the box so it shouldn't short-circuit here as support for e.g. `replace` is added in the app-router.
2438
- !X && !(0, o.isLocalURL)(I)))
2439
- return;
2440
- v.preventDefault();
2441
- const U = () => {
2442
- const J = Y ?? !0;
2443
- "beforePopState" in R ? R[x ? "replace" : "push"](I, N, {
2444
- shallow: M,
2445
- locale: $,
2446
- scroll: J
2447
- }) : R[x ? "replace" : "push"](N || I, {
2448
- forceOptimisticNavigation: !xe,
2449
- scroll: J
2450
- });
2451
- };
2452
- X ? n.default.startTransition(U) : U();
2453
- }
2454
- function b(v) {
2455
- return typeof v == "string" ? v : (0, s.formatUrl)(v);
2456
- }
2457
- const P = /* @__PURE__ */ n.default.forwardRef(function(R, I) {
2458
- let N;
2459
- const { href: x, as: M, children: Y, prefetch: $ = null, passHref: X, replace: xe, shallow: Le, scroll: Ot, locale: U, onClick: J, onMouseEnter: qe, onTouchStart: It, legacyBehavior: D = !1, ...sn } = R;
2460
- N = Y, D && (typeof N == "string" || typeof N == "number") && (N = /* @__PURE__ */ n.default.createElement("a", null, N));
2461
- const A = n.default.useContext(l.RouterContext), un = n.default.useContext(p.AppRouterContext), B = A ?? un, V = !A, ie = $ !== !1, le = $ === null ? y.PrefetchKind.AUTO : y.PrefetchKind.FULL;
2462
- if (process.env.NODE_ENV !== "production") {
2463
- let S = function(T) {
2464
- return new Error("Failed prop type: The prop `" + T.key + "` expects a " + T.expected + " in `<Link>`, but got `" + T.actual + "` instead." + (typeof window < "u" ? `
2465
- Open your browser's console to view the Component stack trace.` : ""));
2466
- };
2467
- Object.keys({
2468
- href: !0
2469
- }).forEach((T) => {
2470
- if (T === "href" && (R[T] == null || typeof R[T] != "string" && typeof R[T] != "object"))
2471
- throw S({
2472
- key: T,
2473
- expected: "`string` or `object`",
2474
- actual: R[T] === null ? "null" : typeof R[T]
2475
- });
2476
- }), Object.keys({
2477
- as: !0,
2478
- replace: !0,
2479
- scroll: !0,
2480
- shallow: !0,
2481
- passHref: !0,
2482
- prefetch: !0,
2483
- locale: !0,
2484
- onClick: !0,
2485
- onMouseEnter: !0,
2486
- onTouchStart: !0,
2487
- legacyBehavior: !0
2488
- }).forEach((T) => {
2489
- const W = typeof R[T];
2490
- if (T === "as") {
2491
- if (R[T] && W !== "string" && W !== "object")
2492
- throw S({
2493
- key: T,
2494
- expected: "`string` or `object`",
2495
- actual: W
2496
- });
2497
- } else if (T === "locale") {
2498
- if (R[T] && W !== "string")
2499
- throw S({
2500
- key: T,
2501
- expected: "`string`",
2502
- actual: W
2503
- });
2504
- } else if (T === "onClick" || T === "onMouseEnter" || T === "onTouchStart") {
2505
- if (R[T] && W !== "function")
2506
- throw S({
2507
- key: T,
2508
- expected: "`function`",
2509
- actual: W
2510
- });
2511
- } else if ((T === "replace" || T === "scroll" || T === "shallow" || T === "passHref" || T === "prefetch" || T === "legacyBehavior") && R[T] != null && W !== "boolean")
2512
- throw S({
2513
- key: T,
2514
- expected: "`boolean`",
2515
- actual: W
2516
- });
2517
- });
2518
- const xt = n.default.useRef(!1);
2519
- R.prefetch && !xt.current && !V && (xt.current = !0, console.warn("Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://nextjs.org/docs/messages/prefetch-true-deprecated"));
2520
- }
2521
- if (process.env.NODE_ENV !== "production" && V && !M) {
2522
- let S;
2523
- if (typeof x == "string" ? S = x : typeof x == "object" && typeof x.pathname == "string" && (S = x.pathname), S && S.split("/").some((ee) => ee.startsWith("[") && ee.endsWith("]")))
2524
- throw new Error("Dynamic href `" + S + "` found in <Link> while using the `/app` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href");
2525
- }
2526
- const { href: F, as: j } = n.default.useMemo(() => {
2527
- if (!A) {
2528
- const ee = b(x);
2529
- return {
2530
- href: ee,
2531
- as: M ? b(M) : ee
2532
- };
2533
- }
2534
- const [S, ae] = (0, i.resolveHref)(A, x, !0);
2535
- return {
2536
- href: S,
2537
- as: M ? (0, i.resolveHref)(A, M) : ae || S
2538
- };
2539
- }, [
2540
- A,
2541
- x,
2542
- M
2543
- ]), St = n.default.useRef(F), Tt = n.default.useRef(j);
2544
- let L;
2545
- if (D)
2546
- if (process.env.NODE_ENV === "development") {
2547
- J && console.warn('"onClick" was passed to <Link> with `href` of `' + x + '` but "legacyBehavior" was set. The legacy behavior requires onClick be set on the child of next/link'), qe && console.warn('"onMouseEnter" was passed to <Link> with `href` of `' + x + '` but "legacyBehavior" was set. The legacy behavior requires onMouseEnter be set on the child of next/link');
2548
- try {
2549
- L = n.default.Children.only(N);
2550
- } catch {
2551
- throw N ? new Error("Multiple children were passed to <Link> with `href` of `" + x + "` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children" + (typeof window < "u" ? `
2552
- Open your browser's console to view the Component stack trace.` : "")) : new Error("No children were passed to <Link> with `href` of `" + x + "` but one child is required https://nextjs.org/docs/messages/link-no-children");
2553
- }
2554
- } else
2555
- L = n.default.Children.only(N);
2556
- else if (process.env.NODE_ENV === "development" && (N == null ? void 0 : N.type) === "a")
2557
- throw new Error(`Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.
2558
- Learn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor`);
2559
- const Z = D ? L && typeof L == "object" && L.ref : I, [Nt, Ct, At] = (0, d.useIntersection)({
2560
- rootMargin: "200px"
2561
- }), cn = n.default.useCallback((S) => {
2562
- (Tt.current !== j || St.current !== F) && (At(), Tt.current = j, St.current = F), Nt(S), Z && (typeof Z == "function" ? Z(S) : typeof Z == "object" && (Z.current = S));
2563
- }, [
2564
- j,
2565
- Z,
2566
- F,
2567
- At,
2568
- Nt
2569
- ]);
2570
- n.default.useEffect(() => {
2571
- process.env.NODE_ENV === "production" && B && (!Ct || !ie || g(B, F, j, {
2572
- locale: U
2573
- }, {
2574
- kind: le
2575
- }, V));
2576
- }, [
2577
- j,
2578
- F,
2579
- Ct,
2580
- U,
2581
- ie,
2582
- A == null ? void 0 : A.locale,
2583
- B,
2584
- V,
2585
- le
2586
- ]);
2587
- const de = {
2588
- ref: cn,
2589
- onClick(S) {
2590
- if (process.env.NODE_ENV !== "production" && !S)
2591
- throw new Error('Component rendered inside next/link has to pass click event to "onClick" prop.');
2592
- !D && typeof J == "function" && J(S), D && L.props && typeof L.props.onClick == "function" && L.props.onClick(S), B && (S.defaultPrevented || w(S, B, F, j, xe, Le, Ot, U, V, ie));
2593
- },
2594
- onMouseEnter(S) {
2595
- !D && typeof qe == "function" && qe(S), D && L.props && typeof L.props.onMouseEnter == "function" && L.props.onMouseEnter(S), B && ((!ie || process.env.NODE_ENV === "development") && V || g(B, F, j, {
2596
- locale: U,
2597
- priority: !0,
2598
- // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
2599
- bypassPrefetchedCheck: !0
2600
- }, {
2601
- kind: le
2602
- }, V));
2603
- },
2604
- onTouchStart(S) {
2605
- !D && typeof It == "function" && It(S), D && L.props && typeof L.props.onTouchStart == "function" && L.props.onTouchStart(S), B && (!ie && V || g(B, F, j, {
2606
- locale: U,
2607
- priority: !0,
2608
- // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
2609
- bypassPrefetchedCheck: !0
2610
- }, {
2611
- kind: le
2612
- }, V));
2613
- }
2614
- };
2615
- if ((0, a.isAbsoluteUrl)(j))
2616
- de.href = j;
2617
- else if (!D || X || L.type === "a" && !("href" in L.props)) {
2618
- const S = typeof U < "u" ? U : A == null ? void 0 : A.locale, ae = (A == null ? void 0 : A.isLocaleDomain) && (0, c.getDomainLocale)(j, S, A == null ? void 0 : A.locales, A == null ? void 0 : A.domainLocales);
2619
- de.href = ae || (0, m.addBasePath)((0, u.addLocale)(j, S, A == null ? void 0 : A.defaultLocale));
2620
- }
2621
- return D ? /* @__PURE__ */ n.default.cloneElement(L, de) : /* @__PURE__ */ n.default.createElement("a", {
2622
- ...sn,
2623
- ...de
2624
- }, N);
2625
- });
2626
- (typeof e.default == "function" || typeof e.default == "object" && e.default !== null) && typeof e.default.__esModule > "u" && (Object.defineProperty(e.default, "__esModule", { value: !0 }), Object.assign(e.default, e), t.exports = e.default);
2627
- })(gt, gt.exports);
2628
- var bo = gt.exports, Po = bo;
2629
- const Et = /* @__PURE__ */ Fn(Po), Ro = (t) => {
2630
- const e = t.getBlocksAsArray(), r = [];
2631
- return e.forEach((n) => {
2632
- const i = n.getType(), o = n.getText();
2633
- let s;
2634
- const a = n.getInlineStyleAt(0).toArray();
2635
- a.length > 0 && (s = a.map((l) => {
2636
- switch (l) {
2637
- case "BOLD":
2638
- return "font-weight: bold;";
2639
- case "ITALIC":
2640
- return "font-style: italic;";
2641
- case "UNDERLINE":
2642
- return "text-decoration: underline;";
2643
- default:
2644
- return "";
2645
- }
2646
- }).join(" "));
2647
- const u = {
2648
- type: "p",
2649
- text: o,
2650
- ...s && { styleText: s }
2651
- };
2652
- switch (i) {
2653
- case "header-one":
2654
- u.type = "h1";
2655
- break;
2656
- case "header-two":
2657
- u.type = "h2";
2658
- break;
2659
- case "header-three":
2660
- u.type = "h3";
2661
- break;
2662
- case "unordered-list-item":
2663
- u.type = "li";
2664
- break;
2665
- case "ordered-list-item":
2666
- u.type = "li";
2667
- break;
2668
- case "blockquote":
2669
- u.type = "blockquote";
2670
- break;
2671
- case "code-block":
2672
- u.type = "pre";
2673
- break;
2674
- default:
2675
- u.type = "p";
2676
- }
2677
- r.push(u);
2678
- }), r;
2679
- }, Eo = (t, e, r) => {
2680
- t.findEntityRanges((n) => {
2681
- const i = n.getEntity();
2682
- return i === null ? !1 : r.getEntity(i).getType() === "LINK";
2683
- }, e);
2684
- }, yt = (t) => {
2685
- const e = new hn([
2686
- {
2687
- strategy: Eo,
2688
- component: Et
2689
- }
2690
- ]), r = Sr(
2691
- t
2692
- );
2693
- return ft.createWithContent(r, e);
2694
- }, wo = (t) => Sr(t), _t = mn.set(
2695
- "unstyled",
2696
- {
2697
- element: "div",
2698
- aliasedElements: ["div"]
2699
- }
2700
- ), hi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2701
- __proto__: null,
2702
- CREATE_CONTENT: yt,
2703
- EXTENDED_BLOCK_RENDER_MAP: _t,
2704
- GET_CONTENT_STATE: wo,
2705
- convertDraftToHTML: Ro
2706
- }, Symbol.toStringTag, { value: "Module" })), te = (t) => ({
2707
- centro: "center",
2708
- esquerda: "start",
2709
- direita: "end"
2710
- })[t], Oo = ({ expanded: t, content: e }) => /* @__PURE__ */ Q("details", { open: t, children: [
2711
- e.textStructureReduced ? /* @__PURE__ */ E("summary", { onClick: (r) => r.preventDefault(), children: /* @__PURE__ */ E(
2712
- Mt,
2713
- {
2714
- editorKey: "draft-editor-1",
2715
- blockRenderMap: _t,
2716
- editorState: e != null && e.textStructureReduced ? yt(JSON.parse(e.textStructureReduced)) : ft.createEmpty(),
2717
- onChange: () => null,
2718
- readOnly: !0
2719
- }
2720
- ) }) : /* @__PURE__ */ E(H, {}),
2721
- e.showTextStructureExpander && e.textStructure ? /* @__PURE__ */ E(H, { children: /* @__PURE__ */ E(
2722
- Mt,
2723
- {
2724
- editorKey: "draft-editor-1",
2725
- blockRenderMap: _t,
2726
- editorState: e.textStructure ? yt(JSON.parse(e.textStructure)) : ft.createEmpty(),
2727
- onChange: () => null,
2728
- readOnly: !0
2729
- }
2730
- ) }) : /* @__PURE__ */ E(H, {})
2731
- ] }), Io = {
2732
- "draftjs-text-modifier": "_draftjs-text-modifier_1itwm_2"
2733
- }, So = "_textContentWrapper_1bigo_5", To = "_textContentSection_1bigo_13", vt = {
2734
- "link-modifier": "_link-modifier_1bigo_1",
2735
- textContentWrapper: So,
2736
- textContentSection: To
2737
- }, No = "_link_w24h0_1", Co = "_wrapper_w24h0_98", Ao = "_text_w24h0_106", lt = {
2738
- link: No,
2739
- wrapper: Co,
2740
- text: Ao
2741
- }, xo = ({
2742
- children: t,
2743
- adornments: e,
2744
- className: r,
2745
- disableUnderline: n,
2746
- href: i,
2747
- mode: o,
2748
- size: s,
2749
- title: a,
2750
- onClick: u,
2751
- disablePadding: l,
2752
- ...p
2753
- }) => {
2754
- const d = re.ValidateProp({
2755
- fieldTypes: ue,
2756
- property: s,
2757
- fallback: "medium"
2758
- }), c = re.ValidateProp({
2759
- fieldTypes: fn,
2760
- property: o,
2761
- fallback: "default"
2762
- });
2763
- return /* @__PURE__ */ E(
2764
- Et,
2765
- {
2766
- ...p,
2767
- className: re.classNameConcat(lt.link, r),
2768
- href: i && i.length > 0 ? i : "#",
2769
- "data-size": d,
2770
- "data-variant": c,
2771
- title: a || "NextLink",
2772
- "data-disable-underline": n ?? !1,
2773
- "data-disable-padding": l ?? !0,
2774
- children: /* @__PURE__ */ Q("div", { className: lt.wrapper, onClick: u, children: [
2775
- e == null ? void 0 : e.start,
2776
- /* @__PURE__ */ E("p", { className: lt.text, "data-size": d, children: t }),
2777
- e == null ? void 0 : e.end
2778
- ] })
2779
- }
2780
- );
2781
- }, wt = ({
2782
- data: t
2783
- }) => {
2784
- var n;
2785
- const [e, r] = ne(!1);
2786
- return /* @__PURE__ */ E(
2787
- Lt.Root,
2788
- {
2789
- layoutProps: {
2790
- textRow: {
2791
- alignContent: te(t.textStructureAlignment),
2792
- alignItems: te(t.textStructureAlignment)
2793
- },
2794
- columnWrapper: {
2795
- alignContent: te(t.textStructureAlignment),
2796
- alignItems: te(t.textStructureAlignment)
2797
- }
2798
- },
2799
- adornment: {
2800
- bottom: t.showTextStructureExpander && t.textStructure ? /* @__PURE__ */ E(
2801
- pn,
2802
- {
2803
- variant: "tertiary",
2804
- adornment: {
2805
- end: /* @__PURE__ */ E(qt, { name: e ? "arrow-up" : "arrow-down" })
2806
- },
2807
- onClick: () => r((i) => !i),
2808
- size: "small",
2809
- children: e ? "Ver Menos" : "Ver Mais"
2810
- }
2811
- ) : /* @__PURE__ */ E(H, {})
2812
- },
2813
- children: /* @__PURE__ */ Q(
2814
- Ir.Column,
2815
- {
2816
- className: vt.textContentWrapper,
2817
- style: {
2818
- alignItems: te(
2819
- t.textStructureAlignment
2820
- )
2821
- },
2822
- children: [
2823
- /* @__PURE__ */ E(
2824
- Lt.DivWrapper,
2825
- {
2826
- style: {
2827
- textAlign: te(
2828
- t.textStructureAlignment
2829
- )
2830
- },
2831
- mode: t.textStructureMode ?? "default",
2832
- className: Io["draftjs-text-modifier"],
2833
- children: t.textStructureReduced ? /* @__PURE__ */ E(Oo, { content: t, expanded: e }) : /* @__PURE__ */ E(H, {})
2834
- }
2835
- ),
2836
- t.textStructureButtonLabel ? /* @__PURE__ */ E(
2837
- xo,
2838
- {
2839
- mode: t.textStructureMode ?? "default",
2840
- href: t.textStructureButtonHref ?? "#",
2841
- size: t.textStructureButtonSize,
2842
- className: vt["link-modifier"],
2843
- adornments: (n = t.textStructureButtonIcon) != null && n.length && t.enableIcon ? { end: /* @__PURE__ */ E(qt, { name: t.textStructureButtonIcon }) } : void 0,
2844
- children: t.textStructureButtonLabel
2845
- }
2846
- ) : /* @__PURE__ */ E(H, {})
2847
- ]
2848
- }
2849
- )
2850
- }
2851
- );
2852
- }, Lo = (t) => ({
2853
- centro: {
2854
- verticalAlignment: "center",
2855
- horizontalAlignment: "center"
2856
- },
2857
- "centro-esquerda": {
2858
- verticalAlignment: "center",
2859
- horizontalAlignment: "start"
2860
- },
2861
- "centro-direita": {
2862
- verticalAlignment: "center",
2863
- horizontalAlignment: "end"
2864
- },
2865
- "superior-centro": {
2866
- verticalAlignment: "start",
2867
- horizontalAlignment: "center"
2868
- },
2869
- "superior-esquerda": {
2870
- verticalAlignment: "start",
2871
- horizontalAlignment: "start"
2872
- },
2873
- "superior-direita": {
2874
- verticalAlignment: "start",
2875
- horizontalAlignment: "end"
2876
- },
2877
- "inferior-centro": {
2878
- verticalAlignment: "end",
2879
- horizontalAlignment: "center"
2880
- },
2881
- "inferior-esquerda": {
2882
- verticalAlignment: "end",
2883
- horizontalAlignment: "start"
2884
- },
2885
- "inferior-direita": {
2886
- verticalAlignment: "end",
2887
- horizontalAlignment: "end"
2888
- }
2889
- })[t], Pr = (t) => ({
2890
- centro: "center",
2891
- esquerda: "start",
2892
- direita: "end"
2893
- })[t], qo = "_image_lypfr_1", jo = {
2894
- image: qo
2895
- }, Mo = ({
2896
- alt: t,
2897
- className: e,
2898
- objectFit: r,
2899
- ...n
2900
- }) => {
2901
- const { nextimage: i } = Jr();
2902
- return /* @__PURE__ */ E(
2903
- i,
2904
- {
2905
- quality: 90,
2906
- ...n,
2907
- alt: t ?? "",
2908
- className: re.classNameConcat(jo.image, e),
2909
- "data-object-fit": r ?? "cover"
2910
- }
2911
- );
2912
- }, Do = ({ videoRef: t, ...e }) => /* @__PURE__ */ E("video", { ...e, ref: t, children: /* @__PURE__ */ E("track", { kind: "captions" }) }), ko = {
2913
- Image: Mo,
2914
- Video: Do
2915
- }, Rr = ({
2916
- dateEnd: t,
2917
- dateInit: e,
2918
- TIME_ZONE: r = "America/Sao_Paulo",
2919
- ...n
2920
- }) => {
2921
- const [i, o] = ne(
2922
- zn(
2923
- new jt(Date.now(), r),
2924
- new jt(t, r)
2925
- )
2926
- ), [s, a] = ne(!1);
2927
- oe(() => {
2928
- s || a(!0);
2929
- const l = setInterval(() => {
2930
- if (i <= 0) {
2931
- clearInterval(l);
2932
- return;
2933
- }
2934
- o(i - 1e3);
2935
- }, 1e3);
2936
- return () => {
2937
- clearInterval(l);
2938
- };
2939
- }, [i, o, s]);
2940
- const u = pe(i, "days");
2941
- return s && i > 0 ? /* @__PURE__ */ Q(G.Root, { ...n, children: [
2942
- u ? /* @__PURE__ */ Q(H, { children: [
2943
- /* @__PURE__ */ E(G.Digit, { label: "dias", value: u }),
2944
- /* @__PURE__ */ E(G.Separator, {})
2945
- ] }) : null,
2946
- /* @__PURE__ */ E(
2947
- G.Digit,
2948
- {
2949
- label: "horas",
2950
- value: pe(i, "hours")
2951
- }
2952
- ),
2953
- /* @__PURE__ */ E(G.Separator, {}),
2954
- /* @__PURE__ */ E(
2955
- G.Digit,
2956
- {
2957
- label: "min",
2958
- value: pe(i, "minutes")
2959
- }
2960
- ),
2961
- /* @__PURE__ */ E(G.Separator, {}),
2962
- /* @__PURE__ */ E(
2963
- G.Digit,
2964
- {
2965
- label: "segs",
2966
- value: pe(i),
2967
- suppressHydrationWarning: !0
2968
- }
2969
- )
2970
- ] }) : /* @__PURE__ */ E(H, {});
2971
- }, Er = {
2972
- "content-modifier": "_content-modifier_16y4u_5",
2973
- "banner-image-wrapper-modifier": "_banner-image-wrapper-modifier_16y4u_13"
2974
- }, wr = ({
2975
- data: t,
2976
- videoUrl: e,
2977
- priority: r,
2978
- videoRef: n,
2979
- ...i
2980
- }) => {
2981
- const {
2982
- video: o,
2983
- image: s,
2984
- imageHref: a,
2985
- imageOpacity: u,
2986
- altImage: l,
2987
- backgroundColor: p,
2988
- position: d,
2989
- contentAlignment: c,
2990
- showTimer: m,
2991
- contentOrder: y,
2992
- timerMode: f,
2993
- timerEnd: g,
2994
- timerInit: _,
2995
- textStructure: w,
2996
- textStructureReduced: b
2997
- } = t.banner, h = (a == null ? void 0 : a.trim()) || (s == null ? void 0 : s.trim()) || null, { nextimage: P } = Jr();
2998
- return /* @__PURE__ */ Q(ke.Container, { ...i, children: [
2999
- /* @__PURE__ */ Q(
3000
- ke.ImageWrapper,
3001
- {
3002
- className: Er["banner-image-wrapper-modifier"],
3003
- style: u ? { background: p } : void 0,
3004
- children: [
3005
- o && /* @__PURE__ */ E(
3006
- ko.Video,
3007
- {
3008
- videoRef: n,
3009
- src: e,
3010
- autoPlay: r,
3011
- loop: !0,
3012
- playsInline: !0,
3013
- muted: !0
3014
- }
3015
- ),
3016
- h && !(o != null && o.length) && /* @__PURE__ */ E(
3017
- P,
3018
- {
3019
- src: h,
3020
- width: "1920",
3021
- height: "1080",
3022
- alt: l ?? s ?? "",
3023
- ...r ? { priority: r } : {},
3024
- style: u ? { opacity: "0" } : void 0
3025
- }
3026
- ),
3027
- !s && !(o != null && o.length) && /* @__PURE__ */ E(
3028
- "div",
3029
- {
3030
- style: {
3031
- background: p
3032
- }
3033
- }
3034
- )
3035
- ]
3036
- }
3037
- ),
3038
- m || b || w ? /* @__PURE__ */ E(
3039
- ke.Slot,
3040
- {
3041
- ...Lo(d ?? "centro"),
3042
- className: Er["content-modifier"],
3043
- style: {
3044
- textAlign: Pr(
3045
- c
3046
- )
3047
- },
3048
- children: /* @__PURE__ */ Q(
3049
- Ir.Column,
3050
- {
3051
- gap: "16px",
3052
- alignItems: Pr(c),
3053
- children: [
3054
- m && y === "timer-first" && /* @__PURE__ */ E(
3055
- Rr,
3056
- {
3057
- mode: f ?? "default",
3058
- size: "small",
3059
- dateEnd: g ? new Date(g) : /* @__PURE__ */ new Date(),
3060
- dateInit: _ ? new Date(_) : /* @__PURE__ */ new Date()
3061
- }
3062
- ),
3063
- /* @__PURE__ */ E(wt, { data: t.banner }),
3064
- m && y !== "timer-first" && /* @__PURE__ */ E(
3065
- Rr,
3066
- {
3067
- mode: f ?? "default",
3068
- size: "small",
3069
- dateEnd: g ? new Date(g) : /* @__PURE__ */ new Date(),
3070
- dateInit: _ ? new Date(_) : /* @__PURE__ */ new Date()
3071
- }
3072
- )
3073
- ]
3074
- }
3075
- )
3076
- }
3077
- ) : /* @__PURE__ */ E(H, {})
3078
- ] });
3079
- }, Uo = {
3080
- "observer-wrapper": "_observer-wrapper_r43gk_1"
3081
- };
3082
- function zo(t, e, r) {
3083
- const [n, i] = ne(!1), { threshold: o } = r || {};
3084
- return oe(() => {
3085
- if (!t.current)
3086
- return () => {
3087
- };
3088
- let s = null;
3089
- const a = new IntersectionObserver(
3090
- ([u]) => {
3091
- if (r != null && r.delay) {
3092
- s && clearTimeout(s), s = setTimeout(() => {
3093
- i(u.isIntersecting), e && u.isIntersecting && a.unobserve(t.current);
3094
- }, r.delay);
3095
- return;
3096
- }
3097
- i(u.isIntersecting), e && u.isIntersecting && a.unobserve(t.current);
3098
- },
3099
- {
3100
- threshold: o || 1
3101
- }
3102
- );
3103
- return a.observe(t.current), () => {
3104
- a.disconnect();
3105
- };
3106
- }, [t]), n;
3107
- }
3108
- const Bo = ({
3109
- children: t,
3110
- eventData: e,
3111
- observerOptions: r,
3112
- callBackWhenVisible: n,
3113
- stopOnIntersection: i = !0,
3114
- className: o,
3115
- ...s
3116
- }) => {
3117
- const a = z(null), u = zo(a, i, r), { sendDataLayerEvent: l } = qr();
3118
- return oe(() => {
3119
- u && (typeof n == "function" && n(), e && l({ ...e }));
3120
- }, [u]), /* @__PURE__ */ E(
3121
- "div",
3122
- {
3123
- ...s,
3124
- ref: a,
3125
- className: re.classNameConcat(Uo["observer-wrapper"], o),
3126
- children: t
3127
- }
3128
- );
3129
- }, Vo = ({
3130
- data: t,
3131
- className: e,
3132
- priority: r,
3133
- creative: n,
3134
- ...i
3135
- }) => {
3136
- const { handleSelectPromotionEvent: o, currentLocalRef: s } = qr(), {
3137
- banner: { promotion_name: a },
3138
- index: u,
3139
- componentIndex: l
3140
- } = t, p = typeof u == "number" ? `:${u + 1}` : "", d = {
3141
- creative_name: n,
3142
- creative_slot: `${n}-${s.current}:${l + 1}${p}`,
3143
- promotion_id: t.banner.href,
3144
- promotion_name: a
3145
- }, c = z(null), m = dt(() => {
3146
- var f;
3147
- if ((f = t.banner.video) != null && f.includes("player.vimeo")) {
3148
- const g = t.banner.video.split("?")[1], _ = g == null ? void 0 : g.split("&"), w = _ == null ? void 0 : _.filter(
3149
- (h) => h.includes("loc") || h.includes("signature") || h.includes("user_id")
3150
- ), b = w == null ? void 0 : w.join("&");
3151
- return `${t.banner.video.split("?")[0]}?${b}`;
3152
- }
3153
- return t.banner.video;
3154
- }, [t]), y = () => {
3155
- var f;
3156
- (f = c.current) != null && f.paused && c.current.play();
3157
- };
3158
- return /* @__PURE__ */ E(
3159
- Bo,
3160
- {
3161
- eventData: {
3162
- functionKey: "readyEvents",
3163
- data: {
3164
- event: "view_promotion",
3165
- readyData: {
3166
- ecommerce: {
3167
- ...d,
3168
- index: u
3169
- }
3170
- }
3171
- }
3172
- },
3173
- observerOptions: {
3174
- delay: 100,
3175
- ...m && { threshold: 0.1 }
3176
- },
3177
- ...m && { callBackWhenVisible: y },
3178
- children: t.banner.href ? /* @__PURE__ */ E(
3179
- Et,
3180
- {
3181
- href: t.banner.href,
3182
- onClick: () => {
3183
- o({
3184
- updatePromotionRef: !0,
3185
- promotion: d,
3186
- index: u
3187
- });
3188
- },
3189
- children: /* @__PURE__ */ E(
3190
- wr,
3191
- {
3192
- data: t,
3193
- videoUrl: m,
3194
- priority: r,
3195
- videoRef: c,
3196
- ...i
3197
- }
3198
- )
3199
- }
3200
- ) : /* @__PURE__ */ E(
3201
- wr,
3202
- {
3203
- data: t,
3204
- videoUrl: m,
3205
- priority: r,
3206
- videoRef: c,
3207
- ...i
3208
- }
3209
- )
3210
- }
3211
- );
3212
- }, Fo = (t) => /* @__PURE__ */ E(Vo, { ...t }), Wo = (t) => t, Ho = (t) => t, Ie = { schema: Wo, base: Ho };
3213
- function an({ ICONS: t }) {
3214
- return {
3215
- borderTop: O.property({
3216
- title: "Esconder borda superior",
3217
- type: "boolean"
3218
- }),
3219
- textStructure: O.property({
3220
- title: 'Texto complementar (caso queira o "ver mais")',
3221
- type: "string",
3222
- widget: O.widget({
3223
- uiWidget: "draftjs-rich-text"
3224
- })
3225
- }),
3226
- textStructureReduced: O.property({
3227
- title: "Texto inicial",
3228
- type: "string",
3229
- widget: O.widget({
3230
- uiWidget: "draftjs-rich-text"
3231
- })
3232
- }),
3233
- textStructureMode: O.property({
3234
- title: "cor da estrutura de texto",
3235
- type: "string",
3236
- enumNames: ["Padrão(preto)", "Invertido(branco)"],
3237
- enum: ["default", "inverse"]
3238
- }),
3239
- textStructureButtonSize: O.property({
3240
- title: "Tamanho botão estrutura de texto",
3241
- type: "string",
3242
- enumNames: ue,
3243
- enum: ue
3244
- }),
3245
- enableIcon: O.property({
3246
- type: "boolean",
3247
- title: "Ativar ícone"
3248
- }),
3249
- textStructureButtonIcon: O.property({
3250
- title: "Icone botão estrutura de texto",
3251
- type: "string",
3252
- enum: Object.values(t),
3253
- enumNames: Object.keys(t)
3254
- }),
3255
- textStructureButtonLabel: O.property({
3256
- title: "Label botão estrutura de texto",
3257
- type: "string"
3258
- }),
3259
- textStructureButtonHref: O.property({
3260
- title: "Url botão estrutura texto",
3261
- type: "string"
3262
- }),
3263
- showTextStructureExpander: O.property({
3264
- title: 'Mostrar botão "ver mais" (Caso ja tenha um texto reduzido)',
3265
- type: "boolean"
3266
- }),
3267
- textStructureAlignment: O.property({
3268
- title: "alinhamento do texto",
3269
- type: "string",
3270
- enumNames: ["centro", "esquerda", "direita"],
3271
- enum: ["centro", "esquerda", "direita"]
3272
- })
3273
- };
3274
- }
3275
- function $o({ ICONS: t }) {
3276
- return O.property({
3277
- type: "object",
3278
- title: "Item",
3279
- properties: {
3280
- title: O.property({ type: "object", title: "Item" }),
3281
- creative_name: O.property({
3282
- type: "string",
3283
- title: "creative name ex: carrossel home, ex2: stories"
3284
- }),
3285
- creative_slot: O.property({
3286
- type: "string",
3287
- title: "creative slot ex: carrossel-home: 1"
3288
- }),
3289
- promotion_id: O.property({
3290
- type: "string",
3291
- title: "promotion id ex: /animale: ex2: /new-collection?O=OrderByScoreDESC"
3292
- }),
3293
- promotion_name: O.property({
3294
- type: "string",
3295
- title: "promotion name ex: special-gift-for-you"
3296
- }),
3297
- href: O.property({
3298
- type: "string",
3299
- title: "Link"
3300
- }),
3301
- image: O.property({
3302
- type: "string",
3303
- title: "Imagem upload",
3304
- description: "Upload de imagens ou seleção de imagens já existentes.",
3305
- widget: O.widget({
3306
- uiWidget: "media-gallery"
3307
- })
3308
- }),
3309
- imageHref: O.property({
3310
- type: "string",
3311
- title: "Imagem via link",
3312
- description: "Informe um link de imagem apenas se não for usar o upload da VTEX. Os dois não podem ser usados juntos."
3313
- }),
3314
- imageOpacity: O.property({
3315
- title: "Deixar imagem transparente",
3316
- type: "boolean"
3317
- }),
3318
- headerVariant: O.property({
3319
- title: "cor do header no banner principal (se Banner Carousel na home)",
3320
- type: "string",
3321
- enumNames: ["Padrão(preto)", "Invertido(branco)"],
3322
- enum: ["transparent-black", "transparent-white"]
3323
- }),
3324
- video: O.property({
3325
- type: "string",
3326
- title: "Video",
3327
- widget: O.widget({
3328
- uiWidget: "media-gallery"
3329
- })
3330
- }),
3331
- altImage: O.property({
3332
- type: "string",
3333
- title: "Alt Image"
3334
- }),
3335
- isHeroBanner: O.property({
3336
- title: "é hero banner",
3337
- type: "boolean"
3338
- }),
3339
- backgroundColor: O.property({
3340
- title: "Cor de fundo ex: #ffffff",
3341
- type: "string"
3342
- }),
3343
- position: O.property({
3344
- title: "Posição do conteudo na imagem",
3345
- type: "string",
3346
- enumNames: [
3347
- "superior-esquerda",
3348
- "superior-centro",
3349
- "superior-direita",
3350
- "centro",
3351
- "centro-esquerda",
3352
- "centro-direita",
3353
- "inferior-esquerda",
3354
- "inferior-centro",
3355
- "inferior-direita"
3356
- ],
3357
- enum: [
3358
- "superior-esquerda",
3359
- "superior-centro",
3360
- "superior-direita",
3361
- "centro",
3362
- "centro-esquerda",
3363
- "centro-direita",
3364
- "inferior-esquerda",
3365
- "inferior-centro",
3366
- "inferior-direita"
3367
- ]
3368
- }),
3369
- showTimer: O.property({
3370
- title: "mostrar relogio",
3371
- type: "boolean"
3372
- }),
3373
- timerInit: O.property({
3374
- title: "relogio inicio",
3375
- type: "string",
3376
- widget: {
3377
- "ui:widget": "date-time"
3378
- }
3379
- }),
3380
- timerEnd: O.property({
3381
- title: "relogio Fim",
3382
- type: "string",
3383
- widget: {
3384
- "ui:widget": "date-time"
3385
- }
3386
- }),
3387
- timerMode: O.property({
3388
- title: "cor do relogio",
3389
- type: "string",
3390
- enumNames: ["Padrão(preto)", "Invertido(branco)"],
3391
- enum: ["default", "inverse"]
3392
- }),
3393
- timerSize: O.property({
3394
- title: "tamanho do relogio",
3395
- type: "string",
3396
- enumNames: ue,
3397
- enum: ue
3398
- }),
3399
- contentAlignment: O.property({
3400
- title: "alinhamento do conteúdo",
3401
- type: "string",
3402
- enumNames: ["centro", "esquerda", "direita"],
3403
- enum: ["centro", "esquerda", "direita"]
3404
- }),
3405
- contentOrder: O.property({
3406
- title: "ordem do conteúdo",
3407
- type: "string",
3408
- enumNames: ["relógio primeiro", "estrutura de texto primeiro"],
3409
- enum: ["timer-first", "text-structure-first"]
3410
- }),
3411
- ...an({ ICONS: t })
3412
- }
3413
- });
3414
- }
3415
- function gi({ ICONS: t }) {
3416
- return Ie.base({
3417
- name: "Banner",
3418
- id: "banner",
3419
- href: "",
3420
- requiredScopes: [
3421
- "common_page",
3422
- "categories_page",
3423
- "wishlist_page",
3424
- "search_page",
3425
- "prehome"
3426
- ],
3427
- schema: Ie.schema({
3428
- title: "Banner",
3429
- description: "Banners Único para pagina",
3430
- type: "object",
3431
- properties: {
3432
- banner: $o({ ICONS: t })
3433
- }
3434
- })
3435
- });
3436
- }
3437
- const yi = { Banner: Fo }, Go = ({
3438
- data: t
3439
- }) => /* @__PURE__ */ E(
3440
- "div",
3441
- {
3442
- className: re.classNameConcat(vt.textContentSection),
3443
- style: t.borderTop ? { borderTop: "none" } : void 0,
3444
- children: /* @__PURE__ */ E(wt, { data: t })
3445
- }
3446
- );
3447
- function _i({ ICONS: t }) {
3448
- return Ie.base({
3449
- name: "TextContent",
3450
- id: "text_content",
3451
- requiredScopes: [
3452
- "common_page",
3453
- "product_page",
3454
- "categories_page",
3455
- "wishlist_page",
3456
- "search_page",
3457
- "policy_tab"
3458
- ],
3459
- schema: Ie.schema({
3460
- title: "TextStructure",
3461
- description: "Estrutura de texto",
3462
- type: "object",
3463
- properties: {
3464
- ...an({ ICONS: t })
3465
- }
3466
- })
3467
- });
3468
- }
3469
- const vi = { TextContentSection: Go, TextContent: wt };
3470
- export {
3471
- lo as A,
3472
- Vo as B,
3473
- O as C,
3474
- xo as D,
3475
- ui as E,
3476
- Ie as F,
3477
- fi as G,
3478
- _i as H,
3479
- gi as I,
3480
- Et as L,
3481
- Un as M,
3482
- mi as N,
3483
- Bo as O,
3484
- Fo as S,
3485
- Rr as T,
3486
- kn as U,
3487
- ce as _,
3488
- ii as a,
3489
- pi as b,
3490
- Pt as c,
3491
- di as d,
3492
- jn as e,
3493
- Mn as f,
3494
- Tr as g,
3495
- Nn as h,
3496
- wn as i,
3497
- An as j,
3498
- li as k,
3499
- Jr as l,
3500
- pe as m,
3501
- zn as n,
3502
- si as o,
3503
- ci as p,
3504
- hi as q,
3505
- ai as r,
3506
- gn as s,
3507
- vi as t,
3508
- qr as u,
3509
- yi as v,
3510
- ko as w,
3511
- Rn as x,
3512
- Fn as y,
3513
- Hn as z
3514
- };