@powerhousedao/registry 6.2.3-dev.63 → 6.2.3-dev.65
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/cli.mjs +12069 -194
- package/dist/cli.mjs.map +1 -1
- package/dist/event-streams-Cr4gHFwD.mjs +875 -0
- package/dist/event-streams-Cr4gHFwD.mjs.map +1 -0
- package/dist/serde-3bjbbZum.mjs +1280 -0
- package/dist/serde-3bjbbZum.mjs.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,1280 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
import { getRandomValues } from "node:crypto";
|
|
3
|
+
import { Readable, Writable } from "node:stream";
|
|
4
|
+
//#region \0rolldown/runtime.js
|
|
5
|
+
var __create = Object.create;
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
9
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
10
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __esmMin = (fn, res, err) => () => {
|
|
12
|
+
if (err) throw err[0];
|
|
13
|
+
try {
|
|
14
|
+
return fn && (res = fn(fn = 0)), res;
|
|
15
|
+
} catch (e) {
|
|
16
|
+
throw err = [e], e;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
20
|
+
var __exportAll = (all, no_symbols) => {
|
|
21
|
+
let target = {};
|
|
22
|
+
for (var name in all) __defProp(target, name, {
|
|
23
|
+
get: all[name],
|
|
24
|
+
enumerable: true
|
|
25
|
+
});
|
|
26
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
27
|
+
return target;
|
|
28
|
+
};
|
|
29
|
+
var __copyProps = (to, from, except, desc) => {
|
|
30
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
31
|
+
key = keys[i];
|
|
32
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
33
|
+
get: ((k) => from[k]).bind(null, key),
|
|
34
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
return to;
|
|
38
|
+
};
|
|
39
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
40
|
+
value: mod,
|
|
41
|
+
enumerable: true
|
|
42
|
+
}) : target, mod));
|
|
43
|
+
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
44
|
+
var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region ../../node_modules/.pnpm/@smithy+types@4.19.0/node_modules/@smithy/types/dist-cjs/index.js
|
|
47
|
+
var require_dist_cjs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
48
|
+
var HttpAuthLocation;
|
|
49
|
+
(function(HttpAuthLocation) {
|
|
50
|
+
HttpAuthLocation["HEADER"] = "header";
|
|
51
|
+
HttpAuthLocation["QUERY"] = "query";
|
|
52
|
+
})(HttpAuthLocation || (HttpAuthLocation = {}));
|
|
53
|
+
var HttpApiKeyAuthLocation;
|
|
54
|
+
(function(HttpApiKeyAuthLocation) {
|
|
55
|
+
HttpApiKeyAuthLocation["HEADER"] = "header";
|
|
56
|
+
HttpApiKeyAuthLocation["QUERY"] = "query";
|
|
57
|
+
})(HttpApiKeyAuthLocation || (HttpApiKeyAuthLocation = {}));
|
|
58
|
+
var EndpointURLScheme;
|
|
59
|
+
(function(EndpointURLScheme) {
|
|
60
|
+
EndpointURLScheme["HTTP"] = "http";
|
|
61
|
+
EndpointURLScheme["HTTPS"] = "https";
|
|
62
|
+
})(EndpointURLScheme || (EndpointURLScheme = {}));
|
|
63
|
+
var AlgorithmId;
|
|
64
|
+
(function(AlgorithmId) {
|
|
65
|
+
AlgorithmId["MD5"] = "md5";
|
|
66
|
+
AlgorithmId["CRC32"] = "crc32";
|
|
67
|
+
AlgorithmId["CRC32C"] = "crc32c";
|
|
68
|
+
AlgorithmId["SHA1"] = "sha1";
|
|
69
|
+
AlgorithmId["SHA256"] = "sha256";
|
|
70
|
+
})(AlgorithmId || (AlgorithmId = {}));
|
|
71
|
+
var FieldPosition;
|
|
72
|
+
(function(FieldPosition) {
|
|
73
|
+
FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER";
|
|
74
|
+
FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER";
|
|
75
|
+
})(FieldPosition || (FieldPosition = {}));
|
|
76
|
+
const SMITHY_CONTEXT_KEY = "__smithy_context";
|
|
77
|
+
var IniSectionType;
|
|
78
|
+
(function(IniSectionType) {
|
|
79
|
+
IniSectionType["PROFILE"] = "profile";
|
|
80
|
+
IniSectionType["SSO_SESSION"] = "sso-session";
|
|
81
|
+
IniSectionType["SERVICES"] = "services";
|
|
82
|
+
})(IniSectionType || (IniSectionType = {}));
|
|
83
|
+
var RequestHandlerProtocol;
|
|
84
|
+
(function(RequestHandlerProtocol) {
|
|
85
|
+
RequestHandlerProtocol["HTTP_0_9"] = "http/0.9";
|
|
86
|
+
RequestHandlerProtocol["HTTP_1_0"] = "http/1.0";
|
|
87
|
+
RequestHandlerProtocol["TDS_8_0"] = "tds/8.0";
|
|
88
|
+
})(RequestHandlerProtocol || (RequestHandlerProtocol = {}));
|
|
89
|
+
exports.EndpointURLScheme = EndpointURLScheme;
|
|
90
|
+
exports.FieldPosition = FieldPosition;
|
|
91
|
+
exports.IniSectionType = IniSectionType;
|
|
92
|
+
exports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY;
|
|
93
|
+
}));
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/transport/getSmithyContext.js
|
|
96
|
+
var import_dist_cjs, getSmithyContext;
|
|
97
|
+
var init_getSmithyContext = __esmMin((() => {
|
|
98
|
+
import_dist_cjs = require_dist_cjs();
|
|
99
|
+
getSmithyContext = (context) => context[import_dist_cjs.SMITHY_CONTEXT_KEY] || (context[import_dist_cjs.SMITHY_CONTEXT_KEY] = {});
|
|
100
|
+
}));
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/transport/hasOwn.js
|
|
103
|
+
function hasOwn(o, k) {
|
|
104
|
+
return Object.prototype.hasOwnProperty.call(o, k);
|
|
105
|
+
}
|
|
106
|
+
var init_hasOwn = __esmMin((() => {}));
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/transport/httpRequest.js
|
|
109
|
+
function cloneQuery(query) {
|
|
110
|
+
return Object.keys(query).reduce((carry, paramName) => {
|
|
111
|
+
const param = query[paramName];
|
|
112
|
+
return {
|
|
113
|
+
...carry,
|
|
114
|
+
[paramName]: Array.isArray(param) ? [...param] : param
|
|
115
|
+
};
|
|
116
|
+
}, {});
|
|
117
|
+
}
|
|
118
|
+
var HttpRequest;
|
|
119
|
+
var init_httpRequest = __esmMin((() => {
|
|
120
|
+
HttpRequest = class HttpRequest {
|
|
121
|
+
method;
|
|
122
|
+
protocol;
|
|
123
|
+
hostname;
|
|
124
|
+
port;
|
|
125
|
+
path;
|
|
126
|
+
query;
|
|
127
|
+
headers;
|
|
128
|
+
username;
|
|
129
|
+
password;
|
|
130
|
+
fragment;
|
|
131
|
+
body;
|
|
132
|
+
constructor(options) {
|
|
133
|
+
this.method = options.method || "GET";
|
|
134
|
+
this.hostname = options.hostname || "localhost";
|
|
135
|
+
this.port = options.port;
|
|
136
|
+
this.query = options.query || {};
|
|
137
|
+
this.headers = options.headers || {};
|
|
138
|
+
this.body = options.body;
|
|
139
|
+
this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:";
|
|
140
|
+
this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/";
|
|
141
|
+
this.username = options.username;
|
|
142
|
+
this.password = options.password;
|
|
143
|
+
this.fragment = options.fragment;
|
|
144
|
+
}
|
|
145
|
+
static clone(request) {
|
|
146
|
+
const cloned = new HttpRequest({
|
|
147
|
+
...request,
|
|
148
|
+
headers: { ...request.headers }
|
|
149
|
+
});
|
|
150
|
+
if (cloned.query) cloned.query = cloneQuery(cloned.query);
|
|
151
|
+
return cloned;
|
|
152
|
+
}
|
|
153
|
+
static isInstance(request) {
|
|
154
|
+
if (!request) return false;
|
|
155
|
+
const req = request;
|
|
156
|
+
return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object";
|
|
157
|
+
}
|
|
158
|
+
clone() {
|
|
159
|
+
return HttpRequest.clone(this);
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
}));
|
|
163
|
+
//#endregion
|
|
164
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/transport/httpResponse.js
|
|
165
|
+
var HttpResponse;
|
|
166
|
+
var init_httpResponse = __esmMin((() => {
|
|
167
|
+
HttpResponse = class {
|
|
168
|
+
statusCode;
|
|
169
|
+
reason;
|
|
170
|
+
headers;
|
|
171
|
+
body;
|
|
172
|
+
constructor(options) {
|
|
173
|
+
this.statusCode = options.statusCode;
|
|
174
|
+
this.reason = options.reason;
|
|
175
|
+
this.headers = options.headers || {};
|
|
176
|
+
this.body = options.body;
|
|
177
|
+
}
|
|
178
|
+
static isInstance(response) {
|
|
179
|
+
if (!response) return false;
|
|
180
|
+
const resp = response;
|
|
181
|
+
return typeof resp.statusCode === "number" && typeof resp.headers === "object";
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
}));
|
|
185
|
+
//#endregion
|
|
186
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/transport/isValidHostLabel.js
|
|
187
|
+
var VALID_HOST_LABEL_REGEX, isValidHostLabel;
|
|
188
|
+
var init_isValidHostLabel = __esmMin((() => {
|
|
189
|
+
VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`);
|
|
190
|
+
isValidHostLabel = (value, allowSubDomains = false) => {
|
|
191
|
+
if (!allowSubDomains) return VALID_HOST_LABEL_REGEX.test(value);
|
|
192
|
+
const labels = value.split(".");
|
|
193
|
+
for (const label of labels) if (!isValidHostLabel(label)) return false;
|
|
194
|
+
return true;
|
|
195
|
+
};
|
|
196
|
+
}));
|
|
197
|
+
//#endregion
|
|
198
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/transport/isValidHostname.js
|
|
199
|
+
function isValidHostname(hostname) {
|
|
200
|
+
return /^[a-z0-9][a-z0-9.-]*[a-z0-9]$/.test(hostname);
|
|
201
|
+
}
|
|
202
|
+
var init_isValidHostname = __esmMin((() => {}));
|
|
203
|
+
//#endregion
|
|
204
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/transport/normalizeProvider.js
|
|
205
|
+
var normalizeProvider;
|
|
206
|
+
var init_normalizeProvider = __esmMin((() => {
|
|
207
|
+
normalizeProvider = (input) => {
|
|
208
|
+
if (typeof input === "function") return input;
|
|
209
|
+
const promisified = Promise.resolve(input);
|
|
210
|
+
return () => promisified;
|
|
211
|
+
};
|
|
212
|
+
}));
|
|
213
|
+
//#endregion
|
|
214
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/transport/parseQueryString.js
|
|
215
|
+
function parseQueryString(querystring) {
|
|
216
|
+
const query = {};
|
|
217
|
+
querystring = querystring.replace(/^\?/, "");
|
|
218
|
+
if (querystring) for (const pair of querystring.split("&")) {
|
|
219
|
+
let [key, value = null] = pair.split("=");
|
|
220
|
+
key = decodeURIComponent(key);
|
|
221
|
+
if (value) value = decodeURIComponent(value);
|
|
222
|
+
if (!(key in query)) query[key] = value;
|
|
223
|
+
else if (Array.isArray(query[key])) query[key].push(value);
|
|
224
|
+
else query[key] = [query[key], value];
|
|
225
|
+
}
|
|
226
|
+
return query;
|
|
227
|
+
}
|
|
228
|
+
var init_parseQueryString = __esmMin((() => {}));
|
|
229
|
+
//#endregion
|
|
230
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/transport/parseUrl.js
|
|
231
|
+
var parseUrl;
|
|
232
|
+
var init_parseUrl = __esmMin((() => {
|
|
233
|
+
init_parseQueryString();
|
|
234
|
+
parseUrl = (url) => {
|
|
235
|
+
if (typeof url === "string") return parseUrl(new URL(url));
|
|
236
|
+
const { hostname, pathname, port, protocol, search } = url;
|
|
237
|
+
let query;
|
|
238
|
+
if (search) query = parseQueryString(search);
|
|
239
|
+
return {
|
|
240
|
+
hostname,
|
|
241
|
+
port: port ? parseInt(port) : void 0,
|
|
242
|
+
protocol,
|
|
243
|
+
path: pathname,
|
|
244
|
+
query
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
}));
|
|
248
|
+
//#endregion
|
|
249
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js
|
|
250
|
+
var toEndpointV1;
|
|
251
|
+
var init_toEndpointV1 = __esmMin((() => {
|
|
252
|
+
init_hasOwn();
|
|
253
|
+
init_parseUrl();
|
|
254
|
+
toEndpointV1 = (endpoint) => {
|
|
255
|
+
if (typeof endpoint === "object") {
|
|
256
|
+
if ("url" in endpoint) {
|
|
257
|
+
const v1Endpoint = parseUrl(endpoint.url);
|
|
258
|
+
if (endpoint.headers) {
|
|
259
|
+
v1Endpoint.headers = {};
|
|
260
|
+
for (const name in endpoint.headers) {
|
|
261
|
+
if (!hasOwn(endpoint.headers, name)) continue;
|
|
262
|
+
v1Endpoint.headers[name.toLowerCase()] = endpoint.headers[name].join(", ");
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
return v1Endpoint;
|
|
266
|
+
}
|
|
267
|
+
return endpoint;
|
|
268
|
+
}
|
|
269
|
+
return parseUrl(endpoint);
|
|
270
|
+
};
|
|
271
|
+
}));
|
|
272
|
+
//#endregion
|
|
273
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/transport/index.js
|
|
274
|
+
var init_transport = __esmMin((() => {
|
|
275
|
+
init_getSmithyContext();
|
|
276
|
+
init_hasOwn();
|
|
277
|
+
init_httpRequest();
|
|
278
|
+
init_httpResponse();
|
|
279
|
+
init_isValidHostLabel();
|
|
280
|
+
init_isValidHostname();
|
|
281
|
+
init_normalizeProvider();
|
|
282
|
+
init_parseQueryString();
|
|
283
|
+
init_parseUrl();
|
|
284
|
+
init_toEndpointV1();
|
|
285
|
+
}));
|
|
286
|
+
//#endregion
|
|
287
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/schema/deref.js
|
|
288
|
+
var deref;
|
|
289
|
+
var init_deref = __esmMin((() => {
|
|
290
|
+
deref = (schemaRef) => {
|
|
291
|
+
if (typeof schemaRef === "function") return schemaRef();
|
|
292
|
+
return schemaRef;
|
|
293
|
+
};
|
|
294
|
+
}));
|
|
295
|
+
//#endregion
|
|
296
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js
|
|
297
|
+
function translateTraits(indicator) {
|
|
298
|
+
if (typeof indicator === "object") return indicator;
|
|
299
|
+
indicator = indicator | 0;
|
|
300
|
+
if (traitsCache[indicator]) return traitsCache[indicator];
|
|
301
|
+
const traits = {};
|
|
302
|
+
let i = 0;
|
|
303
|
+
for (const trait of [
|
|
304
|
+
"httpLabel",
|
|
305
|
+
"idempotent",
|
|
306
|
+
"idempotencyToken",
|
|
307
|
+
"sensitive",
|
|
308
|
+
"httpPayload",
|
|
309
|
+
"httpResponseCode",
|
|
310
|
+
"httpQueryParams"
|
|
311
|
+
]) if ((indicator >> i++ & 1) === 1) traits[trait] = 1;
|
|
312
|
+
return traitsCache[indicator] = traits;
|
|
313
|
+
}
|
|
314
|
+
var traitsCache;
|
|
315
|
+
var init_translateTraits = __esmMin((() => {
|
|
316
|
+
traitsCache = [];
|
|
317
|
+
}));
|
|
318
|
+
//#endregion
|
|
319
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js
|
|
320
|
+
function member(memberSchema, memberName) {
|
|
321
|
+
if (memberSchema instanceof NormalizedSchema) return Object.assign(memberSchema, {
|
|
322
|
+
memberName,
|
|
323
|
+
_isMemberSchema: true
|
|
324
|
+
});
|
|
325
|
+
return new NormalizedSchema(memberSchema, memberName);
|
|
326
|
+
}
|
|
327
|
+
var anno, simpleSchemaCacheN, simpleSchemaCacheS, NormalizedSchema, isMemberSchema, isStaticSchema;
|
|
328
|
+
var init_NormalizedSchema = __esmMin((() => {
|
|
329
|
+
init_deref();
|
|
330
|
+
init_translateTraits();
|
|
331
|
+
anno = {
|
|
332
|
+
it: Symbol.for("@smithy/nor-struct-it"),
|
|
333
|
+
ns: Symbol.for("@smithy/ns")
|
|
334
|
+
};
|
|
335
|
+
simpleSchemaCacheN = [];
|
|
336
|
+
simpleSchemaCacheS = {};
|
|
337
|
+
NormalizedSchema = class NormalizedSchema {
|
|
338
|
+
ref;
|
|
339
|
+
memberName;
|
|
340
|
+
static symbol = Symbol.for("@smithy/nor");
|
|
341
|
+
symbol = NormalizedSchema.symbol;
|
|
342
|
+
name;
|
|
343
|
+
schema;
|
|
344
|
+
_isMemberSchema;
|
|
345
|
+
traits;
|
|
346
|
+
memberTraits;
|
|
347
|
+
normalizedTraits;
|
|
348
|
+
constructor(ref, memberName) {
|
|
349
|
+
this.ref = ref;
|
|
350
|
+
this.memberName = memberName;
|
|
351
|
+
const traitStack = [];
|
|
352
|
+
let _ref = ref;
|
|
353
|
+
let schema = ref;
|
|
354
|
+
this._isMemberSchema = false;
|
|
355
|
+
while (isMemberSchema(_ref)) {
|
|
356
|
+
traitStack.push(_ref[1]);
|
|
357
|
+
_ref = _ref[0];
|
|
358
|
+
schema = deref(_ref);
|
|
359
|
+
this._isMemberSchema = true;
|
|
360
|
+
}
|
|
361
|
+
if (traitStack.length > 0) {
|
|
362
|
+
this.memberTraits = {};
|
|
363
|
+
for (let i = traitStack.length - 1; i >= 0; --i) {
|
|
364
|
+
const traitSet = traitStack[i];
|
|
365
|
+
Object.assign(this.memberTraits, translateTraits(traitSet));
|
|
366
|
+
}
|
|
367
|
+
} else this.memberTraits = 0;
|
|
368
|
+
if (schema instanceof NormalizedSchema) {
|
|
369
|
+
const computedMemberTraits = this.memberTraits;
|
|
370
|
+
Object.assign(this, schema);
|
|
371
|
+
this.memberTraits = Object.assign({}, computedMemberTraits, schema.getMemberTraits(), this.getMemberTraits());
|
|
372
|
+
this.normalizedTraits = void 0;
|
|
373
|
+
this.memberName = memberName ?? schema.memberName;
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
this.schema = deref(schema);
|
|
377
|
+
if (isStaticSchema(this.schema)) {
|
|
378
|
+
this.name = `${this.schema[1]}#${this.schema[2]}`;
|
|
379
|
+
this.traits = this.schema[3];
|
|
380
|
+
} else {
|
|
381
|
+
this.name = this.memberName ?? String(schema);
|
|
382
|
+
this.traits = 0;
|
|
383
|
+
}
|
|
384
|
+
if (this._isMemberSchema && !memberName) throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`);
|
|
385
|
+
}
|
|
386
|
+
static [Symbol.hasInstance](lhs) {
|
|
387
|
+
const isPrototype = this.prototype.isPrototypeOf(lhs);
|
|
388
|
+
if (!isPrototype && typeof lhs === "object" && lhs !== null) return lhs.symbol === this.symbol;
|
|
389
|
+
return isPrototype;
|
|
390
|
+
}
|
|
391
|
+
static of(ref) {
|
|
392
|
+
const keyAble = typeof ref === "function" || typeof ref === "object" && ref !== null;
|
|
393
|
+
if (typeof ref === "number") {
|
|
394
|
+
if (simpleSchemaCacheN[ref]) return simpleSchemaCacheN[ref];
|
|
395
|
+
} else if (typeof ref === "string") {
|
|
396
|
+
if (simpleSchemaCacheS[ref]) return simpleSchemaCacheS[ref];
|
|
397
|
+
} else if (keyAble) {
|
|
398
|
+
if (ref[anno.ns]) return ref[anno.ns];
|
|
399
|
+
}
|
|
400
|
+
const sc = deref(ref);
|
|
401
|
+
if (sc instanceof NormalizedSchema) return sc;
|
|
402
|
+
if (isMemberSchema(sc)) {
|
|
403
|
+
const [ns, traits] = sc;
|
|
404
|
+
if (ns instanceof NormalizedSchema) {
|
|
405
|
+
Object.assign(ns.getMergedTraits(), translateTraits(traits));
|
|
406
|
+
return ns;
|
|
407
|
+
}
|
|
408
|
+
throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(ref, null, 2)}.`);
|
|
409
|
+
}
|
|
410
|
+
const ns = new NormalizedSchema(sc);
|
|
411
|
+
if (keyAble) return ref[anno.ns] = ns;
|
|
412
|
+
if (typeof sc === "string") return simpleSchemaCacheS[sc] = ns;
|
|
413
|
+
if (typeof sc === "number") return simpleSchemaCacheN[sc] = ns;
|
|
414
|
+
return ns;
|
|
415
|
+
}
|
|
416
|
+
getSchema() {
|
|
417
|
+
const sc = this.schema;
|
|
418
|
+
if (Array.isArray(sc) && sc[0] === 0) return sc[4];
|
|
419
|
+
return sc;
|
|
420
|
+
}
|
|
421
|
+
getName(withNamespace = false) {
|
|
422
|
+
const { name } = this;
|
|
423
|
+
return !withNamespace && name && name.includes("#") ? name.split("#")[1] : name || void 0;
|
|
424
|
+
}
|
|
425
|
+
getMemberName() {
|
|
426
|
+
return this.memberName;
|
|
427
|
+
}
|
|
428
|
+
isMemberSchema() {
|
|
429
|
+
return this._isMemberSchema;
|
|
430
|
+
}
|
|
431
|
+
isListSchema() {
|
|
432
|
+
const sc = this.getSchema();
|
|
433
|
+
return typeof sc === "number" ? sc >= 64 && sc < 128 : sc[0] === 1;
|
|
434
|
+
}
|
|
435
|
+
isMapSchema() {
|
|
436
|
+
const sc = this.getSchema();
|
|
437
|
+
return typeof sc === "number" ? sc >= 128 && sc <= 255 : sc[0] === 2;
|
|
438
|
+
}
|
|
439
|
+
isStructSchema() {
|
|
440
|
+
const sc = this.getSchema();
|
|
441
|
+
if (typeof sc !== "object") return false;
|
|
442
|
+
const id = sc[0];
|
|
443
|
+
return id === 3 || id === -3 || id === 4;
|
|
444
|
+
}
|
|
445
|
+
isUnionSchema() {
|
|
446
|
+
const sc = this.getSchema();
|
|
447
|
+
if (typeof sc !== "object") return false;
|
|
448
|
+
return sc[0] === 4;
|
|
449
|
+
}
|
|
450
|
+
isBlobSchema() {
|
|
451
|
+
const sc = this.getSchema();
|
|
452
|
+
return sc === 21 || sc === 42;
|
|
453
|
+
}
|
|
454
|
+
isTimestampSchema() {
|
|
455
|
+
const sc = this.getSchema();
|
|
456
|
+
return typeof sc === "number" && sc >= 4 && sc <= 7;
|
|
457
|
+
}
|
|
458
|
+
isUnitSchema() {
|
|
459
|
+
return this.getSchema() === "unit";
|
|
460
|
+
}
|
|
461
|
+
isDocumentSchema() {
|
|
462
|
+
return this.getSchema() === 15;
|
|
463
|
+
}
|
|
464
|
+
isStringSchema() {
|
|
465
|
+
return this.getSchema() === 0;
|
|
466
|
+
}
|
|
467
|
+
isBooleanSchema() {
|
|
468
|
+
return this.getSchema() === 2;
|
|
469
|
+
}
|
|
470
|
+
isNumericSchema() {
|
|
471
|
+
return this.getSchema() === 1;
|
|
472
|
+
}
|
|
473
|
+
isBigIntegerSchema() {
|
|
474
|
+
return this.getSchema() === 17;
|
|
475
|
+
}
|
|
476
|
+
isBigDecimalSchema() {
|
|
477
|
+
return this.getSchema() === 19;
|
|
478
|
+
}
|
|
479
|
+
isStreaming() {
|
|
480
|
+
const { streaming } = this.getMergedTraits();
|
|
481
|
+
return !!streaming || this.getSchema() === 42;
|
|
482
|
+
}
|
|
483
|
+
isIdempotencyToken() {
|
|
484
|
+
return !!this.getMergedTraits().idempotencyToken;
|
|
485
|
+
}
|
|
486
|
+
getMergedTraits() {
|
|
487
|
+
return this.normalizedTraits ?? (this.normalizedTraits = {
|
|
488
|
+
...this.getOwnTraits(),
|
|
489
|
+
...this.getMemberTraits()
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
getMemberTraits() {
|
|
493
|
+
return translateTraits(this.memberTraits);
|
|
494
|
+
}
|
|
495
|
+
getOwnTraits() {
|
|
496
|
+
return translateTraits(this.traits);
|
|
497
|
+
}
|
|
498
|
+
getKeySchema() {
|
|
499
|
+
const [isDoc, isMap] = [this.isDocumentSchema(), this.isMapSchema()];
|
|
500
|
+
if (!isDoc && !isMap) throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(true)}`);
|
|
501
|
+
const schema = this.getSchema();
|
|
502
|
+
return member([isDoc ? 15 : schema[4] ?? 0, 0], "key");
|
|
503
|
+
}
|
|
504
|
+
getValueSchema() {
|
|
505
|
+
const sc = this.getSchema();
|
|
506
|
+
const [isDoc, isMap, isList] = [
|
|
507
|
+
this.isDocumentSchema(),
|
|
508
|
+
this.isMapSchema(),
|
|
509
|
+
this.isListSchema()
|
|
510
|
+
];
|
|
511
|
+
const memberSchema = typeof sc === "number" ? 63 & sc : sc && typeof sc === "object" && (isMap || isList) ? sc[3 + sc[0]] : isDoc ? 15 : void 0;
|
|
512
|
+
if (memberSchema != null) return member([memberSchema, 0], isMap ? "value" : "member");
|
|
513
|
+
throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`);
|
|
514
|
+
}
|
|
515
|
+
getMemberSchema(memberName) {
|
|
516
|
+
const struct = this.getSchema();
|
|
517
|
+
if (this.isStructSchema() && struct[4].includes(memberName)) {
|
|
518
|
+
const i = struct[4].indexOf(memberName);
|
|
519
|
+
const memberSchema = struct[5][i];
|
|
520
|
+
return member(isMemberSchema(memberSchema) ? memberSchema : [memberSchema, 0], memberName);
|
|
521
|
+
}
|
|
522
|
+
if (this.isDocumentSchema()) return member([15, 0], memberName);
|
|
523
|
+
throw new Error(`@smithy/core/schema - ${this.getName(true)} has no member=${memberName}.`);
|
|
524
|
+
}
|
|
525
|
+
getMemberSchemas() {
|
|
526
|
+
const buffer = {};
|
|
527
|
+
try {
|
|
528
|
+
for (const [k, v] of this.structIterator()) buffer[k] = v;
|
|
529
|
+
} catch (ignored) {}
|
|
530
|
+
return buffer;
|
|
531
|
+
}
|
|
532
|
+
getEventStreamMember() {
|
|
533
|
+
if (this.isStructSchema()) {
|
|
534
|
+
for (const [memberName, memberSchema] of this.structIterator()) if (memberSchema.isStreaming() && memberSchema.isStructSchema()) return memberName;
|
|
535
|
+
}
|
|
536
|
+
return "";
|
|
537
|
+
}
|
|
538
|
+
*structIterator() {
|
|
539
|
+
if (this.isUnitSchema()) return;
|
|
540
|
+
if (!this.isStructSchema()) throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");
|
|
541
|
+
const struct = this.getSchema();
|
|
542
|
+
const z = struct[4].length;
|
|
543
|
+
let it = struct[anno.it];
|
|
544
|
+
if (it && z === it.length) {
|
|
545
|
+
yield* it;
|
|
546
|
+
return;
|
|
547
|
+
}
|
|
548
|
+
it = Array(z);
|
|
549
|
+
for (let i = 0; i < z; ++i) {
|
|
550
|
+
const k = struct[4][i];
|
|
551
|
+
const v = member([struct[5][i], 0], k);
|
|
552
|
+
yield it[i] = [k, v];
|
|
553
|
+
}
|
|
554
|
+
struct[anno.it] = it;
|
|
555
|
+
}
|
|
556
|
+
};
|
|
557
|
+
isMemberSchema = (sc) => Array.isArray(sc) && sc.length === 2;
|
|
558
|
+
isStaticSchema = (sc) => Array.isArray(sc) && sc.length >= 5;
|
|
559
|
+
}));
|
|
560
|
+
//#endregion
|
|
561
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js
|
|
562
|
+
var TypeRegistry;
|
|
563
|
+
var init_TypeRegistry = __esmMin((() => {
|
|
564
|
+
TypeRegistry = class TypeRegistry {
|
|
565
|
+
namespace;
|
|
566
|
+
schemas;
|
|
567
|
+
exceptions;
|
|
568
|
+
static registries = /* @__PURE__ */ new Map();
|
|
569
|
+
constructor(namespace, schemas = /* @__PURE__ */ new Map(), exceptions = /* @__PURE__ */ new Map()) {
|
|
570
|
+
this.namespace = namespace;
|
|
571
|
+
this.schemas = schemas;
|
|
572
|
+
this.exceptions = exceptions;
|
|
573
|
+
if (!TypeRegistry.registries.has(namespace)) TypeRegistry.registries.set(namespace, this);
|
|
574
|
+
}
|
|
575
|
+
static for(namespace) {
|
|
576
|
+
return TypeRegistry.registries.get(namespace) ?? new TypeRegistry(namespace);
|
|
577
|
+
}
|
|
578
|
+
copyFrom(other) {
|
|
579
|
+
const { schemas, exceptions } = this;
|
|
580
|
+
for (const [k, v] of other.schemas) if (!schemas.has(k)) schemas.set(k, v);
|
|
581
|
+
for (const [k, v] of other.exceptions) if (!exceptions.has(k)) exceptions.set(k, v);
|
|
582
|
+
}
|
|
583
|
+
register(shapeId, schema) {
|
|
584
|
+
const qualifiedName = this.normalizeShapeId(shapeId);
|
|
585
|
+
for (const r of [this, TypeRegistry.for(qualifiedName.split("#")[0])]) if (!r.schemas.has(qualifiedName)) r.schemas.set(qualifiedName, schema);
|
|
586
|
+
}
|
|
587
|
+
getSchema(shapeId) {
|
|
588
|
+
const id = this.normalizeShapeId(shapeId);
|
|
589
|
+
if (!this.schemas.has(id)) {
|
|
590
|
+
if (!shapeId.includes("#")) {
|
|
591
|
+
const suffix = "#" + shapeId;
|
|
592
|
+
const candidates = [];
|
|
593
|
+
for (const [shapeId, schema] of this.schemas.entries()) if (shapeId.endsWith(suffix)) candidates.push(schema);
|
|
594
|
+
if (candidates.length === 1) return candidates[0];
|
|
595
|
+
}
|
|
596
|
+
throw new Error(`@smithy/core/schema - schema not found for ${id}`);
|
|
597
|
+
}
|
|
598
|
+
return this.schemas.get(id);
|
|
599
|
+
}
|
|
600
|
+
registerError(es, ctor) {
|
|
601
|
+
const $error = es;
|
|
602
|
+
const ns = $error[1];
|
|
603
|
+
const qualifiedName = ns + "#" + $error[2];
|
|
604
|
+
for (const r of [this, TypeRegistry.for(ns)]) if (!r.schemas.has(qualifiedName) && !r.exceptions.has($error)) {
|
|
605
|
+
r.schemas.set(qualifiedName, $error);
|
|
606
|
+
r.exceptions.set($error, ctor);
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
getErrorCtor(es) {
|
|
610
|
+
const $error = es;
|
|
611
|
+
if (this.exceptions.has($error)) return this.exceptions.get($error);
|
|
612
|
+
return TypeRegistry.for($error[1]).exceptions.get($error);
|
|
613
|
+
}
|
|
614
|
+
getBaseException() {
|
|
615
|
+
for (const exceptionKey of this.exceptions.keys()) if (Array.isArray(exceptionKey)) {
|
|
616
|
+
const [, ns, name] = exceptionKey;
|
|
617
|
+
const id = ns + "#" + name;
|
|
618
|
+
if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) return exceptionKey;
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
find(predicate) {
|
|
622
|
+
for (const schema of this.schemas.values()) if (predicate(schema)) return schema;
|
|
623
|
+
}
|
|
624
|
+
clear() {
|
|
625
|
+
this.schemas.clear();
|
|
626
|
+
this.exceptions.clear();
|
|
627
|
+
}
|
|
628
|
+
normalizeShapeId(shapeId) {
|
|
629
|
+
if (shapeId.includes("#")) return shapeId;
|
|
630
|
+
return this.namespace + "#" + shapeId;
|
|
631
|
+
}
|
|
632
|
+
};
|
|
633
|
+
}));
|
|
634
|
+
//#endregion
|
|
635
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/schema/index.js
|
|
636
|
+
var init_schema = __esmMin((() => {
|
|
637
|
+
init_deref();
|
|
638
|
+
init_transport();
|
|
639
|
+
init_NormalizedSchema();
|
|
640
|
+
init_translateTraits();
|
|
641
|
+
init_TypeRegistry();
|
|
642
|
+
}));
|
|
643
|
+
//#endregion
|
|
644
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/serde/is-array-buffer/is-array-buffer.js
|
|
645
|
+
var isArrayBuffer;
|
|
646
|
+
var init_is_array_buffer = __esmMin((() => {
|
|
647
|
+
isArrayBuffer = (arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]";
|
|
648
|
+
}));
|
|
649
|
+
//#endregion
|
|
650
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/serde/util-buffer-from/buffer-from.js
|
|
651
|
+
var fromArrayBuffer, fromString;
|
|
652
|
+
var init_buffer_from = __esmMin((() => {
|
|
653
|
+
init_is_array_buffer();
|
|
654
|
+
fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => {
|
|
655
|
+
if (!isArrayBuffer(input)) throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);
|
|
656
|
+
return Buffer.from(input, offset, length);
|
|
657
|
+
};
|
|
658
|
+
fromString = (input, encoding) => {
|
|
659
|
+
if (typeof input !== "string") throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`);
|
|
660
|
+
return encoding ? Buffer.from(input, encoding) : Buffer.from(input);
|
|
661
|
+
};
|
|
662
|
+
}));
|
|
663
|
+
//#endregion
|
|
664
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/serde/util-base64/fromBase64.js
|
|
665
|
+
var BASE64_REGEX, fromBase64;
|
|
666
|
+
var init_fromBase64 = __esmMin((() => {
|
|
667
|
+
init_buffer_from();
|
|
668
|
+
BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/;
|
|
669
|
+
fromBase64 = (input) => {
|
|
670
|
+
if (input.length * 3 % 4 !== 0) throw new TypeError(`Incorrect padding on base64 string.`);
|
|
671
|
+
if (!BASE64_REGEX.exec(input)) throw new TypeError(`Invalid base64 string.`);
|
|
672
|
+
const buffer = fromString(input, "base64");
|
|
673
|
+
return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);
|
|
674
|
+
};
|
|
675
|
+
}));
|
|
676
|
+
//#endregion
|
|
677
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/fromUtf8.js
|
|
678
|
+
var fromUtf8$1;
|
|
679
|
+
var init_fromUtf8 = __esmMin((() => {
|
|
680
|
+
init_buffer_from();
|
|
681
|
+
fromUtf8$1 = (input) => {
|
|
682
|
+
const buf = fromString(input, "utf8");
|
|
683
|
+
return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);
|
|
684
|
+
};
|
|
685
|
+
}));
|
|
686
|
+
//#endregion
|
|
687
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/serde/util-base64/toBase64.js
|
|
688
|
+
var toBase64$1;
|
|
689
|
+
var init_toBase64 = __esmMin((() => {
|
|
690
|
+
init_buffer_from();
|
|
691
|
+
init_fromUtf8();
|
|
692
|
+
toBase64$1 = (_input) => {
|
|
693
|
+
let input;
|
|
694
|
+
if (typeof _input === "string") input = fromUtf8$1(_input);
|
|
695
|
+
else input = _input;
|
|
696
|
+
if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");
|
|
697
|
+
return fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("base64");
|
|
698
|
+
};
|
|
699
|
+
}));
|
|
700
|
+
//#endregion
|
|
701
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/blob/Uint8ArrayBlobAdapter.js
|
|
702
|
+
function bindUint8ArrayBlobAdapter(toUtf8, fromUtf8, toBase64, fromBase64) {
|
|
703
|
+
return class Uint8ArrayBlobAdapter extends Uint8Array {
|
|
704
|
+
static fromString(source, encoding = "utf-8") {
|
|
705
|
+
if (typeof source === "string") {
|
|
706
|
+
if (encoding === "base64") return Uint8ArrayBlobAdapter.mutate(fromBase64(source));
|
|
707
|
+
return Uint8ArrayBlobAdapter.mutate(fromUtf8(source));
|
|
708
|
+
}
|
|
709
|
+
throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`);
|
|
710
|
+
}
|
|
711
|
+
static mutate(source) {
|
|
712
|
+
Object.setPrototypeOf(source, Uint8ArrayBlobAdapter.prototype);
|
|
713
|
+
return source;
|
|
714
|
+
}
|
|
715
|
+
transformToString(encoding = "utf-8") {
|
|
716
|
+
if (encoding === "base64") return toBase64(this);
|
|
717
|
+
return toUtf8(this);
|
|
718
|
+
}
|
|
719
|
+
};
|
|
720
|
+
}
|
|
721
|
+
var init_Uint8ArrayBlobAdapter = __esmMin((() => {}));
|
|
722
|
+
//#endregion
|
|
723
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUtf8.js
|
|
724
|
+
var toUtf8$1;
|
|
725
|
+
var init_toUtf8 = __esmMin((() => {
|
|
726
|
+
init_buffer_from();
|
|
727
|
+
toUtf8$1 = (input) => {
|
|
728
|
+
if (typeof input === "string") return input;
|
|
729
|
+
if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");
|
|
730
|
+
return fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("utf8");
|
|
731
|
+
};
|
|
732
|
+
}));
|
|
733
|
+
//#endregion
|
|
734
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/serde/uuid/v4.js
|
|
735
|
+
function bindV4(getRandomValues) {
|
|
736
|
+
if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") return () => crypto.randomUUID();
|
|
737
|
+
return () => {
|
|
738
|
+
const rnds = /* @__PURE__ */ new Uint8Array(16);
|
|
739
|
+
getRandomValues(rnds);
|
|
740
|
+
rnds[6] = rnds[6] & 15 | 64;
|
|
741
|
+
rnds[8] = rnds[8] & 63 | 128;
|
|
742
|
+
return decimalToHex[rnds[0]] + decimalToHex[rnds[1]] + decimalToHex[rnds[2]] + decimalToHex[rnds[3]] + "-" + decimalToHex[rnds[4]] + decimalToHex[rnds[5]] + "-" + decimalToHex[rnds[6]] + decimalToHex[rnds[7]] + "-" + decimalToHex[rnds[8]] + decimalToHex[rnds[9]] + "-" + decimalToHex[rnds[10]] + decimalToHex[rnds[11]] + decimalToHex[rnds[12]] + decimalToHex[rnds[13]] + decimalToHex[rnds[14]] + decimalToHex[rnds[15]];
|
|
743
|
+
};
|
|
744
|
+
}
|
|
745
|
+
var decimalToHex;
|
|
746
|
+
var init_v4 = __esmMin((() => {
|
|
747
|
+
decimalToHex = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
|
|
748
|
+
}));
|
|
749
|
+
//#endregion
|
|
750
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js
|
|
751
|
+
function dateToUtcString(date) {
|
|
752
|
+
const year = date.getUTCFullYear();
|
|
753
|
+
const month = date.getUTCMonth();
|
|
754
|
+
const dayOfWeek = date.getUTCDay();
|
|
755
|
+
const dayOfMonthInt = date.getUTCDate();
|
|
756
|
+
const hoursInt = date.getUTCHours();
|
|
757
|
+
const minutesInt = date.getUTCMinutes();
|
|
758
|
+
const secondsInt = date.getUTCSeconds();
|
|
759
|
+
const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`;
|
|
760
|
+
const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`;
|
|
761
|
+
const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`;
|
|
762
|
+
const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`;
|
|
763
|
+
return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`;
|
|
764
|
+
}
|
|
765
|
+
var DAYS, MONTHS;
|
|
766
|
+
var init_date_utils = __esmMin((() => {
|
|
767
|
+
DAYS = [
|
|
768
|
+
"Sun",
|
|
769
|
+
"Mon",
|
|
770
|
+
"Tue",
|
|
771
|
+
"Wed",
|
|
772
|
+
"Thu",
|
|
773
|
+
"Fri",
|
|
774
|
+
"Sat"
|
|
775
|
+
];
|
|
776
|
+
MONTHS = [
|
|
777
|
+
"Jan",
|
|
778
|
+
"Feb",
|
|
779
|
+
"Mar",
|
|
780
|
+
"Apr",
|
|
781
|
+
"May",
|
|
782
|
+
"Jun",
|
|
783
|
+
"Jul",
|
|
784
|
+
"Aug",
|
|
785
|
+
"Sep",
|
|
786
|
+
"Oct",
|
|
787
|
+
"Nov",
|
|
788
|
+
"Dec"
|
|
789
|
+
];
|
|
790
|
+
}));
|
|
791
|
+
//#endregion
|
|
792
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/serde/lazy-json.js
|
|
793
|
+
var LazyJsonString;
|
|
794
|
+
var init_lazy_json = __esmMin((() => {
|
|
795
|
+
LazyJsonString = function LazyJsonString(val) {
|
|
796
|
+
return Object.assign(new String(val), {
|
|
797
|
+
deserializeJSON() {
|
|
798
|
+
return JSON.parse(String(val));
|
|
799
|
+
},
|
|
800
|
+
toString() {
|
|
801
|
+
return String(val);
|
|
802
|
+
},
|
|
803
|
+
toJSON() {
|
|
804
|
+
return String(val);
|
|
805
|
+
}
|
|
806
|
+
});
|
|
807
|
+
};
|
|
808
|
+
LazyJsonString.from = (object) => {
|
|
809
|
+
if (object && typeof object === "object" && (object instanceof LazyJsonString || "deserializeJSON" in object)) return object;
|
|
810
|
+
else if (typeof object === "string" || Object.getPrototypeOf(object) === String.prototype) return LazyJsonString(String(object));
|
|
811
|
+
return LazyJsonString(JSON.stringify(object));
|
|
812
|
+
};
|
|
813
|
+
LazyJsonString.fromObject = LazyJsonString.from;
|
|
814
|
+
}));
|
|
815
|
+
//#endregion
|
|
816
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/serde/quote-header.js
|
|
817
|
+
function quoteHeader(part) {
|
|
818
|
+
if (part.includes(",") || part.includes("\"")) part = `"${part.replace(/"/g, "\\\"")}"`;
|
|
819
|
+
return part;
|
|
820
|
+
}
|
|
821
|
+
var init_quote_header = __esmMin((() => {}));
|
|
822
|
+
//#endregion
|
|
823
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js
|
|
824
|
+
function range(v, min, max) {
|
|
825
|
+
const _v = Number(v);
|
|
826
|
+
if (_v < min || _v > max) throw new Error(`Value ${_v} out of range [${min}, ${max}]`);
|
|
827
|
+
}
|
|
828
|
+
var ddd, mmm, time, date, year, RFC3339_WITH_OFFSET, IMF_FIXDATE, RFC_850_DATE, ASC_TIME, months, _parseEpochTimestamp, _parseRfc3339DateTimeWithOffset, _parseRfc7231DateTime;
|
|
829
|
+
var init_schema_date_utils = __esmMin((() => {
|
|
830
|
+
ddd = `(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`;
|
|
831
|
+
mmm = `(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`;
|
|
832
|
+
time = `(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?`;
|
|
833
|
+
date = `(\\d?\\d)`;
|
|
834
|
+
year = `(\\d{4})`;
|
|
835
|
+
RFC3339_WITH_OFFSET = /* @__PURE__ */ new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/);
|
|
836
|
+
IMF_FIXDATE = new RegExp(`^${ddd}, ${date} ${mmm} ${year} ${time} GMT$`);
|
|
837
|
+
RFC_850_DATE = new RegExp(`^${ddd}, ${date}-${mmm}-(\\d\\d) ${time} GMT$`);
|
|
838
|
+
ASC_TIME = new RegExp(`^${ddd} ${mmm} ( [1-9]|\\d\\d) ${time} ${year}$`);
|
|
839
|
+
months = [
|
|
840
|
+
"Jan",
|
|
841
|
+
"Feb",
|
|
842
|
+
"Mar",
|
|
843
|
+
"Apr",
|
|
844
|
+
"May",
|
|
845
|
+
"Jun",
|
|
846
|
+
"Jul",
|
|
847
|
+
"Aug",
|
|
848
|
+
"Sep",
|
|
849
|
+
"Oct",
|
|
850
|
+
"Nov",
|
|
851
|
+
"Dec"
|
|
852
|
+
];
|
|
853
|
+
_parseEpochTimestamp = (value) => {
|
|
854
|
+
if (value == null) return;
|
|
855
|
+
let num = NaN;
|
|
856
|
+
if (typeof value === "number") num = value;
|
|
857
|
+
else if (typeof value === "string") {
|
|
858
|
+
if (!/^-?\d*\.?\d+$/.test(value)) throw new TypeError(`parseEpochTimestamp - numeric string invalid.`);
|
|
859
|
+
num = Number.parseFloat(value);
|
|
860
|
+
} else if (typeof value === "object" && value.tag === 1) num = value.value;
|
|
861
|
+
if (isNaN(num) || Math.abs(num) === Infinity) throw new TypeError("Epoch timestamps must be valid finite numbers.");
|
|
862
|
+
return new Date(Math.round(num * 1e3));
|
|
863
|
+
};
|
|
864
|
+
_parseRfc3339DateTimeWithOffset = (value) => {
|
|
865
|
+
if (value == null) return;
|
|
866
|
+
if (typeof value !== "string") throw new TypeError("RFC3339 timestamps must be strings");
|
|
867
|
+
const matches = RFC3339_WITH_OFFSET.exec(value);
|
|
868
|
+
if (!matches) throw new TypeError(`Invalid RFC3339 timestamp format ${value}`);
|
|
869
|
+
const [, yearStr, monthStr, dayStr, hours, minutes, seconds, , ms, offsetStr] = matches;
|
|
870
|
+
range(monthStr, 1, 12);
|
|
871
|
+
range(dayStr, 1, 31);
|
|
872
|
+
range(hours, 0, 23);
|
|
873
|
+
range(minutes, 0, 59);
|
|
874
|
+
range(seconds, 0, 60);
|
|
875
|
+
const date = new Date(Date.UTC(Number(yearStr), Number(monthStr) - 1, Number(dayStr), Number(hours), Number(minutes), Number(seconds), Number(ms) ? Math.round(parseFloat(`0.${ms}`) * 1e3) : 0));
|
|
876
|
+
date.setUTCFullYear(Number(yearStr));
|
|
877
|
+
if (offsetStr.toUpperCase() != "Z") {
|
|
878
|
+
const [, sign, offsetH, offsetM] = /([+-])(\d\d):(\d\d)/.exec(offsetStr) || [
|
|
879
|
+
void 0,
|
|
880
|
+
"+",
|
|
881
|
+
0,
|
|
882
|
+
0
|
|
883
|
+
];
|
|
884
|
+
const scalar = sign === "-" ? 1 : -1;
|
|
885
|
+
date.setTime(date.getTime() + scalar * (Number(offsetH) * 60 * 60 * 1e3 + Number(offsetM) * 60 * 1e3));
|
|
886
|
+
}
|
|
887
|
+
return date;
|
|
888
|
+
};
|
|
889
|
+
_parseRfc7231DateTime = (value) => {
|
|
890
|
+
if (value == null) return;
|
|
891
|
+
if (typeof value !== "string") throw new TypeError("RFC7231 timestamps must be strings.");
|
|
892
|
+
let day;
|
|
893
|
+
let month;
|
|
894
|
+
let year;
|
|
895
|
+
let hour;
|
|
896
|
+
let minute;
|
|
897
|
+
let second;
|
|
898
|
+
let fraction;
|
|
899
|
+
let matches;
|
|
900
|
+
if (matches = IMF_FIXDATE.exec(value)) [, day, month, year, hour, minute, second, fraction] = matches;
|
|
901
|
+
else if (matches = RFC_850_DATE.exec(value)) {
|
|
902
|
+
[, day, month, year, hour, minute, second, fraction] = matches;
|
|
903
|
+
year = (Number(year) + 1900).toString();
|
|
904
|
+
} else if (matches = ASC_TIME.exec(value)) [, month, day, hour, minute, second, fraction, year] = matches;
|
|
905
|
+
if (year && second) {
|
|
906
|
+
const timestamp = Date.UTC(Number(year), months.indexOf(month), Number(day), Number(hour), Number(minute), Number(second), fraction ? Math.round(parseFloat(`0.${fraction}`) * 1e3) : 0);
|
|
907
|
+
range(day, 1, 31);
|
|
908
|
+
range(hour, 0, 23);
|
|
909
|
+
range(minute, 0, 59);
|
|
910
|
+
range(second, 0, 60);
|
|
911
|
+
const date = new Date(timestamp);
|
|
912
|
+
date.setUTCFullYear(Number(year));
|
|
913
|
+
return date;
|
|
914
|
+
}
|
|
915
|
+
throw new TypeError(`Invalid RFC7231 date-time value ${value}.`);
|
|
916
|
+
};
|
|
917
|
+
}));
|
|
918
|
+
//#endregion
|
|
919
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/serde/split-every.js
|
|
920
|
+
function splitEvery(value, delimiter, numDelimiters) {
|
|
921
|
+
if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery.");
|
|
922
|
+
const segments = value.split(delimiter);
|
|
923
|
+
if (numDelimiters === 1) return segments;
|
|
924
|
+
const compoundSegments = [];
|
|
925
|
+
let currentSegment = "";
|
|
926
|
+
for (let i = 0; i < segments.length; i++) {
|
|
927
|
+
if (currentSegment === "") currentSegment = segments[i];
|
|
928
|
+
else currentSegment += delimiter + segments[i];
|
|
929
|
+
if ((i + 1) % numDelimiters === 0) {
|
|
930
|
+
compoundSegments.push(currentSegment);
|
|
931
|
+
currentSegment = "";
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
if (currentSegment !== "") compoundSegments.push(currentSegment);
|
|
935
|
+
return compoundSegments;
|
|
936
|
+
}
|
|
937
|
+
var init_split_every = __esmMin((() => {}));
|
|
938
|
+
//#endregion
|
|
939
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/serde/split-header.js
|
|
940
|
+
var splitHeader;
|
|
941
|
+
var init_split_header = __esmMin((() => {
|
|
942
|
+
splitHeader = (value) => {
|
|
943
|
+
const z = value.length;
|
|
944
|
+
const values = [];
|
|
945
|
+
let withinQuotes = false;
|
|
946
|
+
let prevChar = void 0;
|
|
947
|
+
let anchor = 0;
|
|
948
|
+
for (let i = 0; i < z; ++i) {
|
|
949
|
+
const char = value[i];
|
|
950
|
+
switch (char) {
|
|
951
|
+
case `"`:
|
|
952
|
+
if (prevChar !== "\\") withinQuotes = !withinQuotes;
|
|
953
|
+
break;
|
|
954
|
+
case ",": if (!withinQuotes) {
|
|
955
|
+
values.push(value.slice(anchor, i));
|
|
956
|
+
anchor = i + 1;
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
prevChar = char;
|
|
960
|
+
}
|
|
961
|
+
values.push(value.slice(anchor));
|
|
962
|
+
return values.map((v) => {
|
|
963
|
+
v = v.trim();
|
|
964
|
+
const z = v.length;
|
|
965
|
+
if (z < 2) return v;
|
|
966
|
+
if (v[0] === `"` && v[z - 1] === `"`) v = v.slice(1, z - 1);
|
|
967
|
+
return v.replace(/\\"/g, "\"");
|
|
968
|
+
});
|
|
969
|
+
};
|
|
970
|
+
}));
|
|
971
|
+
//#endregion
|
|
972
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js
|
|
973
|
+
var format, NumericValue;
|
|
974
|
+
var init_NumericValue = __esmMin((() => {
|
|
975
|
+
format = /^-?((0|[1-9]\d*)(\.\d+)?|\.\d+)([eE][+-]?\d+)?$/;
|
|
976
|
+
NumericValue = class NumericValue {
|
|
977
|
+
string;
|
|
978
|
+
type;
|
|
979
|
+
constructor(string, type) {
|
|
980
|
+
this.string = string;
|
|
981
|
+
this.type = type;
|
|
982
|
+
if (!format.test(string)) throw new Error(`@smithy/core/serde - NumericValue string must conform to the Smithy bigDecimal format. Received: "${string}"`);
|
|
983
|
+
}
|
|
984
|
+
toString() {
|
|
985
|
+
return this.string;
|
|
986
|
+
}
|
|
987
|
+
static [Symbol.hasInstance](object) {
|
|
988
|
+
if (!object || typeof object !== "object") return false;
|
|
989
|
+
const _nv = object;
|
|
990
|
+
return NumericValue.prototype.isPrototypeOf(object) || _nv.type === "bigDecimal" && format.test(_nv.string);
|
|
991
|
+
}
|
|
992
|
+
};
|
|
993
|
+
}));
|
|
994
|
+
//#endregion
|
|
995
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/serde/util-hex-encoding/hex-encoding.js
|
|
996
|
+
function fromHex(encoded) {
|
|
997
|
+
if (encoded.length % 2 !== 0) throw new Error("Hex encoded strings must have an even number length");
|
|
998
|
+
const out = new Uint8Array(encoded.length / 2);
|
|
999
|
+
for (let i = 0; i < encoded.length; i += 2) {
|
|
1000
|
+
const encodedByte = encoded.slice(i, i + 2).toLowerCase();
|
|
1001
|
+
if (encodedByte in HEX_TO_SHORT) out[i / 2] = HEX_TO_SHORT[encodedByte];
|
|
1002
|
+
else throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);
|
|
1003
|
+
}
|
|
1004
|
+
return out;
|
|
1005
|
+
}
|
|
1006
|
+
function toHex(bytes) {
|
|
1007
|
+
let out = "";
|
|
1008
|
+
for (let i = 0; i < bytes.byteLength; i++) out += SHORT_TO_HEX[bytes[i]];
|
|
1009
|
+
return out;
|
|
1010
|
+
}
|
|
1011
|
+
var SHORT_TO_HEX, HEX_TO_SHORT;
|
|
1012
|
+
var init_hex_encoding = __esmMin((() => {
|
|
1013
|
+
SHORT_TO_HEX = {};
|
|
1014
|
+
HEX_TO_SHORT = {};
|
|
1015
|
+
for (let i = 0; i < 256; i++) {
|
|
1016
|
+
let encodedByte = i.toString(16).toLowerCase();
|
|
1017
|
+
if (encodedByte.length === 1) encodedByte = `0${encodedByte}`;
|
|
1018
|
+
SHORT_TO_HEX[i] = encodedByte;
|
|
1019
|
+
HEX_TO_SHORT[encodedByte] = i;
|
|
1020
|
+
}
|
|
1021
|
+
}));
|
|
1022
|
+
//#endregion
|
|
1023
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/serde/concatBytes.js
|
|
1024
|
+
function concatBytes(arrays, length) {
|
|
1025
|
+
if (length === void 0) {
|
|
1026
|
+
length = 0;
|
|
1027
|
+
for (const bytes of arrays) length += bytes.byteLength;
|
|
1028
|
+
}
|
|
1029
|
+
const result = new Uint8Array(length);
|
|
1030
|
+
let offset = 0;
|
|
1031
|
+
for (const buf of arrays) {
|
|
1032
|
+
result.set(buf, offset);
|
|
1033
|
+
offset += buf.byteLength;
|
|
1034
|
+
}
|
|
1035
|
+
return result;
|
|
1036
|
+
}
|
|
1037
|
+
var init_concatBytes = __esmMin((() => {}));
|
|
1038
|
+
//#endregion
|
|
1039
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-type-check.js
|
|
1040
|
+
var isReadableStream, isBlob;
|
|
1041
|
+
var init_stream_type_check = __esmMin((() => {
|
|
1042
|
+
isReadableStream = (stream) => typeof ReadableStream === "function" && (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream);
|
|
1043
|
+
isBlob = (blob) => {
|
|
1044
|
+
return typeof Blob === "function" && (blob?.constructor?.name === Blob.name || blob instanceof Blob);
|
|
1045
|
+
};
|
|
1046
|
+
}));
|
|
1047
|
+
//#endregion
|
|
1048
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/fromUtf8.browser.js
|
|
1049
|
+
var fromUtf8;
|
|
1050
|
+
var init_fromUtf8_browser = __esmMin((() => {
|
|
1051
|
+
fromUtf8 = (input) => new TextEncoder().encode(input);
|
|
1052
|
+
})), chars, alphabetByValue;
|
|
1053
|
+
var init_constants_for_browser = __esmMin((() => {
|
|
1054
|
+
chars = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`;
|
|
1055
|
+
Object.entries(chars).reduce((acc, [i, c]) => {
|
|
1056
|
+
acc[c] = Number(i);
|
|
1057
|
+
return acc;
|
|
1058
|
+
}, {});
|
|
1059
|
+
alphabetByValue = chars.split("");
|
|
1060
|
+
}));
|
|
1061
|
+
//#endregion
|
|
1062
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/serde/util-base64/toBase64.browser.js
|
|
1063
|
+
function toBase64(_input) {
|
|
1064
|
+
let input;
|
|
1065
|
+
if (typeof _input === "string") input = fromUtf8(_input);
|
|
1066
|
+
else input = _input;
|
|
1067
|
+
const isArrayLike = typeof input === "object" && typeof input.length === "number";
|
|
1068
|
+
const isUint8Array = typeof input === "object" && typeof input.byteOffset === "number" && typeof input.byteLength === "number";
|
|
1069
|
+
if (!isArrayLike && !isUint8Array) throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");
|
|
1070
|
+
let str = "";
|
|
1071
|
+
for (let i = 0; i < input.length; i += 3) {
|
|
1072
|
+
let bits = 0;
|
|
1073
|
+
let bitLength = 0;
|
|
1074
|
+
for (let j = i, limit = Math.min(i + 3, input.length); j < limit; j++) {
|
|
1075
|
+
bits |= input[j] << (limit - j - 1) * 8;
|
|
1076
|
+
bitLength += 8;
|
|
1077
|
+
}
|
|
1078
|
+
const bitClusterCount = Math.ceil(bitLength / 6);
|
|
1079
|
+
bits <<= bitClusterCount * 6 - bitLength;
|
|
1080
|
+
for (let k = 1; k <= bitClusterCount; k++) {
|
|
1081
|
+
const offset = (bitClusterCount - k) * 6;
|
|
1082
|
+
str += alphabetByValue[(bits & 63 << offset) >> offset];
|
|
1083
|
+
}
|
|
1084
|
+
str += "==".slice(0, 4 - bitClusterCount);
|
|
1085
|
+
}
|
|
1086
|
+
return str;
|
|
1087
|
+
}
|
|
1088
|
+
var init_toBase64_browser = __esmMin((() => {
|
|
1089
|
+
init_fromUtf8_browser();
|
|
1090
|
+
init_constants_for_browser();
|
|
1091
|
+
}));
|
|
1092
|
+
//#endregion
|
|
1093
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUtf8.browser.js
|
|
1094
|
+
var toUtf8;
|
|
1095
|
+
var init_toUtf8_browser = __esmMin((() => {
|
|
1096
|
+
toUtf8 = (input) => {
|
|
1097
|
+
if (typeof input === "string") return input;
|
|
1098
|
+
if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");
|
|
1099
|
+
return new TextDecoder("utf-8").decode(input);
|
|
1100
|
+
};
|
|
1101
|
+
}));
|
|
1102
|
+
//#endregion
|
|
1103
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.browser.js
|
|
1104
|
+
async function collectBlob(blob) {
|
|
1105
|
+
return blob.arrayBuffer().then((ab) => new Uint8Array(ab));
|
|
1106
|
+
}
|
|
1107
|
+
async function collectReadableStream(stream) {
|
|
1108
|
+
const chunks = [];
|
|
1109
|
+
const reader = stream.getReader();
|
|
1110
|
+
let length = 0;
|
|
1111
|
+
while (true) {
|
|
1112
|
+
const { done, value } = await reader.read();
|
|
1113
|
+
if (value) {
|
|
1114
|
+
chunks.push(value);
|
|
1115
|
+
length += value.length;
|
|
1116
|
+
}
|
|
1117
|
+
if (done) break;
|
|
1118
|
+
}
|
|
1119
|
+
return concatBytes(chunks, length);
|
|
1120
|
+
}
|
|
1121
|
+
var streamCollector$1;
|
|
1122
|
+
var init_stream_collector_browser = __esmMin((() => {
|
|
1123
|
+
init_concatBytes();
|
|
1124
|
+
init_stream_type_check();
|
|
1125
|
+
streamCollector$1 = async (stream) => {
|
|
1126
|
+
if (isBlob(stream)) return collectBlob(stream);
|
|
1127
|
+
return collectReadableStream(stream);
|
|
1128
|
+
};
|
|
1129
|
+
}));
|
|
1130
|
+
//#endregion
|
|
1131
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/sdk-stream-mixin.browser.js
|
|
1132
|
+
var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED$1, sdkStreamMixin$1, isBlobInstance;
|
|
1133
|
+
var init_sdk_stream_mixin_browser = __esmMin((() => {
|
|
1134
|
+
init_toBase64_browser();
|
|
1135
|
+
init_hex_encoding();
|
|
1136
|
+
init_toUtf8_browser();
|
|
1137
|
+
init_stream_collector_browser();
|
|
1138
|
+
init_stream_type_check();
|
|
1139
|
+
ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED$1 = "The stream has already been transformed.";
|
|
1140
|
+
sdkStreamMixin$1 = (stream) => {
|
|
1141
|
+
if (!isBlobInstance(stream) && !isReadableStream(stream)) {
|
|
1142
|
+
const name = stream?.__proto__?.constructor?.name || stream;
|
|
1143
|
+
throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`);
|
|
1144
|
+
}
|
|
1145
|
+
let transformed = false;
|
|
1146
|
+
const transformToByteArray = async () => {
|
|
1147
|
+
if (transformed) throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED$1);
|
|
1148
|
+
transformed = true;
|
|
1149
|
+
return await streamCollector$1(stream);
|
|
1150
|
+
};
|
|
1151
|
+
const blobToWebStream = (blob) => {
|
|
1152
|
+
if (typeof blob.stream !== "function") throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");
|
|
1153
|
+
return blob.stream();
|
|
1154
|
+
};
|
|
1155
|
+
return Object.assign(stream, {
|
|
1156
|
+
transformToByteArray,
|
|
1157
|
+
transformToString: async (encoding) => {
|
|
1158
|
+
const buf = await transformToByteArray();
|
|
1159
|
+
if (encoding === "base64") return toBase64(buf);
|
|
1160
|
+
else if (encoding === "hex") return toHex(buf);
|
|
1161
|
+
else if (encoding === void 0 || encoding === "utf8" || encoding === "utf-8") return toUtf8(buf);
|
|
1162
|
+
else if (typeof TextDecoder === "function") return new TextDecoder(encoding).decode(buf);
|
|
1163
|
+
else throw new Error("TextDecoder is not available, please make sure polyfill is provided.");
|
|
1164
|
+
},
|
|
1165
|
+
transformToWebStream: () => {
|
|
1166
|
+
if (transformed) throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED$1);
|
|
1167
|
+
transformed = true;
|
|
1168
|
+
if (isBlobInstance(stream)) return blobToWebStream(stream);
|
|
1169
|
+
else if (isReadableStream(stream)) return stream;
|
|
1170
|
+
else throw new Error(`Cannot transform payload to web stream, got ${stream}`);
|
|
1171
|
+
}
|
|
1172
|
+
});
|
|
1173
|
+
};
|
|
1174
|
+
isBlobInstance = (stream) => typeof Blob === "function" && stream instanceof Blob;
|
|
1175
|
+
}));
|
|
1176
|
+
//#endregion
|
|
1177
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.js
|
|
1178
|
+
var streamCollector, Collector;
|
|
1179
|
+
var init_stream_collector = __esmMin((() => {
|
|
1180
|
+
init_concatBytes();
|
|
1181
|
+
init_stream_collector_browser();
|
|
1182
|
+
init_stream_type_check();
|
|
1183
|
+
streamCollector = (stream) => {
|
|
1184
|
+
if (isBlob(stream)) return collectBlob(stream);
|
|
1185
|
+
if (isReadableStream(stream)) return collectReadableStream(stream);
|
|
1186
|
+
return new Promise((resolve, reject) => {
|
|
1187
|
+
const collector = new Collector();
|
|
1188
|
+
const nodeStream = stream;
|
|
1189
|
+
nodeStream.pipe(collector);
|
|
1190
|
+
nodeStream.on("error", (err) => {
|
|
1191
|
+
collector.end();
|
|
1192
|
+
reject(err);
|
|
1193
|
+
});
|
|
1194
|
+
collector.on("error", reject);
|
|
1195
|
+
collector.on("finish", function() {
|
|
1196
|
+
resolve(concatBytes(this.bufferedBytes));
|
|
1197
|
+
});
|
|
1198
|
+
});
|
|
1199
|
+
};
|
|
1200
|
+
Collector = class extends Writable {
|
|
1201
|
+
bufferedBytes = [];
|
|
1202
|
+
_write(chunk, encoding, callback) {
|
|
1203
|
+
this.bufferedBytes.push(chunk);
|
|
1204
|
+
callback();
|
|
1205
|
+
}
|
|
1206
|
+
};
|
|
1207
|
+
}));
|
|
1208
|
+
//#endregion
|
|
1209
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/sdk-stream-mixin.js
|
|
1210
|
+
var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED, sdkStreamMixin;
|
|
1211
|
+
var init_sdk_stream_mixin = __esmMin((() => {
|
|
1212
|
+
init_buffer_from();
|
|
1213
|
+
init_sdk_stream_mixin_browser();
|
|
1214
|
+
init_stream_collector();
|
|
1215
|
+
ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed.";
|
|
1216
|
+
sdkStreamMixin = (stream) => {
|
|
1217
|
+
if (!(stream instanceof Readable)) try {
|
|
1218
|
+
return sdkStreamMixin$1(stream);
|
|
1219
|
+
} catch (ignored) {
|
|
1220
|
+
const name = stream?.__proto__?.constructor?.name || stream;
|
|
1221
|
+
throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`);
|
|
1222
|
+
}
|
|
1223
|
+
let transformed = false;
|
|
1224
|
+
const transformToByteArray = async () => {
|
|
1225
|
+
if (transformed) throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
|
|
1226
|
+
transformed = true;
|
|
1227
|
+
return await streamCollector(stream);
|
|
1228
|
+
};
|
|
1229
|
+
return Object.assign(stream, {
|
|
1230
|
+
transformToByteArray,
|
|
1231
|
+
transformToString: async (encoding) => {
|
|
1232
|
+
const buf = await transformToByteArray();
|
|
1233
|
+
if (encoding === void 0 || Buffer.isEncoding(encoding)) return fromArrayBuffer(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding);
|
|
1234
|
+
else return new TextDecoder(encoding).decode(buf);
|
|
1235
|
+
},
|
|
1236
|
+
transformToWebStream: () => {
|
|
1237
|
+
if (transformed) throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
|
|
1238
|
+
if (stream.readableFlowing !== null) throw new Error("The stream has been consumed by other callbacks.");
|
|
1239
|
+
if (typeof Readable.toWeb !== "function") throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");
|
|
1240
|
+
transformed = true;
|
|
1241
|
+
return Readable.toWeb(stream);
|
|
1242
|
+
}
|
|
1243
|
+
});
|
|
1244
|
+
};
|
|
1245
|
+
}));
|
|
1246
|
+
//#endregion
|
|
1247
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.35.0/node_modules/@smithy/core/dist-es/submodules/serde/index.js
|
|
1248
|
+
var Uint8ArrayBlobAdapter, _getRandomValues, v4, generateIdempotencyToken;
|
|
1249
|
+
var init_serde = __esmMin((() => {
|
|
1250
|
+
init_fromBase64();
|
|
1251
|
+
init_toBase64();
|
|
1252
|
+
init_Uint8ArrayBlobAdapter();
|
|
1253
|
+
init_fromUtf8();
|
|
1254
|
+
init_toUtf8();
|
|
1255
|
+
init_v4();
|
|
1256
|
+
init_date_utils();
|
|
1257
|
+
init_lazy_json();
|
|
1258
|
+
init_transport();
|
|
1259
|
+
init_quote_header();
|
|
1260
|
+
init_schema_date_utils();
|
|
1261
|
+
init_split_every();
|
|
1262
|
+
init_split_header();
|
|
1263
|
+
init_NumericValue();
|
|
1264
|
+
init_hex_encoding();
|
|
1265
|
+
init_buffer_from();
|
|
1266
|
+
init_is_array_buffer();
|
|
1267
|
+
init_schema();
|
|
1268
|
+
init_stream_type_check();
|
|
1269
|
+
init_toBase64_browser();
|
|
1270
|
+
init_sdk_stream_mixin();
|
|
1271
|
+
init_stream_collector();
|
|
1272
|
+
Uint8ArrayBlobAdapter = class extends bindUint8ArrayBlobAdapter(toUtf8$1, fromUtf8$1, toBase64$1, fromBase64) {};
|
|
1273
|
+
_getRandomValues = getRandomValues;
|
|
1274
|
+
v4 = bindV4(_getRandomValues);
|
|
1275
|
+
generateIdempotencyToken = v4;
|
|
1276
|
+
}));
|
|
1277
|
+
//#endregion
|
|
1278
|
+
export { HttpResponse as $, init_fromUtf8 as A, init_transport as B, dateToUtcString as C, init_toBase64 as D, toUtf8$1 as E, init_TypeRegistry as F, init_parseQueryString as G, toEndpointV1 as H, NormalizedSchema as I, normalizeProvider as J, parseQueryString as K, init_NormalizedSchema as L, init_fromBase64 as M, init_schema as N, toBase64$1 as O, TypeRegistry as P, isValidHostLabel as Q, init_translateTraits as R, init_lazy_json as S, init_toUtf8 as T, init_parseUrl as U, init_toEndpointV1 as V, parseUrl as W, isValidHostname as X, init_isValidHostname as Y, init_isValidHostLabel as Z, _parseRfc7231DateTime as _, sdkStreamMixin as a, getSmithyContext as at, quoteHeader as b, toHex as c, __commonJSMin as ct, init_split_header as d, __require as dt, init_httpResponse as et, splitHeader as f, __toCommonJS as ft, _parseRfc3339DateTimeWithOffset as g, _parseEpochTimestamp as h, init_sdk_stream_mixin as i, init_hasOwn as it, fromBase64 as j, fromUtf8$1 as k, NumericValue as l, __esmMin as lt, splitEvery as m, generateIdempotencyToken as n, init_httpRequest as nt, fromHex as o, init_getSmithyContext as ot, init_split_every as p, __toESM as pt, init_normalizeProvider as q, init_serde as r, hasOwn as rt, init_hex_encoding as s, require_dist_cjs as st, Uint8ArrayBlobAdapter as t, HttpRequest as tt, init_NumericValue as u, __exportAll as ut, init_schema_date_utils as v, init_date_utils as w, LazyJsonString as x, init_quote_header as y, translateTraits as z };
|
|
1279
|
+
|
|
1280
|
+
//# sourceMappingURL=serde-3bjbbZum.mjs.map
|