@har-analyzer/components 0.0.15 → 0.0.17

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 (59) hide show
  1. package/README.md +59 -28
  2. package/dist/chunks/collapsible-key-value-list.js +24 -0
  3. package/dist/chunks/collapsible-section.js +22 -0
  4. package/dist/chunks/content-viewer.js +3056 -0
  5. package/dist/chunks/context.js +5 -0
  6. package/dist/chunks/headers-viewer.js +32 -0
  7. package/dist/chunks/index.js +2265 -174
  8. package/dist/chunks/index2.js +49 -0
  9. package/dist/chunks/payload-viewer.js +15 -0
  10. package/dist/chunks/provider.js +11 -0
  11. package/dist/chunks/response-viewer.js +10 -0
  12. package/dist/chunks/vertical-gap.js +1 -1
  13. package/dist/components/collapsible-section.d.ts +2 -1
  14. package/dist/components/enhanced-board/constants/i18n.d.ts +11 -6
  15. package/dist/components/enhanced-board/index.d.ts +7 -9
  16. package/dist/components/enhanced-table.d.ts +14 -2
  17. package/dist/components/horizontal-padding.d.ts +2 -0
  18. package/dist/components/inline-copy-to-clipboard.d.ts +6 -0
  19. package/dist/components/lazy-load.d.ts +2 -0
  20. package/dist/context/user-preferences/index.d.ts +6 -0
  21. package/dist/context/user-preferences/provider.d.ts +9 -0
  22. package/dist/context/user-preferences-store/context.d.ts +5 -0
  23. package/dist/context/user-preferences-store/hooks.d.ts +1 -0
  24. package/dist/context/user-preferences-store/provider.d.ts +5 -0
  25. package/dist/features/har-analyzer/components/app-layout.d.ts +7 -0
  26. package/dist/features/har-analyzer/components/preferences/index.d.ts +1 -0
  27. package/dist/features/har-analyzer/components/top-navigation.d.ts +8 -0
  28. package/dist/features/har-analyzer/context/preferences.d.ts +2 -0
  29. package/dist/features/har-analyzer-preferences-store/index.d.ts +2 -0
  30. package/dist/features/har-entries-viewer/index.d.ts +1 -1
  31. package/dist/features/list-har-entries/components/compare-mode-switcher.d.ts +1 -0
  32. package/dist/features/list-har-entries/components/content-type-filter.d.ts +1 -0
  33. package/dist/features/list-har-entries/components/errors-filter.d.ts +1 -0
  34. package/dist/features/list-har-entries/components/har-entries-table.d.ts +8 -0
  35. package/dist/features/list-har-entries/context/preferences.d.ts +5 -0
  36. package/dist/features/list-har-entries/index.d.ts +3 -7
  37. package/dist/har-analyzer-preferences-store.js +4 -0
  38. package/dist/har-analyzer.js +94 -81
  39. package/dist/har-entries-viewer.js +167 -7
  40. package/dist/index.d.ts +7 -2
  41. package/dist/index.js +12 -13
  42. package/dist/list-har-entries.js +3 -2126
  43. package/dist/utils/har.d.ts +1 -1
  44. package/dist/view-har-entry.js +5 -3128
  45. package/package.json +1 -1
  46. package/dist/chunks/json.js +0 -10
  47. package/dist/components/enhanced-top-navigation.d.ts +0 -7
  48. package/dist/components/simple-app-layout.d.ts +0 -6
  49. package/dist/components/simple-app-preferences/index.d.ts +0 -1
  50. package/dist/features/har-analyzer-preferences/index.d.ts +0 -7
  51. package/dist/features/har-entries-viewer/components/har-entries-filters/components/content-type-filter.d.ts +0 -7
  52. package/dist/features/har-entries-viewer/components/har-entries-filters/components/errors-filter.d.ts +0 -6
  53. package/dist/features/har-entries-viewer/components/har-entries-filters/index.d.ts +0 -1
  54. package/dist/features/har-entries-viewer/hooks/preferences.d.ts +0 -2
  55. package/dist/har-analyzer-preferences.js +0 -25
  56. package/dist/hooks/app-preferences.d.ts +0 -2
  57. package/dist/hooks/table-preferences.d.ts +0 -12
  58. /package/dist/{components/simple-app-preferences → features/har-analyzer/components/preferences/components}/content-width-switcher.d.ts +0 -0
  59. /package/dist/{components/simple-app-preferences → features/har-analyzer/components/preferences/components}/theme-switcher.d.ts +0 -0
