import { createRequire as __bundleCreateRequire } from "node:module"; const require = __bundleCreateRequire(import.meta.url); import { __commonJS, __esm, __export, __name, __toESM } from "./chunk-T6GW54FI.js"; // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/checksum/chunked-blob-reader/chunked-blob-reader.js async function blobReader(blob, onChunk, chunkSize = 1024 * 1024) { const size = blob.size; let totalBytesRead = 0; while (totalBytesRead < size) { const slice = blob.slice(totalBytesRead, Math.min(size, totalBytesRead + chunkSize)); onChunk(new Uint8Array(await slice.arrayBuffer())); totalBytesRead += slice.size; } } var init_chunked_blob_reader = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/checksum/chunked-blob-reader/chunked-blob-reader.js"() { __name(blobReader, "blobReader"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/checksum/hash-blob-browser/blobHasher.js var blobHasher; var init_blobHasher = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/checksum/hash-blob-browser/blobHasher.js"() { init_chunked_blob_reader(); blobHasher = /* @__PURE__ */ __name(async function blobHasher2(hashCtor, blob) { const hash = new hashCtor(); await blobReader(blob, (chunk) => { hash.update(chunk); }); return hash.digest(); }, "blobHasher"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/is-array-buffer/is-array-buffer.js var isArrayBuffer; var init_is_array_buffer = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/is-array-buffer/is-array-buffer.js"() { isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]", "isArrayBuffer"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-buffer-from/buffer-from.js var fromArrayBuffer, fromString; var init_buffer_from = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-buffer-from/buffer-from.js"() { init_is_array_buffer(); fromArrayBuffer = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => { if (!isArrayBuffer(input)) { throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); } return Buffer.from(input, offset, length); }, "fromArrayBuffer"); fromString = /* @__PURE__ */ __name((input, encoding) => { if (typeof input !== "string") { throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`); } return encoding ? Buffer.from(input, encoding) : Buffer.from(input); }, "fromString"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-base64/fromBase64.js var BASE64_REGEX, fromBase64; var init_fromBase64 = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-base64/fromBase64.js"() { init_buffer_from(); BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/; fromBase64 = /* @__PURE__ */ __name((input) => { if (input.length * 3 % 4 !== 0) { throw new TypeError(`Incorrect padding on base64 string.`); } if (!BASE64_REGEX.exec(input)) { throw new TypeError(`Invalid base64 string.`); } const buffer = fromString(input, "base64"); return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); }, "fromBase64"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/fromUtf8.js var fromUtf8; var init_fromUtf8 = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/fromUtf8.js"() { init_buffer_from(); fromUtf8 = /* @__PURE__ */ __name((input) => { const buf = fromString(input, "utf8"); return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); }, "fromUtf8"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-base64/toBase64.js var toBase64; var init_toBase64 = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-base64/toBase64.js"() { init_buffer_from(); init_fromUtf8(); toBase64 = /* @__PURE__ */ __name((_input) => { let input; if (typeof _input === "string") { input = fromUtf8(_input); } else { input = _input; } 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."); } return fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("base64"); }, "toBase64"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/blob/Uint8ArrayBlobAdapter.js function bindUint8ArrayBlobAdapter(toUtf83, fromUtf83, toBase643, fromBase642) { return class Uint8ArrayBlobAdapter2 extends Uint8Array { static { __name(this, "Uint8ArrayBlobAdapter"); } static fromString(source, encoding = "utf-8") { if (typeof source === "string") { if (encoding === "base64") { return Uint8ArrayBlobAdapter2.mutate(fromBase642(source)); } return Uint8ArrayBlobAdapter2.mutate(fromUtf83(source)); } throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`); } static mutate(source) { Object.setPrototypeOf(source, Uint8ArrayBlobAdapter2.prototype); return source; } transformToString(encoding = "utf-8") { if (encoding === "base64") { return toBase643(this); } return toUtf83(this); } }; } var init_Uint8ArrayBlobAdapter = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/blob/Uint8ArrayBlobAdapter.js"() { __name(bindUint8ArrayBlobAdapter, "bindUint8ArrayBlobAdapter"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUtf8.js var toUtf8; var init_toUtf8 = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUtf8.js"() { init_buffer_from(); toUtf8 = /* @__PURE__ */ __name((input) => { if (typeof input === "string") { return input; } 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."); } return fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); }, "toUtf8"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/uuid/v4.js function bindV4(getRandomValues2) { if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") { return () => crypto.randomUUID(); } return () => { const rnds = new Uint8Array(16); getRandomValues2(rnds); rnds[6] = rnds[6] & 15 | 64; rnds[8] = rnds[8] & 63 | 128; 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]]; }; } var decimalToHex; var init_v4 = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/uuid/v4.js"() { decimalToHex = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0")); __name(bindV4, "bindV4"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/copyDocumentWithTransform.js var copyDocumentWithTransform; var init_copyDocumentWithTransform = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/copyDocumentWithTransform.js"() { copyDocumentWithTransform = /* @__PURE__ */ __name((source, _schemaRef, _transform = (_) => _) => source, "copyDocumentWithTransform"); } }); // ../../node_modules/.pnpm/@smithy+types@4.19.0/node_modules/@smithy/types/dist-cjs/index.js var require_dist_cjs = __commonJS({ "../../node_modules/.pnpm/@smithy+types@4.19.0/node_modules/@smithy/types/dist-cjs/index.js"(exports) { var HttpAuthLocation; (function(HttpAuthLocation2) { HttpAuthLocation2["HEADER"] = "header"; HttpAuthLocation2["QUERY"] = "query"; })(HttpAuthLocation || (HttpAuthLocation = {})); var HttpApiKeyAuthLocation; (function(HttpApiKeyAuthLocation2) { HttpApiKeyAuthLocation2["HEADER"] = "header"; HttpApiKeyAuthLocation2["QUERY"] = "query"; })(HttpApiKeyAuthLocation || (HttpApiKeyAuthLocation = {})); var EndpointURLScheme2; (function(EndpointURLScheme3) { EndpointURLScheme3["HTTP"] = "http"; EndpointURLScheme3["HTTPS"] = "https"; })(EndpointURLScheme2 || (EndpointURLScheme2 = {})); var AlgorithmId2; (function(AlgorithmId3) { AlgorithmId3["MD5"] = "md5"; AlgorithmId3["CRC32"] = "crc32"; AlgorithmId3["CRC32C"] = "crc32c"; AlgorithmId3["SHA1"] = "sha1"; AlgorithmId3["SHA256"] = "sha256"; })(AlgorithmId2 || (AlgorithmId2 = {})); var getChecksumConfiguration2 = /* @__PURE__ */ __name((runtimeConfig) => { const checksumAlgorithms = []; if (runtimeConfig.sha256 !== void 0) { checksumAlgorithms.push({ algorithmId: /* @__PURE__ */ __name(() => AlgorithmId2.SHA256, "algorithmId"), checksumConstructor: /* @__PURE__ */ __name(() => runtimeConfig.sha256, "checksumConstructor") }); } if (runtimeConfig.md5 != void 0) { checksumAlgorithms.push({ algorithmId: /* @__PURE__ */ __name(() => AlgorithmId2.MD5, "algorithmId"), checksumConstructor: /* @__PURE__ */ __name(() => runtimeConfig.md5, "checksumConstructor") }); } return { addChecksumAlgorithm(algo) { checksumAlgorithms.push(algo); }, checksumAlgorithms() { return checksumAlgorithms; } }; }, "getChecksumConfiguration"); var resolveChecksumRuntimeConfig2 = /* @__PURE__ */ __name((clientConfig) => { const runtimeConfig = {}; clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); }); return runtimeConfig; }, "resolveChecksumRuntimeConfig"); var getDefaultClientConfiguration2 = /* @__PURE__ */ __name((runtimeConfig) => { return getChecksumConfiguration2(runtimeConfig); }, "getDefaultClientConfiguration"); var resolveDefaultRuntimeConfig2 = /* @__PURE__ */ __name((config) => { return resolveChecksumRuntimeConfig2(config); }, "resolveDefaultRuntimeConfig"); var FieldPosition; (function(FieldPosition2) { FieldPosition2[FieldPosition2["HEADER"] = 0] = "HEADER"; FieldPosition2[FieldPosition2["TRAILER"] = 1] = "TRAILER"; })(FieldPosition || (FieldPosition = {})); var SMITHY_CONTEXT_KEY3 = "__smithy_context"; var IniSectionType4; (function(IniSectionType5) { IniSectionType5["PROFILE"] = "profile"; IniSectionType5["SSO_SESSION"] = "sso-session"; IniSectionType5["SERVICES"] = "services"; })(IniSectionType4 || (IniSectionType4 = {})); var RequestHandlerProtocol; (function(RequestHandlerProtocol2) { RequestHandlerProtocol2["HTTP_0_9"] = "http/0.9"; RequestHandlerProtocol2["HTTP_1_0"] = "http/1.0"; RequestHandlerProtocol2["TDS_8_0"] = "tds/8.0"; })(RequestHandlerProtocol || (RequestHandlerProtocol = {})); exports.AlgorithmId = AlgorithmId2; exports.EndpointURLScheme = EndpointURLScheme2; exports.FieldPosition = FieldPosition; exports.HttpApiKeyAuthLocation = HttpApiKeyAuthLocation; exports.HttpAuthLocation = HttpAuthLocation; exports.IniSectionType = IniSectionType4; exports.RequestHandlerProtocol = RequestHandlerProtocol; exports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY3; exports.getDefaultClientConfiguration = getDefaultClientConfiguration2; exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig2; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/transport/getSmithyContext.js var import_types, getSmithyContext; var init_getSmithyContext = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/transport/getSmithyContext.js"() { import_types = __toESM(require_dist_cjs()); getSmithyContext = /* @__PURE__ */ __name((context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {}), "getSmithyContext"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/transport/hasOwn.js function hasOwn(o, k) { return Object.prototype.hasOwnProperty.call(o, k); } var init_hasOwn = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/transport/hasOwn.js"() { __name(hasOwn, "hasOwn"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/transport/httpRequest.js function cloneQuery(query) { return Object.keys(query).reduce((carry, paramName) => { const param = query[paramName]; return { ...carry, [paramName]: Array.isArray(param) ? [...param] : param }; }, {}); } var HttpRequest; var init_httpRequest = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/transport/httpRequest.js"() { HttpRequest = class _HttpRequest { static { __name(this, "HttpRequest"); } method; protocol; hostname; port; path; query; headers; username; password; fragment; body; constructor(options) { this.method = options.method || "GET"; this.hostname = options.hostname || "localhost"; this.port = options.port; this.query = options.query || {}; this.headers = options.headers || {}; this.body = options.body; this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:"; this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/"; this.username = options.username; this.password = options.password; this.fragment = options.fragment; } static clone(request) { const cloned = new _HttpRequest({ ...request, headers: { ...request.headers } }); if (cloned.query) { cloned.query = cloneQuery(cloned.query); } return cloned; } static isInstance(request) { if (!request) { return false; } const req = request; return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object"; } clone() { return _HttpRequest.clone(this); } }; __name(cloneQuery, "cloneQuery"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/transport/httpResponse.js var HttpResponse; var init_httpResponse = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/transport/httpResponse.js"() { HttpResponse = class { static { __name(this, "HttpResponse"); } statusCode; reason; headers; body; constructor(options) { this.statusCode = options.statusCode; this.reason = options.reason; this.headers = options.headers || {}; this.body = options.body; } static isInstance(response) { if (!response) return false; const resp = response; return typeof resp.statusCode === "number" && typeof resp.headers === "object"; } }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/transport/isValidHostLabel.js var VALID_HOST_LABEL_REGEX, isValidHostLabel; var init_isValidHostLabel = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/transport/isValidHostLabel.js"() { VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`); isValidHostLabel = /* @__PURE__ */ __name((value, allowSubDomains = false) => { if (!allowSubDomains) { return VALID_HOST_LABEL_REGEX.test(value); } const labels = value.split("."); for (const label of labels) { if (!isValidHostLabel(label)) { return false; } } return true; }, "isValidHostLabel"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/transport/isValidHostname.js function isValidHostname(hostname) { const hostPattern = /^[a-z0-9][a-z0-9.-]*[a-z0-9]$/; return hostPattern.test(hostname); } var init_isValidHostname = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/transport/isValidHostname.js"() { __name(isValidHostname, "isValidHostname"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/transport/normalizeProvider.js var normalizeProvider; var init_normalizeProvider = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/transport/normalizeProvider.js"() { normalizeProvider = /* @__PURE__ */ __name((input) => { if (typeof input === "function") return input; const promisified = Promise.resolve(input); return () => promisified; }, "normalizeProvider"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/transport/parseQueryString.js function parseQueryString(querystring) { const query = {}; querystring = querystring.replace(/^\?/, ""); if (querystring) { for (const pair of querystring.split("&")) { let [key, value = null] = pair.split("="); key = decodeURIComponent(key); if (value) { value = decodeURIComponent(value); } if (!(key in query)) { query[key] = value; } else if (Array.isArray(query[key])) { query[key].push(value); } else { query[key] = [query[key], value]; } } } return query; } var init_parseQueryString = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/transport/parseQueryString.js"() { __name(parseQueryString, "parseQueryString"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/transport/parseUrl.js var parseUrl; var init_parseUrl = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/transport/parseUrl.js"() { init_parseQueryString(); parseUrl = /* @__PURE__ */ __name((url) => { if (typeof url === "string") { return parseUrl(new URL(url)); } const { hostname, pathname, port, protocol, search } = url; let query; if (search) { query = parseQueryString(search); } return { hostname, port: port ? parseInt(port) : void 0, protocol, path: pathname, query }; }, "parseUrl"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js var toEndpointV1; var init_toEndpointV1 = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js"() { init_hasOwn(); init_parseUrl(); toEndpointV1 = /* @__PURE__ */ __name((endpoint) => { if (typeof endpoint === "object") { if ("url" in endpoint) { const v1Endpoint = parseUrl(endpoint.url); if (endpoint.headers) { v1Endpoint.headers = {}; for (const name in endpoint.headers) { if (!hasOwn(endpoint.headers, name)) continue; v1Endpoint.headers[name.toLowerCase()] = endpoint.headers[name].join(", "); } } return v1Endpoint; } return endpoint; } return parseUrl(endpoint); }, "toEndpointV1"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/transport/index.js var init_transport = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/transport/index.js"() { init_getSmithyContext(); init_hasOwn(); init_httpRequest(); init_httpResponse(); init_isValidHostLabel(); init_isValidHostname(); init_normalizeProvider(); init_parseQueryString(); init_parseUrl(); init_toEndpointV1(); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js var parseBoolean, expectBoolean, expectNumber, MAX_FLOAT, expectFloat32, expectLong, expectInt, expectInt32, expectShort, expectByte, expectSizedInt, castInt, expectNonNull, expectObject, expectString, expectUnion, strictParseDouble, strictParseFloat, strictParseFloat32, NUMBER_REGEX, parseNumber, limitedParseDouble, handleFloat, limitedParseFloat, limitedParseFloat32, parseFloatString, strictParseLong, strictParseInt, strictParseInt32, strictParseShort, strictParseByte, stackTraceWarning, logger; var init_parse_utils = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js"() { init_transport(); parseBoolean = /* @__PURE__ */ __name((value) => { switch (value) { case "true": return true; case "false": return false; default: throw new Error(`Unable to parse boolean value "${value}"`); } }, "parseBoolean"); expectBoolean = /* @__PURE__ */ __name((value) => { if (value === null || value === void 0) { return void 0; } if (typeof value === "number") { if (value === 0 || value === 1) { logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`)); } if (value === 0) { return false; } if (value === 1) { return true; } } if (typeof value === "string") { const lower = value.toLowerCase(); if (lower === "false" || lower === "true") { logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`)); } if (lower === "false") { return false; } if (lower === "true") { return true; } } if (typeof value === "boolean") { return value; } throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`); }, "expectBoolean"); expectNumber = /* @__PURE__ */ __name((value) => { if (value === null || value === void 0) { return void 0; } if (typeof value === "string") { const parsed = parseFloat(value); if (!Number.isNaN(parsed)) { if (String(parsed) !== String(value)) { logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`)); } return parsed; } } if (typeof value === "number") { return value; } throw new TypeError(`Expected number, got ${typeof value}: ${value}`); }, "expectNumber"); MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23)); expectFloat32 = /* @__PURE__ */ __name((value) => { const expected = expectNumber(value); if (expected !== void 0 && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) { if (Math.abs(expected) > MAX_FLOAT) { throw new TypeError(`Expected 32-bit float, got ${value}`); } } return expected; }, "expectFloat32"); expectLong = /* @__PURE__ */ __name((value) => { if (value === null || value === void 0) { return void 0; } if (Number.isInteger(value) && !Number.isNaN(value)) { return value; } throw new TypeError(`Expected integer, got ${typeof value}: ${value}`); }, "expectLong"); expectInt = expectLong; expectInt32 = /* @__PURE__ */ __name((value) => expectSizedInt(value, 32), "expectInt32"); expectShort = /* @__PURE__ */ __name((value) => expectSizedInt(value, 16), "expectShort"); expectByte = /* @__PURE__ */ __name((value) => expectSizedInt(value, 8), "expectByte"); expectSizedInt = /* @__PURE__ */ __name((value, size) => { const expected = expectLong(value); if (expected !== void 0 && castInt(expected, size) !== expected) { throw new TypeError(`Expected ${size}-bit integer, got ${value}`); } return expected; }, "expectSizedInt"); castInt = /* @__PURE__ */ __name((value, size) => { switch (size) { case 32: return Int32Array.of(value)[0]; case 16: return Int16Array.of(value)[0]; case 8: return Int8Array.of(value)[0]; } }, "castInt"); expectNonNull = /* @__PURE__ */ __name((value, location) => { if (value === null || value === void 0) { if (location) { throw new TypeError(`Expected a non-null value for ${location}`); } throw new TypeError("Expected a non-null value"); } return value; }, "expectNonNull"); expectObject = /* @__PURE__ */ __name((value) => { if (value === null || value === void 0) { return void 0; } if (typeof value === "object" && !Array.isArray(value)) { return value; } const receivedType = Array.isArray(value) ? "array" : typeof value; throw new TypeError(`Expected object, got ${receivedType}: ${value}`); }, "expectObject"); expectString = /* @__PURE__ */ __name((value) => { if (value === null || value === void 0) { return void 0; } if (typeof value === "string") { return value; } if (["boolean", "number", "bigint"].includes(typeof value)) { logger.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`)); return String(value); } throw new TypeError(`Expected string, got ${typeof value}: ${value}`); }, "expectString"); expectUnion = /* @__PURE__ */ __name((value) => { if (value === null || value === void 0) { return void 0; } const asObject = expectObject(value); const setKeys = []; for (const k in asObject) { if (!hasOwn(asObject, k)) continue; if (asObject[k] != null) { setKeys.push(k); } } if (setKeys.length === 0) { throw new TypeError(`Unions must have exactly one non-null member. None were found.`); } if (setKeys.length > 1) { throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`); } return asObject; }, "expectUnion"); strictParseDouble = /* @__PURE__ */ __name((value) => { if (typeof value == "string") { return expectNumber(parseNumber(value)); } return expectNumber(value); }, "strictParseDouble"); strictParseFloat = strictParseDouble; strictParseFloat32 = /* @__PURE__ */ __name((value) => { if (typeof value == "string") { return expectFloat32(parseNumber(value)); } return expectFloat32(value); }, "strictParseFloat32"); NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g; parseNumber = /* @__PURE__ */ __name((value) => { const matches = value.match(NUMBER_REGEX); if (matches === null || matches[0].length !== value.length) { throw new TypeError(`Expected real number, got implicit NaN`); } return parseFloat(value); }, "parseNumber"); limitedParseDouble = /* @__PURE__ */ __name((value) => { if (typeof value == "string") { return parseFloatString(value); } return expectNumber(value); }, "limitedParseDouble"); handleFloat = limitedParseDouble; limitedParseFloat = limitedParseDouble; limitedParseFloat32 = /* @__PURE__ */ __name((value) => { if (typeof value == "string") { return parseFloatString(value); } return expectFloat32(value); }, "limitedParseFloat32"); parseFloatString = /* @__PURE__ */ __name((value) => { switch (value) { case "NaN": return NaN; case "Infinity": return Infinity; case "-Infinity": return -Infinity; default: throw new Error(`Unable to parse float value: ${value}`); } }, "parseFloatString"); strictParseLong = /* @__PURE__ */ __name((value) => { if (typeof value === "string") { return expectLong(parseNumber(value)); } return expectLong(value); }, "strictParseLong"); strictParseInt = strictParseLong; strictParseInt32 = /* @__PURE__ */ __name((value) => { if (typeof value === "string") { return expectInt32(parseNumber(value)); } return expectInt32(value); }, "strictParseInt32"); strictParseShort = /* @__PURE__ */ __name((value) => { if (typeof value === "string") { return expectShort(parseNumber(value)); } return expectShort(value); }, "strictParseShort"); strictParseByte = /* @__PURE__ */ __name((value) => { if (typeof value === "string") { return expectByte(parseNumber(value)); } return expectByte(value); }, "strictParseByte"); stackTraceWarning = /* @__PURE__ */ __name((message) => { return String(new TypeError(message).stack || message).split("\n").slice(0, 5).filter((s) => !s.includes("stackTraceWarning")).join("\n"); }, "stackTraceWarning"); logger = { warn: console.warn }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js function dateToUtcString(date2) { const year2 = date2.getUTCFullYear(); const month = date2.getUTCMonth(); const dayOfWeek = date2.getUTCDay(); const dayOfMonthInt = date2.getUTCDate(); const hoursInt = date2.getUTCHours(); const minutesInt = date2.getUTCMinutes(); const secondsInt = date2.getUTCSeconds(); const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`; const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`; const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`; const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`; return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year2} ${hoursString}:${minutesString}:${secondsString} GMT`; } var DAYS, MONTHS, RFC3339, parseRfc3339DateTime, RFC3339_WITH_OFFSET, parseRfc3339DateTimeWithOffset, IMF_FIXDATE, RFC_850_DATE, ASC_TIME, parseRfc7231DateTime, parseEpochTimestamp, buildDate, parseTwoDigitYear, FIFTY_YEARS_IN_MILLIS, adjustRfc850Year, parseMonthByShortName, DAYS_IN_MONTH, validateDayOfMonth, isLeapYear, parseDateValue, parseMilliseconds, parseOffsetToMilliseconds, stripLeadingZeroes; var init_date_utils = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js"() { init_parse_utils(); DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; __name(dateToUtcString, "dateToUtcString"); RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/); parseRfc3339DateTime = /* @__PURE__ */ __name((value) => { if (value === null || value === void 0) { return void 0; } if (typeof value !== "string") { throw new TypeError("RFC-3339 date-times must be expressed as strings"); } const match = RFC3339.exec(value); if (!match) { throw new TypeError("Invalid RFC-3339 date-time value"); } const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match; const year2 = strictParseShort(stripLeadingZeroes(yearStr)); const month = parseDateValue(monthStr, "month", 1, 12); const day = parseDateValue(dayStr, "day", 1, 31); return buildDate(year2, month, day, { hours, minutes, seconds, fractionalMilliseconds }); }, "parseRfc3339DateTime"); RFC3339_WITH_OFFSET = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}:\d{2})|[zZ])$/); parseRfc3339DateTimeWithOffset = /* @__PURE__ */ __name((value) => { if (value === null || value === void 0) { return void 0; } if (typeof value !== "string") { throw new TypeError("RFC-3339 date-times must be expressed as strings"); } const match = RFC3339_WITH_OFFSET.exec(value); if (!match) { throw new TypeError("Invalid RFC-3339 date-time value"); } const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match; const year2 = strictParseShort(stripLeadingZeroes(yearStr)); const month = parseDateValue(monthStr, "month", 1, 12); const day = parseDateValue(dayStr, "day", 1, 31); const date2 = buildDate(year2, month, day, { hours, minutes, seconds, fractionalMilliseconds }); if (offsetStr.toUpperCase() != "Z") { date2.setTime(date2.getTime() - parseOffsetToMilliseconds(offsetStr)); } return date2; }, "parseRfc3339DateTimeWithOffset"); IMF_FIXDATE = 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$/); RFC_850_DATE = 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$/); ASC_TIME = 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})$/); parseRfc7231DateTime = /* @__PURE__ */ __name((value) => { if (value === null || value === void 0) { return void 0; } if (typeof value !== "string") { throw new TypeError("RFC-7231 date-times must be expressed as strings"); } let match = IMF_FIXDATE.exec(value); if (match) { const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match; return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds }); } match = RFC_850_DATE.exec(value); if (match) { const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match; return adjustRfc850Year(buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds })); } match = ASC_TIME.exec(value); if (match) { const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match; return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr.trimLeft(), "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds }); } throw new TypeError("Invalid RFC-7231 date-time value"); }, "parseRfc7231DateTime"); parseEpochTimestamp = /* @__PURE__ */ __name((value) => { if (value === null || value === void 0) { return void 0; } let valueAsDouble; if (typeof value === "number") { valueAsDouble = value; } else if (typeof value === "string") { valueAsDouble = strictParseDouble(value); } else if (typeof value === "object" && value.tag === 1) { valueAsDouble = value.value; } else { throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation"); } if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) { throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics"); } return new Date(Math.round(valueAsDouble * 1e3)); }, "parseEpochTimestamp"); buildDate = /* @__PURE__ */ __name((year2, month, day, time2) => { const adjustedMonth = month - 1; validateDayOfMonth(year2, adjustedMonth, day); return new Date(Date.UTC(year2, adjustedMonth, day, parseDateValue(time2.hours, "hour", 0, 23), parseDateValue(time2.minutes, "minute", 0, 59), parseDateValue(time2.seconds, "seconds", 0, 60), parseMilliseconds(time2.fractionalMilliseconds))); }, "buildDate"); parseTwoDigitYear = /* @__PURE__ */ __name((value) => { const thisYear = (/* @__PURE__ */ new Date()).getUTCFullYear(); const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value)); if (valueInThisCentury < thisYear) { return valueInThisCentury + 100; } return valueInThisCentury; }, "parseTwoDigitYear"); FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1e3; adjustRfc850Year = /* @__PURE__ */ __name((input) => { if (input.getTime() - (/* @__PURE__ */ new Date()).getTime() > FIFTY_YEARS_IN_MILLIS) { return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds())); } return input; }, "adjustRfc850Year"); parseMonthByShortName = /* @__PURE__ */ __name((value) => { const monthIdx = MONTHS.indexOf(value); if (monthIdx < 0) { throw new TypeError(`Invalid month: ${value}`); } return monthIdx + 1; }, "parseMonthByShortName"); DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; validateDayOfMonth = /* @__PURE__ */ __name((year2, month, day) => { let maxDays = DAYS_IN_MONTH[month]; if (month === 1 && isLeapYear(year2)) { maxDays = 29; } if (day > maxDays) { throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year2}: ${day}`); } }, "validateDayOfMonth"); isLeapYear = /* @__PURE__ */ __name((year2) => { return year2 % 4 === 0 && (year2 % 100 !== 0 || year2 % 400 === 0); }, "isLeapYear"); parseDateValue = /* @__PURE__ */ __name((value, type, lower, upper) => { const dateVal = strictParseByte(stripLeadingZeroes(value)); if (dateVal < lower || dateVal > upper) { throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`); } return dateVal; }, "parseDateValue"); parseMilliseconds = /* @__PURE__ */ __name((value) => { if (value === null || value === void 0) { return 0; } return strictParseFloat32("0." + value) * 1e3; }, "parseMilliseconds"); parseOffsetToMilliseconds = /* @__PURE__ */ __name((value) => { const directionStr = value[0]; let direction = 1; if (directionStr == "+") { direction = 1; } else if (directionStr == "-") { direction = -1; } else { throw new TypeError(`Offset direction, ${directionStr}, must be "+" or "-"`); } const hour = Number(value.substring(1, 3)); const minute = Number(value.substring(4, 6)); return direction * (hour * 60 + minute) * 60 * 1e3; }, "parseOffsetToMilliseconds"); stripLeadingZeroes = /* @__PURE__ */ __name((value) => { let idx = 0; while (idx < value.length - 1 && value.charAt(idx) === "0") { idx++; } if (idx === 0) { return value; } return value.slice(idx); }, "stripLeadingZeroes"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/lazy-json.js var LazyJsonString; var init_lazy_json = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/lazy-json.js"() { LazyJsonString = /* @__PURE__ */ __name(function LazyJsonString2(val) { const str = Object.assign(new String(val), { deserializeJSON() { return JSON.parse(String(val)); }, toString() { return String(val); }, toJSON() { return String(val); } }); return str; }, "LazyJsonString"); LazyJsonString.from = (object) => { if (object && typeof object === "object" && (object instanceof LazyJsonString || "deserializeJSON" in object)) { return object; } else if (typeof object === "string" || Object.getPrototypeOf(object) === String.prototype) { return LazyJsonString(String(object)); } return LazyJsonString(JSON.stringify(object)); }; LazyJsonString.fromObject = LazyJsonString.from; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/quote-header.js function quoteHeader(part) { if (part.includes(",") || part.includes('"')) { part = `"${part.replace(/"/g, '\\"')}"`; } return part; } var init_quote_header = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/quote-header.js"() { __name(quoteHeader, "quoteHeader"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js function range(v, min, max) { const _v = Number(v); if (_v < min || _v > max) { throw new Error(`Value ${_v} out of range [${min}, ${max}]`); } } var ddd, mmm, time, date, year, RFC3339_WITH_OFFSET2, IMF_FIXDATE2, RFC_850_DATE2, ASC_TIME2, months, _parseEpochTimestamp, _parseRfc3339DateTimeWithOffset, _parseRfc7231DateTime; var init_schema_date_utils = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js"() { ddd = `(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`; mmm = `(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`; time = `(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?`; date = `(\\d?\\d)`; year = `(\\d{4})`; RFC3339_WITH_OFFSET2 = new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/); IMF_FIXDATE2 = new RegExp(`^${ddd}, ${date} ${mmm} ${year} ${time} GMT$`); RFC_850_DATE2 = new RegExp(`^${ddd}, ${date}-${mmm}-(\\d\\d) ${time} GMT$`); ASC_TIME2 = new RegExp(`^${ddd} ${mmm} ( [1-9]|\\d\\d) ${time} ${year}$`); months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; _parseEpochTimestamp = /* @__PURE__ */ __name((value) => { if (value == null) { return void 0; } let num = NaN; if (typeof value === "number") { num = value; } else if (typeof value === "string") { if (!/^-?\d*\.?\d+$/.test(value)) { throw new TypeError(`parseEpochTimestamp - numeric string invalid.`); } num = Number.parseFloat(value); } else if (typeof value === "object" && value.tag === 1) { num = value.value; } if (isNaN(num) || Math.abs(num) === Infinity) { throw new TypeError("Epoch timestamps must be valid finite numbers."); } return new Date(Math.round(num * 1e3)); }, "_parseEpochTimestamp"); _parseRfc3339DateTimeWithOffset = /* @__PURE__ */ __name((value) => { if (value == null) { return void 0; } if (typeof value !== "string") { throw new TypeError("RFC3339 timestamps must be strings"); } const matches = RFC3339_WITH_OFFSET2.exec(value); if (!matches) { throw new TypeError(`Invalid RFC3339 timestamp format ${value}`); } const [, yearStr, monthStr, dayStr, hours, minutes, seconds, , ms, offsetStr] = matches; range(monthStr, 1, 12); range(dayStr, 1, 31); range(hours, 0, 23); range(minutes, 0, 59); range(seconds, 0, 60); const date2 = 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)); date2.setUTCFullYear(Number(yearStr)); if (offsetStr.toUpperCase() != "Z") { const [, sign2, offsetH, offsetM] = /([+-])(\d\d):(\d\d)/.exec(offsetStr) || [void 0, "+", 0, 0]; const scalar = sign2 === "-" ? 1 : -1; date2.setTime(date2.getTime() + scalar * (Number(offsetH) * 60 * 60 * 1e3 + Number(offsetM) * 60 * 1e3)); } return date2; }, "_parseRfc3339DateTimeWithOffset"); _parseRfc7231DateTime = /* @__PURE__ */ __name((value) => { if (value == null) { return void 0; } if (typeof value !== "string") { throw new TypeError("RFC7231 timestamps must be strings."); } let day; let month; let year2; let hour; let minute; let second; let fraction; let matches; if (matches = IMF_FIXDATE2.exec(value)) { [, day, month, year2, hour, minute, second, fraction] = matches; } else if (matches = RFC_850_DATE2.exec(value)) { [, day, month, year2, hour, minute, second, fraction] = matches; year2 = (Number(year2) + 1900).toString(); } else if (matches = ASC_TIME2.exec(value)) { [, month, day, hour, minute, second, fraction, year2] = matches; } if (year2 && second) { const timestamp = Date.UTC(Number(year2), months.indexOf(month), Number(day), Number(hour), Number(minute), Number(second), fraction ? Math.round(parseFloat(`0.${fraction}`) * 1e3) : 0); range(day, 1, 31); range(hour, 0, 23); range(minute, 0, 59); range(second, 0, 60); const date2 = new Date(timestamp); date2.setUTCFullYear(Number(year2)); return date2; } throw new TypeError(`Invalid RFC7231 date-time value ${value}.`); }, "_parseRfc7231DateTime"); __name(range, "range"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/split-every.js function splitEvery(value, delimiter, numDelimiters) { if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) { throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery."); } const segments = value.split(delimiter); if (numDelimiters === 1) { return segments; } const compoundSegments = []; let currentSegment = ""; for (let i = 0; i < segments.length; i++) { if (currentSegment === "") { currentSegment = segments[i]; } else { currentSegment += delimiter + segments[i]; } if ((i + 1) % numDelimiters === 0) { compoundSegments.push(currentSegment); currentSegment = ""; } } if (currentSegment !== "") { compoundSegments.push(currentSegment); } return compoundSegments; } var init_split_every = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/split-every.js"() { __name(splitEvery, "splitEvery"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/split-header.js var splitHeader; var init_split_header = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/split-header.js"() { splitHeader = /* @__PURE__ */ __name((value) => { const z = value.length; const values = []; let withinQuotes = false; let prevChar = void 0; let anchor = 0; for (let i = 0; i < z; ++i) { const char = value[i]; switch (char) { case `"`: if (prevChar !== "\\") { withinQuotes = !withinQuotes; } break; case ",": if (!withinQuotes) { values.push(value.slice(anchor, i)); anchor = i + 1; } break; default: } prevChar = char; } values.push(value.slice(anchor)); return values.map((v) => { v = v.trim(); const z2 = v.length; if (z2 < 2) { return v; } if (v[0] === `"` && v[z2 - 1] === `"`) { v = v.slice(1, z2 - 1); } return v.replace(/\\"/g, '"'); }); }, "splitHeader"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js function nv(input) { return new NumericValue(String(input), "bigDecimal"); } var format, NumericValue; var init_NumericValue = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js"() { format = /^-?((0|[1-9]\d*)(\.\d+)?|\.\d+)([eE][+-]?\d+)?$/; NumericValue = class _NumericValue { static { __name(this, "NumericValue"); } string; type; constructor(string, type) { this.string = string; this.type = type; if (!format.test(string)) { throw new Error(`@smithy/core/serde - NumericValue string must conform to the Smithy bigDecimal format. Received: "${string}"`); } } toString() { return this.string; } static [Symbol.hasInstance](object) { if (!object || typeof object !== "object") { return false; } const _nv = object; return _NumericValue.prototype.isPrototypeOf(object) || _nv.type === "bigDecimal" && format.test(_nv.string); } }; __name(nv, "nv"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-hex-encoding/hex-encoding.js function fromHex(encoded) { if (encoded.length % 2 !== 0) { throw new Error("Hex encoded strings must have an even number length"); } const out = new Uint8Array(encoded.length / 2); for (let i = 0; i < encoded.length; i += 2) { const encodedByte = encoded.slice(i, i + 2).toLowerCase(); if (encodedByte in HEX_TO_SHORT) { out[i / 2] = HEX_TO_SHORT[encodedByte]; } else { throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`); } } return out; } function toHex(bytes) { let out = ""; for (let i = 0; i < bytes.byteLength; i++) { out += SHORT_TO_HEX[bytes[i]]; } return out; } var SHORT_TO_HEX, HEX_TO_SHORT; var init_hex_encoding = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-hex-encoding/hex-encoding.js"() { SHORT_TO_HEX = {}; HEX_TO_SHORT = {}; for (let i = 0; i < 256; i++) { let encodedByte = i.toString(16).toLowerCase(); if (encodedByte.length === 1) { encodedByte = `0${encodedByte}`; } SHORT_TO_HEX[i] = encodedByte; HEX_TO_SHORT[encodedByte] = i; } __name(fromHex, "fromHex"); __name(toHex, "toHex"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-body-length/calculateBodyLength.js import { ReadStream, fstatSync, lstatSync } from "node:fs"; var calculateBodyLength; var init_calculateBodyLength = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-body-length/calculateBodyLength.js"() { calculateBodyLength = /* @__PURE__ */ __name((body) => { if (!body) { return 0; } if (typeof body === "string") { return Buffer.byteLength(body); } else if (typeof body.byteLength === "number") { return body.byteLength; } else if (typeof body.size === "number") { return body.size; } else if (typeof body.start === "number" && typeof body.end === "number") { return body.end + 1 - body.start; } else if (body instanceof ReadStream) { if (body.path != null) { return lstatSync(body.path).size; } else if (typeof body.fd === "number") { return fstatSync(body.fd).size; } } throw new Error(`Body Length computation failed for ${body}`); }, "calculateBodyLength"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUint8Array.js var toUint8Array; var init_toUint8Array = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUint8Array.js"() { init_fromUtf8(); toUint8Array = /* @__PURE__ */ __name((data) => { if (data instanceof Uint8Array) { return data; } if (typeof data === "string") { return fromUtf8(data); } if (ArrayBuffer.isView(data)) { return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); } return new Uint8Array(data); }, "toUint8Array"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/concatBytes.js function concatBytes(arrays, length) { if (length === void 0) { length = 0; for (const bytes of arrays) { length += bytes.byteLength; } } const result = new Uint8Array(length); let offset = 0; for (const buf of arrays) { result.set(buf, offset); offset += buf.byteLength; } return result; } var init_concatBytes = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/concatBytes.js"() { __name(concatBytes, "concatBytes"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/deserializerMiddleware.js var deserializerMiddleware, findHeader; var init_deserializerMiddleware = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/deserializerMiddleware.js"() { init_transport(); deserializerMiddleware = /* @__PURE__ */ __name((options, deserializer) => (next, context) => async (args) => { const { response } = await next(args); try { const parsed = await deserializer(response, options); return { response, output: parsed }; } catch (error2) { Object.defineProperty(error2, "$response", { value: response, enumerable: false, writable: false, configurable: false }); if (!("$metadata" in error2)) { const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; try { error2.message += "\n " + hint; } catch (ignored) { if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") { console.warn(hint); } else { context.logger?.warn?.(hint); } } if (typeof error2.$responseBodyText !== "undefined") { if (error2.$response) { error2.$response.body = error2.$responseBodyText; } } try { if (HttpResponse.isInstance(response)) { const { headers = {} } = response; const headerEntries = Object.entries(headers); error2.$metadata = { httpStatusCode: response.statusCode, requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries), extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries), cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries) }; } } catch (ignored) { } } throw error2; } }, "deserializerMiddleware"); findHeader = /* @__PURE__ */ __name((pattern, headers) => { return (headers.find(([k]) => { return k.match(pattern); }) || [void 0, void 0])[1]; }, "findHeader"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/property-provider/ProviderError.js var ProviderError; var init_ProviderError = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/property-provider/ProviderError.js"() { ProviderError = class _ProviderError extends Error { static { __name(this, "ProviderError"); } name = "ProviderError"; tryNextLink; constructor(message, options = true) { let logger2; let tryNextLink = true; if (typeof options === "boolean") { logger2 = void 0; tryNextLink = options; } else if (options != null && typeof options === "object") { logger2 = options.logger; tryNextLink = options.tryNextLink ?? true; } super(message); this.tryNextLink = tryNextLink; Object.setPrototypeOf(this, _ProviderError.prototype); logger2?.debug?.(`@smithy/property-provider ${tryNextLink ? "->" : "(!)"} ${message}`); } static from(error2, options = true) { return Object.assign(new this(error2.message, options), error2); } }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/property-provider/CredentialsProviderError.js var CredentialsProviderError; var init_CredentialsProviderError = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/property-provider/CredentialsProviderError.js"() { init_ProviderError(); CredentialsProviderError = class _CredentialsProviderError extends ProviderError { static { __name(this, "CredentialsProviderError"); } name = "CredentialsProviderError"; constructor(message, options = true) { super(message, options); Object.setPrototypeOf(this, _CredentialsProviderError.prototype); } }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/property-provider/TokenProviderError.js var TokenProviderError; var init_TokenProviderError = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/property-provider/TokenProviderError.js"() { init_ProviderError(); TokenProviderError = class _TokenProviderError extends ProviderError { static { __name(this, "TokenProviderError"); } name = "TokenProviderError"; constructor(message, options = true) { super(message, options); Object.setPrototypeOf(this, _TokenProviderError.prototype); } }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/property-provider/chain.js var chain; var init_chain = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/property-provider/chain.js"() { init_ProviderError(); chain = /* @__PURE__ */ __name((...providers) => async () => { if (providers.length === 0) { throw new ProviderError("No providers in chain"); } let lastProviderError; for (const provider of providers) { try { const credentials = await provider(); return credentials; } catch (err) { lastProviderError = err; if (err?.tryNextLink) { continue; } throw err; } } throw lastProviderError; }, "chain"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/property-provider/fromValue.js var fromValue; var init_fromValue = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/property-provider/fromValue.js"() { fromValue = /* @__PURE__ */ __name((staticValue) => () => Promise.resolve(staticValue), "fromValue"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/property-provider/memoize.js var memoize; var init_memoize = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/property-provider/memoize.js"() { memoize = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => { let resolved; let pending; let hasResult; let isConstant = false; const coalesceProvider = /* @__PURE__ */ __name(async () => { if (!pending) { pending = provider(); } try { resolved = await pending; hasResult = true; isConstant = false; } finally { pending = void 0; } return resolved; }, "coalesceProvider"); if (isExpired === void 0) { return async (options) => { if (!hasResult || options?.forceRefresh) { resolved = await coalesceProvider(); } return resolved; }; } return async (options) => { if (!hasResult || options?.forceRefresh) { resolved = await coalesceProvider(); } if (isConstant) { return resolved; } if (requiresRefresh && !requiresRefresh(resolved)) { isConstant = true; return resolved; } if (isExpired(resolved)) { await coalesceProvider(); return resolved; } return resolved; }; }, "memoize"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/booleanSelector.js var booleanSelector; var init_booleanSelector = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/booleanSelector.js"() { booleanSelector = /* @__PURE__ */ __name((obj, key, type) => { if (!(key in obj)) return void 0; if (obj[key] === "true") return true; if (obj[key] === "false") return false; throw new Error(`Cannot load ${type} "${key}". Expected "true" or "false", got ${obj[key]}.`); }, "booleanSelector"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/numberSelector.js var numberSelector; var init_numberSelector = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/numberSelector.js"() { numberSelector = /* @__PURE__ */ __name((obj, key, type) => { if (!(key in obj)) return void 0; const numberValue = parseInt(obj[key], 10); if (Number.isNaN(numberValue)) { throw new TypeError(`Cannot load ${type} '${key}'. Expected number, got '${obj[key]}'.`); } return numberValue; }, "numberSelector"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/types.js var SelectorType; var init_types = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/types.js"() { (function(SelectorType2) { SelectorType2["ENV"] = "env"; SelectorType2["CONFIG"] = "shared config entry"; })(SelectorType || (SelectorType = {})); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getHomeDir.js import { homedir } from "node:os"; import { sep } from "node:path"; var homeDirCache, getHomeDirCacheKey, getHomeDir; var init_getHomeDir = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getHomeDir.js"() { homeDirCache = {}; getHomeDirCacheKey = /* @__PURE__ */ __name(() => { if (process && process.geteuid) { return `${process.geteuid()}`; } return "DEFAULT"; }, "getHomeDirCacheKey"); getHomeDir = /* @__PURE__ */ __name(() => { const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${sep}` } = process.env; if (HOME) return HOME; if (USERPROFILE) return USERPROFILE; if (HOMEPATH) return `${HOMEDRIVE}${HOMEPATH}`; const homeDirCacheKey = getHomeDirCacheKey(); if (!homeDirCache[homeDirCacheKey]) homeDirCache[homeDirCacheKey] = homedir(); return homeDirCache[homeDirCacheKey]; }, "getHomeDir"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getProfileName.js var ENV_PROFILE, DEFAULT_PROFILE, getProfileName; var init_getProfileName = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getProfileName.js"() { ENV_PROFILE = "AWS_PROFILE"; DEFAULT_PROFILE = "default"; getProfileName = /* @__PURE__ */ __name((init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE, "getProfileName"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSSOTokenFilepath.js import { createHash } from "node:crypto"; import { join } from "node:path"; var getSSOTokenFilepath; var init_getSSOTokenFilepath = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSSOTokenFilepath.js"() { init_getHomeDir(); getSSOTokenFilepath = /* @__PURE__ */ __name((id) => { const hasher = createHash("sha1"); const cacheName = hasher.update(id).digest("hex"); return join(getHomeDir(), ".aws", "sso", "cache", `${cacheName}.json`); }, "getSSOTokenFilepath"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSSOTokenFromFile.js import { readFile } from "node:fs/promises"; var tokenIntercept, getSSOTokenFromFile; var init_getSSOTokenFromFile = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSSOTokenFromFile.js"() { init_getSSOTokenFilepath(); tokenIntercept = {}; getSSOTokenFromFile = /* @__PURE__ */ __name(async (id) => { if (tokenIntercept[id]) { return tokenIntercept[id]; } const ssoTokenFilepath = getSSOTokenFilepath(id); const ssoTokenText = await readFile(ssoTokenFilepath, "utf8"); return JSON.parse(ssoTokenText); }, "getSSOTokenFromFile"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/constants.js var CONFIG_PREFIX_SEPARATOR; var init_constants = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/constants.js"() { CONFIG_PREFIX_SEPARATOR = "."; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getConfigData.js var import_types2, getConfigData; var init_getConfigData = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getConfigData.js"() { import_types2 = __toESM(require_dist_cjs()); init_constants(); getConfigData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => { const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); if (indexOfSeparator === -1) { return false; } return Object.values(import_types2.IniSectionType).includes(key.substring(0, indexOfSeparator)); }).reduce((acc, [key, value]) => { const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); const updatedKey = key.substring(0, indexOfSeparator) === import_types2.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; acc[updatedKey] = value; return acc; }, { ...data.default && { default: data.default } }), "getConfigData"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getConfigFilepath.js import { join as join2 } from "node:path"; var ENV_CONFIG_PATH, getConfigFilepath; var init_getConfigFilepath = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getConfigFilepath.js"() { init_getHomeDir(); ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; getConfigFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CONFIG_PATH] || join2(getHomeDir(), ".aws", "config"), "getConfigFilepath"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getCredentialsFilepath.js import { join as join3 } from "node:path"; var ENV_CREDENTIALS_PATH, getCredentialsFilepath; var init_getCredentialsFilepath = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getCredentialsFilepath.js"() { init_getHomeDir(); ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; getCredentialsFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CREDENTIALS_PATH] || join3(getHomeDir(), ".aws", "credentials"), "getCredentialsFilepath"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/parseIni.js var import_types3, prefixKeyRegex, profileNameBlockList, parseIni; var init_parseIni = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/parseIni.js"() { import_types3 = __toESM(require_dist_cjs()); init_constants(); prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@+.%:/]+)\2$/; profileNameBlockList = ["__proto__", "profile __proto__"]; parseIni = /* @__PURE__ */ __name((iniData) => { const map3 = {}; let currentSection; let currentSubSection; for (const iniLine of iniData.split(/\r?\n/)) { const trimmedLine = iniLine.split(/(^|\s)[;#]/)[0].trim(); const isSection = trimmedLine[0] === "[" && trimmedLine[trimmedLine.length - 1] === "]"; if (isSection) { currentSection = void 0; currentSubSection = void 0; const sectionName = trimmedLine.substring(1, trimmedLine.length - 1); const matches = prefixKeyRegex.exec(sectionName); if (matches) { const [, prefix, , name] = matches; if (Object.values(import_types3.IniSectionType).includes(prefix)) { currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR); } } else { currentSection = sectionName; } if (profileNameBlockList.includes(sectionName)) { throw new Error(`Found invalid profile name "${sectionName}"`); } } else if (currentSection) { const indexOfEqualsSign = trimmedLine.indexOf("="); if (![0, -1].includes(indexOfEqualsSign)) { const [name, value] = [ trimmedLine.substring(0, indexOfEqualsSign).trim(), trimmedLine.substring(indexOfEqualsSign + 1).trim() ]; if (value === "") { currentSubSection = name; } else { if (currentSubSection && iniLine.trimStart() === iniLine) { currentSubSection = void 0; } map3[currentSection] = map3[currentSection] || {}; const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name; map3[currentSection][key] = value; } } } } return map3; }, "parseIni"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/readFile.js import { readFile as fsReadFile } from "node:fs/promises"; var filePromises, fileIntercept, readFile2; var init_readFile = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/readFile.js"() { filePromises = {}; fileIntercept = {}; readFile2 = /* @__PURE__ */ __name((path, options) => { if (fileIntercept[path] !== void 0) { return fileIntercept[path]; } if (!filePromises[path] || options?.ignoreCache) { filePromises[path] = fsReadFile(path, "utf8"); } return filePromises[path]; }, "readFile"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/loadSharedConfigFiles.js import { join as join4 } from "node:path"; var swallowError, loadSharedConfigFiles; var init_loadSharedConfigFiles = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/loadSharedConfigFiles.js"() { init_getConfigData(); init_getConfigFilepath(); init_getCredentialsFilepath(); init_getHomeDir(); init_parseIni(); init_readFile(); init_constants(); swallowError = /* @__PURE__ */ __name(() => ({}), "swallowError"); loadSharedConfigFiles = /* @__PURE__ */ __name(async (init = {}) => { const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; const homeDir = getHomeDir(); const relativeHomeDirPrefix = "~/"; let resolvedFilepath = filepath; if (filepath.startsWith(relativeHomeDirPrefix)) { resolvedFilepath = join4(homeDir, filepath.slice(2)); } let resolvedConfigFilepath = configFilepath; if (configFilepath.startsWith(relativeHomeDirPrefix)) { resolvedConfigFilepath = join4(homeDir, configFilepath.slice(2)); } const parsedFiles = await Promise.all([ readFile2(resolvedConfigFilepath, { ignoreCache: init.ignoreCache }).then(parseIni).then(getConfigData).catch(swallowError), readFile2(resolvedFilepath, { ignoreCache: init.ignoreCache }).then(parseIni).catch(swallowError) ]); return { configFile: parsedFiles[0], credentialsFile: parsedFiles[1] }; }, "loadSharedConfigFiles"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSsoSessionData.js var import_types4, getSsoSessionData; var init_getSsoSessionData = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSsoSessionData.js"() { import_types4 = __toESM(require_dist_cjs()); init_loadSharedConfigFiles(); getSsoSessionData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => key.startsWith(import_types4.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}), "getSsoSessionData"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/loadSsoSessionData.js var swallowError2, loadSsoSessionData; var init_loadSsoSessionData = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/loadSsoSessionData.js"() { init_getConfigFilepath(); init_getSsoSessionData(); init_parseIni(); init_readFile(); swallowError2 = /* @__PURE__ */ __name(() => ({}), "swallowError"); loadSsoSessionData = /* @__PURE__ */ __name(async (init = {}) => readFile2(init.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError2), "loadSsoSessionData"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/mergeConfigFiles.js var mergeConfigFiles; var init_mergeConfigFiles = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/mergeConfigFiles.js"() { mergeConfigFiles = /* @__PURE__ */ __name((...files) => { const merged = {}; for (const file of files) { for (const [key, values] of Object.entries(file)) { if (merged[key] !== void 0) { Object.assign(merged[key], values); } else { merged[key] = values; } } } return merged; }, "mergeConfigFiles"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/parseKnownFiles.js var parseKnownFiles; var init_parseKnownFiles = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/parseKnownFiles.js"() { init_loadSharedConfigFiles(); init_mergeConfigFiles(); parseKnownFiles = /* @__PURE__ */ __name(async (init) => { const parsedFiles = await loadSharedConfigFiles(init); return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile); }, "parseKnownFiles"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/externalDataInterceptor.js var externalDataInterceptor; var init_externalDataInterceptor = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/externalDataInterceptor.js"() { init_getSSOTokenFromFile(); init_readFile(); externalDataInterceptor = { getFileRecord() { return fileIntercept; }, interceptFile(path, contents) { fileIntercept[path] = Promise.resolve(contents); }, getTokenRecord() { return tokenIntercept; }, interceptToken(id, contents) { tokenIntercept[id] = contents; } }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/getSelectorName.js function getSelectorName(functionString) { try { const constants = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? [])); constants.delete("CONFIG"); constants.delete("CONFIG_PREFIX_SEPARATOR"); constants.delete("ENV"); return [...constants].join(", "); } catch (ignored) { return functionString; } } var init_getSelectorName = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/getSelectorName.js"() { __name(getSelectorName, "getSelectorName"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/fromEnv.js var fromEnv; var init_fromEnv = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/fromEnv.js"() { init_CredentialsProviderError(); init_getSelectorName(); fromEnv = /* @__PURE__ */ __name((envVarSelector, options) => async () => { try { const config = envVarSelector(process.env, options); if (config === void 0) { throw new Error(); } return config; } catch (e) { throw new CredentialsProviderError(e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, { logger: options?.logger }); } }, "fromEnv"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/fromSharedConfigFiles.js var fromSharedConfigFiles; var init_fromSharedConfigFiles = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/fromSharedConfigFiles.js"() { init_CredentialsProviderError(); init_getProfileName(); init_loadSharedConfigFiles(); init_getSelectorName(); fromSharedConfigFiles = /* @__PURE__ */ __name((configSelector, { preferredFile = "config", ...init } = {}) => async () => { const profile = getProfileName(init); const { configFile, credentialsFile } = await loadSharedConfigFiles(init); const profileFromCredentials = credentialsFile[profile] || {}; const profileFromConfig = configFile[profile] || {}; const mergedProfile = preferredFile === "config" ? { ...profileFromCredentials, ...profileFromConfig } : { ...profileFromConfig, ...profileFromCredentials }; try { const cfgFile = preferredFile === "config" ? configFile : credentialsFile; const configValue = configSelector(mergedProfile, cfgFile); if (configValue === void 0) { throw new Error(); } return configValue; } catch (e) { throw new CredentialsProviderError(e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, { logger: init.logger }); } }, "fromSharedConfigFiles"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/fromStatic.js var isFunction, fromStatic; var init_fromStatic = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/fromStatic.js"() { init_fromValue(); isFunction = /* @__PURE__ */ __name((func) => typeof func === "function", "isFunction"); fromStatic = /* @__PURE__ */ __name((defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : fromValue(defaultValue), "fromStatic"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/configLoader.js var loadConfig; var init_configLoader = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/configLoader.js"() { init_chain(); init_memoize(); init_fromEnv(); init_fromSharedConfigFiles(); init_fromStatic(); loadConfig = /* @__PURE__ */ __name(({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => { const { signingName, logger: logger2 } = configuration; const envOptions = { signingName, logger: logger2 }; return memoize(chain(fromEnv(environmentVariableSelector, envOptions), fromSharedConfigFiles(configFileSelector, configuration), fromStatic(defaultValue))); }, "loadConfig"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js var ENV_USE_DUALSTACK_ENDPOINT, CONFIG_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_DUALSTACK_ENDPOINT, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, nodeDualstackConfigSelectors; var init_NodeUseDualstackEndpointConfigOptions = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js"() { init_booleanSelector(); init_types(); ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT"; CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint"; DEFAULT_USE_DUALSTACK_ENDPOINT = false; NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = { environmentVariableSelector: /* @__PURE__ */ __name((env) => booleanSelector(env, ENV_USE_DUALSTACK_ENDPOINT, SelectorType.ENV), "environmentVariableSelector"), configFileSelector: /* @__PURE__ */ __name((profile) => booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, SelectorType.CONFIG), "configFileSelector"), default: false }; nodeDualstackConfigSelectors = { environmentVariableSelector: /* @__PURE__ */ __name((env) => booleanSelector(env, ENV_USE_DUALSTACK_ENDPOINT, SelectorType.ENV), "environmentVariableSelector"), configFileSelector: /* @__PURE__ */ __name((profile) => booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, SelectorType.CONFIG), "configFileSelector"), default: void 0 }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/NodeUseFipsEndpointConfigOptions.js var ENV_USE_FIPS_ENDPOINT, CONFIG_USE_FIPS_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, nodeFipsConfigSelectors; var init_NodeUseFipsEndpointConfigOptions = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/NodeUseFipsEndpointConfigOptions.js"() { init_booleanSelector(); init_types(); ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT"; CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint"; DEFAULT_USE_FIPS_ENDPOINT = false; NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = { environmentVariableSelector: /* @__PURE__ */ __name((env) => booleanSelector(env, ENV_USE_FIPS_ENDPOINT, SelectorType.ENV), "environmentVariableSelector"), configFileSelector: /* @__PURE__ */ __name((profile) => booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, SelectorType.CONFIG), "configFileSelector"), default: false }; nodeFipsConfigSelectors = { environmentVariableSelector: /* @__PURE__ */ __name((env) => booleanSelector(env, ENV_USE_FIPS_ENDPOINT, SelectorType.ENV), "environmentVariableSelector"), configFileSelector: /* @__PURE__ */ __name((profile) => booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, SelectorType.CONFIG), "configFileSelector"), default: void 0 }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/middleware-stack/MiddlewareStack.js var getAllAliases, getMiddlewareNameWithAliases, constructStack, stepWeights, priorityWeights; var init_MiddlewareStack = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/middleware-stack/MiddlewareStack.js"() { getAllAliases = /* @__PURE__ */ __name((name, aliases) => { const _aliases = []; if (name) { _aliases.push(name); } if (aliases) { for (const alias of aliases) { _aliases.push(alias); } } return _aliases; }, "getAllAliases"); getMiddlewareNameWithAliases = /* @__PURE__ */ __name((name, aliases) => { return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`; }, "getMiddlewareNameWithAliases"); constructStack = /* @__PURE__ */ __name(() => { let absoluteEntries = []; let relativeEntries = []; let identifyOnResolve = false; const entriesNameSet = /* @__PURE__ */ new Set(); const sort = /* @__PURE__ */ __name((entries) => entries.sort((a, b) => stepWeights[b.step] - stepWeights[a.step] || priorityWeights[b.priority || "normal"] - priorityWeights[a.priority || "normal"]), "sort"); const removeByName = /* @__PURE__ */ __name((toRemove) => { let isRemoved = false; const filterCb = /* @__PURE__ */ __name((entry) => { const aliases = getAllAliases(entry.name, entry.aliases); if (aliases.includes(toRemove)) { isRemoved = true; for (const alias of aliases) { entriesNameSet.delete(alias); } return false; } return true; }, "filterCb"); absoluteEntries = absoluteEntries.filter(filterCb); relativeEntries = relativeEntries.filter(filterCb); return isRemoved; }, "removeByName"); const removeByReference = /* @__PURE__ */ __name((toRemove) => { let isRemoved = false; const filterCb = /* @__PURE__ */ __name((entry) => { if (entry.middleware === toRemove) { isRemoved = true; for (const alias of getAllAliases(entry.name, entry.aliases)) { entriesNameSet.delete(alias); } return false; } return true; }, "filterCb"); absoluteEntries = absoluteEntries.filter(filterCb); relativeEntries = relativeEntries.filter(filterCb); return isRemoved; }, "removeByReference"); const cloneTo = /* @__PURE__ */ __name((toStack) => { absoluteEntries.forEach((entry) => { toStack.add(entry.middleware, { ...entry }); }); relativeEntries.forEach((entry) => { toStack.addRelativeTo(entry.middleware, { ...entry }); }); toStack.identifyOnResolve?.(stack.identifyOnResolve()); return toStack; }, "cloneTo"); const expandRelativeMiddlewareList = /* @__PURE__ */ __name((from) => { const expandedMiddlewareList = []; from.before.forEach((entry) => { if (entry.before.length === 0 && entry.after.length === 0) { expandedMiddlewareList.push(entry); } else { expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); } }); expandedMiddlewareList.push(from); from.after.reverse().forEach((entry) => { if (entry.before.length === 0 && entry.after.length === 0) { expandedMiddlewareList.push(entry); } else { expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); } }); return expandedMiddlewareList; }, "expandRelativeMiddlewareList"); const getMiddlewareList = /* @__PURE__ */ __name((debug = false) => { const normalizedAbsoluteEntries = []; const normalizedRelativeEntries = []; const normalizedEntriesNameMap = {}; absoluteEntries.forEach((entry) => { const normalizedEntry = { ...entry, before: [], after: [] }; for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { normalizedEntriesNameMap[alias] = normalizedEntry; } normalizedAbsoluteEntries.push(normalizedEntry); }); relativeEntries.forEach((entry) => { const normalizedEntry = { ...entry, before: [], after: [] }; for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { normalizedEntriesNameMap[alias] = normalizedEntry; } normalizedRelativeEntries.push(normalizedEntry); }); normalizedRelativeEntries.forEach((entry) => { if (entry.toMiddleware) { const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware]; if (toMiddleware === void 0) { if (debug) { return; } throw new Error(`${entry.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(entry.name, entry.aliases)} middleware ${entry.relation} ${entry.toMiddleware}`); } if (entry.relation === "after") { toMiddleware.after.push(entry); } if (entry.relation === "before") { toMiddleware.before.push(entry); } } }); const mainChain = sort(normalizedAbsoluteEntries).map(expandRelativeMiddlewareList).reduce((wholeList, expandedMiddlewareList) => { wholeList.push(...expandedMiddlewareList); return wholeList; }, []); return mainChain; }, "getMiddlewareList"); const stack = { add: /* @__PURE__ */ __name((middleware, options = {}) => { const { name, override, aliases: _aliases } = options; const entry = { step: "initialize", priority: "normal", middleware, ...options }; const aliases = getAllAliases(name, _aliases); if (aliases.length > 0) { if (aliases.some((alias) => entriesNameSet.has(alias))) { if (!override) throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); for (const alias of aliases) { const toOverrideIndex = absoluteEntries.findIndex((entry2) => entry2.name === alias || entry2.aliases?.some((a) => a === alias)); if (toOverrideIndex === -1) { continue; } const toOverride = absoluteEntries[toOverrideIndex]; if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) { throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware with ${toOverride.priority} priority in ${toOverride.step} step cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware with ${entry.priority} priority in ${entry.step} step.`); } absoluteEntries.splice(toOverrideIndex, 1); } } for (const alias of aliases) { entriesNameSet.add(alias); } } absoluteEntries.push(entry); }, "add"), addRelativeTo: /* @__PURE__ */ __name((middleware, options) => { const { name, override, aliases: _aliases } = options; const entry = { middleware, ...options }; const aliases = getAllAliases(name, _aliases); if (aliases.length > 0) { if (aliases.some((alias) => entriesNameSet.has(alias))) { if (!override) throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); for (const alias of aliases) { const toOverrideIndex = relativeEntries.findIndex((entry2) => entry2.name === alias || entry2.aliases?.some((a) => a === alias)); if (toOverrideIndex === -1) { continue; } const toOverride = relativeEntries[toOverrideIndex]; if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) { throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware ${toOverride.relation} "${toOverride.toMiddleware}" middleware cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware ${entry.relation} "${entry.toMiddleware}" middleware.`); } relativeEntries.splice(toOverrideIndex, 1); } } for (const alias of aliases) { entriesNameSet.add(alias); } } relativeEntries.push(entry); }, "addRelativeTo"), clone: /* @__PURE__ */ __name(() => cloneTo(constructStack()), "clone"), use: /* @__PURE__ */ __name((plugin) => { plugin.applyToStack(stack); }, "use"), remove: /* @__PURE__ */ __name((toRemove) => { if (typeof toRemove === "string") return removeByName(toRemove); else return removeByReference(toRemove); }, "remove"), removeByTag: /* @__PURE__ */ __name((toRemove) => { let isRemoved = false; const filterCb = /* @__PURE__ */ __name((entry) => { const { tags, name, aliases: _aliases } = entry; if (tags && tags.includes(toRemove)) { const aliases = getAllAliases(name, _aliases); for (const alias of aliases) { entriesNameSet.delete(alias); } isRemoved = true; return false; } return true; }, "filterCb"); absoluteEntries = absoluteEntries.filter(filterCb); relativeEntries = relativeEntries.filter(filterCb); return isRemoved; }, "removeByTag"), concat: /* @__PURE__ */ __name((from) => { const cloned = cloneTo(constructStack()); cloned.use(from); cloned.identifyOnResolve(identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false)); return cloned; }, "concat"), applyToStack: cloneTo, identify: /* @__PURE__ */ __name(() => { return getMiddlewareList(true).map((mw) => { const step = mw.step ?? mw.relation + " " + mw.toMiddleware; return getMiddlewareNameWithAliases(mw.name, mw.aliases) + " - " + step; }); }, "identify"), identifyOnResolve(toggle) { if (typeof toggle === "boolean") identifyOnResolve = toggle; return identifyOnResolve; }, resolve: /* @__PURE__ */ __name((handler, context) => { for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) { handler = middleware(handler, context); } if (identifyOnResolve) { console.log(stack.identify()); } return handler; }, "resolve") }; return stack; }, "constructStack"); stepWeights = { initialize: 5, serialize: 4, build: 3, finalizeRequest: 2, deserialize: 1 }; priorityWeights = { high: 3, normal: 2, low: 1 }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/invalid-dependency/invalidFunction.js var invalidFunction; var init_invalidFunction = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/invalid-dependency/invalidFunction.js"() { invalidFunction = /* @__PURE__ */ __name((message) => () => { throw new Error(message); }, "invalidFunction"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/invalid-dependency/invalidProvider.js var invalidProvider; var init_invalidProvider = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/invalid-dependency/invalidProvider.js"() { invalidProvider = /* @__PURE__ */ __name((message) => () => Promise.reject(message), "invalidProvider"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/util-waiter/circularReplacer.js var getCircularReplacer; var init_circularReplacer = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/util-waiter/circularReplacer.js"() { getCircularReplacer = /* @__PURE__ */ __name(() => { const seen = /* @__PURE__ */ new WeakSet(); return (key, value) => { if (typeof value === "object" && value !== null) { if (seen.has(value)) { return "[Circular]"; } seen.add(value); } return value; }; }, "getCircularReplacer"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/util-waiter/utils/sleep.js var sleep; var init_sleep = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/util-waiter/utils/sleep.js"() { sleep = /* @__PURE__ */ __name((seconds) => { return new Promise((resolve) => setTimeout(resolve, seconds * 1e3)); }, "sleep"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/util-waiter/waiter.js var waiterServiceDefaults, WaiterState, checkExceptions; var init_waiter = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/util-waiter/waiter.js"() { init_circularReplacer(); waiterServiceDefaults = { minDelay: 2, maxDelay: 120 }; (function(WaiterState2) { WaiterState2["ABORTED"] = "ABORTED"; WaiterState2["FAILURE"] = "FAILURE"; WaiterState2["SUCCESS"] = "SUCCESS"; WaiterState2["RETRY"] = "RETRY"; WaiterState2["TIMEOUT"] = "TIMEOUT"; })(WaiterState || (WaiterState = {})); checkExceptions = /* @__PURE__ */ __name((result) => { if (result.state === WaiterState.ABORTED) { const abortError = new Error(`${JSON.stringify({ ...result, reason: "Request was aborted" }, getCircularReplacer())}`); abortError.name = "AbortError"; throw abortError; } else if (result.state === WaiterState.TIMEOUT) { const timeoutError = new Error(`${JSON.stringify({ ...result, reason: "Waiter has timed out" }, getCircularReplacer())}`); timeoutError.name = "TimeoutError"; throw timeoutError; } else if (result.state !== WaiterState.SUCCESS) { throw new Error(`${JSON.stringify(result, getCircularReplacer())}`); } return result; }, "checkExceptions"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/util-waiter/poller.js var runPolling, checkWarn403, createMessageFromResponse, exponentialBackoffWithJitter, randomInRange; var init_poller = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/util-waiter/poller.js"() { init_circularReplacer(); init_sleep(); init_waiter(); runPolling = /* @__PURE__ */ __name(async ({ minDelay, maxDelay, maxWaitTime, abortController, client, abortSignal }, input, acceptorChecks) => { const observedResponses = {}; const [minDelayMs, maxDelayMs] = [minDelay * 1e3, maxDelay * 1e3]; let currentAttempt = 0; const waitUntil = Date.now() + maxWaitTime * 1e3; const warn403Time = Date.now() + 6e4; let didWarn403 = false; while (true) { if (currentAttempt > 0) { const delayMs = exponentialBackoffWithJitter(minDelayMs, maxDelayMs, currentAttempt, waitUntil); if (abortController?.signal?.aborted || abortSignal?.aborted) { const message = "AbortController signal aborted."; observedResponses[message] |= 0; observedResponses[message] += 1; return { state: WaiterState.ABORTED, observedResponses }; } if (Date.now() + delayMs > waitUntil) { return { state: WaiterState.TIMEOUT, observedResponses }; } await sleep(delayMs / 1e3); } const { state, reason } = await acceptorChecks(client, input); if (reason) { const message = createMessageFromResponse(reason); observedResponses[message] |= 0; observedResponses[message] += 1; } if (state !== WaiterState.RETRY) { return { state, reason, final: reason, observedResponses }; } currentAttempt += 1; if (!didWarn403 && Date.now() >= warn403Time) { checkWarn403(observedResponses, client); didWarn403 = true; } } }, "runPolling"); checkWarn403 = /* @__PURE__ */ __name((observedResponses = {}, client) => { const orderedErrors = Object.keys(observedResponses); let maxCount = 0; let count403 = 0; for (const response of orderedErrors) { const n = observedResponses[response] | 0; maxCount = Math.max(n, maxCount); if (response.startsWith("403:")) { count403 += n; } } const clientLogger = client?.config?.logger; const warningLogger = typeof clientLogger?.warn === "function" && !clientLogger.constructor?.name?.includes?.("NoOpLogger") ? clientLogger : console; if (count403 >= 3 || orderedErrors[orderedErrors.length - 1]?.startsWith("403:")) { warningLogger.warn(`@smithy/util-waiter WARN - 403 status code encountered during waiter polling.`); } }, "checkWarn403"); createMessageFromResponse = /* @__PURE__ */ __name((reason) => { const status = reason?.$response?.statusCode ?? reason?.$metadata?.httpStatusCode; if (reason?.$responseBodyText) { return `${status ? status + ": " : ""}Deserialization error for body: ${reason.$responseBodyText}`; } if (status) { if (reason?.$response || reason?.message) { return `${status ?? "Unknown"}: ${reason?.message}`; } return `${status}: OK`; } return String(reason?.message ?? JSON.stringify(reason, getCircularReplacer()) ?? "Unknown"); }, "createMessageFromResponse"); exponentialBackoffWithJitter = /* @__PURE__ */ __name((minDelayMs, maxDelayMs, attempt, waitUntil) => { const attemptCountCeiling = Math.log(maxDelayMs / minDelayMs) / Math.log(2) + 1; if (attempt > attemptCountCeiling) { return maxDelayMs; } const delay = minDelayMs * 2 ** (attempt - 1); const capped = Math.min(delay, maxDelayMs); const waitFor = randomInRange(minDelayMs, capped); if (Date.now() + waitFor > waitUntil) { const timeRemaining = waitUntil - Date.now(); return Math.max(0, timeRemaining - 500); } return waitFor; }, "exponentialBackoffWithJitter"); randomInRange = /* @__PURE__ */ __name((min, max) => min + Math.random() * (max - min), "randomInRange"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/util-waiter/utils/validate.js var validateWaiterOptions; var init_validate = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/util-waiter/utils/validate.js"() { validateWaiterOptions = /* @__PURE__ */ __name((options) => { if (options.maxWaitTime <= 0) { throw new Error(`WaiterConfiguration.maxWaitTime must be greater than 0`); } else if (options.minDelay <= 0) { throw new Error(`WaiterConfiguration.minDelay must be greater than 0`); } else if (options.maxDelay <= 0) { throw new Error(`WaiterConfiguration.maxDelay must be greater than 0`); } else if (options.maxWaitTime <= options.minDelay) { throw new Error(`WaiterConfiguration.maxWaitTime [${options.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`); } else if (options.maxDelay < options.minDelay) { throw new Error(`WaiterConfiguration.maxDelay [${options.maxDelay}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`); } }, "validateWaiterOptions"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/util-waiter/createWaiter.js var abortTimeout, createWaiter; var init_createWaiter = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/util-waiter/createWaiter.js"() { init_poller(); init_validate(); init_waiter(); abortTimeout = /* @__PURE__ */ __name((abortSignal) => { let onAbort; const promise = new Promise((resolve) => { onAbort = /* @__PURE__ */ __name(() => resolve({ state: WaiterState.ABORTED }), "onAbort"); if (typeof abortSignal.addEventListener === "function") { abortSignal.addEventListener("abort", onAbort); } else { abortSignal.onabort = onAbort; } }); return { clearListener() { if (typeof abortSignal.removeEventListener === "function") { abortSignal.removeEventListener("abort", onAbort); } }, aborted: promise }; }, "abortTimeout"); createWaiter = /* @__PURE__ */ __name(async (options, input, acceptorChecks) => { const params = { ...waiterServiceDefaults, ...options }; validateWaiterOptions(params); const exitConditions = [runPolling(params, input, acceptorChecks)]; const finalize = []; if (options.abortSignal) { const { aborted, clearListener } = abortTimeout(options.abortSignal); finalize.push(clearListener); exitConditions.push(aborted); } if (options.abortController?.signal) { const { aborted, clearListener } = abortTimeout(options.abortController.signal); finalize.push(clearListener); exitConditions.push(aborted); } return Promise.race(exitConditions).then((result) => { for (const fn of finalize) { fn(); } return result; }); }, "createWaiter"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/client.js var Client; var init_client = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/client.js"() { init_MiddlewareStack(); Client = class { static { __name(this, "Client"); } config; middlewareStack = constructStack(); initConfig; handlers; constructor(config) { this.config = config; const { protocol, protocolSettings } = config; if (protocolSettings) { if (typeof protocol === "function") { config.protocol = new protocol(protocolSettings); } } } send(command, optionsOrCb, cb) { const options = typeof optionsOrCb !== "function" ? optionsOrCb : void 0; const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb; const useHandlerCache = options === void 0 && this.config.cacheMiddleware === true; let handler; if (useHandlerCache) { if (!this.handlers) { this.handlers = /* @__PURE__ */ new WeakMap(); } const handlers = this.handlers; if (handlers.has(command.constructor)) { handler = handlers.get(command.constructor); } else { handler = command.resolveMiddleware(this.middlewareStack, this.config, options); handlers.set(command.constructor, handler); } } else { delete this.handlers; handler = command.resolveMiddleware(this.middlewareStack, this.config, options); } if (callback) { handler(command).then((result) => callback(null, result.output), (err) => callback(err)).catch(() => { }); } else { return handler(command).then((result) => result.output); } } destroy() { this.config?.requestHandler?.destroy?.(); delete this.handlers; } }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/deref.js var deref; var init_deref = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/deref.js"() { deref = /* @__PURE__ */ __name((schemaRef) => { if (typeof schemaRef === "function") { return schemaRef(); } return schemaRef; }, "deref"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js var operation; var init_operation = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js"() { operation = /* @__PURE__ */ __name((namespace, name, traits, input, output) => ({ name, namespace, traits, input, output }), "operation"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js var schemaDeserializationMiddleware, findHeader2; var init_schemaDeserializationMiddleware = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js"() { init_transport(); init_operation(); schemaDeserializationMiddleware = /* @__PURE__ */ __name((config) => (next, context) => async (args) => { const { response } = await next(args); const { operationSchema } = getSmithyContext(context); const [, ns, n, t, i, o] = operationSchema ?? []; try { const parsed = await config.protocol.deserializeResponse(operation(ns, n, t, i, o), { ...config, ...context }, response); return { response, output: parsed }; } catch (error2) { Object.defineProperty(error2, "$response", { value: response, enumerable: false, writable: false, configurable: false }); if (!("$metadata" in error2)) { const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; try { error2.message += "\n " + hint; } catch (ignored) { if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") { console.warn(hint); } else { context.logger?.warn?.(hint); } } if (typeof error2.$responseBodyText !== "undefined") { if (error2.$response) { error2.$response.body = error2.$responseBodyText; } } try { if (HttpResponse.isInstance(response)) { const { headers = {}, statusCode } = response; const headerEntries = Object.entries(headers); error2.$metadata = { httpStatusCode: statusCode, requestId: findHeader2(/^x-[\w-]+-request-?id$/, headerEntries), extendedRequestId: findHeader2(/^x-[\w-]+-id-2$/, headerEntries), cfId: findHeader2(/^x-[\w-]+-cf-id$/, headerEntries) }; } } catch (ignored) { } } throw error2; } }, "schemaDeserializationMiddleware"); findHeader2 = /* @__PURE__ */ __name((pattern, headers) => { return (headers.find(([k]) => { return k.match(pattern); }) || [void 0, void 0])[1]; }, "findHeader"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js var schemaSerializationMiddleware; var init_schemaSerializationMiddleware = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js"() { init_transport(); init_operation(); schemaSerializationMiddleware = /* @__PURE__ */ __name((config) => (next, context) => async (args) => { const { operationSchema } = getSmithyContext(context); const [, ns, n, t, i, o] = operationSchema ?? []; const endpoint = context.endpointV2 ? async () => toEndpointV1(context.endpointV2) : config.endpoint; const request = await config.protocol.serializeRequest(operation(ns, n, t, i, o), args.input, { ...config, ...context, endpoint }); return next({ ...args, request }); }, "schemaSerializationMiddleware"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js function getSchemaSerdePlugin(config) { return { applyToStack: /* @__PURE__ */ __name((commandStack) => { commandStack.add(schemaSerializationMiddleware(config), serializerMiddlewareOption); commandStack.add(schemaDeserializationMiddleware(config), deserializerMiddlewareOption); config.protocol.setSerdeContext(config); }, "applyToStack") }; } var deserializerMiddlewareOption, serializerMiddlewareOption; var init_getSchemaSerdePlugin = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js"() { init_schemaDeserializationMiddleware(); init_schemaSerializationMiddleware(); deserializerMiddlewareOption = { name: "deserializerMiddleware", step: "deserialize", tags: ["DESERIALIZER"], override: true }; serializerMiddlewareOption = { name: "serializerMiddleware", step: "serialize", tags: ["SERIALIZER"], override: true }; __name(getSchemaSerdePlugin, "getSchemaSerdePlugin"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js var Schema; var init_Schema = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js"() { Schema = class { static { __name(this, "Schema"); } name; namespace; traits; static assign(instance, values) { const schema = Object.assign(instance, values); return schema; } static [Symbol.hasInstance](lhs) { const isPrototype = this.prototype.isPrototypeOf(lhs); if (!isPrototype && typeof lhs === "object" && lhs !== null) { const list2 = lhs; return list2.symbol === this.symbol; } return isPrototype; } getName() { return this.namespace + "#" + this.name; } }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js var ListSchema, list; var init_ListSchema = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js"() { init_Schema(); ListSchema = class _ListSchema extends Schema { static { __name(this, "ListSchema"); } static symbol = /* @__PURE__ */ Symbol.for("@smithy/lis"); valueSchema; symbol = _ListSchema.symbol; }; list = /* @__PURE__ */ __name((namespace, name, traits, valueSchema) => Schema.assign(new ListSchema(), { name, namespace, traits, valueSchema }), "list"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js var MapSchema, map; var init_MapSchema = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js"() { init_Schema(); MapSchema = class _MapSchema extends Schema { static { __name(this, "MapSchema"); } static symbol = /* @__PURE__ */ Symbol.for("@smithy/map"); keySchema; valueSchema; symbol = _MapSchema.symbol; }; map = /* @__PURE__ */ __name((namespace, name, traits, keySchema, valueSchema) => Schema.assign(new MapSchema(), { name, namespace, traits, keySchema, valueSchema }), "map"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js var OperationSchema, op; var init_OperationSchema = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js"() { init_Schema(); OperationSchema = class _OperationSchema extends Schema { static { __name(this, "OperationSchema"); } static symbol = /* @__PURE__ */ Symbol.for("@smithy/ope"); input; output; symbol = _OperationSchema.symbol; }; op = /* @__PURE__ */ __name((namespace, name, traits, input, output) => Schema.assign(new OperationSchema(), { name, namespace, traits, input, output }), "op"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js var StructureSchema, struct; var init_StructureSchema = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js"() { init_Schema(); StructureSchema = class _StructureSchema extends Schema { static { __name(this, "StructureSchema"); } static symbol = /* @__PURE__ */ Symbol.for("@smithy/str"); memberNames; memberList; symbol = _StructureSchema.symbol; }; struct = /* @__PURE__ */ __name((namespace, name, traits, memberNames, memberList) => Schema.assign(new StructureSchema(), { name, namespace, traits, memberNames, memberList }), "struct"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js var ErrorSchema, error; var init_ErrorSchema = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js"() { init_Schema(); init_StructureSchema(); ErrorSchema = class _ErrorSchema extends StructureSchema { static { __name(this, "ErrorSchema"); } static symbol = /* @__PURE__ */ Symbol.for("@smithy/err"); ctor; symbol = _ErrorSchema.symbol; }; error = /* @__PURE__ */ __name((namespace, name, traits, memberNames, memberList, _ctor) => Schema.assign(new ErrorSchema(), { name, namespace, traits, memberNames, memberList, ctor: null }), "error"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js function translateTraits(indicator) { if (typeof indicator === "object") { return indicator; } indicator = indicator | 0; if (traitsCache[indicator]) { return traitsCache[indicator]; } const traits = {}; let i = 0; for (const trait of [ "httpLabel", "idempotent", "idempotencyToken", "sensitive", "httpPayload", "httpResponseCode", "httpQueryParams" ]) { if ((indicator >> i++ & 1) === 1) { traits[trait] = 1; } } return traitsCache[indicator] = traits; } var traitsCache; var init_translateTraits = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js"() { traitsCache = []; __name(translateTraits, "translateTraits"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js function member(memberSchema, memberName) { if (memberSchema instanceof NormalizedSchema) { return Object.assign(memberSchema, { memberName, _isMemberSchema: true }); } const internalCtorAccess = NormalizedSchema; return new internalCtorAccess(memberSchema, memberName); } var anno, simpleSchemaCacheN, simpleSchemaCacheS, NormalizedSchema, isMemberSchema, isStaticSchema; var init_NormalizedSchema = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js"() { init_deref(); init_translateTraits(); anno = { it: /* @__PURE__ */ Symbol.for("@smithy/nor-struct-it"), ns: /* @__PURE__ */ Symbol.for("@smithy/ns") }; simpleSchemaCacheN = []; simpleSchemaCacheS = {}; NormalizedSchema = class _NormalizedSchema { static { __name(this, "NormalizedSchema"); } ref; memberName; static symbol = /* @__PURE__ */ Symbol.for("@smithy/nor"); symbol = _NormalizedSchema.symbol; name; schema; _isMemberSchema; traits; memberTraits; normalizedTraits; constructor(ref, memberName) { this.ref = ref; this.memberName = memberName; const traitStack = []; let _ref = ref; let schema = ref; this._isMemberSchema = false; while (isMemberSchema(_ref)) { traitStack.push(_ref[1]); _ref = _ref[0]; schema = deref(_ref); this._isMemberSchema = true; } if (traitStack.length > 0) { this.memberTraits = {}; for (let i = traitStack.length - 1; i >= 0; --i) { const traitSet = traitStack[i]; Object.assign(this.memberTraits, translateTraits(traitSet)); } } else { this.memberTraits = 0; } if (schema instanceof _NormalizedSchema) { const computedMemberTraits = this.memberTraits; Object.assign(this, schema); this.memberTraits = Object.assign({}, computedMemberTraits, schema.getMemberTraits(), this.getMemberTraits()); this.normalizedTraits = void 0; this.memberName = memberName ?? schema.memberName; return; } this.schema = deref(schema); if (isStaticSchema(this.schema)) { this.name = `${this.schema[1]}#${this.schema[2]}`; this.traits = this.schema[3]; } else { this.name = this.memberName ?? String(schema); this.traits = 0; } if (this._isMemberSchema && !memberName) { throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`); } } static [Symbol.hasInstance](lhs) { const isPrototype = this.prototype.isPrototypeOf(lhs); if (!isPrototype && typeof lhs === "object" && lhs !== null) { const ns = lhs; return ns.symbol === this.symbol; } return isPrototype; } static of(ref) { const keyAble = typeof ref === "function" || typeof ref === "object" && ref !== null; if (typeof ref === "number") { if (simpleSchemaCacheN[ref]) { return simpleSchemaCacheN[ref]; } } else if (typeof ref === "string") { if (simpleSchemaCacheS[ref]) { return simpleSchemaCacheS[ref]; } } else if (keyAble) { if (ref[anno.ns]) { return ref[anno.ns]; } } const sc = deref(ref); if (sc instanceof _NormalizedSchema) { return sc; } if (isMemberSchema(sc)) { const [ns2, traits] = sc; if (ns2 instanceof _NormalizedSchema) { Object.assign(ns2.getMergedTraits(), translateTraits(traits)); return ns2; } throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(ref, null, 2)}.`); } const ns = new _NormalizedSchema(sc); if (keyAble) { return ref[anno.ns] = ns; } if (typeof sc === "string") { return simpleSchemaCacheS[sc] = ns; } if (typeof sc === "number") { return simpleSchemaCacheN[sc] = ns; } return ns; } getSchema() { const sc = this.schema; if (Array.isArray(sc) && sc[0] === 0) { return sc[4]; } return sc; } getName(withNamespace = false) { const { name } = this; const short = !withNamespace && name && name.includes("#"); return short ? name.split("#")[1] : name || void 0; } getMemberName() { return this.memberName; } isMemberSchema() { return this._isMemberSchema; } isListSchema() { const sc = this.getSchema(); return typeof sc === "number" ? sc >= 64 && sc < 128 : sc[0] === 1; } isMapSchema() { const sc = this.getSchema(); return typeof sc === "number" ? sc >= 128 && sc <= 255 : sc[0] === 2; } isStructSchema() { const sc = this.getSchema(); if (typeof sc !== "object") { return false; } const id = sc[0]; return id === 3 || id === -3 || id === 4; } isUnionSchema() { const sc = this.getSchema(); if (typeof sc !== "object") { return false; } return sc[0] === 4; } isBlobSchema() { const sc = this.getSchema(); return sc === 21 || sc === 42; } isTimestampSchema() { const sc = this.getSchema(); return typeof sc === "number" && sc >= 4 && sc <= 7; } isUnitSchema() { return this.getSchema() === "unit"; } isDocumentSchema() { return this.getSchema() === 15; } isStringSchema() { return this.getSchema() === 0; } isBooleanSchema() { return this.getSchema() === 2; } isNumericSchema() { return this.getSchema() === 1; } isBigIntegerSchema() { return this.getSchema() === 17; } isBigDecimalSchema() { return this.getSchema() === 19; } isStreaming() { const { streaming } = this.getMergedTraits(); return !!streaming || this.getSchema() === 42; } isIdempotencyToken() { return !!this.getMergedTraits().idempotencyToken; } getMergedTraits() { return this.normalizedTraits ?? (this.normalizedTraits = { ...this.getOwnTraits(), ...this.getMemberTraits() }); } getMemberTraits() { return translateTraits(this.memberTraits); } getOwnTraits() { return translateTraits(this.traits); } getKeySchema() { const [isDoc, isMap] = [this.isDocumentSchema(), this.isMapSchema()]; if (!isDoc && !isMap) { throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(true)}`); } const schema = this.getSchema(); const memberSchema = isDoc ? 15 : schema[4] ?? 0; return member([memberSchema, 0], "key"); } getValueSchema() { const sc = this.getSchema(); const [isDoc, isMap, isList] = [this.isDocumentSchema(), this.isMapSchema(), this.isListSchema()]; const memberSchema = typeof sc === "number" ? 63 & sc : sc && typeof sc === "object" && (isMap || isList) ? sc[3 + sc[0]] : isDoc ? 15 : void 0; if (memberSchema != null) { return member([memberSchema, 0], isMap ? "value" : "member"); } throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`); } getMemberSchema(memberName) { const struct2 = this.getSchema(); if (this.isStructSchema() && struct2[4].includes(memberName)) { const i = struct2[4].indexOf(memberName); const memberSchema = struct2[5][i]; return member(isMemberSchema(memberSchema) ? memberSchema : [memberSchema, 0], memberName); } if (this.isDocumentSchema()) { return member([15, 0], memberName); } throw new Error(`@smithy/core/schema - ${this.getName(true)} has no member=${memberName}.`); } getMemberSchemas() { const buffer = {}; try { for (const [k, v] of this.structIterator()) { buffer[k] = v; } } catch (ignored) { } return buffer; } getEventStreamMember() { if (this.isStructSchema()) { for (const [memberName, memberSchema] of this.structIterator()) { if (memberSchema.isStreaming() && memberSchema.isStructSchema()) { return memberName; } } } return ""; } *structIterator() { if (this.isUnitSchema()) { return; } if (!this.isStructSchema()) { throw new Error("@smithy/core/schema - cannot iterate non-struct schema."); } const struct2 = this.getSchema(); const z = struct2[4].length; let it = struct2[anno.it]; if (it && z === it.length) { yield* it; return; } it = Array(z); for (let i = 0; i < z; ++i) { const k = struct2[4][i]; const v = member([struct2[5][i], 0], k); yield it[i] = [k, v]; } struct2[anno.it] = it; } }; __name(member, "member"); isMemberSchema = /* @__PURE__ */ __name((sc) => Array.isArray(sc) && sc.length === 2, "isMemberSchema"); isStaticSchema = /* @__PURE__ */ __name((sc) => Array.isArray(sc) && sc.length >= 5, "isStaticSchema"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js var SimpleSchema, sim, simAdapter; var init_SimpleSchema = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js"() { init_Schema(); SimpleSchema = class _SimpleSchema extends Schema { static { __name(this, "SimpleSchema"); } static symbol = /* @__PURE__ */ Symbol.for("@smithy/sim"); schemaRef; symbol = _SimpleSchema.symbol; }; sim = /* @__PURE__ */ __name((namespace, name, schemaRef, traits) => Schema.assign(new SimpleSchema(), { name, namespace, traits, schemaRef }), "sim"); simAdapter = /* @__PURE__ */ __name((namespace, name, traits, schemaRef) => Schema.assign(new SimpleSchema(), { name, namespace, traits, schemaRef }), "simAdapter"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js var SCHEMA; var init_sentinels = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js"() { SCHEMA = { BLOB: 21, STREAMING_BLOB: 42, BOOLEAN: 2, STRING: 0, NUMERIC: 1, BIG_INTEGER: 17, BIG_DECIMAL: 19, DOCUMENT: 15, TIMESTAMP_DEFAULT: 4, TIMESTAMP_DATE_TIME: 5, TIMESTAMP_HTTP_DATE: 6, TIMESTAMP_EPOCH_SECONDS: 7, LIST_MODIFIER: 64, MAP_MODIFIER: 128 }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js var TypeRegistry; var init_TypeRegistry = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js"() { TypeRegistry = class _TypeRegistry { static { __name(this, "TypeRegistry"); } namespace; schemas; exceptions; static registries = /* @__PURE__ */ new Map(); constructor(namespace, schemas = /* @__PURE__ */ new Map(), exceptions = /* @__PURE__ */ new Map()) { this.namespace = namespace; this.schemas = schemas; this.exceptions = exceptions; if (!_TypeRegistry.registries.has(namespace)) { _TypeRegistry.registries.set(namespace, this); } } static for(namespace) { return _TypeRegistry.registries.get(namespace) ?? new _TypeRegistry(namespace); } copyFrom(other) { const { schemas, exceptions } = this; for (const [k, v] of other.schemas) { if (!schemas.has(k)) { schemas.set(k, v); } } for (const [k, v] of other.exceptions) { if (!exceptions.has(k)) { exceptions.set(k, v); } } } register(shapeId, schema) { const qualifiedName = this.normalizeShapeId(shapeId); for (const r of [this, _TypeRegistry.for(qualifiedName.split("#")[0])]) { if (!r.schemas.has(qualifiedName)) { r.schemas.set(qualifiedName, schema); } } } getSchema(shapeId) { const id = this.normalizeShapeId(shapeId); if (!this.schemas.has(id)) { if (!shapeId.includes("#")) { const suffix = "#" + shapeId; const candidates = []; for (const [shapeId2, schema] of this.schemas.entries()) { if (shapeId2.endsWith(suffix)) { candidates.push(schema); } } if (candidates.length === 1) { return candidates[0]; } } throw new Error(`@smithy/core/schema - schema not found for ${id}`); } return this.schemas.get(id); } registerError(es, ctor) { const $error = es; const ns = $error[1]; const qualifiedName = ns + "#" + $error[2]; if (!ctor.hasOwnProperty?.("shapeId")) { ctor.shapeId = qualifiedName; } for (const r of [this, _TypeRegistry.for(ns)]) { if (!r.schemas.has(qualifiedName) && !r.exceptions.has($error)) { r.schemas.set(qualifiedName, $error); r.exceptions.set($error, ctor); } } } getErrorCtor(es) { const $error = es; if (this.exceptions.has($error)) { return this.exceptions.get($error); } const registry = _TypeRegistry.for($error[1]); return registry.exceptions.get($error); } getBaseException() { for (const exceptionKey of this.exceptions.keys()) { if (Array.isArray(exceptionKey)) { const [, ns, name] = exceptionKey; const id = ns + "#" + name; if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) { return exceptionKey; } } } return void 0; } find(predicate) { for (const schema of this.schemas.values()) { if (predicate(schema)) { return schema; } } return void 0; } clear() { this.schemas.clear(); this.exceptions.clear(); } normalizeShapeId(shapeId) { if (shapeId.includes("#")) { return shapeId; } return this.namespace + "#" + shapeId; } }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/index.js var schema_exports = {}; __export(schema_exports, { ErrorSchema: () => ErrorSchema, ListSchema: () => ListSchema, MapSchema: () => MapSchema, NormalizedSchema: () => NormalizedSchema, OperationSchema: () => OperationSchema, SCHEMA: () => SCHEMA, Schema: () => Schema, SimpleSchema: () => SimpleSchema, StructureSchema: () => StructureSchema, TypeRegistry: () => TypeRegistry, deref: () => deref, deserializerMiddlewareOption: () => deserializerMiddlewareOption, error: () => error, getSchemaSerdePlugin: () => getSchemaSerdePlugin, isStaticSchema: () => isStaticSchema, list: () => list, map: () => map, op: () => op, operation: () => operation, serializerMiddlewareOption: () => serializerMiddlewareOption, sim: () => sim, simAdapter: () => simAdapter, simpleSchemaCacheN: () => simpleSchemaCacheN, simpleSchemaCacheS: () => simpleSchemaCacheS, struct: () => struct, traitsCache: () => traitsCache, translateTraits: () => translateTraits }); var init_schema = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/schema/index.js"() { init_deref(); init_getSchemaSerdePlugin(); init_ListSchema(); init_MapSchema(); init_OperationSchema(); init_operation(); init_ErrorSchema(); init_NormalizedSchema(); init_Schema(); init_SimpleSchema(); init_StructureSchema(); init_sentinels(); init_translateTraits(); init_TypeRegistry(); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/schemaLogFilter.js function schemaLogFilter(schema, data) { if (data == null) { return data; } const ns = NormalizedSchema.of(schema); if (ns.getMergedTraits().sensitive) { return SENSITIVE_STRING; } if (ns.isListSchema()) { const isSensitive = !!ns.getValueSchema().getMergedTraits().sensitive; if (isSensitive) { return SENSITIVE_STRING; } } else if (ns.isMapSchema()) { const isSensitive = !!ns.getKeySchema().getMergedTraits().sensitive || !!ns.getValueSchema().getMergedTraits().sensitive; if (isSensitive) { return SENSITIVE_STRING; } } else if (ns.isStructSchema() && typeof data === "object") { const object = data; const newObject = {}; for (const [member2, memberNs] of ns.structIterator()) { if (object[member2] != null) { newObject[member2] = schemaLogFilter(memberNs, object[member2]); } } return newObject; } return data; } var SENSITIVE_STRING; var init_schemaLogFilter = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/schemaLogFilter.js"() { init_schema(); SENSITIVE_STRING = "***SensitiveInformation***"; __name(schemaLogFilter, "schemaLogFilter"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js var import_types7, Command, ClassBuilder; var init_command = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js"() { import_types7 = __toESM(require_dist_cjs()); init_MiddlewareStack(); init_schemaLogFilter(); Command = class { static { __name(this, "Command"); } middlewareStack = constructStack(); schema; static classBuilder() { return new ClassBuilder(); } resolveMiddlewareWithContext(clientStack, configuration, options, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor }) { for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) { this.middlewareStack.use(mw); } const stack = clientStack.concat(this.middlewareStack); const { logger: logger2 } = configuration; const additionalSmithyContext = additionalContext[import_types7.SMITHY_CONTEXT_KEY]; const handlerExecutionContext = { logger: logger2, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, ...additionalContext, [import_types7.SMITHY_CONTEXT_KEY]: { ...additionalSmithyContext, commandInstance: this, ...smithyContext, ...options?.metricsRecorder === void 0 ? {} : { metricsRecorder: options.metricsRecorder } } }; const { requestHandler } = configuration; let requestOptions = options ?? {}; if (requestOptions.metricsRecorder) { requestOptions = { ...requestOptions }; delete requestOptions.metricsRecorder; } if (smithyContext.eventStream) { requestOptions = { isEventStream: true, ...requestOptions }; } return stack.resolve((request) => requestHandler.handle(request.request, requestOptions), handlerExecutionContext); } }; ClassBuilder = class { static { __name(this, "ClassBuilder"); } _init = /* @__PURE__ */ __name(() => { }, "_init"); _ep = {}; _middlewareFn = /* @__PURE__ */ __name(() => [], "_middlewareFn"); _commandName = ""; _clientName = ""; _additionalContext = {}; _smithyContext = {}; _inputFilterSensitiveLog = void 0; _outputFilterSensitiveLog = void 0; _serializer = null; _deserializer = null; _operationSchema; init(cb) { this._init = cb; } ep(endpointParameterInstructions) { this._ep = endpointParameterInstructions; return this; } m(middlewareSupplier) { this._middlewareFn = middlewareSupplier; return this; } s(service, operation2, smithyContext = {}) { this._smithyContext = { service, operation: operation2, ...smithyContext }; return this; } c(additionalContext = {}) { this._additionalContext = additionalContext; return this; } n(clientName, commandName) { this._clientName = clientName; this._commandName = commandName; return this; } f(inputFilter = (_) => _, outputFilter = (_) => _) { this._inputFilterSensitiveLog = inputFilter; this._outputFilterSensitiveLog = outputFilter; return this; } ser(serializer) { this._serializer = serializer; return this; } de(deserializer) { this._deserializer = deserializer; return this; } sc(operation2) { this._operationSchema = operation2; this._smithyContext.operationSchema = operation2; return this; } build() { const closure = this; let CommandRef; return CommandRef = class extends Command { static { __name(this, "CommandRef"); } input; static getEndpointParameterInstructions() { return closure._ep; } constructor(...[input]) { super(); this.input = input ?? {}; closure._init(this); this.schema = closure._operationSchema; } resolveMiddleware(stack, configuration, options) { const op2 = closure._operationSchema; const input = op2?.[4] ?? op2?.input; const output = op2?.[5] ?? op2?.output; return this.resolveMiddlewareWithContext(stack, configuration, options, { CommandCtor: CommandRef, middlewareFn: closure._middlewareFn, clientName: closure._clientName, commandName: closure._commandName, inputFilterSensitiveLog: closure._inputFilterSensitiveLog ?? (op2 ? schemaLogFilter.bind(null, input) : (_) => _), outputFilterSensitiveLog: closure._outputFilterSensitiveLog ?? (op2 ? schemaLogFilter.bind(null, output) : (_) => _), smithyContext: closure._smithyContext, additionalContext: closure._additionalContext }); } serialize = closure._serializer; deserialize = closure._deserializer; }; } }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/constants.js var SENSITIVE_STRING2; var init_constants2 = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/constants.js"() { SENSITIVE_STRING2 = "***SensitiveInformation***"; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/create-aggregated-client.js var createAggregatedClient; var init_create_aggregated_client = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/create-aggregated-client.js"() { createAggregatedClient = /* @__PURE__ */ __name((commands, Client2, options) => { for (const [command, CommandCtor] of Object.entries(commands)) { const methodImpl = /* @__PURE__ */ __name(async function(args, optionsOrCb, cb) { const command2 = new CommandCtor(args); if (typeof optionsOrCb === "function") { this.send(command2, optionsOrCb); } else if (typeof cb === "function") { if (typeof optionsOrCb !== "object") throw new Error(`Expected http options but got ${typeof optionsOrCb}`); this.send(command2, optionsOrCb || {}, cb); } else { return this.send(command2, optionsOrCb); } }, "methodImpl"); const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, ""); Client2.prototype[methodName] = methodImpl; } const { paginators = {}, waiters = {} } = options ?? {}; for (const [paginatorName, paginatorFn] of Object.entries(paginators)) { if (Client2.prototype[paginatorName] === void 0) { Client2.prototype[paginatorName] = function(commandInput = {}, paginationConfiguration, ...rest) { return paginatorFn({ ...paginationConfiguration, client: this }, commandInput, ...rest); }; } } for (const [waiterName, waiterFn] of Object.entries(waiters)) { if (Client2.prototype[waiterName] === void 0) { Client2.prototype[waiterName] = async function(commandInput = {}, waiterConfiguration, ...rest) { let config = waiterConfiguration; if (typeof waiterConfiguration === "number") { config = { maxWaitTime: waiterConfiguration }; } return waiterFn({ ...config, client: this }, commandInput, ...rest); }; } } }, "createAggregatedClient"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js var ServiceException, decorateServiceException; var init_exceptions = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js"() { ServiceException = class _ServiceException extends Error { static { __name(this, "ServiceException"); } static shapeId = "smithy.ts.sdk.synthetic.nonamespace.client#ServiceException"; $fault; $response; $retryable; $metadata; constructor(options) { super(options.message); Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype); this.name = options.name; this.$fault = options.$fault; this.$metadata = options.$metadata; } static isInstance(value) { if (!value) return false; const candidate = value; return _ServiceException.prototype.isPrototypeOf(candidate) || Boolean(candidate.$fault) && Boolean(candidate.$metadata) && (candidate.$fault === "client" || candidate.$fault === "server"); } static [Symbol.hasInstance](instance) { if (!instance) return false; const candidate = instance; if (this === _ServiceException) { return _ServiceException.isInstance(instance); } if (_ServiceException.isInstance(instance)) { if (this.prototype.isPrototypeOf(instance)) { return true; } const targetId = Object.prototype.hasOwnProperty.call(this, "shapeId") ? this.shapeId : void 0; let candidateHasShapeId = false; if (targetId) { let proto = Object.getPrototypeOf(candidate); while (proto && proto !== Object.prototype) { const ctor = proto.constructor; const candidateId = ctor !== _ServiceException && Object.prototype.hasOwnProperty.call(ctor, "shapeId") ? ctor?.shapeId : void 0; if (candidateId) { candidateHasShapeId = true; if (candidateId === targetId) { return true; } } proto = Object.getPrototypeOf(proto); } } if (targetId && candidateHasShapeId) { return false; } const targetName = this.name; if (targetName && targetName.length >= 6) { if (candidate.name === targetName) { return true; } let proto = Object.getPrototypeOf(candidate); while (proto && proto !== Object.prototype) { const ctorName = proto.constructor?.name; if (ctorName && ctorName !== "Error" && ctorName === targetName) { return true; } proto = Object.getPrototypeOf(proto); } } } return false; } }; decorateServiceException = /* @__PURE__ */ __name((exception, additions = {}) => { Object.entries(additions).filter(([, v]) => v !== void 0).forEach(([k, v]) => { if (exception[k] == void 0 || exception[k] === "") { exception[k] = v; } }); const message = exception.message || exception.Message || "UnknownError"; exception.message = message; delete exception.Message; return exception; }, "decorateServiceException"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/default-error-handler.js var throwDefaultError, withBaseException, deserializeMetadata; var init_default_error_handler = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/default-error-handler.js"() { init_exceptions(); throwDefaultError = /* @__PURE__ */ __name(({ output, parsedBody, exceptionCtor, errorCode }) => { const $metadata = deserializeMetadata(output); const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0; const response = new exceptionCtor({ name: parsedBody?.code || parsedBody?.Code || errorCode || statusCode || "UnknownError", $fault: "client", $metadata }); throw decorateServiceException(response, parsedBody); }, "throwDefaultError"); withBaseException = /* @__PURE__ */ __name((ExceptionCtor) => { return ({ output, parsedBody, errorCode }) => { throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode }); }; }, "withBaseException"); deserializeMetadata = /* @__PURE__ */ __name((output) => ({ httpStatusCode: output.statusCode, requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], extendedRequestId: output.headers["x-amz-id-2"], cfId: output.headers["x-amz-cf-id"] }), "deserializeMetadata"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/defaults-mode.js var loadConfigsForDefaultMode; var init_defaults_mode = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/defaults-mode.js"() { loadConfigsForDefaultMode = /* @__PURE__ */ __name((mode) => { switch (mode) { case "standard": return { retryMode: "standard", connectionTimeout: 3100 }; case "in-region": return { retryMode: "standard", connectionTimeout: 1100 }; case "cross-region": return { retryMode: "standard", connectionTimeout: 3100 }; case "mobile": return { retryMode: "standard", connectionTimeout: 3e4 }; default: return {}; } }, "loadConfigsForDefaultMode"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/emitWarningIfUnsupportedVersion.js var warningEmitted, emitWarningIfUnsupportedVersion; var init_emitWarningIfUnsupportedVersion = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/emitWarningIfUnsupportedVersion.js"() { warningEmitted = false; emitWarningIfUnsupportedVersion = /* @__PURE__ */ __name((version) => { if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 16) { warningEmitted = true; } }, "emitWarningIfUnsupportedVersion"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js var import_types8, knownAlgorithms, getChecksumConfiguration, resolveChecksumRuntimeConfig; var init_checksum = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js"() { init_transport(); import_types8 = __toESM(require_dist_cjs()); knownAlgorithms = Object.values(import_types8.AlgorithmId); getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { const checksumAlgorithms = []; for (const id in import_types8.AlgorithmId) { if (!hasOwn(import_types8.AlgorithmId, id)) continue; const algorithmId = import_types8.AlgorithmId[id]; if (runtimeConfig[algorithmId] === void 0) { continue; } checksumAlgorithms.push({ algorithmId: /* @__PURE__ */ __name(() => algorithmId, "algorithmId"), checksumConstructor: /* @__PURE__ */ __name(() => runtimeConfig[algorithmId], "checksumConstructor") }); } for (const [id, ChecksumCtor] of Object.entries(runtimeConfig.checksumAlgorithms ?? {})) { checksumAlgorithms.push({ algorithmId: /* @__PURE__ */ __name(() => id, "algorithmId"), checksumConstructor: /* @__PURE__ */ __name(() => ChecksumCtor, "checksumConstructor") }); } return { addChecksumAlgorithm(algo) { runtimeConfig.checksumAlgorithms = runtimeConfig.checksumAlgorithms ?? {}; const id = algo.algorithmId(); const ctor = algo.checksumConstructor(); if (knownAlgorithms.includes(id)) { runtimeConfig.checksumAlgorithms[id.toUpperCase()] = ctor; } else { runtimeConfig.checksumAlgorithms[id] = ctor; } checksumAlgorithms.push(algo); }, checksumAlgorithms() { return checksumAlgorithms; } }; }, "getChecksumConfiguration"); resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => { const runtimeConfig = {}; clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { const id = checksumAlgorithm.algorithmId(); if (knownAlgorithms.includes(id)) { runtimeConfig[id] = checksumAlgorithm.checksumConstructor(); } }); return runtimeConfig; }, "resolveChecksumRuntimeConfig"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/retry.js var getRetryConfiguration, resolveRetryRuntimeConfig; var init_retry = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/retry.js"() { getRetryConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { return { setRetryStrategy(retryStrategy) { runtimeConfig.retryStrategy = retryStrategy; }, retryStrategy() { return runtimeConfig.retryStrategy; } }; }, "getRetryConfiguration"); resolveRetryRuntimeConfig = /* @__PURE__ */ __name((retryStrategyConfiguration) => { const runtimeConfig = {}; runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy(); return runtimeConfig; }, "resolveRetryRuntimeConfig"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/defaultExtensionConfiguration.js var getDefaultExtensionConfiguration, getDefaultClientConfiguration, resolveDefaultRuntimeConfig; var init_defaultExtensionConfiguration = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/defaultExtensionConfiguration.js"() { init_checksum(); init_retry(); getDefaultExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig)); }, "getDefaultExtensionConfiguration"); getDefaultClientConfiguration = getDefaultExtensionConfiguration; resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => { return Object.assign(resolveChecksumRuntimeConfig(config), resolveRetryRuntimeConfig(config)); }, "resolveDefaultRuntimeConfig"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-array-if-single-item.js var getArrayIfSingleItem; var init_get_array_if_single_item = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-array-if-single-item.js"() { getArrayIfSingleItem = /* @__PURE__ */ __name((mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray], "getArrayIfSingleItem"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js var getValueFromTextNode; var init_get_value_from_text_node = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js"() { init_transport(); getValueFromTextNode = /* @__PURE__ */ __name((obj) => { const textNodeName = "#text"; for (const key in obj) { if (!hasOwn(obj, key)) continue; if (obj[key][textNodeName] !== void 0) { obj[key] = obj[key][textNodeName]; } else if (typeof obj[key] === "object" && obj[key] !== null) { obj[key] = getValueFromTextNode(obj[key]); } } return obj; }, "getValueFromTextNode"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/is-serializable-header-value.js var isSerializableHeaderValue; var init_is_serializable_header_value = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/is-serializable-header-value.js"() { isSerializableHeaderValue = /* @__PURE__ */ __name((value) => { return value != null; }, "isSerializableHeaderValue"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/NoOpLogger.js var NoOpLogger; var init_NoOpLogger = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/NoOpLogger.js"() { NoOpLogger = class { static { __name(this, "NoOpLogger"); } trace() { } debug() { } info() { } warn() { } error() { } }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js function map2(arg0, arg1, arg2) { let target; let filter; let instructions; if (typeof arg1 === "undefined" && typeof arg2 === "undefined") { target = {}; instructions = arg0; } else { target = arg0; if (typeof arg1 === "function") { filter = arg1; instructions = arg2; return mapWithFilter(target, filter, instructions); } else { instructions = arg1; } } for (const key in instructions) { if (!hasOwn(instructions, key)) continue; if (!Array.isArray(instructions[key])) { target[key] = instructions[key]; continue; } applyInstruction(target, null, instructions, key); } return target; } var convertMap, take, mapWithFilter, applyInstruction, nonNullish, pass; var init_object_mapping = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js"() { init_transport(); __name(map2, "map"); convertMap = /* @__PURE__ */ __name((target) => { const output = {}; for (const [k, v] of Object.entries(target || {})) { output[k] = [, v]; } return output; }, "convertMap"); take = /* @__PURE__ */ __name((source, instructions) => { const out = {}; for (const key in instructions) { if (!hasOwn(instructions, key)) continue; applyInstruction(out, source, instructions, key); } return out; }, "take"); mapWithFilter = /* @__PURE__ */ __name((target, filter, instructions) => { return map2(target, Object.entries(instructions).reduce((_instructions, [key, value]) => { if (Array.isArray(value)) { _instructions[key] = value; } else { if (typeof value === "function") { _instructions[key] = [filter, value()]; } else { _instructions[key] = [filter, value]; } } return _instructions; }, {})); }, "mapWithFilter"); applyInstruction = /* @__PURE__ */ __name((target, source, instructions, targetKey) => { if (source !== null) { let instruction = instructions[targetKey]; if (typeof instruction === "function") { instruction = [, instruction]; } const [filter2 = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction; if (typeof filter2 === "function" && filter2(source[sourceKey]) || typeof filter2 !== "function" && !!filter2) { target[targetKey] = valueFn(source[sourceKey]); } return; } let [filter, value] = instructions[targetKey]; if (typeof value === "function") { let _value; const defaultFilterPassed = filter === void 0 && (_value = value()) != null; const customFilterPassed = typeof filter === "function" && !!filter(void 0) || typeof filter !== "function" && !!filter; if (defaultFilterPassed) { target[targetKey] = _value; } else if (customFilterPassed) { target[targetKey] = value(); } } else { const defaultFilterPassed = filter === void 0 && value != null; const customFilterPassed = typeof filter === "function" && !!filter(value) || typeof filter !== "function" && !!filter; if (defaultFilterPassed || customFilterPassed) { target[targetKey] = value; } } }, "applyInstruction"); nonNullish = /* @__PURE__ */ __name((_) => _ != null, "nonNullish"); pass = /* @__PURE__ */ __name((_) => _, "pass"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/ser-utils.js var serializeFloat, serializeDateTime; var init_ser_utils = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/ser-utils.js"() { serializeFloat = /* @__PURE__ */ __name((value) => { if (value !== value) { return "NaN"; } switch (value) { case Infinity: return "Infinity"; case -Infinity: return "-Infinity"; default: return value; } }, "serializeFloat"); serializeDateTime = /* @__PURE__ */ __name((date2) => date2.toISOString().replace(".000Z", "Z"), "serializeDateTime"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js var _json; var init_serde_json = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js"() { init_transport(); _json = /* @__PURE__ */ __name((obj) => { if (obj == null) { return {}; } if (Array.isArray(obj)) { return obj.filter((_) => _ != null).map(_json); } if (typeof obj === "object") { const target = {}; for (const key in obj) { if (!hasOwn(obj, key)) continue; if (obj[key] == null) { continue; } target[key] = _json(obj[key]); } return target; } return obj; }, "_json"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/client-command-builder.js function makeBuilder(common, service, name, ep) { return /* @__PURE__ */ __name(function makeCommand(added, plugins, op2, $, smithyContext = {}) { const epMerged = Object.assign({}, common, added); return Command.classBuilder().ep(epMerged).m(function(CommandCtor, clientStack, config, options) { const list2 = plugins.call(this, CommandCtor, clientStack, config, options); list2.unshift(ep(config, CommandCtor.getEndpointParameterInstructions())); return list2; }).s(service, op2, smithyContext).n(name, op2.charAt(0).toUpperCase() + op2.slice(1) + "Command").sc($).build(); }, "makeCommand"); } var init_client_command_builder = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/client-command-builder.js"() { init_command(); __name(makeBuilder, "makeBuilder"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/index.js var client_exports = {}; __export(client_exports, { AlgorithmId: () => import_types8.AlgorithmId, Client: () => Client, Command: () => Command, NoOpLogger: () => NoOpLogger, SENSITIVE_STRING: () => SENSITIVE_STRING2, ServiceException: () => ServiceException, WaiterState: () => WaiterState, _json: () => _json, checkExceptions: () => checkExceptions, constructStack: () => constructStack, convertMap: () => convertMap, createAggregatedClient: () => createAggregatedClient, createWaiter: () => createWaiter, decorateServiceException: () => decorateServiceException, emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion, getArrayIfSingleItem: () => getArrayIfSingleItem, getChecksumConfiguration: () => getChecksumConfiguration, getDefaultClientConfiguration: () => getDefaultClientConfiguration, getDefaultExtensionConfiguration: () => getDefaultExtensionConfiguration, getRetryConfiguration: () => getRetryConfiguration, getSmithyContext: () => getSmithyContext, getValueFromTextNode: () => getValueFromTextNode, invalidFunction: () => invalidFunction, invalidProvider: () => invalidProvider, isSerializableHeaderValue: () => isSerializableHeaderValue, loadConfigsForDefaultMode: () => loadConfigsForDefaultMode, makeBuilder: () => makeBuilder, map: () => map2, normalizeProvider: () => normalizeProvider, resolveChecksumRuntimeConfig: () => resolveChecksumRuntimeConfig, resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig, resolveRetryRuntimeConfig: () => resolveRetryRuntimeConfig, schemaLogFilter: () => schemaLogFilter, serializeDateTime: () => serializeDateTime, serializeFloat: () => serializeFloat, take: () => take, throwDefaultError: () => throwDefaultError, waiterServiceDefaults: () => waiterServiceDefaults, withBaseException: () => withBaseException }); var init_client2 = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/client/index.js"() { init_MiddlewareStack(); init_transport(); init_transport(); init_invalidFunction(); init_invalidProvider(); init_createWaiter(); init_waiter(); init_client(); init_command(); init_constants2(); init_create_aggregated_client(); init_default_error_handler(); init_defaults_mode(); init_emitWarningIfUnsupportedVersion(); init_exceptions(); init_defaultExtensionConfiguration(); init_checksum(); init_retry(); init_get_array_if_single_item(); init_get_value_from_text_node(); init_is_serializable_header_value(); init_NoOpLogger(); init_object_mapping(); init_schemaLogFilter(); init_ser_utils(); init_serde_json(); init_client_command_builder(); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/resolveCustomEndpointsConfig.js var resolveCustomEndpointsConfig; var init_resolveCustomEndpointsConfig = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/resolveCustomEndpointsConfig.js"() { init_client2(); resolveCustomEndpointsConfig = /* @__PURE__ */ __name((input) => { const { tls, endpoint, urlParser, useDualstackEndpoint } = input; return Object.assign(input, { tls: tls ?? true, endpoint: normalizeProvider(typeof endpoint === "string" ? urlParser(endpoint) : endpoint), isCustomEndpoint: true, useDualstackEndpoint: normalizeProvider(useDualstackEndpoint ?? false) }); }, "resolveCustomEndpointsConfig"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/utils/getEndpointFromRegion.js var getEndpointFromRegion; var init_getEndpointFromRegion = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/utils/getEndpointFromRegion.js"() { getEndpointFromRegion = /* @__PURE__ */ __name(async (input) => { const { tls = true } = input; const region = await input.region(); const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/); if (!dnsHostRegex.test(region)) { throw new Error("Invalid region in client config"); } const useDualstackEndpoint = await input.useDualstackEndpoint(); const useFipsEndpoint = await input.useFipsEndpoint(); const { hostname } = await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }) ?? {}; if (!hostname) { throw new Error("Cannot resolve hostname from client config"); } return input.urlParser(`${tls ? "https:" : "http:"}//${hostname}`); }, "getEndpointFromRegion"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/resolveEndpointsConfig.js var resolveEndpointsConfig; var init_resolveEndpointsConfig = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/resolveEndpointsConfig.js"() { init_client2(); init_getEndpointFromRegion(); resolveEndpointsConfig = /* @__PURE__ */ __name((input) => { const useDualstackEndpoint = normalizeProvider(input.useDualstackEndpoint ?? false); const { endpoint, useFipsEndpoint, urlParser, tls } = input; return Object.assign(input, { tls: tls ?? true, endpoint: endpoint ? normalizeProvider(typeof endpoint === "string" ? urlParser(endpoint) : endpoint) : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }), isCustomEndpoint: !!endpoint, useDualstackEndpoint }); }, "resolveEndpointsConfig"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/constants.js var AWS_EXECUTION_ENV, AWS_REGION_ENV, AWS_DEFAULT_REGION_ENV, ENV_IMDS_DISABLED, DEFAULTS_MODE_OPTIONS, IMDS_REGION_PATH, IMDS_TOKEN_PATH, X_AWS_EC2_METADATA_TOKEN, X_AWS_EC2_METADATA_TOKEN_TTL; var init_constants3 = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/constants.js"() { AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV"; AWS_REGION_ENV = "AWS_REGION"; AWS_DEFAULT_REGION_ENV = "AWS_DEFAULT_REGION"; ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"]; IMDS_REGION_PATH = "/latest/meta-data/placement/region"; IMDS_TOKEN_PATH = "/latest/api/token"; X_AWS_EC2_METADATA_TOKEN = "x-aws-ec2-metadata-token"; X_AWS_EC2_METADATA_TOKEN_TTL = "x-aws-ec2-metadata-token-ttl-seconds"; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/getInstanceMetadataRegion.js var TIMEOUT_MS, NEG_CACHE_TTL_MS, negativeCacheUntil, getInstanceMetadataRegion, cacheNegativeAndReturnUndefined, resolveImdsEndpoint, imdsRequest; var init_getInstanceMetadataRegion = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/getInstanceMetadataRegion.js"() { init_constants3(); TIMEOUT_MS = 1e3; NEG_CACHE_TTL_MS = 6e4; negativeCacheUntil = 0; getInstanceMetadataRegion = /* @__PURE__ */ __name(async () => { if (process.env[ENV_IMDS_DISABLED]) { return void 0; } if (Date.now() < negativeCacheUntil) { return void 0; } try { const endpoint = resolveImdsEndpoint(); const token = (await imdsRequest({ ...endpoint, path: IMDS_TOKEN_PATH, method: "PUT", headers: { [X_AWS_EC2_METADATA_TOKEN_TTL]: "21600" } })).toString(); const region = (await imdsRequest({ ...endpoint, path: IMDS_REGION_PATH, method: "GET", headers: { [X_AWS_EC2_METADATA_TOKEN]: token } })).toString().trim(); return region || cacheNegativeAndReturnUndefined(); } catch { return cacheNegativeAndReturnUndefined(); } }, "getInstanceMetadataRegion"); cacheNegativeAndReturnUndefined = /* @__PURE__ */ __name(() => { negativeCacheUntil = Date.now() + NEG_CACHE_TTL_MS; return void 0; }, "cacheNegativeAndReturnUndefined"); resolveImdsEndpoint = /* @__PURE__ */ __name(() => { const envEndpoint = process.env.AWS_EC2_METADATA_SERVICE_ENDPOINT; if (envEndpoint) { const url = new URL(envEndpoint); return { hostname: url.hostname.replace(/^\[(.+)]$/, "$1"), port: url.port ? Number(url.port) : void 0 }; } if (process.env.AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE === "IPv6") { return { hostname: "fd00:ec2::254" }; } return { hostname: "169.254.169.254" }; }, "resolveImdsEndpoint"); imdsRequest = /* @__PURE__ */ __name(async (options) => { const { request } = await import("node:http"); return new Promise((resolve, reject) => { const req = request({ hostname: options.hostname, port: options.port, path: options.path, method: options.method, headers: options.headers, timeout: TIMEOUT_MS, signal: AbortSignal.timeout(TIMEOUT_MS) }); req.on("error", (err) => { reject(err); req.destroy(); }); req.on("timeout", () => { reject(new Error("TimeoutError from instance metadata service")); req.destroy(); }); req.on("response", (res) => { const { statusCode = 400 } = res; if (statusCode < 200 || statusCode >= 300) { reject(Object.assign(new Error("Error response received from instance metadata service"), { statusCode })); req.destroy(); return; } const chunks = []; res.on("data", (chunk) => chunks.push(chunk)); res.on("end", () => { resolve(Buffer.concat(chunks)); req.destroy(); }); }); req.end(); }); }, "imdsRequest"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/config.js var REGION_ENV_NAME, REGION_INI_NAME, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS; var init_config = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/config.js"() { init_getInstanceMetadataRegion(); REGION_ENV_NAME = "AWS_REGION"; REGION_INI_NAME = "region"; NODE_REGION_CONFIG_OPTIONS = { environmentVariableSelector: /* @__PURE__ */ __name((env) => env[REGION_ENV_NAME], "environmentVariableSelector"), configFileSelector: /* @__PURE__ */ __name((profile) => profile[REGION_INI_NAME], "configFileSelector"), default: /* @__PURE__ */ __name(async () => { const region = await getInstanceMetadataRegion(); if (region) { return region; } throw new Error("Region is missing"); }, "default") }; NODE_REGION_CONFIG_FILE_OPTIONS = { preferredFile: "credentials" }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/checkRegion.js var validRegions, checkRegion; var init_checkRegion = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/checkRegion.js"() { init_transport(); validRegions = /* @__PURE__ */ new Set(); checkRegion = /* @__PURE__ */ __name((region, check = isValidHostLabel) => { if (!validRegions.has(region) && !check(region)) { if (region === "*") { 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.`); } else { throw new Error(`Region not accepted: region="${region}" is not a valid hostname component.`); } } else { validRegions.add(region); } }, "checkRegion"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/isFipsRegion.js var isFipsRegion; var init_isFipsRegion = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/isFipsRegion.js"() { isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")), "isFipsRegion"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/getRealRegion.js var getRealRegion; var init_getRealRegion = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/getRealRegion.js"() { init_isFipsRegion(); getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region, "getRealRegion"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/resolveRegionConfig.js var resolveRegionConfig; var init_resolveRegionConfig = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/resolveRegionConfig.js"() { init_checkRegion(); init_getRealRegion(); init_isFipsRegion(); resolveRegionConfig = /* @__PURE__ */ __name((input) => { const { region, useFipsEndpoint } = input; if (!region) { throw new Error("Region is missing"); } return Object.assign(input, { region: /* @__PURE__ */ __name(async () => { const providedRegion = typeof region === "function" ? await region() : region; const realRegion = getRealRegion(providedRegion); checkRegion(realRegion); return realRegion; }, "region"), useFipsEndpoint: /* @__PURE__ */ __name(async () => { const providedRegion = typeof region === "string" ? region : await region(); if (isFipsRegion(providedRegion)) { return true; } return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); }, "useFipsEndpoint") }); }, "resolveRegionConfig"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getHostnameFromVariants.js var getHostnameFromVariants; var init_getHostnameFromVariants = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getHostnameFromVariants.js"() { getHostnameFromVariants = /* @__PURE__ */ __name((variants = [], { useFipsEndpoint, useDualstackEndpoint }) => variants.find(({ tags }) => useFipsEndpoint === tags.includes("fips") && useDualstackEndpoint === tags.includes("dualstack"))?.hostname, "getHostnameFromVariants"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getResolvedHostname.js var getResolvedHostname; var init_getResolvedHostname = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getResolvedHostname.js"() { getResolvedHostname = /* @__PURE__ */ __name((resolvedRegion, { regionHostname, partitionHostname }) => regionHostname ? regionHostname : partitionHostname ? partitionHostname.replace("{region}", resolvedRegion) : void 0, "getResolvedHostname"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getResolvedPartition.js var getResolvedPartition; var init_getResolvedPartition = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getResolvedPartition.js"() { getResolvedPartition = /* @__PURE__ */ __name((region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? "aws", "getResolvedPartition"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getResolvedSigningRegion.js var getResolvedSigningRegion; var init_getResolvedSigningRegion = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getResolvedSigningRegion.js"() { getResolvedSigningRegion = /* @__PURE__ */ __name((hostname, { signingRegion, regionRegex, useFipsEndpoint }) => { if (signingRegion) { return signingRegion; } else if (useFipsEndpoint) { const regionRegexJs = regionRegex.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\."); const regionRegexmatchArray = hostname.match(regionRegexJs); if (regionRegexmatchArray) { return regionRegexmatchArray[0].slice(1, -1); } } }, "getResolvedSigningRegion"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getRegionInfo.js var getRegionInfo; var init_getRegionInfo = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getRegionInfo.js"() { init_getHostnameFromVariants(); init_getResolvedHostname(); init_getResolvedPartition(); init_getResolvedSigningRegion(); getRegionInfo = /* @__PURE__ */ __name((region, { useFipsEndpoint = false, useDualstackEndpoint = false, signingService, regionHash, partitionHash }) => { const partition = getResolvedPartition(region, { partitionHash }); const resolvedRegion = region in regionHash ? region : partitionHash[partition]?.endpoint ?? region; const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint }; const regionHostname = getHostnameFromVariants(regionHash[resolvedRegion]?.variants, hostnameOptions); const partitionHostname = getHostnameFromVariants(partitionHash[partition]?.variants, hostnameOptions); const hostname = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname }); if (hostname === void 0) { throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`); } const signingRegion = getResolvedSigningRegion(hostname, { signingRegion: regionHash[resolvedRegion]?.signingRegion, regionRegex: partitionHash[partition].regionRegex, useFipsEndpoint }); return { partition, signingService, hostname, ...signingRegion && { signingRegion }, ...regionHash[resolvedRegion]?.signingService && { signingService: regionHash[resolvedRegion].signingService } }; }, "getRegionInfo"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/defaultsModeConfig.js var AWS_DEFAULTS_MODE_ENV, AWS_DEFAULTS_MODE_CONFIG, NODE_DEFAULTS_MODE_CONFIG_OPTIONS; var init_defaultsModeConfig = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/defaultsModeConfig.js"() { AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE"; AWS_DEFAULTS_MODE_CONFIG = "defaults_mode"; NODE_DEFAULTS_MODE_CONFIG_OPTIONS = { environmentVariableSelector: /* @__PURE__ */ __name((env) => { return env[AWS_DEFAULTS_MODE_ENV]; }, "environmentVariableSelector"), configFileSelector: /* @__PURE__ */ __name((profile) => { return profile[AWS_DEFAULTS_MODE_CONFIG]; }, "configFileSelector"), default: "legacy" }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/resolveDefaultsModeConfig.js var resolveDefaultsModeConfig, resolveNodeDefaultsModeAuto, inferPhysicalRegion; var init_resolveDefaultsModeConfig = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/resolveDefaultsModeConfig.js"() { init_config(); init_getInstanceMetadataRegion(); init_configLoader(); init_memoize(); init_constants3(); init_defaultsModeConfig(); resolveDefaultsModeConfig = /* @__PURE__ */ __name(({ region = loadConfig(NODE_REGION_CONFIG_OPTIONS), defaultsMode = loadConfig(NODE_DEFAULTS_MODE_CONFIG_OPTIONS) } = {}) => memoize(async () => { const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode; switch (mode?.toLowerCase()) { case "auto": return resolveNodeDefaultsModeAuto(region); case "in-region": case "cross-region": case "mobile": case "standard": case "legacy": return Promise.resolve(mode?.toLocaleLowerCase()); case void 0: return Promise.resolve("legacy"); default: throw new Error(`Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}`); } }), "resolveDefaultsModeConfig"); resolveNodeDefaultsModeAuto = /* @__PURE__ */ __name(async (clientRegion) => { if (clientRegion) { const resolvedRegion = typeof clientRegion === "function" ? await clientRegion() : clientRegion; const inferredRegion = await inferPhysicalRegion(); if (!inferredRegion) { return "standard"; } if (resolvedRegion === inferredRegion) { return "in-region"; } else { return "cross-region"; } } return "standard"; }, "resolveNodeDefaultsModeAuto"); inferPhysicalRegion = /* @__PURE__ */ __name(async () => { if (process.env[AWS_EXECUTION_ENV] && (process.env[AWS_REGION_ENV] || process.env[AWS_DEFAULT_REGION_ENV])) { return process.env[AWS_REGION_ENV] ?? process.env[AWS_DEFAULT_REGION_ENV]; } return getInstanceMetadataRegion(); }, "inferPhysicalRegion"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/index.js var config_exports = {}; __export(config_exports, { CONFIG_PREFIX_SEPARATOR: () => CONFIG_PREFIX_SEPARATOR, CONFIG_USE_DUALSTACK_ENDPOINT: () => CONFIG_USE_DUALSTACK_ENDPOINT, CONFIG_USE_FIPS_ENDPOINT: () => CONFIG_USE_FIPS_ENDPOINT, CredentialsProviderError: () => CredentialsProviderError, DEFAULT_PROFILE: () => DEFAULT_PROFILE, DEFAULT_USE_DUALSTACK_ENDPOINT: () => DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT: () => DEFAULT_USE_FIPS_ENDPOINT, ENV_PROFILE: () => ENV_PROFILE, ENV_USE_DUALSTACK_ENDPOINT: () => ENV_USE_DUALSTACK_ENDPOINT, ENV_USE_FIPS_ENDPOINT: () => ENV_USE_FIPS_ENDPOINT, NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, ProviderError: () => ProviderError, REGION_ENV_NAME: () => REGION_ENV_NAME, REGION_INI_NAME: () => REGION_INI_NAME, SelectorType: () => SelectorType, TokenProviderError: () => TokenProviderError, booleanSelector: () => booleanSelector, chain: () => chain, externalDataInterceptor: () => externalDataInterceptor, fromStatic: () => fromStatic, fromValue: () => fromValue, getHomeDir: () => getHomeDir, getProfileName: () => getProfileName, getRegionInfo: () => getRegionInfo, getSSOTokenFilepath: () => getSSOTokenFilepath, getSSOTokenFromFile: () => getSSOTokenFromFile, loadConfig: () => loadConfig, loadSharedConfigFiles: () => loadSharedConfigFiles, loadSsoSessionData: () => loadSsoSessionData, memoize: () => memoize, nodeDualstackConfigSelectors: () => nodeDualstackConfigSelectors, nodeFipsConfigSelectors: () => nodeFipsConfigSelectors, numberSelector: () => numberSelector, parseKnownFiles: () => parseKnownFiles, readFile: () => readFile2, resolveCustomEndpointsConfig: () => resolveCustomEndpointsConfig, resolveDefaultsModeConfig: () => resolveDefaultsModeConfig, resolveEndpointsConfig: () => resolveEndpointsConfig, resolveRegionConfig: () => resolveRegionConfig }); var init_config2 = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/config/index.js"() { init_ProviderError(); init_CredentialsProviderError(); init_TokenProviderError(); init_chain(); init_fromValue(); init_memoize(); init_booleanSelector(); init_numberSelector(); init_types(); init_getHomeDir(); init_getProfileName(); init_getSSOTokenFilepath(); init_getSSOTokenFromFile(); init_constants(); init_loadSharedConfigFiles(); init_loadSsoSessionData(); init_parseKnownFiles(); init_externalDataInterceptor(); init_readFile(); init_configLoader(); init_fromStatic(); init_NodeUseDualstackEndpointConfigOptions(); init_NodeUseFipsEndpointConfigOptions(); init_resolveCustomEndpointsConfig(); init_resolveEndpointsConfig(); init_config(); init_resolveRegionConfig(); init_getRegionInfo(); init_resolveDefaultsModeConfig(); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointUrlConfig.js var ENV_ENDPOINT_URL, CONFIG_ENDPOINT_URL, getEndpointUrlConfig; var init_getEndpointUrlConfig = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointUrlConfig.js"() { init_config2(); ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL"; CONFIG_ENDPOINT_URL = "endpoint_url"; getEndpointUrlConfig = /* @__PURE__ */ __name((serviceId) => ({ environmentVariableSelector: /* @__PURE__ */ __name((env) => { const serviceSuffixParts = serviceId.split(" ").map((w) => w.toUpperCase()); const serviceEndpointUrl = env[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")]; if (serviceEndpointUrl) return serviceEndpointUrl; const endpointUrl = env[ENV_ENDPOINT_URL]; if (endpointUrl) return endpointUrl; return void 0; }, "environmentVariableSelector"), configFileSelector: /* @__PURE__ */ __name((profile, config) => { if (profile.services) { const servicesSectionKey = ["services", profile.services].join(CONFIG_PREFIX_SEPARATOR); if (!config || !config[servicesSectionKey]) { throw new Error(`The services section "${profile.services}" specified in the profile is not present in the shared configuration file.`); } const servicesSection = config[servicesSectionKey]; const servicePrefixParts = serviceId.split(" ").map((w) => w.toLowerCase()); const endpointUrl2 = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(CONFIG_PREFIX_SEPARATOR)]; if (endpointUrl2) return endpointUrl2; } const endpointUrl = profile[CONFIG_ENDPOINT_URL]; if (endpointUrl) return endpointUrl; return void 0; }, "configFileSelector"), default: void 0 }), "getEndpointUrlConfig"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getIgnoreConfiguredEndpointUrls.js var ENV_IGNORE_CONFIGURED_ENDPOINT_URLS, CONFIG_IGNORE_CONFIGURED_ENDPOINT_URLS, ignoreConfiguredEndpointUrlsConfigSelectors; var init_getIgnoreConfiguredEndpointUrls = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getIgnoreConfiguredEndpointUrls.js"() { init_config2(); ENV_IGNORE_CONFIGURED_ENDPOINT_URLS = "AWS_IGNORE_CONFIGURED_ENDPOINT_URLS"; CONFIG_IGNORE_CONFIGURED_ENDPOINT_URLS = "ignore_configured_endpoint_urls"; ignoreConfiguredEndpointUrlsConfigSelectors = { environmentVariableSelector: /* @__PURE__ */ __name((env) => booleanSelector(env, ENV_IGNORE_CONFIGURED_ENDPOINT_URLS, SelectorType.ENV), "environmentVariableSelector"), configFileSelector: /* @__PURE__ */ __name((profile) => booleanSelector(profile, CONFIG_IGNORE_CONFIGURED_ENDPOINT_URLS, SelectorType.CONFIG), "configFileSelector"), default: false }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointFromConfig.js var getEndpointFromConfig; var init_getEndpointFromConfig = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointFromConfig.js"() { init_config2(); init_getEndpointUrlConfig(); init_getIgnoreConfiguredEndpointUrls(); getEndpointFromConfig = /* @__PURE__ */ __name(async (serviceId) => { const ignore = await loadConfig(ignoreConfiguredEndpointUrlsConfigSelectors)(); if (ignore) { return void 0; } return loadConfig(getEndpointUrlConfig(serviceId ?? ""))(); }, "getEndpointFromConfig"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/service-customizations/s3.js var resolveParamsForS3, DOMAIN_PATTERN, IP_ADDRESS_PATTERN, DOTS_PATTERN, isDnsCompatibleBucketName, isArnBucketName; var init_s3 = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/service-customizations/s3.js"() { resolveParamsForS3 = /* @__PURE__ */ __name(async (endpointParams) => { const bucket = endpointParams?.Bucket || ""; if (typeof endpointParams.Bucket === "string") { endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?")); } if (isArnBucketName(bucket)) { if (endpointParams.ForcePathStyle === true) { throw new Error("Path-style addressing cannot be used with ARN buckets"); } } else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:") || bucket.toLowerCase() !== bucket || bucket.length < 3) { endpointParams.ForcePathStyle = true; } if (endpointParams.DisableMultiRegionAccessPoints) { endpointParams.disableMultiRegionAccessPoints = true; endpointParams.DisableMRAP = true; } return endpointParams; }, "resolveParamsForS3"); DOMAIN_PATTERN = /^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$/; IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/; DOTS_PATTERN = /\.\./; isDnsCompatibleBucketName = /* @__PURE__ */ __name((bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName), "isDnsCompatibleBucketName"); isArnBucketName = /* @__PURE__ */ __name((bucketName) => { const [arn, partition, service, , , bucket] = bucketName.split(":"); const isArn = arn === "arn" && bucketName.split(":").length >= 6; const isValidArn = Boolean(isArn && partition && service && bucket); if (isArn && !isValidArn) { throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`); } return isValidArn; }, "isArnBucketName"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/service-customizations/index.js var init_service_customizations = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/service-customizations/index.js"() { init_s3(); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/createConfigValueProvider.js var createConfigValueProvider; var init_createConfigValueProvider = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/createConfigValueProvider.js"() { createConfigValueProvider = /* @__PURE__ */ __name((configKey, canonicalEndpointParamKey, config, isClientContextParam = false) => { const configProvider = /* @__PURE__ */ __name(async () => { let configValue; if (isClientContextParam) { const clientContextParams = config.clientContextParams; const nestedValue = clientContextParams?.[configKey]; configValue = nestedValue ?? config[configKey] ?? config[canonicalEndpointParamKey]; } else { configValue = config[configKey] ?? config[canonicalEndpointParamKey]; } if (typeof configValue === "function") { return configValue(); } return configValue; }, "configProvider"); if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") { return async () => { const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials; const configValue = credentials?.credentialScope ?? credentials?.CredentialScope; return configValue; }; } if (configKey === "accountId" || canonicalEndpointParamKey === "AccountId") { return async () => { const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials; const configValue = credentials?.accountId ?? credentials?.AccountId; return configValue; }; } if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") { return async () => { if (config.isCustomEndpoint === false) { return void 0; } const endpoint = await configProvider(); if (endpoint && typeof endpoint === "object") { if ("url" in endpoint) { return endpoint.url.href; } if ("hostname" in endpoint) { const { protocol, hostname, port, path } = endpoint; return `${protocol}//${hostname}${port ? ":" + port : ""}${path}`; } } return endpoint; }; } return configProvider; }, "createConfigValueProvider"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/toEndpointV1.js var init_toEndpointV12 = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/toEndpointV1.js"() { init_transport(); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointFromInstructions.js function bindGetEndpointFromInstructions(getEndpointFromConfig2) { return async (commandInput, instructionsSupplier, clientConfig, context) => { if (!clientConfig.isCustomEndpoint && !clientConfig.ignoreConfiguredEndpointUrls) { let endpointFromConfig; if (clientConfig.serviceConfiguredEndpoint) { endpointFromConfig = await clientConfig.serviceConfiguredEndpoint(); } else { endpointFromConfig = await getEndpointFromConfig2(clientConfig.serviceId); } if (endpointFromConfig) { clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig)); clientConfig.isCustomEndpoint = true; context?.logger?.debug?.(`@smithy/core/endpoints - resolved endpoint from config: ${endpointFromConfig}`); } } const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig); if (typeof clientConfig.endpointProvider !== "function") { throw new Error("config.endpointProvider is not set."); } const endpoint = clientConfig.endpointProvider(endpointParams, context); if (clientConfig.isCustomEndpoint && clientConfig.endpoint) { const customEndpoint = await clientConfig.endpoint(); if (customEndpoint?.headers) { endpoint.headers ??= {}; for (const [name, value] of Object.entries(customEndpoint.headers)) { endpoint.headers[name] = Array.isArray(value) ? value : [value]; } } } return endpoint; }; } var resolveParams; var init_getEndpointFromInstructions = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointFromInstructions.js"() { init_service_customizations(); init_createConfigValueProvider(); init_toEndpointV12(); __name(bindGetEndpointFromInstructions, "bindGetEndpointFromInstructions"); resolveParams = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig) => { const endpointParams = {}; const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {}; for (const [name, instruction] of Object.entries(instructions)) { switch (instruction.type) { case "staticContextParams": endpointParams[name] = instruction.value; break; case "contextParams": endpointParams[name] = commandInput[instruction.name]; break; case "clientContextParams": case "builtInParams": endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig, instruction.type !== "builtInParams")(); break; case "operationContextParams": endpointParams[name] = instruction.get(commandInput); break; default: throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction)); } } if (Object.keys(instructions).length === 0) { Object.assign(endpointParams, clientConfig); } if (String(clientConfig.serviceId).toLowerCase() === "s3") { await resolveParamsForS3(endpointParams); } return endpointParams; }, "resolveParams"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/endpointMiddleware.js function setFeature(context, feature, value) { if (!context.__smithy_context) { context.__smithy_context = { features: {} }; } else if (!context.__smithy_context.features) { context.__smithy_context.features = {}; } context.__smithy_context.features[feature] = value; } function bindEndpointMiddleware(getEndpointFromConfig2) { const getEndpointFromInstructions2 = bindGetEndpointFromInstructions(getEndpointFromConfig2); return ({ config, instructions }) => { return (next, context) => async (args) => { if (config.isCustomEndpoint) { setFeature(context, "ENDPOINT_OVERRIDE", "N"); } const endpoint = await getEndpointFromInstructions2(args.input, { getEndpointParameterInstructions() { return instructions; } }, { ...config }, context); context.endpointV2 = endpoint; context.authSchemes = endpoint.properties?.authSchemes; const authScheme = context.authSchemes?.[0]; if (authScheme) { context["signing_region"] = authScheme.signingRegion; context["signing_service"] = authScheme.signingName; const smithyContext = getSmithyContext(context); const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption; if (httpAuthOption) { httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, { signing_region: authScheme.signingRegion, signingRegion: authScheme.signingRegion, signing_service: authScheme.signingName, signingName: authScheme.signingName, signingRegionSet: authScheme.signingRegionSet }, authScheme.properties); } } return next({ ...args }); }; }; } var init_endpointMiddleware = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/endpointMiddleware.js"() { init_transport(); init_getEndpointFromInstructions(); __name(setFeature, "setFeature"); __name(bindEndpointMiddleware, "bindEndpointMiddleware"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/getEndpointPlugin.js function bindGetEndpointPlugin(getEndpointFromConfig2) { const endpointMiddleware2 = bindEndpointMiddleware(getEndpointFromConfig2); return (config, instructions) => ({ applyToStack: /* @__PURE__ */ __name((clientStack) => { clientStack.addRelativeTo(endpointMiddleware2({ config, instructions }), endpointMiddlewareOptions); }, "applyToStack") }); } var serializerMiddlewareOption2, endpointMiddlewareOptions; var init_getEndpointPlugin = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/getEndpointPlugin.js"() { init_endpointMiddleware(); serializerMiddlewareOption2 = { name: "serializerMiddleware", step: "serialize", tags: ["SERIALIZER"], override: true }; endpointMiddlewareOptions = { step: "serialize", tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"], name: "endpointV2Middleware", override: true, relation: "before", toMiddleware: serializerMiddlewareOption2.name }; __name(bindGetEndpointPlugin, "bindGetEndpointPlugin"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/resolveEndpointConfig.js function bindResolveEndpointConfig(getEndpointFromConfig2) { return (input) => { const tls = input.tls ?? true; const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input; const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await normalizeProvider(endpoint)()) : void 0; const isCustomEndpoint = !!endpoint; const resolvedConfig = Object.assign(input, { endpoint: customEndpointProvider, tls, isCustomEndpoint, useDualstackEndpoint: normalizeProvider(useDualstackEndpoint ?? false), useFipsEndpoint: normalizeProvider(useFipsEndpoint ?? false), ignoreConfiguredEndpointUrls: !!input.ignoreConfiguredEndpointUrls }); let configuredEndpointPromise = void 0; resolvedConfig.serviceConfiguredEndpoint = async () => { if (input.serviceId && !configuredEndpointPromise) { configuredEndpointPromise = getEndpointFromConfig2(input.serviceId); } return configuredEndpointPromise; }; return resolvedConfig; }; } var init_resolveEndpointConfig = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/resolveEndpointConfig.js"() { init_transport(); init_toEndpointV12(); __name(bindResolveEndpointConfig, "bindResolveEndpointConfig"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/bdd/BinaryDecisionDiagram.js var BinaryDecisionDiagram; var init_BinaryDecisionDiagram = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/bdd/BinaryDecisionDiagram.js"() { BinaryDecisionDiagram = class _BinaryDecisionDiagram { static { __name(this, "BinaryDecisionDiagram"); } nodes; root; conditions; results; constructor(bdd, root, conditions, results) { this.nodes = bdd; this.root = root; this.conditions = conditions; this.results = results; } static from(bdd, root, conditions, results) { return new _BinaryDecisionDiagram(bdd, root, conditions, results); } }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/cache/EndpointCache.js var EndpointCache; var init_EndpointCache = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/cache/EndpointCache.js"() { EndpointCache = class { static { __name(this, "EndpointCache"); } capacity; data = /* @__PURE__ */ new Map(); parameters = []; constructor({ size, params }) { this.capacity = size ?? 50; if (params) { this.parameters = params; } } get(endpointParams, resolver) { const key = this.hash(endpointParams); if (key === false) { return resolver(); } if (!this.data.has(key)) { if (this.data.size > this.capacity + 10) { const keys = this.data.keys(); let i = 0; while (true) { const { value, done } = keys.next(); this.data.delete(value); if (done || ++i > 10) { break; } } } this.data.set(key, resolver()); } return this.data.get(key); } size() { return this.data.size; } hash(endpointParams) { let buffer = ""; const { parameters } = this; if (parameters.length === 0) { return false; } for (const param of parameters) { const raw = endpointParams[param]; const val = raw == null ? "\0" : String(raw); if (val.includes("|;")) { return false; } buffer += val + "|;"; } return buffer; } }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/EndpointError.js var EndpointError; var init_EndpointError = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/EndpointError.js"() { EndpointError = class extends Error { static { __name(this, "EndpointError"); } constructor(message) { super(message); this.name = "EndpointError"; } }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/index.js var init_types2 = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/index.js"() { init_EndpointError(); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/debug/debugId.js var debugId; var init_debugId = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/debug/debugId.js"() { debugId = "endpoints"; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/debug/toDebugString.js function toDebugString(input) { if (typeof input !== "object" || input == null) { return input; } if ("ref" in input) { return `$${toDebugString(input.ref)}`; } if ("fn" in input) { return `${input.fn}(${(input.argv || []).map(toDebugString).join(", ")})`; } return JSON.stringify(input, null, 2); } var init_toDebugString = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/debug/toDebugString.js"() { __name(toDebugString, "toDebugString"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/debug/index.js var init_debug = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/debug/index.js"() { init_debugId(); init_toDebugString(); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/customEndpointFunctions.js var customEndpointFunctions; var init_customEndpointFunctions = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/customEndpointFunctions.js"() { customEndpointFunctions = {}; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/booleanEquals.js var booleanEquals; var init_booleanEquals = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/booleanEquals.js"() { booleanEquals = /* @__PURE__ */ __name((value1, value2) => value1 === value2, "booleanEquals"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/coalesce.js function coalesce(...args) { for (const arg of args) { if (arg != null) { return arg; } } return void 0; } var init_coalesce = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/coalesce.js"() { __name(coalesce, "coalesce"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/getAttrPathList.js var getAttrPathList; var init_getAttrPathList = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/getAttrPathList.js"() { init_types2(); getAttrPathList = /* @__PURE__ */ __name((path) => { const parts = path.split("."); const pathList = []; for (const part of parts) { const squareBracketIndex = part.indexOf("["); if (squareBracketIndex !== -1) { if (part.indexOf("]") !== part.length - 1) { throw new EndpointError(`Path: '${path}' does not end with ']'`); } const arrayIndex = part.slice(squareBracketIndex + 1, -1); if (Number.isNaN(parseInt(arrayIndex))) { throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path}'`); } if (squareBracketIndex !== 0) { pathList.push(part.slice(0, squareBracketIndex)); } pathList.push(arrayIndex); } else { pathList.push(part); } } return pathList; }, "getAttrPathList"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/getAttr.js var getAttr; var init_getAttr = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/getAttr.js"() { init_types2(); init_getAttrPathList(); getAttr = /* @__PURE__ */ __name((value, path) => getAttrPathList(path).reduce((acc, index) => { if (typeof acc !== "object") { throw new EndpointError(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`); } else if (Array.isArray(acc)) { const i = parseInt(index); return acc[i < 0 ? acc.length + i : i]; } return acc[index]; }, value), "getAttr"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/isSet.js var isSet; var init_isSet = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/isSet.js"() { isSet = /* @__PURE__ */ __name((value) => value != null, "isSet"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/ite.js function ite(condition, trueValue, falseValue) { return condition ? trueValue : falseValue; } var init_ite = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/ite.js"() { __name(ite, "ite"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/not.js var not; var init_not = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/not.js"() { not = /* @__PURE__ */ __name((value) => !value, "not"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/isIpAddress.js var IP_V4_REGEX, isIpAddress; var init_isIpAddress = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/isIpAddress.js"() { IP_V4_REGEX = new 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}$`); isIpAddress = /* @__PURE__ */ __name((value) => IP_V4_REGEX.test(value) || value.startsWith("[") && value.endsWith("]"), "isIpAddress"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/parseURL.js var import_types12, DEFAULT_PORTS, parseURL; var init_parseURL = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/parseURL.js"() { import_types12 = __toESM(require_dist_cjs()); init_isIpAddress(); DEFAULT_PORTS = { [import_types12.EndpointURLScheme.HTTP]: 80, [import_types12.EndpointURLScheme.HTTPS]: 443 }; parseURL = /* @__PURE__ */ __name((value) => { const whatwgURL = (() => { try { if (value instanceof URL) { return value; } if (typeof value === "object" && "hostname" in value) { const { hostname: hostname2, port, protocol: protocol2 = "", path = "", query = {} } = value; const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${path}`); url.search = Object.entries(query).map(([k, v]) => `${k}=${v}`).join("&"); return url; } return new URL(value); } catch (ignored) { return null; } })(); if (!whatwgURL) { console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`); return null; } const urlString = whatwgURL.href; const { host, hostname, pathname, protocol, search } = whatwgURL; if (search) { return null; } const scheme = protocol.slice(0, -1); if (!Object.values(import_types12.EndpointURLScheme).includes(scheme)) { return null; } const isIp = isIpAddress(hostname); const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) || typeof value === "string" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`); const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`; return { scheme, authority, path: pathname, normalizedPath: pathname.endsWith("/") ? pathname : `${pathname}/`, isIp }; }, "parseURL"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/split.js function split(value, delimiter, limit) { if (limit === 1) { return [value]; } if (value === "") { return [""]; } const parts = value.split(delimiter); if (limit === 0) { return parts; } return parts.slice(0, limit - 1).concat(parts.slice(1).join(delimiter)); } var init_split = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/split.js"() { __name(split, "split"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/stringEquals.js var stringEquals; var init_stringEquals = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/stringEquals.js"() { stringEquals = /* @__PURE__ */ __name((value1, value2) => value1 === value2, "stringEquals"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/substring.js var substring; var init_substring = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/substring.js"() { substring = /* @__PURE__ */ __name((input, start, stop, reverse) => { if (input == null || start >= stop || input.length < stop || /[^\u0000-\u007f]/.test(input)) { return null; } if (!reverse) { return input.substring(start, stop); } return input.substring(input.length - stop, input.length - start); }, "substring"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/uriEncode.js var uriEncode; var init_uriEncode = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/uriEncode.js"() { uriEncode = /* @__PURE__ */ __name((value) => encodeURIComponent(value).replace(/[!*'()]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`), "uriEncode"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/index.js var init_lib = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/index.js"() { init_booleanEquals(); init_coalesce(); init_getAttr(); init_isSet(); init_transport(); init_ite(); init_not(); init_parseURL(); init_split(); init_stringEquals(); init_substring(); init_uriEncode(); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/endpointFunctions.js var endpointFunctions; var init_endpointFunctions = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/endpointFunctions.js"() { init_lib(); endpointFunctions = { booleanEquals, coalesce, getAttr, isSet, isValidHostLabel, ite, not, parseURL, split, stringEquals, substring, uriEncode }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateTemplate.js var evaluateTemplate; var init_evaluateTemplate = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateTemplate.js"() { init_lib(); evaluateTemplate = /* @__PURE__ */ __name((template, options) => { const evaluatedTemplateArr = []; const { referenceRecord, endpointParams } = options; let currentIndex = 0; while (currentIndex < template.length) { const openingBraceIndex = template.indexOf("{", currentIndex); if (openingBraceIndex === -1) { evaluatedTemplateArr.push(template.slice(currentIndex)); break; } evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex)); const closingBraceIndex = template.indexOf("}", openingBraceIndex); if (closingBraceIndex === -1) { evaluatedTemplateArr.push(template.slice(openingBraceIndex)); break; } if (template[openingBraceIndex + 1] === "{" && template[closingBraceIndex + 1] === "}") { evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex)); currentIndex = closingBraceIndex + 2; } const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex); if (parameterName.includes("#")) { const [refName, attrName] = parameterName.split("#"); evaluatedTemplateArr.push(getAttr(referenceRecord[refName] ?? endpointParams[refName], attrName)); } else { evaluatedTemplateArr.push(referenceRecord[parameterName] ?? endpointParams[parameterName]); } currentIndex = closingBraceIndex + 1; } return evaluatedTemplateArr.join(""); }, "evaluateTemplate"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getReferenceValue.js var getReferenceValue; var init_getReferenceValue = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getReferenceValue.js"() { getReferenceValue = /* @__PURE__ */ __name(({ ref }, options) => { return options.referenceRecord[ref] ?? options.endpointParams[ref]; }, "getReferenceValue"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateExpression.js var evaluateExpression, callFunction, group; var init_evaluateExpression = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateExpression.js"() { init_types2(); init_customEndpointFunctions(); init_endpointFunctions(); init_evaluateTemplate(); init_getReferenceValue(); evaluateExpression = /* @__PURE__ */ __name((obj, keyName, options) => { if (typeof obj === "string") { return evaluateTemplate(obj, options); } else if (obj["fn"]) { return group.callFunction(obj, options); } else if (obj["ref"]) { return getReferenceValue(obj, options); } throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`); }, "evaluateExpression"); callFunction = /* @__PURE__ */ __name(({ fn, argv }, options) => { const evaluatedArgs = Array(argv.length); for (let i = 0; i < evaluatedArgs.length; ++i) { const arg = argv[i]; if (typeof arg === "boolean" || typeof arg === "number") { evaluatedArgs[i] = arg; } else { evaluatedArgs[i] = group.evaluateExpression(arg, "arg", options); } } const namespaceSeparatorIndex = fn.indexOf("."); if (namespaceSeparatorIndex !== -1) { const namespaceFunctions = customEndpointFunctions[fn.slice(0, namespaceSeparatorIndex)]; const customFunction = namespaceFunctions?.[fn.slice(namespaceSeparatorIndex + 1)]; if (typeof customFunction === "function") { return customFunction(...evaluatedArgs); } } const callable = endpointFunctions[fn]; if (typeof callable === "function") { return callable(...evaluatedArgs); } throw new Error(`function ${fn} not loaded in endpointFunctions.`); }, "callFunction"); group = { evaluateExpression, callFunction }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/callFunction.js var init_callFunction = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/callFunction.js"() { init_evaluateExpression(); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateCondition.js var evaluateCondition; var init_evaluateCondition = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateCondition.js"() { init_debug(); init_types2(); init_callFunction(); evaluateCondition = /* @__PURE__ */ __name((condition, options) => { const { assign } = condition; if (assign && assign in options.referenceRecord) { throw new EndpointError(`'${assign}' is already defined in Reference Record.`); } const value = callFunction(condition, options); options.logger?.debug?.(`${debugId} evaluateCondition: ${toDebugString(condition)} = ${toDebugString(value)}`); const result = value === "" ? true : !!value; if (assign != null) { return { result, toAssign: { name: assign, value } }; } return { result }; }, "evaluateCondition"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getEndpointHeaders.js var getEndpointHeaders; var init_getEndpointHeaders = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getEndpointHeaders.js"() { init_types2(); init_evaluateExpression(); getEndpointHeaders = /* @__PURE__ */ __name((headers, options) => Object.entries(headers ?? {}).reduce((acc, [headerKey, headerVal]) => { acc[headerKey] = headerVal.map((headerValEntry) => { const processedExpr = evaluateExpression(headerValEntry, "Header value entry", options); if (typeof processedExpr !== "string") { throw new EndpointError(`Header '${headerKey}' value '${processedExpr}' is not a string`); } return processedExpr; }); return acc; }, {}), "getEndpointHeaders"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getEndpointProperties.js var getEndpointProperties, getEndpointProperty, group2; var init_getEndpointProperties = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getEndpointProperties.js"() { init_types2(); init_evaluateTemplate(); getEndpointProperties = /* @__PURE__ */ __name((properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => { acc[propertyKey] = group2.getEndpointProperty(propertyVal, options); return acc; }, {}), "getEndpointProperties"); getEndpointProperty = /* @__PURE__ */ __name((property, options) => { if (Array.isArray(property)) { return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options)); } switch (typeof property) { case "string": return evaluateTemplate(property, options); case "object": if (property === null) { throw new EndpointError(`Unexpected endpoint property: ${property}`); } return group2.getEndpointProperties(property, options); case "boolean": return property; default: throw new EndpointError(`Unexpected endpoint property type: ${typeof property}`); } }, "getEndpointProperty"); group2 = { getEndpointProperty, getEndpointProperties }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getEndpointUrl.js var getEndpointUrl; var init_getEndpointUrl = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getEndpointUrl.js"() { init_types2(); init_evaluateExpression(); getEndpointUrl = /* @__PURE__ */ __name((endpointUrl, options) => { const expression = evaluateExpression(endpointUrl, "Endpoint URL", options); if (typeof expression === "string") { try { return new URL(expression); } catch (error2) { console.error(`Failed to construct URL with ${expression}`, error2); throw error2; } } throw new EndpointError(`Endpoint URL must be a string, got ${typeof expression}`); }, "getEndpointUrl"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/decideEndpoint.js var RESULT, decideEndpoint; var init_decideEndpoint = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/decideEndpoint.js"() { init_types2(); init_evaluateCondition(); init_evaluateExpression(); init_getEndpointHeaders(); init_getEndpointProperties(); init_getEndpointUrl(); RESULT = 1e8; decideEndpoint = /* @__PURE__ */ __name((bdd, options) => { const { nodes, root, results, conditions } = bdd; let ref = root; const referenceRecord = {}; const closure = { referenceRecord, endpointParams: options.endpointParams, logger: options.logger }; while (ref !== 1 && ref !== -1 && ref < RESULT) { const node_i = 3 * (Math.abs(ref) - 1); const [condition_i, highRef, lowRef] = [nodes[node_i], nodes[node_i + 1], nodes[node_i + 2]]; const [fn, argv, assign] = conditions[condition_i]; const evaluation = evaluateCondition({ fn, assign, argv }, closure); if (evaluation.toAssign) { const { name, value } = evaluation.toAssign; referenceRecord[name] = value; } ref = ref >= 0 === evaluation.result ? highRef : lowRef; } if (ref >= RESULT) { const result = results[ref - RESULT]; if (result[0] === -1) { const [, errorExpression] = result; throw new EndpointError(evaluateExpression(errorExpression, "Error", closure)); } const [url, properties, headers] = result; return { url: getEndpointUrl(url, closure), properties: getEndpointProperties(properties, closure), headers: getEndpointHeaders(headers ?? {}, closure) }; } throw new EndpointError(`No matching endpoint.`); }, "decideEndpoint"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateConditions.js var evaluateConditions; var init_evaluateConditions = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateConditions.js"() { init_debug(); init_evaluateCondition(); evaluateConditions = /* @__PURE__ */ __name((conditions = [], options) => { const conditionsReferenceRecord = {}; const conditionOptions = { ...options, referenceRecord: { ...options.referenceRecord } }; let didAssign = false; for (const condition of conditions) { const { result, toAssign } = evaluateCondition(condition, conditionOptions); if (!result) { return { result }; } if (toAssign) { didAssign = true; conditionsReferenceRecord[toAssign.name] = toAssign.value; conditionOptions.referenceRecord[toAssign.name] = toAssign.value; options.logger?.debug?.(`${debugId} assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`); } } if (didAssign) { return { result: true, referenceRecord: conditionsReferenceRecord }; } return { result: true }; }, "evaluateConditions"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateEndpointRule.js var evaluateEndpointRule; var init_evaluateEndpointRule = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateEndpointRule.js"() { init_debug(); init_evaluateConditions(); init_getEndpointHeaders(); init_getEndpointProperties(); init_getEndpointUrl(); evaluateEndpointRule = /* @__PURE__ */ __name((endpointRule, options) => { const { conditions, endpoint } = endpointRule; const { result, referenceRecord } = evaluateConditions(conditions, options); if (!result) { return; } const endpointRuleOptions = referenceRecord ? { ...options, referenceRecord: { ...options.referenceRecord, ...referenceRecord } } : options; const { url, properties, headers } = endpoint; options.logger?.debug?.(`${debugId} Resolving endpoint from template: ${toDebugString(endpoint)}`); const endpointToReturn = { url: getEndpointUrl(url, endpointRuleOptions) }; if (headers != null) { endpointToReturn.headers = getEndpointHeaders(headers, endpointRuleOptions); } if (properties != null) { endpointToReturn.properties = getEndpointProperties(properties, endpointRuleOptions); } return endpointToReturn; }, "evaluateEndpointRule"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateErrorRule.js var evaluateErrorRule; var init_evaluateErrorRule = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateErrorRule.js"() { init_types2(); init_evaluateConditions(); init_evaluateExpression(); evaluateErrorRule = /* @__PURE__ */ __name((errorRule, options) => { const { conditions, error: error2 } = errorRule; const { result, referenceRecord } = evaluateConditions(conditions, options); if (!result) { return; } const errorRuleOptions = referenceRecord ? { ...options, referenceRecord: { ...options.referenceRecord, ...referenceRecord } } : options; throw new EndpointError(evaluateExpression(error2, "Error", errorRuleOptions)); }, "evaluateErrorRule"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateRules.js var evaluateRules, evaluateTreeRule, group3; var init_evaluateRules = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateRules.js"() { init_types2(); init_evaluateConditions(); init_evaluateEndpointRule(); init_evaluateErrorRule(); evaluateRules = /* @__PURE__ */ __name((rules, options) => { for (const rule of rules) { if (rule.type === "endpoint") { const endpointOrUndefined = evaluateEndpointRule(rule, options); if (endpointOrUndefined) { return endpointOrUndefined; } } else if (rule.type === "error") { evaluateErrorRule(rule, options); } else if (rule.type === "tree") { const endpointOrUndefined = group3.evaluateTreeRule(rule, options); if (endpointOrUndefined) { return endpointOrUndefined; } } else { throw new EndpointError(`Unknown endpoint rule: ${rule}`); } } throw new EndpointError(`Rules evaluation failed`); }, "evaluateRules"); evaluateTreeRule = /* @__PURE__ */ __name((treeRule, options) => { const { conditions, rules } = treeRule; const { result, referenceRecord } = evaluateConditions(conditions, options); if (!result) { return; } const treeRuleOptions = referenceRecord ? { ...options, referenceRecord: { ...options.referenceRecord, ...referenceRecord } } : options; return group3.evaluateRules(rules, treeRuleOptions); }, "evaluateTreeRule"); group3 = { evaluateRules, evaluateTreeRule }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/index.js var init_utils = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/index.js"() { init_evaluateRules(); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/resolveEndpoint.js var resolveEndpoint; var init_resolveEndpoint = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/resolveEndpoint.js"() { init_transport(); init_debug(); init_types2(); init_utils(); resolveEndpoint = /* @__PURE__ */ __name((ruleSetObject, options) => { const { endpointParams, logger: logger2 } = options; const { parameters, rules } = ruleSetObject; options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`); for (const paramKey in parameters) { if (!hasOwn(parameters, paramKey)) continue; const parameter = parameters[paramKey]; const endpointParam = endpointParams[paramKey]; if (endpointParam == null && parameter.default != null) { endpointParams[paramKey] = parameter.default; continue; } if (parameter.required && endpointParam == null) { throw new EndpointError(`Missing required parameter: '${paramKey}'`); } } const endpoint = evaluateRules(rules, { endpointParams, logger: logger2, referenceRecord: {} }); options.logger?.debug?.(`${debugId} Resolved endpoint: ${toDebugString(endpoint)}`); return endpoint; }, "resolveEndpoint"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/resolveEndpointRequiredConfig.js var resolveEndpointRequiredConfig; var init_resolveEndpointRequiredConfig = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/resolveEndpointRequiredConfig.js"() { resolveEndpointRequiredConfig = /* @__PURE__ */ __name((input) => { const { endpoint } = input; if (endpoint === void 0) { input.endpoint = async () => { throw new Error("@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint."); }; } return input; }, "resolveEndpointRequiredConfig"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/index.js var endpoints_exports = {}; __export(endpoints_exports, { BinaryDecisionDiagram: () => BinaryDecisionDiagram, EndpointCache: () => EndpointCache, EndpointError: () => EndpointError, customEndpointFunctions: () => customEndpointFunctions, decideEndpoint: () => decideEndpoint, endpointMiddleware: () => endpointMiddleware, endpointMiddlewareOptions: () => endpointMiddlewareOptions, getEndpointFromInstructions: () => getEndpointFromInstructions, getEndpointPlugin: () => getEndpointPlugin, isIpAddress: () => isIpAddress, isValidHostLabel: () => isValidHostLabel, middlewareEndpointToEndpointV1: () => toEndpointV1, resolveEndpoint: () => resolveEndpoint, resolveEndpointConfig: () => resolveEndpointConfig, resolveEndpointRequiredConfig: () => resolveEndpointRequiredConfig, resolveParams: () => resolveParams, toEndpointV1: () => toEndpointV1 }); var getEndpointFromInstructions, resolveEndpointConfig, endpointMiddleware, getEndpointPlugin; var init_endpoints = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/endpoints/index.js"() { init_getEndpointFromConfig(); init_getEndpointFromInstructions(); init_endpointMiddleware(); init_getEndpointPlugin(); init_resolveEndpointConfig(); init_transport(); init_BinaryDecisionDiagram(); init_EndpointCache(); init_decideEndpoint(); init_isIpAddress(); init_transport(); init_customEndpointFunctions(); init_resolveEndpoint(); init_types2(); init_getEndpointFromInstructions(); init_toEndpointV12(); init_getEndpointPlugin(); init_resolveEndpointRequiredConfig(); getEndpointFromInstructions = bindGetEndpointFromInstructions(getEndpointFromConfig); resolveEndpointConfig = bindResolveEndpointConfig(getEndpointFromConfig); endpointMiddleware = bindEndpointMiddleware(getEndpointFromConfig); getEndpointPlugin = bindGetEndpointPlugin(getEndpointFromConfig); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/serializerMiddleware.js var serializerMiddleware; var init_serializerMiddleware = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/serializerMiddleware.js"() { init_endpoints(); serializerMiddleware = /* @__PURE__ */ __name((options, serializer) => (next, context) => async (args) => { const endpointConfig = options; const endpoint = context.endpointV2 ? async () => toEndpointV1(context.endpointV2) : endpointConfig.endpoint; if (!endpoint) { throw new Error("No valid endpoint provider available."); } const request = await serializer(args.input, { ...options, endpoint }); return next({ ...args, request }); }, "serializerMiddleware"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/serdePlugin.js function getSerdePlugin(config, serializer, deserializer) { return { applyToStack: /* @__PURE__ */ __name((commandStack) => { commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption2); commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption3); }, "applyToStack") }; } var deserializerMiddlewareOption2, serializerMiddlewareOption3; var init_serdePlugin = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/serdePlugin.js"() { init_deserializerMiddleware(); init_serializerMiddleware(); deserializerMiddlewareOption2 = { name: "deserializerMiddleware", step: "deserialize", tags: ["DESERIALIZER"], override: true }; serializerMiddlewareOption3 = { name: "serializerMiddleware", step: "serialize", tags: ["SERIALIZER"], override: true }; __name(getSerdePlugin, "getSerdePlugin"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/hash-node/hash-node.js import { createHash as createHash2, createHmac } from "node:crypto"; function castSourceData(toCast, encoding) { if (Buffer.isBuffer(toCast)) { return toCast; } if (typeof toCast === "string") { return fromString(toCast, encoding); } if (ArrayBuffer.isView(toCast)) { return fromArrayBuffer(toCast.buffer, toCast.byteOffset, toCast.byteLength); } return fromArrayBuffer(toCast); } var Hash; var init_hash_node = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/hash-node/hash-node.js"() { init_buffer_from(); init_toUint8Array(); Hash = class { static { __name(this, "Hash"); } algorithmIdentifier; secret; hash; constructor(algorithmIdentifier, secret) { this.algorithmIdentifier = algorithmIdentifier; this.secret = secret; this.reset(); } update(toHash, encoding) { this.hash.update(toUint8Array(castSourceData(toHash, encoding))); } digest() { return Promise.resolve(this.hash.digest()); } reset() { this.hash = this.secret ? createHmac(this.algorithmIdentifier, castSourceData(this.secret)) : createHash2(this.algorithmIdentifier); } }; __name(castSourceData, "castSourceData"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/ChecksumStream.js import { Readable } from "node:stream"; var ChecksumStream; var init_ChecksumStream = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/ChecksumStream.js"() { init_toBase64(); ChecksumStream = class extends Readable { static { __name(this, "ChecksumStream"); } expectedChecksum; checksumSourceLocation; checksum; source; base64Encoder; constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) { super(); if (typeof source.pipe !== "function") { throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`); } this.source = source; this.base64Encoder = base64Encoder ?? toBase64; this.expectedChecksum = expectedChecksum; this.checksum = checksum; this.checksumSourceLocation = checksumSourceLocation; this.source.on("data", this.onSourceData); this.source.on("end", this.onSourceEnd); this.source.on("error", this.onSourceError); this.source.on("close", this.onSourceClose); this.source.pause(); } onSourceData = /* @__PURE__ */ __name((chunk) => { if (this.destroyed) { return; } try { this.checksum.update(chunk); } catch (e) { this.destroy(e); return; } if (!this.push(chunk)) { this.source.pause(); } }, "onSourceData"); onSourceEnd = /* @__PURE__ */ __name(async () => { if (this.destroyed) { return; } try { const digest2 = await this.checksum.digest(); const received = this.base64Encoder(digest2); if (this.expectedChecksum !== received) { this.destroy(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${received}" in response header "${this.checksumSourceLocation}".`)); return; } } catch (e) { this.destroy(e); return; } this.push(null); }, "onSourceEnd"); onSourceError = /* @__PURE__ */ __name((error2) => { this.destroy(error2); }, "onSourceError"); onSourceClose = /* @__PURE__ */ __name(() => { if (!this.destroyed && !this.source.readableEnded) { this.destroy(new Error("Connection lost or stream closed before all data was received.")); } }, "onSourceClose"); _read(_size) { this.source.resume(); } _destroy(error2, callback) { this.source?.removeListener("data", this.onSourceData); this.source?.removeListener("end", this.onSourceEnd); this.source?.removeListener("error", this.onSourceError); this.source?.removeListener("close", this.onSourceClose); this.source?.destroy(); callback(error2); } }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-type-check.js var isReadableStream, isBlob; var init_stream_type_check = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-type-check.js"() { isReadableStream = /* @__PURE__ */ __name((stream) => typeof ReadableStream === "function" && (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream), "isReadableStream"); isBlob = /* @__PURE__ */ __name((blob) => { return typeof Blob === "function" && (blob?.constructor?.name === Blob.name || blob instanceof Blob); }, "isBlob"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/fromUtf8.browser.js var fromUtf82; var init_fromUtf8_browser = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/fromUtf8.browser.js"() { fromUtf82 = /* @__PURE__ */ __name((input) => new TextEncoder().encode(input), "fromUtf8"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-base64/constants-for-browser.js var chars, alphabetByEncoding, alphabetByValue, bitsPerLetter, bitsPerByte, maxLetterValue; var init_constants_for_browser = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-base64/constants-for-browser.js"() { chars = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`; alphabetByEncoding = Object.entries(chars).reduce((acc, [i, c]) => { acc[c] = Number(i); return acc; }, {}); alphabetByValue = chars.split(""); bitsPerLetter = 6; bitsPerByte = 8; maxLetterValue = 63; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-base64/toBase64.browser.js function toBase642(_input) { let input; if (typeof _input === "string") { input = fromUtf82(_input); } else { input = _input; } const isArrayLike = typeof input === "object" && typeof input.length === "number"; const isUint8Array = typeof input === "object" && typeof input.byteOffset === "number" && typeof input.byteLength === "number"; if (!isArrayLike && !isUint8Array) { throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array."); } let str = ""; for (let i = 0; i < input.length; i += 3) { let bits = 0; let bitLength = 0; for (let j = i, limit = Math.min(i + 3, input.length); j < limit; j++) { bits |= input[j] << (limit - j - 1) * bitsPerByte; bitLength += bitsPerByte; } const bitClusterCount = Math.ceil(bitLength / bitsPerLetter); bits <<= bitClusterCount * bitsPerLetter - bitLength; for (let k = 1; k <= bitClusterCount; k++) { const offset = (bitClusterCount - k) * bitsPerLetter; str += alphabetByValue[(bits & maxLetterValue << offset) >> offset]; } str += "==".slice(0, 4 - bitClusterCount); } return str; } var init_toBase64_browser = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-base64/toBase64.browser.js"() { init_fromUtf8_browser(); init_constants_for_browser(); __name(toBase642, "toBase64"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/ChecksumStream.browser.js var ReadableStreamRef, ChecksumStream2; var init_ChecksumStream_browser = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/ChecksumStream.browser.js"() { ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function() { }; ChecksumStream2 = class extends ReadableStreamRef { static { __name(this, "ChecksumStream"); } }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/createChecksumStream.browser.js var createChecksumStream; var init_createChecksumStream_browser = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/createChecksumStream.browser.js"() { init_toBase64_browser(); init_stream_type_check(); init_ChecksumStream_browser(); createChecksumStream = /* @__PURE__ */ __name(({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) => { if (!isReadableStream(source)) { throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`); } const encoder = base64Encoder ?? toBase642; if (typeof TransformStream !== "function") { throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream."); } const transform = new TransformStream({ start() { }, async transform(chunk, controller) { checksum.update(chunk); controller.enqueue(chunk); }, async flush(controller) { const digest2 = await checksum.digest(); const received = encoder(digest2); if (expectedChecksum !== received) { const error2 = new Error(`Checksum mismatch: expected "${expectedChecksum}" but received "${received}" in response header "${checksumSourceLocation}".`); controller.error(error2); } else { controller.terminate(); } } }); source.pipeThrough(transform); const readable = transform.readable; Object.setPrototypeOf(readable, ChecksumStream2.prototype); return readable; }, "createChecksumStream"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/createChecksumStream.js function createChecksumStream2(init) { if (typeof ReadableStream === "function" && isReadableStream(init.source)) { return createChecksumStream(init); } return new ChecksumStream(init); } var init_createChecksumStream = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/createChecksumStream.js"() { init_stream_type_check(); init_ChecksumStream(); init_createChecksumStream_browser(); __name(createChecksumStream2, "createChecksumStream"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/ByteArrayCollector.js var ByteArrayCollector; var init_ByteArrayCollector = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/ByteArrayCollector.js"() { ByteArrayCollector = class { static { __name(this, "ByteArrayCollector"); } allocByteArray; byteLength = 0; byteArrays = []; constructor(allocByteArray) { this.allocByteArray = allocByteArray; } push(byteArray) { this.byteArrays.push(byteArray); this.byteLength += byteArray.byteLength; } flush() { if (this.byteArrays.length === 1) { const bytes = this.byteArrays[0]; this.reset(); return bytes; } const aggregation = this.allocByteArray(this.byteLength); let cursor = 0; for (let i = 0; i < this.byteArrays.length; ++i) { const bytes = this.byteArrays[i]; aggregation.set(bytes, cursor); cursor += bytes.byteLength; } this.reset(); return aggregation; } reset() { this.byteArrays = []; this.byteLength = 0; } }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/createBufferedReadable.browser.js function createBufferedReadableStream(upstream, size, logger2) { const reader = upstream.getReader(); let streamBufferingLoggedWarning = false; let bytesSeen = 0; const buffers = ["", new ByteArrayCollector((size2) => new Uint8Array(size2))]; let mode = -1; const pull = /* @__PURE__ */ __name(async (controller) => { const { value, done } = await reader.read(); const chunk = value; if (done) { if (mode !== -1) { const remainder = flush(buffers, mode); if (sizeOf(remainder) > 0) { controller.enqueue(remainder); } } controller.close(); } else { const chunkMode = modeOf(chunk, false); if (mode !== chunkMode) { if (mode >= 0) { controller.enqueue(flush(buffers, mode)); } mode = chunkMode; } if (mode === -1) { controller.enqueue(chunk); return; } const chunkSize = sizeOf(chunk); bytesSeen += chunkSize; const bufferSize = sizeOf(buffers[mode]); if (chunkSize >= size && bufferSize === 0) { controller.enqueue(chunk); } else { const newSize = merge(buffers, mode, chunk); if (!streamBufferingLoggedWarning && bytesSeen > size * 2) { streamBufferingLoggedWarning = true; logger2?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`); } if (newSize >= size) { controller.enqueue(flush(buffers, mode)); } else { await pull(controller); } } } }, "pull"); return new ReadableStream({ pull }); } function merge(buffers, mode, chunk) { switch (mode) { case 0: buffers[0] += chunk; return sizeOf(buffers[0]); case 1: case 2: buffers[mode].push(chunk); return sizeOf(buffers[mode]); } } function flush(buffers, mode) { switch (mode) { case 0: const s = buffers[0]; buffers[0] = ""; return s; case 1: case 2: return buffers[mode].flush(); } throw new Error(`@smithy/util-stream - invalid index ${mode} given to flush()`); } function sizeOf(chunk) { return chunk?.byteLength ?? chunk?.length ?? 0; } function modeOf(chunk, allowBuffer = true) { if (allowBuffer && typeof Buffer !== "undefined" && chunk instanceof Buffer) { return 2; } if (chunk instanceof Uint8Array) { return 1; } if (typeof chunk === "string") { return 0; } return -1; } var init_createBufferedReadable_browser = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/createBufferedReadable.browser.js"() { init_ByteArrayCollector(); __name(createBufferedReadableStream, "createBufferedReadableStream"); __name(merge, "merge"); __name(flush, "flush"); __name(sizeOf, "sizeOf"); __name(modeOf, "modeOf"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/createBufferedReadable.js import { Readable as Readable2 } from "node:stream"; function createBufferedReadable(upstream, size, logger2) { if (isReadableStream(upstream)) { return createBufferedReadableStream(upstream, size, logger2); } const downstream = new Readable2({ read() { } }); let streamBufferingLoggedWarning = false; let bytesSeen = 0; const buffers = [ "", new ByteArrayCollector((size2) => new Uint8Array(size2)), new ByteArrayCollector((size2) => Buffer.from(new Uint8Array(size2))) ]; let mode = -1; upstream.on("data", (chunk) => { const chunkMode = modeOf(chunk, true); if (mode !== chunkMode) { if (mode >= 0) { downstream.push(flush(buffers, mode)); } mode = chunkMode; } if (mode === -1) { downstream.push(chunk); return; } const chunkSize = sizeOf(chunk); bytesSeen += chunkSize; const bufferSize = sizeOf(buffers[mode]); if (chunkSize >= size && bufferSize === 0) { downstream.push(chunk); } else { const newSize = merge(buffers, mode, chunk); if (!streamBufferingLoggedWarning && bytesSeen > size * 2) { streamBufferingLoggedWarning = true; logger2?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`); } if (newSize >= size) { downstream.push(flush(buffers, mode)); } } }); upstream.on("end", () => { if (mode !== -1) { const remainder = flush(buffers, mode); if (sizeOf(remainder) > 0) { downstream.push(remainder); } } downstream.push(null); }); return downstream; } var init_createBufferedReadable = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/createBufferedReadable.js"() { init_ByteArrayCollector(); init_createBufferedReadable_browser(); init_stream_type_check(); __name(createBufferedReadable, "createBufferedReadable"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.browser.js var getAwsChunkedEncodingStream; var init_getAwsChunkedEncodingStream_browser = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.browser.js"() { getAwsChunkedEncodingStream = /* @__PURE__ */ __name((readableStream, options) => { const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; const checksumRequired = base64Encoder !== void 0 && bodyLengthChecker !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0; const digest2 = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : void 0; Promise.resolve(digest2).catch(() => { }); const reader = readableStream.getReader(); return new ReadableStream({ async pull(controller) { const { value, done } = await reader.read(); if (done) { controller.enqueue(`0\r `); if (checksumRequired) { const checksum = base64Encoder(await digest2); controller.enqueue(`${checksumLocationName}:${checksum}\r `); controller.enqueue(`\r `); } controller.close(); } else { controller.enqueue(`${(bodyLengthChecker(value) || 0).toString(16)}\r ${value}\r `); } } }); }, "getAwsChunkedEncodingStream"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.js import { Readable as Readable3 } from "node:stream"; function getAwsChunkedEncodingStream2(stream, options) { const readable = stream; const readableStream = stream; if (isReadableStream(readableStream)) { return getAwsChunkedEncodingStream(readableStream, options); } const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; const checksumRequired = base64Encoder !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0; const digest2 = checksumRequired ? streamHasher(checksumAlgorithmFn, readable) : void 0; Promise.resolve(digest2).catch(() => { }); const awsChunkedEncodingStream = new Readable3({ read() { readable.resume(); } }); readable.on("data", (data) => { const length = bodyLengthChecker(data) || 0; if (length === 0) { return; } awsChunkedEncodingStream.push(`${length.toString(16)}\r `); awsChunkedEncodingStream.push(data); if (!awsChunkedEncodingStream.push("\r\n")) { readable.pause(); } }); readable.on("error", (err) => { awsChunkedEncodingStream.destroy(err); }); readable.pause(); readable.on("end", async () => { try { awsChunkedEncodingStream.push(`0\r `); if (checksumRequired) { const checksum = base64Encoder(await digest2); awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r `); awsChunkedEncodingStream.push(`\r `); } awsChunkedEncodingStream.push(null); } catch (err) { awsChunkedEncodingStream.destroy(err); } }); return awsChunkedEncodingStream; } var init_getAwsChunkedEncodingStream = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.js"() { init_getAwsChunkedEncodingStream_browser(); init_stream_type_check(); __name(getAwsChunkedEncodingStream2, "getAwsChunkedEncodingStream"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/headStream.browser.js async function headStream(stream, bytes) { let byteLengthCounter = 0; const chunks = []; const reader = stream.getReader(); let isDone = false; while (!isDone) { const { done, value } = await reader.read(); if (value) { chunks.push(value); byteLengthCounter += value?.byteLength ?? 0; } if (byteLengthCounter >= bytes) { break; } isDone = done; } reader.releaseLock(); const collected = new Uint8Array(Math.min(bytes, byteLengthCounter)); let offset = 0; for (const chunk of chunks) { if (chunk.byteLength > collected.byteLength - offset) { collected.set(chunk.subarray(0, collected.byteLength - offset), offset); break; } else { collected.set(chunk, offset); } offset += chunk.length; } return collected; } var init_headStream_browser = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/headStream.browser.js"() { __name(headStream, "headStream"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/headStream.js import { Writable } from "node:stream"; var headStream2, Collector; var init_headStream = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/headStream.js"() { init_concatBytes(); init_headStream_browser(); init_stream_type_check(); headStream2 = /* @__PURE__ */ __name((stream, bytes) => { if (isReadableStream(stream)) { return headStream(stream, bytes); } return new Promise((resolve, reject) => { const collector = new Collector(); collector.limit = bytes; stream.pipe(collector); stream.on("error", (err) => { collector.end(); reject(err); }); collector.on("error", reject); collector.on("finish", function() { const bytes2 = concatBytes(this.buffers); resolve(bytes2); }); }); }, "headStream"); Collector = class extends Writable { static { __name(this, "Collector"); } buffers = []; limit = Infinity; bytesBuffered = 0; _write(chunk, encoding, callback) { this.buffers.push(chunk); this.bytesBuffered += chunk.byteLength ?? 0; if (this.bytesBuffered >= this.limit) { const excess = this.bytesBuffered - this.limit; const tailBuffer = this.buffers[this.buffers.length - 1]; this.buffers[this.buffers.length - 1] = tailBuffer.subarray(0, tailBuffer.byteLength - excess); this.emit("finish"); } callback(); } }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUtf8.browser.js var toUtf82; var init_toUtf8_browser = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUtf8.browser.js"() { toUtf82 = /* @__PURE__ */ __name((input) => { if (typeof input === "string") { return input; } 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."); } return new TextDecoder("utf-8").decode(input); }, "toUtf8"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.browser.js async function collectBlob(blob) { return blob.arrayBuffer().then((ab) => new Uint8Array(ab)); } async function collectReadableStream(stream) { const chunks = []; const reader = stream.getReader(); let length = 0; while (true) { const { done, value } = await reader.read(); if (value) { chunks.push(value); length += value.length; } if (done) { break; } } return concatBytes(chunks, length); } var streamCollector; var init_stream_collector_browser = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.browser.js"() { init_concatBytes(); init_stream_type_check(); streamCollector = /* @__PURE__ */ __name(async (stream) => { if (isBlob(stream)) { return collectBlob(stream); } return collectReadableStream(stream); }, "streamCollector"); __name(collectBlob, "collectBlob"); __name(collectReadableStream, "collectReadableStream"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/sdk-stream-mixin.browser.js var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED, sdkStreamMixin, isBlobInstance; var init_sdk_stream_mixin_browser = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/sdk-stream-mixin.browser.js"() { init_toBase64_browser(); init_hex_encoding(); init_toUtf8_browser(); init_stream_collector_browser(); init_stream_type_check(); ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; sdkStreamMixin = /* @__PURE__ */ __name((stream) => { if (!isBlobInstance(stream) && !isReadableStream(stream)) { const name = stream?.__proto__?.constructor?.name || stream; throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`); } let transformed = false; const transformToByteArray = /* @__PURE__ */ __name(async () => { if (transformed) { throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); } transformed = true; return await streamCollector(stream); }, "transformToByteArray"); const blobToWebStream = /* @__PURE__ */ __name((blob) => { 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"); } return blob.stream(); }, "blobToWebStream"); return Object.assign(stream, { transformToByteArray, transformToString: /* @__PURE__ */ __name(async (encoding) => { const buf = await transformToByteArray(); if (encoding === "base64") { return toBase642(buf); } else if (encoding === "hex") { return toHex(buf); } else if (encoding === void 0 || encoding === "utf8" || encoding === "utf-8") { return toUtf82(buf); } else if (typeof TextDecoder === "function") { return new TextDecoder(encoding).decode(buf); } else { throw new Error("TextDecoder is not available, please make sure polyfill is provided."); } }, "transformToString"), transformToWebStream: /* @__PURE__ */ __name(() => { if (transformed) { throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); } transformed = true; if (isBlobInstance(stream)) { return blobToWebStream(stream); } else if (isReadableStream(stream)) { return stream; } else { throw new Error(`Cannot transform payload to web stream, got ${stream}`); } }, "transformToWebStream") }); }, "sdkStreamMixin"); isBlobInstance = /* @__PURE__ */ __name((stream) => typeof Blob === "function" && stream instanceof Blob, "isBlobInstance"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.js import { Writable as Writable2 } from "node:stream"; var streamCollector2, Collector2; var init_stream_collector = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.js"() { init_concatBytes(); init_stream_collector_browser(); init_stream_type_check(); streamCollector2 = /* @__PURE__ */ __name((stream) => { if (isBlob(stream)) { return collectBlob(stream); } if (isReadableStream(stream)) { return collectReadableStream(stream); } return new Promise((resolve, reject) => { const collector = new Collector2(); const nodeStream = stream; nodeStream.pipe(collector); nodeStream.on("error", (err) => { collector.end(); reject(err); }); collector.on("error", reject); collector.on("finish", function() { const bytes = concatBytes(this.bufferedBytes); resolve(bytes); }); }); }, "streamCollector"); Collector2 = class extends Writable2 { static { __name(this, "Collector"); } bufferedBytes = []; _write(chunk, encoding, callback) { this.bufferedBytes.push(chunk); callback(); } }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/sdk-stream-mixin.js import { Readable as Readable4 } from "node:stream"; var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED2, sdkStreamMixin2; var init_sdk_stream_mixin = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/sdk-stream-mixin.js"() { init_buffer_from(); init_sdk_stream_mixin_browser(); init_stream_collector(); ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED2 = "The stream has already been transformed."; sdkStreamMixin2 = /* @__PURE__ */ __name((stream) => { if (!(stream instanceof Readable4)) { try { return sdkStreamMixin(stream); } catch (ignored) { const name = stream?.__proto__?.constructor?.name || stream; throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`); } } let transformed = false; const transformToByteArray = /* @__PURE__ */ __name(async () => { if (transformed) { throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED2); } transformed = true; return await streamCollector2(stream); }, "transformToByteArray"); return Object.assign(stream, { transformToByteArray, transformToString: /* @__PURE__ */ __name(async (encoding) => { const buf = await transformToByteArray(); if (encoding === void 0 || Buffer.isEncoding(encoding)) { return fromArrayBuffer(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding); } else { const decoder = new TextDecoder(encoding); return decoder.decode(buf); } }, "transformToString"), transformToWebStream: /* @__PURE__ */ __name(() => { if (transformed) { throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED2); } if (stream.readableFlowing !== null) { throw new Error("The stream has been consumed by other callbacks."); } if (typeof Readable4.toWeb !== "function") { throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available."); } transformed = true; return Readable4.toWeb(stream); }, "transformToWebStream") }); }, "sdkStreamMixin"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/splitStream.browser.js async function splitStream(stream) { if (typeof stream.stream === "function") { stream = stream.stream(); } const readableStream = stream; return readableStream.tee(); } var init_splitStream_browser = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/splitStream.browser.js"() { __name(splitStream, "splitStream"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/splitStream.js import { PassThrough } from "node:stream"; async function splitStream2(stream) { if (isReadableStream(stream) || isBlob(stream)) { return splitStream(stream); } const stream1 = new PassThrough(); const stream2 = new PassThrough(); stream.pipe(stream1); stream.pipe(stream2); return [stream1, stream2]; } var init_splitStream = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/splitStream.js"() { init_splitStream_browser(); init_stream_type_check(); __name(splitStream2, "splitStream"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/index.js var serde_exports = {}; __export(serde_exports, { ChecksumStream: () => ChecksumStream, Hash: () => Hash, LazyJsonString: () => LazyJsonString, NumericValue: () => NumericValue, Uint8ArrayBlobAdapter: () => Uint8ArrayBlobAdapter, _parseEpochTimestamp: () => _parseEpochTimestamp, _parseRfc3339DateTimeWithOffset: () => _parseRfc3339DateTimeWithOffset, _parseRfc7231DateTime: () => _parseRfc7231DateTime, calculateBodyLength: () => calculateBodyLength, concatBytes: () => concatBytes, copyDocumentWithTransform: () => copyDocumentWithTransform, createBufferedReadable: () => createBufferedReadable, createChecksumStream: () => createChecksumStream2, dateToUtcString: () => dateToUtcString, deserializerMiddleware: () => deserializerMiddleware, deserializerMiddlewareOption: () => deserializerMiddlewareOption2, expectBoolean: () => expectBoolean, expectByte: () => expectByte, expectFloat32: () => expectFloat32, expectInt: () => expectInt, expectInt32: () => expectInt32, expectLong: () => expectLong, expectNonNull: () => expectNonNull, expectNumber: () => expectNumber, expectObject: () => expectObject, expectShort: () => expectShort, expectString: () => expectString, expectUnion: () => expectUnion, fromArrayBuffer: () => fromArrayBuffer, fromBase64: () => fromBase64, fromHex: () => fromHex, fromString: () => fromString, fromUtf8: () => fromUtf8, generateIdempotencyToken: () => generateIdempotencyToken, getAwsChunkedEncodingStream: () => getAwsChunkedEncodingStream2, getSerdePlugin: () => getSerdePlugin, handleFloat: () => handleFloat, hasOwn: () => hasOwn, headStream: () => headStream2, isArrayBuffer: () => isArrayBuffer, isBlob: () => isBlob, isReadableStream: () => isReadableStream, limitedParseDouble: () => limitedParseDouble, limitedParseFloat: () => limitedParseFloat, limitedParseFloat32: () => limitedParseFloat32, logger: () => logger, nv: () => nv, parseBoolean: () => parseBoolean, parseEpochTimestamp: () => parseEpochTimestamp, parseRfc3339DateTime: () => parseRfc3339DateTime, parseRfc3339DateTimeWithOffset: () => parseRfc3339DateTimeWithOffset, parseRfc7231DateTime: () => parseRfc7231DateTime, quoteHeader: () => quoteHeader, sdkStreamMixin: () => sdkStreamMixin2, serializerMiddleware: () => serializerMiddleware, serializerMiddlewareOption: () => serializerMiddlewareOption3, splitEvery: () => splitEvery, splitHeader: () => splitHeader, splitStream: () => splitStream2, streamCollector: () => streamCollector2, strictParseByte: () => strictParseByte, strictParseDouble: () => strictParseDouble, strictParseFloat: () => strictParseFloat, strictParseFloat32: () => strictParseFloat32, strictParseInt: () => strictParseInt, strictParseInt32: () => strictParseInt32, strictParseLong: () => strictParseLong, strictParseShort: () => strictParseShort, toBase64: () => toBase64, toHex: () => toHex, toUint8Array: () => toUint8Array, toUtf8: () => toUtf8, v4: () => v4 }); import { getRandomValues } from "node:crypto"; var Uint8ArrayBlobAdapter, _getRandomValues, v4, generateIdempotencyToken; var init_serde = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/serde/index.js"() { init_fromBase64(); init_toBase64(); init_Uint8ArrayBlobAdapter(); init_fromUtf8(); init_toUtf8(); init_v4(); init_copyDocumentWithTransform(); init_date_utils(); init_lazy_json(); init_parse_utils(); init_quote_header(); init_schema_date_utils(); init_split_every(); init_split_header(); init_NumericValue(); init_hex_encoding(); init_calculateBodyLength(); init_toUint8Array(); init_concatBytes(); init_buffer_from(); init_is_array_buffer(); init_deserializerMiddleware(); init_serdePlugin(); init_serializerMiddleware(); init_hash_node(); init_ChecksumStream(); init_createChecksumStream(); init_createBufferedReadable(); init_getAwsChunkedEncodingStream(); init_headStream(); init_sdk_stream_mixin(); init_splitStream(); init_stream_type_check(); init_stream_collector(); init_transport(); Uint8ArrayBlobAdapter = class extends bindUint8ArrayBlobAdapter(toUtf8, fromUtf8, toBase64, fromBase64) { static { __name(this, "Uint8ArrayBlobAdapter"); } }; _getRandomValues = getRandomValues; v4 = bindV4(_getRandomValues); generateIdempotencyToken = v4; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/checksum/hash-stream-node/HashCalculator.js import { Writable as Writable3 } from "node:stream"; var HashCalculator; var init_HashCalculator = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/checksum/hash-stream-node/HashCalculator.js"() { init_serde(); HashCalculator = class extends Writable3 { static { __name(this, "HashCalculator"); } hash; constructor(hash, options) { super(options); this.hash = hash; } _write(chunk, encoding, callback) { try { this.hash.update(toUint8Array(chunk)); } catch (err) { return callback(err); } callback(); } }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/checksum/hash-stream-node/fileStreamHasher.js import { createReadStream } from "node:fs"; var fileStreamHasher, isReadStream; var init_fileStreamHasher = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/checksum/hash-stream-node/fileStreamHasher.js"() { init_HashCalculator(); fileStreamHasher = /* @__PURE__ */ __name((hashCtor, fileStream) => new Promise((resolve, reject) => { if (!isReadStream(fileStream)) { reject(new Error("Unable to calculate hash for non-file streams.")); return; } const fileStreamTee = createReadStream(fileStream.path, { start: fileStream.start, end: fileStream.end }); const hash = new hashCtor(); const hashCalculator = new HashCalculator(hash); fileStreamTee.pipe(hashCalculator); fileStreamTee.on("error", (err) => { hashCalculator.end(); reject(err); }); hashCalculator.on("error", reject); hashCalculator.on("finish", function() { hash.digest().then(resolve).catch(reject); }); }), "fileStreamHasher"); isReadStream = /* @__PURE__ */ __name((stream) => typeof stream.path === "string", "isReadStream"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/checksum/hash-stream-node/readableStreamHasher.js var readableStreamHasher; var init_readableStreamHasher = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/checksum/hash-stream-node/readableStreamHasher.js"() { init_HashCalculator(); readableStreamHasher = /* @__PURE__ */ __name((hashCtor, readableStream) => { if (readableStream.readableFlowing !== null) { throw new Error("Unable to calculate hash for flowing readable stream"); } const hash = new hashCtor(); const hashCalculator = new HashCalculator(hash); readableStream.pipe(hashCalculator); return new Promise((resolve, reject) => { readableStream.on("error", (err) => { hashCalculator.end(); reject(err); }); hashCalculator.on("error", reject); hashCalculator.on("finish", () => { hash.digest().then(resolve).catch(reject); }); }); }, "readableStreamHasher"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/checksum/md5/Md5Js.js function compress(state, block) { let a = state[0], b = state[1], c = state[2], d = state[3]; for (let i = 0; i < 64; ++i) { let f, g; if (i < 16) { f = b & c | ~b & d; g = i; } else if (i < 32) { f = d & b | c & ~d; g = (5 * i + 1) % 16; } else if (i < 48) { f = b ^ c ^ d; g = (3 * i + 5) % 16; } else { f = c ^ (b | ~d); g = 7 * i % 16; } const x = block.getUint32(g * 4, true); const tmp = d; d = c; c = b; const s = S[(i >> 4) * 4 + (i & 3)]; const sum = (a + f & M) + (x + T[i] & M) & M; b = b + ((sum << s | sum >>> 32 - s) >>> 0) & M; a = tmp; } state[0] = state[0] + a & M; state[1] = state[1] + b & M; state[2] = state[2] + c & M; state[3] = state[3] + d & M; } var Md5Js, INIT, M, S, T; var init_Md5Js = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/checksum/md5/Md5Js.js"() { init_serde(); Md5Js = class { static { __name(this, "Md5Js"); } digestLength = 16; state = Uint32Array.from(INIT); writeBuffer = new DataView(new ArrayBuffer(64)); bufferLength = 0; bytesHashed = 0; update(sourceData) { const data = toUint8Array(sourceData); let pos = 0; let len = data.byteLength; this.bytesHashed += len; while (len > 0) { this.writeBuffer.setUint8(this.bufferLength++, data[pos++]); --len; if (this.bufferLength === 64) { compress(this.state, this.writeBuffer); this.bufferLength = 0; } } } async digest() { const state = Uint32Array.from(this.state); const buf = new DataView(this.writeBuffer.buffer.slice(0)); let bufLen = this.bufferLength; const bits = this.bytesHashed * 8; buf.setUint8(bufLen++, 128); if (this.bufferLength % 64 >= 56) { for (let i = bufLen; i < 64; ++i) { buf.setUint8(i, 0); } compress(state, buf); bufLen = 0; } for (let i = bufLen; i < 56; ++i) { buf.setUint8(i, 0); } buf.setUint32(56, bits >>> 0, true); buf.setUint32(60, Math.floor(bits / 2 ** 32), true); compress(state, buf); const out = new Uint8Array(16); const view = new DataView(out.buffer); for (let i = 0; i < 4; ++i) { view.setUint32(i * 4, state[i], true); } return out; } reset() { this.state.set(INIT); this.writeBuffer = new DataView(new ArrayBuffer(64)); this.bufferLength = 0; this.bytesHashed = 0; } }; INIT = [1732584193, 4023233417, 2562383102, 271733878]; M = 4294967295; S = Uint8Array.of(7, 12, 17, 22, 5, 9, 14, 20, 4, 11, 16, 23, 6, 10, 15, 21); T = Array.from({ length: 64 }, (_, i) => Math.abs(Math.sin(i + 1)) * 2 ** 32 >>> 0); __name(compress, "compress"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/checksum/md5/Md5Node.js import { createHash as createHash3 } from "node:crypto"; function buildNativeClass() { return class Md5Node { static { __name(this, "Md5Node"); } digestLength = 16; hash = createHash3("md5"); update(data) { this.hash.update(toUint8Array(data)); } async digest() { const buf = this.hash.copy().digest(); return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength); } reset() { this.hash = createHash3("md5"); } }; } var hasNativeCrypto, Md5Node; var init_Md5Node = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/checksum/md5/Md5Node.js"() { init_serde(); init_Md5Js(); hasNativeCrypto = (() => { try { createHash3("md5"); return true; } catch { return false; } })(); Md5Node = hasNativeCrypto ? buildNativeClass() : Md5Js; __name(buildNativeClass, "buildNativeClass"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/checksum/crc32/Crc32Js.js var CRC32_TABLE, ONES, Crc32Js; var init_Crc32Js = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/checksum/crc32/Crc32Js.js"() { CRC32_TABLE = new Uint32Array(256); for (let i = 0; i < 256; ++i) { let c = i; for (let j = 0; j < 8; ++j) { c = c & 1 ? 3988292384 ^ c >>> 1 : c >>> 1; } CRC32_TABLE[i] = c >>> 0; } ONES = 4294967295; Crc32Js = class { static { __name(this, "Crc32Js"); } digestLength = 4; checksum = ONES; update(data) { for (let i = 0; i < data.length; ++i) { this.checksum = this.checksum >>> 8 ^ CRC32_TABLE[(this.checksum ^ data[i]) & 255]; } } digestSync() { return (this.checksum ^ ONES) >>> 0; } async digest() { const value = this.digestSync(); const out = new Uint8Array(4); new DataView(out.buffer).setUint32(0, value, false); return out; } reset() { this.checksum = ONES; } }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/checksum/crc32/Crc32Node.js import * as zlib from "node:zlib"; function buildNativeClass2(nativeCrc32) { return class Crc32Node { static { __name(this, "Crc32Node"); } digestLength = 4; value = 0; update(data) { this.value = nativeCrc32(data, this.value); } digestSync() { return this.value >>> 0; } async digest() { const out = new Uint8Array(4); new DataView(out.buffer).setUint32(0, this.digestSync(), false); return out; } reset() { this.value = 0; } }; } var zlibCrc32, Crc32Node; var init_Crc32Node = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/checksum/crc32/Crc32Node.js"() { init_Crc32Js(); zlibCrc32 = typeof zlib.crc32 === "function" ? zlib.crc32 : void 0; Crc32Node = zlibCrc32 ? buildNativeClass2(zlibCrc32) : Crc32Js; __name(buildNativeClass2, "buildNativeClass"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/checksum/sha256/Sha256Js.js var BLOCK, DIGEST_LENGTH, MAX_HASHABLE_LENGTH, Sha256Js, INIT2, K; var init_Sha256Js = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/checksum/sha256/Sha256Js.js"() { init_serde(); BLOCK = 64; DIGEST_LENGTH = 32; MAX_HASHABLE_LENGTH = 2 ** 53 - 1; Sha256Js = class _Sha256Js { static { __name(this, "Sha256Js"); } digestLength = DIGEST_LENGTH; state = Int32Array.from(INIT2); w; buffer = new Uint8Array(64); bufferLength = 0; bytesHashed = 0; finished = false; inner; outer; constructor(secret) { if (secret) { const key = _Sha256Js.normalizeKey(secret); this.inner = new _Sha256Js(); this.outer = new _Sha256Js(); const { inner, outer } = this; const pad = new Uint8Array(BLOCK * 2); for (let i = 0; i < BLOCK; ++i) { pad[i] = 54 ^ key[i]; pad[i + BLOCK] = 92 ^ key[i]; } inner.update(pad.subarray(0, BLOCK)); outer.update(pad.subarray(BLOCK)); } } update(data) { if (this.finished) { throw new Error("Attempted to update an already finished HMAC."); } if (this.inner) { this.inner.update(data); return; } const chunk = toUint8Array(data); let position = 0; let { byteLength } = chunk; this.bytesHashed += byteLength; if (this.bytesHashed * 8 > MAX_HASHABLE_LENGTH) { throw new Error("Cannot hash more than 2^53 - 1 bits"); } while (byteLength > 0) { this.buffer[this.bufferLength++] = chunk[position++]; byteLength--; if (this.bufferLength === BLOCK) { this.hashBuffer(); this.bufferLength = 0; } } } async digest() { const { inner, outer } = this; if (inner && outer) { if (this.finished) { throw new Error("Attempted to digest an already finished HMAC."); } this.finished = true; const innerDigest = inner.digestSync(); outer.update(innerDigest); return outer.digestSync(); } return this.digestSync(); } reset() { this.state = Int32Array.from(INIT2); this.buffer = new Uint8Array(64); this.bufferLength = 0; this.bytesHashed = 0; } digestSync() { const state = this.state.slice(); const buffer = this.buffer.slice(); let bufferLength = this.bufferLength; const bitsHashed = this.bytesHashed * 8; const bufferView = new DataView(buffer.buffer, buffer.byteOffset, buffer.byteLength); bufferView.setUint8(bufferLength++, 128); if ((bufferLength - 1) % BLOCK >= BLOCK - 8) { for (let i = bufferLength; i < BLOCK; ++i) { bufferView.setUint8(i, 0); } this.hashBufferWith(state, buffer); bufferLength = 0; } for (let i = bufferLength; i < BLOCK - 8; ++i) { bufferView.setUint8(i, 0); } bufferView.setUint32(BLOCK - 8, Math.floor(bitsHashed / 4294967296), false); bufferView.setUint32(BLOCK - 4, bitsHashed, false); this.hashBufferWith(state, buffer); const out = new Uint8Array(DIGEST_LENGTH); for (let i = 0; i < 8; ++i) { out[i * 4] = state[i] >>> 24 & 255; out[i * 4 + 1] = state[i] >>> 16 & 255; out[i * 4 + 2] = state[i] >>> 8 & 255; out[i * 4 + 3] = state[i] >>> 0 & 255; } return out; } static normalizeKey(secret) { const key = toUint8Array(secret); if (key.byteLength > BLOCK) { const h = new _Sha256Js(); h.update(key); const out = h.digestSync(); const padded = new Uint8Array(BLOCK); padded.set(out); return padded; } if (key.byteLength < BLOCK) { const padded = new Uint8Array(BLOCK); padded.set(key); return padded; } return key; } hashBuffer() { this.hashBufferWith(this.state, this.buffer); } hashBufferWith(state, buffer) { const w = this.w ??= new Int32Array(64); let s0 = state[0], s1 = state[1], s2 = state[2], s3 = state[3], s4 = state[4], s5 = state[5], s6 = state[6], s7 = state[7]; for (let i = 0; i < BLOCK; ++i) { if (i < 16) { w[i] = (buffer[i * 4] & 255) << 24 | (buffer[i * 4 + 1] & 255) << 16 | (buffer[i * 4 + 2] & 255) << 8 | buffer[i * 4 + 3] & 255; } else { let u = w[i - 2]; const t12 = (u >>> 17 | u << 15) ^ (u >>> 19 | u << 13) ^ u >>> 10; u = w[i - 15]; const t22 = (u >>> 7 | u << 25) ^ (u >>> 18 | u << 14) ^ u >>> 3; w[i] = (t12 + w[i - 7] | 0) + (t22 + w[i - 16] | 0); } const t1 = (((s4 >>> 6 | s4 << 26) ^ (s4 >>> 11 | s4 << 21) ^ (s4 >>> 25 | s4 << 7)) + (s4 & s5 ^ ~s4 & s6) | 0) + (s7 + (K[i] + w[i] | 0) | 0) | 0; const t2 = ((s0 >>> 2 | s0 << 30) ^ (s0 >>> 13 | s0 << 19) ^ (s0 >>> 22 | s0 << 10)) + (s0 & s1 ^ s0 & s2 ^ s1 & s2) | 0; s7 = s6; s6 = s5; s5 = s4; s4 = s3 + t1 | 0; s3 = s2; s2 = s1; s1 = s0; s0 = t1 + t2 | 0; } state[0] += s0; state[1] += s1; state[2] += s2; state[3] += s3; state[4] += s4; state[5] += s5; state[6] += s6; state[7] += s7; } }; INIT2 = new Int32Array([ 1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225 ]); K = new Int32Array([ 1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298 ]); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/checksum/sha256/Sha256Node.js import { createHash as createHash4, createHmac as createHmac2 } from "node:crypto"; function buildNativeClass3() { return class Sha256Node { static { __name(this, "Sha256Node"); } digestLength = 32; secret; hash; isHmac; finished = false; constructor(secret) { this.secret = secret; this.isHmac = !!secret; this.hash = this.createHash(); } update(data) { if (this.finished) { throw new Error("Attempted to update an already finished hash."); } this.hash.update(data); } async digest() { let buf; if (this.isHmac) { this.finished = true; buf = this.hash.digest(); } else { buf = this.hash.copy().digest(); } return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength); } reset() { this.hash = this.createHash(); this.finished = false; } createHash() { return this.secret ? createHmac2("sha256", toBuffer(this.secret)) : createHash4("sha256"); } }; } function toBuffer(data) { if (typeof data === "string") { return data; } if (ArrayBuffer.isView(data)) { return Buffer.from(data.buffer, data.byteOffset, data.byteLength); } return Buffer.from(data); } var hasNativeCrypto2, Sha256Node; var init_Sha256Node = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/checksum/sha256/Sha256Node.js"() { init_Sha256Js(); hasNativeCrypto2 = (() => { try { createHash4("sha256"); return true; } catch { return false; } })(); Sha256Node = hasNativeCrypto2 ? buildNativeClass3() : Sha256Js; __name(buildNativeClass3, "buildNativeClass"); __name(toBuffer, "toBuffer"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/checksum/sha256/Sha256WebCrypto.js var digest, sign, importKey, subtle, MAX_PENDING_BYTES, Sha256WebCrypto; var init_Sha256WebCrypto = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/checksum/sha256/Sha256WebCrypto.js"() { init_serde(); init_Sha256Js(); ({ digest, sign, importKey } = globalThis?.crypto?.subtle ?? {}); subtle = typeof digest === "function" && typeof sign === "function" && typeof importKey === "function" ? globalThis.crypto.subtle : void 0; MAX_PENDING_BYTES = 8 * 1024 * 1024; Sha256WebCrypto = class { static { __name(this, "Sha256WebCrypto"); } digestLength = 32; secret; pending = []; pendingBytes = 0; fallback; finished = false; constructor(secret) { if (secret) { this.secret = toUint8Array(secret); } } update(data) { if (this.finished) { throw new Error("Attempted to update an already finished HMAC."); } if (this.fallback) { this.fallback.update(data); return; } this.pending.push(data.slice()); this.pendingBytes += data.byteLength; if (this.pendingBytes >= MAX_PENDING_BYTES) { this.switchToFallback(); } } async digest() { if (this.fallback) { return this.fallback.digest(); } if (this.secret && this.finished) { throw new Error("Attempted to digest an already finished HMAC."); } const data = concatBytes(this.pending); if (subtle) { if (this.secret) { this.finished = true; const key = await subtle.importKey("raw", this.secret, { name: "HMAC", hash: "SHA-256" }, false, ["sign"]); const sig = await subtle.sign("HMAC", key, data); return new Uint8Array(sig); } const hash = await subtle.digest("SHA-256", data); return new Uint8Array(hash); } const sha256 = new Sha256Js(this.secret); sha256.update(data); return sha256.digest(); } reset() { this.pending = []; this.pendingBytes = 0; this.fallback = void 0; this.finished = false; } switchToFallback() { const sha256Js = new Sha256Js(this.secret); for (const chunk of this.pending) { sha256Js.update(chunk); } this.fallback = sha256Js; this.pending = []; this.pendingBytes = 0; } }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/checksum/index.js var checksum_exports = {}; __export(checksum_exports, { Crc32: () => Crc32Node, Crc32Js: () => Crc32Js, Crc32Node: () => Crc32Node, Md5: () => Md5Node, Md5Js: () => Md5Js, Md5Node: () => Md5Node, Sha256: () => Sha256Node, Sha256Js: () => Sha256Js, Sha256Node: () => Sha256Node, Sha256WebCrypto: () => Sha256WebCrypto, blobHasher: () => blobHasher, blobReader: () => blobReader, fileStreamHasher: () => fileStreamHasher, readableStreamHasher: () => readableStreamHasher }); var init_checksum2 = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/checksum/index.js"() { init_blobHasher(); init_fileStreamHasher(); init_readableStreamHasher(); init_Md5Js(); init_Md5Node(); init_Crc32Js(); init_Crc32Node(); init_Sha256Js(); init_Sha256Node(); init_Sha256WebCrypto(); init_chunked_blob_reader(); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/Int64.js function negate(bytes) { for (let i = 0; i < 8; i++) { bytes[i] ^= 255; } for (let i = 7; i > -1; i--) { bytes[i]++; if (bytes[i] !== 0) break; } } var Int64; var init_Int64 = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/Int64.js"() { init_serde(); Int64 = class _Int64 { static { __name(this, "Int64"); } bytes; constructor(bytes) { this.bytes = bytes; if (bytes.byteLength !== 8) { throw new Error("Int64 buffers must be exactly 8 bytes"); } } static fromNumber(number) { if (number > 9223372036854776e3 || number < -9223372036854776e3) { throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`); } const bytes = new Uint8Array(8); for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) { bytes[i] = remaining; } if (number < 0) { negate(bytes); } return new _Int64(bytes); } valueOf() { const bytes = this.bytes.slice(0); const negative = bytes[0] & 128; if (negative) { negate(bytes); } return parseInt(toHex(bytes), 16) * (negative ? -1 : 1); } toString() { return String(this.valueOf()); } }; __name(negate, "negate"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js var HeaderMarshaller, HEADER_VALUE_TYPE, BOOLEAN_TAG, BYTE_TAG, SHORT_TAG, INT_TAG, LONG_TAG, BINARY_TAG, STRING_TAG, TIMESTAMP_TAG, UUID_TAG, UUID_PATTERN; var init_HeaderMarshaller = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js"() { init_transport(); init_serde(); init_Int64(); HeaderMarshaller = class { static { __name(this, "HeaderMarshaller"); } toUtf8; fromUtf8; constructor(toUtf83, fromUtf83) { this.toUtf8 = toUtf83; this.fromUtf8 = fromUtf83; } format(headers) { const chunks = []; for (const headerName in headers) { if (!hasOwn(headers, headerName)) continue; const bytes = this.fromUtf8(headerName); chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName])); } const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0)); let position = 0; for (const chunk of chunks) { out.set(chunk, position); position += chunk.byteLength; } return out; } formatHeaderValue(header) { switch (header.type) { case "boolean": return Uint8Array.from([header.value ? 0 : 1]); case "byte": return Uint8Array.from([2, header.value]); case "short": const shortView = new DataView(new ArrayBuffer(3)); shortView.setUint8(0, 3); shortView.setInt16(1, header.value, false); return new Uint8Array(shortView.buffer); case "integer": const intView = new DataView(new ArrayBuffer(5)); intView.setUint8(0, 4); intView.setInt32(1, header.value, false); return new Uint8Array(intView.buffer); case "long": const longBytes = new Uint8Array(9); longBytes[0] = 5; longBytes.set(header.value.bytes, 1); return longBytes; case "binary": const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength)); binView.setUint8(0, 6); binView.setUint16(1, header.value.byteLength, false); const binBytes = new Uint8Array(binView.buffer); binBytes.set(header.value, 3); return binBytes; case "string": const utf8Bytes = this.fromUtf8(header.value); const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); strView.setUint8(0, 7); strView.setUint16(1, utf8Bytes.byteLength, false); const strBytes = new Uint8Array(strView.buffer); strBytes.set(utf8Bytes, 3); return strBytes; case "timestamp": const tsBytes = new Uint8Array(9); tsBytes[0] = 8; tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1); return tsBytes; case "uuid": if (!UUID_PATTERN.test(header.value)) { throw new Error(`Invalid UUID received: ${header.value}`); } const uuidBytes = new Uint8Array(17); uuidBytes[0] = 9; uuidBytes.set(fromHex(header.value.replace(/-/g, "")), 1); return uuidBytes; } } parse(headers) { const out = {}; let position = 0; while (position < headers.byteLength) { const nameLength = headers.getUint8(position++); const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength)); position += nameLength; switch (headers.getUint8(position++)) { case 0: out[name] = { type: BOOLEAN_TAG, value: true }; break; case 1: out[name] = { type: BOOLEAN_TAG, value: false }; break; case 2: out[name] = { type: BYTE_TAG, value: headers.getInt8(position++) }; break; case 3: out[name] = { type: SHORT_TAG, value: headers.getInt16(position, false) }; position += 2; break; case 4: out[name] = { type: INT_TAG, value: headers.getInt32(position, false) }; position += 4; break; case 5: out[name] = { type: LONG_TAG, value: new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)) }; position += 8; break; case 6: const binaryLength = headers.getUint16(position, false); position += 2; out[name] = { type: BINARY_TAG, value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength) }; position += binaryLength; break; case 7: const stringLength = headers.getUint16(position, false); position += 2; out[name] = { type: STRING_TAG, value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength)) }; position += stringLength; break; case 8: out[name] = { type: TIMESTAMP_TAG, value: new Date(new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf()) }; position += 8; break; case 9: const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16); position += 16; out[name] = { type: UUID_TAG, value: `${toHex(uuidBytes.subarray(0, 4))}-${toHex(uuidBytes.subarray(4, 6))}-${toHex(uuidBytes.subarray(6, 8))}-${toHex(uuidBytes.subarray(8, 10))}-${toHex(uuidBytes.subarray(10))}` }; break; default: throw new Error(`Unrecognized header type tag`); } } return out; } }; (function(HEADER_VALUE_TYPE2) { HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["boolTrue"] = 0] = "boolTrue"; HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["boolFalse"] = 1] = "boolFalse"; HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["byte"] = 2] = "byte"; HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["short"] = 3] = "short"; HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["integer"] = 4] = "integer"; HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["long"] = 5] = "long"; HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["byteArray"] = 6] = "byteArray"; HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["string"] = 7] = "string"; HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["timestamp"] = 8] = "timestamp"; HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["uuid"] = 9] = "uuid"; })(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {})); BOOLEAN_TAG = "boolean"; BYTE_TAG = "byte"; SHORT_TAG = "short"; INT_TAG = "integer"; LONG_TAG = "long"; BINARY_TAG = "binary"; STRING_TAG = "string"; TIMESTAMP_TAG = "timestamp"; UUID_TAG = "uuid"; UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/splitMessage.js function splitMessage({ byteLength, byteOffset, buffer }) { if (byteLength < MINIMUM_MESSAGE_LENGTH) { throw new Error("Provided message too short to accommodate event stream message overhead"); } const view = new DataView(buffer, byteOffset, byteLength); const messageLength = view.getUint32(0, false); if (byteLength !== messageLength) { throw new Error("Reported message length does not match received message length"); } const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false); const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false); const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false); const checksummer = new Crc32Node(); checksummer.update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH)); if (expectedPreludeChecksum !== checksummer.digestSync()) { throw new Error(`The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digestSync()})`); } checksummer.update(new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH))); if (expectedMessageChecksum !== checksummer.digestSync()) { throw new Error(`The message checksum (${checksummer.digestSync()}) did not match the expected value of ${expectedMessageChecksum}`); } return { headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength), body: new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH)) }; } var PRELUDE_MEMBER_LENGTH, PRELUDE_LENGTH, CHECKSUM_LENGTH, MINIMUM_MESSAGE_LENGTH; var init_splitMessage = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/splitMessage.js"() { init_checksum2(); PRELUDE_MEMBER_LENGTH = 4; PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2; CHECKSUM_LENGTH = 4; MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2; __name(splitMessage, "splitMessage"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/EventStreamCodec.js var EventStreamCodec; var init_EventStreamCodec = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/EventStreamCodec.js"() { init_checksum2(); init_HeaderMarshaller(); init_splitMessage(); EventStreamCodec = class { static { __name(this, "EventStreamCodec"); } headerMarshaller; messageBuffer; isEndOfStream; constructor(toUtf83, fromUtf83) { this.headerMarshaller = new HeaderMarshaller(toUtf83, fromUtf83); this.messageBuffer = []; this.isEndOfStream = false; } feed(message) { this.messageBuffer.push(this.decode(message)); } endOfStream() { this.isEndOfStream = true; } getMessage() { const message = this.messageBuffer.pop(); const isEndOfStream = this.isEndOfStream; return { getMessage() { return message; }, isEndOfStream() { return isEndOfStream; } }; } getAvailableMessages() { const messages = this.messageBuffer; this.messageBuffer = []; const isEndOfStream = this.isEndOfStream; return { getMessages() { return messages; }, isEndOfStream() { return isEndOfStream; } }; } encode({ headers: rawHeaders, body }) { const headers = this.headerMarshaller.format(rawHeaders); const length = headers.byteLength + body.byteLength + 16; const out = new Uint8Array(length); const view = new DataView(out.buffer, out.byteOffset, out.byteLength); const checksum = new Crc32Node(); view.setUint32(0, length, false); view.setUint32(4, headers.byteLength, false); checksum.update(out.subarray(0, 8)); view.setUint32(8, checksum.digestSync(), false); out.set(headers, 12); out.set(body, headers.byteLength + 12); checksum.update(out.subarray(8, length - 4)); view.setUint32(length - 4, checksum.digestSync(), false); return out; } decode(message) { const { headers, body } = splitMessage(message); return { headers: this.headerMarshaller.parse(headers), body }; } formatHeaders(rawHeaders) { return this.headerMarshaller.format(rawHeaders); } }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/MessageDecoderStream.js var MessageDecoderStream; var init_MessageDecoderStream = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/MessageDecoderStream.js"() { MessageDecoderStream = class { static { __name(this, "MessageDecoderStream"); } options; constructor(options) { this.options = options; } [Symbol.asyncIterator]() { return this.asyncIterator(); } async *asyncIterator() { for await (const bytes of this.options.inputStream) { const decoded = this.options.decoder.decode(bytes); yield decoded; } } }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/MessageEncoderStream.js var MessageEncoderStream; var init_MessageEncoderStream = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/MessageEncoderStream.js"() { MessageEncoderStream = class { static { __name(this, "MessageEncoderStream"); } options; constructor(options) { this.options = options; } [Symbol.asyncIterator]() { return this.asyncIterator(); } async *asyncIterator() { for await (const msg of this.options.messageStream) { const encoded = this.options.encoder.encode(msg); yield encoded; } if (this.options.includeEndFrame) { yield new Uint8Array(0); } } }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageDecoderStream.js var SmithyMessageDecoderStream; var init_SmithyMessageDecoderStream = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageDecoderStream.js"() { SmithyMessageDecoderStream = class { static { __name(this, "SmithyMessageDecoderStream"); } options; constructor(options) { this.options = options; } [Symbol.asyncIterator]() { return this.asyncIterator(); } async *asyncIterator() { for await (const message of this.options.messageStream) { const deserialized = await this.options.deserializer(message); if (deserialized === void 0) continue; yield deserialized; } } }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageEncoderStream.js var SmithyMessageEncoderStream; var init_SmithyMessageEncoderStream = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageEncoderStream.js"() { SmithyMessageEncoderStream = class { static { __name(this, "SmithyMessageEncoderStream"); } options; constructor(options) { this.options = options; } [Symbol.asyncIterator]() { return this.asyncIterator(); } async *asyncIterator() { for await (const chunk of this.options.inputStream) { const payloadBuf = this.options.serializer(chunk); yield payloadBuf; } } }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getChunkedStream.js function getChunkedStream(source) { let currentMessageTotalLength = 0; let currentMessagePendingLength = 0; let currentMessage = null; let messageLengthBuffer = null; const allocateMessage = /* @__PURE__ */ __name((size) => { if (typeof size !== "number") { throw new Error("Attempted to allocate an event message where size was not a number: " + size); } currentMessageTotalLength = size; currentMessagePendingLength = 4; currentMessage = new Uint8Array(size); const currentMessageView = new DataView(currentMessage.buffer); currentMessageView.setUint32(0, size, false); }, "allocateMessage"); const iterator = /* @__PURE__ */ __name(async function* () { const sourceIterator = source[Symbol.asyncIterator](); while (true) { const { value, done } = await sourceIterator.next(); if (done) { if (!currentMessageTotalLength) { return; } else if (currentMessageTotalLength === currentMessagePendingLength) { yield currentMessage; } else { throw new Error("Truncated event message received."); } return; } const chunkLength = value.length; let currentOffset = 0; while (currentOffset < chunkLength) { if (!currentMessage) { const bytesRemaining = chunkLength - currentOffset; if (!messageLengthBuffer) { messageLengthBuffer = new Uint8Array(4); } const numBytesForTotal = Math.min(4 - currentMessagePendingLength, bytesRemaining); messageLengthBuffer.set(value.slice(currentOffset, currentOffset + numBytesForTotal), currentMessagePendingLength); currentMessagePendingLength += numBytesForTotal; currentOffset += numBytesForTotal; if (currentMessagePendingLength < 4) { break; } allocateMessage(new DataView(messageLengthBuffer.buffer).getUint32(0, false)); messageLengthBuffer = null; } const numBytesToWrite = Math.min(currentMessageTotalLength - currentMessagePendingLength, chunkLength - currentOffset); currentMessage.set(value.slice(currentOffset, currentOffset + numBytesToWrite), currentMessagePendingLength); currentMessagePendingLength += numBytesToWrite; currentOffset += numBytesToWrite; if (currentMessageTotalLength && currentMessageTotalLength === currentMessagePendingLength) { yield currentMessage; currentMessage = null; currentMessageTotalLength = 0; currentMessagePendingLength = 0; } } } }, "iterator"); return { [Symbol.asyncIterator]: iterator }; } var init_getChunkedStream = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getChunkedStream.js"() { __name(getChunkedStream, "getChunkedStream"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getUnmarshalledStream.js function getUnmarshalledStream(source, options) { const messageUnmarshaller = getMessageUnmarshaller(options.deserializer, options.toUtf8); return { [Symbol.asyncIterator]: async function* () { for await (const chunk of source) { const message = options.eventStreamCodec.decode(chunk); const type = await messageUnmarshaller(message); if (type === void 0) continue; yield type; } } }; } function getMessageUnmarshaller(deserializer, toUtf83) { return async function(message) { const { value: messageType } = message.headers[":message-type"]; if (messageType === "error") { const unmodeledError = new Error(message.headers[":error-message"].value || "UnknownError"); unmodeledError.name = message.headers[":error-code"].value; throw unmodeledError; } else if (messageType === "exception") { const code = message.headers[":exception-type"].value; const exception = { [code]: message }; const deserializedException = await deserializer(exception); if (deserializedException.$unknown) { const error2 = new Error(toUtf83(message.body)); error2.name = code; throw error2; } throw deserializedException[code]; } else if (messageType === "event") { const event = { [message.headers[":event-type"].value]: message }; const deserialized = await deserializer(event); if (deserialized.$unknown) return; return deserialized; } else { throw Error(`Unrecognizable event type: ${message.headers[":event-type"].value}`); } }; } var init_getUnmarshalledStream = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getUnmarshalledStream.js"() { __name(getUnmarshalledStream, "getUnmarshalledStream"); __name(getMessageUnmarshaller, "getMessageUnmarshaller"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/EventStreamMarshaller.js var EventStreamMarshaller, eventStreamSerdeProvider; var init_EventStreamMarshaller = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/EventStreamMarshaller.js"() { init_EventStreamCodec(); init_MessageDecoderStream(); init_MessageEncoderStream(); init_SmithyMessageDecoderStream(); init_SmithyMessageEncoderStream(); init_getChunkedStream(); init_getUnmarshalledStream(); EventStreamMarshaller = class { static { __name(this, "EventStreamMarshaller"); } eventStreamCodec; utfEncoder; constructor({ utf8Encoder, utf8Decoder }) { this.eventStreamCodec = new EventStreamCodec(utf8Encoder, utf8Decoder); this.utfEncoder = utf8Encoder; } deserialize(body, deserializer) { const inputStream = getChunkedStream(body); return new SmithyMessageDecoderStream({ messageStream: new MessageDecoderStream({ inputStream, decoder: this.eventStreamCodec }), deserializer: getMessageUnmarshaller(deserializer, this.utfEncoder) }); } serialize(inputStream, serializer) { return new MessageEncoderStream({ messageStream: new SmithyMessageEncoderStream({ inputStream, serializer }), encoder: this.eventStreamCodec, includeEndFrame: true }); } }; eventStreamSerdeProvider = /* @__PURE__ */ __name((options) => new EventStreamMarshaller(options), "eventStreamSerdeProvider"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/EventStreamMarshaller.js import { Readable as Readable5 } from "node:stream"; async function* readableToIterable(readStream) { let streamEnded = false; let generationEnded = false; const records = new Array(); readStream.on("error", (err) => { if (!streamEnded) { streamEnded = true; } if (err) { throw err; } }); readStream.on("data", (data) => { records.push(data); }); readStream.on("end", () => { streamEnded = true; }); while (!generationEnded) { const value = await new Promise((resolve) => setTimeout(() => resolve(records.shift()), 0)); if (value) { yield value; } generationEnded = streamEnded && records.length === 0; } } var EventStreamMarshaller2, eventStreamSerdeProvider2; var init_EventStreamMarshaller2 = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/EventStreamMarshaller.js"() { init_EventStreamMarshaller(); EventStreamMarshaller2 = class { static { __name(this, "EventStreamMarshaller"); } universalMarshaller; constructor({ utf8Encoder, utf8Decoder }) { this.universalMarshaller = new EventStreamMarshaller({ utf8Decoder, utf8Encoder }); } deserialize(body, deserializer) { const bodyIterable = typeof body[Symbol.asyncIterator] === "function" ? body : readableToIterable(body); return this.universalMarshaller.deserialize(bodyIterable, deserializer); } serialize(input, serializer) { return Readable5.from(this.universalMarshaller.serialize(input, serializer)); } }; eventStreamSerdeProvider2 = /* @__PURE__ */ __name((options) => new EventStreamMarshaller2(options), "eventStreamSerdeProvider"); __name(readableToIterable, "readableToIterable"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/utils.js var readableStreamToIterable, iterableToReadableStream; var init_utils2 = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/utils.js"() { readableStreamToIterable = /* @__PURE__ */ __name((readableStream) => ({ [Symbol.asyncIterator]: async function* () { const reader = readableStream.getReader(); try { while (true) { const { done, value } = await reader.read(); if (done) return; yield value; } } finally { reader.releaseLock(); } } }), "readableStreamToIterable"); iterableToReadableStream = /* @__PURE__ */ __name((asyncIterable) => { const iterator = asyncIterable[Symbol.asyncIterator](); return new ReadableStream({ async pull(controller) { const { done, value } = await iterator.next(); if (done) { return controller.close(); } controller.enqueue(value); } }); }, "iterableToReadableStream"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-config-resolver/EventStreamSerdeConfig.js var resolveEventStreamSerdeConfig; var init_EventStreamSerdeConfig = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-config-resolver/EventStreamSerdeConfig.js"() { resolveEventStreamSerdeConfig = /* @__PURE__ */ __name((input) => Object.assign(input, { eventStreamMarshaller: input.eventStreamSerdeProvider(input) }), "resolveEventStreamSerdeConfig"); } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js var EventStreamSerde; var init_EventStreamSerde = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js"() { init_transport(); init_schema(); init_serde(); EventStreamSerde = class { static { __name(this, "EventStreamSerde"); } marshaller; serializer; deserializer; serdeContext; defaultContentType; compositeErrorRegistry; constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType, compositeErrorRegistry }) { this.marshaller = marshaller; this.serializer = serializer; this.deserializer = deserializer; this.serdeContext = serdeContext; this.defaultContentType = defaultContentType; this.compositeErrorRegistry = compositeErrorRegistry; } async serializeEventStream({ eventStream, requestSchema, initialRequest, initialMessageType }) { const marshaller = this.marshaller; const eventStreamMember = requestSchema.getEventStreamMember(); const unionSchema = requestSchema.getMemberSchema(eventStreamMember); const serializer = this.serializer; const defaultContentType = this.defaultContentType; const initialRequestMarker = /* @__PURE__ */ Symbol("initialRequestMarker"); const eventStreamIterable = { async *[Symbol.asyncIterator]() { if (initialRequest) { const headers = { ":event-type": { type: "string", value: initialMessageType ?? "initial-request" }, ":message-type": { type: "string", value: "event" }, ":content-type": { type: "string", value: defaultContentType } }; serializer.write(requestSchema, initialRequest); const body = serializer.flush(); yield { [initialRequestMarker]: true, headers, body }; } for await (const page of eventStream) { yield page; } } }; return marshaller.serialize(eventStreamIterable, (event) => { if (event[initialRequestMarker]) { return { headers: event.headers, body: event.body }; } let unionMember = ""; for (const key in event) { if (!hasOwn(event, key)) continue; if (key !== "__type") { unionMember = key; break; } } const { additionalHeaders, body, eventType, explicitPayloadContentType } = this.writeEventBody(unionMember, unionSchema, event); const headers = { ":event-type": { type: "string", value: eventType }, ":message-type": { type: "string", value: "event" }, ":content-type": { type: "string", value: explicitPayloadContentType ?? defaultContentType }, ...additionalHeaders }; return { headers, body }; }); } async deserializeEventStream({ response, responseSchema, initialResponseContainer, initialMessageType }) { const marshaller = this.marshaller; const eventStreamMember = responseSchema.getEventStreamMember(); const unionSchema = responseSchema.getMemberSchema(eventStreamMember); const memberSchemas = unionSchema.getMemberSchemas(); const initialResponseMarker = /* @__PURE__ */ Symbol("initialResponseMarker"); const asyncIterable = marshaller.deserialize(response.body, async (event) => { let unionMember = ""; for (const key in event) { if (!hasOwn(event, key)) continue; if (key !== "__type") { unionMember = key; break; } } const body = event[unionMember].body; if (unionMember === (initialMessageType ?? "initial-response")) { const dataObject = await this.deserializer.read(responseSchema, body); delete dataObject[eventStreamMember]; return { [initialResponseMarker]: true, ...dataObject }; } else if (unionMember in memberSchemas) { const eventStreamSchema = memberSchemas[unionMember]; if (eventStreamSchema.isStructSchema()) { const out = {}; let hasBindings = false; for (const [name, member2] of eventStreamSchema.structIterator()) { const { eventHeader, eventPayload } = member2.getMergedTraits(); hasBindings = hasBindings || Boolean(eventHeader || eventPayload); if (eventPayload) { if (member2.isBlobSchema()) { out[name] = body; } else if (member2.isStringSchema()) { out[name] = (this.serdeContext?.utf8Encoder ?? toUtf8)(body); } else if (member2.isStructSchema()) { out[name] = await this.deserializer.read(member2, body); } } else if (eventHeader) { const value = event[unionMember].headers[name]?.value; if (value != null) { if (member2.isNumericSchema()) { if (value && typeof value === "object" && "bytes" in value) { out[name] = BigInt(value.toString()); } else { out[name] = Number(value); } } else { out[name] = value; } } } } return { [unionMember]: await this.readEventMember(eventStreamSchema, body, hasBindings, out) }; } return { [unionMember]: await this.deserializer.read(eventStreamSchema, body) }; } else { return { $unknown: event }; } }); const asyncIterator = asyncIterable[Symbol.asyncIterator](); const firstEvent = await asyncIterator.next(); if (firstEvent.done) { return asyncIterable; } if (firstEvent.value?.[initialResponseMarker]) { if (!responseSchema) { throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given."); } for (const key in firstEvent.value) { if (!hasOwn(firstEvent.value, key)) continue; initialResponseContainer[key] = firstEvent.value[key]; } } return { async *[Symbol.asyncIterator]() { if (!firstEvent?.value?.[initialResponseMarker]) { yield firstEvent.value; } while (true) { const { done, value } = await asyncIterator.next(); if (done) { break; } yield value; } } }; } async readEventMember(eventStreamSchema, body, hasBindings, out) { let ErrCtor; const staticStructuralSchema = eventStreamSchema.getSchema(); if (Array.isArray(staticStructuralSchema) && staticStructuralSchema[0] === -3) { const namespace = staticStructuralSchema[1]; const nsRegistry = TypeRegistry.for(namespace); this.compositeErrorRegistry?.copyFrom(nsRegistry); ErrCtor = (this.compositeErrorRegistry ?? nsRegistry)?.getErrorCtor(staticStructuralSchema); } const dataObject = hasBindings ? out : body.byteLength === 0 ? {} : await this.deserializer.read(eventStreamSchema, body); if (ErrCtor) { const message = dataObject.message ?? dataObject.Message ?? "Unknown"; const metadata = {}; const $fault = eventStreamSchema.getMergedTraits().error; if ($fault) { metadata.$fault = $fault; } return Object.assign(new ErrCtor({}), metadata, { message }, dataObject); } return dataObject; } writeEventBody(unionMember, unionSchema, event) { const serializer = this.serializer; let eventType = unionMember; let explicitPayloadMember = null; let explicitPayloadContentType; const isKnownSchema = (() => { const struct2 = unionSchema.getSchema(); return struct2[4].includes(unionMember); })(); const additionalHeaders = {}; if (!isKnownSchema) { const [type, value] = event[unionMember]; eventType = type; serializer.write(15, value); } else { const eventSchema = unionSchema.getMemberSchema(unionMember); if (eventSchema.isStructSchema()) { for (const [memberName, memberSchema] of eventSchema.structIterator()) { const { eventHeader, eventPayload } = memberSchema.getMergedTraits(); if (eventPayload) { explicitPayloadMember = memberName; } else if (eventHeader) { const value = event[unionMember][memberName]; let type = "binary"; if (memberSchema.isNumericSchema()) { if ((-2) ** 31 <= value && value <= 2 ** 31 - 1) { type = "integer"; } else { type = "long"; } } else if (memberSchema.isTimestampSchema()) { type = "timestamp"; } else if (memberSchema.isStringSchema()) { type = "string"; } else if (memberSchema.isBooleanSchema()) { type = "boolean"; } if (value != null) { additionalHeaders[memberName] = { type, value }; delete event[unionMember][memberName]; } } } if (explicitPayloadMember !== null) { const payloadSchema = eventSchema.getMemberSchema(explicitPayloadMember); if (payloadSchema.isBlobSchema()) { explicitPayloadContentType = "application/octet-stream"; } else if (payloadSchema.isStringSchema()) { explicitPayloadContentType = "text/plain"; } serializer.write(payloadSchema, event[unionMember][explicitPayloadMember]); } else { serializer.write(eventSchema, event[unionMember]); } } else if (eventSchema.isUnitSchema()) { serializer.write(eventSchema, {}); } else { throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union."); } } const messageSerialization = serializer.flush() ?? new Uint8Array(); const body = typeof messageSerialization === "string" ? (this.serdeContext?.utf8Decoder ?? fromUtf8)(messageSerialization) : messageSerialization; return { body, eventType, explicitPayloadContentType, additionalHeaders }; } }; } }); // ../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/index.js var event_streams_exports = {}; __export(event_streams_exports, { EventStreamCodec: () => EventStreamCodec, EventStreamMarshaller: () => EventStreamMarshaller2, EventStreamSerde: () => EventStreamSerde, HeaderMarshaller: () => HeaderMarshaller, Int64: () => Int64, MessageDecoderStream: () => MessageDecoderStream, MessageEncoderStream: () => MessageEncoderStream, SmithyMessageDecoderStream: () => SmithyMessageDecoderStream, SmithyMessageEncoderStream: () => SmithyMessageEncoderStream, UniversalEventStreamMarshaller: () => EventStreamMarshaller, eventStreamSerdeProvider: () => eventStreamSerdeProvider2, getChunkedStream: () => getChunkedStream, getMessageUnmarshaller: () => getMessageUnmarshaller, getUnmarshalledStream: () => getUnmarshalledStream, iterableToReadableStream: () => iterableToReadableStream, readableStreamToIterable: () => readableStreamToIterable, resolveEventStreamSerdeConfig: () => resolveEventStreamSerdeConfig, universalEventStreamSerdeProvider: () => eventStreamSerdeProvider }); var init_event_streams = __esm({ "../../node_modules/.pnpm/@smithy+core@3.36.1/node_modules/@smithy/core/dist-es/submodules/event-streams/index.js"() { init_EventStreamCodec(); init_HeaderMarshaller(); init_Int64(); init_MessageDecoderStream(); init_MessageEncoderStream(); init_SmithyMessageDecoderStream(); init_SmithyMessageEncoderStream(); init_EventStreamMarshaller2(); init_utils2(); init_EventStreamMarshaller(); init_getChunkedStream(); init_getUnmarshalledStream(); init_EventStreamSerdeConfig(); init_EventStreamSerde(); } }); export { require_dist_cjs, getSmithyContext, hasOwn, HttpRequest, HttpResponse, isValidHostLabel, isValidHostname, normalizeProvider, parseQueryString, parseUrl, init_transport, Client, deref, getSchemaSerdePlugin, translateTraits, NormalizedSchema, TypeRegistry, schema_exports, init_schema, Command, createAggregatedClient, ServiceException, decorateServiceException, loadConfigsForDefaultMode, emitWarningIfUnsupportedVersion, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, getValueFromTextNode, NoOpLogger, makeBuilder, client_exports, init_client2 as init_client, isArrayBuffer, fromBase64, fromUtf8, toBase64, toUtf8, dateToUtcString, parseRfc3339DateTimeWithOffset, parseRfc7231DateTime, parseEpochTimestamp, LazyJsonString, quoteHeader, _parseEpochTimestamp, _parseRfc3339DateTimeWithOffset, _parseRfc7231DateTime, splitEvery, splitHeader, NumericValue, calculateBodyLength, toUint8Array, concatBytes, ProviderError, booleanSelector, SelectorType, loadConfig, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, REGION_ENV_NAME, REGION_INI_NAME, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig, resolveDefaultsModeConfig, config_exports, init_config2 as init_config, resolveParams, BinaryDecisionDiagram, EndpointCache, EndpointError, customEndpointFunctions, isIpAddress, decideEndpoint, resolveEndpoint, resolveEndpointConfig, getEndpointPlugin, endpoints_exports, init_endpoints, createChecksumStream2 as createChecksumStream, createBufferedReadable, sdkStreamMixin2 as sdkStreamMixin, Uint8ArrayBlobAdapter, v4, generateIdempotencyToken, serde_exports, init_serde, Crc32Node, Sha256Js, Sha256Node, checksum_exports, init_checksum2 as init_checksum, Int64, HeaderMarshaller, EventStreamCodec, MessageDecoderStream, MessageEncoderStream, SmithyMessageDecoderStream, SmithyMessageEncoderStream, getChunkedStream, getUnmarshalledStream, getMessageUnmarshaller, EventStreamMarshaller, eventStreamSerdeProvider, EventStreamMarshaller2, eventStreamSerdeProvider2, readableStreamToIterable, iterableToReadableStream, resolveEventStreamSerdeConfig, EventStreamSerde, event_streams_exports, init_event_streams };