dynamic-mui 2.0.19 → 4.0.0
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/dist/dynamic-mui.cjs.js +423 -1
- package/dist/dynamic-mui.es.js +84610 -8
- package/dist/event-streams-BrjdvYD3.js +1 -0
- package/dist/event-streams-tx5d1M9G.mjs +141 -0
- package/dist/extensions-B3BRGnLR.js +16 -0
- package/dist/extensions-DZDYv2QS.mjs +3630 -0
- package/dist/index.d.ts +1 -5
- package/dist/loadCognitoIdentity-BoXMbcFT.mjs +1169 -0
- package/dist/loadCognitoIdentity-pRmj5eK-.js +1 -0
- package/dist/src/index.d.ts +6 -0
- package/dist/{util → src/util}/helper.d.ts +4 -0
- package/dist/toUtf8.browser-BG3l2gyD.mjs +8 -0
- package/dist/toUtf8.browser-BhMqkDuU.js +1 -0
- package/package.json +28 -27
- package/dist/index-BfNrc8Qr.js +0 -465
- package/dist/index-C9T8iagF.mjs +0 -153
- package/dist/index-Cz-oc-wF.js +0 -1
- package/dist/index-UjOaH_Kr.mjs +0 -102265
- package/dist/loadCognitoIdentity-B2mRTR9b.js +0 -1
- package/dist/loadCognitoIdentity-Beg60hgH.mjs +0 -935
- /package/dist/{components → src/components}/DynamicComponent.d.ts +0 -0
- /package/dist/{components → src/components}/FormGenerator.d.ts +0 -0
- /package/dist/{components → src/components}/charts/Bar/bar.d.ts +0 -0
- /package/dist/{components → src/components}/charts/Line/line.d.ts +0 -0
- /package/dist/{components → src/components}/charts/Mixchart/mixChart.d.ts +0 -0
- /package/dist/{components → src/components}/charts/Pie/pie.d.ts +0 -0
- /package/dist/{components → src/components}/controls/Accordion/accordion.d.ts +0 -0
- /package/dist/{components → src/components}/controls/Autocomplete/autocomplete.d.ts +0 -0
- /package/dist/{components → src/components}/controls/CheckBox/checkbox.d.ts +0 -0
- /package/dist/{components → src/components}/controls/Chip/chip.d.ts +0 -0
- /package/dist/{components → src/components}/controls/DataTable/datatable.d.ts +0 -0
- /package/dist/{components → src/components}/controls/DateTime/datetime.d.ts +0 -0
- /package/dist/{components → src/components}/controls/DateTimePicker/datetimepicker.d.ts +0 -0
- /package/dist/{components → src/components}/controls/Divider/divider.d.ts +0 -0
- /package/dist/{components → src/components}/controls/FormRepeater/formrepeater.d.ts +0 -0
- /package/dist/{components → src/components}/controls/Group/group.d.ts +0 -0
- /package/dist/{components → src/components}/controls/Hyperlink/hyperlink.d.ts +0 -0
- /package/dist/{components → src/components}/controls/ImageList/imagelist.d.ts +0 -0
- /package/dist/{components → src/components}/controls/LineItemList/lineitemlist.d.ts +0 -0
- /package/dist/{components → src/components}/controls/List/list.d.ts +0 -0
- /package/dist/{components → src/components}/controls/LocationField/locationfield.d.ts +0 -0
- /package/dist/{components → src/components}/controls/MultiTextbox/multitextbox.d.ts +0 -0
- /package/dist/{components → src/components}/controls/NumberField/numberfield.d.ts +0 -0
- /package/dist/{components → src/components}/controls/Radio/radio.d.ts +0 -0
- /package/dist/{components → src/components}/controls/Select/select.d.ts +0 -0
- /package/dist/{components → src/components}/controls/Signature/signature.d.ts +0 -0
- /package/dist/{components → src/components}/controls/Stepper/stepper.d.ts +0 -0
- /package/dist/{components → src/components}/controls/Switch/switch.d.ts +0 -0
- /package/dist/{components → src/components}/controls/Tabs/tabs.d.ts +0 -0
- /package/dist/{components → src/components}/controls/TextField/textfield.d.ts +0 -0
- /package/dist/{components → src/components}/controls/TimePicker/timepicker.d.ts +0 -0
- /package/dist/{components → src/components}/controls/Typography/typography.d.ts +0 -0
- /package/dist/{components → src/components}/controls/index.d.ts +0 -0
- /package/dist/{config → src/config}/mui.d.ts +0 -0
- /package/dist/{main.d.ts → src/main.d.ts} +0 -0
- /package/dist/{playground → src/playground}/Builder.d.ts +0 -0
- /package/dist/{playground → src/playground}/Canvas.d.ts +0 -0
- /package/dist/{playground → src/playground}/PropertiesEditor.d.ts +0 -0
- /package/dist/{playground → src/playground}/Sidebar.d.ts +0 -0
- /package/dist/{playground → src/playground}/documentation.d.ts +0 -0
- /package/dist/{playground → src/playground}/templates.d.ts +0 -0
- /package/dist/{playground → src/playground}/testData.d.ts +0 -0
- /package/dist/{test → src/test}/setup.d.ts +0 -0
- /package/dist/{theme → src/theme}/theme.d.ts +0 -0
- /package/dist/{types.d.ts → src/types.d.ts} +0 -0
- /package/dist/{util → src/util}/s3Upload.d.ts +0 -0
- /package/dist/{util → src/util}/stepperComponents.d.ts +0 -0
- /package/dist/{util → src/util}/useIsFirstRender.d.ts +0 -0
- /package/dist/{util → src/util}/useUpdateEffect.d.ts +0 -0
- /package/dist/{util → src/util}/validation.d.ts +0 -0
|
@@ -0,0 +1,3630 @@
|
|
|
1
|
+
import { n as e, t } from "./toUtf8.browser-BG3l2gyD.mjs";
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
3
|
+
var n = Object.create, r = Object.defineProperty, i = Object.getOwnPropertyDescriptor, a = Object.getOwnPropertyNames, o = Object.getPrototypeOf, s = Object.prototype.hasOwnProperty, c = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), l = (e, t, n, o) => {
|
|
4
|
+
if (t && typeof t == "object" || typeof t == "function") for (var c = a(t), l = 0, u = c.length, d; l < u; l++) d = c[l], !s.call(e, d) && d !== n && r(e, d, {
|
|
5
|
+
get: ((e) => t[e]).bind(null, d),
|
|
6
|
+
enumerable: !(o = i(t, d)) || o.enumerable
|
|
7
|
+
});
|
|
8
|
+
return e;
|
|
9
|
+
}, u = (e, t, i) => (i = e == null ? {} : n(o(e)), l(t || !e || !e.__esModule ? r(i, "default", {
|
|
10
|
+
value: e,
|
|
11
|
+
enumerable: !0
|
|
12
|
+
}) : i, e)), d = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
|
|
13
|
+
if (typeof require < "u") return require.apply(this, arguments);
|
|
14
|
+
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
15
|
+
}), f = (e) => ({
|
|
16
|
+
setHttpHandler(t) {
|
|
17
|
+
e.httpHandler = t;
|
|
18
|
+
},
|
|
19
|
+
httpHandler() {
|
|
20
|
+
return e.httpHandler;
|
|
21
|
+
},
|
|
22
|
+
updateHttpClientConfig(t, n) {
|
|
23
|
+
e.httpHandler?.updateHttpClientConfig(t, n);
|
|
24
|
+
},
|
|
25
|
+
httpHandlerConfigs() {
|
|
26
|
+
return e.httpHandler.httpHandlerConfigs();
|
|
27
|
+
}
|
|
28
|
+
}), p = (e) => ({ httpHandler: e.httpHandler() }), m;
|
|
29
|
+
(function(e) {
|
|
30
|
+
e.HTTP = "http", e.HTTPS = "https";
|
|
31
|
+
})(m ||= {});
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region node_modules/@smithy/types/dist-es/extensions/checksum.js
|
|
34
|
+
var h;
|
|
35
|
+
(function(e) {
|
|
36
|
+
e.MD5 = "md5", e.CRC32 = "crc32", e.CRC32C = "crc32c", e.SHA1 = "sha1", e.SHA256 = "sha256";
|
|
37
|
+
})(h ||= {});
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region node_modules/@smithy/types/dist-es/middleware.js
|
|
40
|
+
var g = "__smithy_context", _ = class e {
|
|
41
|
+
method;
|
|
42
|
+
protocol;
|
|
43
|
+
hostname;
|
|
44
|
+
port;
|
|
45
|
+
path;
|
|
46
|
+
query;
|
|
47
|
+
headers;
|
|
48
|
+
username;
|
|
49
|
+
password;
|
|
50
|
+
fragment;
|
|
51
|
+
body;
|
|
52
|
+
constructor(e) {
|
|
53
|
+
this.method = e.method || "GET", this.hostname = e.hostname || "localhost", this.port = e.port, this.query = e.query || {}, this.headers = e.headers || {}, this.body = e.body, this.protocol = e.protocol ? e.protocol.slice(-1) === ":" ? e.protocol : `${e.protocol}:` : "https:", this.path = e.path ? e.path.charAt(0) === "/" ? e.path : `/${e.path}` : "/", this.username = e.username, this.password = e.password, this.fragment = e.fragment;
|
|
54
|
+
}
|
|
55
|
+
static clone(t) {
|
|
56
|
+
let n = new e({
|
|
57
|
+
...t,
|
|
58
|
+
headers: { ...t.headers }
|
|
59
|
+
});
|
|
60
|
+
return n.query &&= ee(n.query), n;
|
|
61
|
+
}
|
|
62
|
+
static isInstance(e) {
|
|
63
|
+
if (!e) return !1;
|
|
64
|
+
let t = e;
|
|
65
|
+
return "method" in t && "protocol" in t && "hostname" in t && "path" in t && typeof t.query == "object" && typeof t.headers == "object";
|
|
66
|
+
}
|
|
67
|
+
clone() {
|
|
68
|
+
return e.clone(this);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
function ee(e) {
|
|
72
|
+
return Object.keys(e).reduce((t, n) => {
|
|
73
|
+
let r = e[n];
|
|
74
|
+
return {
|
|
75
|
+
...t,
|
|
76
|
+
[n]: Array.isArray(r) ? [...r] : r
|
|
77
|
+
};
|
|
78
|
+
}, {});
|
|
79
|
+
}
|
|
80
|
+
//#endregion
|
|
81
|
+
//#region node_modules/@smithy/protocol-http/dist-es/httpResponse.js
|
|
82
|
+
var v = class {
|
|
83
|
+
statusCode;
|
|
84
|
+
reason;
|
|
85
|
+
headers;
|
|
86
|
+
body;
|
|
87
|
+
constructor(e) {
|
|
88
|
+
this.statusCode = e.statusCode, this.reason = e.reason, this.headers = e.headers || {}, this.body = e.body;
|
|
89
|
+
}
|
|
90
|
+
static isInstance(e) {
|
|
91
|
+
if (!e) return !1;
|
|
92
|
+
let t = e;
|
|
93
|
+
return typeof t.statusCode == "number" && typeof t.headers == "object";
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
//#endregion
|
|
97
|
+
//#region node_modules/@aws-sdk/core/dist-es/submodules/client/setCredentialFeature.js
|
|
98
|
+
function te(e, t, n) {
|
|
99
|
+
return e.$source ||= {}, e.$source[t] = n, e;
|
|
100
|
+
}
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js
|
|
103
|
+
function y(e, t, n) {
|
|
104
|
+
e.__aws_sdk_context ? e.__aws_sdk_context.features || (e.__aws_sdk_context.features = {}) : e.__aws_sdk_context = { features: {} }, e.__aws_sdk_context.features[t] = n;
|
|
105
|
+
}
|
|
106
|
+
//#endregion
|
|
107
|
+
//#region node_modules/@smithy/util-base64/dist-es/constants.browser.js
|
|
108
|
+
var ne = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", re = Object.entries(ne).reduce((e, [t, n]) => (e[n] = Number(t), e), {}), ie = ne.split(""), ae = (e) => {
|
|
109
|
+
let t = e.length / 4 * 3;
|
|
110
|
+
e.slice(-2) === "==" ? t -= 2 : e.slice(-1) === "=" && t--;
|
|
111
|
+
let n = new ArrayBuffer(t), r = new DataView(n);
|
|
112
|
+
for (let t = 0; t < e.length; t += 4) {
|
|
113
|
+
let n = 0, i = 0;
|
|
114
|
+
for (let r = t, a = t + 3; r <= a; r++) if (e[r] !== "=") {
|
|
115
|
+
if (!(e[r] in re)) throw TypeError(`Invalid character ${e[r]} in base64 string.`);
|
|
116
|
+
n |= re[e[r]] << (a - r) * 6, i += 6;
|
|
117
|
+
} else n >>= 6;
|
|
118
|
+
let a = t / 4 * 3;
|
|
119
|
+
n >>= i % 8;
|
|
120
|
+
let o = Math.floor(i / 8);
|
|
121
|
+
for (let e = 0; e < o; e++) {
|
|
122
|
+
let t = (o - e - 1) * 8;
|
|
123
|
+
r.setUint8(a + e, (n & 255 << t) >> t);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return new Uint8Array(n);
|
|
127
|
+
}, b = (t) => typeof t == "string" ? e(t) : ArrayBuffer.isView(t) ? new Uint8Array(t.buffer, t.byteOffset, t.byteLength / Uint8Array.BYTES_PER_ELEMENT) : new Uint8Array(t);
|
|
128
|
+
//#endregion
|
|
129
|
+
//#region node_modules/@smithy/util-base64/dist-es/toBase64.browser.js
|
|
130
|
+
function oe(t) {
|
|
131
|
+
let n;
|
|
132
|
+
n = typeof t == "string" ? e(t) : t;
|
|
133
|
+
let r = typeof n == "object" && typeof n.length == "number", i = typeof n == "object" && typeof n.byteOffset == "number" && typeof n.byteLength == "number";
|
|
134
|
+
if (!r && !i) throw Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");
|
|
135
|
+
let a = "";
|
|
136
|
+
for (let e = 0; e < n.length; e += 3) {
|
|
137
|
+
let t = 0, r = 0;
|
|
138
|
+
for (let i = e, a = Math.min(e + 3, n.length); i < a; i++) t |= n[i] << (a - i - 1) * 8, r += 8;
|
|
139
|
+
let i = Math.ceil(r / 6);
|
|
140
|
+
t <<= i * 6 - r;
|
|
141
|
+
for (let e = 1; e <= i; e++) {
|
|
142
|
+
let n = (i - e) * 6;
|
|
143
|
+
a += ie[(t & 63 << n) >> n];
|
|
144
|
+
}
|
|
145
|
+
a += "==".slice(0, 4 - i);
|
|
146
|
+
}
|
|
147
|
+
return a;
|
|
148
|
+
}
|
|
149
|
+
//#endregion
|
|
150
|
+
//#region node_modules/@smithy/util-stream/dist-es/blob/Uint8ArrayBlobAdapter.js
|
|
151
|
+
var se = class n extends Uint8Array {
|
|
152
|
+
static fromString(t, r = "utf-8") {
|
|
153
|
+
if (typeof t == "string") return r === "base64" ? n.mutate(ae(t)) : n.mutate(e(t));
|
|
154
|
+
throw Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`);
|
|
155
|
+
}
|
|
156
|
+
static mutate(e) {
|
|
157
|
+
return Object.setPrototypeOf(e, n.prototype), e;
|
|
158
|
+
}
|
|
159
|
+
transformToString(e = "utf-8") {
|
|
160
|
+
return e === "base64" ? oe(this) : t(this);
|
|
161
|
+
}
|
|
162
|
+
}, x = (e) => encodeURIComponent(e).replace(/[!'()*]/g, ce), ce = (e) => `%${e.charCodeAt(0).toString(16).toUpperCase()}`;
|
|
163
|
+
//#endregion
|
|
164
|
+
//#region node_modules/@smithy/querystring-builder/dist-es/index.js
|
|
165
|
+
function le(e) {
|
|
166
|
+
let t = [];
|
|
167
|
+
for (let n of Object.keys(e).sort()) {
|
|
168
|
+
let r = e[n];
|
|
169
|
+
if (n = x(n), Array.isArray(r)) for (let e = 0, i = r.length; e < i; e++) t.push(`${n}=${x(r[e])}`);
|
|
170
|
+
else {
|
|
171
|
+
let e = n;
|
|
172
|
+
(r || typeof r == "string") && (e += `=${x(r)}`), t.push(e);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
return t.join("&");
|
|
176
|
+
}
|
|
177
|
+
//#endregion
|
|
178
|
+
//#region node_modules/@smithy/fetch-http-handler/dist-es/create-request.js
|
|
179
|
+
function ue(e, t) {
|
|
180
|
+
return new Request(e, t);
|
|
181
|
+
}
|
|
182
|
+
//#endregion
|
|
183
|
+
//#region node_modules/@smithy/fetch-http-handler/dist-es/request-timeout.js
|
|
184
|
+
function de(e = 0) {
|
|
185
|
+
return new Promise((t, n) => {
|
|
186
|
+
e && setTimeout(() => {
|
|
187
|
+
let t = /* @__PURE__ */ Error(`Request did not complete within ${e} ms`);
|
|
188
|
+
t.name = "TimeoutError", n(t);
|
|
189
|
+
}, e);
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
//#endregion
|
|
193
|
+
//#region node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js
|
|
194
|
+
var fe = { supported: void 0 }, pe = class e {
|
|
195
|
+
config;
|
|
196
|
+
configProvider;
|
|
197
|
+
static create(t) {
|
|
198
|
+
return typeof t?.handle == "function" ? t : new e(t);
|
|
199
|
+
}
|
|
200
|
+
constructor(e) {
|
|
201
|
+
typeof e == "function" ? this.configProvider = e().then((e) => e || {}) : (this.config = e ?? {}, this.configProvider = Promise.resolve(this.config)), fe.supported === void 0 && (fe.supported = typeof Request < "u" && "keepalive" in ue("https://[::1]"));
|
|
202
|
+
}
|
|
203
|
+
destroy() {}
|
|
204
|
+
async handle(e, { abortSignal: t, requestTimeout: n } = {}) {
|
|
205
|
+
this.config ||= await this.configProvider;
|
|
206
|
+
let r = n ?? this.config.requestTimeout, i = this.config.keepAlive === !0, a = this.config.credentials;
|
|
207
|
+
if (t?.aborted) {
|
|
208
|
+
let e = me(t);
|
|
209
|
+
return Promise.reject(e);
|
|
210
|
+
}
|
|
211
|
+
let o = e.path, s = le(e.query || {});
|
|
212
|
+
s && (o += `?${s}`), e.fragment && (o += `#${e.fragment}`);
|
|
213
|
+
let c = "";
|
|
214
|
+
(e.username != null || e.password != null) && (c = `${e.username ?? ""}:${e.password ?? ""}@`);
|
|
215
|
+
let { port: l, method: u } = e, d = `${e.protocol}//${c}${e.hostname}${l ? `:${l}` : ""}${o}`, f = u === "GET" || u === "HEAD" ? void 0 : e.body, p = {
|
|
216
|
+
body: f,
|
|
217
|
+
headers: new Headers(e.headers),
|
|
218
|
+
method: u,
|
|
219
|
+
credentials: a
|
|
220
|
+
};
|
|
221
|
+
this.config?.cache && (p.cache = this.config.cache), f && (p.duplex = "half"), typeof AbortController < "u" && (p.signal = t), fe.supported && (p.keepalive = i), typeof this.config.requestInit == "function" && Object.assign(p, this.config.requestInit(e));
|
|
222
|
+
let m = () => {}, h = ue(d, p), g = [fetch(h).then((e) => {
|
|
223
|
+
let t = e.headers, n = {};
|
|
224
|
+
for (let e of t.entries()) n[e[0]] = e[1];
|
|
225
|
+
return e.body == null ? e.blob().then((t) => ({ response: new v({
|
|
226
|
+
headers: n,
|
|
227
|
+
reason: e.statusText,
|
|
228
|
+
statusCode: e.status,
|
|
229
|
+
body: t
|
|
230
|
+
}) })) : { response: new v({
|
|
231
|
+
headers: n,
|
|
232
|
+
reason: e.statusText,
|
|
233
|
+
statusCode: e.status,
|
|
234
|
+
body: e.body
|
|
235
|
+
}) };
|
|
236
|
+
}), de(r)];
|
|
237
|
+
return t && g.push(new Promise((e, n) => {
|
|
238
|
+
let r = () => {
|
|
239
|
+
n(me(t));
|
|
240
|
+
};
|
|
241
|
+
if (typeof t.addEventListener == "function") {
|
|
242
|
+
let e = t;
|
|
243
|
+
e.addEventListener("abort", r, { once: !0 }), m = () => e.removeEventListener("abort", r);
|
|
244
|
+
} else t.onabort = r;
|
|
245
|
+
})), Promise.race(g).finally(m);
|
|
246
|
+
}
|
|
247
|
+
updateHttpClientConfig(e, t) {
|
|
248
|
+
this.config = void 0, this.configProvider = this.configProvider.then((n) => (n[e] = t, n));
|
|
249
|
+
}
|
|
250
|
+
httpHandlerConfigs() {
|
|
251
|
+
return this.config ?? {};
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
function me(e) {
|
|
255
|
+
let t = e && typeof e == "object" && "reason" in e ? e.reason : void 0;
|
|
256
|
+
if (t) {
|
|
257
|
+
if (t instanceof Error) {
|
|
258
|
+
let e = /* @__PURE__ */ Error("Request aborted");
|
|
259
|
+
return e.name = "AbortError", e.cause = t, e;
|
|
260
|
+
}
|
|
261
|
+
let e = Error(String(t));
|
|
262
|
+
return e.name = "AbortError", e;
|
|
263
|
+
}
|
|
264
|
+
let n = /* @__PURE__ */ Error("Request aborted");
|
|
265
|
+
return n.name = "AbortError", n;
|
|
266
|
+
}
|
|
267
|
+
//#endregion
|
|
268
|
+
//#region node_modules/@smithy/fetch-http-handler/dist-es/stream-collector.js
|
|
269
|
+
var he = async (e) => typeof Blob == "function" && e instanceof Blob || e.constructor?.name === "Blob" ? Blob.prototype.arrayBuffer === void 0 ? ge(e) : new Uint8Array(await e.arrayBuffer()) : _e(e);
|
|
270
|
+
async function ge(e) {
|
|
271
|
+
let t = ae(await ve(e));
|
|
272
|
+
return new Uint8Array(t);
|
|
273
|
+
}
|
|
274
|
+
async function _e(e) {
|
|
275
|
+
let t = [], n = e.getReader(), r = !1, i = 0;
|
|
276
|
+
for (; !r;) {
|
|
277
|
+
let { done: e, value: a } = await n.read();
|
|
278
|
+
a && (t.push(a), i += a.length), r = e;
|
|
279
|
+
}
|
|
280
|
+
let a = new Uint8Array(i), o = 0;
|
|
281
|
+
for (let e of t) a.set(e, o), o += e.length;
|
|
282
|
+
return a;
|
|
283
|
+
}
|
|
284
|
+
function ve(e) {
|
|
285
|
+
return new Promise((t, n) => {
|
|
286
|
+
let r = new FileReader();
|
|
287
|
+
r.onloadend = () => {
|
|
288
|
+
if (r.readyState !== 2) return n(/* @__PURE__ */ Error("Reader aborted too early"));
|
|
289
|
+
let e = r.result ?? "", i = e.indexOf(","), a = i > -1 ? i + 1 : e.length;
|
|
290
|
+
t(e.substring(a));
|
|
291
|
+
}, r.onabort = () => n(/* @__PURE__ */ Error("Read aborted")), r.onerror = () => n(r.error), r.readAsDataURL(e);
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
//#endregion
|
|
295
|
+
//#region node_modules/@smithy/util-hex-encoding/dist-es/index.js
|
|
296
|
+
var ye = {}, be = {};
|
|
297
|
+
for (let e = 0; e < 256; e++) {
|
|
298
|
+
let t = e.toString(16).toLowerCase();
|
|
299
|
+
t.length === 1 && (t = `0${t}`), ye[e] = t, be[t] = e;
|
|
300
|
+
}
|
|
301
|
+
function xe(e) {
|
|
302
|
+
if (e.length % 2 != 0) throw Error("Hex encoded strings must have an even number length");
|
|
303
|
+
let t = new Uint8Array(e.length / 2);
|
|
304
|
+
for (let n = 0; n < e.length; n += 2) {
|
|
305
|
+
let r = e.slice(n, n + 2).toLowerCase();
|
|
306
|
+
if (r in be) t[n / 2] = be[r];
|
|
307
|
+
else throw Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`);
|
|
308
|
+
}
|
|
309
|
+
return t;
|
|
310
|
+
}
|
|
311
|
+
function S(e) {
|
|
312
|
+
let t = "";
|
|
313
|
+
for (let n = 0; n < e.byteLength; n++) t += ye[e[n]];
|
|
314
|
+
return t;
|
|
315
|
+
}
|
|
316
|
+
//#endregion
|
|
317
|
+
//#region node_modules/@smithy/is-array-buffer/dist-es/index.js
|
|
318
|
+
var Se = (e) => typeof ArrayBuffer == "function" && e instanceof ArrayBuffer || Object.prototype.toString.call(e) === "[object ArrayBuffer]";
|
|
319
|
+
//#endregion
|
|
320
|
+
//#region node_modules/tslib/tslib.es6.mjs
|
|
321
|
+
function Ce(e, t, n, r) {
|
|
322
|
+
function i(e) {
|
|
323
|
+
return e instanceof n ? e : new n(function(t) {
|
|
324
|
+
t(e);
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
return new (n ||= Promise)(function(n, a) {
|
|
328
|
+
function o(e) {
|
|
329
|
+
try {
|
|
330
|
+
c(r.next(e));
|
|
331
|
+
} catch (e) {
|
|
332
|
+
a(e);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
function s(e) {
|
|
336
|
+
try {
|
|
337
|
+
c(r.throw(e));
|
|
338
|
+
} catch (e) {
|
|
339
|
+
a(e);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
function c(e) {
|
|
343
|
+
e.done ? n(e.value) : i(e.value).then(o, s);
|
|
344
|
+
}
|
|
345
|
+
c((r = r.apply(e, t || [])).next());
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
function we(e, t) {
|
|
349
|
+
var n = {
|
|
350
|
+
label: 0,
|
|
351
|
+
sent: function() {
|
|
352
|
+
if (a[0] & 1) throw a[1];
|
|
353
|
+
return a[1];
|
|
354
|
+
},
|
|
355
|
+
trys: [],
|
|
356
|
+
ops: []
|
|
357
|
+
}, r, i, a, o = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
358
|
+
return o.next = s(0), o.throw = s(1), o.return = s(2), typeof Symbol == "function" && (o[Symbol.iterator] = function() {
|
|
359
|
+
return this;
|
|
360
|
+
}), o;
|
|
361
|
+
function s(e) {
|
|
362
|
+
return function(t) {
|
|
363
|
+
return c([e, t]);
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
function c(s) {
|
|
367
|
+
if (r) throw TypeError("Generator is already executing.");
|
|
368
|
+
for (; o && (o = 0, s[0] && (n = 0)), n;) try {
|
|
369
|
+
if (r = 1, i && (a = s[0] & 2 ? i.return : s[0] ? i.throw || ((a = i.return) && a.call(i), 0) : i.next) && !(a = a.call(i, s[1])).done) return a;
|
|
370
|
+
switch (i = 0, a && (s = [s[0] & 2, a.value]), s[0]) {
|
|
371
|
+
case 0:
|
|
372
|
+
case 1:
|
|
373
|
+
a = s;
|
|
374
|
+
break;
|
|
375
|
+
case 4: return n.label++, {
|
|
376
|
+
value: s[1],
|
|
377
|
+
done: !1
|
|
378
|
+
};
|
|
379
|
+
case 5:
|
|
380
|
+
n.label++, i = s[1], s = [0];
|
|
381
|
+
continue;
|
|
382
|
+
case 7:
|
|
383
|
+
s = n.ops.pop(), n.trys.pop();
|
|
384
|
+
continue;
|
|
385
|
+
default:
|
|
386
|
+
if ((a = n.trys, !(a = a.length > 0 && a[a.length - 1])) && (s[0] === 6 || s[0] === 2)) {
|
|
387
|
+
n = 0;
|
|
388
|
+
continue;
|
|
389
|
+
}
|
|
390
|
+
if (s[0] === 3 && (!a || s[1] > a[0] && s[1] < a[3])) {
|
|
391
|
+
n.label = s[1];
|
|
392
|
+
break;
|
|
393
|
+
}
|
|
394
|
+
if (s[0] === 6 && n.label < a[1]) {
|
|
395
|
+
n.label = a[1], a = s;
|
|
396
|
+
break;
|
|
397
|
+
}
|
|
398
|
+
if (a && n.label < a[2]) {
|
|
399
|
+
n.label = a[2], n.ops.push(s);
|
|
400
|
+
break;
|
|
401
|
+
}
|
|
402
|
+
a[2] && n.ops.pop(), n.trys.pop();
|
|
403
|
+
continue;
|
|
404
|
+
}
|
|
405
|
+
s = t.call(e, n);
|
|
406
|
+
} catch (e) {
|
|
407
|
+
s = [6, e], i = 0;
|
|
408
|
+
} finally {
|
|
409
|
+
r = a = 0;
|
|
410
|
+
}
|
|
411
|
+
if (s[0] & 5) throw s[1];
|
|
412
|
+
return {
|
|
413
|
+
value: s[0] ? s[1] : void 0,
|
|
414
|
+
done: !0
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
function Te(e) {
|
|
419
|
+
var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
|
|
420
|
+
if (n) return n.call(e);
|
|
421
|
+
if (e && typeof e.length == "number") return { next: function() {
|
|
422
|
+
return e && r >= e.length && (e = void 0), {
|
|
423
|
+
value: e && e[r++],
|
|
424
|
+
done: !e
|
|
425
|
+
};
|
|
426
|
+
} };
|
|
427
|
+
throw TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
428
|
+
}
|
|
429
|
+
//#endregion
|
|
430
|
+
//#region node_modules/@aws-crypto/util/build/module/convertToBuffer.js
|
|
431
|
+
var Ee = typeof Buffer < "u" && Buffer.from ? function(e) {
|
|
432
|
+
return Buffer.from(e, "utf8");
|
|
433
|
+
} : (e) => new TextEncoder().encode(e);
|
|
434
|
+
function C(e) {
|
|
435
|
+
return e instanceof Uint8Array ? e : typeof e == "string" ? Ee(e) : ArrayBuffer.isView(e) ? new Uint8Array(e.buffer, e.byteOffset, e.byteLength / Uint8Array.BYTES_PER_ELEMENT) : new Uint8Array(e);
|
|
436
|
+
}
|
|
437
|
+
//#endregion
|
|
438
|
+
//#region node_modules/@aws-crypto/util/build/module/isEmptyData.js
|
|
439
|
+
function w(e) {
|
|
440
|
+
return typeof e == "string" ? e.length === 0 : e.byteLength === 0;
|
|
441
|
+
}
|
|
442
|
+
//#endregion
|
|
443
|
+
//#region node_modules/@aws-crypto/util/build/module/numToUint8.js
|
|
444
|
+
function De(e) {
|
|
445
|
+
return new Uint8Array([
|
|
446
|
+
(e & 4278190080) >> 24,
|
|
447
|
+
(e & 16711680) >> 16,
|
|
448
|
+
(e & 65280) >> 8,
|
|
449
|
+
e & 255
|
|
450
|
+
]);
|
|
451
|
+
}
|
|
452
|
+
//#endregion
|
|
453
|
+
//#region node_modules/@aws-crypto/util/build/module/uint32ArrayFrom.js
|
|
454
|
+
function Oe(e) {
|
|
455
|
+
if (!Uint32Array.from) {
|
|
456
|
+
for (var t = new Uint32Array(e.length), n = 0; n < e.length;) t[n] = e[n], n += 1;
|
|
457
|
+
return t;
|
|
458
|
+
}
|
|
459
|
+
return Uint32Array.from(e);
|
|
460
|
+
}
|
|
461
|
+
//#endregion
|
|
462
|
+
//#region node_modules/@smithy/util-middleware/dist-es/getSmithyContext.js
|
|
463
|
+
var T = (e) => e.__smithy_context ||= {}, E = (e) => {
|
|
464
|
+
if (typeof e == "function") return e;
|
|
465
|
+
let t = Promise.resolve(e);
|
|
466
|
+
return () => t;
|
|
467
|
+
};
|
|
468
|
+
//#endregion
|
|
469
|
+
//#region node_modules/@aws-sdk/middleware-host-header/dist-es/index.js
|
|
470
|
+
function ke(e) {
|
|
471
|
+
return e;
|
|
472
|
+
}
|
|
473
|
+
var Ae = (e) => (t) => async (n) => {
|
|
474
|
+
if (!_.isInstance(n.request)) return t(n);
|
|
475
|
+
let { request: r } = n, { handlerProtocol: i = "" } = e.requestHandler.metadata || {};
|
|
476
|
+
if (i.indexOf("h2") >= 0 && !r.headers[":authority"]) delete r.headers.host, r.headers[":authority"] = r.hostname + (r.port ? ":" + r.port : "");
|
|
477
|
+
else if (!r.headers.host) {
|
|
478
|
+
let e = r.hostname;
|
|
479
|
+
r.port != null && (e += `:${r.port}`), r.headers.host = e;
|
|
480
|
+
}
|
|
481
|
+
return t(n);
|
|
482
|
+
}, je = {
|
|
483
|
+
name: "hostHeaderMiddleware",
|
|
484
|
+
step: "build",
|
|
485
|
+
priority: "low",
|
|
486
|
+
tags: ["HOST"],
|
|
487
|
+
override: !0
|
|
488
|
+
}, Me = (e) => ({ applyToStack: (t) => {
|
|
489
|
+
t.add(Ae(e), je);
|
|
490
|
+
} }), Ne = () => (e, t) => async (n) => {
|
|
491
|
+
try {
|
|
492
|
+
let r = await e(n), { clientName: i, commandName: a, logger: o, dynamoDbDocumentClientOptions: s = {} } = t, { overrideInputFilterSensitiveLog: c, overrideOutputFilterSensitiveLog: l } = s, u = c ?? t.inputFilterSensitiveLog, d = l ?? t.outputFilterSensitiveLog, { $metadata: f, ...p } = r.output;
|
|
493
|
+
return o?.info?.({
|
|
494
|
+
clientName: i,
|
|
495
|
+
commandName: a,
|
|
496
|
+
input: u(n.input),
|
|
497
|
+
output: d(p),
|
|
498
|
+
metadata: f
|
|
499
|
+
}), r;
|
|
500
|
+
} catch (e) {
|
|
501
|
+
let { clientName: r, commandName: i, logger: a, dynamoDbDocumentClientOptions: o = {} } = t, { overrideInputFilterSensitiveLog: s } = o, c = s ?? t.inputFilterSensitiveLog;
|
|
502
|
+
throw a?.error?.({
|
|
503
|
+
clientName: r,
|
|
504
|
+
commandName: i,
|
|
505
|
+
input: c(n.input),
|
|
506
|
+
error: e,
|
|
507
|
+
metadata: e.$metadata
|
|
508
|
+
}), e;
|
|
509
|
+
}
|
|
510
|
+
}, Pe = {
|
|
511
|
+
name: "loggerMiddleware",
|
|
512
|
+
tags: ["LOGGER"],
|
|
513
|
+
step: "initialize",
|
|
514
|
+
override: !0
|
|
515
|
+
}, Fe = (e) => ({ applyToStack: (e) => {
|
|
516
|
+
e.add(Ne(), Pe);
|
|
517
|
+
} }), Ie = {
|
|
518
|
+
step: "build",
|
|
519
|
+
tags: ["RECURSION_DETECTION"],
|
|
520
|
+
name: "recursionDetectionMiddleware",
|
|
521
|
+
override: !0,
|
|
522
|
+
priority: "low"
|
|
523
|
+
}, Le = () => (e) => async (t) => e(t), Re = (e) => ({ applyToStack: (e) => {
|
|
524
|
+
e.add(Le(), Ie);
|
|
525
|
+
} }), D = (e, t) => {
|
|
526
|
+
let n = [];
|
|
527
|
+
if (e && n.push(e), t) for (let e of t) n.push(e);
|
|
528
|
+
return n;
|
|
529
|
+
}, O = (e, t) => `${e || "anonymous"}${t && t.length > 0 ? ` (a.k.a. ${t.join(",")})` : ""}`, k = () => {
|
|
530
|
+
let e = [], t = [], n = !1, r = /* @__PURE__ */ new Set(), i = (e) => e.sort((e, t) => ze[t.step] - ze[e.step] || Be[t.priority || "normal"] - Be[e.priority || "normal"]), a = (n) => {
|
|
531
|
+
let i = !1, a = (e) => {
|
|
532
|
+
let t = D(e.name, e.aliases);
|
|
533
|
+
if (t.includes(n)) {
|
|
534
|
+
i = !0;
|
|
535
|
+
for (let e of t) r.delete(e);
|
|
536
|
+
return !1;
|
|
537
|
+
}
|
|
538
|
+
return !0;
|
|
539
|
+
};
|
|
540
|
+
return e = e.filter(a), t = t.filter(a), i;
|
|
541
|
+
}, o = (n) => {
|
|
542
|
+
let i = !1, a = (e) => {
|
|
543
|
+
if (e.middleware === n) {
|
|
544
|
+
i = !0;
|
|
545
|
+
for (let t of D(e.name, e.aliases)) r.delete(t);
|
|
546
|
+
return !1;
|
|
547
|
+
}
|
|
548
|
+
return !0;
|
|
549
|
+
};
|
|
550
|
+
return e = e.filter(a), t = t.filter(a), i;
|
|
551
|
+
}, s = (n) => (e.forEach((e) => {
|
|
552
|
+
n.add(e.middleware, { ...e });
|
|
553
|
+
}), t.forEach((e) => {
|
|
554
|
+
n.addRelativeTo(e.middleware, { ...e });
|
|
555
|
+
}), n.identifyOnResolve?.(u.identifyOnResolve()), n), c = (e) => {
|
|
556
|
+
let t = [];
|
|
557
|
+
return e.before.forEach((e) => {
|
|
558
|
+
e.before.length === 0 && e.after.length === 0 ? t.push(e) : t.push(...c(e));
|
|
559
|
+
}), t.push(e), e.after.reverse().forEach((e) => {
|
|
560
|
+
e.before.length === 0 && e.after.length === 0 ? t.push(e) : t.push(...c(e));
|
|
561
|
+
}), t;
|
|
562
|
+
}, l = (n = !1) => {
|
|
563
|
+
let r = [], a = [], o = {};
|
|
564
|
+
return e.forEach((e) => {
|
|
565
|
+
let t = {
|
|
566
|
+
...e,
|
|
567
|
+
before: [],
|
|
568
|
+
after: []
|
|
569
|
+
};
|
|
570
|
+
for (let e of D(t.name, t.aliases)) o[e] = t;
|
|
571
|
+
r.push(t);
|
|
572
|
+
}), t.forEach((e) => {
|
|
573
|
+
let t = {
|
|
574
|
+
...e,
|
|
575
|
+
before: [],
|
|
576
|
+
after: []
|
|
577
|
+
};
|
|
578
|
+
for (let e of D(t.name, t.aliases)) o[e] = t;
|
|
579
|
+
a.push(t);
|
|
580
|
+
}), a.forEach((e) => {
|
|
581
|
+
if (e.toMiddleware) {
|
|
582
|
+
let t = o[e.toMiddleware];
|
|
583
|
+
if (t === void 0) {
|
|
584
|
+
if (n) return;
|
|
585
|
+
throw Error(`${e.toMiddleware} is not found when adding ${O(e.name, e.aliases)} middleware ${e.relation} ${e.toMiddleware}`);
|
|
586
|
+
}
|
|
587
|
+
e.relation === "after" && t.after.push(e), e.relation === "before" && t.before.push(e);
|
|
588
|
+
}
|
|
589
|
+
}), i(r).map(c).reduce((e, t) => (e.push(...t), e), []);
|
|
590
|
+
}, u = {
|
|
591
|
+
add: (t, n = {}) => {
|
|
592
|
+
let { name: i, override: a, aliases: o } = n, s = {
|
|
593
|
+
step: "initialize",
|
|
594
|
+
priority: "normal",
|
|
595
|
+
middleware: t,
|
|
596
|
+
...n
|
|
597
|
+
}, c = D(i, o);
|
|
598
|
+
if (c.length > 0) {
|
|
599
|
+
if (c.some((e) => r.has(e))) {
|
|
600
|
+
if (!a) throw Error(`Duplicate middleware name '${O(i, o)}'`);
|
|
601
|
+
for (let t of c) {
|
|
602
|
+
let n = e.findIndex((e) => e.name === t || e.aliases?.some((e) => e === t));
|
|
603
|
+
if (n === -1) continue;
|
|
604
|
+
let r = e[n];
|
|
605
|
+
if (r.step !== s.step || s.priority !== r.priority) throw Error(`"${O(r.name, r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${O(i, o)}" middleware with ${s.priority} priority in ${s.step} step.`);
|
|
606
|
+
e.splice(n, 1);
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
for (let e of c) r.add(e);
|
|
610
|
+
}
|
|
611
|
+
e.push(s);
|
|
612
|
+
},
|
|
613
|
+
addRelativeTo: (e, n) => {
|
|
614
|
+
let { name: i, override: a, aliases: o } = n, s = {
|
|
615
|
+
middleware: e,
|
|
616
|
+
...n
|
|
617
|
+
}, c = D(i, o);
|
|
618
|
+
if (c.length > 0) {
|
|
619
|
+
if (c.some((e) => r.has(e))) {
|
|
620
|
+
if (!a) throw Error(`Duplicate middleware name '${O(i, o)}'`);
|
|
621
|
+
for (let e of c) {
|
|
622
|
+
let n = t.findIndex((t) => t.name === e || t.aliases?.some((t) => t === e));
|
|
623
|
+
if (n === -1) continue;
|
|
624
|
+
let r = t[n];
|
|
625
|
+
if (r.toMiddleware !== s.toMiddleware || r.relation !== s.relation) throw Error(`"${O(r.name, r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${O(i, o)}" middleware ${s.relation} "${s.toMiddleware}" middleware.`);
|
|
626
|
+
t.splice(n, 1);
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
for (let e of c) r.add(e);
|
|
630
|
+
}
|
|
631
|
+
t.push(s);
|
|
632
|
+
},
|
|
633
|
+
clone: () => s(k()),
|
|
634
|
+
use: (e) => {
|
|
635
|
+
e.applyToStack(u);
|
|
636
|
+
},
|
|
637
|
+
remove: (e) => typeof e == "string" ? a(e) : o(e),
|
|
638
|
+
removeByTag: (n) => {
|
|
639
|
+
let i = !1, a = (e) => {
|
|
640
|
+
let { tags: t, name: a, aliases: o } = e;
|
|
641
|
+
if (t && t.includes(n)) {
|
|
642
|
+
let e = D(a, o);
|
|
643
|
+
for (let t of e) r.delete(t);
|
|
644
|
+
return i = !0, !1;
|
|
645
|
+
}
|
|
646
|
+
return !0;
|
|
647
|
+
};
|
|
648
|
+
return e = e.filter(a), t = t.filter(a), i;
|
|
649
|
+
},
|
|
650
|
+
concat: (e) => {
|
|
651
|
+
let t = s(k());
|
|
652
|
+
return t.use(e), t.identifyOnResolve(n || t.identifyOnResolve() || (e.identifyOnResolve?.() ?? !1)), t;
|
|
653
|
+
},
|
|
654
|
+
applyToStack: s,
|
|
655
|
+
identify: () => l(!0).map((e) => {
|
|
656
|
+
let t = e.step ?? e.relation + " " + e.toMiddleware;
|
|
657
|
+
return O(e.name, e.aliases) + " - " + t;
|
|
658
|
+
}),
|
|
659
|
+
identifyOnResolve(e) {
|
|
660
|
+
return typeof e == "boolean" && (n = e), n;
|
|
661
|
+
},
|
|
662
|
+
resolve: (e, t) => {
|
|
663
|
+
for (let n of l().map((e) => e.middleware).reverse()) e = n(e, t);
|
|
664
|
+
return n && console.log(u.identify()), e;
|
|
665
|
+
}
|
|
666
|
+
};
|
|
667
|
+
return u;
|
|
668
|
+
}, ze = {
|
|
669
|
+
initialize: 5,
|
|
670
|
+
serialize: 4,
|
|
671
|
+
build: 3,
|
|
672
|
+
finalizeRequest: 2,
|
|
673
|
+
deserialize: 1
|
|
674
|
+
}, Be = {
|
|
675
|
+
high: 3,
|
|
676
|
+
normal: 2,
|
|
677
|
+
low: 1
|
|
678
|
+
}, Ve = class {
|
|
679
|
+
config;
|
|
680
|
+
middlewareStack = k();
|
|
681
|
+
initConfig;
|
|
682
|
+
handlers;
|
|
683
|
+
constructor(e) {
|
|
684
|
+
this.config = e;
|
|
685
|
+
let { protocol: t, protocolSettings: n } = e;
|
|
686
|
+
n && typeof t == "function" && (e.protocol = new t(n));
|
|
687
|
+
}
|
|
688
|
+
send(e, t, n) {
|
|
689
|
+
let r = typeof t == "function" ? void 0 : t, i = typeof t == "function" ? t : n, a = r === void 0 && this.config.cacheMiddleware === !0, o;
|
|
690
|
+
if (a) {
|
|
691
|
+
this.handlers ||= /* @__PURE__ */ new WeakMap();
|
|
692
|
+
let t = this.handlers;
|
|
693
|
+
t.has(e.constructor) ? o = t.get(e.constructor) : (o = e.resolveMiddleware(this.middlewareStack, this.config, r), t.set(e.constructor, o));
|
|
694
|
+
} else delete this.handlers, o = e.resolveMiddleware(this.middlewareStack, this.config, r);
|
|
695
|
+
if (i) o(e).then((e) => i(null, e.output), (e) => i(e)).catch(() => {});
|
|
696
|
+
else return o(e).then((e) => e.output);
|
|
697
|
+
}
|
|
698
|
+
destroy() {
|
|
699
|
+
this.config?.requestHandler?.destroy?.(), delete this.handlers;
|
|
700
|
+
}
|
|
701
|
+
}, He = async (e = new Uint8Array(), t) => {
|
|
702
|
+
if (e instanceof Uint8Array) return se.mutate(e);
|
|
703
|
+
if (!e) return se.mutate(new Uint8Array());
|
|
704
|
+
let n = t.streamCollector(e);
|
|
705
|
+
return se.mutate(await n);
|
|
706
|
+
}, A = (e) => typeof e == "function" ? e() : e, Ue = (e, t, n, r, i) => ({
|
|
707
|
+
name: t,
|
|
708
|
+
namespace: e,
|
|
709
|
+
traits: n,
|
|
710
|
+
input: r,
|
|
711
|
+
output: i
|
|
712
|
+
}), We = (e) => (t, n) => async (r) => {
|
|
713
|
+
let { response: i } = await t(r), { operationSchema: a } = T(n), [, o, s, c, l, u] = a ?? [];
|
|
714
|
+
try {
|
|
715
|
+
return {
|
|
716
|
+
response: i,
|
|
717
|
+
output: await e.protocol.deserializeResponse(Ue(o, s, c, l, u), {
|
|
718
|
+
...e,
|
|
719
|
+
...n
|
|
720
|
+
}, i)
|
|
721
|
+
};
|
|
722
|
+
} catch (e) {
|
|
723
|
+
if (Object.defineProperty(e, "$response", {
|
|
724
|
+
value: i,
|
|
725
|
+
enumerable: !1,
|
|
726
|
+
writable: !1,
|
|
727
|
+
configurable: !1
|
|
728
|
+
}), !("$metadata" in e)) {
|
|
729
|
+
let t = "Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";
|
|
730
|
+
try {
|
|
731
|
+
e.message += "\n " + t;
|
|
732
|
+
} catch {
|
|
733
|
+
!n.logger || n.logger?.constructor?.name === "NoOpLogger" ? console.warn(t) : n.logger?.warn?.(t);
|
|
734
|
+
}
|
|
735
|
+
e.$responseBodyText !== void 0 && e.$response && (e.$response.body = e.$responseBodyText);
|
|
736
|
+
try {
|
|
737
|
+
if (v.isInstance(i)) {
|
|
738
|
+
let { headers: t = {} } = i, n = Object.entries(t);
|
|
739
|
+
e.$metadata = {
|
|
740
|
+
httpStatusCode: i.statusCode,
|
|
741
|
+
requestId: Ge(/^x-[\w-]+-request-?id$/, n),
|
|
742
|
+
extendedRequestId: Ge(/^x-[\w-]+-id-2$/, n),
|
|
743
|
+
cfId: Ge(/^x-[\w-]+-cf-id$/, n)
|
|
744
|
+
};
|
|
745
|
+
}
|
|
746
|
+
} catch {}
|
|
747
|
+
}
|
|
748
|
+
throw e;
|
|
749
|
+
}
|
|
750
|
+
}, Ge = (e, t) => (t.find(([t]) => t.match(e)) || [void 0, void 0])[1];
|
|
751
|
+
//#endregion
|
|
752
|
+
//#region node_modules/@smithy/querystring-parser/dist-es/index.js
|
|
753
|
+
function Ke(e) {
|
|
754
|
+
let t = {};
|
|
755
|
+
if (e = e.replace(/^\?/, ""), e) for (let n of e.split("&")) {
|
|
756
|
+
let [e, r = null] = n.split("=");
|
|
757
|
+
e = decodeURIComponent(e), r &&= decodeURIComponent(r), e in t ? Array.isArray(t[e]) ? t[e].push(r) : t[e] = [t[e], r] : t[e] = r;
|
|
758
|
+
}
|
|
759
|
+
return t;
|
|
760
|
+
}
|
|
761
|
+
//#endregion
|
|
762
|
+
//#region node_modules/@smithy/url-parser/dist-es/index.js
|
|
763
|
+
var j = (e) => {
|
|
764
|
+
if (typeof e == "string") return j(new URL(e));
|
|
765
|
+
let { hostname: t, pathname: n, port: r, protocol: i, search: a } = e, o;
|
|
766
|
+
return a && (o = Ke(a)), {
|
|
767
|
+
hostname: t,
|
|
768
|
+
port: r ? parseInt(r) : void 0,
|
|
769
|
+
protocol: i,
|
|
770
|
+
path: n,
|
|
771
|
+
query: o
|
|
772
|
+
};
|
|
773
|
+
}, qe = (e) => {
|
|
774
|
+
if (typeof e == "object") {
|
|
775
|
+
if ("url" in e) {
|
|
776
|
+
let t = j(e.url);
|
|
777
|
+
if (e.headers) {
|
|
778
|
+
t.headers = {};
|
|
779
|
+
for (let [n, r] of Object.entries(e.headers)) t.headers[n.toLowerCase()] = r.join(", ");
|
|
780
|
+
}
|
|
781
|
+
return t;
|
|
782
|
+
}
|
|
783
|
+
return e;
|
|
784
|
+
}
|
|
785
|
+
return j(e);
|
|
786
|
+
}, Je = (e) => (t, n) => async (r) => {
|
|
787
|
+
let { operationSchema: i } = T(n), [, a, o, s, c, l] = i ?? [], u = n.endpointV2 ? async () => qe(n.endpointV2) : e.endpoint, d = await e.protocol.serializeRequest(Ue(a, o, s, c, l), r.input, {
|
|
788
|
+
...e,
|
|
789
|
+
...n,
|
|
790
|
+
endpoint: u
|
|
791
|
+
});
|
|
792
|
+
return t({
|
|
793
|
+
...r,
|
|
794
|
+
request: d
|
|
795
|
+
});
|
|
796
|
+
}, Ye = {
|
|
797
|
+
name: "deserializerMiddleware",
|
|
798
|
+
step: "deserialize",
|
|
799
|
+
tags: ["DESERIALIZER"],
|
|
800
|
+
override: !0
|
|
801
|
+
}, Xe = {
|
|
802
|
+
name: "serializerMiddleware",
|
|
803
|
+
step: "serialize",
|
|
804
|
+
tags: ["SERIALIZER"],
|
|
805
|
+
override: !0
|
|
806
|
+
};
|
|
807
|
+
function Ze(e) {
|
|
808
|
+
return { applyToStack: (t) => {
|
|
809
|
+
t.add(Je(e), Xe), t.add(We(e), Ye), e.protocol.setSerdeContext(e);
|
|
810
|
+
} };
|
|
811
|
+
}
|
|
812
|
+
//#endregion
|
|
813
|
+
//#region node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js
|
|
814
|
+
var Qe = [];
|
|
815
|
+
function M(e) {
|
|
816
|
+
if (typeof e == "object") return e;
|
|
817
|
+
if (e |= 0, Qe[e]) return Qe[e];
|
|
818
|
+
let t = {}, n = 0;
|
|
819
|
+
for (let r of [
|
|
820
|
+
"httpLabel",
|
|
821
|
+
"idempotent",
|
|
822
|
+
"idempotencyToken",
|
|
823
|
+
"sensitive",
|
|
824
|
+
"httpPayload",
|
|
825
|
+
"httpResponseCode",
|
|
826
|
+
"httpQueryParams"
|
|
827
|
+
]) (e >> n++ & 1) == 1 && (t[r] = 1);
|
|
828
|
+
return Qe[e] = t;
|
|
829
|
+
}
|
|
830
|
+
//#endregion
|
|
831
|
+
//#region node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js
|
|
832
|
+
var N = {
|
|
833
|
+
it: Symbol.for("@smithy/nor-struct-it"),
|
|
834
|
+
ns: Symbol.for("@smithy/ns")
|
|
835
|
+
}, $e = [], et = {}, P = class e {
|
|
836
|
+
ref;
|
|
837
|
+
memberName;
|
|
838
|
+
static symbol = Symbol.for("@smithy/nor");
|
|
839
|
+
symbol = e.symbol;
|
|
840
|
+
name;
|
|
841
|
+
schema;
|
|
842
|
+
_isMemberSchema;
|
|
843
|
+
traits;
|
|
844
|
+
memberTraits;
|
|
845
|
+
normalizedTraits;
|
|
846
|
+
constructor(t, n) {
|
|
847
|
+
this.ref = t, this.memberName = n;
|
|
848
|
+
let r = [], i = t, a = t;
|
|
849
|
+
for (this._isMemberSchema = !1; tt(i);) r.push(i[1]), i = i[0], a = A(i), this._isMemberSchema = !0;
|
|
850
|
+
if (r.length > 0) {
|
|
851
|
+
this.memberTraits = {};
|
|
852
|
+
for (let e = r.length - 1; e >= 0; --e) {
|
|
853
|
+
let t = r[e];
|
|
854
|
+
Object.assign(this.memberTraits, M(t));
|
|
855
|
+
}
|
|
856
|
+
} else this.memberTraits = 0;
|
|
857
|
+
if (a instanceof e) {
|
|
858
|
+
let e = this.memberTraits;
|
|
859
|
+
Object.assign(this, a), this.memberTraits = Object.assign({}, e, a.getMemberTraits(), this.getMemberTraits()), this.normalizedTraits = void 0, this.memberName = n ?? a.memberName;
|
|
860
|
+
return;
|
|
861
|
+
}
|
|
862
|
+
if (this.schema = A(a), nt(this.schema) ? (this.name = `${this.schema[1]}#${this.schema[2]}`, this.traits = this.schema[3]) : (this.name = this.memberName ?? String(a), this.traits = 0), this._isMemberSchema && !n) throw Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`);
|
|
863
|
+
}
|
|
864
|
+
static [Symbol.hasInstance](e) {
|
|
865
|
+
let t = this.prototype.isPrototypeOf(e);
|
|
866
|
+
return !t && typeof e == "object" && e ? e.symbol === this.symbol : t;
|
|
867
|
+
}
|
|
868
|
+
static of(t) {
|
|
869
|
+
let n = typeof t == "function" || typeof t == "object" && !!t;
|
|
870
|
+
if (typeof t == "number") {
|
|
871
|
+
if ($e[t]) return $e[t];
|
|
872
|
+
} else if (typeof t == "string") {
|
|
873
|
+
if (et[t]) return et[t];
|
|
874
|
+
} else if (n && t[N.ns]) return t[N.ns];
|
|
875
|
+
let r = A(t);
|
|
876
|
+
if (r instanceof e) return r;
|
|
877
|
+
if (tt(r)) {
|
|
878
|
+
let [n, i] = r;
|
|
879
|
+
if (n instanceof e) return Object.assign(n.getMergedTraits(), M(i)), n;
|
|
880
|
+
throw Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(t, null, 2)}.`);
|
|
881
|
+
}
|
|
882
|
+
let i = new e(r);
|
|
883
|
+
return n ? t[N.ns] = i : typeof r == "string" ? et[r] = i : typeof r == "number" ? $e[r] = i : i;
|
|
884
|
+
}
|
|
885
|
+
getSchema() {
|
|
886
|
+
let e = this.schema;
|
|
887
|
+
return Array.isArray(e) && e[0] === 0 ? e[4] : e;
|
|
888
|
+
}
|
|
889
|
+
getName(e = !1) {
|
|
890
|
+
let { name: t } = this;
|
|
891
|
+
return !e && t && t.includes("#") ? t.split("#")[1] : t || void 0;
|
|
892
|
+
}
|
|
893
|
+
getMemberName() {
|
|
894
|
+
return this.memberName;
|
|
895
|
+
}
|
|
896
|
+
isMemberSchema() {
|
|
897
|
+
return this._isMemberSchema;
|
|
898
|
+
}
|
|
899
|
+
isListSchema() {
|
|
900
|
+
let e = this.getSchema();
|
|
901
|
+
return typeof e == "number" ? e >= 64 && e < 128 : e[0] === 1;
|
|
902
|
+
}
|
|
903
|
+
isMapSchema() {
|
|
904
|
+
let e = this.getSchema();
|
|
905
|
+
return typeof e == "number" ? e >= 128 && e <= 255 : e[0] === 2;
|
|
906
|
+
}
|
|
907
|
+
isStructSchema() {
|
|
908
|
+
let e = this.getSchema();
|
|
909
|
+
if (typeof e != "object") return !1;
|
|
910
|
+
let t = e[0];
|
|
911
|
+
return t === 3 || t === -3 || t === 4;
|
|
912
|
+
}
|
|
913
|
+
isUnionSchema() {
|
|
914
|
+
let e = this.getSchema();
|
|
915
|
+
return typeof e == "object" ? e[0] === 4 : !1;
|
|
916
|
+
}
|
|
917
|
+
isBlobSchema() {
|
|
918
|
+
let e = this.getSchema();
|
|
919
|
+
return e === 21 || e === 42;
|
|
920
|
+
}
|
|
921
|
+
isTimestampSchema() {
|
|
922
|
+
let e = this.getSchema();
|
|
923
|
+
return typeof e == "number" && e >= 4 && e <= 7;
|
|
924
|
+
}
|
|
925
|
+
isUnitSchema() {
|
|
926
|
+
return this.getSchema() === "unit";
|
|
927
|
+
}
|
|
928
|
+
isDocumentSchema() {
|
|
929
|
+
return this.getSchema() === 15;
|
|
930
|
+
}
|
|
931
|
+
isStringSchema() {
|
|
932
|
+
return this.getSchema() === 0;
|
|
933
|
+
}
|
|
934
|
+
isBooleanSchema() {
|
|
935
|
+
return this.getSchema() === 2;
|
|
936
|
+
}
|
|
937
|
+
isNumericSchema() {
|
|
938
|
+
return this.getSchema() === 1;
|
|
939
|
+
}
|
|
940
|
+
isBigIntegerSchema() {
|
|
941
|
+
return this.getSchema() === 17;
|
|
942
|
+
}
|
|
943
|
+
isBigDecimalSchema() {
|
|
944
|
+
return this.getSchema() === 19;
|
|
945
|
+
}
|
|
946
|
+
isStreaming() {
|
|
947
|
+
let { streaming: e } = this.getMergedTraits();
|
|
948
|
+
return !!e || this.getSchema() === 42;
|
|
949
|
+
}
|
|
950
|
+
isIdempotencyToken() {
|
|
951
|
+
return !!this.getMergedTraits().idempotencyToken;
|
|
952
|
+
}
|
|
953
|
+
getMergedTraits() {
|
|
954
|
+
return this.normalizedTraits ??= {
|
|
955
|
+
...this.getOwnTraits(),
|
|
956
|
+
...this.getMemberTraits()
|
|
957
|
+
};
|
|
958
|
+
}
|
|
959
|
+
getMemberTraits() {
|
|
960
|
+
return M(this.memberTraits);
|
|
961
|
+
}
|
|
962
|
+
getOwnTraits() {
|
|
963
|
+
return M(this.traits);
|
|
964
|
+
}
|
|
965
|
+
getKeySchema() {
|
|
966
|
+
let [e, t] = [this.isDocumentSchema(), this.isMapSchema()];
|
|
967
|
+
if (!e && !t) throw Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);
|
|
968
|
+
let n = this.getSchema();
|
|
969
|
+
return F([e ? 15 : n[4] ?? 0, 0], "key");
|
|
970
|
+
}
|
|
971
|
+
getValueSchema() {
|
|
972
|
+
let e = this.getSchema(), [t, n, r] = [
|
|
973
|
+
this.isDocumentSchema(),
|
|
974
|
+
this.isMapSchema(),
|
|
975
|
+
this.isListSchema()
|
|
976
|
+
], i = typeof e == "number" ? 63 & e : e && typeof e == "object" && (n || r) ? e[3 + e[0]] : t ? 15 : void 0;
|
|
977
|
+
if (i != null) return F([i, 0], n ? "value" : "member");
|
|
978
|
+
throw Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`);
|
|
979
|
+
}
|
|
980
|
+
getMemberSchema(e) {
|
|
981
|
+
let t = this.getSchema();
|
|
982
|
+
if (this.isStructSchema() && t[4].includes(e)) {
|
|
983
|
+
let n = t[4].indexOf(e), r = t[5][n];
|
|
984
|
+
return F(tt(r) ? r : [r, 0], e);
|
|
985
|
+
}
|
|
986
|
+
if (this.isDocumentSchema()) return F([15, 0], e);
|
|
987
|
+
throw Error(`@smithy/core/schema - ${this.getName(!0)} has no member=${e}.`);
|
|
988
|
+
}
|
|
989
|
+
getMemberSchemas() {
|
|
990
|
+
let e = {};
|
|
991
|
+
try {
|
|
992
|
+
for (let [t, n] of this.structIterator()) e[t] = n;
|
|
993
|
+
} catch {}
|
|
994
|
+
return e;
|
|
995
|
+
}
|
|
996
|
+
getEventStreamMember() {
|
|
997
|
+
if (this.isStructSchema()) {
|
|
998
|
+
for (let [e, t] of this.structIterator()) if (t.isStreaming() && t.isStructSchema()) return e;
|
|
999
|
+
}
|
|
1000
|
+
return "";
|
|
1001
|
+
}
|
|
1002
|
+
*structIterator() {
|
|
1003
|
+
if (this.isUnitSchema()) return;
|
|
1004
|
+
if (!this.isStructSchema()) throw Error("@smithy/core/schema - cannot iterate non-struct schema.");
|
|
1005
|
+
let e = this.getSchema(), t = e[4].length, n = e[N.it];
|
|
1006
|
+
if (n && t === n.length) {
|
|
1007
|
+
yield* n;
|
|
1008
|
+
return;
|
|
1009
|
+
}
|
|
1010
|
+
n = Array(t);
|
|
1011
|
+
for (let r = 0; r < t; ++r) {
|
|
1012
|
+
let t = e[4][r], i = F([e[5][r], 0], t);
|
|
1013
|
+
yield n[r] = [t, i];
|
|
1014
|
+
}
|
|
1015
|
+
e[N.it] = n;
|
|
1016
|
+
}
|
|
1017
|
+
};
|
|
1018
|
+
function F(e, t) {
|
|
1019
|
+
return e instanceof P ? Object.assign(e, {
|
|
1020
|
+
memberName: t,
|
|
1021
|
+
_isMemberSchema: !0
|
|
1022
|
+
}) : new P(e, t);
|
|
1023
|
+
}
|
|
1024
|
+
var tt = (e) => Array.isArray(e) && e.length === 2, nt = (e) => Array.isArray(e) && e.length >= 5, I = class e {
|
|
1025
|
+
namespace;
|
|
1026
|
+
schemas;
|
|
1027
|
+
exceptions;
|
|
1028
|
+
static registries = /* @__PURE__ */ new Map();
|
|
1029
|
+
constructor(e, t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map()) {
|
|
1030
|
+
this.namespace = e, this.schemas = t, this.exceptions = n;
|
|
1031
|
+
}
|
|
1032
|
+
static for(t) {
|
|
1033
|
+
return e.registries.has(t) || e.registries.set(t, new e(t)), e.registries.get(t);
|
|
1034
|
+
}
|
|
1035
|
+
copyFrom(e) {
|
|
1036
|
+
let { schemas: t, exceptions: n } = this;
|
|
1037
|
+
for (let [n, r] of e.schemas) t.has(n) || t.set(n, r);
|
|
1038
|
+
for (let [t, r] of e.exceptions) n.has(t) || n.set(t, r);
|
|
1039
|
+
}
|
|
1040
|
+
register(t, n) {
|
|
1041
|
+
let r = this.normalizeShapeId(t);
|
|
1042
|
+
for (let t of [this, e.for(r.split("#")[0])]) t.schemas.set(r, n);
|
|
1043
|
+
}
|
|
1044
|
+
getSchema(e) {
|
|
1045
|
+
let t = this.normalizeShapeId(e);
|
|
1046
|
+
if (!this.schemas.has(t)) throw Error(`@smithy/core/schema - schema not found for ${t}`);
|
|
1047
|
+
return this.schemas.get(t);
|
|
1048
|
+
}
|
|
1049
|
+
registerError(t, n) {
|
|
1050
|
+
let r = t, i = r[1];
|
|
1051
|
+
for (let t of [this, e.for(i)]) t.schemas.set(i + "#" + r[2], r), t.exceptions.set(r, n);
|
|
1052
|
+
}
|
|
1053
|
+
getErrorCtor(t) {
|
|
1054
|
+
let n = t;
|
|
1055
|
+
return this.exceptions.has(n) ? this.exceptions.get(n) : e.for(n[1]).exceptions.get(n);
|
|
1056
|
+
}
|
|
1057
|
+
getBaseException() {
|
|
1058
|
+
for (let e of this.exceptions.keys()) if (Array.isArray(e)) {
|
|
1059
|
+
let [, t, n] = e, r = t + "#" + n;
|
|
1060
|
+
if (r.startsWith("smithy.ts.sdk.synthetic.") && r.endsWith("ServiceException")) return e;
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
find(e) {
|
|
1064
|
+
return [...this.schemas.values()].find(e);
|
|
1065
|
+
}
|
|
1066
|
+
clear() {
|
|
1067
|
+
this.schemas.clear(), this.exceptions.clear();
|
|
1068
|
+
}
|
|
1069
|
+
normalizeShapeId(e) {
|
|
1070
|
+
return e.includes("#") ? e : this.namespace + "#" + e;
|
|
1071
|
+
}
|
|
1072
|
+
}, rt = (e) => {
|
|
1073
|
+
if (e != null) {
|
|
1074
|
+
if (typeof e == "string") {
|
|
1075
|
+
let t = parseFloat(e);
|
|
1076
|
+
if (!Number.isNaN(t)) return String(t) !== String(e) && _t.warn(gt(`Expected number but observed string: ${e}`)), t;
|
|
1077
|
+
}
|
|
1078
|
+
if (typeof e == "number") return e;
|
|
1079
|
+
throw TypeError(`Expected number, got ${typeof e}: ${e}`);
|
|
1080
|
+
}
|
|
1081
|
+
}, it = Math.ceil(2 ** 127 * (2 - 2 ** -23)), at = (e) => {
|
|
1082
|
+
let t = rt(e);
|
|
1083
|
+
if (t !== void 0 && !Number.isNaN(t) && t !== Infinity && t !== -Infinity && Math.abs(t) > it) throw TypeError(`Expected 32-bit float, got ${e}`);
|
|
1084
|
+
return t;
|
|
1085
|
+
}, ot = (e) => {
|
|
1086
|
+
if (e != null) {
|
|
1087
|
+
if (Number.isInteger(e) && !Number.isNaN(e)) return e;
|
|
1088
|
+
throw TypeError(`Expected integer, got ${typeof e}: ${e}`);
|
|
1089
|
+
}
|
|
1090
|
+
}, st = (e) => lt(e, 16), ct = (e) => lt(e, 8), lt = (e, t) => {
|
|
1091
|
+
let n = ot(e);
|
|
1092
|
+
if (n !== void 0 && ut(n, t) !== n) throw TypeError(`Expected ${t}-bit integer, got ${e}`);
|
|
1093
|
+
return n;
|
|
1094
|
+
}, ut = (e, t) => {
|
|
1095
|
+
switch (t) {
|
|
1096
|
+
case 32: return Int32Array.of(e)[0];
|
|
1097
|
+
case 16: return Int16Array.of(e)[0];
|
|
1098
|
+
case 8: return Int8Array.of(e)[0];
|
|
1099
|
+
}
|
|
1100
|
+
}, dt = (e) => rt(typeof e == "string" ? L(e) : e), ft = (e) => at(typeof e == "string" ? L(e) : e), pt = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g, L = (e) => {
|
|
1101
|
+
let t = e.match(pt);
|
|
1102
|
+
if (t === null || t[0].length !== e.length) throw TypeError("Expected real number, got implicit NaN");
|
|
1103
|
+
return parseFloat(e);
|
|
1104
|
+
}, mt = (e) => st(typeof e == "string" ? L(e) : e), ht = (e) => ct(typeof e == "string" ? L(e) : e), gt = (e) => String(TypeError(e).stack || e).split("\n").slice(0, 5).filter((e) => !e.includes("stackTraceWarning")).join("\n"), _t = { warn: console.warn }, vt = [
|
|
1105
|
+
"Sun",
|
|
1106
|
+
"Mon",
|
|
1107
|
+
"Tue",
|
|
1108
|
+
"Wed",
|
|
1109
|
+
"Thu",
|
|
1110
|
+
"Fri",
|
|
1111
|
+
"Sat"
|
|
1112
|
+
], yt = [
|
|
1113
|
+
"Jan",
|
|
1114
|
+
"Feb",
|
|
1115
|
+
"Mar",
|
|
1116
|
+
"Apr",
|
|
1117
|
+
"May",
|
|
1118
|
+
"Jun",
|
|
1119
|
+
"Jul",
|
|
1120
|
+
"Aug",
|
|
1121
|
+
"Sep",
|
|
1122
|
+
"Oct",
|
|
1123
|
+
"Nov",
|
|
1124
|
+
"Dec"
|
|
1125
|
+
];
|
|
1126
|
+
function bt(e) {
|
|
1127
|
+
let t = e.getUTCFullYear(), n = e.getUTCMonth(), r = e.getUTCDay(), i = e.getUTCDate(), a = e.getUTCHours(), o = e.getUTCMinutes(), s = e.getUTCSeconds(), c = i < 10 ? `0${i}` : `${i}`, l = a < 10 ? `0${a}` : `${a}`, u = o < 10 ? `0${o}` : `${o}`, d = s < 10 ? `0${s}` : `${s}`;
|
|
1128
|
+
return `${vt[r]}, ${c} ${yt[n]} ${t} ${l}:${u}:${d} GMT`;
|
|
1129
|
+
}
|
|
1130
|
+
var xt = /* @__PURE__ */ new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/), St = (e) => {
|
|
1131
|
+
if (e == null) return;
|
|
1132
|
+
if (typeof e != "string") throw TypeError("RFC-3339 date-times must be expressed as strings");
|
|
1133
|
+
let t = xt.exec(e);
|
|
1134
|
+
if (!t) throw TypeError("Invalid RFC-3339 date-time value");
|
|
1135
|
+
let [n, r, i, a, o, s, c, l, u] = t, d = Ot(mt(z(r)), R(i, "month", 1, 12), R(a, "day", 1, 31), {
|
|
1136
|
+
hours: o,
|
|
1137
|
+
minutes: s,
|
|
1138
|
+
seconds: c,
|
|
1139
|
+
fractionalMilliseconds: l
|
|
1140
|
+
});
|
|
1141
|
+
return u.toUpperCase() != "Z" && d.setTime(d.getTime() - Lt(u)), d;
|
|
1142
|
+
}, Ct = /* @__PURE__ */ new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/), wt = /* @__PURE__ */ new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/), Tt = /* @__PURE__ */ new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/), Et = (e) => {
|
|
1143
|
+
if (e == null) return;
|
|
1144
|
+
if (typeof e != "string") throw TypeError("RFC-7231 date-times must be expressed as strings");
|
|
1145
|
+
let t = Ct.exec(e);
|
|
1146
|
+
if (t) {
|
|
1147
|
+
let [e, n, r, i, a, o, s, c] = t;
|
|
1148
|
+
return Ot(mt(z(i)), Mt(r), R(n, "day", 1, 31), {
|
|
1149
|
+
hours: a,
|
|
1150
|
+
minutes: o,
|
|
1151
|
+
seconds: s,
|
|
1152
|
+
fractionalMilliseconds: c
|
|
1153
|
+
});
|
|
1154
|
+
}
|
|
1155
|
+
if (t = wt.exec(e), t) {
|
|
1156
|
+
let [e, n, r, i, a, o, s, c] = t;
|
|
1157
|
+
return jt(Ot(kt(i), Mt(r), R(n, "day", 1, 31), {
|
|
1158
|
+
hours: a,
|
|
1159
|
+
minutes: o,
|
|
1160
|
+
seconds: s,
|
|
1161
|
+
fractionalMilliseconds: c
|
|
1162
|
+
}));
|
|
1163
|
+
}
|
|
1164
|
+
if (t = Tt.exec(e), t) {
|
|
1165
|
+
let [e, n, r, i, a, o, s, c] = t;
|
|
1166
|
+
return Ot(mt(z(c)), Mt(n), R(r.trimLeft(), "day", 1, 31), {
|
|
1167
|
+
hours: i,
|
|
1168
|
+
minutes: a,
|
|
1169
|
+
seconds: o,
|
|
1170
|
+
fractionalMilliseconds: s
|
|
1171
|
+
});
|
|
1172
|
+
}
|
|
1173
|
+
throw TypeError("Invalid RFC-7231 date-time value");
|
|
1174
|
+
}, Dt = (e) => {
|
|
1175
|
+
if (e == null) return;
|
|
1176
|
+
let t;
|
|
1177
|
+
if (typeof e == "number") t = e;
|
|
1178
|
+
else if (typeof e == "string") t = dt(e);
|
|
1179
|
+
else if (typeof e == "object" && e.tag === 1) t = e.value;
|
|
1180
|
+
else throw TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");
|
|
1181
|
+
if (Number.isNaN(t) || t === Infinity || t === -Infinity) throw TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");
|
|
1182
|
+
return new Date(Math.round(t * 1e3));
|
|
1183
|
+
}, Ot = (e, t, n, r) => {
|
|
1184
|
+
let i = t - 1;
|
|
1185
|
+
return Pt(e, i, n), new Date(Date.UTC(e, i, n, R(r.hours, "hour", 0, 23), R(r.minutes, "minute", 0, 59), R(r.seconds, "seconds", 0, 60), It(r.fractionalMilliseconds)));
|
|
1186
|
+
}, kt = (e) => {
|
|
1187
|
+
let t = (/* @__PURE__ */ new Date()).getUTCFullYear(), n = Math.floor(t / 100) * 100 + mt(z(e));
|
|
1188
|
+
return n < t ? n + 100 : n;
|
|
1189
|
+
}, At = 50 * 365 * 24 * 60 * 60 * 1e3, jt = (e) => e.getTime() - (/* @__PURE__ */ new Date()).getTime() > At ? new Date(Date.UTC(e.getUTCFullYear() - 100, e.getUTCMonth(), e.getUTCDate(), e.getUTCHours(), e.getUTCMinutes(), e.getUTCSeconds(), e.getUTCMilliseconds())) : e, Mt = (e) => {
|
|
1190
|
+
let t = yt.indexOf(e);
|
|
1191
|
+
if (t < 0) throw TypeError(`Invalid month: ${e}`);
|
|
1192
|
+
return t + 1;
|
|
1193
|
+
}, Nt = [
|
|
1194
|
+
31,
|
|
1195
|
+
28,
|
|
1196
|
+
31,
|
|
1197
|
+
30,
|
|
1198
|
+
31,
|
|
1199
|
+
30,
|
|
1200
|
+
31,
|
|
1201
|
+
31,
|
|
1202
|
+
30,
|
|
1203
|
+
31,
|
|
1204
|
+
30,
|
|
1205
|
+
31
|
|
1206
|
+
], Pt = (e, t, n) => {
|
|
1207
|
+
let r = Nt[t];
|
|
1208
|
+
if (t === 1 && Ft(e) && (r = 29), n > r) throw TypeError(`Invalid day for ${yt[t]} in ${e}: ${n}`);
|
|
1209
|
+
}, Ft = (e) => e % 4 == 0 && (e % 100 != 0 || e % 400 == 0), R = (e, t, n, r) => {
|
|
1210
|
+
let i = ht(z(e));
|
|
1211
|
+
if (i < n || i > r) throw TypeError(`${t} must be between ${n} and ${r}, inclusive`);
|
|
1212
|
+
return i;
|
|
1213
|
+
}, It = (e) => e == null ? 0 : ft("0." + e) * 1e3, Lt = (e) => {
|
|
1214
|
+
let t = e[0], n = 1;
|
|
1215
|
+
if (t == "+") n = 1;
|
|
1216
|
+
else if (t == "-") n = -1;
|
|
1217
|
+
else throw TypeError(`Offset direction, ${t}, must be "+" or "-"`);
|
|
1218
|
+
let r = Number(e.substring(1, 3)), i = Number(e.substring(4, 6));
|
|
1219
|
+
return n * (r * 60 + i) * 60 * 1e3;
|
|
1220
|
+
}, z = (e) => {
|
|
1221
|
+
let t = 0;
|
|
1222
|
+
for (; t < e.length - 1 && e.charAt(t) === "0";) t++;
|
|
1223
|
+
return t === 0 ? e : e.slice(t);
|
|
1224
|
+
}, Rt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), B = Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0")), zt = () => {
|
|
1225
|
+
if (Rt) return Rt();
|
|
1226
|
+
let e = new Uint8Array(16);
|
|
1227
|
+
return crypto.getRandomValues(e), e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, B[e[0]] + B[e[1]] + B[e[2]] + B[e[3]] + "-" + B[e[4]] + B[e[5]] + "-" + B[e[6]] + B[e[7]] + "-" + B[e[8]] + B[e[9]] + "-" + B[e[10]] + B[e[11]] + B[e[12]] + B[e[13]] + B[e[14]] + B[e[15]];
|
|
1228
|
+
}, V = function(e) {
|
|
1229
|
+
return Object.assign(new String(e), {
|
|
1230
|
+
deserializeJSON() {
|
|
1231
|
+
return JSON.parse(String(e));
|
|
1232
|
+
},
|
|
1233
|
+
toString() {
|
|
1234
|
+
return String(e);
|
|
1235
|
+
},
|
|
1236
|
+
toJSON() {
|
|
1237
|
+
return String(e);
|
|
1238
|
+
}
|
|
1239
|
+
});
|
|
1240
|
+
};
|
|
1241
|
+
V.from = (e) => e && typeof e == "object" && (e instanceof V || "deserializeJSON" in e) ? e : typeof e == "string" || Object.getPrototypeOf(e) === String.prototype ? V(String(e)) : V(JSON.stringify(e)), V.fromObject = V.from;
|
|
1242
|
+
//#endregion
|
|
1243
|
+
//#region node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js
|
|
1244
|
+
var Bt = /^-?\d*(\.\d+)?$/, Vt = class e {
|
|
1245
|
+
string;
|
|
1246
|
+
type;
|
|
1247
|
+
constructor(e, t) {
|
|
1248
|
+
if (this.string = e, this.type = t, !Bt.test(e)) throw Error("@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point \".\", and an optional negation prefix \"-\".");
|
|
1249
|
+
}
|
|
1250
|
+
toString() {
|
|
1251
|
+
return this.string;
|
|
1252
|
+
}
|
|
1253
|
+
static [Symbol.hasInstance](t) {
|
|
1254
|
+
if (!t || typeof t != "object") return !1;
|
|
1255
|
+
let n = t;
|
|
1256
|
+
return e.prototype.isPrototypeOf(t) || n.type === "bigDecimal" && Bt.test(n.string);
|
|
1257
|
+
}
|
|
1258
|
+
}, Ht = class {
|
|
1259
|
+
serdeContext;
|
|
1260
|
+
setSerdeContext(e) {
|
|
1261
|
+
this.serdeContext = e;
|
|
1262
|
+
}
|
|
1263
|
+
}, Ut = class extends Ht {
|
|
1264
|
+
options;
|
|
1265
|
+
compositeErrorRegistry;
|
|
1266
|
+
constructor(e) {
|
|
1267
|
+
super(), this.options = e, this.compositeErrorRegistry = I.for(e.defaultNamespace);
|
|
1268
|
+
for (let t of e.errorTypeRegistries ?? []) this.compositeErrorRegistry.copyFrom(t);
|
|
1269
|
+
}
|
|
1270
|
+
getRequestType() {
|
|
1271
|
+
return _;
|
|
1272
|
+
}
|
|
1273
|
+
getResponseType() {
|
|
1274
|
+
return v;
|
|
1275
|
+
}
|
|
1276
|
+
setSerdeContext(e) {
|
|
1277
|
+
this.serdeContext = e, this.serializer.setSerdeContext(e), this.deserializer.setSerdeContext(e), this.getPayloadCodec() && this.getPayloadCodec().setSerdeContext(e);
|
|
1278
|
+
}
|
|
1279
|
+
updateServiceEndpoint(e, t) {
|
|
1280
|
+
if ("url" in t) {
|
|
1281
|
+
e.protocol = t.url.protocol, e.hostname = t.url.hostname, e.port = t.url.port ? Number(t.url.port) : void 0, e.path = t.url.pathname, e.fragment = t.url.hash || void 0, e.username = t.url.username || void 0, e.password = t.url.password || void 0, e.query ||= {};
|
|
1282
|
+
for (let [n, r] of t.url.searchParams.entries()) e.query[n] = r;
|
|
1283
|
+
if (t.headers) for (let [n, r] of Object.entries(t.headers)) e.headers[n] = r.join(", ");
|
|
1284
|
+
return e;
|
|
1285
|
+
} else {
|
|
1286
|
+
if (e.protocol = t.protocol, e.hostname = t.hostname, e.port = t.port ? Number(t.port) : void 0, e.path = t.path, e.query = { ...t.query }, t.headers) for (let [n, r] of Object.entries(t.headers)) e.headers[n] = r;
|
|
1287
|
+
return e;
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
setHostPrefix(e, t, n) {
|
|
1291
|
+
if (this.serdeContext?.disableHostPrefix) return;
|
|
1292
|
+
let r = P.of(t.input), i = M(t.traits ?? {});
|
|
1293
|
+
if (i.endpoint) {
|
|
1294
|
+
let t = i.endpoint?.[0];
|
|
1295
|
+
if (typeof t == "string") {
|
|
1296
|
+
let i = [...r.structIterator()].filter(([, e]) => e.getMergedTraits().hostLabel);
|
|
1297
|
+
for (let [e] of i) {
|
|
1298
|
+
let r = n[e];
|
|
1299
|
+
if (typeof r != "string") throw Error(`@smithy/core/schema - ${e} in input must be a string as hostLabel.`);
|
|
1300
|
+
t = t.replace(`{${e}}`, r);
|
|
1301
|
+
}
|
|
1302
|
+
e.hostname = t + e.hostname;
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
1306
|
+
deserializeMetadata(e) {
|
|
1307
|
+
return {
|
|
1308
|
+
httpStatusCode: e.statusCode,
|
|
1309
|
+
requestId: e.headers["x-amzn-requestid"] ?? e.headers["x-amzn-request-id"] ?? e.headers["x-amz-request-id"],
|
|
1310
|
+
extendedRequestId: e.headers["x-amz-id-2"],
|
|
1311
|
+
cfId: e.headers["x-amz-cf-id"]
|
|
1312
|
+
};
|
|
1313
|
+
}
|
|
1314
|
+
async serializeEventStream({ eventStream: e, requestSchema: t, initialRequest: n }) {
|
|
1315
|
+
return (await this.loadEventStreamCapability()).serializeEventStream({
|
|
1316
|
+
eventStream: e,
|
|
1317
|
+
requestSchema: t,
|
|
1318
|
+
initialRequest: n
|
|
1319
|
+
});
|
|
1320
|
+
}
|
|
1321
|
+
async deserializeEventStream({ response: e, responseSchema: t, initialResponseContainer: n }) {
|
|
1322
|
+
return (await this.loadEventStreamCapability()).deserializeEventStream({
|
|
1323
|
+
response: e,
|
|
1324
|
+
responseSchema: t,
|
|
1325
|
+
initialResponseContainer: n
|
|
1326
|
+
});
|
|
1327
|
+
}
|
|
1328
|
+
async loadEventStreamCapability() {
|
|
1329
|
+
let { EventStreamSerde: e } = await import("./event-streams-tx5d1M9G.mjs");
|
|
1330
|
+
return new e({
|
|
1331
|
+
marshaller: this.getEventStreamMarshaller(),
|
|
1332
|
+
serializer: this.serializer,
|
|
1333
|
+
deserializer: this.deserializer,
|
|
1334
|
+
serdeContext: this.serdeContext,
|
|
1335
|
+
defaultContentType: this.getDefaultContentType()
|
|
1336
|
+
});
|
|
1337
|
+
}
|
|
1338
|
+
getDefaultContentType() {
|
|
1339
|
+
throw Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`);
|
|
1340
|
+
}
|
|
1341
|
+
async deserializeHttpMessage(e, t, n, r, i) {
|
|
1342
|
+
return [];
|
|
1343
|
+
}
|
|
1344
|
+
getEventStreamMarshaller() {
|
|
1345
|
+
let e = this.serdeContext;
|
|
1346
|
+
if (!e.eventStreamMarshaller) throw Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");
|
|
1347
|
+
return e.eventStreamMarshaller;
|
|
1348
|
+
}
|
|
1349
|
+
};
|
|
1350
|
+
//#endregion
|
|
1351
|
+
//#region node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js
|
|
1352
|
+
function Wt(e, t) {
|
|
1353
|
+
if (t.timestampFormat.useTrait && e.isTimestampSchema() && (e.getSchema() === 5 || e.getSchema() === 6 || e.getSchema() === 7)) return e.getSchema();
|
|
1354
|
+
let { httpLabel: n, httpPrefixHeaders: r, httpHeader: i, httpQuery: a } = e.getMergedTraits();
|
|
1355
|
+
return (t.httpBindings ? typeof r == "string" || i ? 6 : a || n ? 5 : void 0 : void 0) ?? t.timestampFormat.default;
|
|
1356
|
+
}
|
|
1357
|
+
//#endregion
|
|
1358
|
+
//#region node_modules/@smithy/smithy-client/dist-es/schemaLogFilter.js
|
|
1359
|
+
var Gt = "***SensitiveInformation***";
|
|
1360
|
+
function Kt(e, t) {
|
|
1361
|
+
if (t == null) return t;
|
|
1362
|
+
let n = P.of(e);
|
|
1363
|
+
if (n.getMergedTraits().sensitive) return Gt;
|
|
1364
|
+
if (n.isListSchema()) {
|
|
1365
|
+
if (n.getValueSchema().getMergedTraits().sensitive) return Gt;
|
|
1366
|
+
} else if (n.isMapSchema()) {
|
|
1367
|
+
if (n.getKeySchema().getMergedTraits().sensitive || n.getValueSchema().getMergedTraits().sensitive) return Gt;
|
|
1368
|
+
} else if (n.isStructSchema() && typeof t == "object") {
|
|
1369
|
+
let e = t, r = {};
|
|
1370
|
+
for (let [t, i] of n.structIterator()) e[t] != null && (r[t] = Kt(i, e[t]));
|
|
1371
|
+
return r;
|
|
1372
|
+
}
|
|
1373
|
+
return t;
|
|
1374
|
+
}
|
|
1375
|
+
//#endregion
|
|
1376
|
+
//#region node_modules/@smithy/smithy-client/dist-es/command.js
|
|
1377
|
+
var qt = class {
|
|
1378
|
+
middlewareStack = k();
|
|
1379
|
+
schema;
|
|
1380
|
+
static classBuilder() {
|
|
1381
|
+
return new Jt();
|
|
1382
|
+
}
|
|
1383
|
+
resolveMiddlewareWithContext(e, t, n, { middlewareFn: r, clientName: i, commandName: a, inputFilterSensitiveLog: o, outputFilterSensitiveLog: s, smithyContext: c, additionalContext: l, CommandCtor: u }) {
|
|
1384
|
+
for (let i of r.bind(this)(u, e, t, n)) this.middlewareStack.use(i);
|
|
1385
|
+
let d = e.concat(this.middlewareStack), { logger: f } = t, p = {
|
|
1386
|
+
logger: f,
|
|
1387
|
+
clientName: i,
|
|
1388
|
+
commandName: a,
|
|
1389
|
+
inputFilterSensitiveLog: o,
|
|
1390
|
+
outputFilterSensitiveLog: s,
|
|
1391
|
+
[g]: {
|
|
1392
|
+
commandInstance: this,
|
|
1393
|
+
...c
|
|
1394
|
+
},
|
|
1395
|
+
...l
|
|
1396
|
+
}, { requestHandler: m } = t;
|
|
1397
|
+
return d.resolve((e) => m.handle(e.request, n || {}), p);
|
|
1398
|
+
}
|
|
1399
|
+
}, Jt = class {
|
|
1400
|
+
_init = () => {};
|
|
1401
|
+
_ep = {};
|
|
1402
|
+
_middlewareFn = () => [];
|
|
1403
|
+
_commandName = "";
|
|
1404
|
+
_clientName = "";
|
|
1405
|
+
_additionalContext = {};
|
|
1406
|
+
_smithyContext = {};
|
|
1407
|
+
_inputFilterSensitiveLog = void 0;
|
|
1408
|
+
_outputFilterSensitiveLog = void 0;
|
|
1409
|
+
_serializer = null;
|
|
1410
|
+
_deserializer = null;
|
|
1411
|
+
_operationSchema;
|
|
1412
|
+
init(e) {
|
|
1413
|
+
this._init = e;
|
|
1414
|
+
}
|
|
1415
|
+
ep(e) {
|
|
1416
|
+
return this._ep = e, this;
|
|
1417
|
+
}
|
|
1418
|
+
m(e) {
|
|
1419
|
+
return this._middlewareFn = e, this;
|
|
1420
|
+
}
|
|
1421
|
+
s(e, t, n = {}) {
|
|
1422
|
+
return this._smithyContext = {
|
|
1423
|
+
service: e,
|
|
1424
|
+
operation: t,
|
|
1425
|
+
...n
|
|
1426
|
+
}, this;
|
|
1427
|
+
}
|
|
1428
|
+
c(e = {}) {
|
|
1429
|
+
return this._additionalContext = e, this;
|
|
1430
|
+
}
|
|
1431
|
+
n(e, t) {
|
|
1432
|
+
return this._clientName = e, this._commandName = t, this;
|
|
1433
|
+
}
|
|
1434
|
+
f(e = (e) => e, t = (e) => e) {
|
|
1435
|
+
return this._inputFilterSensitiveLog = e, this._outputFilterSensitiveLog = t, this;
|
|
1436
|
+
}
|
|
1437
|
+
ser(e) {
|
|
1438
|
+
return this._serializer = e, this;
|
|
1439
|
+
}
|
|
1440
|
+
de(e) {
|
|
1441
|
+
return this._deserializer = e, this;
|
|
1442
|
+
}
|
|
1443
|
+
sc(e) {
|
|
1444
|
+
return this._operationSchema = e, this._smithyContext.operationSchema = e, this;
|
|
1445
|
+
}
|
|
1446
|
+
build() {
|
|
1447
|
+
let e = this, t;
|
|
1448
|
+
return t = class extends qt {
|
|
1449
|
+
input;
|
|
1450
|
+
static getEndpointParameterInstructions() {
|
|
1451
|
+
return e._ep;
|
|
1452
|
+
}
|
|
1453
|
+
constructor(...[t]) {
|
|
1454
|
+
super(), this.input = t ?? {}, e._init(this), this.schema = e._operationSchema;
|
|
1455
|
+
}
|
|
1456
|
+
resolveMiddleware(n, r, i) {
|
|
1457
|
+
let a = e._operationSchema, o = a?.[4] ?? a?.input, s = a?.[5] ?? a?.output;
|
|
1458
|
+
return this.resolveMiddlewareWithContext(n, r, i, {
|
|
1459
|
+
CommandCtor: t,
|
|
1460
|
+
middlewareFn: e._middlewareFn,
|
|
1461
|
+
clientName: e._clientName,
|
|
1462
|
+
commandName: e._commandName,
|
|
1463
|
+
inputFilterSensitiveLog: e._inputFilterSensitiveLog ?? (a ? Kt.bind(null, o) : (e) => e),
|
|
1464
|
+
outputFilterSensitiveLog: e._outputFilterSensitiveLog ?? (a ? Kt.bind(null, s) : (e) => e),
|
|
1465
|
+
smithyContext: e._smithyContext,
|
|
1466
|
+
additionalContext: e._additionalContext
|
|
1467
|
+
});
|
|
1468
|
+
}
|
|
1469
|
+
serialize = e._serializer;
|
|
1470
|
+
deserialize = e._deserializer;
|
|
1471
|
+
};
|
|
1472
|
+
}
|
|
1473
|
+
}, Yt = class e extends Error {
|
|
1474
|
+
$fault;
|
|
1475
|
+
$response;
|
|
1476
|
+
$retryable;
|
|
1477
|
+
$metadata;
|
|
1478
|
+
constructor(e) {
|
|
1479
|
+
super(e.message), Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype), this.name = e.name, this.$fault = e.$fault, this.$metadata = e.$metadata;
|
|
1480
|
+
}
|
|
1481
|
+
static isInstance(t) {
|
|
1482
|
+
if (!t) return !1;
|
|
1483
|
+
let n = t;
|
|
1484
|
+
return e.prototype.isPrototypeOf(n) || !!n.$fault && !!n.$metadata && (n.$fault === "client" || n.$fault === "server");
|
|
1485
|
+
}
|
|
1486
|
+
static [Symbol.hasInstance](t) {
|
|
1487
|
+
if (!t) return !1;
|
|
1488
|
+
let n = t;
|
|
1489
|
+
return this === e ? e.isInstance(t) : e.isInstance(t) ? n.name && this.name ? this.prototype.isPrototypeOf(t) || n.name === this.name : this.prototype.isPrototypeOf(t) : !1;
|
|
1490
|
+
}
|
|
1491
|
+
}, Xt = (e, t = {}) => (Object.entries(t).filter(([, e]) => e !== void 0).forEach(([t, n]) => {
|
|
1492
|
+
(e[t] == null || e[t] === "") && (e[t] = n);
|
|
1493
|
+
}), e.message = e.message || e.Message || "UnknownError", delete e.Message, e), Zt = (e) => {
|
|
1494
|
+
switch (e) {
|
|
1495
|
+
case "standard": return {
|
|
1496
|
+
retryMode: "standard",
|
|
1497
|
+
connectionTimeout: 3100
|
|
1498
|
+
};
|
|
1499
|
+
case "in-region": return {
|
|
1500
|
+
retryMode: "standard",
|
|
1501
|
+
connectionTimeout: 1100
|
|
1502
|
+
};
|
|
1503
|
+
case "cross-region": return {
|
|
1504
|
+
retryMode: "standard",
|
|
1505
|
+
connectionTimeout: 3100
|
|
1506
|
+
};
|
|
1507
|
+
case "mobile": return {
|
|
1508
|
+
retryMode: "standard",
|
|
1509
|
+
connectionTimeout: 3e4
|
|
1510
|
+
};
|
|
1511
|
+
default: return {};
|
|
1512
|
+
}
|
|
1513
|
+
}, Qt = Object.values(h), $t = (e) => {
|
|
1514
|
+
let t = [];
|
|
1515
|
+
for (let n in h) {
|
|
1516
|
+
let r = h[n];
|
|
1517
|
+
e[r] !== void 0 && t.push({
|
|
1518
|
+
algorithmId: () => r,
|
|
1519
|
+
checksumConstructor: () => e[r]
|
|
1520
|
+
});
|
|
1521
|
+
}
|
|
1522
|
+
for (let [n, r] of Object.entries(e.checksumAlgorithms ?? {})) t.push({
|
|
1523
|
+
algorithmId: () => n,
|
|
1524
|
+
checksumConstructor: () => r
|
|
1525
|
+
});
|
|
1526
|
+
return {
|
|
1527
|
+
addChecksumAlgorithm(n) {
|
|
1528
|
+
e.checksumAlgorithms = e.checksumAlgorithms ?? {};
|
|
1529
|
+
let r = n.algorithmId(), i = n.checksumConstructor();
|
|
1530
|
+
Qt.includes(r) ? e.checksumAlgorithms[r.toUpperCase()] = i : e.checksumAlgorithms[r] = i, t.push(n);
|
|
1531
|
+
},
|
|
1532
|
+
checksumAlgorithms() {
|
|
1533
|
+
return t;
|
|
1534
|
+
}
|
|
1535
|
+
};
|
|
1536
|
+
}, en = (e) => {
|
|
1537
|
+
let t = {};
|
|
1538
|
+
return e.checksumAlgorithms().forEach((e) => {
|
|
1539
|
+
let n = e.algorithmId();
|
|
1540
|
+
Qt.includes(n) && (t[n] = e.checksumConstructor());
|
|
1541
|
+
}), t;
|
|
1542
|
+
}, tn = (e) => ({
|
|
1543
|
+
setRetryStrategy(t) {
|
|
1544
|
+
e.retryStrategy = t;
|
|
1545
|
+
},
|
|
1546
|
+
retryStrategy() {
|
|
1547
|
+
return e.retryStrategy;
|
|
1548
|
+
}
|
|
1549
|
+
}), nn = (e) => {
|
|
1550
|
+
let t = {};
|
|
1551
|
+
return t.retryStrategy = e.retryStrategy(), t;
|
|
1552
|
+
}, rn = (e) => Object.assign($t(e), tn(e)), an = (e) => Object.assign(en(e), nn(e)), on = class {
|
|
1553
|
+
trace() {}
|
|
1554
|
+
debug() {}
|
|
1555
|
+
info() {}
|
|
1556
|
+
warn() {}
|
|
1557
|
+
error() {}
|
|
1558
|
+
}, sn = "X-Amz-Algorithm", cn = "X-Amz-Credential", ln = "X-Amz-Date", un = "X-Amz-SignedHeaders", dn = "X-Amz-Expires", fn = "X-Amz-Signature", pn = "X-Amz-Security-Token", mn = "authorization", hn = ln.toLowerCase(), gn = [
|
|
1559
|
+
mn,
|
|
1560
|
+
hn,
|
|
1561
|
+
"date"
|
|
1562
|
+
];
|
|
1563
|
+
fn.toLowerCase();
|
|
1564
|
+
var _n = "x-amz-content-sha256", vn = pn.toLowerCase(), yn = {
|
|
1565
|
+
authorization: !0,
|
|
1566
|
+
"cache-control": !0,
|
|
1567
|
+
connection: !0,
|
|
1568
|
+
expect: !0,
|
|
1569
|
+
from: !0,
|
|
1570
|
+
"keep-alive": !0,
|
|
1571
|
+
"max-forwards": !0,
|
|
1572
|
+
pragma: !0,
|
|
1573
|
+
referer: !0,
|
|
1574
|
+
te: !0,
|
|
1575
|
+
trailer: !0,
|
|
1576
|
+
"transfer-encoding": !0,
|
|
1577
|
+
upgrade: !0,
|
|
1578
|
+
"user-agent": !0,
|
|
1579
|
+
"x-amzn-trace-id": !0
|
|
1580
|
+
}, bn = /^proxy-/, xn = /^sec-/, Sn = "AWS4-HMAC-SHA256", Cn = "AWS4-HMAC-SHA256-PAYLOAD", wn = "UNSIGNED-PAYLOAD", Tn = "aws4_request", H = {}, En = [], Dn = (e, t, n) => `${e}/${t}/${n}/${Tn}`, On = async (e, t, n, r, i) => {
|
|
1581
|
+
let a = `${n}:${r}:${i}:${S(await kn(e, t.secretAccessKey, t.accessKeyId))}:${t.sessionToken}`;
|
|
1582
|
+
if (a in H) return H[a];
|
|
1583
|
+
for (En.push(a); En.length > 50;) delete H[En.shift()];
|
|
1584
|
+
let o = `AWS4${t.secretAccessKey}`;
|
|
1585
|
+
for (let t of [
|
|
1586
|
+
n,
|
|
1587
|
+
r,
|
|
1588
|
+
i,
|
|
1589
|
+
Tn
|
|
1590
|
+
]) o = await kn(e, o, t);
|
|
1591
|
+
return H[a] = o;
|
|
1592
|
+
}, kn = (e, t, n) => {
|
|
1593
|
+
let r = new e(t);
|
|
1594
|
+
return r.update(b(n)), r.digest();
|
|
1595
|
+
}, An = ({ headers: e }, t, n) => {
|
|
1596
|
+
let r = {};
|
|
1597
|
+
for (let i of Object.keys(e).sort()) {
|
|
1598
|
+
if (e[i] == null) continue;
|
|
1599
|
+
let a = i.toLowerCase();
|
|
1600
|
+
(a in yn || t?.has(a) || bn.test(a) || xn.test(a)) && (!n || n && !n.has(a)) || (r[a] = e[i].trim().replace(/\s+/g, " "));
|
|
1601
|
+
}
|
|
1602
|
+
return r;
|
|
1603
|
+
}, jn = async ({ headers: e, body: t }, n) => {
|
|
1604
|
+
for (let t of Object.keys(e)) if (t.toLowerCase() === "x-amz-content-sha256") return e[t];
|
|
1605
|
+
if (t == null) return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";
|
|
1606
|
+
if (typeof t == "string" || ArrayBuffer.isView(t) || Se(t)) {
|
|
1607
|
+
let e = new n();
|
|
1608
|
+
return e.update(b(t)), S(await e.digest());
|
|
1609
|
+
}
|
|
1610
|
+
return wn;
|
|
1611
|
+
}, Mn = class {
|
|
1612
|
+
format(t) {
|
|
1613
|
+
let n = [];
|
|
1614
|
+
for (let r of Object.keys(t)) {
|
|
1615
|
+
let i = e(r);
|
|
1616
|
+
n.push(Uint8Array.from([i.byteLength]), i, this.formatHeaderValue(t[r]));
|
|
1617
|
+
}
|
|
1618
|
+
let r = new Uint8Array(n.reduce((e, t) => e + t.byteLength, 0)), i = 0;
|
|
1619
|
+
for (let e of n) r.set(e, i), i += e.byteLength;
|
|
1620
|
+
return r;
|
|
1621
|
+
}
|
|
1622
|
+
formatHeaderValue(t) {
|
|
1623
|
+
switch (t.type) {
|
|
1624
|
+
case "boolean": return Uint8Array.from([+!t.value]);
|
|
1625
|
+
case "byte": return Uint8Array.from([2, t.value]);
|
|
1626
|
+
case "short":
|
|
1627
|
+
let n = /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(3));
|
|
1628
|
+
return n.setUint8(0, 3), n.setInt16(1, t.value, !1), new Uint8Array(n.buffer);
|
|
1629
|
+
case "integer":
|
|
1630
|
+
let r = /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(5));
|
|
1631
|
+
return r.setUint8(0, 4), r.setInt32(1, t.value, !1), new Uint8Array(r.buffer);
|
|
1632
|
+
case "long":
|
|
1633
|
+
let i = new Uint8Array(9);
|
|
1634
|
+
return i[0] = 5, i.set(t.value.bytes, 1), i;
|
|
1635
|
+
case "binary":
|
|
1636
|
+
let a = new DataView(new ArrayBuffer(3 + t.value.byteLength));
|
|
1637
|
+
a.setUint8(0, 6), a.setUint16(1, t.value.byteLength, !1);
|
|
1638
|
+
let o = new Uint8Array(a.buffer);
|
|
1639
|
+
return o.set(t.value, 3), o;
|
|
1640
|
+
case "string":
|
|
1641
|
+
let s = e(t.value), c = new DataView(new ArrayBuffer(3 + s.byteLength));
|
|
1642
|
+
c.setUint8(0, 7), c.setUint16(1, s.byteLength, !1);
|
|
1643
|
+
let l = new Uint8Array(c.buffer);
|
|
1644
|
+
return l.set(s, 3), l;
|
|
1645
|
+
case "timestamp":
|
|
1646
|
+
let u = new Uint8Array(9);
|
|
1647
|
+
return u[0] = 8, u.set(Fn.fromNumber(t.value.valueOf()).bytes, 1), u;
|
|
1648
|
+
case "uuid":
|
|
1649
|
+
if (!Pn.test(t.value)) throw Error(`Invalid UUID received: ${t.value}`);
|
|
1650
|
+
let d = new Uint8Array(17);
|
|
1651
|
+
return d[0] = 9, d.set(xe(t.value.replace(/\-/g, "")), 1), d;
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
}, Nn;
|
|
1655
|
+
(function(e) {
|
|
1656
|
+
e[e.boolTrue = 0] = "boolTrue", e[e.boolFalse = 1] = "boolFalse", e[e.byte = 2] = "byte", e[e.short = 3] = "short", e[e.integer = 4] = "integer", e[e.long = 5] = "long", e[e.byteArray = 6] = "byteArray", e[e.string = 7] = "string", e[e.timestamp = 8] = "timestamp", e[e.uuid = 9] = "uuid";
|
|
1657
|
+
})(Nn ||= {});
|
|
1658
|
+
var Pn = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/, Fn = class e {
|
|
1659
|
+
bytes;
|
|
1660
|
+
constructor(e) {
|
|
1661
|
+
if (this.bytes = e, e.byteLength !== 8) throw Error("Int64 buffers must be exactly 8 bytes");
|
|
1662
|
+
}
|
|
1663
|
+
static fromNumber(t) {
|
|
1664
|
+
if (t > 0x8000000000000000 || t < -0x8000000000000000) throw Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);
|
|
1665
|
+
let n = new Uint8Array(8);
|
|
1666
|
+
for (let e = 7, r = Math.abs(Math.round(t)); e > -1 && r > 0; e--, r /= 256) n[e] = r;
|
|
1667
|
+
return t < 0 && In(n), new e(n);
|
|
1668
|
+
}
|
|
1669
|
+
valueOf() {
|
|
1670
|
+
let e = this.bytes.slice(0), t = e[0] & 128;
|
|
1671
|
+
return t && In(e), parseInt(S(e), 16) * (t ? -1 : 1);
|
|
1672
|
+
}
|
|
1673
|
+
toString() {
|
|
1674
|
+
return String(this.valueOf());
|
|
1675
|
+
}
|
|
1676
|
+
};
|
|
1677
|
+
function In(e) {
|
|
1678
|
+
for (let t = 0; t < 8; t++) e[t] ^= 255;
|
|
1679
|
+
for (let t = 7; t > -1 && (e[t]++, e[t] === 0); t--);
|
|
1680
|
+
}
|
|
1681
|
+
//#endregion
|
|
1682
|
+
//#region node_modules/@smithy/signature-v4/dist-es/headerUtil.js
|
|
1683
|
+
var Ln = (e, t) => {
|
|
1684
|
+
e = e.toLowerCase();
|
|
1685
|
+
for (let n of Object.keys(t)) if (e === n.toLowerCase()) return !0;
|
|
1686
|
+
return !1;
|
|
1687
|
+
}, Rn = (e, t = {}) => {
|
|
1688
|
+
let { headers: n, query: r = {} } = _.clone(e);
|
|
1689
|
+
for (let e of Object.keys(n)) {
|
|
1690
|
+
let i = e.toLowerCase();
|
|
1691
|
+
(i.slice(0, 6) === "x-amz-" && !t.unhoistableHeaders?.has(i) || t.hoistableHeaders?.has(i)) && (r[e] = n[e], delete n[e]);
|
|
1692
|
+
}
|
|
1693
|
+
return {
|
|
1694
|
+
...e,
|
|
1695
|
+
headers: n,
|
|
1696
|
+
query: r
|
|
1697
|
+
};
|
|
1698
|
+
}, zn = (e) => {
|
|
1699
|
+
e = _.clone(e);
|
|
1700
|
+
for (let t of Object.keys(e.headers)) gn.indexOf(t.toLowerCase()) > -1 && delete e.headers[t];
|
|
1701
|
+
return e;
|
|
1702
|
+
}, Bn = ({ query: e = {} }) => {
|
|
1703
|
+
let t = [], n = {};
|
|
1704
|
+
for (let r of Object.keys(e)) {
|
|
1705
|
+
if (r.toLowerCase() === "x-amz-signature") continue;
|
|
1706
|
+
let i = x(r);
|
|
1707
|
+
t.push(i);
|
|
1708
|
+
let a = e[r];
|
|
1709
|
+
typeof a == "string" ? n[i] = `${i}=${x(a)}` : Array.isArray(a) && (n[i] = a.slice(0).reduce((e, t) => e.concat([`${i}=${x(t)}`]), []).sort().join("&"));
|
|
1710
|
+
}
|
|
1711
|
+
return t.sort().map((e) => n[e]).filter((e) => e).join("&");
|
|
1712
|
+
}, Vn = (e) => Hn(e).toISOString().replace(/\.\d{3}Z$/, "Z"), Hn = (e) => typeof e == "number" ? /* @__PURE__ */ new Date(e * 1e3) : typeof e == "string" ? Number(e) ? /* @__PURE__ */ new Date(Number(e) * 1e3) : new Date(e) : e, Un = class {
|
|
1713
|
+
service;
|
|
1714
|
+
regionProvider;
|
|
1715
|
+
credentialProvider;
|
|
1716
|
+
sha256;
|
|
1717
|
+
uriEscapePath;
|
|
1718
|
+
applyChecksum;
|
|
1719
|
+
constructor({ applyChecksum: e, credentials: t, region: n, service: r, sha256: i, uriEscapePath: a = !0 }) {
|
|
1720
|
+
this.service = r, this.sha256 = i, this.uriEscapePath = a, this.applyChecksum = typeof e == "boolean" ? e : !0, this.regionProvider = E(n), this.credentialProvider = E(t);
|
|
1721
|
+
}
|
|
1722
|
+
createCanonicalRequest(e, t, n) {
|
|
1723
|
+
let r = Object.keys(t).sort();
|
|
1724
|
+
return `${e.method}
|
|
1725
|
+
${this.getCanonicalPath(e)}
|
|
1726
|
+
${Bn(e)}
|
|
1727
|
+
${r.map((e) => `${e}:${t[e]}`).join("\n")}
|
|
1728
|
+
|
|
1729
|
+
${r.join(";")}
|
|
1730
|
+
${n}`;
|
|
1731
|
+
}
|
|
1732
|
+
async createStringToSign(e, t, n, r) {
|
|
1733
|
+
let i = new this.sha256();
|
|
1734
|
+
return i.update(b(n)), `${r}
|
|
1735
|
+
${e}
|
|
1736
|
+
${t}
|
|
1737
|
+
${S(await i.digest())}`;
|
|
1738
|
+
}
|
|
1739
|
+
getCanonicalPath({ path: e }) {
|
|
1740
|
+
if (this.uriEscapePath) {
|
|
1741
|
+
let t = [];
|
|
1742
|
+
for (let n of e.split("/")) n?.length !== 0 && n !== "." && (n === ".." ? t.pop() : t.push(n));
|
|
1743
|
+
return x(`${e?.startsWith("/") ? "/" : ""}${t.join("/")}${t.length > 0 && e?.endsWith("/") ? "/" : ""}`).replace(/%2F/g, "/");
|
|
1744
|
+
}
|
|
1745
|
+
return e;
|
|
1746
|
+
}
|
|
1747
|
+
validateResolvedCredentials(e) {
|
|
1748
|
+
if (typeof e != "object" || typeof e.accessKeyId != "string" || typeof e.secretAccessKey != "string") throw Error("Resolved credential object is not valid");
|
|
1749
|
+
}
|
|
1750
|
+
formatDate(e) {
|
|
1751
|
+
let t = Vn(e).replace(/[\-:]/g, "");
|
|
1752
|
+
return {
|
|
1753
|
+
longDate: t,
|
|
1754
|
+
shortDate: t.slice(0, 8)
|
|
1755
|
+
};
|
|
1756
|
+
}
|
|
1757
|
+
getCanonicalHeaderList(e) {
|
|
1758
|
+
return Object.keys(e).sort().join(";");
|
|
1759
|
+
}
|
|
1760
|
+
}, Wn = class extends Un {
|
|
1761
|
+
headerFormatter = new Mn();
|
|
1762
|
+
constructor({ applyChecksum: e, credentials: t, region: n, service: r, sha256: i, uriEscapePath: a = !0 }) {
|
|
1763
|
+
super({
|
|
1764
|
+
applyChecksum: e,
|
|
1765
|
+
credentials: t,
|
|
1766
|
+
region: n,
|
|
1767
|
+
service: r,
|
|
1768
|
+
sha256: i,
|
|
1769
|
+
uriEscapePath: a
|
|
1770
|
+
});
|
|
1771
|
+
}
|
|
1772
|
+
async presign(e, t = {}) {
|
|
1773
|
+
let { signingDate: n = /* @__PURE__ */ new Date(), expiresIn: r = 3600, unsignableHeaders: i, unhoistableHeaders: a, signableHeaders: o, hoistableHeaders: s, signingRegion: c, signingService: l } = t, u = await this.credentialProvider();
|
|
1774
|
+
this.validateResolvedCredentials(u);
|
|
1775
|
+
let d = c ?? await this.regionProvider(), { longDate: f, shortDate: p } = this.formatDate(n);
|
|
1776
|
+
if (r > 604800) return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");
|
|
1777
|
+
let m = Dn(p, d, l ?? this.service), h = Rn(zn(e), {
|
|
1778
|
+
unhoistableHeaders: a,
|
|
1779
|
+
hoistableHeaders: s
|
|
1780
|
+
});
|
|
1781
|
+
u.sessionToken && (h.query[pn] = u.sessionToken), h.query[sn] = Sn, h.query[cn] = `${u.accessKeyId}/${m}`, h.query[ln] = f, h.query[dn] = r.toString(10);
|
|
1782
|
+
let g = An(h, i, o);
|
|
1783
|
+
return h.query[un] = this.getCanonicalHeaderList(g), h.query[fn] = await this.getSignature(f, m, this.getSigningKey(u, d, p, l), this.createCanonicalRequest(h, g, await jn(e, this.sha256))), h;
|
|
1784
|
+
}
|
|
1785
|
+
async sign(e, t) {
|
|
1786
|
+
return typeof e == "string" ? this.signString(e, t) : e.headers && e.payload ? this.signEvent(e, t) : e.message ? this.signMessage(e, t) : this.signRequest(e, t);
|
|
1787
|
+
}
|
|
1788
|
+
async signEvent({ headers: e, payload: t }, { signingDate: n = /* @__PURE__ */ new Date(), priorSignature: r, signingRegion: i, signingService: a }) {
|
|
1789
|
+
let o = i ?? await this.regionProvider(), { shortDate: s, longDate: c } = this.formatDate(n), l = Dn(s, o, a ?? this.service), u = await jn({
|
|
1790
|
+
headers: {},
|
|
1791
|
+
body: t
|
|
1792
|
+
}, this.sha256), d = new this.sha256();
|
|
1793
|
+
d.update(e);
|
|
1794
|
+
let f = [
|
|
1795
|
+
Cn,
|
|
1796
|
+
c,
|
|
1797
|
+
l,
|
|
1798
|
+
r,
|
|
1799
|
+
S(await d.digest()),
|
|
1800
|
+
u
|
|
1801
|
+
].join("\n");
|
|
1802
|
+
return this.signString(f, {
|
|
1803
|
+
signingDate: n,
|
|
1804
|
+
signingRegion: o,
|
|
1805
|
+
signingService: a
|
|
1806
|
+
});
|
|
1807
|
+
}
|
|
1808
|
+
async signMessage(e, { signingDate: t = /* @__PURE__ */ new Date(), signingRegion: n, signingService: r }) {
|
|
1809
|
+
return this.signEvent({
|
|
1810
|
+
headers: this.headerFormatter.format(e.message.headers),
|
|
1811
|
+
payload: e.message.body
|
|
1812
|
+
}, {
|
|
1813
|
+
signingDate: t,
|
|
1814
|
+
signingRegion: n,
|
|
1815
|
+
signingService: r,
|
|
1816
|
+
priorSignature: e.priorSignature
|
|
1817
|
+
}).then((t) => ({
|
|
1818
|
+
message: e.message,
|
|
1819
|
+
signature: t
|
|
1820
|
+
}));
|
|
1821
|
+
}
|
|
1822
|
+
async signString(e, { signingDate: t = /* @__PURE__ */ new Date(), signingRegion: n, signingService: r } = {}) {
|
|
1823
|
+
let i = await this.credentialProvider();
|
|
1824
|
+
this.validateResolvedCredentials(i);
|
|
1825
|
+
let a = n ?? await this.regionProvider(), { shortDate: o } = this.formatDate(t), s = new this.sha256(await this.getSigningKey(i, a, o, r));
|
|
1826
|
+
return s.update(b(e)), S(await s.digest());
|
|
1827
|
+
}
|
|
1828
|
+
async signRequest(e, { signingDate: t = /* @__PURE__ */ new Date(), signableHeaders: n, unsignableHeaders: r, signingRegion: i, signingService: a } = {}) {
|
|
1829
|
+
let o = await this.credentialProvider();
|
|
1830
|
+
this.validateResolvedCredentials(o);
|
|
1831
|
+
let s = i ?? await this.regionProvider(), c = zn(e), { longDate: l, shortDate: u } = this.formatDate(t), d = Dn(u, s, a ?? this.service);
|
|
1832
|
+
c.headers[hn] = l, o.sessionToken && (c.headers[vn] = o.sessionToken);
|
|
1833
|
+
let f = await jn(c, this.sha256);
|
|
1834
|
+
!Ln("x-amz-content-sha256", c.headers) && this.applyChecksum && (c.headers[_n] = f);
|
|
1835
|
+
let p = An(c, r, n), m = await this.getSignature(l, d, this.getSigningKey(o, s, u, a), this.createCanonicalRequest(c, p, f));
|
|
1836
|
+
return c.headers[mn] = `${Sn} Credential=${o.accessKeyId}/${d}, SignedHeaders=${this.getCanonicalHeaderList(p)}, Signature=${m}`, c;
|
|
1837
|
+
}
|
|
1838
|
+
async getSignature(e, t, n, r) {
|
|
1839
|
+
let i = await this.createStringToSign(e, t, r, Sn), a = new this.sha256(await n);
|
|
1840
|
+
return a.update(b(i)), S(await a.digest());
|
|
1841
|
+
}
|
|
1842
|
+
getSigningKey(e, t, n, r) {
|
|
1843
|
+
return On(this.sha256, e, n, t, r || this.service);
|
|
1844
|
+
}
|
|
1845
|
+
}, Gn = (e, t) => {
|
|
1846
|
+
if (!t || t.length === 0) return e;
|
|
1847
|
+
let n = [];
|
|
1848
|
+
for (let r of t) for (let t of e) t.schemeId.split("#")[1] === r && n.push(t);
|
|
1849
|
+
for (let t of e) n.find(({ schemeId: e }) => e === t.schemeId) || n.push(t);
|
|
1850
|
+
return n;
|
|
1851
|
+
};
|
|
1852
|
+
//#endregion
|
|
1853
|
+
//#region node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js
|
|
1854
|
+
function Kn(e) {
|
|
1855
|
+
let t = /* @__PURE__ */ new Map();
|
|
1856
|
+
for (let n of e) t.set(n.schemeId, n);
|
|
1857
|
+
return t;
|
|
1858
|
+
}
|
|
1859
|
+
var qn = (e, t) => (n, r) => async (i) => {
|
|
1860
|
+
let a = Gn(e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e, r, i.input)), e.authSchemePreference ? await e.authSchemePreference() : []), o = Kn(e.httpAuthSchemes), s = T(r), c = [];
|
|
1861
|
+
for (let n of a) {
|
|
1862
|
+
let i = o.get(n.schemeId);
|
|
1863
|
+
if (!i) {
|
|
1864
|
+
c.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);
|
|
1865
|
+
continue;
|
|
1866
|
+
}
|
|
1867
|
+
let a = i.identityProvider(await t.identityProviderConfigProvider(e));
|
|
1868
|
+
if (!a) {
|
|
1869
|
+
c.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);
|
|
1870
|
+
continue;
|
|
1871
|
+
}
|
|
1872
|
+
let { identityProperties: l = {}, signingProperties: u = {} } = n.propertiesExtractor?.(e, r) || {};
|
|
1873
|
+
n.identityProperties = Object.assign(n.identityProperties || {}, l), n.signingProperties = Object.assign(n.signingProperties || {}, u), s.selectedHttpAuthScheme = {
|
|
1874
|
+
httpAuthOption: n,
|
|
1875
|
+
identity: await a(n.identityProperties),
|
|
1876
|
+
signer: i.signer
|
|
1877
|
+
};
|
|
1878
|
+
break;
|
|
1879
|
+
}
|
|
1880
|
+
if (!s.selectedHttpAuthScheme) throw Error(c.join("\n"));
|
|
1881
|
+
return n(i);
|
|
1882
|
+
}, Jn = {
|
|
1883
|
+
step: "serialize",
|
|
1884
|
+
tags: ["HTTP_AUTH_SCHEME"],
|
|
1885
|
+
name: "httpAuthSchemeMiddleware",
|
|
1886
|
+
override: !0,
|
|
1887
|
+
relation: "before",
|
|
1888
|
+
toMiddleware: "endpointV2Middleware"
|
|
1889
|
+
}, Yn = (e, { httpAuthSchemeParametersProvider: t, identityProviderConfigProvider: n }) => ({ applyToStack: (r) => {
|
|
1890
|
+
r.addRelativeTo(qn(e, {
|
|
1891
|
+
httpAuthSchemeParametersProvider: t,
|
|
1892
|
+
identityProviderConfigProvider: n
|
|
1893
|
+
}), Jn);
|
|
1894
|
+
} }), Xn = (e) => (e) => {
|
|
1895
|
+
throw e;
|
|
1896
|
+
}, Zn = (e, t) => {}, Qn = (e) => (e, t) => async (n) => {
|
|
1897
|
+
if (!_.isInstance(n.request)) return e(n);
|
|
1898
|
+
let r = T(t).selectedHttpAuthScheme;
|
|
1899
|
+
if (!r) throw Error("No HttpAuthScheme was selected: unable to sign request");
|
|
1900
|
+
let { httpAuthOption: { signingProperties: i = {} }, identity: a, signer: o } = r, s = await e({
|
|
1901
|
+
...n,
|
|
1902
|
+
request: await o.sign(n.request, a, i)
|
|
1903
|
+
}).catch((o.errorHandler || Xn)(i));
|
|
1904
|
+
return (o.successHandler || Zn)(s.response, i), s;
|
|
1905
|
+
}, $n = {
|
|
1906
|
+
step: "finalizeRequest",
|
|
1907
|
+
tags: ["HTTP_SIGNING"],
|
|
1908
|
+
name: "httpSigningMiddleware",
|
|
1909
|
+
aliases: [
|
|
1910
|
+
"apiKeyMiddleware",
|
|
1911
|
+
"tokenMiddleware",
|
|
1912
|
+
"awsAuthMiddleware"
|
|
1913
|
+
],
|
|
1914
|
+
override: !0,
|
|
1915
|
+
relation: "after",
|
|
1916
|
+
toMiddleware: "retryMiddleware"
|
|
1917
|
+
}, er = (e) => ({ applyToStack: (t) => {
|
|
1918
|
+
t.addRelativeTo(Qn(e), $n);
|
|
1919
|
+
} }), U = (e) => {
|
|
1920
|
+
if (typeof e == "function") return e;
|
|
1921
|
+
let t = Promise.resolve(e);
|
|
1922
|
+
return () => t;
|
|
1923
|
+
};
|
|
1924
|
+
//#endregion
|
|
1925
|
+
//#region node_modules/@smithy/core/dist-es/setFeature.js
|
|
1926
|
+
function tr(e, t, n) {
|
|
1927
|
+
e.__smithy_context ? e.__smithy_context.features || (e.__smithy_context.features = {}) : e.__smithy_context = { features: {} }, e.__smithy_context.features[t] = n;
|
|
1928
|
+
}
|
|
1929
|
+
//#endregion
|
|
1930
|
+
//#region node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js
|
|
1931
|
+
var nr = class {
|
|
1932
|
+
authSchemes = /* @__PURE__ */ new Map();
|
|
1933
|
+
constructor(e) {
|
|
1934
|
+
for (let [t, n] of Object.entries(e)) n !== void 0 && this.authSchemes.set(t, n);
|
|
1935
|
+
}
|
|
1936
|
+
getIdentityProvider(e) {
|
|
1937
|
+
return this.authSchemes.get(e);
|
|
1938
|
+
}
|
|
1939
|
+
}, rr = ((e) => function(t) {
|
|
1940
|
+
return ir(t) && t.expiration.getTime() - Date.now() < e;
|
|
1941
|
+
})(3e5), ir = (e) => e.expiration !== void 0, ar = (e, t, n) => {
|
|
1942
|
+
if (e === void 0) return;
|
|
1943
|
+
let r = typeof e == "function" ? e : async () => Promise.resolve(e), i, a, o, s = !1, c = async (e) => {
|
|
1944
|
+
a ||= r(e);
|
|
1945
|
+
try {
|
|
1946
|
+
i = await a, o = !0, s = !1;
|
|
1947
|
+
} finally {
|
|
1948
|
+
a = void 0;
|
|
1949
|
+
}
|
|
1950
|
+
return i;
|
|
1951
|
+
};
|
|
1952
|
+
return t === void 0 ? async (e) => ((!o || e?.forceRefresh) && (i = await c(e)), i) : async (e) => ((!o || e?.forceRefresh) && (i = await c(e)), s ? i : n(i) ? (t(i) && await c(e), i) : (s = !0, i));
|
|
1953
|
+
}, or = typeof TextEncoder == "function" ? new TextEncoder() : null, sr = (e) => {
|
|
1954
|
+
if (typeof e == "string") {
|
|
1955
|
+
if (or) return or.encode(e).byteLength;
|
|
1956
|
+
let t = e.length;
|
|
1957
|
+
for (let n = t - 1; n >= 0; n--) {
|
|
1958
|
+
let r = e.charCodeAt(n);
|
|
1959
|
+
r > 127 && r <= 2047 ? t++ : r > 2047 && r <= 65535 && (t += 2), r >= 56320 && r <= 57343 && n--;
|
|
1960
|
+
}
|
|
1961
|
+
return t;
|
|
1962
|
+
} else if (typeof e.byteLength == "number") return e.byteLength;
|
|
1963
|
+
else if (typeof e.size == "number") return e.size;
|
|
1964
|
+
throw Error(`Body Length computation failed for ${e}`);
|
|
1965
|
+
}, cr = class {
|
|
1966
|
+
queryCompat;
|
|
1967
|
+
errorRegistry;
|
|
1968
|
+
constructor(e = !1) {
|
|
1969
|
+
this.queryCompat = e;
|
|
1970
|
+
}
|
|
1971
|
+
resolveRestContentType(e, t) {
|
|
1972
|
+
let n = t.getMemberSchemas(), r = Object.values(n).find((e) => !!e.getMergedTraits().httpPayload);
|
|
1973
|
+
if (r) return r.getMergedTraits().mediaType || (r.isStringSchema() ? "text/plain" : r.isBlobSchema() ? "application/octet-stream" : e);
|
|
1974
|
+
if (!t.isUnitSchema() && Object.values(n).find((e) => {
|
|
1975
|
+
let { httpQuery: t, httpQueryParams: n, httpHeader: r, httpLabel: i, httpPrefixHeaders: a } = e.getMergedTraits();
|
|
1976
|
+
return !t && !n && !r && !i && a === void 0;
|
|
1977
|
+
})) return e;
|
|
1978
|
+
}
|
|
1979
|
+
async getErrorSchemaOrThrowBaseException(e, t, n, r, i, a) {
|
|
1980
|
+
let o = e;
|
|
1981
|
+
e.includes("#") && ([, o] = e.split("#"));
|
|
1982
|
+
let s = {
|
|
1983
|
+
$metadata: i,
|
|
1984
|
+
$fault: n.statusCode < 500 ? "client" : "server"
|
|
1985
|
+
};
|
|
1986
|
+
if (!this.errorRegistry) throw Error("@aws-sdk/core/protocols - error handler not initialized.");
|
|
1987
|
+
try {
|
|
1988
|
+
return {
|
|
1989
|
+
errorSchema: a?.(this.errorRegistry, o) ?? this.errorRegistry.getSchema(e),
|
|
1990
|
+
errorMetadata: s
|
|
1991
|
+
};
|
|
1992
|
+
} catch {
|
|
1993
|
+
r.message = r.message ?? r.Message ?? "UnknownError";
|
|
1994
|
+
let e = this.errorRegistry, t = e.getBaseException();
|
|
1995
|
+
if (t) {
|
|
1996
|
+
let n = e.getErrorCtor(t) ?? Error;
|
|
1997
|
+
throw this.decorateServiceException(Object.assign(new n({ name: o }), s), r);
|
|
1998
|
+
}
|
|
1999
|
+
let n = r, i = n?.message ?? n?.Message ?? n?.Error?.Message ?? n?.Error?.message;
|
|
2000
|
+
throw this.decorateServiceException(Object.assign(Error(i), { name: o }, s), r);
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
compose(e, t, n) {
|
|
2004
|
+
let r = n;
|
|
2005
|
+
t.includes("#") && ([r] = t.split("#"));
|
|
2006
|
+
let i = I.for(r), a = I.for("smithy.ts.sdk.synthetic." + n);
|
|
2007
|
+
e.copyFrom(i), e.copyFrom(a), this.errorRegistry = e;
|
|
2008
|
+
}
|
|
2009
|
+
decorateServiceException(e, t = {}) {
|
|
2010
|
+
if (this.queryCompat) {
|
|
2011
|
+
let n = e.Message ?? t.Message, r = Xt(e, t);
|
|
2012
|
+
n && (r.message = n), r.Error = {
|
|
2013
|
+
...r.Error,
|
|
2014
|
+
Type: r.Error?.Type,
|
|
2015
|
+
Code: r.Error?.Code,
|
|
2016
|
+
Message: r.Error?.message ?? r.Error?.Message ?? n
|
|
2017
|
+
};
|
|
2018
|
+
let i = r.$metadata.requestId;
|
|
2019
|
+
return i && (r.RequestId = i), r;
|
|
2020
|
+
}
|
|
2021
|
+
return Xt(e, t);
|
|
2022
|
+
}
|
|
2023
|
+
setQueryCompatError(e, t) {
|
|
2024
|
+
let n = t.headers?.["x-amzn-query-error"];
|
|
2025
|
+
if (e !== void 0 && n != null) {
|
|
2026
|
+
let [t, r] = n.split(";"), i = Object.entries(e), a = {
|
|
2027
|
+
Code: t,
|
|
2028
|
+
Type: r
|
|
2029
|
+
};
|
|
2030
|
+
Object.assign(e, a);
|
|
2031
|
+
for (let [e, t] of i) a[e === "message" ? "Message" : e] = t;
|
|
2032
|
+
delete a.__type, e.Error = a;
|
|
2033
|
+
}
|
|
2034
|
+
}
|
|
2035
|
+
queryCompatOutput(e, t) {
|
|
2036
|
+
e.Error && (t.Error = e.Error), e.Type && (t.Type = e.Type), e.Code && (t.Code = e.Code);
|
|
2037
|
+
}
|
|
2038
|
+
findQueryCompatibleError(e, t) {
|
|
2039
|
+
try {
|
|
2040
|
+
return e.getSchema(t);
|
|
2041
|
+
} catch {
|
|
2042
|
+
return e.find((e) => P.of(e).getMergedTraits().awsQueryError?.[0] === t);
|
|
2043
|
+
}
|
|
2044
|
+
}
|
|
2045
|
+
}, lr = class {
|
|
2046
|
+
serdeContext;
|
|
2047
|
+
setSerdeContext(e) {
|
|
2048
|
+
this.serdeContext = e;
|
|
2049
|
+
}
|
|
2050
|
+
}, ur = class {
|
|
2051
|
+
from;
|
|
2052
|
+
to;
|
|
2053
|
+
keys;
|
|
2054
|
+
constructor(e, t) {
|
|
2055
|
+
this.from = e, this.to = t, this.keys = new Set(Object.keys(this.from).filter((e) => e !== "__type"));
|
|
2056
|
+
}
|
|
2057
|
+
mark(e) {
|
|
2058
|
+
this.keys.delete(e);
|
|
2059
|
+
}
|
|
2060
|
+
hasUnknown() {
|
|
2061
|
+
return this.keys.size === 1 && Object.keys(this.to).length === 0;
|
|
2062
|
+
}
|
|
2063
|
+
writeUnknown() {
|
|
2064
|
+
if (this.hasUnknown()) {
|
|
2065
|
+
let e = this.keys.values().next().value, t = this.from[e];
|
|
2066
|
+
this.to.$unknown = [e, t];
|
|
2067
|
+
}
|
|
2068
|
+
}
|
|
2069
|
+
}, dr = (e, n) => He(e, n).then((e) => (n?.utf8Encoder ?? t)(e));
|
|
2070
|
+
function fr(e) {
|
|
2071
|
+
return e === void 0 ? !0 : typeof e == "string" && e.length <= 50;
|
|
2072
|
+
}
|
|
2073
|
+
function pr(e) {
|
|
2074
|
+
let t = U(e.userAgentAppId ?? void 0), { customUserAgent: n } = e;
|
|
2075
|
+
return Object.assign(e, {
|
|
2076
|
+
customUserAgent: typeof n == "string" ? [[n]] : n,
|
|
2077
|
+
userAgentAppId: async () => {
|
|
2078
|
+
let n = await t();
|
|
2079
|
+
if (!fr(n)) {
|
|
2080
|
+
let t = e.logger?.constructor?.name === "NoOpLogger" || !e.logger ? console : e.logger;
|
|
2081
|
+
typeof n == "string" ? n.length > 50 && t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.") : t?.warn("userAgentAppId must be a string or undefined.");
|
|
2082
|
+
}
|
|
2083
|
+
return n;
|
|
2084
|
+
}
|
|
2085
|
+
});
|
|
2086
|
+
}
|
|
2087
|
+
//#endregion
|
|
2088
|
+
//#region node_modules/@smithy/util-endpoints/dist-es/cache/EndpointCache.js
|
|
2089
|
+
var mr = class {
|
|
2090
|
+
capacity;
|
|
2091
|
+
data = /* @__PURE__ */ new Map();
|
|
2092
|
+
parameters = [];
|
|
2093
|
+
constructor({ size: e, params: t }) {
|
|
2094
|
+
this.capacity = e ?? 50, t && (this.parameters = t);
|
|
2095
|
+
}
|
|
2096
|
+
get(e, t) {
|
|
2097
|
+
let n = this.hash(e);
|
|
2098
|
+
if (n === !1) return t();
|
|
2099
|
+
if (!this.data.has(n)) {
|
|
2100
|
+
if (this.data.size > this.capacity + 10) {
|
|
2101
|
+
let e = this.data.keys(), t = 0;
|
|
2102
|
+
for (;;) {
|
|
2103
|
+
let { value: n, done: r } = e.next();
|
|
2104
|
+
if (this.data.delete(n), r || ++t > 10) break;
|
|
2105
|
+
}
|
|
2106
|
+
}
|
|
2107
|
+
this.data.set(n, t());
|
|
2108
|
+
}
|
|
2109
|
+
return this.data.get(n);
|
|
2110
|
+
}
|
|
2111
|
+
size() {
|
|
2112
|
+
return this.data.size;
|
|
2113
|
+
}
|
|
2114
|
+
hash(e) {
|
|
2115
|
+
let t = "", { parameters: n } = this;
|
|
2116
|
+
if (n.length === 0) return !1;
|
|
2117
|
+
for (let r of n) {
|
|
2118
|
+
let n = String(e[r] ?? "");
|
|
2119
|
+
if (n.includes("|;")) return !1;
|
|
2120
|
+
t += n + "|;";
|
|
2121
|
+
}
|
|
2122
|
+
return t;
|
|
2123
|
+
}
|
|
2124
|
+
}, W = class extends Error {
|
|
2125
|
+
constructor(e) {
|
|
2126
|
+
super(e), this.name = "EndpointError";
|
|
2127
|
+
}
|
|
2128
|
+
}, G = "endpoints";
|
|
2129
|
+
//#endregion
|
|
2130
|
+
//#region node_modules/@smithy/util-endpoints/dist-es/debug/toDebugString.js
|
|
2131
|
+
function K(e) {
|
|
2132
|
+
return typeof e != "object" || !e ? e : "ref" in e ? `$${K(e.ref)}` : "fn" in e ? `${e.fn}(${(e.argv || []).map(K).join(", ")})` : JSON.stringify(e, null, 2);
|
|
2133
|
+
}
|
|
2134
|
+
//#endregion
|
|
2135
|
+
//#region node_modules/@smithy/util-endpoints/dist-es/utils/customEndpointFunctions.js
|
|
2136
|
+
var q = {}, hr = (e, t) => e === t;
|
|
2137
|
+
//#endregion
|
|
2138
|
+
//#region node_modules/@smithy/util-endpoints/dist-es/lib/coalesce.js
|
|
2139
|
+
function gr(...e) {
|
|
2140
|
+
for (let t of e) if (t != null) return t;
|
|
2141
|
+
}
|
|
2142
|
+
//#endregion
|
|
2143
|
+
//#region node_modules/@smithy/util-endpoints/dist-es/lib/getAttrPathList.js
|
|
2144
|
+
var _r = (e) => {
|
|
2145
|
+
let t = e.split("."), n = [];
|
|
2146
|
+
for (let r of t) {
|
|
2147
|
+
let t = r.indexOf("[");
|
|
2148
|
+
if (t !== -1) {
|
|
2149
|
+
if (r.indexOf("]") !== r.length - 1) throw new W(`Path: '${e}' does not end with ']'`);
|
|
2150
|
+
let i = r.slice(t + 1, -1);
|
|
2151
|
+
if (Number.isNaN(parseInt(i))) throw new W(`Invalid array index: '${i}' in path: '${e}'`);
|
|
2152
|
+
t !== 0 && n.push(r.slice(0, t)), n.push(i);
|
|
2153
|
+
} else n.push(r);
|
|
2154
|
+
}
|
|
2155
|
+
return n;
|
|
2156
|
+
}, vr = (e, t) => _r(t).reduce((n, r) => {
|
|
2157
|
+
if (typeof n != "object") throw new W(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);
|
|
2158
|
+
return Array.isArray(n) ? n[parseInt(r)] : n[r];
|
|
2159
|
+
}, e), yr = (e) => e != null, br = RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"), J = (e, t = !1) => {
|
|
2160
|
+
if (!t) return br.test(e);
|
|
2161
|
+
let n = e.split(".");
|
|
2162
|
+
for (let e of n) if (!J(e)) return !1;
|
|
2163
|
+
return !0;
|
|
2164
|
+
};
|
|
2165
|
+
//#endregion
|
|
2166
|
+
//#region node_modules/@smithy/util-endpoints/dist-es/lib/ite.js
|
|
2167
|
+
function xr(e, t, n) {
|
|
2168
|
+
return e ? t : n;
|
|
2169
|
+
}
|
|
2170
|
+
//#endregion
|
|
2171
|
+
//#region node_modules/@smithy/util-endpoints/dist-es/lib/not.js
|
|
2172
|
+
var Sr = (e) => !e, Cr = RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"), wr = (e) => Cr.test(e) || e.startsWith("[") && e.endsWith("]"), Tr = {
|
|
2173
|
+
[m.HTTP]: 80,
|
|
2174
|
+
[m.HTTPS]: 443
|
|
2175
|
+
}, Er = (e) => {
|
|
2176
|
+
let t = (() => {
|
|
2177
|
+
try {
|
|
2178
|
+
if (e instanceof URL) return e;
|
|
2179
|
+
if (typeof e == "object" && "hostname" in e) {
|
|
2180
|
+
let { hostname: t, port: n, protocol: r = "", path: i = "", query: a = {} } = e, o = new URL(`${r}//${t}${n ? `:${n}` : ""}${i}`);
|
|
2181
|
+
return o.search = Object.entries(a).map(([e, t]) => `${e}=${t}`).join("&"), o;
|
|
2182
|
+
}
|
|
2183
|
+
return new URL(e);
|
|
2184
|
+
} catch {
|
|
2185
|
+
return null;
|
|
2186
|
+
}
|
|
2187
|
+
})();
|
|
2188
|
+
if (!t) return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`), null;
|
|
2189
|
+
let n = t.href, { host: r, hostname: i, pathname: a, protocol: o, search: s } = t;
|
|
2190
|
+
if (s) return null;
|
|
2191
|
+
let c = o.slice(0, -1);
|
|
2192
|
+
if (!Object.values(m).includes(c)) return null;
|
|
2193
|
+
let l = wr(i);
|
|
2194
|
+
return {
|
|
2195
|
+
scheme: c,
|
|
2196
|
+
authority: `${r}${n.includes(`${r}:${Tr[c]}`) || typeof e == "string" && e.includes(`${r}:${Tr[c]}`) ? `:${Tr[c]}` : ""}`,
|
|
2197
|
+
path: a,
|
|
2198
|
+
normalizedPath: a.endsWith("/") ? a : `${a}/`,
|
|
2199
|
+
isIp: l
|
|
2200
|
+
};
|
|
2201
|
+
};
|
|
2202
|
+
//#endregion
|
|
2203
|
+
//#region node_modules/@smithy/util-endpoints/dist-es/lib/split.js
|
|
2204
|
+
function Dr(e, t, n) {
|
|
2205
|
+
if (n === 1) return [e];
|
|
2206
|
+
if (e === "") return [""];
|
|
2207
|
+
let r = e.split(t);
|
|
2208
|
+
return n === 0 ? r : r.slice(0, n - 1).concat(r.slice(1).join(t));
|
|
2209
|
+
}
|
|
2210
|
+
//#endregion
|
|
2211
|
+
//#region node_modules/@smithy/util-endpoints/dist-es/utils/endpointFunctions.js
|
|
2212
|
+
var Or = {
|
|
2213
|
+
booleanEquals: hr,
|
|
2214
|
+
coalesce: gr,
|
|
2215
|
+
getAttr: vr,
|
|
2216
|
+
isSet: yr,
|
|
2217
|
+
isValidHostLabel: J,
|
|
2218
|
+
ite: xr,
|
|
2219
|
+
not: Sr,
|
|
2220
|
+
parseURL: Er,
|
|
2221
|
+
split: Dr,
|
|
2222
|
+
stringEquals: (e, t) => e === t,
|
|
2223
|
+
substring: (e, t, n, r) => e == null || t >= n || e.length < n || /[^\u0000-\u007f]/.test(e) ? null : r ? e.substring(e.length - n, e.length - t) : e.substring(t, n),
|
|
2224
|
+
uriEncode: (e) => encodeURIComponent(e).replace(/[!*'()]/g, (e) => `%${e.charCodeAt(0).toString(16).toUpperCase()}`)
|
|
2225
|
+
}, kr = (e, t) => {
|
|
2226
|
+
let n = [], { referenceRecord: r, endpointParams: i } = t, a = 0;
|
|
2227
|
+
for (; a < e.length;) {
|
|
2228
|
+
let t = e.indexOf("{", a);
|
|
2229
|
+
if (t === -1) {
|
|
2230
|
+
n.push(e.slice(a));
|
|
2231
|
+
break;
|
|
2232
|
+
}
|
|
2233
|
+
n.push(e.slice(a, t));
|
|
2234
|
+
let o = e.indexOf("}", t);
|
|
2235
|
+
if (o === -1) {
|
|
2236
|
+
n.push(e.slice(t));
|
|
2237
|
+
break;
|
|
2238
|
+
}
|
|
2239
|
+
e[t + 1] === "{" && e[o + 1] === "}" && (n.push(e.slice(t + 1, o)), a = o + 2);
|
|
2240
|
+
let s = e.substring(t + 1, o);
|
|
2241
|
+
if (s.includes("#")) {
|
|
2242
|
+
let [e, t] = s.split("#");
|
|
2243
|
+
n.push(vr(r[e] ?? i[e], t));
|
|
2244
|
+
} else n.push(r[s] ?? i[s]);
|
|
2245
|
+
a = o + 1;
|
|
2246
|
+
}
|
|
2247
|
+
return n.join("");
|
|
2248
|
+
}, Ar = ({ ref: e }, t) => t.referenceRecord[e] ?? t.endpointParams[e], Y = (e, t, n) => {
|
|
2249
|
+
if (typeof e == "string") return kr(e, n);
|
|
2250
|
+
if (e.fn) return Mr.callFunction(e, n);
|
|
2251
|
+
if (e.ref) return Ar(e, n);
|
|
2252
|
+
throw new W(`'${t}': ${String(e)} is not a string, function or reference.`);
|
|
2253
|
+
}, jr = ({ fn: e, argv: t }, n) => {
|
|
2254
|
+
let r = Array(t.length);
|
|
2255
|
+
for (let e = 0; e < r.length; ++e) {
|
|
2256
|
+
let i = t[e];
|
|
2257
|
+
typeof i == "boolean" || typeof i == "number" ? r[e] = i : r[e] = Mr.evaluateExpression(i, "arg", n);
|
|
2258
|
+
}
|
|
2259
|
+
if (e.includes(".")) {
|
|
2260
|
+
let t = e.split(".");
|
|
2261
|
+
if (t[0] in q && t[1] != null) return q[t[0]][t[1]](...r);
|
|
2262
|
+
}
|
|
2263
|
+
if (typeof Or[e] != "function") throw Error(`function ${e} not loaded in endpointFunctions.`);
|
|
2264
|
+
let i = Or[e];
|
|
2265
|
+
return i(...r);
|
|
2266
|
+
}, Mr = {
|
|
2267
|
+
evaluateExpression: Y,
|
|
2268
|
+
callFunction: jr
|
|
2269
|
+
}, Nr = ({ assign: e, ...t }, n) => {
|
|
2270
|
+
if (e && e in n.referenceRecord) throw new W(`'${e}' is already defined in Reference Record.`);
|
|
2271
|
+
let r = jr(t, n);
|
|
2272
|
+
return n.logger?.debug?.(`${G} evaluateCondition: ${K(t)} = ${K(r)}`), {
|
|
2273
|
+
result: r === "" ? !0 : !!r,
|
|
2274
|
+
...e != null && { toAssign: {
|
|
2275
|
+
name: e,
|
|
2276
|
+
value: r
|
|
2277
|
+
} }
|
|
2278
|
+
};
|
|
2279
|
+
}, Pr = (e, t) => Object.entries(e).reduce((e, [n, r]) => ({
|
|
2280
|
+
...e,
|
|
2281
|
+
[n]: r.map((e) => {
|
|
2282
|
+
let r = Y(e, "Header value entry", t);
|
|
2283
|
+
if (typeof r != "string") throw new W(`Header '${n}' value '${r}' is not a string`);
|
|
2284
|
+
return r;
|
|
2285
|
+
})
|
|
2286
|
+
}), {}), Fr = (e, t) => Object.entries(e).reduce((e, [n, r]) => ({
|
|
2287
|
+
...e,
|
|
2288
|
+
[n]: Lr.getEndpointProperty(r, t)
|
|
2289
|
+
}), {}), Ir = (e, t) => {
|
|
2290
|
+
if (Array.isArray(e)) return e.map((e) => Ir(e, t));
|
|
2291
|
+
switch (typeof e) {
|
|
2292
|
+
case "string": return kr(e, t);
|
|
2293
|
+
case "object":
|
|
2294
|
+
if (e === null) throw new W(`Unexpected endpoint property: ${e}`);
|
|
2295
|
+
return Lr.getEndpointProperties(e, t);
|
|
2296
|
+
case "boolean": return e;
|
|
2297
|
+
default: throw new W(`Unexpected endpoint property type: ${typeof e}`);
|
|
2298
|
+
}
|
|
2299
|
+
}, Lr = {
|
|
2300
|
+
getEndpointProperty: Ir,
|
|
2301
|
+
getEndpointProperties: Fr
|
|
2302
|
+
}, Rr = (e, t) => {
|
|
2303
|
+
let n = Y(e, "Endpoint URL", t);
|
|
2304
|
+
if (typeof n == "string") try {
|
|
2305
|
+
return new URL(n);
|
|
2306
|
+
} catch (e) {
|
|
2307
|
+
throw console.error(`Failed to construct URL with ${n}`, e), e;
|
|
2308
|
+
}
|
|
2309
|
+
throw new W(`Endpoint URL must be a string, got ${typeof n}`);
|
|
2310
|
+
}, zr = (e = [], t) => {
|
|
2311
|
+
let n = {};
|
|
2312
|
+
for (let r of e) {
|
|
2313
|
+
let { result: e, toAssign: i } = Nr(r, {
|
|
2314
|
+
...t,
|
|
2315
|
+
referenceRecord: {
|
|
2316
|
+
...t.referenceRecord,
|
|
2317
|
+
...n
|
|
2318
|
+
}
|
|
2319
|
+
});
|
|
2320
|
+
if (!e) return { result: e };
|
|
2321
|
+
i && (n[i.name] = i.value, t.logger?.debug?.(`${G} assign: ${i.name} := ${K(i.value)}`));
|
|
2322
|
+
}
|
|
2323
|
+
return {
|
|
2324
|
+
result: !0,
|
|
2325
|
+
referenceRecord: n
|
|
2326
|
+
};
|
|
2327
|
+
}, Br = (e, t) => {
|
|
2328
|
+
let { conditions: n, endpoint: r } = e, { result: i, referenceRecord: a } = zr(n, t);
|
|
2329
|
+
if (!i) return;
|
|
2330
|
+
let o = {
|
|
2331
|
+
...t,
|
|
2332
|
+
referenceRecord: {
|
|
2333
|
+
...t.referenceRecord,
|
|
2334
|
+
...a
|
|
2335
|
+
}
|
|
2336
|
+
}, { url: s, properties: c, headers: l } = r;
|
|
2337
|
+
return t.logger?.debug?.(`${G} Resolving endpoint from template: ${K(r)}`), {
|
|
2338
|
+
...l != null && { headers: Pr(l, o) },
|
|
2339
|
+
...c != null && { properties: Fr(c, o) },
|
|
2340
|
+
url: Rr(s, o)
|
|
2341
|
+
};
|
|
2342
|
+
}, Vr = (e, t) => {
|
|
2343
|
+
let { conditions: n, error: r } = e, { result: i, referenceRecord: a } = zr(n, t);
|
|
2344
|
+
if (i) throw new W(Y(r, "Error", {
|
|
2345
|
+
...t,
|
|
2346
|
+
referenceRecord: {
|
|
2347
|
+
...t.referenceRecord,
|
|
2348
|
+
...a
|
|
2349
|
+
}
|
|
2350
|
+
}));
|
|
2351
|
+
}, Hr = (e, t) => {
|
|
2352
|
+
for (let n of e) if (n.type === "endpoint") {
|
|
2353
|
+
let e = Br(n, t);
|
|
2354
|
+
if (e) return e;
|
|
2355
|
+
} else if (n.type === "error") Vr(n, t);
|
|
2356
|
+
else if (n.type === "tree") {
|
|
2357
|
+
let e = Ur.evaluateTreeRule(n, t);
|
|
2358
|
+
if (e) return e;
|
|
2359
|
+
} else throw new W(`Unknown endpoint rule: ${n}`);
|
|
2360
|
+
throw new W("Rules evaluation failed");
|
|
2361
|
+
}, Ur = {
|
|
2362
|
+
evaluateRules: Hr,
|
|
2363
|
+
evaluateTreeRule: (e, t) => {
|
|
2364
|
+
let { conditions: n, rules: r } = e, { result: i, referenceRecord: a } = zr(n, t);
|
|
2365
|
+
if (i) return Ur.evaluateRules(r, {
|
|
2366
|
+
...t,
|
|
2367
|
+
referenceRecord: {
|
|
2368
|
+
...t.referenceRecord,
|
|
2369
|
+
...a
|
|
2370
|
+
}
|
|
2371
|
+
});
|
|
2372
|
+
}
|
|
2373
|
+
}, Wr = (e, t) => {
|
|
2374
|
+
let { endpointParams: n, logger: r } = t, { parameters: i, rules: a } = e;
|
|
2375
|
+
t.logger?.debug?.(`${G} Initial EndpointParams: ${K(n)}`);
|
|
2376
|
+
let o = Object.entries(i).filter(([, e]) => e.default != null).map(([e, t]) => [e, t.default]);
|
|
2377
|
+
if (o.length > 0) for (let [e, t] of o) n[e] = n[e] ?? t;
|
|
2378
|
+
let s = Object.entries(i).filter(([, e]) => e.required).map(([e]) => e);
|
|
2379
|
+
for (let e of s) if (n[e] == null) throw new W(`Missing required parameter: '${e}'`);
|
|
2380
|
+
let c = Hr(a, {
|
|
2381
|
+
endpointParams: n,
|
|
2382
|
+
logger: r,
|
|
2383
|
+
referenceRecord: {}
|
|
2384
|
+
});
|
|
2385
|
+
return t.logger?.debug?.(`${G} Resolved endpoint: ${K(c)}`), c;
|
|
2386
|
+
}, Gr = (e, t = !1) => {
|
|
2387
|
+
if (t) {
|
|
2388
|
+
for (let t of e.split(".")) if (!Gr(t)) return !1;
|
|
2389
|
+
return !0;
|
|
2390
|
+
}
|
|
2391
|
+
return !(!J(e) || e.length < 3 || e.length > 63 || e !== e.toLowerCase() || wr(e));
|
|
2392
|
+
}, Kr = ":", qr = "/", Jr = (e) => {
|
|
2393
|
+
let t = e.split(Kr);
|
|
2394
|
+
if (t.length < 6) return null;
|
|
2395
|
+
let [n, r, i, a, o, ...s] = t;
|
|
2396
|
+
return n !== "arn" || r === "" || i === "" || s.join(Kr) === "" ? null : {
|
|
2397
|
+
partition: r,
|
|
2398
|
+
service: i,
|
|
2399
|
+
region: a,
|
|
2400
|
+
accountId: o,
|
|
2401
|
+
resourceId: s.map((e) => e.split(qr)).flat()
|
|
2402
|
+
};
|
|
2403
|
+
}, Yr = {
|
|
2404
|
+
partitions: [
|
|
2405
|
+
{
|
|
2406
|
+
id: "aws",
|
|
2407
|
+
outputs: {
|
|
2408
|
+
dnsSuffix: "amazonaws.com",
|
|
2409
|
+
dualStackDnsSuffix: "api.aws",
|
|
2410
|
+
implicitGlobalRegion: "us-east-1",
|
|
2411
|
+
name: "aws",
|
|
2412
|
+
supportsDualStack: !0,
|
|
2413
|
+
supportsFIPS: !0
|
|
2414
|
+
},
|
|
2415
|
+
regionRegex: "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",
|
|
2416
|
+
regions: {
|
|
2417
|
+
"af-south-1": { description: "Africa (Cape Town)" },
|
|
2418
|
+
"ap-east-1": { description: "Asia Pacific (Hong Kong)" },
|
|
2419
|
+
"ap-east-2": { description: "Asia Pacific (Taipei)" },
|
|
2420
|
+
"ap-northeast-1": { description: "Asia Pacific (Tokyo)" },
|
|
2421
|
+
"ap-northeast-2": { description: "Asia Pacific (Seoul)" },
|
|
2422
|
+
"ap-northeast-3": { description: "Asia Pacific (Osaka)" },
|
|
2423
|
+
"ap-south-1": { description: "Asia Pacific (Mumbai)" },
|
|
2424
|
+
"ap-south-2": { description: "Asia Pacific (Hyderabad)" },
|
|
2425
|
+
"ap-southeast-1": { description: "Asia Pacific (Singapore)" },
|
|
2426
|
+
"ap-southeast-2": { description: "Asia Pacific (Sydney)" },
|
|
2427
|
+
"ap-southeast-3": { description: "Asia Pacific (Jakarta)" },
|
|
2428
|
+
"ap-southeast-4": { description: "Asia Pacific (Melbourne)" },
|
|
2429
|
+
"ap-southeast-5": { description: "Asia Pacific (Malaysia)" },
|
|
2430
|
+
"ap-southeast-6": { description: "Asia Pacific (New Zealand)" },
|
|
2431
|
+
"ap-southeast-7": { description: "Asia Pacific (Thailand)" },
|
|
2432
|
+
"aws-global": { description: "aws global region" },
|
|
2433
|
+
"ca-central-1": { description: "Canada (Central)" },
|
|
2434
|
+
"ca-west-1": { description: "Canada West (Calgary)" },
|
|
2435
|
+
"eu-central-1": { description: "Europe (Frankfurt)" },
|
|
2436
|
+
"eu-central-2": { description: "Europe (Zurich)" },
|
|
2437
|
+
"eu-north-1": { description: "Europe (Stockholm)" },
|
|
2438
|
+
"eu-south-1": { description: "Europe (Milan)" },
|
|
2439
|
+
"eu-south-2": { description: "Europe (Spain)" },
|
|
2440
|
+
"eu-west-1": { description: "Europe (Ireland)" },
|
|
2441
|
+
"eu-west-2": { description: "Europe (London)" },
|
|
2442
|
+
"eu-west-3": { description: "Europe (Paris)" },
|
|
2443
|
+
"il-central-1": { description: "Israel (Tel Aviv)" },
|
|
2444
|
+
"me-central-1": { description: "Middle East (UAE)" },
|
|
2445
|
+
"me-south-1": { description: "Middle East (Bahrain)" },
|
|
2446
|
+
"mx-central-1": { description: "Mexico (Central)" },
|
|
2447
|
+
"sa-east-1": { description: "South America (Sao Paulo)" },
|
|
2448
|
+
"us-east-1": { description: "US East (N. Virginia)" },
|
|
2449
|
+
"us-east-2": { description: "US East (Ohio)" },
|
|
2450
|
+
"us-west-1": { description: "US West (N. California)" },
|
|
2451
|
+
"us-west-2": { description: "US West (Oregon)" }
|
|
2452
|
+
}
|
|
2453
|
+
},
|
|
2454
|
+
{
|
|
2455
|
+
id: "aws-cn",
|
|
2456
|
+
outputs: {
|
|
2457
|
+
dnsSuffix: "amazonaws.com.cn",
|
|
2458
|
+
dualStackDnsSuffix: "api.amazonwebservices.com.cn",
|
|
2459
|
+
implicitGlobalRegion: "cn-northwest-1",
|
|
2460
|
+
name: "aws-cn",
|
|
2461
|
+
supportsDualStack: !0,
|
|
2462
|
+
supportsFIPS: !0
|
|
2463
|
+
},
|
|
2464
|
+
regionRegex: "^cn\\-\\w+\\-\\d+$",
|
|
2465
|
+
regions: {
|
|
2466
|
+
"aws-cn-global": { description: "aws-cn global region" },
|
|
2467
|
+
"cn-north-1": { description: "China (Beijing)" },
|
|
2468
|
+
"cn-northwest-1": { description: "China (Ningxia)" }
|
|
2469
|
+
}
|
|
2470
|
+
},
|
|
2471
|
+
{
|
|
2472
|
+
id: "aws-eusc",
|
|
2473
|
+
outputs: {
|
|
2474
|
+
dnsSuffix: "amazonaws.eu",
|
|
2475
|
+
dualStackDnsSuffix: "api.amazonwebservices.eu",
|
|
2476
|
+
implicitGlobalRegion: "eusc-de-east-1",
|
|
2477
|
+
name: "aws-eusc",
|
|
2478
|
+
supportsDualStack: !0,
|
|
2479
|
+
supportsFIPS: !0
|
|
2480
|
+
},
|
|
2481
|
+
regionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$",
|
|
2482
|
+
regions: { "eusc-de-east-1": { description: "AWS European Sovereign Cloud (Germany)" } }
|
|
2483
|
+
},
|
|
2484
|
+
{
|
|
2485
|
+
id: "aws-iso",
|
|
2486
|
+
outputs: {
|
|
2487
|
+
dnsSuffix: "c2s.ic.gov",
|
|
2488
|
+
dualStackDnsSuffix: "api.aws.ic.gov",
|
|
2489
|
+
implicitGlobalRegion: "us-iso-east-1",
|
|
2490
|
+
name: "aws-iso",
|
|
2491
|
+
supportsDualStack: !0,
|
|
2492
|
+
supportsFIPS: !0
|
|
2493
|
+
},
|
|
2494
|
+
regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
|
|
2495
|
+
regions: {
|
|
2496
|
+
"aws-iso-global": { description: "aws-iso global region" },
|
|
2497
|
+
"us-iso-east-1": { description: "US ISO East" },
|
|
2498
|
+
"us-iso-west-1": { description: "US ISO WEST" }
|
|
2499
|
+
}
|
|
2500
|
+
},
|
|
2501
|
+
{
|
|
2502
|
+
id: "aws-iso-b",
|
|
2503
|
+
outputs: {
|
|
2504
|
+
dnsSuffix: "sc2s.sgov.gov",
|
|
2505
|
+
dualStackDnsSuffix: "api.aws.scloud",
|
|
2506
|
+
implicitGlobalRegion: "us-isob-east-1",
|
|
2507
|
+
name: "aws-iso-b",
|
|
2508
|
+
supportsDualStack: !0,
|
|
2509
|
+
supportsFIPS: !0
|
|
2510
|
+
},
|
|
2511
|
+
regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
|
|
2512
|
+
regions: {
|
|
2513
|
+
"aws-iso-b-global": { description: "aws-iso-b global region" },
|
|
2514
|
+
"us-isob-east-1": { description: "US ISOB East (Ohio)" },
|
|
2515
|
+
"us-isob-west-1": { description: "US ISOB West" }
|
|
2516
|
+
}
|
|
2517
|
+
},
|
|
2518
|
+
{
|
|
2519
|
+
id: "aws-iso-e",
|
|
2520
|
+
outputs: {
|
|
2521
|
+
dnsSuffix: "cloud.adc-e.uk",
|
|
2522
|
+
dualStackDnsSuffix: "api.cloud-aws.adc-e.uk",
|
|
2523
|
+
implicitGlobalRegion: "eu-isoe-west-1",
|
|
2524
|
+
name: "aws-iso-e",
|
|
2525
|
+
supportsDualStack: !0,
|
|
2526
|
+
supportsFIPS: !0
|
|
2527
|
+
},
|
|
2528
|
+
regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$",
|
|
2529
|
+
regions: {
|
|
2530
|
+
"aws-iso-e-global": { description: "aws-iso-e global region" },
|
|
2531
|
+
"eu-isoe-west-1": { description: "EU ISOE West" }
|
|
2532
|
+
}
|
|
2533
|
+
},
|
|
2534
|
+
{
|
|
2535
|
+
id: "aws-iso-f",
|
|
2536
|
+
outputs: {
|
|
2537
|
+
dnsSuffix: "csp.hci.ic.gov",
|
|
2538
|
+
dualStackDnsSuffix: "api.aws.hci.ic.gov",
|
|
2539
|
+
implicitGlobalRegion: "us-isof-south-1",
|
|
2540
|
+
name: "aws-iso-f",
|
|
2541
|
+
supportsDualStack: !0,
|
|
2542
|
+
supportsFIPS: !0
|
|
2543
|
+
},
|
|
2544
|
+
regionRegex: "^us\\-isof\\-\\w+\\-\\d+$",
|
|
2545
|
+
regions: {
|
|
2546
|
+
"aws-iso-f-global": { description: "aws-iso-f global region" },
|
|
2547
|
+
"us-isof-east-1": { description: "US ISOF EAST" },
|
|
2548
|
+
"us-isof-south-1": { description: "US ISOF SOUTH" }
|
|
2549
|
+
}
|
|
2550
|
+
},
|
|
2551
|
+
{
|
|
2552
|
+
id: "aws-us-gov",
|
|
2553
|
+
outputs: {
|
|
2554
|
+
dnsSuffix: "amazonaws.com",
|
|
2555
|
+
dualStackDnsSuffix: "api.aws",
|
|
2556
|
+
implicitGlobalRegion: "us-gov-west-1",
|
|
2557
|
+
name: "aws-us-gov",
|
|
2558
|
+
supportsDualStack: !0,
|
|
2559
|
+
supportsFIPS: !0
|
|
2560
|
+
},
|
|
2561
|
+
regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
|
|
2562
|
+
regions: {
|
|
2563
|
+
"aws-us-gov-global": { description: "aws-us-gov global region" },
|
|
2564
|
+
"us-gov-east-1": { description: "AWS GovCloud (US-East)" },
|
|
2565
|
+
"us-gov-west-1": { description: "AWS GovCloud (US-West)" }
|
|
2566
|
+
}
|
|
2567
|
+
}
|
|
2568
|
+
],
|
|
2569
|
+
version: "1.1"
|
|
2570
|
+
}, Xr = "", Zr = (e) => {
|
|
2571
|
+
let { partitions: t } = Yr;
|
|
2572
|
+
for (let n of t) {
|
|
2573
|
+
let { regions: t, outputs: r } = n;
|
|
2574
|
+
for (let [n, i] of Object.entries(t)) if (n === e) return {
|
|
2575
|
+
...r,
|
|
2576
|
+
...i
|
|
2577
|
+
};
|
|
2578
|
+
}
|
|
2579
|
+
for (let n of t) {
|
|
2580
|
+
let { regionRegex: t, outputs: r } = n;
|
|
2581
|
+
if (new RegExp(t).test(e)) return { ...r };
|
|
2582
|
+
}
|
|
2583
|
+
let n = t.find((e) => e.id === "aws");
|
|
2584
|
+
if (!n) throw Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");
|
|
2585
|
+
return { ...n.outputs };
|
|
2586
|
+
}, Qr = () => Xr, $r = {
|
|
2587
|
+
isVirtualHostableS3Bucket: Gr,
|
|
2588
|
+
parseArn: Jr,
|
|
2589
|
+
partition: Zr
|
|
2590
|
+
};
|
|
2591
|
+
q.aws = $r;
|
|
2592
|
+
//#endregion
|
|
2593
|
+
//#region node_modules/@smithy/util-retry/dist-es/config.js
|
|
2594
|
+
var X;
|
|
2595
|
+
(function(e) {
|
|
2596
|
+
e.STANDARD = "standard", e.ADAPTIVE = "adaptive";
|
|
2597
|
+
})(X ||= {});
|
|
2598
|
+
var ei = X.STANDARD, ti = [
|
|
2599
|
+
"BandwidthLimitExceeded",
|
|
2600
|
+
"EC2ThrottledException",
|
|
2601
|
+
"LimitExceededException",
|
|
2602
|
+
"PriorRequestNotComplete",
|
|
2603
|
+
"ProvisionedThroughputExceededException",
|
|
2604
|
+
"RequestLimitExceeded",
|
|
2605
|
+
"RequestThrottled",
|
|
2606
|
+
"RequestThrottledException",
|
|
2607
|
+
"SlowDown",
|
|
2608
|
+
"ThrottledException",
|
|
2609
|
+
"Throttling",
|
|
2610
|
+
"ThrottlingException",
|
|
2611
|
+
"TooManyRequestsException",
|
|
2612
|
+
"TransactionInProgressException"
|
|
2613
|
+
], ni = [
|
|
2614
|
+
"TimeoutError",
|
|
2615
|
+
"RequestTimeout",
|
|
2616
|
+
"RequestTimeoutException"
|
|
2617
|
+
], ri = [
|
|
2618
|
+
500,
|
|
2619
|
+
502,
|
|
2620
|
+
503,
|
|
2621
|
+
504
|
|
2622
|
+
], ii = [
|
|
2623
|
+
"ECONNRESET",
|
|
2624
|
+
"ECONNREFUSED",
|
|
2625
|
+
"EPIPE",
|
|
2626
|
+
"ETIMEDOUT"
|
|
2627
|
+
], ai = [
|
|
2628
|
+
"EHOSTUNREACH",
|
|
2629
|
+
"ENETUNREACH",
|
|
2630
|
+
"ENOTFOUND"
|
|
2631
|
+
], oi = (e) => e?.$retryable !== void 0, si = (e) => e.$metadata?.clockSkewCorrected, ci = (e) => {
|
|
2632
|
+
let t = new Set([
|
|
2633
|
+
"Failed to fetch",
|
|
2634
|
+
"NetworkError when attempting to fetch resource",
|
|
2635
|
+
"The Internet connection appears to be offline",
|
|
2636
|
+
"Load failed",
|
|
2637
|
+
"Network request failed"
|
|
2638
|
+
]);
|
|
2639
|
+
return e && e instanceof TypeError ? t.has(e.message) : !1;
|
|
2640
|
+
}, li = (e) => e.$metadata?.httpStatusCode === 429 || ti.includes(e.name) || e.$retryable?.throttling == 1, ui = (e, t = 0) => oi(e) || si(e) || ni.includes(e.name) || ii.includes(e?.code || "") || ai.includes(e?.code || "") || ri.includes(e.$metadata?.httpStatusCode || 0) || ci(e) || e.cause !== void 0 && t <= 10 && ui(e.cause, t + 1), di = (e) => {
|
|
2641
|
+
if (e.$metadata?.httpStatusCode !== void 0) {
|
|
2642
|
+
let t = e.$metadata.httpStatusCode;
|
|
2643
|
+
return 500 <= t && t <= 599 && !ui(e);
|
|
2644
|
+
}
|
|
2645
|
+
return !1;
|
|
2646
|
+
}, fi = class e {
|
|
2647
|
+
static setTimeoutFn = setTimeout;
|
|
2648
|
+
beta;
|
|
2649
|
+
minCapacity;
|
|
2650
|
+
minFillRate;
|
|
2651
|
+
scaleConstant;
|
|
2652
|
+
smooth;
|
|
2653
|
+
enabled = !1;
|
|
2654
|
+
availableTokens = 0;
|
|
2655
|
+
lastMaxRate = 0;
|
|
2656
|
+
measuredTxRate = 0;
|
|
2657
|
+
requestCount = 0;
|
|
2658
|
+
fillRate;
|
|
2659
|
+
lastThrottleTime;
|
|
2660
|
+
lastTimestamp = 0;
|
|
2661
|
+
lastTxRateBucket;
|
|
2662
|
+
maxCapacity;
|
|
2663
|
+
timeWindow = 0;
|
|
2664
|
+
constructor(e) {
|
|
2665
|
+
this.beta = e?.beta ?? .7, this.minCapacity = e?.minCapacity ?? 1, this.minFillRate = e?.minFillRate ?? .5, this.scaleConstant = e?.scaleConstant ?? .4, this.smooth = e?.smooth ?? .8, this.lastThrottleTime = this.getCurrentTimeInSeconds(), this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds()), this.fillRate = this.minFillRate, this.maxCapacity = this.minCapacity;
|
|
2666
|
+
}
|
|
2667
|
+
async getSendToken() {
|
|
2668
|
+
return this.acquireTokenBucket(1);
|
|
2669
|
+
}
|
|
2670
|
+
updateClientSendingRate(e) {
|
|
2671
|
+
let t;
|
|
2672
|
+
this.updateMeasuredRate();
|
|
2673
|
+
let n = e;
|
|
2674
|
+
if (n?.errorType === "THROTTLING" || li(n?.error ?? e)) {
|
|
2675
|
+
let e = this.enabled ? Math.min(this.measuredTxRate, this.fillRate) : this.measuredTxRate;
|
|
2676
|
+
this.lastMaxRate = e, this.calculateTimeWindow(), this.lastThrottleTime = this.getCurrentTimeInSeconds(), t = this.cubicThrottle(e), this.enableTokenBucket();
|
|
2677
|
+
} else this.calculateTimeWindow(), t = this.cubicSuccess(this.getCurrentTimeInSeconds());
|
|
2678
|
+
let r = Math.min(t, 2 * this.measuredTxRate);
|
|
2679
|
+
this.updateTokenBucketRate(r);
|
|
2680
|
+
}
|
|
2681
|
+
getCurrentTimeInSeconds() {
|
|
2682
|
+
return Date.now() / 1e3;
|
|
2683
|
+
}
|
|
2684
|
+
async acquireTokenBucket(t) {
|
|
2685
|
+
if (this.enabled) {
|
|
2686
|
+
if (this.refillTokenBucket(), t > this.availableTokens) {
|
|
2687
|
+
let n = (t - this.availableTokens) / this.fillRate * 1e3;
|
|
2688
|
+
await new Promise((t) => e.setTimeoutFn(t, n));
|
|
2689
|
+
}
|
|
2690
|
+
this.availableTokens -= t;
|
|
2691
|
+
}
|
|
2692
|
+
}
|
|
2693
|
+
refillTokenBucket() {
|
|
2694
|
+
let e = this.getCurrentTimeInSeconds();
|
|
2695
|
+
if (!this.lastTimestamp) {
|
|
2696
|
+
this.lastTimestamp = e;
|
|
2697
|
+
return;
|
|
2698
|
+
}
|
|
2699
|
+
let t = (e - this.lastTimestamp) * this.fillRate;
|
|
2700
|
+
this.availableTokens = Math.min(this.maxCapacity, this.availableTokens + t), this.lastTimestamp = e;
|
|
2701
|
+
}
|
|
2702
|
+
calculateTimeWindow() {
|
|
2703
|
+
this.timeWindow = this.getPrecise((this.lastMaxRate * (1 - this.beta) / this.scaleConstant) ** (1 / 3));
|
|
2704
|
+
}
|
|
2705
|
+
cubicThrottle(e) {
|
|
2706
|
+
return this.getPrecise(e * this.beta);
|
|
2707
|
+
}
|
|
2708
|
+
cubicSuccess(e) {
|
|
2709
|
+
return this.getPrecise(this.scaleConstant * (e - this.lastThrottleTime - this.timeWindow) ** 3 + this.lastMaxRate);
|
|
2710
|
+
}
|
|
2711
|
+
enableTokenBucket() {
|
|
2712
|
+
this.enabled = !0;
|
|
2713
|
+
}
|
|
2714
|
+
updateTokenBucketRate(e) {
|
|
2715
|
+
this.refillTokenBucket(), this.fillRate = Math.max(e, this.minFillRate), this.maxCapacity = Math.max(e, this.minCapacity), this.availableTokens = Math.min(this.availableTokens, this.maxCapacity);
|
|
2716
|
+
}
|
|
2717
|
+
updateMeasuredRate() {
|
|
2718
|
+
let e = this.getCurrentTimeInSeconds(), t = Math.floor(e * 2) / 2;
|
|
2719
|
+
if (this.requestCount++, t > this.lastTxRateBucket) {
|
|
2720
|
+
let e = this.requestCount / (t - this.lastTxRateBucket);
|
|
2721
|
+
this.measuredTxRate = this.getPrecise(e * this.smooth + this.measuredTxRate * (1 - this.smooth)), this.requestCount = 0, this.lastTxRateBucket = t;
|
|
2722
|
+
}
|
|
2723
|
+
}
|
|
2724
|
+
getPrecise(e) {
|
|
2725
|
+
return parseFloat(e.toFixed(8));
|
|
2726
|
+
}
|
|
2727
|
+
}, pi = 20 * 1e3, mi = "amz-sdk-invocation-id", hi = "amz-sdk-request", Z = class e {
|
|
2728
|
+
static v2026 = typeof process < "u" && process.env?.SMITHY_NEW_RETRIES_2026 === "true";
|
|
2729
|
+
static delay() {
|
|
2730
|
+
return e.v2026 ? 50 : 100;
|
|
2731
|
+
}
|
|
2732
|
+
static throttlingDelay() {
|
|
2733
|
+
return e.v2026 ? 1e3 : 500;
|
|
2734
|
+
}
|
|
2735
|
+
static cost() {
|
|
2736
|
+
return e.v2026 ? 14 : 5;
|
|
2737
|
+
}
|
|
2738
|
+
static throttlingCost() {
|
|
2739
|
+
return e.v2026 ? 5 : 10;
|
|
2740
|
+
}
|
|
2741
|
+
static modifiedCostType() {
|
|
2742
|
+
return e.v2026 ? "THROTTLING" : "TRANSIENT";
|
|
2743
|
+
}
|
|
2744
|
+
}, gi = class {
|
|
2745
|
+
x = Z.delay();
|
|
2746
|
+
computeNextBackoffDelay(e) {
|
|
2747
|
+
let t = Math.random() * Math.min(this.x * 2 ** e, pi);
|
|
2748
|
+
return Math.floor(t);
|
|
2749
|
+
}
|
|
2750
|
+
setDelayBase(e) {
|
|
2751
|
+
this.x = e;
|
|
2752
|
+
}
|
|
2753
|
+
}, _i = class {
|
|
2754
|
+
delay;
|
|
2755
|
+
count;
|
|
2756
|
+
cost;
|
|
2757
|
+
longPoll;
|
|
2758
|
+
constructor(e, t, n, r) {
|
|
2759
|
+
this.delay = e, this.count = t, this.cost = n, this.longPoll = r;
|
|
2760
|
+
}
|
|
2761
|
+
getRetryCount() {
|
|
2762
|
+
return this.count;
|
|
2763
|
+
}
|
|
2764
|
+
getRetryDelay() {
|
|
2765
|
+
return Math.min(pi, this.delay);
|
|
2766
|
+
}
|
|
2767
|
+
getRetryCost() {
|
|
2768
|
+
return this.cost;
|
|
2769
|
+
}
|
|
2770
|
+
isLongPoll() {
|
|
2771
|
+
return this.longPoll;
|
|
2772
|
+
}
|
|
2773
|
+
}, vi = class {
|
|
2774
|
+
mode = X.STANDARD;
|
|
2775
|
+
capacity = 500;
|
|
2776
|
+
retryBackoffStrategy;
|
|
2777
|
+
maxAttemptsProvider;
|
|
2778
|
+
baseDelay;
|
|
2779
|
+
constructor(e) {
|
|
2780
|
+
typeof e == "number" ? this.maxAttemptsProvider = async () => e : typeof e == "function" ? this.maxAttemptsProvider = e : e && typeof e == "object" && (this.maxAttemptsProvider = async () => e.maxAttempts, this.baseDelay = e.baseDelay, this.retryBackoffStrategy = e.backoff), this.maxAttemptsProvider ??= async () => 3, this.baseDelay ??= Z.delay(), this.retryBackoffStrategy ??= new gi();
|
|
2781
|
+
}
|
|
2782
|
+
async acquireInitialRetryToken(e) {
|
|
2783
|
+
return new _i(Z.delay(), 0, void 0, Z.v2026 && e.includes(":longpoll"));
|
|
2784
|
+
}
|
|
2785
|
+
async refreshRetryTokenForRetry(e, t) {
|
|
2786
|
+
let n = await this.getMaxAttempts(), r = this.shouldRetry(e, t, n);
|
|
2787
|
+
if (r || e.isLongPoll?.()) {
|
|
2788
|
+
let n = t.errorType;
|
|
2789
|
+
this.retryBackoffStrategy.setDelayBase(n === "THROTTLING" ? Z.throttlingDelay() : this.baseDelay);
|
|
2790
|
+
let i = this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()), a = i;
|
|
2791
|
+
if (t.retryAfterHint instanceof Date && (a = Math.max(i, Math.min(t.retryAfterHint.getTime() - Date.now(), i + 5e3))), r) {
|
|
2792
|
+
let t = this.getCapacityCost(n);
|
|
2793
|
+
return this.capacity -= t, new _i(a, e.getRetryCount() + 1, t, e.isLongPoll?.() ?? !1);
|
|
2794
|
+
} else throw Object.assign(/* @__PURE__ */ Error("No retry token available"), { $backoff: Z.v2026 ? a : 0 });
|
|
2795
|
+
}
|
|
2796
|
+
throw Error("No retry token available");
|
|
2797
|
+
}
|
|
2798
|
+
recordSuccess(e) {
|
|
2799
|
+
this.capacity = Math.min(500, this.capacity + (e.getRetryCost() ?? 1));
|
|
2800
|
+
}
|
|
2801
|
+
getCapacity() {
|
|
2802
|
+
return this.capacity;
|
|
2803
|
+
}
|
|
2804
|
+
async getMaxAttempts() {
|
|
2805
|
+
try {
|
|
2806
|
+
return await this.maxAttemptsProvider();
|
|
2807
|
+
} catch {
|
|
2808
|
+
return console.warn("Max attempts provider could not resolve. Using default of 3"), 3;
|
|
2809
|
+
}
|
|
2810
|
+
}
|
|
2811
|
+
shouldRetry(e, t, n) {
|
|
2812
|
+
return e.getRetryCount() + 1 < n && this.capacity >= this.getCapacityCost(t.errorType) && this.isRetryableError(t.errorType);
|
|
2813
|
+
}
|
|
2814
|
+
getCapacityCost(e) {
|
|
2815
|
+
return e === Z.modifiedCostType() ? Z.throttlingCost() : Z.cost();
|
|
2816
|
+
}
|
|
2817
|
+
isRetryableError(e) {
|
|
2818
|
+
return e === "THROTTLING" || e === "TRANSIENT";
|
|
2819
|
+
}
|
|
2820
|
+
async maxAttempts() {
|
|
2821
|
+
return this.maxAttemptsProvider();
|
|
2822
|
+
}
|
|
2823
|
+
}, yi = class {
|
|
2824
|
+
mode = X.ADAPTIVE;
|
|
2825
|
+
rateLimiter;
|
|
2826
|
+
standardRetryStrategy;
|
|
2827
|
+
constructor(e, t) {
|
|
2828
|
+
let { rateLimiter: n } = t ?? {};
|
|
2829
|
+
this.rateLimiter = n ?? new fi(), this.standardRetryStrategy = t ? new vi({
|
|
2830
|
+
maxAttempts: typeof e == "number" ? e : 3,
|
|
2831
|
+
...t
|
|
2832
|
+
}) : new vi(e);
|
|
2833
|
+
}
|
|
2834
|
+
async acquireInitialRetryToken(e) {
|
|
2835
|
+
return await this.rateLimiter.getSendToken(), this.standardRetryStrategy.acquireInitialRetryToken(e);
|
|
2836
|
+
}
|
|
2837
|
+
async refreshRetryTokenForRetry(e, t) {
|
|
2838
|
+
return this.rateLimiter.updateClientSendingRate(t), this.standardRetryStrategy.refreshRetryTokenForRetry(e, t);
|
|
2839
|
+
}
|
|
2840
|
+
recordSuccess(e) {
|
|
2841
|
+
this.rateLimiter.updateClientSendingRate({}), this.standardRetryStrategy.recordSuccess(e);
|
|
2842
|
+
}
|
|
2843
|
+
async maxAttemptsProvider() {
|
|
2844
|
+
return this.standardRetryStrategy.maxAttempts();
|
|
2845
|
+
}
|
|
2846
|
+
}, bi = /\d{12}\.ddb/;
|
|
2847
|
+
async function xi(e, t, n) {
|
|
2848
|
+
if (n.request?.headers?.["smithy-protocol"] === "rpc-v2-cbor" && y(e, "PROTOCOL_RPC_V2_CBOR", "M"), typeof t.retryStrategy == "function") {
|
|
2849
|
+
let n = await t.retryStrategy();
|
|
2850
|
+
if (typeof n.mode == "string") switch (n.mode) {
|
|
2851
|
+
case X.ADAPTIVE:
|
|
2852
|
+
y(e, "RETRY_MODE_ADAPTIVE", "F");
|
|
2853
|
+
break;
|
|
2854
|
+
case X.STANDARD:
|
|
2855
|
+
y(e, "RETRY_MODE_STANDARD", "E");
|
|
2856
|
+
break;
|
|
2857
|
+
}
|
|
2858
|
+
}
|
|
2859
|
+
if (typeof t.accountIdEndpointMode == "function") {
|
|
2860
|
+
let n = e.endpointV2;
|
|
2861
|
+
switch (String(n?.url?.hostname).match(bi) && y(e, "ACCOUNT_ID_ENDPOINT", "O"), await t.accountIdEndpointMode?.()) {
|
|
2862
|
+
case "disabled":
|
|
2863
|
+
y(e, "ACCOUNT_ID_MODE_DISABLED", "Q");
|
|
2864
|
+
break;
|
|
2865
|
+
case "preferred":
|
|
2866
|
+
y(e, "ACCOUNT_ID_MODE_PREFERRED", "P");
|
|
2867
|
+
break;
|
|
2868
|
+
case "required":
|
|
2869
|
+
y(e, "ACCOUNT_ID_MODE_REQUIRED", "R");
|
|
2870
|
+
break;
|
|
2871
|
+
}
|
|
2872
|
+
}
|
|
2873
|
+
let r = e.__smithy_context?.selectedHttpAuthScheme?.identity;
|
|
2874
|
+
if (r?.$source) {
|
|
2875
|
+
let t = r;
|
|
2876
|
+
t.accountId && y(e, "RESOLVED_ACCOUNT_ID", "T");
|
|
2877
|
+
for (let [n, r] of Object.entries(t.$source ?? {})) y(e, n, r);
|
|
2878
|
+
}
|
|
2879
|
+
}
|
|
2880
|
+
//#endregion
|
|
2881
|
+
//#region node_modules/@aws-sdk/middleware-user-agent/dist-es/constants.js
|
|
2882
|
+
var Si = "user-agent", Ci = "x-amz-user-agent", wi = /[^!$%&'*+\-.^_`|~\w]/g, Ti = /[^!$%&'*+\-.^_`|~\w#]/g, Ei = 1024;
|
|
2883
|
+
function Di(e) {
|
|
2884
|
+
let t = "";
|
|
2885
|
+
for (let n in e) {
|
|
2886
|
+
let r = e[n];
|
|
2887
|
+
if (t.length + r.length + 1 <= Ei) {
|
|
2888
|
+
t.length ? t += "," + r : t += r;
|
|
2889
|
+
continue;
|
|
2890
|
+
}
|
|
2891
|
+
break;
|
|
2892
|
+
}
|
|
2893
|
+
return t;
|
|
2894
|
+
}
|
|
2895
|
+
//#endregion
|
|
2896
|
+
//#region node_modules/@aws-sdk/middleware-user-agent/dist-es/user-agent-middleware.js
|
|
2897
|
+
var Oi = (e) => (t, n) => async (r) => {
|
|
2898
|
+
let { request: i } = r;
|
|
2899
|
+
if (!_.isInstance(i)) return t(r);
|
|
2900
|
+
let { headers: a } = i, o = n?.userAgent?.map(ki) || [], s = (await e.defaultUserAgentProvider()).map(ki);
|
|
2901
|
+
await xi(n, e, r);
|
|
2902
|
+
let c = n;
|
|
2903
|
+
s.push(`m/${Di(Object.assign({}, n.__smithy_context?.features, c.__aws_sdk_context?.features))}`);
|
|
2904
|
+
let l = e?.customUserAgent?.map(ki) || [], u = await e.userAgentAppId();
|
|
2905
|
+
u && s.push(ki(["app", `${u}`]));
|
|
2906
|
+
let d = Qr(), f = (d ? [d] : []).concat([
|
|
2907
|
+
...s,
|
|
2908
|
+
...o,
|
|
2909
|
+
...l
|
|
2910
|
+
]).join(" "), p = [...s.filter((e) => e.startsWith("aws-sdk-")), ...l].join(" ");
|
|
2911
|
+
return e.runtime === "browser" ? a[Ci] = f : (p && (a[Ci] = a["x-amz-user-agent"] ? `${a[Si]} ${p}` : p), a[Si] = f), t({
|
|
2912
|
+
...r,
|
|
2913
|
+
request: i
|
|
2914
|
+
});
|
|
2915
|
+
}, ki = (e) => {
|
|
2916
|
+
let t = e[0].split("/").map((e) => e.replace(wi, "-")).join("/"), n = e[1]?.replace(Ti, "-"), r = t.indexOf("/"), i = t.substring(0, r), a = t.substring(r + 1);
|
|
2917
|
+
return i === "api" && (a = a.toLowerCase()), [
|
|
2918
|
+
i,
|
|
2919
|
+
a,
|
|
2920
|
+
n
|
|
2921
|
+
].filter((e) => e && e.length > 0).reduce((e, t, n) => {
|
|
2922
|
+
switch (n) {
|
|
2923
|
+
case 0: return t;
|
|
2924
|
+
case 1: return `${e}/${t}`;
|
|
2925
|
+
default: return `${e}#${t}`;
|
|
2926
|
+
}
|
|
2927
|
+
}, "");
|
|
2928
|
+
}, Ai = {
|
|
2929
|
+
name: "getUserAgentMiddleware",
|
|
2930
|
+
step: "build",
|
|
2931
|
+
priority: "low",
|
|
2932
|
+
tags: ["SET_USER_AGENT", "USER_AGENT"],
|
|
2933
|
+
override: !0
|
|
2934
|
+
}, ji = (e) => ({ applyToStack: (t) => {
|
|
2935
|
+
t.add(Oi(e), Ai);
|
|
2936
|
+
} }), Mi = /* @__PURE__ */ new Set(), Ni = (e, t = J) => {
|
|
2937
|
+
if (!Mi.has(e) && !t(e)) if (e === "*") console.warn("@smithy/config-resolver WARN - Please use the caller region instead of \"*\". See \"sigv4a\" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.");
|
|
2938
|
+
else throw Error(`Region not accepted: region="${e}" is not a valid hostname component.`);
|
|
2939
|
+
else Mi.add(e);
|
|
2940
|
+
}, Pi = (e) => typeof e == "string" && (e.startsWith("fips-") || e.endsWith("-fips")), Fi = (e) => Pi(e) ? ["fips-aws-global", "aws-fips"].includes(e) ? "us-east-1" : e.replace(/fips-(dkr-|prod-)?|-fips/, "") : e, Ii = (e) => {
|
|
2941
|
+
let { region: t, useFipsEndpoint: n } = e;
|
|
2942
|
+
if (!t) throw Error("Region is missing");
|
|
2943
|
+
return Object.assign(e, {
|
|
2944
|
+
region: async () => {
|
|
2945
|
+
let e = Fi(typeof t == "function" ? await t() : t);
|
|
2946
|
+
return Ni(e), e;
|
|
2947
|
+
},
|
|
2948
|
+
useFipsEndpoint: async () => Pi(typeof t == "string" ? t : await t()) ? !0 : typeof n == "function" ? n() : Promise.resolve(!!n)
|
|
2949
|
+
});
|
|
2950
|
+
}, Li = "content-length";
|
|
2951
|
+
function Ri(e) {
|
|
2952
|
+
return (t) => async (n) => {
|
|
2953
|
+
let r = n.request;
|
|
2954
|
+
if (_.isInstance(r)) {
|
|
2955
|
+
let { body: t, headers: n } = r;
|
|
2956
|
+
if (t && Object.keys(n).map((e) => e.toLowerCase()).indexOf(Li) === -1) try {
|
|
2957
|
+
let n = e(t);
|
|
2958
|
+
r.headers = {
|
|
2959
|
+
...r.headers,
|
|
2960
|
+
[Li]: String(n)
|
|
2961
|
+
};
|
|
2962
|
+
} catch {}
|
|
2963
|
+
}
|
|
2964
|
+
return t({
|
|
2965
|
+
...n,
|
|
2966
|
+
request: r
|
|
2967
|
+
});
|
|
2968
|
+
};
|
|
2969
|
+
}
|
|
2970
|
+
var zi = {
|
|
2971
|
+
step: "build",
|
|
2972
|
+
tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"],
|
|
2973
|
+
name: "contentLengthMiddleware",
|
|
2974
|
+
override: !0
|
|
2975
|
+
}, Bi = (e) => ({ applyToStack: (t) => {
|
|
2976
|
+
t.add(Ri(e.bodyLengthChecker), zi);
|
|
2977
|
+
} }), Vi = async (e) => {
|
|
2978
|
+
let t = e?.Bucket || "";
|
|
2979
|
+
if (typeof e.Bucket == "string" && (e.Bucket = t.replace(/#/g, "%23").replace(/\?/g, "%3F")), Ki(t)) {
|
|
2980
|
+
if (e.ForcePathStyle === !0) throw Error("Path-style addressing cannot be used with ARN buckets");
|
|
2981
|
+
} else (!Gi(t) || t.indexOf(".") !== -1 && !String(e.Endpoint).startsWith("http:") || t.toLowerCase() !== t || t.length < 3) && (e.ForcePathStyle = !0);
|
|
2982
|
+
return e.DisableMultiRegionAccessPoints && (e.disableMultiRegionAccessPoints = !0, e.DisableMRAP = !0), e;
|
|
2983
|
+
}, Hi = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/, Ui = /(\d+\.){3}\d+/, Wi = /\.\./, Gi = (e) => Hi.test(e) && !Ui.test(e) && !Wi.test(e), Ki = (e) => {
|
|
2984
|
+
let [t, n, r, , , i] = e.split(":"), a = t === "arn" && e.split(":").length >= 6, o = !!(a && n && r && i);
|
|
2985
|
+
if (a && !o) throw Error(`Invalid ARN: ${e} was an invalid ARN.`);
|
|
2986
|
+
return o;
|
|
2987
|
+
}, qi = (e, t, n, r = !1) => {
|
|
2988
|
+
let i = async () => {
|
|
2989
|
+
let i;
|
|
2990
|
+
return i = r ? n.clientContextParams?.[e] ?? n[e] ?? n[t] : n[e] ?? n[t], typeof i == "function" ? i() : i;
|
|
2991
|
+
};
|
|
2992
|
+
return e === "credentialScope" || t === "CredentialScope" ? async () => {
|
|
2993
|
+
let e = typeof n.credentials == "function" ? await n.credentials() : n.credentials;
|
|
2994
|
+
return e?.credentialScope ?? e?.CredentialScope;
|
|
2995
|
+
} : e === "accountId" || t === "AccountId" ? async () => {
|
|
2996
|
+
let e = typeof n.credentials == "function" ? await n.credentials() : n.credentials;
|
|
2997
|
+
return e?.accountId ?? e?.AccountId;
|
|
2998
|
+
} : e === "endpoint" || t === "endpoint" ? async () => {
|
|
2999
|
+
if (n.isCustomEndpoint === !1) return;
|
|
3000
|
+
let e = await i();
|
|
3001
|
+
if (e && typeof e == "object") {
|
|
3002
|
+
if ("url" in e) return e.url.href;
|
|
3003
|
+
if ("hostname" in e) {
|
|
3004
|
+
let { protocol: t, hostname: n, port: r, path: i } = e;
|
|
3005
|
+
return `${t}//${n}${r ? ":" + r : ""}${i}`;
|
|
3006
|
+
}
|
|
3007
|
+
}
|
|
3008
|
+
return e;
|
|
3009
|
+
} : i;
|
|
3010
|
+
}, Ji = async (e) => void 0, Yi = (e) => {
|
|
3011
|
+
if (typeof e == "object") {
|
|
3012
|
+
if ("url" in e) {
|
|
3013
|
+
let t = j(e.url);
|
|
3014
|
+
if (e.headers) {
|
|
3015
|
+
t.headers = {};
|
|
3016
|
+
for (let [n, r] of Object.entries(e.headers)) t.headers[n.toLowerCase()] = r.join(", ");
|
|
3017
|
+
}
|
|
3018
|
+
return t;
|
|
3019
|
+
}
|
|
3020
|
+
return e;
|
|
3021
|
+
}
|
|
3022
|
+
return j(e);
|
|
3023
|
+
}, Xi = async (e, t, n, r) => {
|
|
3024
|
+
if (!n.isCustomEndpoint) {
|
|
3025
|
+
let e;
|
|
3026
|
+
e = n.serviceConfiguredEndpoint ? await n.serviceConfiguredEndpoint() : await Ji(n.serviceId), e && (n.endpoint = () => Promise.resolve(Yi(e)), n.isCustomEndpoint = !0);
|
|
3027
|
+
}
|
|
3028
|
+
let i = await Zi(e, t, n);
|
|
3029
|
+
if (typeof n.endpointProvider != "function") throw Error("config.endpointProvider is not set.");
|
|
3030
|
+
let a = n.endpointProvider(i, r);
|
|
3031
|
+
if (n.isCustomEndpoint && n.endpoint) {
|
|
3032
|
+
let e = await n.endpoint();
|
|
3033
|
+
if (e?.headers) {
|
|
3034
|
+
a.headers ??= {};
|
|
3035
|
+
for (let [t, n] of Object.entries(e.headers)) a.headers[t] = Array.isArray(n) ? n : [n];
|
|
3036
|
+
}
|
|
3037
|
+
}
|
|
3038
|
+
return a;
|
|
3039
|
+
}, Zi = async (e, t, n) => {
|
|
3040
|
+
let r = {}, i = t?.getEndpointParameterInstructions?.() || {};
|
|
3041
|
+
for (let [t, a] of Object.entries(i)) switch (a.type) {
|
|
3042
|
+
case "staticContextParams":
|
|
3043
|
+
r[t] = a.value;
|
|
3044
|
+
break;
|
|
3045
|
+
case "contextParams":
|
|
3046
|
+
r[t] = e[a.name];
|
|
3047
|
+
break;
|
|
3048
|
+
case "clientContextParams":
|
|
3049
|
+
case "builtInParams":
|
|
3050
|
+
r[t] = await qi(a.name, t, n, a.type !== "builtInParams")();
|
|
3051
|
+
break;
|
|
3052
|
+
case "operationContextParams":
|
|
3053
|
+
r[t] = a.get(e);
|
|
3054
|
+
break;
|
|
3055
|
+
default: throw Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(a));
|
|
3056
|
+
}
|
|
3057
|
+
return Object.keys(i).length === 0 && Object.assign(r, n), String(n.serviceId).toLowerCase() === "s3" && await Vi(r), r;
|
|
3058
|
+
}, Qi = ({ config: e, instructions: t }) => (n, r) => async (i) => {
|
|
3059
|
+
e.isCustomEndpoint && tr(r, "ENDPOINT_OVERRIDE", "N");
|
|
3060
|
+
let a = await Xi(i.input, { getEndpointParameterInstructions() {
|
|
3061
|
+
return t;
|
|
3062
|
+
} }, { ...e }, r);
|
|
3063
|
+
r.endpointV2 = a, r.authSchemes = a.properties?.authSchemes;
|
|
3064
|
+
let o = r.authSchemes?.[0];
|
|
3065
|
+
if (o) {
|
|
3066
|
+
r.signing_region = o.signingRegion, r.signing_service = o.signingName;
|
|
3067
|
+
let e = T(r)?.selectedHttpAuthScheme?.httpAuthOption;
|
|
3068
|
+
e && (e.signingProperties = Object.assign(e.signingProperties || {}, {
|
|
3069
|
+
signing_region: o.signingRegion,
|
|
3070
|
+
signingRegion: o.signingRegion,
|
|
3071
|
+
signing_service: o.signingName,
|
|
3072
|
+
signingName: o.signingName,
|
|
3073
|
+
signingRegionSet: o.signingRegionSet
|
|
3074
|
+
}, o.properties));
|
|
3075
|
+
}
|
|
3076
|
+
return n({ ...i });
|
|
3077
|
+
}, $i = {
|
|
3078
|
+
step: "serialize",
|
|
3079
|
+
tags: [
|
|
3080
|
+
"ENDPOINT_PARAMETERS",
|
|
3081
|
+
"ENDPOINT_V2",
|
|
3082
|
+
"ENDPOINT"
|
|
3083
|
+
],
|
|
3084
|
+
name: "endpointV2Middleware",
|
|
3085
|
+
override: !0,
|
|
3086
|
+
relation: "before",
|
|
3087
|
+
toMiddleware: {
|
|
3088
|
+
name: "serializerMiddleware",
|
|
3089
|
+
step: "serialize",
|
|
3090
|
+
tags: ["SERIALIZER"],
|
|
3091
|
+
override: !0
|
|
3092
|
+
}.name
|
|
3093
|
+
}, ea = (e, t) => ({ applyToStack: (n) => {
|
|
3094
|
+
n.addRelativeTo(Qi({
|
|
3095
|
+
config: e,
|
|
3096
|
+
instructions: t
|
|
3097
|
+
}), $i);
|
|
3098
|
+
} }), ta = (e) => {
|
|
3099
|
+
let t = e.tls ?? !0, { endpoint: n, useDualstackEndpoint: r, useFipsEndpoint: i } = e, a = Object.assign(e, {
|
|
3100
|
+
endpoint: n == null ? void 0 : async () => Yi(await E(n)()),
|
|
3101
|
+
tls: t,
|
|
3102
|
+
isCustomEndpoint: !!n,
|
|
3103
|
+
useDualstackEndpoint: E(r ?? !1),
|
|
3104
|
+
useFipsEndpoint: E(i ?? !1)
|
|
3105
|
+
}), o;
|
|
3106
|
+
return a.serviceConfiguredEndpoint = async () => (e.serviceId && !o && (o = Ji(e.serviceId)), o), a;
|
|
3107
|
+
}, na = (e) => e instanceof Error ? e : e instanceof Object ? Object.assign(/* @__PURE__ */ Error(), e) : Error(typeof e == "string" ? e : `AWS SDK error wrapper for ${e}`), ra = (e) => {
|
|
3108
|
+
let { retryStrategy: t, retryMode: n } = e, r = E(e.maxAttempts ?? 3), i = t ? Promise.resolve(t) : void 0, a = async () => await E(n)() === X.ADAPTIVE ? new yi(r) : new vi(r);
|
|
3109
|
+
return Object.assign(e, {
|
|
3110
|
+
maxAttempts: r,
|
|
3111
|
+
retryStrategy: () => i ??= a()
|
|
3112
|
+
});
|
|
3113
|
+
}, ia = (e) => e?.body instanceof ReadableStream;
|
|
3114
|
+
//#endregion
|
|
3115
|
+
//#region node_modules/@smithy/middleware-retry/dist-es/parseRetryAfterHeader.js
|
|
3116
|
+
function aa(e, t) {
|
|
3117
|
+
if (v.isInstance(e)) for (let n of Object.keys(e.headers)) {
|
|
3118
|
+
let r = n.toLowerCase();
|
|
3119
|
+
if (r === "retry-after") {
|
|
3120
|
+
let r = e.headers[n], i = NaN;
|
|
3121
|
+
if (r.endsWith("GMT")) try {
|
|
3122
|
+
i = (Et(r).getTime() - Date.now()) / 1e3;
|
|
3123
|
+
} catch (e) {
|
|
3124
|
+
t?.trace?.("Failed to parse retry-after header"), t?.trace?.(e);
|
|
3125
|
+
}
|
|
3126
|
+
else r.match(/ GMT, ((\d+)|(\d+\.\d+))$/) ? i = Number(r.match(/ GMT, ([\d.]+)$/)?.[1]) : r.match(/^((\d+)|(\d+\.\d+))$/) ? i = Number(r) : Date.parse(r) >= Date.now() && (i = (Date.parse(r) - Date.now()) / 1e3);
|
|
3127
|
+
return isNaN(i) ? void 0 : new Date(Date.now() + i * 1e3);
|
|
3128
|
+
} else if (r === "x-amz-retry-after") {
|
|
3129
|
+
let r = e.headers[n], i = Number(r);
|
|
3130
|
+
if (isNaN(i)) {
|
|
3131
|
+
t?.trace?.(`Failed to parse x-amz-retry-after=${r}`);
|
|
3132
|
+
return;
|
|
3133
|
+
}
|
|
3134
|
+
return new Date(Date.now() + i);
|
|
3135
|
+
}
|
|
3136
|
+
}
|
|
3137
|
+
}
|
|
3138
|
+
//#endregion
|
|
3139
|
+
//#region node_modules/@smithy/middleware-retry/dist-es/retryMiddleware.js
|
|
3140
|
+
var oa = (e) => (t, n) => async (r) => {
|
|
3141
|
+
let i = await e.retryStrategy(), a = await e.maxAttempts();
|
|
3142
|
+
if (ca(i)) {
|
|
3143
|
+
i = i;
|
|
3144
|
+
let o = await i.acquireInitialRetryToken((n.partition_id ?? "") + (n.__retryLongPoll ? ":longpoll" : "")), s = /* @__PURE__ */ Error(), c = 0, l = 0, { request: u } = r, d = _.isInstance(u);
|
|
3145
|
+
for (d && (u.headers[mi] = zt());;) try {
|
|
3146
|
+
d && (u.headers[hi] = `attempt=${c + 1}; max=${a}`);
|
|
3147
|
+
let { response: e, output: n } = await t(r);
|
|
3148
|
+
return i.recordSuccess(o), n.$metadata.attempts = c + 1, n.$metadata.totalRetryDelay = l, {
|
|
3149
|
+
response: e,
|
|
3150
|
+
output: n
|
|
3151
|
+
};
|
|
3152
|
+
} catch (t) {
|
|
3153
|
+
let r = la(t, e.logger);
|
|
3154
|
+
if (s = na(t), d && ia(u)) throw (n.logger instanceof on ? console : n.logger)?.warn("An error was encountered in a non-retryable streaming request."), s;
|
|
3155
|
+
try {
|
|
3156
|
+
o = await i.refreshRetryTokenForRetry(o, r);
|
|
3157
|
+
} catch (e) {
|
|
3158
|
+
throw typeof e.$backoff == "number" && await sa(e.$backoff), s.$metadata ||= {}, s.$metadata.attempts = c + 1, s.$metadata.totalRetryDelay = l, s;
|
|
3159
|
+
}
|
|
3160
|
+
c = o.getRetryCount();
|
|
3161
|
+
let a = o.getRetryDelay();
|
|
3162
|
+
l += a, await sa(a);
|
|
3163
|
+
}
|
|
3164
|
+
} else return i = i, i?.mode && (n.userAgent = [...n.userAgent || [], ["cfg/retry-mode", i.mode]]), i.retry(t, r);
|
|
3165
|
+
}, sa = (e) => new Promise((t) => setTimeout(t, e)), ca = (e) => e.acquireInitialRetryToken !== void 0 && e.refreshRetryTokenForRetry !== void 0 && e.recordSuccess !== void 0, la = (e, t) => {
|
|
3166
|
+
let n = {
|
|
3167
|
+
error: e,
|
|
3168
|
+
errorType: ua(e)
|
|
3169
|
+
}, r = aa(e.$response, t);
|
|
3170
|
+
return r && (n.retryAfterHint = r), n;
|
|
3171
|
+
}, ua = (e) => li(e) ? "THROTTLING" : ui(e) ? "TRANSIENT" : di(e) ? "SERVER_ERROR" : "CLIENT_ERROR", da = {
|
|
3172
|
+
name: "retryMiddleware",
|
|
3173
|
+
tags: ["RETRY"],
|
|
3174
|
+
step: "finalizeRequest",
|
|
3175
|
+
priority: "high",
|
|
3176
|
+
override: !0
|
|
3177
|
+
}, fa = (e) => ({ applyToStack: (t) => {
|
|
3178
|
+
t.add(oa(e), da);
|
|
3179
|
+
} }), pa = (e) => v.isInstance(e) ? e.headers?.date ?? e.headers?.Date : void 0, ma = (e) => new Date(Date.now() + e), ha = (e, t) => Math.abs(ma(t).getTime() - e) >= 3e5, ga = (e, t) => {
|
|
3180
|
+
let n = Date.parse(e);
|
|
3181
|
+
return ha(n, t) ? n - Date.now() : t;
|
|
3182
|
+
}, Q = (e, t) => {
|
|
3183
|
+
if (!t) throw Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);
|
|
3184
|
+
return t;
|
|
3185
|
+
}, _a = async (e) => {
|
|
3186
|
+
let t = Q("context", e.context), n = Q("config", e.config), r = t.endpointV2?.properties?.authSchemes?.[0];
|
|
3187
|
+
return {
|
|
3188
|
+
config: n,
|
|
3189
|
+
signer: await Q("signer", n.signer)(r),
|
|
3190
|
+
signingRegion: e?.signingRegion,
|
|
3191
|
+
signingRegionSet: e?.signingRegionSet,
|
|
3192
|
+
signingName: e?.signingName
|
|
3193
|
+
};
|
|
3194
|
+
}, va = class {
|
|
3195
|
+
async sign(e, t, n) {
|
|
3196
|
+
if (!_.isInstance(e)) throw Error("The request is not an instance of `HttpRequest` and cannot be signed");
|
|
3197
|
+
let r = await _a(n), { config: i, signer: a } = r, { signingRegion: o, signingName: s } = r, c = n.context;
|
|
3198
|
+
if (c?.authSchemes?.length ?? !1) {
|
|
3199
|
+
let [e, t] = c.authSchemes;
|
|
3200
|
+
e?.name === "sigv4a" && t?.name === "sigv4" && (o = t?.signingRegion ?? o, s = t?.signingName ?? s);
|
|
3201
|
+
}
|
|
3202
|
+
return await a.sign(e, {
|
|
3203
|
+
signingDate: ma(i.systemClockOffset),
|
|
3204
|
+
signingRegion: o,
|
|
3205
|
+
signingService: s
|
|
3206
|
+
});
|
|
3207
|
+
}
|
|
3208
|
+
errorHandler(e) {
|
|
3209
|
+
return (t) => {
|
|
3210
|
+
let n = t.ServerTime ?? pa(t.$response);
|
|
3211
|
+
if (n) {
|
|
3212
|
+
let r = Q("config", e.config), i = r.systemClockOffset;
|
|
3213
|
+
r.systemClockOffset = ga(n, r.systemClockOffset), r.systemClockOffset !== i && t.$metadata && (t.$metadata.clockSkewCorrected = !0);
|
|
3214
|
+
}
|
|
3215
|
+
throw t;
|
|
3216
|
+
};
|
|
3217
|
+
}
|
|
3218
|
+
successHandler(e, t) {
|
|
3219
|
+
let n = pa(e);
|
|
3220
|
+
if (n) {
|
|
3221
|
+
let e = Q("config", t.config);
|
|
3222
|
+
e.systemClockOffset = ga(n, e.systemClockOffset);
|
|
3223
|
+
}
|
|
3224
|
+
}
|
|
3225
|
+
}, ya = (e, t, n) => {
|
|
3226
|
+
let r, i, a, o = !1, s = async () => {
|
|
3227
|
+
i ||= e();
|
|
3228
|
+
try {
|
|
3229
|
+
r = await i, a = !0, o = !1;
|
|
3230
|
+
} finally {
|
|
3231
|
+
i = void 0;
|
|
3232
|
+
}
|
|
3233
|
+
return r;
|
|
3234
|
+
};
|
|
3235
|
+
return t === void 0 ? async (e) => ((!a || e?.forceRefresh) && (r = await s()), r) : async (e) => ((!a || e?.forceRefresh) && (r = await s()), o ? r : n && !n(r) ? (o = !0, r) : (t(r) && await s(), r));
|
|
3236
|
+
}, ba = (e) => {
|
|
3237
|
+
let t = e.credentials, n = !!e.credentials, r;
|
|
3238
|
+
Object.defineProperty(e, "credentials", {
|
|
3239
|
+
set(i) {
|
|
3240
|
+
i && i !== t && i !== r && (n = !0), t = i;
|
|
3241
|
+
let a = Sa(e, xa(e, {
|
|
3242
|
+
credentials: t,
|
|
3243
|
+
credentialDefaultProvider: e.credentialDefaultProvider
|
|
3244
|
+
}));
|
|
3245
|
+
if (n && !a.attributed) {
|
|
3246
|
+
let e = typeof t == "object" && !!t;
|
|
3247
|
+
r = async (t) => {
|
|
3248
|
+
let n = await a(t);
|
|
3249
|
+
return e && (!n.$source || Object.keys(n.$source).length === 0) ? te(n, "CREDENTIALS_CODE", "e") : n;
|
|
3250
|
+
}, r.memoized = a.memoized, r.configBound = a.configBound, r.attributed = !0;
|
|
3251
|
+
} else r = a;
|
|
3252
|
+
},
|
|
3253
|
+
get() {
|
|
3254
|
+
return r;
|
|
3255
|
+
},
|
|
3256
|
+
enumerable: !0,
|
|
3257
|
+
configurable: !0
|
|
3258
|
+
}), e.credentials = t;
|
|
3259
|
+
let { signingEscapePath: i = !0, systemClockOffset: a = e.systemClockOffset || 0, sha256: o } = e, s;
|
|
3260
|
+
return s = e.signer ? U(e.signer) : e.regionInfoProvider ? () => U(e.region)().then(async (t) => [await e.regionInfoProvider(t, {
|
|
3261
|
+
useFipsEndpoint: await e.useFipsEndpoint(),
|
|
3262
|
+
useDualstackEndpoint: await e.useDualstackEndpoint()
|
|
3263
|
+
}) || {}, t]).then(([t, n]) => {
|
|
3264
|
+
let { signingRegion: r, signingService: a } = t;
|
|
3265
|
+
e.signingRegion = e.signingRegion || r || n, e.signingName = e.signingName || a || e.serviceId;
|
|
3266
|
+
let s = {
|
|
3267
|
+
...e,
|
|
3268
|
+
credentials: e.credentials,
|
|
3269
|
+
region: e.signingRegion,
|
|
3270
|
+
service: e.signingName,
|
|
3271
|
+
sha256: o,
|
|
3272
|
+
uriEscapePath: i
|
|
3273
|
+
};
|
|
3274
|
+
return new (e.signerConstructor || Wn)(s);
|
|
3275
|
+
}) : async (t) => {
|
|
3276
|
+
t = Object.assign({}, {
|
|
3277
|
+
name: "sigv4",
|
|
3278
|
+
signingName: e.signingName || e.defaultSigningName,
|
|
3279
|
+
signingRegion: await U(e.region)(),
|
|
3280
|
+
properties: {}
|
|
3281
|
+
}, t);
|
|
3282
|
+
let n = t.signingRegion, r = t.signingName;
|
|
3283
|
+
e.signingRegion = e.signingRegion || n, e.signingName = e.signingName || r || e.serviceId;
|
|
3284
|
+
let a = {
|
|
3285
|
+
...e,
|
|
3286
|
+
credentials: e.credentials,
|
|
3287
|
+
region: e.signingRegion,
|
|
3288
|
+
service: e.signingName,
|
|
3289
|
+
sha256: o,
|
|
3290
|
+
uriEscapePath: i
|
|
3291
|
+
};
|
|
3292
|
+
return new (e.signerConstructor || Wn)(a);
|
|
3293
|
+
}, Object.assign(e, {
|
|
3294
|
+
systemClockOffset: a,
|
|
3295
|
+
signingEscapePath: i,
|
|
3296
|
+
signer: s
|
|
3297
|
+
});
|
|
3298
|
+
};
|
|
3299
|
+
function xa(e, { credentials: t, credentialDefaultProvider: n }) {
|
|
3300
|
+
let r;
|
|
3301
|
+
return r = t ? t?.memoized ? t : ar(t, rr, ir) : n ? U(n(Object.assign({}, e, { parentClientConfig: e }))) : async () => {
|
|
3302
|
+
throw Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.");
|
|
3303
|
+
}, r.memoized = !0, r;
|
|
3304
|
+
}
|
|
3305
|
+
function Sa(e, t) {
|
|
3306
|
+
if (t.configBound) return t;
|
|
3307
|
+
let n = async (n) => t({
|
|
3308
|
+
...n,
|
|
3309
|
+
callerClientConfig: e
|
|
3310
|
+
});
|
|
3311
|
+
return n.memoized = t.memoized, n.configBound = !0, n;
|
|
3312
|
+
}
|
|
3313
|
+
//#endregion
|
|
3314
|
+
//#region node_modules/@aws-sdk/util-locate-window/dist-es/index.js
|
|
3315
|
+
var Ca = {};
|
|
3316
|
+
function $() {
|
|
3317
|
+
return typeof window < "u" ? window : typeof self < "u" ? self : Ca;
|
|
3318
|
+
}
|
|
3319
|
+
//#endregion
|
|
3320
|
+
//#region node_modules/@aws-crypto/supports-web-crypto/build/module/supportsWebCrypto.js
|
|
3321
|
+
var wa = [
|
|
3322
|
+
"decrypt",
|
|
3323
|
+
"digest",
|
|
3324
|
+
"encrypt",
|
|
3325
|
+
"exportKey",
|
|
3326
|
+
"generateKey",
|
|
3327
|
+
"importKey",
|
|
3328
|
+
"sign",
|
|
3329
|
+
"verify"
|
|
3330
|
+
];
|
|
3331
|
+
function Ta(e) {
|
|
3332
|
+
if (Ea(e) && typeof e.crypto.subtle == "object") {
|
|
3333
|
+
var t = e.crypto.subtle;
|
|
3334
|
+
return Da(t);
|
|
3335
|
+
}
|
|
3336
|
+
return !1;
|
|
3337
|
+
}
|
|
3338
|
+
function Ea(e) {
|
|
3339
|
+
return typeof e == "object" && typeof e.crypto == "object" ? typeof e.crypto.getRandomValues == "function" : !1;
|
|
3340
|
+
}
|
|
3341
|
+
function Da(e) {
|
|
3342
|
+
return e && wa.every(function(t) {
|
|
3343
|
+
return typeof e[t] == "function";
|
|
3344
|
+
});
|
|
3345
|
+
}
|
|
3346
|
+
//#endregion
|
|
3347
|
+
//#region node_modules/@aws-crypto/sha256-browser/build/module/constants.js
|
|
3348
|
+
var Oa = { name: "SHA-256" }, ka = {
|
|
3349
|
+
name: "HMAC",
|
|
3350
|
+
hash: Oa
|
|
3351
|
+
}, Aa = new Uint8Array([
|
|
3352
|
+
227,
|
|
3353
|
+
176,
|
|
3354
|
+
196,
|
|
3355
|
+
66,
|
|
3356
|
+
152,
|
|
3357
|
+
252,
|
|
3358
|
+
28,
|
|
3359
|
+
20,
|
|
3360
|
+
154,
|
|
3361
|
+
251,
|
|
3362
|
+
244,
|
|
3363
|
+
200,
|
|
3364
|
+
153,
|
|
3365
|
+
111,
|
|
3366
|
+
185,
|
|
3367
|
+
36,
|
|
3368
|
+
39,
|
|
3369
|
+
174,
|
|
3370
|
+
65,
|
|
3371
|
+
228,
|
|
3372
|
+
100,
|
|
3373
|
+
155,
|
|
3374
|
+
147,
|
|
3375
|
+
76,
|
|
3376
|
+
164,
|
|
3377
|
+
149,
|
|
3378
|
+
153,
|
|
3379
|
+
27,
|
|
3380
|
+
120,
|
|
3381
|
+
82,
|
|
3382
|
+
184,
|
|
3383
|
+
85
|
|
3384
|
+
]), ja = function() {
|
|
3385
|
+
function e(e) {
|
|
3386
|
+
this.toHash = new Uint8Array(), this.secret = e, this.reset();
|
|
3387
|
+
}
|
|
3388
|
+
return e.prototype.update = function(e) {
|
|
3389
|
+
if (!w(e)) {
|
|
3390
|
+
var t = C(e), n = new Uint8Array(this.toHash.byteLength + t.byteLength);
|
|
3391
|
+
n.set(this.toHash, 0), n.set(t, this.toHash.byteLength), this.toHash = n;
|
|
3392
|
+
}
|
|
3393
|
+
}, e.prototype.digest = function() {
|
|
3394
|
+
var e = this;
|
|
3395
|
+
return this.key ? this.key.then(function(t) {
|
|
3396
|
+
return $().crypto.subtle.sign(ka, t, e.toHash).then(function(e) {
|
|
3397
|
+
return new Uint8Array(e);
|
|
3398
|
+
});
|
|
3399
|
+
}) : w(this.toHash) ? Promise.resolve(Aa) : Promise.resolve().then(function() {
|
|
3400
|
+
return $().crypto.subtle.digest(Oa, e.toHash);
|
|
3401
|
+
}).then(function(e) {
|
|
3402
|
+
return Promise.resolve(new Uint8Array(e));
|
|
3403
|
+
});
|
|
3404
|
+
}, e.prototype.reset = function() {
|
|
3405
|
+
var e = this;
|
|
3406
|
+
this.toHash = new Uint8Array(), this.secret && this.secret !== void 0 && (this.key = new Promise(function(t, n) {
|
|
3407
|
+
$().crypto.subtle.importKey("raw", C(e.secret), ka, !1, ["sign"]).then(t, n);
|
|
3408
|
+
}), this.key.catch(function() {}));
|
|
3409
|
+
}, e;
|
|
3410
|
+
}(), Ma = new Uint32Array([
|
|
3411
|
+
1116352408,
|
|
3412
|
+
1899447441,
|
|
3413
|
+
3049323471,
|
|
3414
|
+
3921009573,
|
|
3415
|
+
961987163,
|
|
3416
|
+
1508970993,
|
|
3417
|
+
2453635748,
|
|
3418
|
+
2870763221,
|
|
3419
|
+
3624381080,
|
|
3420
|
+
310598401,
|
|
3421
|
+
607225278,
|
|
3422
|
+
1426881987,
|
|
3423
|
+
1925078388,
|
|
3424
|
+
2162078206,
|
|
3425
|
+
2614888103,
|
|
3426
|
+
3248222580,
|
|
3427
|
+
3835390401,
|
|
3428
|
+
4022224774,
|
|
3429
|
+
264347078,
|
|
3430
|
+
604807628,
|
|
3431
|
+
770255983,
|
|
3432
|
+
1249150122,
|
|
3433
|
+
1555081692,
|
|
3434
|
+
1996064986,
|
|
3435
|
+
2554220882,
|
|
3436
|
+
2821834349,
|
|
3437
|
+
2952996808,
|
|
3438
|
+
3210313671,
|
|
3439
|
+
3336571891,
|
|
3440
|
+
3584528711,
|
|
3441
|
+
113926993,
|
|
3442
|
+
338241895,
|
|
3443
|
+
666307205,
|
|
3444
|
+
773529912,
|
|
3445
|
+
1294757372,
|
|
3446
|
+
1396182291,
|
|
3447
|
+
1695183700,
|
|
3448
|
+
1986661051,
|
|
3449
|
+
2177026350,
|
|
3450
|
+
2456956037,
|
|
3451
|
+
2730485921,
|
|
3452
|
+
2820302411,
|
|
3453
|
+
3259730800,
|
|
3454
|
+
3345764771,
|
|
3455
|
+
3516065817,
|
|
3456
|
+
3600352804,
|
|
3457
|
+
4094571909,
|
|
3458
|
+
275423344,
|
|
3459
|
+
430227734,
|
|
3460
|
+
506948616,
|
|
3461
|
+
659060556,
|
|
3462
|
+
883997877,
|
|
3463
|
+
958139571,
|
|
3464
|
+
1322822218,
|
|
3465
|
+
1537002063,
|
|
3466
|
+
1747873779,
|
|
3467
|
+
1955562222,
|
|
3468
|
+
2024104815,
|
|
3469
|
+
2227730452,
|
|
3470
|
+
2361852424,
|
|
3471
|
+
2428436474,
|
|
3472
|
+
2756734187,
|
|
3473
|
+
3204031479,
|
|
3474
|
+
3329325298
|
|
3475
|
+
]), Na = [
|
|
3476
|
+
1779033703,
|
|
3477
|
+
3144134277,
|
|
3478
|
+
1013904242,
|
|
3479
|
+
2773480762,
|
|
3480
|
+
1359893119,
|
|
3481
|
+
2600822924,
|
|
3482
|
+
528734635,
|
|
3483
|
+
1541459225
|
|
3484
|
+
], Pa = 2 ** 53 - 1, Fa = function() {
|
|
3485
|
+
function e() {
|
|
3486
|
+
this.state = Int32Array.from(Na), this.temp = new Int32Array(64), this.buffer = new Uint8Array(64), this.bufferLength = 0, this.bytesHashed = 0, this.finished = !1;
|
|
3487
|
+
}
|
|
3488
|
+
return e.prototype.update = function(e) {
|
|
3489
|
+
if (this.finished) throw Error("Attempted to update an already finished hash.");
|
|
3490
|
+
var t = 0, n = e.byteLength;
|
|
3491
|
+
if (this.bytesHashed += n, this.bytesHashed * 8 > Pa) throw Error("Cannot hash more than 2^53 - 1 bits");
|
|
3492
|
+
for (; n > 0;) this.buffer[this.bufferLength++] = e[t++], n--, this.bufferLength === 64 && (this.hashBuffer(), this.bufferLength = 0);
|
|
3493
|
+
}, e.prototype.digest = function() {
|
|
3494
|
+
if (!this.finished) {
|
|
3495
|
+
var e = this.bytesHashed * 8, t = new DataView(this.buffer.buffer, this.buffer.byteOffset, this.buffer.byteLength), n = this.bufferLength;
|
|
3496
|
+
if (t.setUint8(this.bufferLength++, 128), n % 64 >= 56) {
|
|
3497
|
+
for (var r = this.bufferLength; r < 64; r++) t.setUint8(r, 0);
|
|
3498
|
+
this.hashBuffer(), this.bufferLength = 0;
|
|
3499
|
+
}
|
|
3500
|
+
for (var r = this.bufferLength; r < 56; r++) t.setUint8(r, 0);
|
|
3501
|
+
t.setUint32(56, Math.floor(e / 4294967296), !0), t.setUint32(60, e), this.hashBuffer(), this.finished = !0;
|
|
3502
|
+
}
|
|
3503
|
+
for (var i = new Uint8Array(32), r = 0; r < 8; r++) i[r * 4] = this.state[r] >>> 24 & 255, i[r * 4 + 1] = this.state[r] >>> 16 & 255, i[r * 4 + 2] = this.state[r] >>> 8 & 255, i[r * 4 + 3] = this.state[r] >>> 0 & 255;
|
|
3504
|
+
return i;
|
|
3505
|
+
}, e.prototype.hashBuffer = function() {
|
|
3506
|
+
for (var e = this, t = e.buffer, n = e.state, r = n[0], i = n[1], a = n[2], o = n[3], s = n[4], c = n[5], l = n[6], u = n[7], d = 0; d < 64; d++) {
|
|
3507
|
+
if (d < 16) this.temp[d] = (t[d * 4] & 255) << 24 | (t[d * 4 + 1] & 255) << 16 | (t[d * 4 + 2] & 255) << 8 | t[d * 4 + 3] & 255;
|
|
3508
|
+
else {
|
|
3509
|
+
var f = this.temp[d - 2], p = (f >>> 17 | f << 15) ^ (f >>> 19 | f << 13) ^ f >>> 10;
|
|
3510
|
+
f = this.temp[d - 15];
|
|
3511
|
+
var m = (f >>> 7 | f << 25) ^ (f >>> 18 | f << 14) ^ f >>> 3;
|
|
3512
|
+
this.temp[d] = (p + this.temp[d - 7] | 0) + (m + this.temp[d - 16] | 0);
|
|
3513
|
+
}
|
|
3514
|
+
var h = (((s >>> 6 | s << 26) ^ (s >>> 11 | s << 21) ^ (s >>> 25 | s << 7)) + (s & c ^ ~s & l) | 0) + (u + (Ma[d] + this.temp[d] | 0) | 0) | 0, g = ((r >>> 2 | r << 30) ^ (r >>> 13 | r << 19) ^ (r >>> 22 | r << 10)) + (r & i ^ r & a ^ i & a) | 0;
|
|
3515
|
+
u = l, l = c, c = s, s = o + h | 0, o = a, a = i, i = r, r = h + g | 0;
|
|
3516
|
+
}
|
|
3517
|
+
n[0] += r, n[1] += i, n[2] += a, n[3] += o, n[4] += s, n[5] += c, n[6] += l, n[7] += u;
|
|
3518
|
+
}, e;
|
|
3519
|
+
}(), Ia = function() {
|
|
3520
|
+
function e(e) {
|
|
3521
|
+
this.secret = e, this.hash = new Fa(), this.reset();
|
|
3522
|
+
}
|
|
3523
|
+
return e.prototype.update = function(e) {
|
|
3524
|
+
if (!(w(e) || this.error)) try {
|
|
3525
|
+
this.hash.update(C(e));
|
|
3526
|
+
} catch (e) {
|
|
3527
|
+
this.error = e;
|
|
3528
|
+
}
|
|
3529
|
+
}, e.prototype.digestSync = function() {
|
|
3530
|
+
if (this.error) throw this.error;
|
|
3531
|
+
return this.outer ? (this.outer.finished || this.outer.update(this.hash.digest()), this.outer.digest()) : this.hash.digest();
|
|
3532
|
+
}, e.prototype.digest = function() {
|
|
3533
|
+
return Ce(this, void 0, void 0, function() {
|
|
3534
|
+
return we(this, function(e) {
|
|
3535
|
+
return [2, this.digestSync()];
|
|
3536
|
+
});
|
|
3537
|
+
});
|
|
3538
|
+
}, e.prototype.reset = function() {
|
|
3539
|
+
if (this.hash = new Fa(), this.secret) {
|
|
3540
|
+
this.outer = new Fa();
|
|
3541
|
+
var e = La(this.secret), t = new Uint8Array(64);
|
|
3542
|
+
t.set(e);
|
|
3543
|
+
for (var n = 0; n < 64; n++) e[n] ^= 54, t[n] ^= 92;
|
|
3544
|
+
this.hash.update(e), this.outer.update(t);
|
|
3545
|
+
for (var n = 0; n < e.byteLength; n++) e[n] = 0;
|
|
3546
|
+
}
|
|
3547
|
+
}, e;
|
|
3548
|
+
}();
|
|
3549
|
+
function La(e) {
|
|
3550
|
+
var t = C(e);
|
|
3551
|
+
if (t.byteLength > 64) {
|
|
3552
|
+
var n = new Fa();
|
|
3553
|
+
n.update(t), t = n.digest();
|
|
3554
|
+
}
|
|
3555
|
+
var r = new Uint8Array(64);
|
|
3556
|
+
return r.set(t), r;
|
|
3557
|
+
}
|
|
3558
|
+
//#endregion
|
|
3559
|
+
//#region node_modules/@aws-crypto/sha256-browser/build/module/crossPlatformSha256.js
|
|
3560
|
+
var Ra = function() {
|
|
3561
|
+
function e(e) {
|
|
3562
|
+
Ta($()) ? this.hash = new ja(e) : this.hash = new Ia(e);
|
|
3563
|
+
}
|
|
3564
|
+
return e.prototype.update = function(e, t) {
|
|
3565
|
+
this.hash.update(C(e));
|
|
3566
|
+
}, e.prototype.digest = function() {
|
|
3567
|
+
return this.hash.digest();
|
|
3568
|
+
}, e.prototype.reset = function() {
|
|
3569
|
+
this.hash.reset();
|
|
3570
|
+
}, e;
|
|
3571
|
+
}(), za = ({ serviceId: e, clientVersion: t }) => async (n) => {
|
|
3572
|
+
let r = typeof window < "u" ? window.navigator : void 0, i = r?.userAgent ?? "", a = r?.userAgentData?.platform ?? Ba.os(i) ?? "other", o = r?.userAgentData?.brands ?? [], s = o[o.length - 1], c = s?.brand ?? Ba.browser(i) ?? "unknown", l = s?.version ?? "unknown", u = [
|
|
3573
|
+
["aws-sdk-js", t],
|
|
3574
|
+
["ua", "2.1"],
|
|
3575
|
+
[`os/${a}`, void 0],
|
|
3576
|
+
["lang/js"],
|
|
3577
|
+
["md/browser", `${c}_${l}`]
|
|
3578
|
+
];
|
|
3579
|
+
e && u.push([`api/${e}`, t]);
|
|
3580
|
+
let d = await n?.userAgentAppId?.();
|
|
3581
|
+
return d && u.push([`app/${d}`]), u;
|
|
3582
|
+
}, Ba = {
|
|
3583
|
+
os(e) {
|
|
3584
|
+
if (/iPhone|iPad|iPod/.test(e)) return "iOS";
|
|
3585
|
+
if (/Macintosh|Mac OS X/.test(e)) return "macOS";
|
|
3586
|
+
if (/Windows NT/.test(e)) return "Windows";
|
|
3587
|
+
if (/Android/.test(e)) return "Android";
|
|
3588
|
+
if (/Linux/.test(e)) return "Linux";
|
|
3589
|
+
},
|
|
3590
|
+
browser(e) {
|
|
3591
|
+
if (/EdgiOS|EdgA|Edg\//.test(e)) return "Microsoft Edge";
|
|
3592
|
+
if (/Firefox\//.test(e)) return "Firefox";
|
|
3593
|
+
if (/Chrome\//.test(e)) return "Chrome";
|
|
3594
|
+
if (/Safari\//.test(e)) return "Safari";
|
|
3595
|
+
}
|
|
3596
|
+
}, Va = (e) => () => Promise.reject(e), Ha = [
|
|
3597
|
+
"in-region",
|
|
3598
|
+
"cross-region",
|
|
3599
|
+
"mobile",
|
|
3600
|
+
"standard",
|
|
3601
|
+
"legacy"
|
|
3602
|
+
], Ua = ({ defaultsMode: e } = {}) => ya(async () => {
|
|
3603
|
+
let t = typeof e == "function" ? await e() : e;
|
|
3604
|
+
switch (t?.toLowerCase()) {
|
|
3605
|
+
case "auto": return Promise.resolve(Wa() ? "mobile" : "standard");
|
|
3606
|
+
case "mobile":
|
|
3607
|
+
case "in-region":
|
|
3608
|
+
case "cross-region":
|
|
3609
|
+
case "standard":
|
|
3610
|
+
case "legacy": return Promise.resolve(t?.toLocaleLowerCase());
|
|
3611
|
+
case void 0: return Promise.resolve("legacy");
|
|
3612
|
+
default: throw Error(`Invalid parameter for "defaultsMode", expect ${Ha.join(", ")}, got ${t}`);
|
|
3613
|
+
}
|
|
3614
|
+
}), Wa = () => {
|
|
3615
|
+
let e = window?.navigator;
|
|
3616
|
+
if (e?.connection) {
|
|
3617
|
+
let { effectiveType: t, rtt: n, downlink: r } = e?.connection;
|
|
3618
|
+
if (typeof t == "string" && t !== "4g" || Number(n) > 100 || Number(r) < 10) return !0;
|
|
3619
|
+
}
|
|
3620
|
+
return e?.userAgentData?.mobile || typeof e?.maxTouchPoints == "number" && e?.maxTouchPoints > 1;
|
|
3621
|
+
}, Ga = (e) => ({
|
|
3622
|
+
setRegion(t) {
|
|
3623
|
+
e.region = t;
|
|
3624
|
+
},
|
|
3625
|
+
region() {
|
|
3626
|
+
return e.region;
|
|
3627
|
+
}
|
|
3628
|
+
}), Ka = (e) => ({ region: e.region() });
|
|
3629
|
+
//#endregion
|
|
3630
|
+
export { Et as $, cr as A, v as At, an as B, Wr as C, S as Ct, dr as D, b as Dt, pr as E, oe as Et, $n as F, d as Ft, Ut as G, Yt as H, Yn as I, u as It, V as J, Ht as K, Wn as L, nr as M, f as Mt, U as N, p as Nt, ur as O, ae as Ot, er as P, c as Pt, St as Q, on as R, $r as S, xe as St, mr as T, pe as Tt, qt as U, Zt as V, Wt as W, bt as X, zt as Y, Dt as Z, Zi as _, C as _t, za as a, A as at, ji as b, Te as bt, $ as c, Re as ct, _a as d, ke as dt, I as et, ma as f, E as ft, ea as g, w as gt, ta as h, De as ht, Va as i, j as it, sr as j, _ as jt, lr as k, y as kt, ba as l, Fe as lt, ra as m, Oe as mt, Ka as n, M as nt, Ra as o, He as ot, fa as p, T as pt, Vt as q, Ua as r, Ze as rt, Ta as s, Ve as st, Ga as t, P as tt, va as u, Me as ut, Bi as v, Ce as vt, q as w, he as wt, ei as x, Se as xt, Ii as y, we as yt, rn as z };
|