@@ -1,210 +1,2301 @@
1
- import { jsx as o, jsxs as x } from "react/jsx-runtime";
2
- import { useState as y, useMemo as F } from "react";
3
- import k from "@cloudscape-design/board-components/board";
4
- import U from "@cloudscape-design/board-components/board-item";
5
- import M from "@cloudscape-design/components/button";
6
- import j from "@cloudscape-design/components/header";
7
- import Y from "../list-har-entries.js";
8
- import G from "../view-har-entry.js";
9
- import { d as f, b as V, a as W } from "./har.js";
10
- import q from "@cloudscape-design/components/space-between";
11
- import { useHARAnalyzerPreferences as H } from "../har-analyzer-preferences.js";
12
- import J from "@cloudscape-design/components/multiselect";
13
- import { C as K } from "./content-type.js";
14
- import Q from "@cloudscape-design/components/segmented-control";
15
- function X({ children: e, ...n }) {
16
- return /* @__PURE__ */ o(q, { direction: "horizontal", size: "s", ...n, children: e });
17
- }
18
- const Z = {
19
- dragHandleAriaLabel: "Drag handle",
20
- dragHandleAriaDescription: "Use Space or Enter to activate drag, arrow keys to move, Space or Enter to submit, or Escape to discard. Be sure to temporarily disable any screen reader navigation feature that may interfere with the functionality of the arrow keys.",
21
- resizeHandleAriaLabel: "Resize handle",
22
- resizeHandleAriaDescription: "Use Space or Enter to activate resize, arrow keys to move, Space or Enter to submit, or Escape to discard. Be sure to temporarily disable any screen reader navigation feature that may interfere with the functionality of the arrow keys."
1
+ import { jsx as m, jsxs as ve } from "react/jsx-runtime";
2
+ import Ke from "@cloudscape-design/components/header";
3
+ import z from "@cloudscape-design/components/status-indicator";
4
+ import { useMemo as y, use as Fe, useState as ae, useCallback as B, useEffect as Ee, createContext as et } from "react";
5
+ import { useCollection as tt } from "@cloudscape-design/collection-hooks";
6
+ import nt from "@cloudscape-design/components/collection-preferences";
7
+ import rt from "@cloudscape-design/components/property-filter";
8
+ import at from "@cloudscape-design/components/table";
9
+ import { o as I, C as ot } from "./content-type.js";
10
+ import it from "@cloudscape-design/components/space-between";
11
+ import { c as oe, b as st, a as ct, d as ut, i as lt } from "./har.js";
12
+ import ft from "@cloudscape-design/components/spinner";
13
+ import { U as dt } from "./context.js";
14
+ import mt from "@cloudscape-design/components/toggle";
15
+ import ht from "@cloudscape-design/components/multiselect";
16
+ import gt from "@cloudscape-design/components/segmented-control";
17
+ const pt = [
18
+ "B",
19
+ "kB",
20
+ "MB",
21
+ "GB",
22
+ "TB",
23
+ "PB",
24
+ "EB",
25
+ "ZB",
26
+ "YB"
27
+ ], wt = [
28
+ "B",
29
+ "KiB",
30
+ "MiB",
31
+ "GiB",
32
+ "TiB",
33
+ "PiB",
34
+ "EiB",
35
+ "ZiB",
36
+ "YiB"
37
+ ], yt = [
38
+ "b",
39
+ "kbit",
40
+ "Mbit",
41
+ "Gbit",
42
+ "Tbit",
43
+ "Pbit",
44
+ "Ebit",
45
+ "Zbit",
46
+ "Ybit"
47
+ ], bt = [
48
+ "b",
49
+ "kibit",
50
+ "Mibit",
51
+ "Gibit",
52
+ "Tibit",
53
+ "Pibit",
54
+ "Eibit",
55
+ "Zibit",
56
+ "Yibit"
57
+ ], ie = (e, t, n) => {
58
+ let r = e;
59
+ return typeof t == "string" || Array.isArray(t) ? r = e.toLocaleString(t, n) : (t === !0 || n !== void 0) && (r = e.toLocaleString(void 0, n)), r;
60
+ }, ke = (e) => {
61
+ if (typeof e == "number")
62
+ return Math.log10(e);
63
+ const t = e.toString(10);
64
+ return t.length + Math.log10("0." + t.slice(0, 15));
65
+ }, Tt = (e) => typeof e == "number" ? Math.log(e) : ke(e) * Math.log(10), Dt = (e, t) => {
66
+ if (typeof e == "number")
67
+ return e / t;
68
+ const n = e / BigInt(t), r = e % BigInt(t);
69
+ return Number(n) + Number(r) / t;
23
70
  };
24
- function p(e, n, t) {
25
- const r = n.length > 0 ? `Conflicts with ${n.map((s) => s.id).join(", ")}.` : "", i = t.length > 0 ? `Disturbed ${t.length} items.` : "";
26
- return [e, r, i].filter(Boolean).join(" ");
27
- }
28
- const ee = {
29
- liveAnnouncementDndStarted: (e) => e === "resize" ? "Resizing" : "Dragging",
30
- liveAnnouncementDndItemReordered: (e) => {
31
- const n = `column ${e.placement.x + 1}`, t = `row ${e.placement.y + 1}`;
32
- return p(
33
- `Item moved to ${e.direction === "horizontal" ? n : t}.`,
34
- e.conflicts,
35
- e.disturbed
71
+ function Pt(e, t) {
72
+ if (typeof e != "bigint" && !Number.isFinite(e))
73
+ throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);
74
+ t = {
75
+ bits: !1,
76
+ binary: !1,
77
+ space: !0,
78
+ ...t
79
+ };
80
+ const n = t.bits ? t.binary ? bt : yt : t.binary ? wt : pt, r = t.space ? " " : "";
81
+ if (t.signed && (typeof e == "number" ? e === 0 : e === 0n))
82
+ return ` 0${r}${n[0]}`;
83
+ const a = e < 0, o = a ? "-" : t.signed ? "+" : "";
84
+ a && (e = -e);
85
+ let i;
86
+ if (t.minimumFractionDigits !== void 0 && (i = { minimumFractionDigits: t.minimumFractionDigits }), t.maximumFractionDigits !== void 0 && (i = { maximumFractionDigits: t.maximumFractionDigits, ...i }), e < 1) {
87
+ const d = ie(e, t.locale, i);
88
+ return o + d + r + n[0];
89
+ }
90
+ const s = Math.min(Math.floor(t.binary ? Tt(e) / Math.log(1024) : ke(e) / 3), n.length - 1);
91
+ e = Dt(e, (t.binary ? 1024 : 1e3) ** s), i || (e = e.toPrecision(3));
92
+ const c = ie(Number(e), t.locale, i), u = n[s];
93
+ return o + c + r + u;
94
+ }
95
+ function Mt(e, t) {
96
+ return e.map((n) => ({
97
+ ...I(t).reduce(
98
+ (a, [o, { cell: i }]) => {
99
+ const { value: s } = i(n);
100
+ return a[o] = s, a;
101
+ },
102
+ {}
103
+ ),
104
+ __originalItem__: n
105
+ }));
106
+ }
107
+ function Ot(e) {
108
+ return I(e).map(([t, { header: n, type: r }]) => {
109
+ const a = {
110
+ key: t,
111
+ groupValuesLabel: `${n} values`,
112
+ propertyLabel: n,
113
+ operators: ["=", "!=", ":", "!:", "^", "!^"]
114
+ };
115
+ return r === "number" ? {
116
+ ...a,
117
+ operators: ["=", "!=", ">", ">=", "<", "<="]
118
+ } : r === "date" ? {
119
+ ...a,
120
+ operators: [
121
+ { operator: "=", match: "datetime" },
122
+ { operator: "!=", match: "datetime" },
123
+ { operator: ">", match: "datetime" },
124
+ { operator: ">=", match: "datetime" },
125
+ { operator: "<", match: "datetime" },
126
+ { operator: "<=", match: "datetime" }
127
+ ]
128
+ } : r === "list" ? {
129
+ ...a,
130
+ operators: ["=", "!=", ":", "!:"]
131
+ } : a;
132
+ });
133
+ }
134
+ function xt(e) {
135
+ return I(e).map(([t, {
136
+ header: n,
137
+ width: r,
138
+ isSortable: a = !0,
139
+ cell: o
140
+ }]) => ({
141
+ id: t,
142
+ header: n,
143
+ width: r,
144
+ sortingField: a ? t : void 0,
145
+ cell: (i) => {
146
+ const { value: s, content: c } = o(i.__originalItem__);
147
+ return c || (s instanceof Date ? s.getTime() : Array.isArray(s) ? s.join(", ") : s);
148
+ }
149
+ }));
150
+ }
151
+ function St(e) {
152
+ return I(e).map(([t, { header: n, isVisibleByDefault: r = !0 }]) => ({
153
+ id: t,
154
+ label: n,
155
+ visible: r
156
+ }));
157
+ }
158
+ function Nt(e, t) {
159
+ return e.map((n) => {
160
+ const r = t.find((a) => a.id === n.id)?.width;
161
+ return {
162
+ ...n,
163
+ width: r ?? n.width
164
+ };
165
+ });
166
+ }
167
+ function Yt(e, t) {
168
+ if (!e.contentDisplay)
169
+ return e;
170
+ const n = t.map(({ id: a }) => a), r = e.contentDisplay.filter(({ id: a }) => n.includes(a));
171
+ return {
172
+ ...e,
173
+ contentDisplay: r
174
+ };
175
+ }
176
+ function Ct({
177
+ items: e,
178
+ getRowId: t,
179
+ columnsDefinition: n,
180
+ useTablePreferences: r,
181
+ empty: a,
182
+ selectionType: o,
183
+ isEntireRowSelectable: i = !1,
184
+ selectedItems: s = [],
185
+ onSelectionChange: c,
186
+ contentDensity: u = "comfortable",
187
+ header: d
188
+ }) {
189
+ const f = y(
190
+ () => Mt(e, n),
191
+ [e, n]
192
+ ), p = y(() => xt(n), [n]), S = y(
193
+ () => {
194
+ const h = new Set(s.map((b) => t(b)));
195
+ return f.filter(
196
+ (b) => h.has(t(b.__originalItem__))
197
+ );
198
+ },
199
+ [s, f, t]
200
+ ), w = y(
201
+ () => St(n),
202
+ [n]
203
+ ), N = y(() => ({
204
+ contentDisplay: w,
205
+ wrapLines: !1
206
+ }), [w]), [{ collectionPreferences: U = N, preferredColumnWidths: L }, te] = r(), $ = y(
207
+ () => Yt(U, p),
208
+ [U, p]
209
+ ), qe = y(
210
+ () => Nt(p, L),
211
+ [p, L]
212
+ ), Xe = (h) => {
213
+ te({
214
+ collectionPreferences: h,
215
+ preferredColumnWidths: L
216
+ });
217
+ }, Ze = (h) => {
218
+ te({
219
+ collectionPreferences: U,
220
+ preferredColumnWidths: h
221
+ });
222
+ }, je = ({ detail: { item: h } }) => {
223
+ if (!c || !o)
224
+ return;
225
+ const b = h.__originalItem__;
226
+ if (o === "single") {
227
+ c([b]);
228
+ return;
229
+ }
230
+ const E = t(b), A = s.some((R) => t(R) === E);
231
+ c(A ? s.filter((R) => t(R) !== E) : [...s, b]);
232
+ }, ne = (h) => t(h.__originalItem__), Ge = y(
233
+ () => Ot(n),
234
+ [n]
235
+ ), {
236
+ items: Qe,
237
+ collectionProps: Ve,
238
+ propertyFilterProps: Je,
239
+ filteredItemsCount: re
240
+ } = tt(f, {
241
+ propertyFiltering: {
242
+ filteringProperties: Ge
243
+ },
244
+ sorting: {},
245
+ selection: { keepSelection: !0, trackBy: ne }
246
+ });
247
+ return /* @__PURE__ */ m(
248
+ at,
249
+ {
250
+ ...Ve,
251
+ header: d,
252
+ variant: "full-page",
253
+ contentDensity: u,
254
+ resizableColumns: !0,
255
+ stripedRows: !0,
256
+ stickyHeader: !0,
257
+ wrapLines: $.wrapLines,
258
+ columnDefinitions: qe,
259
+ columnDisplay: $.contentDisplay,
260
+ onColumnWidthsChange: ({ detail: h }) => {
261
+ const b = p.map(({ id: E }, A) => ({
262
+ id: E,
263
+ width: h.widths[A]
264
+ }));
265
+ Ze(b);
266
+ },
267
+ items: Qe,
268
+ trackBy: ne,
269
+ empty: a,
270
+ selectionType: o,
271
+ onRowClick: i ? je : void 0,
272
+ selectedItems: S,
273
+ onSelectionChange: (h) => {
274
+ c && c(h.detail.selectedItems.map((b) => b.__originalItem__));
275
+ },
276
+ filter: /* @__PURE__ */ m(
277
+ rt,
278
+ {
279
+ countText: re ? `${re} matches` : void 0,
280
+ ...Je
281
+ }
282
+ ),
283
+ preferences: /* @__PURE__ */ m(
284
+ nt,
285
+ {
286
+ wrapLinesPreference: {},
287
+ contentDisplayPreference: { options: w, enableColumnFiltering: !0 },
288
+ preferences: $,
289
+ onConfirm: ({ detail: h }) => {
290
+ Xe(h);
291
+ }
292
+ }
293
+ )
294
+ }
295
+ );
296
+ }
297
+ function vt({ children: e, ...t }) {
298
+ return /* @__PURE__ */ m(it, { direction: "horizontal", size: "s", ...t, children: e });
299
+ }
300
+ const Ft = {
301
+ lessThanXSeconds: {
302
+ one: "less than a second",
303
+ other: "less than {{count}} seconds"
304
+ },
305
+ xSeconds: {
306
+ one: "1 second",
307
+ other: "{{count}} seconds"
308
+ },
309
+ halfAMinute: "half a minute",
310
+ lessThanXMinutes: {
311
+ one: "less than a minute",
312
+ other: "less than {{count}} minutes"
313
+ },
314
+ xMinutes: {
315
+ one: "1 minute",
316
+ other: "{{count}} minutes"
317
+ },
318
+ aboutXHours: {
319
+ one: "about 1 hour",
320
+ other: "about {{count}} hours"
321
+ },
322
+ xHours: {
323
+ one: "1 hour",
324
+ other: "{{count}} hours"
325
+ },
326
+ xDays: {
327
+ one: "1 day",
328
+ other: "{{count}} days"
329
+ },
330
+ aboutXWeeks: {
331
+ one: "about 1 week",
332
+ other: "about {{count}} weeks"
333
+ },
334
+ xWeeks: {
335
+ one: "1 week",
336
+ other: "{{count}} weeks"
337
+ },
338
+ aboutXMonths: {
339
+ one: "about 1 month",
340
+ other: "about {{count}} months"
341
+ },
342
+ xMonths: {
343
+ one: "1 month",
344
+ other: "{{count}} months"
345
+ },
346
+ aboutXYears: {
347
+ one: "about 1 year",
348
+ other: "about {{count}} years"
349
+ },
350
+ xYears: {
351
+ one: "1 year",
352
+ other: "{{count}} years"
353
+ },
354
+ overXYears: {
355
+ one: "over 1 year",
356
+ other: "over {{count}} years"
357
+ },
358
+ almostXYears: {
359
+ one: "almost 1 year",
360
+ other: "almost {{count}} years"
361
+ }
362
+ }, Et = (e, t, n) => {
363
+ let r;
364
+ const a = Ft[e];
365
+ return typeof a == "string" ? r = a : t === 1 ? r = a.one : r = a.other.replace("{{count}}", t.toString()), n?.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
366
+ };
367
+ function q(e) {
368
+ return (t = {}) => {
369
+ const n = t.width ? String(t.width) : e.defaultWidth;
370
+ return e.formats[n] || e.formats[e.defaultWidth];
371
+ };
372
+ }
373
+ const kt = {
374
+ full: "EEEE, MMMM do, y",
375
+ long: "MMMM do, y",
376
+ medium: "MMM d, y",
377
+ short: "MM/dd/yyyy"
378
+ }, Wt = {
379
+ full: "h:mm:ss a zzzz",
380
+ long: "h:mm:ss a z",
381
+ medium: "h:mm:ss a",
382
+ short: "h:mm a"
383
+ }, It = {
384
+ full: "{{date}} 'at' {{time}}",
385
+ long: "{{date}} 'at' {{time}}",
386
+ medium: "{{date}}, {{time}}",
387
+ short: "{{date}}, {{time}}"
388
+ }, _t = {
389
+ date: q({
390
+ formats: kt,
391
+ defaultWidth: "full"
392
+ }),
393
+ time: q({
394
+ formats: Wt,
395
+ defaultWidth: "full"
396
+ }),
397
+ dateTime: q({
398
+ formats: It,
399
+ defaultWidth: "full"
400
+ })
401
+ }, Ht = {
402
+ lastWeek: "'last' eeee 'at' p",
403
+ yesterday: "'yesterday at' p",
404
+ today: "'today at' p",
405
+ tomorrow: "'tomorrow at' p",
406
+ nextWeek: "eeee 'at' p",
407
+ other: "P"
408
+ }, Ut = (e, t, n, r) => Ht[e];
409
+ function Y(e) {
410
+ return (t, n) => {
411
+ const r = n?.context ? String(n.context) : "standalone";
412
+ let a;
413
+ if (r === "formatting" && e.formattingValues) {
414
+ const i = e.defaultFormattingWidth || e.defaultWidth, s = n?.width ? String(n.width) : i;
415
+ a = e.formattingValues[s] || e.formattingValues[i];
416
+ } else {
417
+ const i = e.defaultWidth, s = n?.width ? String(n.width) : e.defaultWidth;
418
+ a = e.values[s] || e.values[i];
419
+ }
420
+ const o = e.argumentCallback ? e.argumentCallback(t) : t;
421
+ return a[o];
422
+ };
423
+ }
424
+ const Lt = {
425
+ narrow: ["B", "A"],
426
+ abbreviated: ["BC", "AD"],
427
+ wide: ["Before Christ", "Anno Domini"]
428
+ }, $t = {
429
+ narrow: ["1", "2", "3", "4"],
430
+ abbreviated: ["Q1", "Q2", "Q3", "Q4"],
431
+ wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
432
+ }, At = {
433
+ narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
434
+ abbreviated: [
435
+ "Jan",
436
+ "Feb",
437
+ "Mar",
438
+ "Apr",
439
+ "May",
440
+ "Jun",
441
+ "Jul",
442
+ "Aug",
443
+ "Sep",
444
+ "Oct",
445
+ "Nov",
446
+ "Dec"
447
+ ],
448
+ wide: [
449
+ "January",
450
+ "February",
451
+ "March",
452
+ "April",
453
+ "May",
454
+ "June",
455
+ "July",
456
+ "August",
457
+ "September",
458
+ "October",
459
+ "November",
460
+ "December"
461
+ ]
462
+ }, Rt = {
463
+ narrow: ["S", "M", "T", "W", "T", "F", "S"],
464
+ short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
465
+ abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
466
+ wide: [
467
+ "Sunday",
468
+ "Monday",
469
+ "Tuesday",
470
+ "Wednesday",
471
+ "Thursday",
472
+ "Friday",
473
+ "Saturday"
474
+ ]
475
+ }, zt = {
476
+ narrow: {
477
+ am: "a",
478
+ pm: "p",
479
+ midnight: "mi",
480
+ noon: "n",
481
+ morning: "morning",
482
+ afternoon: "afternoon",
483
+ evening: "evening",
484
+ night: "night"
485
+ },
486
+ abbreviated: {
487
+ am: "AM",
488
+ pm: "PM",
489
+ midnight: "midnight",
490
+ noon: "noon",
491
+ morning: "morning",
492
+ afternoon: "afternoon",
493
+ evening: "evening",
494
+ night: "night"
495
+ },
496
+ wide: {
497
+ am: "a.m.",
498
+ pm: "p.m.",
499
+ midnight: "midnight",
500
+ noon: "noon",
501
+ morning: "morning",
502
+ afternoon: "afternoon",
503
+ evening: "evening",
504
+ night: "night"
505
+ }
506
+ }, Bt = {
507
+ narrow: {
508
+ am: "a",
509
+ pm: "p",
510
+ midnight: "mi",
511
+ noon: "n",
512
+ morning: "in the morning",
513
+ afternoon: "in the afternoon",
514
+ evening: "in the evening",
515
+ night: "at night"
516
+ },
517
+ abbreviated: {
518
+ am: "AM",
519
+ pm: "PM",
520
+ midnight: "midnight",
521
+ noon: "noon",
522
+ morning: "in the morning",
523
+ afternoon: "in the afternoon",
524
+ evening: "in the evening",
525
+ night: "at night"
526
+ },
527
+ wide: {
528
+ am: "a.m.",
529
+ pm: "p.m.",
530
+ midnight: "midnight",
531
+ noon: "noon",
532
+ morning: "in the morning",
533
+ afternoon: "in the afternoon",
534
+ evening: "in the evening",
535
+ night: "at night"
536
+ }
537
+ }, qt = (e, t) => {
538
+ const n = Number(e), r = n % 100;
539
+ if (r > 20 || r < 10)
540
+ switch (r % 10) {
541
+ case 1:
542
+ return n + "st";
543
+ case 2:
544
+ return n + "nd";
545
+ case 3:
546
+ return n + "rd";
547
+ }
548
+ return n + "th";
549
+ }, Xt = {
550
+ ordinalNumber: qt,
551
+ era: Y({
552
+ values: Lt,
553
+ defaultWidth: "wide"
554
+ }),
555
+ quarter: Y({
556
+ values: $t,
557
+ defaultWidth: "wide",
558
+ argumentCallback: (e) => e - 1
559
+ }),
560
+ month: Y({
561
+ values: At,
562
+ defaultWidth: "wide"
563
+ }),
564
+ day: Y({
565
+ values: Rt,
566
+ defaultWidth: "wide"
567
+ }),
568
+ dayPeriod: Y({
569
+ values: zt,
570
+ defaultWidth: "wide",
571
+ formattingValues: Bt,
572
+ defaultFormattingWidth: "wide"
573
+ })
574
+ };
575
+ function C(e) {
576
+ return (t, n = {}) => {
577
+ const r = n.width, a = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], o = t.match(a);
578
+ if (!o)
579
+ return null;
580
+ const i = o[0], s = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ? jt(s, (f) => f.test(i)) : (
581
+ // [TODO] -- I challenge you to fix the type
582
+ Zt(s, (f) => f.test(i))
583
+ );
584
+ let u;
585
+ u = e.valueCallback ? e.valueCallback(c) : c, u = n.valueCallback ? (
586
+ // [TODO] -- I challenge you to fix the type
587
+ n.valueCallback(u)
588
+ ) : u;
589
+ const d = t.slice(i.length);
590
+ return { value: u, rest: d };
591
+ };
592
+ }
593
+ function Zt(e, t) {
594
+ for (const n in e)
595
+ if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n]))
596
+ return n;
597
+ }
598
+ function jt(e, t) {
599
+ for (let n = 0; n < e.length; n++)
600
+ if (t(e[n]))
601
+ return n;
602
+ }
603
+ function Gt(e) {
604
+ return (t, n = {}) => {
605
+ const r = t.match(e.matchPattern);
606
+ if (!r) return null;
607
+ const a = r[0], o = t.match(e.parsePattern);
608
+ if (!o) return null;
609
+ let i = e.valueCallback ? e.valueCallback(o[0]) : o[0];
610
+ i = n.valueCallback ? n.valueCallback(i) : i;
611
+ const s = t.slice(a.length);
612
+ return { value: i, rest: s };
613
+ };
614
+ }
615
+ const Qt = /^(\d+)(th|st|nd|rd)?/i, Vt = /\d+/i, Jt = {
616
+ narrow: /^(b|a)/i,
617
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
618
+ wide: /^(before christ|before common era|anno domini|common era)/i
619
+ }, Kt = {
620
+ any: [/^b/i, /^(a|c)/i]
621
+ }, en = {
622
+ narrow: /^[1234]/i,
623
+ abbreviated: /^q[1234]/i,
624
+ wide: /^[1234](th|st|nd|rd)? quarter/i
625
+ }, tn = {
626
+ any: [/1/i, /2/i, /3/i, /4/i]
627
+ }, nn = {
628
+ narrow: /^[jfmasond]/i,
629
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
630
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
631
+ }, rn = {
632
+ narrow: [
633
+ /^j/i,
634
+ /^f/i,
635
+ /^m/i,
636
+ /^a/i,
637
+ /^m/i,
638
+ /^j/i,
639
+ /^j/i,
640
+ /^a/i,
641
+ /^s/i,
642
+ /^o/i,
643
+ /^n/i,
644
+ /^d/i
645
+ ],
646
+ any: [
647
+ /^ja/i,
648
+ /^f/i,
649
+ /^mar/i,
650
+ /^ap/i,
651
+ /^may/i,
652
+ /^jun/i,
653
+ /^jul/i,
654
+ /^au/i,
655
+ /^s/i,
656
+ /^o/i,
657
+ /^n/i,
658
+ /^d/i
659
+ ]
660
+ }, an = {
661
+ narrow: /^[smtwf]/i,
662
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
663
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
664
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
665
+ }, on = {
666
+ narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
667
+ any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
668
+ }, sn = {
669
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
670
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
671
+ }, cn = {
672
+ any: {
673
+ am: /^a/i,
674
+ pm: /^p/i,
675
+ midnight: /^mi/i,
676
+ noon: /^no/i,
677
+ morning: /morning/i,
678
+ afternoon: /afternoon/i,
679
+ evening: /evening/i,
680
+ night: /night/i
681
+ }
682
+ }, un = {
683
+ ordinalNumber: Gt({
684
+ matchPattern: Qt,
685
+ parsePattern: Vt,
686
+ valueCallback: (e) => parseInt(e, 10)
687
+ }),
688
+ era: C({
689
+ matchPatterns: Jt,
690
+ defaultMatchWidth: "wide",
691
+ parsePatterns: Kt,
692
+ defaultParseWidth: "any"
693
+ }),
694
+ quarter: C({
695
+ matchPatterns: en,
696
+ defaultMatchWidth: "wide",
697
+ parsePatterns: tn,
698
+ defaultParseWidth: "any",
699
+ valueCallback: (e) => e + 1
700
+ }),
701
+ month: C({
702
+ matchPatterns: nn,
703
+ defaultMatchWidth: "wide",
704
+ parsePatterns: rn,
705
+ defaultParseWidth: "any"
706
+ }),
707
+ day: C({
708
+ matchPatterns: an,
709
+ defaultMatchWidth: "wide",
710
+ parsePatterns: on,
711
+ defaultParseWidth: "any"
712
+ }),
713
+ dayPeriod: C({
714
+ matchPatterns: sn,
715
+ defaultMatchWidth: "any",
716
+ parsePatterns: cn,
717
+ defaultParseWidth: "any"
718
+ })
719
+ }, ln = {
720
+ code: "en-US",
721
+ formatDistance: Et,
722
+ formatLong: _t,
723
+ formatRelative: Ut,
724
+ localize: Xt,
725
+ match: un,
726
+ options: {
727
+ weekStartsOn: 0,
728
+ firstWeekContainsDate: 1
729
+ }
730
+ };
731
+ let fn = {};
732
+ function F() {
733
+ return fn;
734
+ }
735
+ const We = 6048e5, dn = 864e5, se = Symbol.for("constructDateFrom");
736
+ function P(e, t) {
737
+ return typeof e == "function" ? e(t) : e && typeof e == "object" && se in e ? e[se](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
738
+ }
739
+ function T(e, t) {
740
+ return P(t || e, e);
741
+ }
742
+ function ce(e) {
743
+ const t = T(e), n = new Date(
744
+ Date.UTC(
745
+ t.getFullYear(),
746
+ t.getMonth(),
747
+ t.getDate(),
748
+ t.getHours(),
749
+ t.getMinutes(),
750
+ t.getSeconds(),
751
+ t.getMilliseconds()
752
+ )
753
+ );
754
+ return n.setUTCFullYear(t.getFullYear()), +e - +n;
755
+ }
756
+ function mn(e, ...t) {
757
+ const n = P.bind(
758
+ null,
759
+ t.find((r) => typeof r == "object")
760
+ );
761
+ return t.map(n);
762
+ }
763
+ function ue(e, t) {
764
+ const n = T(e, t?.in);
765
+ return n.setHours(0, 0, 0, 0), n;
766
+ }
767
+ function hn(e, t, n) {
768
+ const [r, a] = mn(
769
+ n?.in,
770
+ e,
771
+ t
772
+ ), o = ue(r), i = ue(a), s = +o - ce(o), c = +i - ce(i);
773
+ return Math.round((s - c) / dn);
774
+ }
775
+ function gn(e, t) {
776
+ const n = T(e, t?.in);
777
+ return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
778
+ }
779
+ function pn(e, t) {
780
+ const n = T(e, t?.in);
781
+ return hn(n, gn(n)) + 1;
782
+ }
783
+ function v(e, t) {
784
+ const n = F(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, a = T(e, t?.in), o = a.getDay(), i = (o < r ? 7 : 0) + o - r;
785
+ return a.setDate(a.getDate() - i), a.setHours(0, 0, 0, 0), a;
786
+ }
787
+ function k(e, t) {
788
+ return v(e, { ...t, weekStartsOn: 1 });
789
+ }
790
+ function Ie(e, t) {
791
+ const n = T(e, t?.in), r = n.getFullYear(), a = P(n, 0);
792
+ a.setFullYear(r + 1, 0, 4), a.setHours(0, 0, 0, 0);
793
+ const o = k(a), i = P(n, 0);
794
+ i.setFullYear(r, 0, 4), i.setHours(0, 0, 0, 0);
795
+ const s = k(i);
796
+ return n.getTime() >= o.getTime() ? r + 1 : n.getTime() >= s.getTime() ? r : r - 1;
797
+ }
798
+ function wn(e, t) {
799
+ const n = Ie(e, t), r = P(e, 0);
800
+ return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), k(r);
801
+ }
802
+ function yn(e, t) {
803
+ const n = T(e, t?.in), r = +k(n) - +wn(n);
804
+ return Math.round(r / We) + 1;
805
+ }
806
+ function _e(e, t) {
807
+ const n = T(e, t?.in), r = n.getFullYear(), a = F(), o = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? a.firstWeekContainsDate ?? a.locale?.options?.firstWeekContainsDate ?? 1, i = P(t?.in || e, 0);
808
+ i.setFullYear(r + 1, 0, o), i.setHours(0, 0, 0, 0);
809
+ const s = v(i, t), c = P(t?.in || e, 0);
810
+ c.setFullYear(r, 0, o), c.setHours(0, 0, 0, 0);
811
+ const u = v(c, t);
812
+ return +n >= +s ? r + 1 : +n >= +u ? r : r - 1;
813
+ }
814
+ function bn(e, t) {
815
+ const n = F(), r = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, a = _e(e, t), o = P(t?.in || e, 0);
816
+ return o.setFullYear(a, 0, r), o.setHours(0, 0, 0, 0), v(o, t);
817
+ }
818
+ function Tn(e, t) {
819
+ const n = T(e, t?.in), r = +v(n, t) - +bn(n, t);
820
+ return Math.round(r / We) + 1;
821
+ }
822
+ function l(e, t) {
823
+ const n = e < 0 ? "-" : "", r = Math.abs(e).toString().padStart(t, "0");
824
+ return n + r;
825
+ }
826
+ const D = {
827
+ // Year
828
+ y(e, t) {
829
+ const n = e.getFullYear(), r = n > 0 ? n : 1 - n;
830
+ return l(t === "yy" ? r % 100 : r, t.length);
831
+ },
832
+ // Month
833
+ M(e, t) {
834
+ const n = e.getMonth();
835
+ return t === "M" ? String(n + 1) : l(n + 1, 2);
836
+ },
837
+ // Day of the month
838
+ d(e, t) {
839
+ return l(e.getDate(), t.length);
840
+ },
841
+ // AM or PM
842
+ a(e, t) {
843
+ const n = e.getHours() / 12 >= 1 ? "pm" : "am";
844
+ switch (t) {
845
+ case "a":
846
+ case "aa":
847
+ return n.toUpperCase();
848
+ case "aaa":
849
+ return n;
850
+ case "aaaaa":
851
+ return n[0];
852
+ case "aaaa":
853
+ default:
854
+ return n === "am" ? "a.m." : "p.m.";
855
+ }
856
+ },
857
+ // Hour [1-12]
858
+ h(e, t) {
859
+ return l(e.getHours() % 12 || 12, t.length);
860
+ },
861
+ // Hour [0-23]
862
+ H(e, t) {
863
+ return l(e.getHours(), t.length);
864
+ },
865
+ // Minute
866
+ m(e, t) {
867
+ return l(e.getMinutes(), t.length);
868
+ },
869
+ // Second
870
+ s(e, t) {
871
+ return l(e.getSeconds(), t.length);
872
+ },
873
+ // Fraction of second
874
+ S(e, t) {
875
+ const n = t.length, r = e.getMilliseconds(), a = Math.trunc(
876
+ r * Math.pow(10, n - 3)
36
877
  );
878
+ return l(a, t.length);
879
+ }
880
+ }, O = {
881
+ midnight: "midnight",
882
+ noon: "noon",
883
+ morning: "morning",
884
+ afternoon: "afternoon",
885
+ evening: "evening",
886
+ night: "night"
887
+ }, le = {
888
+ // Era
889
+ G: function(e, t, n) {
890
+ const r = e.getFullYear() > 0 ? 1 : 0;
891
+ switch (t) {
892
+ // AD, BC
893
+ case "G":
894
+ case "GG":
895
+ case "GGG":
896
+ return n.era(r, { width: "abbreviated" });
897
+ // A, B
898
+ case "GGGGG":
899
+ return n.era(r, { width: "narrow" });
900
+ // Anno Domini, Before Christ
901
+ case "GGGG":
902
+ default:
903
+ return n.era(r, { width: "wide" });
904
+ }
905
+ },
906
+ // Year
907
+ y: function(e, t, n) {
908
+ if (t === "yo") {
909
+ const r = e.getFullYear(), a = r > 0 ? r : 1 - r;
910
+ return n.ordinalNumber(a, { unit: "year" });
911
+ }
912
+ return D.y(e, t);
913
+ },
914
+ // Local week-numbering year
915
+ Y: function(e, t, n, r) {
916
+ const a = _e(e, r), o = a > 0 ? a : 1 - a;
917
+ if (t === "YY") {
918
+ const i = o % 100;
919
+ return l(i, 2);
920
+ }
921
+ return t === "Yo" ? n.ordinalNumber(o, { unit: "year" }) : l(o, t.length);
922
+ },
923
+ // ISO week-numbering year
924
+ R: function(e, t) {
925
+ const n = Ie(e);
926
+ return l(n, t.length);
927
+ },
928
+ // Extended year. This is a single number designating the year of this calendar system.
929
+ // The main difference between `y` and `u` localizers are B.C. years:
930
+ // | Year | `y` | `u` |
931
+ // |------|-----|-----|
932
+ // | AC 1 | 1 | 1 |
933
+ // | BC 1 | 1 | 0 |
934
+ // | BC 2 | 2 | -1 |
935
+ // Also `yy` always returns the last two digits of a year,
936
+ // while `uu` pads single digit years to 2 characters and returns other years unchanged.
937
+ u: function(e, t) {
938
+ const n = e.getFullYear();
939
+ return l(n, t.length);
940
+ },
941
+ // Quarter
942
+ Q: function(e, t, n) {
943
+ const r = Math.ceil((e.getMonth() + 1) / 3);
944
+ switch (t) {
945
+ // 1, 2, 3, 4
946
+ case "Q":
947
+ return String(r);
948
+ // 01, 02, 03, 04
949
+ case "QQ":
950
+ return l(r, 2);
951
+ // 1st, 2nd, 3rd, 4th
952
+ case "Qo":
953
+ return n.ordinalNumber(r, { unit: "quarter" });
954
+ // Q1, Q2, Q3, Q4
955
+ case "QQQ":
956
+ return n.quarter(r, {
957
+ width: "abbreviated",
958
+ context: "formatting"
959
+ });
960
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
961
+ case "QQQQQ":
962
+ return n.quarter(r, {
963
+ width: "narrow",
964
+ context: "formatting"
965
+ });
966
+ // 1st quarter, 2nd quarter, ...
967
+ case "QQQQ":
968
+ default:
969
+ return n.quarter(r, {
970
+ width: "wide",
971
+ context: "formatting"
972
+ });
973
+ }
974
+ },
975
+ // Stand-alone quarter
976
+ q: function(e, t, n) {
977
+ const r = Math.ceil((e.getMonth() + 1) / 3);
978
+ switch (t) {
979
+ // 1, 2, 3, 4
980
+ case "q":
981
+ return String(r);
982
+ // 01, 02, 03, 04
983
+ case "qq":
984
+ return l(r, 2);
985
+ // 1st, 2nd, 3rd, 4th
986
+ case "qo":
987
+ return n.ordinalNumber(r, { unit: "quarter" });
988
+ // Q1, Q2, Q3, Q4
989
+ case "qqq":
990
+ return n.quarter(r, {
991
+ width: "abbreviated",
992
+ context: "standalone"
993
+ });
994
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
995
+ case "qqqqq":
996
+ return n.quarter(r, {
997
+ width: "narrow",
998
+ context: "standalone"
999
+ });
1000
+ // 1st quarter, 2nd quarter, ...
1001
+ case "qqqq":
1002
+ default:
1003
+ return n.quarter(r, {
1004
+ width: "wide",
1005
+ context: "standalone"
1006
+ });
1007
+ }
1008
+ },
1009
+ // Month
1010
+ M: function(e, t, n) {
1011
+ const r = e.getMonth();
1012
+ switch (t) {
1013
+ case "M":
1014
+ case "MM":
1015
+ return D.M(e, t);
1016
+ // 1st, 2nd, ..., 12th
1017
+ case "Mo":
1018
+ return n.ordinalNumber(r + 1, { unit: "month" });
1019
+ // Jan, Feb, ..., Dec
1020
+ case "MMM":
1021
+ return n.month(r, {
1022
+ width: "abbreviated",
1023
+ context: "formatting"
1024
+ });
1025
+ // J, F, ..., D
1026
+ case "MMMMM":
1027
+ return n.month(r, {
1028
+ width: "narrow",
1029
+ context: "formatting"
1030
+ });
1031
+ // January, February, ..., December
1032
+ case "MMMM":
1033
+ default:
1034
+ return n.month(r, { width: "wide", context: "formatting" });
1035
+ }
1036
+ },
1037
+ // Stand-alone month
1038
+ L: function(e, t, n) {
1039
+ const r = e.getMonth();
1040
+ switch (t) {
1041
+ // 1, 2, ..., 12
1042
+ case "L":
1043
+ return String(r + 1);
1044
+ // 01, 02, ..., 12
1045
+ case "LL":
1046
+ return l(r + 1, 2);
1047
+ // 1st, 2nd, ..., 12th
1048
+ case "Lo":
1049
+ return n.ordinalNumber(r + 1, { unit: "month" });
1050
+ // Jan, Feb, ..., Dec
1051
+ case "LLL":
1052
+ return n.month(r, {
1053
+ width: "abbreviated",
1054
+ context: "standalone"
1055
+ });
1056
+ // J, F, ..., D
1057
+ case "LLLLL":
1058
+ return n.month(r, {
1059
+ width: "narrow",
1060
+ context: "standalone"
1061
+ });
1062
+ // January, February, ..., December
1063
+ case "LLLL":
1064
+ default:
1065
+ return n.month(r, { width: "wide", context: "standalone" });
1066
+ }
1067
+ },
1068
+ // Local week of year
1069
+ w: function(e, t, n, r) {
1070
+ const a = Tn(e, r);
1071
+ return t === "wo" ? n.ordinalNumber(a, { unit: "week" }) : l(a, t.length);
1072
+ },
1073
+ // ISO week of year
1074
+ I: function(e, t, n) {
1075
+ const r = yn(e);
1076
+ return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : l(r, t.length);
1077
+ },
1078
+ // Day of the month
1079
+ d: function(e, t, n) {
1080
+ return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : D.d(e, t);
1081
+ },
1082
+ // Day of year
1083
+ D: function(e, t, n) {
1084
+ const r = pn(e);
1085
+ return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : l(r, t.length);
1086
+ },
1087
+ // Day of week
1088
+ E: function(e, t, n) {
1089
+ const r = e.getDay();
1090
+ switch (t) {
1091
+ // Tue
1092
+ case "E":
1093
+ case "EE":
1094
+ case "EEE":
1095
+ return n.day(r, {
1096
+ width: "abbreviated",
1097
+ context: "formatting"
1098
+ });
1099
+ // T
1100
+ case "EEEEE":
1101
+ return n.day(r, {
1102
+ width: "narrow",
1103
+ context: "formatting"
1104
+ });
1105
+ // Tu
1106
+ case "EEEEEE":
1107
+ return n.day(r, {
1108
+ width: "short",
1109
+ context: "formatting"
1110
+ });
1111
+ // Tuesday
1112
+ case "EEEE":
1113
+ default:
1114
+ return n.day(r, {
1115
+ width: "wide",
1116
+ context: "formatting"
1117
+ });
1118
+ }
1119
+ },
1120
+ // Local day of week
1121
+ e: function(e, t, n, r) {
1122
+ const a = e.getDay(), o = (a - r.weekStartsOn + 8) % 7 || 7;
1123
+ switch (t) {
1124
+ // Numerical value (Nth day of week with current locale or weekStartsOn)
1125
+ case "e":
1126
+ return String(o);
1127
+ // Padded numerical value
1128
+ case "ee":
1129
+ return l(o, 2);
1130
+ // 1st, 2nd, ..., 7th
1131
+ case "eo":
1132
+ return n.ordinalNumber(o, { unit: "day" });
1133
+ case "eee":
1134
+ return n.day(a, {
1135
+ width: "abbreviated",
1136
+ context: "formatting"
1137
+ });
1138
+ // T
1139
+ case "eeeee":
1140
+ return n.day(a, {
1141
+ width: "narrow",
1142
+ context: "formatting"
1143
+ });
1144
+ // Tu
1145
+ case "eeeeee":
1146
+ return n.day(a, {
1147
+ width: "short",
1148
+ context: "formatting"
1149
+ });
1150
+ // Tuesday
1151
+ case "eeee":
1152
+ default:
1153
+ return n.day(a, {
1154
+ width: "wide",
1155
+ context: "formatting"
1156
+ });
1157
+ }
1158
+ },
1159
+ // Stand-alone local day of week
1160
+ c: function(e, t, n, r) {
1161
+ const a = e.getDay(), o = (a - r.weekStartsOn + 8) % 7 || 7;
1162
+ switch (t) {
1163
+ // Numerical value (same as in `e`)
1164
+ case "c":
1165
+ return String(o);
1166
+ // Padded numerical value
1167
+ case "cc":
1168
+ return l(o, t.length);
1169
+ // 1st, 2nd, ..., 7th
1170
+ case "co":
1171
+ return n.ordinalNumber(o, { unit: "day" });
1172
+ case "ccc":
1173
+ return n.day(a, {
1174
+ width: "abbreviated",
1175
+ context: "standalone"
1176
+ });
1177
+ // T
1178
+ case "ccccc":
1179
+ return n.day(a, {
1180
+ width: "narrow",
1181
+ context: "standalone"
1182
+ });
1183
+ // Tu
1184
+ case "cccccc":
1185
+ return n.day(a, {
1186
+ width: "short",
1187
+ context: "standalone"
1188
+ });
1189
+ // Tuesday
1190
+ case "cccc":
1191
+ default:
1192
+ return n.day(a, {
1193
+ width: "wide",
1194
+ context: "standalone"
1195
+ });
1196
+ }
1197
+ },
1198
+ // ISO day of week
1199
+ i: function(e, t, n) {
1200
+ const r = e.getDay(), a = r === 0 ? 7 : r;
1201
+ switch (t) {
1202
+ // 2
1203
+ case "i":
1204
+ return String(a);
1205
+ // 02
1206
+ case "ii":
1207
+ return l(a, t.length);
1208
+ // 2nd
1209
+ case "io":
1210
+ return n.ordinalNumber(a, { unit: "day" });
1211
+ // Tue
1212
+ case "iii":
1213
+ return n.day(r, {
1214
+ width: "abbreviated",
1215
+ context: "formatting"
1216
+ });
1217
+ // T
1218
+ case "iiiii":
1219
+ return n.day(r, {
1220
+ width: "narrow",
1221
+ context: "formatting"
1222
+ });
1223
+ // Tu
1224
+ case "iiiiii":
1225
+ return n.day(r, {
1226
+ width: "short",
1227
+ context: "formatting"
1228
+ });
1229
+ // Tuesday
1230
+ case "iiii":
1231
+ default:
1232
+ return n.day(r, {
1233
+ width: "wide",
1234
+ context: "formatting"
1235
+ });
1236
+ }
1237
+ },
1238
+ // AM or PM
1239
+ a: function(e, t, n) {
1240
+ const a = e.getHours() / 12 >= 1 ? "pm" : "am";
1241
+ switch (t) {
1242
+ case "a":
1243
+ case "aa":
1244
+ return n.dayPeriod(a, {
1245
+ width: "abbreviated",
1246
+ context: "formatting"
1247
+ });
1248
+ case "aaa":
1249
+ return n.dayPeriod(a, {
1250
+ width: "abbreviated",
1251
+ context: "formatting"
1252
+ }).toLowerCase();
1253
+ case "aaaaa":
1254
+ return n.dayPeriod(a, {
1255
+ width: "narrow",
1256
+ context: "formatting"
1257
+ });
1258
+ case "aaaa":
1259
+ default:
1260
+ return n.dayPeriod(a, {
1261
+ width: "wide",
1262
+ context: "formatting"
1263
+ });
1264
+ }
1265
+ },
1266
+ // AM, PM, midnight, noon
1267
+ b: function(e, t, n) {
1268
+ const r = e.getHours();
1269
+ let a;
1270
+ switch (r === 12 ? a = O.noon : r === 0 ? a = O.midnight : a = r / 12 >= 1 ? "pm" : "am", t) {
1271
+ case "b":
1272
+ case "bb":
1273
+ return n.dayPeriod(a, {
1274
+ width: "abbreviated",
1275
+ context: "formatting"
1276
+ });
1277
+ case "bbb":
1278
+ return n.dayPeriod(a, {
1279
+ width: "abbreviated",
1280
+ context: "formatting"
1281
+ }).toLowerCase();
1282
+ case "bbbbb":
1283
+ return n.dayPeriod(a, {
1284
+ width: "narrow",
1285
+ context: "formatting"
1286
+ });
1287
+ case "bbbb":
1288
+ default:
1289
+ return n.dayPeriod(a, {
1290
+ width: "wide",
1291
+ context: "formatting"
1292
+ });
1293
+ }
1294
+ },
1295
+ // in the morning, in the afternoon, in the evening, at night
1296
+ B: function(e, t, n) {
1297
+ const r = e.getHours();
1298
+ let a;
1299
+ switch (r >= 17 ? a = O.evening : r >= 12 ? a = O.afternoon : r >= 4 ? a = O.morning : a = O.night, t) {
1300
+ case "B":
1301
+ case "BB":
1302
+ case "BBB":
1303
+ return n.dayPeriod(a, {
1304
+ width: "abbreviated",
1305
+ context: "formatting"
1306
+ });
1307
+ case "BBBBB":
1308
+ return n.dayPeriod(a, {
1309
+ width: "narrow",
1310
+ context: "formatting"
1311
+ });
1312
+ case "BBBB":
1313
+ default:
1314
+ return n.dayPeriod(a, {
1315
+ width: "wide",
1316
+ context: "formatting"
1317
+ });
1318
+ }
1319
+ },
1320
+ // Hour [1-12]
1321
+ h: function(e, t, n) {
1322
+ if (t === "ho") {
1323
+ let r = e.getHours() % 12;
1324
+ return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
1325
+ }
1326
+ return D.h(e, t);
1327
+ },
1328
+ // Hour [0-23]
1329
+ H: function(e, t, n) {
1330
+ return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : D.H(e, t);
1331
+ },
1332
+ // Hour [0-11]
1333
+ K: function(e, t, n) {
1334
+ const r = e.getHours() % 12;
1335
+ return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : l(r, t.length);
1336
+ },
1337
+ // Hour [1-24]
1338
+ k: function(e, t, n) {
1339
+ let r = e.getHours();
1340
+ return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : l(r, t.length);
1341
+ },
1342
+ // Minute
1343
+ m: function(e, t, n) {
1344
+ return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : D.m(e, t);
1345
+ },
1346
+ // Second
1347
+ s: function(e, t, n) {
1348
+ return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : D.s(e, t);
1349
+ },
1350
+ // Fraction of second
1351
+ S: function(e, t) {
1352
+ return D.S(e, t);
1353
+ },
1354
+ // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1355
+ X: function(e, t, n) {
1356
+ const r = e.getTimezoneOffset();
1357
+ if (r === 0)
1358
+ return "Z";
1359
+ switch (t) {
1360
+ // Hours and optional minutes
1361
+ case "X":
1362
+ return de(r);
1363
+ // Hours, minutes and optional seconds without `:` delimiter
1364
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1365
+ // so this token always has the same output as `XX`
1366
+ case "XXXX":
1367
+ case "XX":
1368
+ return M(r);
1369
+ // Hours, minutes and optional seconds with `:` delimiter
1370
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1371
+ // so this token always has the same output as `XXX`
1372
+ case "XXXXX":
1373
+ case "XXX":
1374
+ // Hours and minutes with `:` delimiter
1375
+ default:
1376
+ return M(r, ":");
1377
+ }
1378
+ },
1379
+ // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
1380
+ x: function(e, t, n) {
1381
+ const r = e.getTimezoneOffset();
1382
+ switch (t) {
1383
+ // Hours and optional minutes
1384
+ case "x":
1385
+ return de(r);
1386
+ // Hours, minutes and optional seconds without `:` delimiter
1387
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1388
+ // so this token always has the same output as `xx`
1389
+ case "xxxx":
1390
+ case "xx":
1391
+ return M(r);
1392
+ // Hours, minutes and optional seconds with `:` delimiter
1393
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1394
+ // so this token always has the same output as `xxx`
1395
+ case "xxxxx":
1396
+ case "xxx":
1397
+ // Hours and minutes with `:` delimiter
1398
+ default:
1399
+ return M(r, ":");
1400
+ }
1401
+ },
1402
+ // Timezone (GMT)
1403
+ O: function(e, t, n) {
1404
+ const r = e.getTimezoneOffset();
1405
+ switch (t) {
1406
+ // Short
1407
+ case "O":
1408
+ case "OO":
1409
+ case "OOO":
1410
+ return "GMT" + fe(r, ":");
1411
+ // Long
1412
+ case "OOOO":
1413
+ default:
1414
+ return "GMT" + M(r, ":");
1415
+ }
1416
+ },
1417
+ // Timezone (specific non-location)
1418
+ z: function(e, t, n) {
1419
+ const r = e.getTimezoneOffset();
1420
+ switch (t) {
1421
+ // Short
1422
+ case "z":
1423
+ case "zz":
1424
+ case "zzz":
1425
+ return "GMT" + fe(r, ":");
1426
+ // Long
1427
+ case "zzzz":
1428
+ default:
1429
+ return "GMT" + M(r, ":");
1430
+ }
1431
+ },
1432
+ // Seconds timestamp
1433
+ t: function(e, t, n) {
1434
+ const r = Math.trunc(+e / 1e3);
1435
+ return l(r, t.length);
1436
+ },
1437
+ // Milliseconds timestamp
1438
+ T: function(e, t, n) {
1439
+ return l(+e, t.length);
1440
+ }
1441
+ };
1442
+ function fe(e, t = "") {
1443
+ const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.trunc(r / 60), o = r % 60;
1444
+ return o === 0 ? n + String(a) : n + String(a) + t + l(o, 2);
1445
+ }
1446
+ function de(e, t) {
1447
+ return e % 60 === 0 ? (e > 0 ? "-" : "+") + l(Math.abs(e) / 60, 2) : M(e, t);
1448
+ }
1449
+ function M(e, t = "") {
1450
+ const n = e > 0 ? "-" : "+", r = Math.abs(e), a = l(Math.trunc(r / 60), 2), o = l(r % 60, 2);
1451
+ return n + a + t + o;
1452
+ }
1453
+ const me = (e, t) => {
1454
+ switch (e) {
1455
+ case "P":
1456
+ return t.date({ width: "short" });
1457
+ case "PP":
1458
+ return t.date({ width: "medium" });
1459
+ case "PPP":
1460
+ return t.date({ width: "long" });
1461
+ case "PPPP":
1462
+ default:
1463
+ return t.date({ width: "full" });
1464
+ }
1465
+ }, He = (e, t) => {
1466
+ switch (e) {
1467
+ case "p":
1468
+ return t.time({ width: "short" });
1469
+ case "pp":
1470
+ return t.time({ width: "medium" });
1471
+ case "ppp":
1472
+ return t.time({ width: "long" });
1473
+ case "pppp":
1474
+ default:
1475
+ return t.time({ width: "full" });
1476
+ }
1477
+ }, Dn = (e, t) => {
1478
+ const n = e.match(/(P+)(p+)?/) || [], r = n[1], a = n[2];
1479
+ if (!a)
1480
+ return me(e, t);
1481
+ let o;
1482
+ switch (r) {
1483
+ case "P":
1484
+ o = t.dateTime({ width: "short" });
1485
+ break;
1486
+ case "PP":
1487
+ o = t.dateTime({ width: "medium" });
1488
+ break;
1489
+ case "PPP":
1490
+ o = t.dateTime({ width: "long" });
1491
+ break;
1492
+ case "PPPP":
1493
+ default:
1494
+ o = t.dateTime({ width: "full" });
1495
+ break;
1496
+ }
1497
+ return o.replace("{{date}}", me(r, t)).replace("{{time}}", He(a, t));
1498
+ }, Pn = {
1499
+ p: He,
1500
+ P: Dn
1501
+ }, Mn = /^D+$/, On = /^Y+$/, xn = ["D", "DD", "YY", "YYYY"];
1502
+ function Sn(e) {
1503
+ return Mn.test(e);
1504
+ }
1505
+ function Nn(e) {
1506
+ return On.test(e);
1507
+ }
1508
+ function Yn(e, t, n) {
1509
+ const r = Cn(e, t, n);
1510
+ if (console.warn(r), xn.includes(e)) throw new RangeError(r);
1511
+ }
1512
+ function Cn(e, t, n) {
1513
+ const r = e[0] === "Y" ? "years" : "days of the month";
1514
+ return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
1515
+ }
1516
+ function vn(e) {
1517
+ return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
1518
+ }
1519
+ function Fn(e) {
1520
+ return !(!vn(e) && typeof e != "number" || isNaN(+T(e)));
1521
+ }
1522
+ const En = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, kn = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Wn = /^'([^]*?)'?$/, In = /''/g, _n = /[a-zA-Z]/;
1523
+ function Hn(e, t, n) {
1524
+ const r = F(), a = n?.locale ?? r.locale ?? ln, o = n?.firstWeekContainsDate ?? n?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, i = n?.weekStartsOn ?? n?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, s = T(e, n?.in);
1525
+ if (!Fn(s))
1526
+ throw new RangeError("Invalid time value");
1527
+ let c = t.match(kn).map((d) => {
1528
+ const f = d[0];
1529
+ if (f === "p" || f === "P") {
1530
+ const p = Pn[f];
1531
+ return p(d, a.formatLong);
1532
+ }
1533
+ return d;
1534
+ }).join("").match(En).map((d) => {
1535
+ if (d === "''")
1536
+ return { isToken: !1, value: "'" };
1537
+ const f = d[0];
1538
+ if (f === "'")
1539
+ return { isToken: !1, value: Un(d) };
1540
+ if (le[f])
1541
+ return { isToken: !0, value: d };
1542
+ if (f.match(_n))
1543
+ throw new RangeError(
1544
+ "Format string contains an unescaped latin alphabet character `" + f + "`"
1545
+ );
1546
+ return { isToken: !1, value: d };
1547
+ });
1548
+ a.localize.preprocessor && (c = a.localize.preprocessor(s, c));
1549
+ const u = {
1550
+ firstWeekContainsDate: o,
1551
+ weekStartsOn: i,
1552
+ locale: a
1553
+ };
1554
+ return c.map((d) => {
1555
+ if (!d.isToken) return d.value;
1556
+ const f = d.value;
1557
+ (!n?.useAdditionalWeekYearTokens && Nn(f) || !n?.useAdditionalDayOfYearTokens && Sn(f)) && Yn(f, t, String(e));
1558
+ const p = le[f[0]];
1559
+ return p(s, f, a.localize, u);
1560
+ }).join("");
1561
+ }
1562
+ function Un(e) {
1563
+ const t = e.match(Wn);
1564
+ return t ? t[1].replace(In, "'") : e;
1565
+ }
1566
+ function Ln() {
1567
+ return Object.assign({}, F());
1568
+ }
1569
+ function he(e, t, n) {
1570
+ const r = Ln(), a = Rn(e, n.timeZone, n.locale ?? r.locale);
1571
+ return "formatToParts" in a ? $n(a, t) : An(a, t);
1572
+ }
1573
+ function $n(e, t) {
1574
+ const n = e.formatToParts(t);
1575
+ for (let r = n.length - 1; r >= 0; --r)
1576
+ if (n[r].type === "timeZoneName")
1577
+ return n[r].value;
1578
+ }
1579
+ function An(e, t) {
1580
+ const n = e.format(t).replace(/\u200E/g, ""), r = / [\w-+ ]+$/.exec(n);
1581
+ return r ? r[0].substr(1) : "";
1582
+ }
1583
+ function Rn(e, t, n) {
1584
+ return new Intl.DateTimeFormat(n ? [n.code, "en-US"] : void 0, {
1585
+ timeZone: t,
1586
+ timeZoneName: e
1587
+ });
1588
+ }
1589
+ function zn(e, t) {
1590
+ const n = jn(t);
1591
+ return "formatToParts" in n ? qn(n, e) : Xn(n, e);
1592
+ }
1593
+ const Bn = {
1594
+ year: 0,
1595
+ month: 1,
1596
+ day: 2,
1597
+ hour: 3,
1598
+ minute: 4,
1599
+ second: 5
1600
+ };
1601
+ function qn(e, t) {
1602
+ try {
1603
+ const n = e.formatToParts(t), r = [];
1604
+ for (let a = 0; a < n.length; a++) {
1605
+ const o = Bn[n[a].type];
1606
+ o !== void 0 && (r[o] = parseInt(n[a].value, 10));
1607
+ }
1608
+ return r;
1609
+ } catch (n) {
1610
+ if (n instanceof RangeError)
1611
+ return [NaN];
1612
+ throw n;
1613
+ }
1614
+ }
1615
+ function Xn(e, t) {
1616
+ const n = e.format(t), r = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);
1617
+ return [
1618
+ parseInt(r[3], 10),
1619
+ parseInt(r[1], 10),
1620
+ parseInt(r[2], 10),
1621
+ parseInt(r[4], 10),
1622
+ parseInt(r[5], 10),
1623
+ parseInt(r[6], 10)
1624
+ ];
1625
+ }
1626
+ const X = {}, ge = new Intl.DateTimeFormat("en-US", {
1627
+ hourCycle: "h23",
1628
+ timeZone: "America/New_York",
1629
+ year: "numeric",
1630
+ month: "2-digit",
1631
+ day: "2-digit",
1632
+ hour: "2-digit",
1633
+ minute: "2-digit",
1634
+ second: "2-digit"
1635
+ }).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")), Zn = ge === "06/25/2014, 00:00:00" || ge === "‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";
1636
+ function jn(e) {
1637
+ return X[e] || (X[e] = Zn ? new Intl.DateTimeFormat("en-US", {
1638
+ hourCycle: "h23",
1639
+ timeZone: e,
1640
+ year: "numeric",
1641
+ month: "numeric",
1642
+ day: "2-digit",
1643
+ hour: "2-digit",
1644
+ minute: "2-digit",
1645
+ second: "2-digit"
1646
+ }) : new Intl.DateTimeFormat("en-US", {
1647
+ hour12: !1,
1648
+ timeZone: e,
1649
+ year: "numeric",
1650
+ month: "numeric",
1651
+ day: "2-digit",
1652
+ hour: "2-digit",
1653
+ minute: "2-digit",
1654
+ second: "2-digit"
1655
+ })), X[e];
1656
+ }
1657
+ function Ue(e, t, n, r, a, o, i) {
1658
+ const s = /* @__PURE__ */ new Date(0);
1659
+ return s.setUTCFullYear(e, t, n), s.setUTCHours(r, a, o, i), s;
1660
+ }
1661
+ const pe = 36e5, Gn = 6e4, Z = {
1662
+ timezoneZ: /^(Z)$/,
1663
+ timezoneHH: /^([+-]\d{2})$/,
1664
+ timezoneHHMM: /^([+-])(\d{2}):?(\d{2})$/
1665
+ };
1666
+ function ee(e, t, n) {
1667
+ if (!e)
1668
+ return 0;
1669
+ let r = Z.timezoneZ.exec(e);
1670
+ if (r)
1671
+ return 0;
1672
+ let a, o;
1673
+ if (r = Z.timezoneHH.exec(e), r)
1674
+ return a = parseInt(r[1], 10), we(a) ? -(a * pe) : NaN;
1675
+ if (r = Z.timezoneHHMM.exec(e), r) {
1676
+ a = parseInt(r[2], 10);
1677
+ const i = parseInt(r[3], 10);
1678
+ return we(a, i) ? (o = Math.abs(a) * pe + i * Gn, r[1] === "+" ? -o : o) : NaN;
1679
+ }
1680
+ if (Jn(e)) {
1681
+ t = new Date(t || Date.now());
1682
+ const i = n ? t : Qn(t), s = J(i, e);
1683
+ return -(n ? s : Vn(t, s, e));
1684
+ }
1685
+ return NaN;
1686
+ }
1687
+ function Qn(e) {
1688
+ return Ue(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds());
1689
+ }
1690
+ function J(e, t) {
1691
+ const n = zn(e, t), r = Ue(n[0], n[1] - 1, n[2], n[3] % 24, n[4], n[5], 0).getTime();
1692
+ let a = e.getTime();
1693
+ const o = a % 1e3;
1694
+ return a -= o >= 0 ? o : 1e3 + o, r - a;
1695
+ }
1696
+ function Vn(e, t, n) {
1697
+ let a = e.getTime() - t;
1698
+ const o = J(new Date(a), n);
1699
+ if (t === o)
1700
+ return t;
1701
+ a -= o - t;
1702
+ const i = J(new Date(a), n);
1703
+ return o === i ? o : Math.max(o, i);
1704
+ }
1705
+ function we(e, t) {
1706
+ return -23 <= e && e <= 23 && (t == null || 0 <= t && t <= 59);
1707
+ }
1708
+ const ye = {};
1709
+ function Jn(e) {
1710
+ if (ye[e])
1711
+ return !0;
1712
+ try {
1713
+ return new Intl.DateTimeFormat(void 0, { timeZone: e }), ye[e] = !0, !0;
1714
+ } catch {
1715
+ return !1;
1716
+ }
1717
+ }
1718
+ const Kn = 60 * 1e3, er = {
1719
+ // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1720
+ X: function(e, t, n) {
1721
+ const r = j(n.timeZone, e);
1722
+ if (r === 0)
1723
+ return "Z";
1724
+ switch (t) {
1725
+ // Hours and optional minutes
1726
+ case "X":
1727
+ return be(r);
1728
+ // Hours, minutes and optional seconds without `:` delimeter
1729
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1730
+ // so this token always has the same output as `XX`
1731
+ case "XXXX":
1732
+ case "XX":
1733
+ return x(r);
1734
+ // Hours, minutes and optional seconds with `:` delimeter
1735
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1736
+ // so this token always has the same output as `XXX`
1737
+ case "XXXXX":
1738
+ case "XXX":
1739
+ // Hours and minutes with `:` delimeter
1740
+ default:
1741
+ return x(r, ":");
1742
+ }
37
1743
  },
38
- liveAnnouncementDndItemResized: (e) => {
39
- const n = e.isMinimalColumnsReached ? " (minimal)" : "", t = e.isMinimalRowsReached ? " (minimal)" : "", r = e.direction === "horizontal" ? `columns ${e.placement.width}${n}` : `rows ${e.placement.height}${t}`;
40
- return p(`Item resized to ${r}.`, e.conflicts, e.disturbed);
1744
+ // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
1745
+ x: function(e, t, n) {
1746
+ const r = j(n.timeZone, e);
1747
+ switch (t) {
1748
+ // Hours and optional minutes
1749
+ case "x":
1750
+ return be(r);
1751
+ // Hours, minutes and optional seconds without `:` delimeter
1752
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1753
+ // so this token always has the same output as `xx`
1754
+ case "xxxx":
1755
+ case "xx":
1756
+ return x(r);
1757
+ // Hours, minutes and optional seconds with `:` delimeter
1758
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1759
+ // so this token always has the same output as `xxx`
1760
+ case "xxxxx":
1761
+ case "xxx":
1762
+ // Hours and minutes with `:` delimeter
1763
+ default:
1764
+ return x(r, ":");
1765
+ }
41
1766
  },
42
- liveAnnouncementDndItemInserted: (e) => {
43
- const n = `column ${e.placement.x + 1}`, t = `row ${e.placement.y + 1}`;
44
- return p(`Item inserted to ${n}, ${t}.`, e.conflicts, e.disturbed);
1767
+ // Timezone (GMT)
1768
+ O: function(e, t, n) {
1769
+ const r = j(n.timeZone, e);
1770
+ switch (t) {
1771
+ // Short
1772
+ case "O":
1773
+ case "OO":
1774
+ case "OOO":
1775
+ return "GMT" + tr(r, ":");
1776
+ // Long
1777
+ case "OOOO":
1778
+ default:
1779
+ return "GMT" + x(r, ":");
1780
+ }
45
1781
  },
46
- liveAnnouncementDndCommitted: (e) => `${e} committed`,
47
- liveAnnouncementDndDiscarded: (e) => `${e} discarded`,
48
- liveAnnouncementItemRemoved: (e) => p(`Removed item ${e.item.id}.`, [], e.disturbed),
49
- navigationAriaLabel: "Board navigation",
50
- navigationAriaDescription: "Click on non-empty item to move focus over",
51
- navigationItemAriaLabel: (e) => e ? e.id : "Empty"
1782
+ // Timezone (specific non-location)
1783
+ z: function(e, t, n) {
1784
+ switch (t) {
1785
+ // Short
1786
+ case "z":
1787
+ case "zz":
1788
+ case "zzz":
1789
+ return he("short", e, n);
1790
+ // Long
1791
+ case "zzzz":
1792
+ default:
1793
+ return he("long", e, n);
1794
+ }
1795
+ }
1796
+ };
1797
+ function j(e, t) {
1798
+ const n = e ? ee(e, t, !0) / Kn : t?.getTimezoneOffset() ?? 0;
1799
+ if (Number.isNaN(n))
1800
+ throw new RangeError("Invalid time zone specified: " + e);
1801
+ return n;
1802
+ }
1803
+ function W(e, t) {
1804
+ const n = e < 0 ? "-" : "";
1805
+ let r = Math.abs(e).toString();
1806
+ for (; r.length < t; )
1807
+ r = "0" + r;
1808
+ return n + r;
1809
+ }
1810
+ function x(e, t = "") {
1811
+ const n = e > 0 ? "-" : "+", r = Math.abs(e), a = W(Math.floor(r / 60), 2), o = W(Math.floor(r % 60), 2);
1812
+ return n + a + t + o;
1813
+ }
1814
+ function be(e, t) {
1815
+ return e % 60 === 0 ? (e > 0 ? "-" : "+") + W(Math.abs(e) / 60, 2) : x(e, t);
1816
+ }
1817
+ function tr(e, t = "") {
1818
+ const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.floor(r / 60), o = r % 60;
1819
+ return o === 0 ? n + String(a) : n + String(a) + t + W(o, 2);
1820
+ }
1821
+ function Te(e) {
1822
+ const t = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()));
1823
+ return t.setUTCFullYear(e.getFullYear()), +e - +t;
1824
+ }
1825
+ const nr = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/, G = 36e5, De = 6e4, rr = 2, g = {
1826
+ dateTimePattern: /^([0-9W+-]+)(T| )(.*)/,
1827
+ datePattern: /^([0-9W+-]+)(.*)/,
1828
+ // year tokens
1829
+ YY: /^(\d{2})$/,
1830
+ YYY: [
1831
+ /^([+-]\d{2})$/,
1832
+ // 0 additional digits
1833
+ /^([+-]\d{3})$/,
1834
+ // 1 additional digit
1835
+ /^([+-]\d{4})$/
1836
+ // 2 additional digits
1837
+ ],
1838
+ YYYY: /^(\d{4})/,
1839
+ YYYYY: [
1840
+ /^([+-]\d{4})/,
1841
+ // 0 additional digits
1842
+ /^([+-]\d{5})/,
1843
+ // 1 additional digit
1844
+ /^([+-]\d{6})/
1845
+ // 2 additional digits
1846
+ ],
1847
+ // date tokens
1848
+ MM: /^-(\d{2})$/,
1849
+ DDD: /^-?(\d{3})$/,
1850
+ MMDD: /^-?(\d{2})-?(\d{2})$/,
1851
+ Www: /^-?W(\d{2})$/,
1852
+ WwwD: /^-?W(\d{2})-?(\d{1})$/,
1853
+ HH: /^(\d{2}([.,]\d*)?)$/,
1854
+ HHMM: /^(\d{2}):?(\d{2}([.,]\d*)?)$/,
1855
+ HHMMSS: /^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,
1856
+ // time zone tokens (to identify the presence of a tz)
1857
+ timeZone: nr
52
1858
  };
