@har-analyzer/components 0.0.5 → 0.0.9
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 +68 -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/vertical-gap.js +5 -32
- package/dist/har-analyzer-preferences.d.ts +18 -0
- package/dist/har-analyzer-preferences.js +97 -0
- package/dist/har-analyzer.d.ts +4 -4
- package/dist/har-analyzer.js +94 -5980
- package/dist/har-content-viewer.d.ts +14 -0
- package/dist/har-content-viewer.js +150 -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 +2117 -5
- 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 +49 -17
- package/dist/index.js +19 -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/index2.js +0 -2059
- 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
DELETED
|
@@ -1,2059 +0,0 @@
|
|
|
1
|
-
import { i as Te, w as me, b as Mt, au as Ot, d as Dt, av as wt, P as ye, aw as Ht, ax as Wt, ay as _t, x as Vt, K as zt, y as Kt, o as yt, c as S, H as Gt, v as De, az as Jt, t as be, W as le, aA as Xt, aB as Yt, s as Qt, aC as Zt, aD as en, aE as tn, _ as ge, aF as nn, u as He, p as xt, l as tt, n as Et, a as We, aG as rn, aH as an, z as on, R as sn, j as I, g as cn, aI as ln, aJ as vt, a0 as un, B as dn } from "./content-type.js";
|
|
2
|
-
import * as xe from "react";
|
|
3
|
-
import y, { useRef as oe, useState as he, useEffect as Ee, forwardRef as pn, createElement as fn, Fragment as hn, Children as ct, useCallback as $e } from "react";
|
|
4
|
-
import { u as mn, h as bn, I as gn, a as wn, S as _n, g as Bt, C as yn, A as xn, b as En, c as vn, D as Bn } from "./internal.js";
|
|
5
|
-
import { _ as Ct, B as Re, V as It } from "./vertical-gap.js";
|
|
6
|
-
import '../assets/index3.css';function At(i, s, d, { componentName: c, changeHandler: p, controlledProp: m }) {
|
|
7
|
-
const f = xe.useState(i !== void 0)[0];
|
|
8
|
-
Te && (xe.useEffect(() => {
|
|
9
|
-
f && s === void 0 && me(c, `You provided a \`${m}\` prop without an \`${p}\` handler. This will render a non-interactive component.`);
|
|
10
|
-
}, [s, f, c, p, m]), xe.useEffect(() => {
|
|
11
|
-
const b = i !== void 0;
|
|
12
|
-
if (f !== b) {
|
|
13
|
-
const x = f ? "controlled" : "uncontrolled", v = b ? "controlled" : "uncontrolled";
|
|
14
|
-
me(c, `A component tried to change ${x} '${m}' property to be ${v}. This is not supported. Properties should not switch from ${x} to ${v} (or vice versa). Decide between using a controlled or uncontrolled mode for the lifetime of the component. More info: https://fb.me/react-controlled-components`);
|
|
15
|
-
}
|
|
16
|
-
}, [f, m, c, i]));
|
|
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];
|
|
21
|
-
}
|
|
22
|
-
function Cn() {
|
|
23
|
-
}
|
|
24
|
-
function In(i, s) {
|
|
25
|
-
return i.classList ? !!s && i.classList.contains(s) : (" " + (i.className.baseVal || i.className) + " ").indexOf(" " + s + " ") !== -1;
|
|
26
|
-
}
|
|
27
|
-
function An(i, s) {
|
|
28
|
-
i.classList ? i.classList.add(s) : In(i, s) || (typeof i.className == "string" ? i.className = i.className + " " + s : i.setAttribute("class", (i.className && i.className.baseVal || "") + " " + s));
|
|
29
|
-
}
|
|
30
|
-
function lt(i, s) {
|
|
31
|
-
return i.replace(new RegExp("(^|\\s)" + s + "(?:\\s|$)", "g"), "$1").replace(/\s+/g, " ").replace(/^\s*|\s*$/g, "");
|
|
32
|
-
}
|
|
33
|
-
function Tn(i, s) {
|
|
34
|
-
i.classList ? i.classList.remove(s) : typeof i.className == "string" ? i.className = lt(i.className, s) : i.setAttribute("class", lt(i.className && i.className.baseVal || "", s));
|
|
35
|
-
}
|
|
36
|
-
var Fn = function(s, d) {
|
|
37
|
-
return s && d && d.split(" ").forEach(function(c) {
|
|
38
|
-
return An(s, c);
|
|
39
|
-
});
|
|
40
|
-
}, Ye = function(s, d) {
|
|
41
|
-
return s && d && d.split(" ").forEach(function(c) {
|
|
42
|
-
return Tn(s, c);
|
|
43
|
-
});
|
|
44
|
-
}, nt = /* @__PURE__ */ function(i) {
|
|
45
|
-
Mt(s, i);
|
|
46
|
-
function s() {
|
|
47
|
-
for (var c, p = arguments.length, m = new Array(p), f = 0; f < p; f++)
|
|
48
|
-
m[f] = arguments[f];
|
|
49
|
-
return c = i.call.apply(i, [this].concat(m)) || this, c.appliedClasses = {
|
|
50
|
-
appear: {},
|
|
51
|
-
enter: {},
|
|
52
|
-
exit: {}
|
|
53
|
-
}, c.onEnter = function(a, w) {
|
|
54
|
-
var g = c.resolveArguments(a, w), _ = g[0], E = g[1];
|
|
55
|
-
c.removeClasses(_, "exit"), c.addClass(_, E ? "appear" : "enter", "base"), c.props.onEnter && c.props.onEnter(a, w);
|
|
56
|
-
}, c.onEntering = function(a, w) {
|
|
57
|
-
var g = c.resolveArguments(a, w), _ = g[0], E = g[1], T = E ? "appear" : "enter";
|
|
58
|
-
c.addClass(_, T, "active"), c.props.onEntering && c.props.onEntering(a, w);
|
|
59
|
-
}, c.onEntered = function(a, w) {
|
|
60
|
-
var g = c.resolveArguments(a, w), _ = g[0], E = g[1], T = E ? "appear" : "enter";
|
|
61
|
-
c.removeClasses(_, T), c.addClass(_, T, "done"), c.props.onEntered && c.props.onEntered(a, w);
|
|
62
|
-
}, c.onExit = function(a) {
|
|
63
|
-
var w = c.resolveArguments(a), g = w[0];
|
|
64
|
-
c.removeClasses(g, "appear"), c.removeClasses(g, "enter"), c.addClass(g, "exit", "base"), c.props.onExit && c.props.onExit(a);
|
|
65
|
-
}, c.onExiting = function(a) {
|
|
66
|
-
var w = c.resolveArguments(a), g = w[0];
|
|
67
|
-
c.addClass(g, "exit", "active"), c.props.onExiting && c.props.onExiting(a);
|
|
68
|
-
}, c.onExited = function(a) {
|
|
69
|
-
var w = c.resolveArguments(a), g = w[0];
|
|
70
|
-
c.removeClasses(g, "exit"), c.addClass(g, "exit", "done"), c.props.onExited && c.props.onExited(a);
|
|
71
|
-
}, c.resolveArguments = function(a, w) {
|
|
72
|
-
return c.props.nodeRef ? [c.props.nodeRef.current, a] : [a, w];
|
|
73
|
-
}, c.getClassNames = function(a) {
|
|
74
|
-
var w = c.props.classNames, g = typeof w == "string", _ = g && w ? w + "-" : "", E = g ? "" + _ + a : w[a], T = g ? E + "-active" : w[a + "Active"], b = g ? E + "-done" : w[a + "Done"];
|
|
75
|
-
return {
|
|
76
|
-
baseClassName: E,
|
|
77
|
-
activeClassName: T,
|
|
78
|
-
doneClassName: b
|
|
79
|
-
};
|
|
80
|
-
}, c;
|
|
81
|
-
}
|
|
82
|
-
var d = s.prototype;
|
|
83
|
-
return d.addClass = function(p, m, f) {
|
|
84
|
-
var a = this.getClassNames(m)[f + "ClassName"], w = this.getClassNames("enter"), g = w.doneClassName;
|
|
85
|
-
m === "appear" && f === "done" && g && (a += " " + g), f === "active" && p && Ot(p), a && (this.appliedClasses[m][f] = a, Fn(p, a));
|
|
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: ""
|
|
105
|
-
};
|
|
106
|
-
nt.propTypes = process.env.NODE_ENV !== "production" ? Ct({}, wt.propTypes, {
|
|
107
|
-
/**
|
|
108
|
-
* The animation classNames applied to the component as it appears, enters,
|
|
109
|
-
* exits or has finished the transition. A single name can be provided, which
|
|
110
|
-
* will be suffixed for each stage, e.g. `classNames="fade"` applies:
|
|
111
|
-
*
|
|
112
|
-
* - `fade-appear`, `fade-appear-active`, `fade-appear-done`
|
|
113
|
-
* - `fade-enter`, `fade-enter-active`, `fade-enter-done`
|
|
114
|
-
* - `fade-exit`, `fade-exit-active`, `fade-exit-done`
|
|
115
|
-
*
|
|
116
|
-
* A few details to note about how these classes are applied:
|
|
117
|
-
*
|
|
118
|
-
* 1. They are _joined_ with the ones that are already defined on the child
|
|
119
|
-
* component, so if you want to add some base styles, you can use
|
|
120
|
-
* `className` without worrying that it will be overridden.
|
|
121
|
-
*
|
|
122
|
-
* 2. If the transition component mounts with `in={false}`, no classes are
|
|
123
|
-
* applied yet. You might be expecting `*-exit-done`, but if you think
|
|
124
|
-
* about it, a component cannot finish exiting if it hasn't entered yet.
|
|
125
|
-
*
|
|
126
|
-
* 2. `fade-appear-done` and `fade-enter-done` will _both_ be applied. This
|
|
127
|
-
* allows you to define different behavior for when appearing is done and
|
|
128
|
-
* when regular entering is done, using selectors like
|
|
129
|
-
* `.fade-enter-done:not(.fade-appear-done)`. For example, you could apply
|
|
130
|
-
* an epic entrance animation when element first appears in the DOM using
|
|
131
|
-
* [Animate.css](https://daneden.github.io/animate.css/). Otherwise you can
|
|
132
|
-
* simply use `fade-enter-done` for defining both cases.
|
|
133
|
-
*
|
|
134
|
-
* Each individual classNames can also be specified independently like:
|
|
135
|
-
*
|
|
136
|
-
* ```js
|
|
137
|
-
* classNames={{
|
|
138
|
-
* appear: 'my-appear',
|
|
139
|
-
* appearActive: 'my-active-appear',
|
|
140
|
-
* appearDone: 'my-done-appear',
|
|
141
|
-
* enter: 'my-enter',
|
|
142
|
-
* enterActive: 'my-active-enter',
|
|
143
|
-
* enterDone: 'my-done-enter',
|
|
144
|
-
* exit: 'my-exit',
|
|
145
|
-
* exitActive: 'my-active-exit',
|
|
146
|
-
* exitDone: 'my-done-exit',
|
|
147
|
-
* }}
|
|
148
|
-
* ```
|
|
149
|
-
*
|
|
150
|
-
* If you want to set these classes using CSS Modules:
|
|
151
|
-
*
|
|
152
|
-
* ```js
|
|
153
|
-
* import styles from './styles.css';
|
|
154
|
-
* ```
|
|
155
|
-
*
|
|
156
|
-
* you might want to use camelCase in your CSS file, that way could simply
|
|
157
|
-
* spread them instead of listing them one by one:
|
|
158
|
-
*
|
|
159
|
-
* ```js
|
|
160
|
-
* classNames={{ ...styles }}
|
|
161
|
-
* ```
|
|
162
|
-
*
|
|
163
|
-
* @type {string | {
|
|
164
|
-
* appear?: string,
|
|
165
|
-
* appearActive?: string,
|
|
166
|
-
* appearDone?: string,
|
|
167
|
-
* enter?: string,
|
|
168
|
-
* enterActive?: string,
|
|
169
|
-
* enterDone?: string,
|
|
170
|
-
* exit?: string,
|
|
171
|
-
* exitActive?: string,
|
|
172
|
-
* exitDone?: string,
|
|
173
|
-
* }}
|
|
174
|
-
*/
|
|
175
|
-
classNames: Ht,
|
|
176
|
-
/**
|
|
177
|
-
* A `<Transition>` callback fired immediately after the 'enter' or 'appear' class is
|
|
178
|
-
* applied.
|
|
179
|
-
*
|
|
180
|
-
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
181
|
-
*
|
|
182
|
-
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
183
|
-
*/
|
|
184
|
-
onEnter: ye.func,
|
|
185
|
-
/**
|
|
186
|
-
* A `<Transition>` callback fired immediately after the 'enter-active' or
|
|
187
|
-
* 'appear-active' class is applied.
|
|
188
|
-
*
|
|
189
|
-
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
190
|
-
*
|
|
191
|
-
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
192
|
-
*/
|
|
193
|
-
onEntering: ye.func,
|
|
194
|
-
/**
|
|
195
|
-
* A `<Transition>` callback fired immediately after the 'enter' or
|
|
196
|
-
* 'appear' classes are **removed** and the `done` class is added to the DOM node.
|
|
197
|
-
*
|
|
198
|
-
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
199
|
-
*
|
|
200
|
-
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
201
|
-
*/
|
|
202
|
-
onEntered: ye.func,
|
|
203
|
-
/**
|
|
204
|
-
* A `<Transition>` callback fired immediately after the 'exit' class is
|
|
205
|
-
* applied.
|
|
206
|
-
*
|
|
207
|
-
* **Note**: when `nodeRef` prop is passed, `node` is not passed
|
|
208
|
-
*
|
|
209
|
-
* @type Function(node: HtmlElement)
|
|
210
|
-
*/
|
|
211
|
-
onExit: ye.func,
|
|
212
|
-
/**
|
|
213
|
-
* A `<Transition>` callback fired immediately after the 'exit-active' is applied.
|
|
214
|
-
*
|
|
215
|
-
* **Note**: when `nodeRef` prop is passed, `node` is not passed
|
|
216
|
-
*
|
|
217
|
-
* @type Function(node: HtmlElement)
|
|
218
|
-
*/
|
|
219
|
-
onExiting: ye.func,
|
|
220
|
-
/**
|
|
221
|
-
* A `<Transition>` callback fired immediately after the 'exit' classes
|
|
222
|
-
* are **removed** and the `exit-done` class is added to the DOM node.
|
|
223
|
-
*
|
|
224
|
-
* **Note**: when `nodeRef` prop is passed, `node` is not passed
|
|
225
|
-
*
|
|
226
|
-
* @type Function(node: HtmlElement)
|
|
227
|
-
*/
|
|
228
|
-
onExited: ye.func
|
|
229
|
-
}) : {};
|
|
230
|
-
function ut(i, [s, d]) {
|
|
231
|
-
return i < s ? d : i > d ? s : i;
|
|
232
|
-
}
|
|
233
|
-
function Rn() {
|
|
234
|
-
return "scrollBehavior" in document.documentElement.style;
|
|
235
|
-
}
|
|
236
|
-
const Nn = (i) => 15e-4 * Math.abs(i) + 0.558, Sn = (i) => Math.round(Math.abs(i) / Nn(i)), Tt = () => window.performance ? window.performance.now() : Date.now(), Un = (i) => 0.5 * (1 - Math.cos(Math.PI * i)), Ft = (i) => {
|
|
237
|
-
const s = Tt(), d = Math.min((s - i.startTime) / i.scrollTime, 1), c = Un(d), p = i.startX + (i.endX - i.startX) * c;
|
|
238
|
-
i.scrollable.scrollLeft = p, p !== i.endX && requestAnimationFrame(() => Ft(i));
|
|
239
|
-
}, Ln = (i, s) => {
|
|
240
|
-
const d = i.scrollLeft;
|
|
241
|
-
Ft({
|
|
242
|
-
scrollable: i,
|
|
243
|
-
startX: d,
|
|
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;
|
|
252
|
-
}
|
|
253
|
-
if (Rn() && i.scrollTo) {
|
|
254
|
-
i.scrollTo({
|
|
255
|
-
left: s,
|
|
256
|
-
behavior: "smooth"
|
|
257
|
-
});
|
|
258
|
-
return;
|
|
259
|
-
}
|
|
260
|
-
Ln(i, s);
|
|
261
|
-
}, Pe = (i, s) => {
|
|
262
|
-
if (!i?.current)
|
|
263
|
-
return;
|
|
264
|
-
const d = i.current, { scrollLeft: c, scrollWidth: p, offsetWidth: m } = d, f = Math.ceil(d.clientWidth * 0.75), a = s === "forward" ? Math.min(Math.abs(c) + f, p - m) : Math.max(Math.abs(c) - f, 0), w = Vt(d) ? a * -1 : a;
|
|
265
|
-
Rt(d, w);
|
|
266
|
-
}, jn = (i, s) => {
|
|
267
|
-
const { offsetWidth: d, scrollWidth: c } = i, p = s.current && 2 * s.current.offsetWidth;
|
|
268
|
-
return p ? c > d + p : c > d;
|
|
269
|
-
}, dt = (i) => _t(i) > 0, pt = (i) => Math.ceil(_t(i)) < i.scrollWidth - i.offsetWidth, kn = (i, s, d = !0) => {
|
|
270
|
-
if (!i || !s)
|
|
271
|
-
return;
|
|
272
|
-
const c = 2;
|
|
273
|
-
let p = s.scrollLeft;
|
|
274
|
-
p = Math.min(p, i.offsetLeft - c), p = Math.max(p, i.offsetLeft + i.offsetWidth / 2 - s.offsetWidth / 2 + c), d ? Rt(s, p) : s.scrollLeft = p;
|
|
275
|
-
}, ue = {
|
|
276
|
-
"tabs-header-list": "awsui_tabs-header-list_1acwa_dp0cl_5",
|
|
277
|
-
"active-tab-header": "awsui_active-tab-header_1acwa_dp0cl_6",
|
|
278
|
-
"tab-label": "awsui_tab-label_1acwa_dp0cl_7",
|
|
279
|
-
"tab-dismiss-button": "awsui_tab-dismiss-button_1acwa_dp0cl_8"
|
|
280
|
-
}, B = {
|
|
281
|
-
"tabs-header": "awsui_tabs-header_14rmt_7y4gf_154",
|
|
282
|
-
"tab-header-scroll-container": "awsui_tab-header-scroll-container_14rmt_7y4gf_163",
|
|
283
|
-
"tabs-header-list": "awsui_tabs-header-list_14rmt_7y4gf_169",
|
|
284
|
-
"pagination-button": "awsui_pagination-button_14rmt_7y4gf_187",
|
|
285
|
-
"pagination-button-left": "awsui_pagination-button-left_14rmt_7y4gf_194",
|
|
286
|
-
"pagination-button-left-scrollable": "awsui_pagination-button-left-scrollable_14rmt_7y4gf_197",
|
|
287
|
-
"pagination-button-right": "awsui_pagination-button-right_14rmt_7y4gf_201",
|
|
288
|
-
"pagination-button-right-scrollable": "awsui_pagination-button-right-scrollable_14rmt_7y4gf_204",
|
|
289
|
-
"actions-container": "awsui_actions-container_14rmt_7y4gf_209",
|
|
290
|
-
"tabs-tab": "awsui_tabs-tab_14rmt_7y4gf_217",
|
|
291
|
-
"tabs-tab-label": "awsui_tabs-tab-label_14rmt_7y4gf_227",
|
|
292
|
-
"tabs-tab-header-container": "awsui_tabs-tab-header-container_14rmt_7y4gf_238",
|
|
293
|
-
"tabs-tab-dismiss": "awsui_tabs-tab-dismiss_14rmt_7y4gf_249",
|
|
294
|
-
"tabs-tab-action": "awsui_tabs-tab-action_14rmt_7y4gf_249",
|
|
295
|
-
refresh: "awsui_refresh_14rmt_7y4gf_254",
|
|
296
|
-
"tabs-tab-disabled": "awsui_tabs-tab-disabled_14rmt_7y4gf_258",
|
|
297
|
-
"tabs-tab-link": "awsui_tabs-tab-link_14rmt_7y4gf_300",
|
|
298
|
-
"tabs-tab-active": "awsui_tabs-tab-active_14rmt_7y4gf_378",
|
|
299
|
-
"tabs-header-with-divider": "awsui_tabs-header-with-divider_14rmt_7y4gf_385",
|
|
300
|
-
"tabs-tab-focusable": "awsui_tabs-tab-focusable_14rmt_7y4gf_389",
|
|
301
|
-
root: "awsui_root_14rmt_7y4gf_393",
|
|
302
|
-
tabs: "awsui_tabs_14rmt_7y4gf_154",
|
|
303
|
-
"tabs-content": "awsui_tabs-content_14rmt_7y4gf_431",
|
|
304
|
-
"fit-height": "awsui_fit-height_14rmt_7y4gf_435",
|
|
305
|
-
"tabs-content-active": "awsui_tabs-content-active_14rmt_7y4gf_441",
|
|
306
|
-
"tabs-content-wrapper": "awsui_tabs-content-wrapper_14rmt_7y4gf_455",
|
|
307
|
-
"with-paddings": "awsui_with-paddings_14rmt_7y4gf_455",
|
|
308
|
-
"tabs-container-content-wrapper": "awsui_tabs-container-content-wrapper_14rmt_7y4gf_466",
|
|
309
|
-
"disabled-reason-tooltip": "awsui_disabled-reason-tooltip_14rmt_7y4gf_477",
|
|
310
|
-
"tabs-tab-focused": "awsui_tabs-tab-focused_14rmt_7y4gf_481"
|
|
311
|
-
}, qn = {
|
|
312
|
-
"tab-dismiss-button": "awsui_tab-dismiss-button_1nq1i_1nd7r_5"
|
|
313
|
-
}, $n = `.${B["tabs-tab-link"]}`, Pn = `.${B["tabs-tab-focused"]}`, ft = `.${B["tabs-tab-focusable"]}`;
|
|
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"
|
|
323
|
-
};
|
|
324
|
-
Ee(() => {
|
|
325
|
-
var h;
|
|
326
|
-
Z && !Y && ((h = Be()) === null || h === void 0 || h.focus());
|
|
327
|
-
}, [Y, Z]), Ee(() => {
|
|
328
|
-
_.current && (R(jn(_.current, T)), K(dt(_.current)), Q(pt(_.current)));
|
|
329
|
-
}, [F, d]);
|
|
330
|
-
const Se = (h) => {
|
|
331
|
-
if (!s)
|
|
332
|
-
return;
|
|
333
|
-
const U = N.current.get(s);
|
|
334
|
-
U && _.current && kn(U, _.current, h);
|
|
335
|
-
};
|
|
336
|
-
Ee(() => {
|
|
337
|
-
requestAnimationFrame(() => {
|
|
338
|
-
Se(!1);
|
|
339
|
-
});
|
|
340
|
-
}, [q, F, d.length]), Ee(() => {
|
|
341
|
-
Se(!0);
|
|
342
|
-
}, [s]), Ee(() => {
|
|
343
|
-
var h, U;
|
|
344
|
-
!((h = _.current) === null || h === void 0) && h.contains(document.activeElement) && document.activeElement !== E.current && ((U = E.current) === null || U === void 0 || U.focus({ preventScroll: !0 }));
|
|
345
|
-
}, [s]);
|
|
346
|
-
const ze = () => {
|
|
347
|
-
_.current && (K(dt(_.current)), Q(pt(_.current)));
|
|
348
|
-
}, Ke = S({
|
|
349
|
-
[B["tabs-header"]]: !0,
|
|
350
|
-
[B["tabs-header-with-divider"]]: c === "default" || x
|
|
351
|
-
}), Ge = S({
|
|
352
|
-
[B["pagination-button"]]: !0,
|
|
353
|
-
[B["pagination-button-left"]]: !0,
|
|
354
|
-
[B["pagination-button-left-scrollable"]]: z
|
|
355
|
-
}), J = S({
|
|
356
|
-
[B["pagination-button"]]: !0,
|
|
357
|
-
[B["pagination-button-right"]]: !0,
|
|
358
|
-
[B["pagination-button-right-scrollable"]]: k
|
|
359
|
-
}), G = oe(null);
|
|
360
|
-
function Be() {
|
|
361
|
-
var h, U;
|
|
362
|
-
if (!v.current)
|
|
363
|
-
return null;
|
|
364
|
-
const X = Array.from(v.current.querySelectorAll($n));
|
|
365
|
-
return (U = (h = X.find((M) => M.matches(Pn))) !== null && h !== void 0 ? h : X.find((M) => !M.disabled)) !== null && U !== void 0 ? U : null;
|
|
366
|
-
}
|
|
367
|
-
function Ue(h) {
|
|
368
|
-
var U;
|
|
369
|
-
if (!!h.classList.contains(B["tabs-tab-link"])) {
|
|
370
|
-
const M = (U = G.current) === null || U === void 0 ? void 0 : U.getFocusTarget(), W = M?.querySelector(`.${B["tabs-tab-link"]}`);
|
|
371
|
-
W?.focus();
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
Ee(() => {
|
|
375
|
-
var h;
|
|
376
|
-
(h = G.current) === null || h === void 0 || h.updateFocusTarget();
|
|
377
|
-
});
|
|
378
|
-
function Le() {
|
|
379
|
-
var h;
|
|
380
|
-
(h = G.current) === null || h === void 0 || h.updateFocusTarget();
|
|
381
|
-
}
|
|
382
|
-
function je() {
|
|
383
|
-
var h;
|
|
384
|
-
(h = G.current) === null || h === void 0 || h.updateFocusTarget();
|
|
385
|
-
}
|
|
386
|
-
function ke(h) {
|
|
387
|
-
const U = document.activeElement, X = [
|
|
388
|
-
le.right,
|
|
389
|
-
le.left,
|
|
390
|
-
le.end,
|
|
391
|
-
le.home,
|
|
392
|
-
le.pageUp,
|
|
393
|
-
le.pageDown,
|
|
394
|
-
le.space
|
|
395
|
-
], M = document.querySelector(`.${B["tabs-tab-action"]} [aria-expanded="true"]`), W = !U?.classList.contains(B["tabs-tab-link"]);
|
|
396
|
-
if (M)
|
|
397
|
-
return;
|
|
398
|
-
if (h.key === "Tab" && !h.shiftKey && W) {
|
|
399
|
-
h.preventDefault();
|
|
400
|
-
const te = `${p}-${s}-panel`, se = document.getElementById(te);
|
|
401
|
-
se?.focus();
|
|
402
|
-
}
|
|
403
|
-
if (Xt(h) || X.indexOf(h.keyCode) === -1 || !v.current || !U)
|
|
404
|
-
return;
|
|
405
|
-
h.preventDefault();
|
|
406
|
-
const O = we(v.current), de = document.activeElement instanceof HTMLElement ? O.indexOf(document.activeElement) : -1;
|
|
407
|
-
bn(h, {
|
|
408
|
-
onHome: () => ae(O[0]),
|
|
409
|
-
onEnd: () => ae(O[O.length - 1]),
|
|
410
|
-
onInlineStart: () => ae(O[ut(de - 1, [0, O.length - 1])]),
|
|
411
|
-
onInlineEnd: () => ae(O[ut(de + 1, [0, O.length - 1])]),
|
|
412
|
-
onPageDown: () => k && Pe(_, "forward"),
|
|
413
|
-
onPageUp: () => z && Pe(_, "backward"),
|
|
414
|
-
onActivate: () => {
|
|
415
|
-
var te;
|
|
416
|
-
return H && H !== s && i({ activeTabId: H, activeTabHref: (te = d.find((se) => se.id === H)) === null || te === void 0 ? void 0 : te.href });
|
|
417
|
-
}
|
|
418
|
-
});
|
|
419
|
-
}
|
|
420
|
-
function ae(h) {
|
|
421
|
-
var U, X;
|
|
422
|
-
h.focus();
|
|
423
|
-
const M = d.reduce((W, O) => W.set(O.id, O), /* @__PURE__ */ new Map());
|
|
424
|
-
for (const [W, O] of N.current.entries()) {
|
|
425
|
-
const de = O?.querySelector(`.${B["tabs-tab-link"]}`);
|
|
426
|
-
if (W !== s && de === h) {
|
|
427
|
-
ie(W), ee(W), !(!((U = M.get(W)) === null || U === void 0) && U.disabled) && w === "automatic" && i({ activeTabId: W, activeTabHref: (X = M.get(W)) === null || X === void 0 ? void 0 : X.href });
|
|
428
|
-
break;
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
function we(h) {
|
|
433
|
-
function U(M) {
|
|
434
|
-
var W, O;
|
|
435
|
-
return (O = (W = G.current) === null || W === void 0 ? void 0 : W.isRegistered(M)) !== null && O !== void 0 ? O : !1;
|
|
436
|
-
}
|
|
437
|
-
function X(M) {
|
|
438
|
-
return M instanceof HTMLButtonElement ? !M.disabled || M.closest(ft) : M.matches(ft);
|
|
439
|
-
}
|
|
440
|
-
return tn(h).filter((M) => U(M) && X(M));
|
|
441
|
-
}
|
|
442
|
-
const qe = Y ? "div" : "ul";
|
|
443
|
-
return y.createElement(
|
|
444
|
-
"div",
|
|
445
|
-
{ className: Ke },
|
|
446
|
-
y.createElement(
|
|
447
|
-
"div",
|
|
448
|
-
{ className: B["tab-header-scroll-container"], ref: j },
|
|
449
|
-
q && y.createElement(
|
|
450
|
-
"span",
|
|
451
|
-
{ ref: T, className: Ge },
|
|
452
|
-
y.createElement(De, { formAction: "none", variant: "icon", iconName: "angle-left", disabled: !z, __focusable: !0, onClick: () => Pe(_, "backward"), ariaLabel: b("i18nStrings.scrollLeftAriaLabel", a?.scrollLeftAriaLabel) })
|
|
453
|
-
),
|
|
454
|
-
y.createElement(
|
|
455
|
-
Jt,
|
|
456
|
-
{ ref: G, navigationActive: !0, getNextFocusTarget: Be, onUnregisterActive: Ue },
|
|
457
|
-
y.createElement(qe, Object.assign({}, Ne, { className: S(B["tabs-header-list"], ue["tabs-header-list"]), "aria-label": m, "aria-labelledby": f, ref: _, onScroll: ze, onKeyDown: ke, onFocus: Le, onBlur: je }), d.map(Je))
|
|
458
|
-
),
|
|
459
|
-
q && y.createElement(
|
|
460
|
-
"span",
|
|
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
|
-
);
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
const Dn = pn(({ tab: i, elementProps: s, activeTabId: d, index: c }, p) => {
|
|
546
|
-
const m = oe(null), f = oe(null), a = yt(m, p), { tabIndex: w } = Qt(m), g = i.disabled && !!i.disabledReason, [_, E] = he(!1), { targetProps: T, descriptionEl: b } = Zt(i.disabledReason), x = y.createElement(
|
|
547
|
-
y.Fragment,
|
|
548
|
-
null,
|
|
549
|
-
y.createElement(
|
|
550
|
-
"span",
|
|
551
|
-
{ className: S(B["tabs-tab-label"], ue["tab-label"]), ref: f },
|
|
552
|
-
y.createElement("span", null, i.label)
|
|
553
|
-
),
|
|
554
|
-
g && y.createElement(
|
|
555
|
-
y.Fragment,
|
|
556
|
-
null,
|
|
557
|
-
b,
|
|
558
|
-
_ && y.createElement(en, { className: B["disabled-reason-tooltip"], trackRef: f, value: i.disabledReason, onDismiss: () => E(!1) })
|
|
559
|
-
)
|
|
560
|
-
), v = {
|
|
561
|
-
onFocus: () => E(!0),
|
|
562
|
-
onBlur: () => E(!1),
|
|
563
|
-
onMouseEnter: () => E(!0),
|
|
564
|
-
onMouseLeave: () => E(!1)
|
|
565
|
-
}, F = {
|
|
566
|
-
action: "select",
|
|
567
|
-
detail: {
|
|
568
|
-
id: i.id,
|
|
569
|
-
label: `.${ue["tab-label"]}`,
|
|
570
|
-
position: `${c + 1}`,
|
|
571
|
-
originTabId: d || ""
|
|
572
|
-
}
|
|
573
|
-
}, A = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, s), g ? T : {}), g ? v : {}), { ref: a, tabIndex: w }), i.disabled || i.id === d ? {} : be(F));
|
|
574
|
-
return i.href ? y.createElement("a", Object.assign({}, A, { href: i.href }), x) : y.createElement("button", Object.assign({}, A, { type: "button", disabled: i.disabled && !g }), x);
|
|
575
|
-
});
|
|
576
|
-
function Nt({ namespace: i, tabId: s }) {
|
|
577
|
-
return i + "-" + s;
|
|
578
|
-
}
|
|
579
|
-
function Hn(i) {
|
|
580
|
-
const s = i.filter((d) => !d.disabled);
|
|
581
|
-
return s.length > 0 ? s[0] : null;
|
|
582
|
-
}
|
|
583
|
-
function Wn(i, s) {
|
|
584
|
-
switch (i.contentRenderStrategy) {
|
|
585
|
-
case "active":
|
|
586
|
-
return !1;
|
|
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}`
|
|
623
|
-
});
|
|
624
|
-
const z = () => {
|
|
625
|
-
const k = c.filter((H) => H.id === A)[0], Q = (H) => {
|
|
626
|
-
const ee = H === k, ie = {
|
|
627
|
-
className: S({
|
|
628
|
-
[B["tabs-content"]]: !0,
|
|
629
|
-
[B["tabs-content-active"]]: ee
|
|
630
|
-
}),
|
|
631
|
-
role: "tabpanel",
|
|
632
|
-
id: `${F}-${H.id}-panel`,
|
|
633
|
-
key: `${F}-${H.id}-panel`,
|
|
634
|
-
tabIndex: 0,
|
|
635
|
-
"aria-labelledby": Nt({ namespace: F, tabId: H.id })
|
|
636
|
-
}, Y = !H.disabled && (ee || Wn(H, N.current));
|
|
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
|
-
);
|
|
651
|
-
}
|
|
652
|
-
We(St, "Tabs");
|
|
653
|
-
function Vn(i, s) {
|
|
654
|
-
i.displayName = s;
|
|
655
|
-
}
|
|
656
|
-
var rt = "code-view", it = "3.0.0 (d12d94cc)", Ut = "open-source-visual-refresh";
|
|
657
|
-
const Lt = (i, s) => i;
|
|
658
|
-
function zn(i, s) {
|
|
659
|
-
const d = Lt(Ut);
|
|
660
|
-
rn(i, { packageSource: rt, packageVersion: it, theme: d }, s);
|
|
661
|
-
}
|
|
662
|
-
an(rt, it);
|
|
663
|
-
function Kn(i, s) {
|
|
664
|
-
zn(i, s);
|
|
665
|
-
const d = Lt(Ut);
|
|
666
|
-
return { __internalRootRef: on(i, {
|
|
667
|
-
packageName: rt,
|
|
668
|
-
version: it,
|
|
669
|
-
theme: d
|
|
670
|
-
}) };
|
|
671
|
-
}
|
|
672
|
-
function Gn(i) {
|
|
673
|
-
const s = {};
|
|
674
|
-
return Object.keys(i).forEach((d) => {
|
|
675
|
-
d.startsWith("data-") && (s[d] = i[d]);
|
|
676
|
-
}), s;
|
|
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 }
|
|
708
|
-
});
|
|
709
|
-
return I.jsx(Xn, { ...i, ...s });
|
|
710
|
-
}
|
|
711
|
-
Vn(jt, "CodeView");
|
|
712
|
-
const Qe = {
|
|
713
|
-
root: "awsui_root_5a145_19zbi_9",
|
|
714
|
-
"inline-container": "awsui_inline-container_5a145_19zbi_13",
|
|
715
|
-
"inline-container-trigger": "awsui_inline-container-trigger_5a145_19zbi_16"
|
|
716
|
-
}, Ze = {
|
|
717
|
-
root: "awsui_root_ljpwc_30z5b_5",
|
|
718
|
-
"text-to-copy": "awsui_text-to-copy_ljpwc_30z5b_9",
|
|
719
|
-
"text-to-display": "awsui_text-to-display_ljpwc_30z5b_13"
|
|
720
|
-
};
|
|
721
|
-
function Yn(i) {
|
|
722
|
-
var { variant: s = "button", copyButtonAriaLabel: d, copyButtonText: c, copySuccessText: p, copyErrorText: m, textToCopy: f, textToDisplay: a, popoverRenderWithPortal: w, disabled: g, disabledReason: _, __internalRootRef: E = null } = i, T = ge(i, ["variant", "copyButtonAriaLabel", "copyButtonText", "copySuccessText", "copyErrorText", "textToCopy", "textToDisplay", "popoverRenderWithPortal", "disabled", "disabledReason", "__internalRootRef"]);
|
|
723
|
-
const [b, x] = he("pending"), [v, F] = he(""), A = tt(T), j = () => {
|
|
724
|
-
if (!navigator.clipboard) {
|
|
725
|
-
x("error"), F(m);
|
|
726
|
-
return;
|
|
727
|
-
}
|
|
728
|
-
x("pending"), F(""), navigator.clipboard.writeText(f).then(() => {
|
|
729
|
-
x("success"), F(p);
|
|
730
|
-
}).catch(() => {
|
|
731
|
-
x("error"), F(m);
|
|
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];
|
|
768
|
-
}
|
|
769
|
-
function a(b) {
|
|
770
|
-
var x = f(b), v = x[0], F = x[1];
|
|
771
|
-
return (v + F) * 3 / 4 - F;
|
|
772
|
-
}
|
|
773
|
-
function w(b, x, v) {
|
|
774
|
-
return (x + v) * 3 / 4 - v;
|
|
775
|
-
}
|
|
776
|
-
function g(b) {
|
|
777
|
-
var x, v = f(b), F = v[0], A = v[1], j = new d(w(b, F, A)), N = 0, q = A > 0 ? F - 4 : F, R;
|
|
778
|
-
for (R = 0; R < q; R += 4)
|
|
779
|
-
x = s[b.charCodeAt(R)] << 18 | s[b.charCodeAt(R + 1)] << 12 | s[b.charCodeAt(R + 2)] << 6 | s[b.charCodeAt(R + 3)], j[N++] = x >> 16 & 255, j[N++] = x >> 8 & 255, j[N++] = x & 255;
|
|
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;
|
|
781
|
-
}
|
|
782
|
-
function _(b) {
|
|
783
|
-
return i[b >> 18 & 63] + i[b >> 12 & 63] + i[b >> 6 & 63] + i[b & 63];
|
|
784
|
-
}
|
|
785
|
-
function E(b, x, v) {
|
|
786
|
-
for (var F, A = [], j = x; j < v; j += 3)
|
|
787
|
-
F = (b[j] << 16 & 16711680) + (b[j + 1] << 8 & 65280) + (b[j + 2] & 255), A.push(_(F));
|
|
788
|
-
return A.join("");
|
|
789
|
-
}
|
|
790
|
-
function T(b) {
|
|
791
|
-
for (var x, v = b.length, F = v % 3, A = [], j = 16383, N = 0, q = v - F; N < q; N += j)
|
|
792
|
-
A.push(E(b, N, N + j > q ? q : N + j));
|
|
793
|
-
return F === 1 ? (x = b[v - 1], A.push(
|
|
794
|
-
i[x >> 2] + i[x << 4 & 63] + "=="
|
|
795
|
-
)) : F === 2 && (x = (b[v - 2] << 8) + b[v - 1], A.push(
|
|
796
|
-
i[x >> 10] + i[x >> 4 & 63] + i[x << 2 & 63] + "="
|
|
797
|
-
)), A.join("");
|
|
798
|
-
}
|
|
799
|
-
return Ie;
|
|
800
|
-
}
|
|
801
|
-
var Me = {};
|
|
802
|
-
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
803
|
-
var bt;
|
|
804
|
-
function Zn() {
|
|
805
|
-
return bt || (bt = 1, Me.read = function(i, s, d, c, p) {
|
|
806
|
-
var m, f, a = p * 8 - c - 1, w = (1 << a) - 1, g = w >> 1, _ = -7, E = d ? p - 1 : 0, T = d ? -1 : 1, b = i[s + E];
|
|
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() {
|
|
1278
|
-
return {
|
|
1279
|
-
type: "Buffer",
|
|
1280
|
-
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
1281
|
-
};
|
|
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
|
-
}
|
|
1365
|
-
a.prototype.readUintLE = a.prototype.readUIntLE = function(e, t, r) {
|
|
1366
|
-
e = e >>> 0, t = t >>> 0, r || J(e, t, this.length);
|
|
1367
|
-
let o = this[e], l = 1, u = 0;
|
|
1368
|
-
for (; ++u < t && (l *= 256); )
|
|
1369
|
-
o += this[e + u] * l;
|
|
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
|
-
}
|
|
1618
|
-
};
|
|
1619
|
-
}
|
|
1620
|
-
we(
|
|
1621
|
-
"ERR_BUFFER_OUT_OF_BOUNDS",
|
|
1622
|
-
function(n) {
|
|
1623
|
-
return n ? `${n} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds";
|
|
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
|
-
);
|
|
1806
|
-
}
|
|
1807
|
-
function qt(i) {
|
|
1808
|
-
var { columns: s = 1, variant: d = "default", borders: c = "none", disableGutters: p = !1 } = i, m = ge(i, ["columns", "variant", "borders", "disableGutters"]);
|
|
1809
|
-
const f = He("ColumnLayout", {
|
|
1810
|
-
props: { borders: c, columns: s, disableGutters: p, minColumnWidth: m.minColumnWidth, variant: d }
|
|
1811
|
-
}), a = Bt(m);
|
|
1812
|
-
return y.createElement(yn, Object.assign({ columns: s, variant: d, borders: c, disableGutters: p }, a, f));
|
|
1813
|
-
}
|
|
1814
|
-
We(qt, "ColumnLayout");
|
|
1815
|
-
const nr = "awsui-screenreader-text", ve = {
|
|
1816
|
-
"header-label": "awsui_header-label_4mvj3_1h74t_5",
|
|
1817
|
-
root: "awsui_root_4mvj3_1h74t_6"
|
|
1818
|
-
}, rr = (i) => {
|
|
1819
|
-
var { className: s, children: d, header: c, variant: p, expanded: m, disableContentPaddings: f, __internalRootRef: a, __injectAnalyticsComponentMetadata: w } = i, g = ge(i, ["className", "children", "header", "variant", "expanded", "disableContentPaddings", "__internalRootRef", "__injectAnalyticsComponentMetadata"]);
|
|
1820
|
-
const _ = vt(g), T = w ? be({ component: {
|
|
1821
|
-
name: "awsui.ExpandableSection",
|
|
1822
|
-
label: { root: "self" },
|
|
1823
|
-
properties: { variant: p, expanded: `${!!m}` }
|
|
1824
|
-
} }) : {};
|
|
1825
|
-
return p === "container" || p === "stacked" ? y.createElement(
|
|
1826
|
-
xn,
|
|
1827
|
-
{ subStepIdentifier: _?.instanceIdentifier, subStepErrorContext: _?.errorContext },
|
|
1828
|
-
y.createElement(En, Object.assign({}, g, { className: s, header: c, variant: p === "stacked" ? "stacked" : "default", disableContentPaddings: f || !m, disableHeaderPaddings: !0, __hiddenContent: !m, __internalRootRef: a }, T), d)
|
|
1829
|
-
) : y.createElement(
|
|
1830
|
-
"div",
|
|
1831
|
-
Object.assign({ className: s }, g, { ref: a }, T, un(`.${ve["header-label"]}`)),
|
|
1832
|
-
c,
|
|
1833
|
-
d
|
|
1834
|
-
);
|
|
1835
|
-
}, Ve = (i, s) => s.includes(i);
|
|
1836
|
-
function ot(i) {
|
|
1837
|
-
return Ve(i, ["container", "default", "footer", "inline"]);
|
|
1838
|
-
}
|
|
1839
|
-
function $t(i) {
|
|
1840
|
-
return Ve(i, ["container", "compact", "default", "inline"]);
|
|
1841
|
-
}
|
|
1842
|
-
function ir(i) {
|
|
1843
|
-
return Ve(i, ["container", "compact"]);
|
|
1844
|
-
}
|
|
1845
|
-
function ar(i) {
|
|
1846
|
-
return Ve(i, ["default", "inline"]);
|
|
1847
|
-
}
|
|
1848
|
-
const L = {
|
|
1849
|
-
"content-enter": "awsui_content-enter_gwq0h_nchqn_161",
|
|
1850
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_gwq0h_nchqn_1",
|
|
1851
|
-
"trigger-expanded": "awsui_trigger-expanded_gwq0h_nchqn_183",
|
|
1852
|
-
icon: "awsui_icon_gwq0h_nchqn_197",
|
|
1853
|
-
root: "awsui_root_gwq0h_nchqn_211",
|
|
1854
|
-
"expand-button": "awsui_expand-button_gwq0h_nchqn_246",
|
|
1855
|
-
expanded: "awsui_expanded_gwq0h_nchqn_254",
|
|
1856
|
-
"icon-container": "awsui_icon-container_gwq0h_nchqn_264",
|
|
1857
|
-
"icon-container-container": "awsui_icon-container-container_gwq0h_nchqn_268",
|
|
1858
|
-
wrapper: "awsui_wrapper_gwq0h_nchqn_272",
|
|
1859
|
-
"wrapper-default": "awsui_wrapper-default_gwq0h_nchqn_280",
|
|
1860
|
-
"wrapper-inline": "awsui_wrapper-inline_gwq0h_nchqn_280",
|
|
1861
|
-
"wrapper-footer": "awsui_wrapper-footer_gwq0h_nchqn_280",
|
|
1862
|
-
"wrapper-navigation": "awsui_wrapper-navigation_gwq0h_nchqn_284",
|
|
1863
|
-
"wrapper-container": "awsui_wrapper-container_gwq0h_nchqn_287",
|
|
1864
|
-
"wrapper-compact": "awsui_wrapper-compact_gwq0h_nchqn_291",
|
|
1865
|
-
"header-deprecated": "awsui_header-deprecated_gwq0h_nchqn_304",
|
|
1866
|
-
"wrapper-expanded": "awsui_wrapper-expanded_gwq0h_nchqn_310",
|
|
1867
|
-
header: "awsui_header_gwq0h_nchqn_304",
|
|
1868
|
-
"header-wrapper": "awsui_header-wrapper_gwq0h_nchqn_347",
|
|
1869
|
-
"header-actions-wrapper": "awsui_header-actions-wrapper_gwq0h_nchqn_359",
|
|
1870
|
-
"header-button": "awsui_header-button_gwq0h_nchqn_365",
|
|
1871
|
-
"header-container-button": "awsui_header-container-button_gwq0h_nchqn_365",
|
|
1872
|
-
"header-container": "awsui_header-container_gwq0h_nchqn_365",
|
|
1873
|
-
"header-navigation": "awsui_header-navigation_gwq0h_nchqn_400",
|
|
1874
|
-
"header-text": "awsui_header-text_gwq0h_nchqn_437",
|
|
1875
|
-
content: "awsui_content_gwq0h_nchqn_161",
|
|
1876
|
-
"content-default": "awsui_content-default_gwq0h_nchqn_450",
|
|
1877
|
-
"content-inline": "awsui_content-inline_gwq0h_nchqn_450",
|
|
1878
|
-
"content-footer": "awsui_content-footer_gwq0h_nchqn_454",
|
|
1879
|
-
"content-expanded": "awsui_content-expanded_gwq0h_nchqn_458",
|
|
1880
|
-
"content-compact": "awsui_content-compact_gwq0h_nchqn_461",
|
|
1881
|
-
focusable: "awsui_focusable_gwq0h_nchqn_465",
|
|
1882
|
-
"click-target": "awsui_click-target_gwq0h_nchqn_480"
|
|
1883
|
-
}, Ae = "ExpandableSection", Fe = (i) => {
|
|
1884
|
-
const s = {
|
|
1885
|
-
action: i ? "collapse" : "expand",
|
|
1886
|
-
detail: {
|
|
1887
|
-
label: { rootSelector: `.${ve.root}` }
|
|
1888
|
-
}
|
|
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));
|
|
1932
|
-
};
|
|
1933
|
-
function ur(i) {
|
|
1934
|
-
var { expanded: s, defaultExpanded: d, onChange: c, variant: p = "default", children: m, header: f, headerText: a, headerCounter: w, headerDescription: g, headerInfo: _, headerActions: E, headingTagOverride: T, disableContentPaddings: b, headerAriaLabel: x, __internalRootRef: v, __injectAnalyticsComponentMetadata: F } = i, A = ge(i, ["expanded", "defaultExpanded", "onChange", "variant", "children", "header", "headerText", "headerCounter", "headerDescription", "headerInfo", "headerActions", "headingTagOverride", "disableContentPaddings", "headerAriaLabel", "__internalRootRef", "__injectAnalyticsComponentMetadata"]);
|
|
1935
|
-
const j = oe(null), N = xt(), q = `${N}-trigger`, R = `${N}-description`, z = tt(A), [K, k] = At(s, c, d, {
|
|
1936
|
-
componentName: "ExpandableSection",
|
|
1937
|
-
controlledProp: "expanded",
|
|
1938
|
-
changeHandler: "onChange"
|
|
1939
|
-
}), Q = $e((Z) => {
|
|
1940
|
-
k(Z), Et(c, { expanded: Z });
|
|
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
|
-
);
|
|
1964
|
-
}
|
|
1965
|
-
function Pt(i) {
|
|
1966
|
-
var { variant: s = "default" } = i, d = ge(i, ["variant"]);
|
|
1967
|
-
const c = vt(d), p = He("ExpandableSection", {
|
|
1968
|
-
props: {
|
|
1969
|
-
disableContentPaddings: d.disableContentPaddings,
|
|
1970
|
-
headingTagOverride: d.headingTagOverride,
|
|
1971
|
-
variant: s
|
|
1972
|
-
},
|
|
1973
|
-
metadata: {
|
|
1974
|
-
hasInstanceIdentifier: !!c?.instanceIdentifier,
|
|
1975
|
-
hasHeaderActions: !!d.headerActions
|
|
1976
|
-
}
|
|
1977
|
-
}, c);
|
|
1978
|
-
return y.createElement(ur, Object.assign({ variant: s }, d, p, { __injectAnalyticsComponentMetadata: !0 }));
|
|
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,
|
|
2030
|
-
{
|
|
2031
|
-
tabs: [
|
|
2032
|
-
{
|
|
2033
|
-
label: "Headers",
|
|
2034
|
-
id: "headers",
|
|
2035
|
-
content: /* @__PURE__ */ I.jsx(dr, { harEntry: i })
|
|
2036
|
-
},
|
|
2037
|
-
{
|
|
2038
|
-
label: "Payload",
|
|
2039
|
-
id: "payload",
|
|
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
|
-
]
|
|
2053
|
-
}
|
|
2054
|
-
);
|
|
2055
|
-
}
|
|
2056
|
-
export {
|
|
2057
|
-
_r as H,
|
|
2058
|
-
At as u
|
|
2059
|
-
};
|