@soma-vertical-web/multi-lib 1.0.27 → 1.0.28

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