53
- function te(e) {
1859
+ function Le(e, t = {}) {
1860
+ if (arguments.length < 1)
1861
+ throw new TypeError("1 argument required, but only " + arguments.length + " present");
1862
+ if (e === null)
1863
+ return /* @__PURE__ */ new Date(NaN);
1864
+ const n = t.additionalDigits == null ? rr : Number(t.additionalDigits);
1865
+ if (n !== 2 && n !== 1 && n !== 0)
1866
+ throw new RangeError("additionalDigits must be 0, 1 or 2");
1867
+ if (e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]")
1868
+ return new Date(e.getTime());
1869
+ if (typeof e == "number" || Object.prototype.toString.call(e) === "[object Number]")
1870
+ return new Date(e);
1871
+ if (Object.prototype.toString.call(e) !== "[object String]")
1872
+ return /* @__PURE__ */ new Date(NaN);
1873
+ const r = ar(e), { year: a, restDateString: o } = or(r.date, n), i = ir(o, a);
1874
+ if (i === null || isNaN(i.getTime()))
1875
+ return /* @__PURE__ */ new Date(NaN);
1876
+ if (i) {
1877
+ const s = i.getTime();
1878
+ let c = 0, u;
1879
+ if (r.time && (c = sr(r.time), c === null || isNaN(c)))
1880
+ return /* @__PURE__ */ new Date(NaN);
1881
+ if (r.timeZone || t.timeZone) {
1882
+ if (u = ee(r.timeZone || t.timeZone, new Date(s + c)), isNaN(u))
1883
+ return /* @__PURE__ */ new Date(NaN);
1884
+ } else
1885
+ u = Te(new Date(s + c)), u = Te(new Date(s + c + u));
1886
+ return new Date(s + c + u);
1887
+ } else
1888
+ return /* @__PURE__ */ new Date(NaN);
1889
+ }
1890
+ function ar(e) {
1891
+ const t = {};
1892
+ let n = g.dateTimePattern.exec(e), r;
1893
+ if (n ? (t.date = n[1], r = n[3]) : (n = g.datePattern.exec(e), n ? (t.date = n[1], r = n[2]) : (t.date = null, r = e)), r) {
1894
+ const a = g.timeZone.exec(r);
1895
+ a ? (t.time = r.replace(a[1], ""), t.timeZone = a[1].trim()) : t.time = r;
1896
+ }
1897
+ return t;
1898
+ }
1899
+ function or(e, t) {
1900
+ if (e) {
1901
+ const n = g.YYY[t], r = g.YYYYY[t];
1902
+ let a = g.YYYY.exec(e) || r.exec(e);
1903
+ if (a) {
1904
+ const o = a[1];
1905
+ return {
1906
+ year: parseInt(o, 10),
1907
+ restDateString: e.slice(o.length)
1908
+ };
1909
+ }
1910
+ if (a = g.YY.exec(e) || n.exec(e), a) {
1911
+ const o = a[1];
1912
+ return {
1913
+ year: parseInt(o, 10) * 100,
1914
+ restDateString: e.slice(o.length)
1915
+ };
1916
+ }
1917
+ }
1918
+ return {
1919
+ year: null
1920
+ };
1921
+ }
1922
+ function ir(e, t) {
1923
+ if (t === null)
1924
+ return null;
1925
+ let n, r, a;
1926
+ if (!e || !e.length)
1927
+ return n = /* @__PURE__ */ new Date(0), n.setUTCFullYear(t), n;
1928
+ let o = g.MM.exec(e);
1929
+ if (o)
1930
+ return n = /* @__PURE__ */ new Date(0), r = parseInt(o[1], 10) - 1, Me(t, r) ? (n.setUTCFullYear(t, r), n) : /* @__PURE__ */ new Date(NaN);
1931
+ if (o = g.DDD.exec(e), o) {
1932
+ n = /* @__PURE__ */ new Date(0);
1933
+ const i = parseInt(o[1], 10);
1934
+ return lr(t, i) ? (n.setUTCFullYear(t, 0, i), n) : /* @__PURE__ */ new Date(NaN);
1935
+ }
1936
+ if (o = g.MMDD.exec(e), o) {
1937
+ n = /* @__PURE__ */ new Date(0), r = parseInt(o[1], 10) - 1;
1938
+ const i = parseInt(o[2], 10);
1939
+ return Me(t, r, i) ? (n.setUTCFullYear(t, r, i), n) : /* @__PURE__ */ new Date(NaN);
1940
+ }
1941
+ if (o = g.Www.exec(e), o)
1942
+ return a = parseInt(o[1], 10) - 1, Oe(a) ? Pe(t, a) : /* @__PURE__ */ new Date(NaN);
1943
+ if (o = g.WwwD.exec(e), o) {
1944
+ a = parseInt(o[1], 10) - 1;
1945
+ const i = parseInt(o[2], 10) - 1;
1946
+ return Oe(a, i) ? Pe(t, a, i) : /* @__PURE__ */ new Date(NaN);
1947
+ }
1948
+ return null;
1949
+ }
1950
+ function sr(e) {
1951
+ let t, n, r = g.HH.exec(e);
1952
+ if (r)
1953
+ return t = parseFloat(r[1].replace(",", ".")), Q(t) ? t % 24 * G : NaN;
1954
+ if (r = g.HHMM.exec(e), r)
1955
+ return t = parseInt(r[1], 10), n = parseFloat(r[2].replace(",", ".")), Q(t, n) ? t % 24 * G + n * De : NaN;
1956
+ if (r = g.HHMMSS.exec(e), r) {
1957
+ t = parseInt(r[1], 10), n = parseInt(r[2], 10);
1958
+ const a = parseFloat(r[3].replace(",", "."));
1959
+ return Q(t, n, a) ? t % 24 * G + n * De + a * 1e3 : NaN;
1960
+ }
1961
+ return null;
1962
+ }
1963
+ function Pe(e, t, n) {
1964
+ t = t || 0, n = n || 0;
1965
+ const r = /* @__PURE__ */ new Date(0);
1966
+ r.setUTCFullYear(e, 0, 4);
1967
+ const a = r.getUTCDay() || 7, o = t * 7 + n + 1 - a;
1968
+ return r.setUTCDate(r.getUTCDate() + o), r;
1969
+ }
1970
+ const cr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], ur = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
1971
+ function $e(e) {
1972
+ return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
1973
+ }
1974
+ function Me(e, t, n) {
1975
+ if (t < 0 || t > 11)
1976
+ return !1;
1977
+ if (n != null) {
1978
+ if (n < 1)
1979
+ return !1;
1980
+ const r = $e(e);
1981
+ if (r && n > ur[t] || !r && n > cr[t])
1982
+ return !1;
1983
+ }
1984
+ return !0;
1985
+ }
1986
+ function lr(e, t) {
1987
+ if (t < 1)
1988
+ return !1;
1989
+ const n = $e(e);
1990
+ return !(n && t > 366 || !n && t > 365);
1991
+ }
1992
+ function Oe(e, t) {
1993
+ return !(e < 0 || e > 52 || t != null && (t < 0 || t > 6));
1994
+ }
1995
+ function Q(e, t, n) {
1996
+ return !(e < 0 || e >= 25 || t != null && (t < 0 || t >= 60) || n != null && (n < 0 || n >= 60));
1997
+ }
1998
+ const fr = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
1999
+ function dr(e, t, n = {}) {
2000
+ t = String(t);
2001
+ const r = t.match(fr);
2002
+ if (r) {
2003
+ const a = Le(n.originalDate || e, n);
2004
+ t = r.reduce(function(o, i) {
2005
+ if (i[0] === "'")
2006
+ return o;
2007
+ const s = o.indexOf(i), c = o[s - 1] === "'", u = o.replace(i, "'" + er[i[0]](a, i, n) + "'");
2008
+ return c ? u.substring(0, s - 1) + u.substring(s + 1) : u;
2009
+ }, t);
2010
+ }
2011
+ return Hn(e, t, n);
2012
+ }
2013
+ function mr(e, t, n) {
2014
+ e = Le(e, n);
2015
+ const r = ee(t, e, !0), a = new Date(e.getTime() - r), o = /* @__PURE__ */ new Date(0);
2016
+ return o.setFullYear(a.getUTCFullYear(), a.getUTCMonth(), a.getUTCDate()), o.setHours(a.getUTCHours(), a.getUTCMinutes(), a.getUTCSeconds(), a.getUTCMilliseconds()), o;
2017
+ }
2018
+ function K(e, t, n, r) {
2019
+ return r = {
2020
+ ...r,
2021
+ timeZone: t,
2022
+ originalDate: e
2023
+ }, dr(mr(e, t, { timeZone: r.timeZone }), n, r);
2024
+ }
2025
+ const xe = "yyyy-MM-dd HH:mm:ss:SSS a";
2026
+ function Ae() {
2027
+ return Intl.DateTimeFormat().resolvedOptions().timeZone;
2028
+ }
2029
+ function hr() {
2030
+ return K(/* @__PURE__ */ new Date(), Ae(), "zzz");
2031
+ }
2032
+ function Se(e, t) {
2033
+ try {
2034
+ if (t)
2035
+ return K(new Date(e), "UTC", xe);
2036
+ const n = Ae();
2037
+ return K(new Date(e), n, xe);
2038
+ } catch (n) {
2039
+ return console.warn("Error formatting date:", n), e;
2040
+ }
2041
+ }
2042
+ function gr() {
2043
+ return Fe(dt);
2044
+ }
2045
+ function pr(e) {
54
2046
  const {
55
- components: n,
56
- definitions: t,
57
- onDefinitionsChange: r,
58
- empty: i
59
- } = e;
60
- return /* @__PURE__ */ o(
61
- k,
62
- {
63
- i18nStrings: ee,
64
- items: t,
65
- renderItem: ({ id: s }, { removeItem: d }) => {
66
- const {
67
- title: h,
68
- content: u,
69
- actions: A,
70
- counter: R,
71
- canRemove: E
72
- } = n[s] ?? {};
73
- return /* @__PURE__ */ o(
74
- U,
75
- {
76
- header: /* @__PURE__ */ o(j, { counter: R, actions: A, children: h }),
77
- i18nStrings: Z,
78
- settings: E && /* @__PURE__ */ o(M, { variant: "icon", iconName: "close", onClick: d }),
79
- children: u
80
- }
81
- );
82
- },
83
- onItemsChange: ({ detail: { items: s } }) => {
84
- r(s);
85
- },
86
- empty: i
2047
+ context: t,
2048
+ preferenceKey: n,
2049
+ defaultPreferenceValue: r,
2050
+ children: a
2051
+ } = e, [o, i] = ae(!1), [s, c] = ae(r), u = gr(), d = B(async () => {
2052
+ if (u) {
2053
+ i(!0);
2054
+ try {
2055
+ const w = await u.getPreference(n);
2056
+ if (!w)
2057
+ return;
2058
+ const N = JSON.parse(w);
2059
+ c(N);
2060
+ } catch (w) {
2061
+ console.error("Failed to load theme preference:", w);
2062
+ } finally {
2063
+ i(!1);
2064
+ }
87
2065
  }
88
- );
2066
+ }, [u, n]);
2067
+ Ee(() => {
2068
+ d();
2069
+ }, [d]);
2070
+ const f = B(async (w) => {
2071
+ if (u)
2072
+ try {
2073
+ await u.setPreference(n, JSON.stringify(w));
2074
+ } catch (N) {
2075
+ console.error("Failed to save theme preference:", N);
2076
+ }
2077
+ }, [u, n]), p = B((w) => {
2078
+ c(w), f(w);
2079
+ }, [f]), S = y(() => [s, p], [s, p]);
2080
+ return o ? /* @__PURE__ */ m(ft, { size: "large" }) : /* @__PURE__ */ m(t, { value: S, children: a });
89
2081
  }
