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