90
- function w() {
91
- return H("shouldFilterErrors", !1);
2082
+ function _(e, t) {
2083
+ const n = et([t, () => {
2084
+ }]);
2085
+ return { useUserPreferences: () => Fe(n), Provider: ({ children: o }) => /* @__PURE__ */ m(
2086
+ pr,
2087
+ {
2088
+ context: n,
2089
+ preferenceKey: e,
2090
+ defaultPreferenceValue: t,
2091
+ children: o
2092
+ }
2093
+ ) };
92
2094
  }
93
- const ne = [];
94
- function b() {
95
- return H("contentTypeFilters", ne);
2095
+ const wr = {
2096
+ collectionPreferences: void 0,
2097
+ preferredColumnWidths: []
2098
+ }, H = "list-har-entries", {
2099
+ useUserPreferences: yr,
2100
+ Provider: br
2101
+ } = _(`${H}.harEntriesTablePreferences`, wr), {
2102
+ useUserPreferences: Re,
2103
+ Provider: Tr
2104
+ } = _(`${H}.isCompareMode`, !1), {
2105
+ useUserPreferences: ze,
2106
+ Provider: Dr
2107
+ } = _(`${H}.shouldFilterErrors`, !1), Pr = [], {
2108
+ useUserPreferences: Be,
2109
+ Provider: Mr
2110
+ } = _(`${H}.contentTypeFilters`, Pr);
2111
+ function Or() {
2112
+ const [e, t] = Re();
2113
+ return /* @__PURE__ */ m(mt, { onChange: ({ detail: n }) => {
2114
+ t(n.checked);
2115
+ }, checked: e, children: "Enable comparison mode?" });
96
2116
  }
97
- const S = K.map((e) => ({
2117
+ const Ne = ot.map((e) => ({
98
2118
  value: e,
99
2119
  label: e
100
2120
  }));
101
- function re({ contentTypeFilters: e, onChange: n }) {
102
- const t = S.filter(
103
- ({ value: i }) => e.includes(i)
104
- ), r = (i) => {
105
- const s = i.map(({ value: d }) => d);
106
- n(s);
2121
+ function xr() {
2122
+ const [e, t] = Be(), n = Ne.filter(
2123
+ ({ value: a }) => e.includes(a)
2124
+ ), r = (a) => {
2125
+ const o = a.map(({ value: i }) => i);
2126
+ t(o);
107
2127
  };
108
- return /* @__PURE__ */ o(
109
- J,
2128
+ return /* @__PURE__ */ m(
2129
+ ht,
110
2130
  {
111
2131
  placeholder: "Filter by content type",
112
- selectedOptions: t,
113
- onChange: ({ detail: i }) => {
114
- r(i.selectedOptions);
115
- },
116
- options: S
2132
+ options: Ne,
2133
+ selectedOptions: n,
2134
+ onChange: ({ detail: a }) => {
2135
+ r(a.selectedOptions);
2136
+ }
117
2137
  }
118
2138
  );
119
2139
  }
120
- const I = "ERRORS", oe = "ALL";
121
- function ie({ shouldFilterErrors: e, onChange: n }) {
122
- return /* @__PURE__ */ o(
123
- Q,
2140
+ const Ye = "ALL", V = "ERRORS";
2141
+ function Sr() {
2142
+ const [e, t] = ze();
2143
+ return /* @__PURE__ */ m(
2144
+ gt,
124
2145
  {
125
2146
  options: [
126
- { text: "All", id: "ALL" },
127
- { text: "Errors", id: I }
2147
+ { text: "All", id: Ye },
2148
+ { text: "Errors", id: V }
128
2149
  ],
129
- selectedId: e ? I : oe,
130
- onChange: ({ detail: t }) => {
131
- const r = t.selectedId === I;
132
- n(r);
2150
+ selectedId: e ? V : Ye,
2151
+ onChange: ({ detail: n }) => {
2152
+ const r = n.selectedId === V;
2153
+ t(r);
133
2154
  }
134
2155
  }
135
2156
  );
136
2157
  }
137
- function se() {
138
- const [e, n] = b(), [t, r] = w();
139
- return /* @__PURE__ */ x(X, { children: [
140
- /* @__PURE__ */ o(re, { contentTypeFilters: e, onChange: n }),
141
- /* @__PURE__ */ o(ie, { shouldFilterErrors: t, onChange: r })
142
- ] });
143
- }
144
- const $ = {
145
- rowSpan: 4,
146
- columnSpan: 12
147
- }, T = "har-entries-viewer", ce = [
148
- {
149
- ...$,
150
- id: T
151
- }
152
- ];
153
- function ve(e) {
154
- const { title: n = "HAR Entries", harEntries: t } = e, [r, i] = y(t), [s, d] = y([]), [h, u] = y(ce);
155
- if (t !== r) {
156
- i(t);
157
- const c = t.map(f), a = s.filter((m) => c.includes(f(m)));
158
- a.length !== s.length && d(a);
159
- }
160
- const A = (c) => {
161
- u(c);
162
- }, R = (c) => {
163
- d(c);
164
- const a = c.map(f);
165
- u((m) => {
166
- const g = m.filter(({ id: l }) => a.includes(l) || l === T), z = g.map(({ id: l }) => l), O = a.filter((l) => !z.includes(l)), { rowSpan: B, columnSpan: N } = g.at(1) ?? $, P = O.map((l) => ({
167
- rowSpan: B,
168
- columnSpan: N,
169
- id: l
170
- }));
171
- return [...g, ...P];
172
- });
173
- }, E = F(() => V(r), [r]), [v] = b(), [D] = w(), C = F(() => W(D ? E : r, v), [D, E, r, v]), L = s.reduce((c, a) => {
174
- const m = f(a);
2158
+ const Nr = {
2159
+ shortUrl: {
2160
+ header: "Short URL",
2161
+ cell: (e) => {
2162
+ const { url: t } = e.request;
2163
+ return { value: t.split("/").at(-1) || t };
2164
+ }
2165
+ },
2166
+ url: {
2167
+ header: "URL",
2168
+ isVisibleByDefault: !1,
2169
+ cell: (e) => ({ value: e.request.url })
2170
+ },
2171
+ method: {
2172
+ header: "Method",
2173
+ width: 140,
2174
+ cell: (e) => ({ value: e.request.method })
2175
+ },
2176
+ status: {
2177
+ header: "Status",
2178
+ type: "number",
2179
+ width: 120,
2180
+ cell: (e) => {
2181
+ const t = e.response.status, n = e.response._error, r = /* @__PURE__ */ ve(z, { type: "error", children: [
2182
+ t,
2183
+ " ",
2184
+ n && `(${n})`
2185
+ ] });
2186
+ return lt(e) ? {
2187
+ value: t,
2188
+ content: r
2189
+ } : t >= 300 ? {
2190
+ value: t,
2191
+ content: /* @__PURE__ */ m(z, { type: "warning", children: t })
2192
+ } : t >= 200 ? {
2193
+ value: t,
2194
+ content: /* @__PURE__ */ m(z, { type: "success", children: t })
2195
+ } : { value: t, content: r };
2196
+ }
2197
+ },
2198
+ mimeType: {
2199
+ header: "Mime type",
2200
+ width: 240,
2201
+ cell: (e) => ({ value: e.response.content.mimeType })
2202
+ },
2203
+ timeTaken: {
2204
+ header: "Time taken",
2205
+ type: "number",
2206
+ width: 160,
2207
+ cell: (e) => {
2208
+ const t = e.time, n = `${Math.ceil(t)} ms`;
2209
+ return { value: t, content: n };
2210
+ }
2211
+ },
2212
+ size: {
2213
+ header: "Size",
2214
+ type: "number",
2215
+ width: 120,
2216
+ cell: (e) => {
2217
+ const t = e.response.content.size, n = Pt(t);
2218
+ return { value: t, content: n };
2219
+ }
2220
+ },
2221
+ localStartTime: {
2222
+ header: `Started on (${hr()})`,
2223
+ type: "date",
2224
+ width: 280,
2225
+ cell: ({ startedDateTime: e }) => {
2226
+ const t = new Date(e), n = Se(e);
2227
+ return { value: t, content: n };
2228
+ }
2229
+ },
2230
+ UTCstartTime: {
2231
+ header: "Started on (UTC)",
2232
+ type: "date",
2233
+ width: 280,
2234
+ isVisibleByDefault: !1,
2235
+ cell: ({ startedDateTime: e }) => {
2236
+ const t = new Date(e), n = Se(e, "UTC");
2237
+ return { value: t, content: n };
2238
+ }
2239
+ }
2240
+ };
2241
+ function Ce(e, t) {
2242
+ return e.reduce((n, r) => (n[`${t}_${r}`] = {
2243
+ header: `${t}.${r}`,
2244
+ width: 200,
2245
+ isVisibleByDefault: !1,
2246
+ type: "list",
2247
+ cell: (a) => ({ value: a[t].headers.filter(({ name: i }) => i === r).map(({ value: i }) => i) })
2248
+ }, n), {});
2249
+ }
2250
+ function Yr({
2251
+ title: e = "HAR Entries",
2252
+ harEntries: t,
2253
+ selectedHAREntries: n,
2254
+ onSelectionChange: r
2255
+ }) {
2256
+ const a = y(() => {
2257
+ const d = oe(t, "request"), f = oe(t, "response"), p = Ce(d, "request"), S = Ce(f, "response");
175
2258
  return {
176
- ...c,
177
- [m]: {
178
- title: "Details",
179
- content: /* @__PURE__ */ o(G, { harEntry: a })
180
- }
2259
+ ...Nr,
2260
+ ...p,
2261
+ ...S
181
2262
  };
182
- }, {}), _ = {
183
- [T]: {
184
- title: n,
185
- counter: `(${C.length}/${r.length})`,
186
- actions: /* @__PURE__ */ o(se, {}),
187
- content: /* @__PURE__ */ o(
188
- Y,
2263
+ }, [t]), o = y(() => st(t), [t]), [i] = Be(), [s] = ze(), c = y(() => ct(s ? o : t, i), [s, o, t, i]), [u] = Re();
2264
+ return Ee(() => {
2265
+ !u && n.length > 1 && r([]);
2266
+ }, [u, n.length, r]), /* @__PURE__ */ m(br, { children: /* @__PURE__ */ m(
2267
+ Ct,
2268
+ {
2269
+ useTablePreferences: yr,
2270
+ contentDensity: "compact",
2271
+ columnsDefinition: a,
2272
+ items: c,
2273
+ getRowId: ut,
2274
+ empty: "No HAR entries found",
2275
+ selectionType: u ? "multi" : "single",
2276
+ isEntireRowSelectable: !0,
2277
+ selectedItems: n,
2278
+ onSelectionChange: r,
2279
+ header: /* @__PURE__ */ m(
2280
+ Ke,
189
2281
  {
190
- harEntries: C,
191
- onChange: R
2282
+ description: /* @__PURE__ */ m(Or, {}),
2283
+ counter: `(${c.length}/${t.length})`,
2284
+ actions: /* @__PURE__ */ ve(vt, { children: [
2285
+ /* @__PURE__ */ m(xr, {}),
2286
+ /* @__PURE__ */ m(Sr, {})
2287
+ ] }),
2288
+ children: e
192
2289
  }
193
2290
  )
194
- },
195
- ...L
196
- };
197
- return /* @__PURE__ */ o(
198
- te,
199
- {
200
- components: _,
201
- definitions: h,
202
- onDefinitionsChange: A
203
2291
  }
204
- );
2292
+ ) });
2293
+ }
2294
+ function qr(e) {
2295
+ return /* @__PURE__ */ m(Tr, { children: /* @__PURE__ */ m(Mr, { children: /* @__PURE__ */ m(Dr, { children: /* @__PURE__ */ m(Yr, { ...e }) }) }) });
205
2296
  }
206
2297
  export {
207
- ve as H,
208
- se as a,
209
- X as b
2298
+ vt as H,
2299
+ qr as L,
2300
+ _ as c
210
2301
  };