{"version":3,"file":"vendors-cdd60c62.f584a1446b2fc034d810.bundle.js","mappings":"AAAA","sources":["webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/isClockSkewed.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/core/dist-es/submodules/client/setCredentialFeature.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/core/dist-es/submodules/protocols/ProtocolLib.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/core/dist-es/submodules/protocols/UnionSerde.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReplacer.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonCodec.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/middleware-host-header/dist-es/index.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/middleware-logger/dist-es/loggerMiddleware.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/middleware-recursion-detection/dist-es/configuration.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/middleware-recursion-detection/dist-es/getRecursionDetectionPlugin.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/middleware-recursion-detection/dist-es/recursionDetectionMiddleware.browser.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/middleware-user-agent/dist-es/configurations.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/middleware-user-agent/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/isVirtualHostableS3Bucket.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/middleware-user-agent/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partition.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/middleware-user-agent/node_modules/@aws-sdk/util-endpoints/dist-es/aws.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/middleware-user-agent/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/parseArn.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/middleware-user-agent/dist-es/check-features.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/middleware-user-agent/dist-es/constants.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/middleware-user-agent/dist-es/user-agent-middleware.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/middleware-user-agent/dist-es/encode-features.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/region-config-resolver/dist-es/extensions/index.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/isVirtualHostableS3Bucket.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partition.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/util-endpoints/dist-es/aws.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/parseArn.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/util-hex-encoding/dist-es/index.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/util-locate-window/dist-es/index.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/util-user-agent-browser/dist-es/index.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/util-utf8-browser/dist-es/index.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/util-utf8-browser/dist-es/whatwgEncodingApi.js","webpack://lernplattform-admin-frontend/./node_modules/@aws-sdk/util-utf8-browser/dist-es/pureJs.js","webpack://lernplattform-admin-frontend/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://lernplattform-admin-frontend/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://lernplattform-admin-frontend/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://lernplattform-admin-frontend/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://lernplattform-admin-frontend/./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://lernplattform-admin-frontend/./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://lernplattform-admin-frontend/./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://lernplattform-admin-frontend/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://lernplattform-admin-frontend/./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://lernplattform-admin-frontend/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://lernplattform-admin-frontend/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://lernplattform-admin-frontend/./node_modules/@babel/runtime/helpers/esm/typeof.js"],"sourcesContent":["export const getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset);\n","import { HttpResponse } from \"@smithy/protocol-http\";\nexport const getDateHeader = (response) => HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : undefined;\n","import { isClockSkewed } from \"./isClockSkewed\";\nexport const getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => {\n    const clockTimeInMs = Date.parse(clockTime);\n    if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) {\n        return clockTimeInMs - Date.now();\n    }\n    return currentSystemClockOffset;\n};\n","import { getSkewCorrectedDate } from \"./getSkewCorrectedDate\";\nexport const isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 300000;\n","import { HttpRequest } from \"@smithy/protocol-http\";\nimport { getDateHeader, getSkewCorrectedDate, getUpdatedSystemClockOffset } from \"../utils\";\nconst throwSigningPropertyError = (name, property) => {\n    if (!property) {\n        throw new Error(`Property \\`${name}\\` is not resolved for AWS SDK SigV4Auth`);\n    }\n    return property;\n};\nexport const validateSigningProperties = async (signingProperties) => {\n    const context = throwSigningPropertyError(\"context\", signingProperties.context);\n    const config = throwSigningPropertyError(\"config\", signingProperties.config);\n    const authScheme = context.endpointV2?.properties?.authSchemes?.[0];\n    const signerFunction = throwSigningPropertyError(\"signer\", config.signer);\n    const signer = await signerFunction(authScheme);\n    const signingRegion = signingProperties?.signingRegion;\n    const signingRegionSet = signingProperties?.signingRegionSet;\n    const signingName = signingProperties?.signingName;\n    return {\n        config,\n        signer,\n        signingRegion,\n        signingRegionSet,\n        signingName,\n    };\n};\nexport class AwsSdkSigV4Signer {\n    async sign(httpRequest, identity, signingProperties) {\n        if (!HttpRequest.isInstance(httpRequest)) {\n            throw new Error(\"The request is not an instance of `HttpRequest` and cannot be signed\");\n        }\n        const validatedProps = await validateSigningProperties(signingProperties);\n        const { config, signer } = validatedProps;\n        let { signingRegion, signingName } = validatedProps;\n        const handlerExecutionContext = signingProperties.context;\n        if (handlerExecutionContext?.authSchemes?.length ?? 0 > 1) {\n            const [first, second] = handlerExecutionContext.authSchemes;\n            if (first?.name === \"sigv4a\" && second?.name === \"sigv4\") {\n                signingRegion = second?.signingRegion ?? signingRegion;\n                signingName = second?.signingName ?? signingName;\n            }\n        }\n        const signedRequest = await signer.sign(httpRequest, {\n            signingDate: getSkewCorrectedDate(config.systemClockOffset),\n            signingRegion: signingRegion,\n            signingService: signingName,\n        });\n        return signedRequest;\n    }\n    errorHandler(signingProperties) {\n        return (error) => {\n            const serverTime = error.ServerTime ?? getDateHeader(error.$response);\n            if (serverTime) {\n                const config = throwSigningPropertyError(\"config\", signingProperties.config);\n                const initialSystemClockOffset = config.systemClockOffset;\n                config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset);\n                const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset;\n                if (clockSkewCorrected && error.$metadata) {\n                    error.$metadata.clockSkewCorrected = true;\n                }\n            }\n            throw error;\n        };\n    }\n    successHandler(httpResponse, signingProperties) {\n        const dateHeader = getDateHeader(httpResponse);\n        if (dateHeader) {\n            const config = throwSigningPropertyError(\"config\", signingProperties.config);\n            config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset);\n        }\n    }\n}\nexport const AWSSDKSigV4Signer = AwsSdkSigV4Signer;\n","import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { doesIdentityRequireRefresh, isIdentityExpired, memoizeIdentityProvider, normalizeProvider, } from \"@smithy/core\";\nimport { SignatureV4 } from \"@smithy/signature-v4\";\nexport const resolveAwsSdkSigV4Config = (config) => {\n    let inputCredentials = config.credentials;\n    let isUserSupplied = !!config.credentials;\n    let resolvedCredentials = undefined;\n    Object.defineProperty(config, \"credentials\", {\n        set(credentials) {\n            if (credentials && credentials !== inputCredentials && credentials !== resolvedCredentials) {\n                isUserSupplied = true;\n            }\n            inputCredentials = credentials;\n            const memoizedProvider = normalizeCredentialProvider(config, {\n                credentials: inputCredentials,\n                credentialDefaultProvider: config.credentialDefaultProvider,\n            });\n            const boundProvider = bindCallerConfig(config, memoizedProvider);\n            if (isUserSupplied && !boundProvider.attributed) {\n                const isCredentialObject = typeof inputCredentials === \"object\" && inputCredentials !== null;\n                resolvedCredentials = async (options) => {\n                    const creds = await boundProvider(options);\n                    const attributedCreds = creds;\n                    if (isCredentialObject && (!attributedCreds.$source || Object.keys(attributedCreds.$source).length === 0)) {\n                        return setCredentialFeature(attributedCreds, \"CREDENTIALS_CODE\", \"e\");\n                    }\n                    return attributedCreds;\n                };\n                resolvedCredentials.memoized = boundProvider.memoized;\n                resolvedCredentials.configBound = boundProvider.configBound;\n                resolvedCredentials.attributed = true;\n            }\n            else {\n                resolvedCredentials = boundProvider;\n            }\n        },\n        get() {\n            return resolvedCredentials;\n        },\n        enumerable: true,\n        configurable: true,\n    });\n    config.credentials = inputCredentials;\n    const { signingEscapePath = true, systemClockOffset = config.systemClockOffset || 0, sha256, } = config;\n    let signer;\n    if (config.signer) {\n        signer = normalizeProvider(config.signer);\n    }\n    else if (config.regionInfoProvider) {\n        signer = () => normalizeProvider(config.region)()\n            .then(async (region) => [\n            (await config.regionInfoProvider(region, {\n                useFipsEndpoint: await config.useFipsEndpoint(),\n                useDualstackEndpoint: await config.useDualstackEndpoint(),\n            })) || {},\n            region,\n        ])\n            .then(([regionInfo, region]) => {\n            const { signingRegion, signingService } = regionInfo;\n            config.signingRegion = config.signingRegion || signingRegion || region;\n            config.signingName = config.signingName || signingService || config.serviceId;\n            const params = {\n                ...config,\n                credentials: config.credentials,\n                region: config.signingRegion,\n                service: config.signingName,\n                sha256,\n                uriEscapePath: signingEscapePath,\n            };\n            const SignerCtor = config.signerConstructor || SignatureV4;\n            return new SignerCtor(params);\n        });\n    }\n    else {\n        signer = async (authScheme) => {\n            authScheme = Object.assign({}, {\n                name: \"sigv4\",\n                signingName: config.signingName || config.defaultSigningName,\n                signingRegion: await normalizeProvider(config.region)(),\n                properties: {},\n            }, authScheme);\n            const signingRegion = authScheme.signingRegion;\n            const signingService = authScheme.signingName;\n            config.signingRegion = config.signingRegion || signingRegion;\n            config.signingName = config.signingName || signingService || config.serviceId;\n            const params = {\n                ...config,\n                credentials: config.credentials,\n                region: config.signingRegion,\n                service: config.signingName,\n                sha256,\n                uriEscapePath: signingEscapePath,\n            };\n            const SignerCtor = config.signerConstructor || SignatureV4;\n            return new SignerCtor(params);\n        };\n    }\n    const resolvedConfig = Object.assign(config, {\n        systemClockOffset,\n        signingEscapePath,\n        signer,\n    });\n    return resolvedConfig;\n};\nexport const resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config;\nfunction normalizeCredentialProvider(config, { credentials, credentialDefaultProvider, }) {\n    let credentialsProvider;\n    if (credentials) {\n        if (!credentials?.memoized) {\n            credentialsProvider = memoizeIdentityProvider(credentials, isIdentityExpired, doesIdentityRequireRefresh);\n        }\n        else {\n            credentialsProvider = credentials;\n        }\n    }\n    else {\n        if (credentialDefaultProvider) {\n            credentialsProvider = normalizeProvider(credentialDefaultProvider(Object.assign({}, config, {\n                parentClientConfig: config,\n            })));\n        }\n        else {\n            credentialsProvider = async () => {\n                throw new Error(\"@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.\");\n            };\n        }\n    }\n    credentialsProvider.memoized = true;\n    return credentialsProvider;\n}\nfunction bindCallerConfig(config, credentialsProvider) {\n    if (credentialsProvider.configBound) {\n        return credentialsProvider;\n    }\n    const fn = async (options) => credentialsProvider({ ...options, callerClientConfig: config });\n    fn.memoized = credentialsProvider.memoized;\n    fn.configBound = true;\n    return fn;\n}\n","export function setCredentialFeature(credentials, feature, value) {\n    if (!credentials.$source) {\n        credentials.$source = {};\n    }\n    credentials.$source[feature] = value;\n    return credentials;\n}\n","import { NormalizedSchema, TypeRegistry } from \"@smithy/core/schema\";\nimport { decorateServiceException } from \"@smithy/smithy-client\";\nexport class ProtocolLib {\n    queryCompat;\n    constructor(queryCompat = false) {\n        this.queryCompat = queryCompat;\n    }\n    resolveRestContentType(defaultContentType, inputSchema) {\n        const members = inputSchema.getMemberSchemas();\n        const httpPayloadMember = Object.values(members).find((m) => {\n            return !!m.getMergedTraits().httpPayload;\n        });\n        if (httpPayloadMember) {\n            const mediaType = httpPayloadMember.getMergedTraits().mediaType;\n            if (mediaType) {\n                return mediaType;\n            }\n            else if (httpPayloadMember.isStringSchema()) {\n                return \"text/plain\";\n            }\n            else if (httpPayloadMember.isBlobSchema()) {\n                return \"application/octet-stream\";\n            }\n            else {\n                return defaultContentType;\n            }\n        }\n        else if (!inputSchema.isUnitSchema()) {\n            const hasBody = Object.values(members).find((m) => {\n                const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m.getMergedTraits();\n                const noPrefixHeaders = httpPrefixHeaders === void 0;\n                return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && noPrefixHeaders;\n            });\n            if (hasBody) {\n                return defaultContentType;\n            }\n        }\n    }\n    async getErrorSchemaOrThrowBaseException(errorIdentifier, defaultNamespace, response, dataObject, metadata, getErrorSchema) {\n        let namespace = defaultNamespace;\n        let errorName = errorIdentifier;\n        if (errorIdentifier.includes(\"#\")) {\n            [namespace, errorName] = errorIdentifier.split(\"#\");\n        }\n        const errorMetadata = {\n            $metadata: metadata,\n            $fault: response.statusCode < 500 ? \"client\" : \"server\",\n        };\n        const registry = TypeRegistry.for(namespace);\n        try {\n            const errorSchema = getErrorSchema?.(registry, errorName) ?? registry.getSchema(errorIdentifier);\n            return { errorSchema, errorMetadata };\n        }\n        catch (e) {\n            dataObject.message = dataObject.message ?? dataObject.Message ?? \"UnknownError\";\n            const synthetic = TypeRegistry.for(\"smithy.ts.sdk.synthetic.\" + namespace);\n            const baseExceptionSchema = synthetic.getBaseException();\n            if (baseExceptionSchema) {\n                const ErrorCtor = synthetic.getErrorCtor(baseExceptionSchema) ?? Error;\n                throw this.decorateServiceException(Object.assign(new ErrorCtor({ name: errorName }), errorMetadata), dataObject);\n            }\n            throw this.decorateServiceException(Object.assign(new Error(errorName), errorMetadata), dataObject);\n        }\n    }\n    decorateServiceException(exception, additions = {}) {\n        if (this.queryCompat) {\n            const msg = exception.Message ?? additions.Message;\n            const error = decorateServiceException(exception, additions);\n            if (msg) {\n                error.message = msg;\n            }\n            error.Error = {\n                ...error.Error,\n                Type: error.Error?.Type,\n                Code: error.Error?.Code,\n                Message: error.Error?.message ?? error.Error?.Message ?? msg,\n            };\n            const reqId = error.$metadata.requestId;\n            if (reqId) {\n                error.RequestId = reqId;\n            }\n            return error;\n        }\n        return decorateServiceException(exception, additions);\n    }\n    setQueryCompatError(output, response) {\n        const queryErrorHeader = response.headers?.[\"x-amzn-query-error\"];\n        if (output !== undefined && queryErrorHeader != null) {\n            const [Code, Type] = queryErrorHeader.split(\";\");\n            const entries = Object.entries(output);\n            const Error = {\n                Code,\n                Type,\n            };\n            Object.assign(output, Error);\n            for (const [k, v] of entries) {\n                Error[k === \"message\" ? \"Message\" : k] = v;\n            }\n            delete Error.__type;\n            output.Error = Error;\n        }\n    }\n    queryCompatOutput(queryCompatErrorData, errorData) {\n        if (queryCompatErrorData.Error) {\n            errorData.Error = queryCompatErrorData.Error;\n        }\n        if (queryCompatErrorData.Type) {\n            errorData.Type = queryCompatErrorData.Type;\n        }\n        if (queryCompatErrorData.Code) {\n            errorData.Code = queryCompatErrorData.Code;\n        }\n    }\n    findQueryCompatibleError(registry, errorName) {\n        try {\n            return registry.getSchema(errorName);\n        }\n        catch (e) {\n            return registry.find((schema) => NormalizedSchema.of(schema).getMergedTraits().awsQueryError?.[0] === errorName);\n        }\n    }\n}\n","export class SerdeContextConfig {\n    serdeContext;\n    setSerdeContext(serdeContext) {\n        this.serdeContext = serdeContext;\n    }\n}\n","export class UnionSerde {\n    from;\n    to;\n    keys;\n    constructor(from, to) {\n        this.from = from;\n        this.to = to;\n        this.keys = new Set(Object.keys(this.from).filter((k) => k !== \"__type\"));\n    }\n    mark(key) {\n        this.keys.delete(key);\n    }\n    hasUnknown() {\n        return this.keys.size === 1 && Object.keys(this.to).length === 0;\n    }\n    writeUnknown() {\n        if (this.hasUnknown()) {\n            const k = this.keys.values().next().value;\n            const v = this.from[k];\n            this.to.$unknown = [k, v];\n        }\n    }\n}\n","import { NumericValue } from \"@smithy/core/serde\";\nexport function jsonReviver(key, value, context) {\n    if (context?.source) {\n        const numericString = context.source;\n        if (typeof value === \"number\") {\n            if (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER || numericString !== String(value)) {\n                const isFractional = numericString.includes(\".\");\n                if (isFractional) {\n                    return new NumericValue(numericString, \"bigDecimal\");\n                }\n                else {\n                    return BigInt(numericString);\n                }\n            }\n        }\n    }\n    return value;\n}\n","import { collectBody } from \"@smithy/smithy-client\";\nimport { toUtf8 } from \"@smithy/util-utf8\";\nexport const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => (context?.utf8Encoder ?? toUtf8)(body));\n","import { collectBodyString } from \"../common\";\nexport const parseJsonBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {\n    if (encoded.length) {\n        try {\n            return JSON.parse(encoded);\n        }\n        catch (e) {\n            if (e?.name === \"SyntaxError\") {\n                Object.defineProperty(e, \"$responseBodyText\", {\n                    value: encoded,\n                });\n            }\n            throw e;\n        }\n    }\n    return {};\n});\nexport const parseJsonErrorBody = async (errorBody, context) => {\n    const value = await parseJsonBody(errorBody, context);\n    value.message = value.message ?? value.Message;\n    return value;\n};\nexport const loadRestJsonErrorCode = (output, data) => {\n    const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());\n    const sanitizeErrorCode = (rawValue) => {\n        let cleanValue = rawValue;\n        if (typeof cleanValue === \"number\") {\n            cleanValue = cleanValue.toString();\n        }\n        if (cleanValue.indexOf(\",\") >= 0) {\n            cleanValue = cleanValue.split(\",\")[0];\n        }\n        if (cleanValue.indexOf(\":\") >= 0) {\n            cleanValue = cleanValue.split(\":\")[0];\n        }\n        if (cleanValue.indexOf(\"#\") >= 0) {\n            cleanValue = cleanValue.split(\"#\")[1];\n        }\n        return cleanValue;\n    };\n    const headerKey = findKey(output.headers, \"x-amzn-errortype\");\n    if (headerKey !== undefined) {\n        return sanitizeErrorCode(output.headers[headerKey]);\n    }\n    if (data && typeof data === \"object\") {\n        const codeKey = findKey(data, \"code\");\n        if (codeKey && data[codeKey] !== undefined) {\n            return sanitizeErrorCode(data[codeKey]);\n        }\n        if (data[\"__type\"] !== undefined) {\n            return sanitizeErrorCode(data[\"__type\"]);\n        }\n    }\n};\n","import { determineTimestampFormat } from \"@smithy/core/protocols\";\nimport { NormalizedSchema } from \"@smithy/core/schema\";\nimport { LazyJsonString, NumericValue, parseEpochTimestamp, parseRfc3339DateTimeWithOffset, parseRfc7231DateTime, } from \"@smithy/core/serde\";\nimport { fromBase64 } from \"@smithy/util-base64\";\nimport { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nimport { UnionSerde } from \"../UnionSerde\";\nimport { jsonReviver } from \"./jsonReviver\";\nimport { parseJsonBody } from \"./parseJsonBody\";\nexport class JsonShapeDeserializer extends SerdeContextConfig {\n    settings;\n    constructor(settings) {\n        super();\n        this.settings = settings;\n    }\n    async read(schema, data) {\n        return this._read(schema, typeof data === \"string\" ? JSON.parse(data, jsonReviver) : await parseJsonBody(data, this.serdeContext));\n    }\n    readObject(schema, data) {\n        return this._read(schema, data);\n    }\n    _read(schema, value) {\n        const isObject = value !== null && typeof value === \"object\";\n        const ns = NormalizedSchema.of(schema);\n        if (isObject) {\n            if (ns.isStructSchema()) {\n                const record = value;\n                const union = ns.isUnionSchema();\n                const out = {};\n                let nameMap = void 0;\n                const { jsonName } = this.settings;\n                if (jsonName) {\n                    nameMap = {};\n                }\n                let unionSerde;\n                if (union) {\n                    unionSerde = new UnionSerde(record, out);\n                }\n                for (const [memberName, memberSchema] of ns.structIterator()) {\n                    let fromKey = memberName;\n                    if (jsonName) {\n                        fromKey = memberSchema.getMergedTraits().jsonName ?? fromKey;\n                        nameMap[fromKey] = memberName;\n                    }\n                    if (union) {\n                        unionSerde.mark(fromKey);\n                    }\n                    if (record[fromKey] != null) {\n                        out[memberName] = this._read(memberSchema, record[fromKey]);\n                    }\n                }\n                if (union) {\n                    unionSerde.writeUnknown();\n                }\n                else if (typeof record.__type === \"string\") {\n                    for (const [k, v] of Object.entries(record)) {\n                        const t = jsonName ? nameMap[k] ?? k : k;\n                        if (!(t in out)) {\n                            out[t] = v;\n                        }\n                    }\n                }\n                return out;\n            }\n            if (Array.isArray(value) && ns.isListSchema()) {\n                const listMember = ns.getValueSchema();\n                const out = [];\n                for (const item of value) {\n                    out.push(this._read(listMember, item));\n                }\n                return out;\n            }\n            if (ns.isMapSchema()) {\n                const mapMember = ns.getValueSchema();\n                const out = {};\n                for (const [_k, _v] of Object.entries(value)) {\n                    out[_k] = this._read(mapMember, _v);\n                }\n                return out;\n            }\n        }\n        if (ns.isBlobSchema() && typeof value === \"string\") {\n            return fromBase64(value);\n        }\n        const mediaType = ns.getMergedTraits().mediaType;\n        if (ns.isStringSchema() && typeof value === \"string\" && mediaType) {\n            const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n            if (isJson) {\n                return LazyJsonString.from(value);\n            }\n            return value;\n        }\n        if (ns.isTimestampSchema() && value != null) {\n            const format = determineTimestampFormat(ns, this.settings);\n            switch (format) {\n                case 5:\n                    return parseRfc3339DateTimeWithOffset(value);\n                case 6:\n                    return parseRfc7231DateTime(value);\n                case 7:\n                    return parseEpochTimestamp(value);\n                default:\n                    console.warn(\"Missing timestamp format, parsing value with Date constructor:\", value);\n                    return new Date(value);\n            }\n        }\n        if (ns.isBigIntegerSchema() && (typeof value === \"number\" || typeof value === \"string\")) {\n            return BigInt(value);\n        }\n        if (ns.isBigDecimalSchema() && value != undefined) {\n            if (value instanceof NumericValue) {\n                return value;\n            }\n            const untyped = value;\n            if (untyped.type === \"bigDecimal\" && \"string\" in untyped) {\n                return new NumericValue(untyped.string, untyped.type);\n            }\n            return new NumericValue(String(value), \"bigDecimal\");\n        }\n        if (ns.isNumericSchema() && typeof value === \"string\") {\n            switch (value) {\n                case \"Infinity\":\n                    return Infinity;\n                case \"-Infinity\":\n                    return -Infinity;\n                case \"NaN\":\n                    return NaN;\n            }\n            return value;\n        }\n        if (ns.isDocumentSchema()) {\n            if (isObject) {\n                const out = Array.isArray(value) ? [] : {};\n                for (const [k, v] of Object.entries(value)) {\n                    if (v instanceof NumericValue) {\n                        out[k] = v;\n                    }\n                    else {\n                        out[k] = this._read(ns, v);\n                    }\n                }\n                return out;\n            }\n            else {\n                return structuredClone(value);\n            }\n        }\n        return value;\n    }\n}\n","import { NumericValue } from \"@smithy/core/serde\";\nconst NUMERIC_CONTROL_CHAR = String.fromCharCode(925);\nexport class JsonReplacer {\n    values = new Map();\n    counter = 0;\n    stage = 0;\n    createReplacer() {\n        if (this.stage === 1) {\n            throw new Error(\"@aws-sdk/core/protocols - JsonReplacer already created.\");\n        }\n        if (this.stage === 2) {\n            throw new Error(\"@aws-sdk/core/protocols - JsonReplacer exhausted.\");\n        }\n        this.stage = 1;\n        return (key, value) => {\n            if (value instanceof NumericValue) {\n                const v = `${NUMERIC_CONTROL_CHAR + \"nv\" + this.counter++}_` + value.string;\n                this.values.set(`\"${v}\"`, value.string);\n                return v;\n            }\n            if (typeof value === \"bigint\") {\n                const s = value.toString();\n                const v = `${NUMERIC_CONTROL_CHAR + \"b\" + this.counter++}_` + s;\n                this.values.set(`\"${v}\"`, s);\n                return v;\n            }\n            return value;\n        };\n    }\n    replaceInJson(json) {\n        if (this.stage === 0) {\n            throw new Error(\"@aws-sdk/core/protocols - JsonReplacer not created yet.\");\n        }\n        if (this.stage === 2) {\n            throw new Error(\"@aws-sdk/core/protocols - JsonReplacer exhausted.\");\n        }\n        this.stage = 2;\n        if (this.counter === 0) {\n            return json;\n        }\n        for (const [key, value] of this.values) {\n            json = json.replace(key, value);\n        }\n        return json;\n    }\n}\n","import { determineTimestampFormat } from \"@smithy/core/protocols\";\nimport { NormalizedSchema } from \"@smithy/core/schema\";\nimport { dateToUtcString, generateIdempotencyToken, LazyJsonString, NumericValue } from \"@smithy/core/serde\";\nimport { toBase64 } from \"@smithy/util-base64\";\nimport { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nimport { JsonReplacer } from \"./jsonReplacer\";\nexport class JsonShapeSerializer extends SerdeContextConfig {\n    settings;\n    buffer;\n    useReplacer = false;\n    rootSchema;\n    constructor(settings) {\n        super();\n        this.settings = settings;\n    }\n    write(schema, value) {\n        this.rootSchema = NormalizedSchema.of(schema);\n        this.buffer = this._write(this.rootSchema, value);\n    }\n    writeDiscriminatedDocument(schema, value) {\n        this.write(schema, value);\n        if (typeof this.buffer === \"object\") {\n            this.buffer.__type = NormalizedSchema.of(schema).getName(true);\n        }\n    }\n    flush() {\n        const { rootSchema, useReplacer } = this;\n        this.rootSchema = undefined;\n        this.useReplacer = false;\n        if (rootSchema?.isStructSchema() || rootSchema?.isDocumentSchema()) {\n            if (!useReplacer) {\n                return JSON.stringify(this.buffer);\n            }\n            const replacer = new JsonReplacer();\n            return replacer.replaceInJson(JSON.stringify(this.buffer, replacer.createReplacer(), 0));\n        }\n        return this.buffer;\n    }\n    _write(schema, value, container) {\n        const isObject = value !== null && typeof value === \"object\";\n        const ns = NormalizedSchema.of(schema);\n        if (isObject) {\n            if (ns.isStructSchema()) {\n                const record = value;\n                const out = {};\n                const { jsonName } = this.settings;\n                let nameMap = void 0;\n                if (jsonName) {\n                    nameMap = {};\n                }\n                for (const [memberName, memberSchema] of ns.structIterator()) {\n                    const serializableValue = this._write(memberSchema, record[memberName], ns);\n                    if (serializableValue !== undefined) {\n                        let targetKey = memberName;\n                        if (jsonName) {\n                            targetKey = memberSchema.getMergedTraits().jsonName ?? memberName;\n                            nameMap[memberName] = targetKey;\n                        }\n                        out[targetKey] = serializableValue;\n                    }\n                }\n                if (ns.isUnionSchema() && Object.keys(out).length === 0) {\n                    const { $unknown } = record;\n                    if (Array.isArray($unknown)) {\n                        const [k, v] = $unknown;\n                        out[k] = this._write(15, v);\n                    }\n                }\n                else if (typeof record.__type === \"string\") {\n                    for (const [k, v] of Object.entries(record)) {\n                        const targetKey = jsonName ? nameMap[k] ?? k : k;\n                        if (!(targetKey in out)) {\n                            out[targetKey] = this._write(15, v);\n                        }\n                    }\n                }\n                return out;\n            }\n            if (Array.isArray(value) && ns.isListSchema()) {\n                const listMember = ns.getValueSchema();\n                const out = [];\n                const sparse = !!ns.getMergedTraits().sparse;\n                for (const item of value) {\n                    if (sparse || item != null) {\n                        out.push(this._write(listMember, item));\n                    }\n                }\n                return out;\n            }\n            if (ns.isMapSchema()) {\n                const mapMember = ns.getValueSchema();\n                const out = {};\n                const sparse = !!ns.getMergedTraits().sparse;\n                for (const [_k, _v] of Object.entries(value)) {\n                    if (sparse || _v != null) {\n                        out[_k] = this._write(mapMember, _v);\n                    }\n                }\n                return out;\n            }\n            if (value instanceof Uint8Array && (ns.isBlobSchema() || ns.isDocumentSchema())) {\n                if (ns === this.rootSchema) {\n                    return value;\n                }\n                return (this.serdeContext?.base64Encoder ?? toBase64)(value);\n            }\n            if (value instanceof Date && (ns.isTimestampSchema() || ns.isDocumentSchema())) {\n                const format = determineTimestampFormat(ns, this.settings);\n                switch (format) {\n                    case 5:\n                        return value.toISOString().replace(\".000Z\", \"Z\");\n                    case 6:\n                        return dateToUtcString(value);\n                    case 7:\n                        return value.getTime() / 1000;\n                    default:\n                        console.warn(\"Missing timestamp format, using epoch seconds\", value);\n                        return value.getTime() / 1000;\n                }\n            }\n            if (value instanceof NumericValue) {\n                this.useReplacer = true;\n            }\n        }\n        if (value === null && container?.isStructSchema()) {\n            return void 0;\n        }\n        if (ns.isStringSchema()) {\n            if (typeof value === \"undefined\" && ns.isIdempotencyToken()) {\n                return generateIdempotencyToken();\n            }\n            const mediaType = ns.getMergedTraits().mediaType;\n            if (value != null && mediaType) {\n                const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n                if (isJson) {\n                    return LazyJsonString.from(value);\n                }\n            }\n            return value;\n        }\n        if (typeof value === \"number\" && ns.isNumericSchema()) {\n            if (Math.abs(value) === Infinity || isNaN(value)) {\n                return String(value);\n            }\n            return value;\n        }\n        if (typeof value === \"string\" && ns.isBlobSchema()) {\n            if (ns === this.rootSchema) {\n                return value;\n            }\n            return (this.serdeContext?.base64Encoder ?? toBase64)(value);\n        }\n        if (typeof value === \"bigint\") {\n            this.useReplacer = true;\n        }\n        if (ns.isDocumentSchema()) {\n            if (isObject) {\n                const out = Array.isArray(value) ? [] : {};\n                for (const [k, v] of Object.entries(value)) {\n                    if (v instanceof NumericValue) {\n                        this.useReplacer = true;\n                        out[k] = v;\n                    }\n                    else {\n                        out[k] = this._write(ns, v);\n                    }\n                }\n                return out;\n            }\n            else {\n                return structuredClone(value);\n            }\n        }\n        return value;\n    }\n}\n","import { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nimport { JsonShapeDeserializer } from \"./JsonShapeDeserializer\";\nimport { JsonShapeSerializer } from \"./JsonShapeSerializer\";\nexport class JsonCodec extends SerdeContextConfig {\n    settings;\n    constructor(settings) {\n        super();\n        this.settings = settings;\n    }\n    createSerializer() {\n        const serializer = new JsonShapeSerializer(this.settings);\n        serializer.setSerdeContext(this.serdeContext);\n        return serializer;\n    }\n    createDeserializer() {\n        const deserializer = new JsonShapeDeserializer(this.settings);\n        deserializer.setSerdeContext(this.serdeContext);\n        return deserializer;\n    }\n}\n","import { HttpBindingProtocol, HttpInterceptingShapeDeserializer, HttpInterceptingShapeSerializer, } from \"@smithy/core/protocols\";\nimport { NormalizedSchema, TypeRegistry } from \"@smithy/core/schema\";\nimport { ProtocolLib } from \"../ProtocolLib\";\nimport { JsonCodec } from \"./JsonCodec\";\nimport { loadRestJsonErrorCode } from \"./parseJsonBody\";\nexport class AwsRestJsonProtocol extends HttpBindingProtocol {\n    serializer;\n    deserializer;\n    codec;\n    mixin = new ProtocolLib();\n    constructor({ defaultNamespace }) {\n        super({\n            defaultNamespace,\n        });\n        const settings = {\n            timestampFormat: {\n                useTrait: true,\n                default: 7,\n            },\n            httpBindings: true,\n            jsonName: true,\n        };\n        this.codec = new JsonCodec(settings);\n        this.serializer = new HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings);\n        this.deserializer = new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings);\n    }\n    getShapeId() {\n        return \"aws.protocols#restJson1\";\n    }\n    getPayloadCodec() {\n        return this.codec;\n    }\n    setSerdeContext(serdeContext) {\n        this.codec.setSerdeContext(serdeContext);\n        super.setSerdeContext(serdeContext);\n    }\n    async serializeRequest(operationSchema, input, context) {\n        const request = await super.serializeRequest(operationSchema, input, context);\n        const inputSchema = NormalizedSchema.of(operationSchema.input);\n        if (!request.headers[\"content-type\"]) {\n            const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema);\n            if (contentType) {\n                request.headers[\"content-type\"] = contentType;\n            }\n        }\n        if (request.body == null && request.headers[\"content-type\"] === this.getDefaultContentType()) {\n            request.body = \"{}\";\n        }\n        return request;\n    }\n    async deserializeResponse(operationSchema, context, response) {\n        const output = await super.deserializeResponse(operationSchema, context, response);\n        const outputSchema = NormalizedSchema.of(operationSchema.output);\n        for (const [name, member] of outputSchema.structIterator()) {\n            if (member.getMemberTraits().httpPayload && !(name in output)) {\n                output[name] = null;\n            }\n        }\n        return output;\n    }\n    async handleError(operationSchema, context, response, dataObject, metadata) {\n        const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? \"Unknown\";\n        const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);\n        const ns = NormalizedSchema.of(errorSchema);\n        const message = dataObject.message ?? dataObject.Message ?? \"Unknown\";\n        const ErrorCtor = TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error;\n        const exception = new ErrorCtor(message);\n        await this.deserializeHttpMessage(errorSchema, context, response, dataObject);\n        const output = {};\n        for (const [name, member] of ns.structIterator()) {\n            const target = member.getMergedTraits().jsonName ?? name;\n            output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]);\n        }\n        throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {\n            $fault: ns.getMergedTraits().error,\n            message,\n        }, output), dataObject);\n    }\n    getDefaultContentType() {\n        return \"application/json\";\n    }\n}\n","import { HttpRequest } from \"@smithy/protocol-http\";\nexport function resolveHostHeaderConfig(input) {\n    return input;\n}\nexport const hostHeaderMiddleware = (options) => (next) => async (args) => {\n    if (!HttpRequest.isInstance(args.request))\n        return next(args);\n    const { request } = args;\n    const { handlerProtocol = \"\" } = options.requestHandler.metadata || {};\n    if (handlerProtocol.indexOf(\"h2\") >= 0 && !request.headers[\":authority\"]) {\n        delete request.headers[\"host\"];\n        request.headers[\":authority\"] = request.hostname + (request.port ? \":\" + request.port : \"\");\n    }\n    else if (!request.headers[\"host\"]) {\n        let host = request.hostname;\n        if (request.port != null)\n            host += `:${request.port}`;\n        request.headers[\"host\"] = host;\n    }\n    return next(args);\n};\nexport const hostHeaderMiddlewareOptions = {\n    name: \"hostHeaderMiddleware\",\n    step: \"build\",\n    priority: \"low\",\n    tags: [\"HOST\"],\n    override: true,\n};\nexport const getHostHeaderPlugin = (options) => ({\n    applyToStack: (clientStack) => {\n        clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions);\n    },\n});\n","export const loggerMiddleware = () => (next, context) => async (args) => {\n    try {\n        const response = await next(args);\n        const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context;\n        const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions;\n        const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;\n        const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog;\n        const { $metadata, ...outputWithoutMetadata } = response.output;\n        logger?.info?.({\n            clientName,\n            commandName,\n            input: inputFilterSensitiveLog(args.input),\n            output: outputFilterSensitiveLog(outputWithoutMetadata),\n            metadata: $metadata,\n        });\n        return response;\n    }\n    catch (error) {\n        const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context;\n        const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions;\n        const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;\n        logger?.error?.({\n            clientName,\n            commandName,\n            input: inputFilterSensitiveLog(args.input),\n            error,\n            metadata: error.$metadata,\n        });\n        throw error;\n    }\n};\nexport const loggerMiddlewareOptions = {\n    name: \"loggerMiddleware\",\n    tags: [\"LOGGER\"],\n    step: \"initialize\",\n    override: true,\n};\nexport const getLoggerPlugin = (options) => ({\n    applyToStack: (clientStack) => {\n        clientStack.add(loggerMiddleware(), loggerMiddlewareOptions);\n    },\n});\n","export const recursionDetectionMiddlewareOptions = {\n    step: \"build\",\n    tags: [\"RECURSION_DETECTION\"],\n    name: \"recursionDetectionMiddleware\",\n    override: true,\n    priority: \"low\",\n};\n","import { recursionDetectionMiddlewareOptions } from \"./configuration\";\nimport { recursionDetectionMiddleware } from \"./recursionDetectionMiddleware\";\nexport const getRecursionDetectionPlugin = (options) => ({\n    applyToStack: (clientStack) => {\n        clientStack.add(recursionDetectionMiddleware(), recursionDetectionMiddlewareOptions);\n    },\n});\n","export const recursionDetectionMiddleware = () => (next) => async (args) => next(args);\n","import { normalizeProvider } from \"@smithy/core\";\nexport const DEFAULT_UA_APP_ID = undefined;\nfunction isValidUserAgentAppId(appId) {\n    if (appId === undefined) {\n        return true;\n    }\n    return typeof appId === \"string\" && appId.length <= 50;\n}\nexport function resolveUserAgentConfig(input) {\n    const normalizedAppIdProvider = normalizeProvider(input.userAgentAppId ?? DEFAULT_UA_APP_ID);\n    const { customUserAgent } = input;\n    return Object.assign(input, {\n        customUserAgent: typeof customUserAgent === \"string\" ? [[customUserAgent]] : customUserAgent,\n        userAgentAppId: async () => {\n            const appId = await normalizedAppIdProvider();\n            if (!isValidUserAgentAppId(appId)) {\n                const logger = input.logger?.constructor?.name === \"NoOpLogger\" || !input.logger ? console : input.logger;\n                if (typeof appId !== \"string\") {\n                    logger?.warn(\"userAgentAppId must be a string or undefined.\");\n                }\n                else if (appId.length > 50) {\n                    logger?.warn(\"The provided userAgentAppId exceeds the maximum length of 50 characters.\");\n                }\n            }\n            return appId;\n        },\n    });\n}\n","import { isValidHostLabel } from \"@smithy/util-endpoints\";\nimport { isIpAddress } from \"../isIpAddress\";\nexport const isVirtualHostableS3Bucket = (value, allowSubDomains = false) => {\n    if (allowSubDomains) {\n        for (const label of value.split(\".\")) {\n            if (!isVirtualHostableS3Bucket(label)) {\n                return false;\n            }\n        }\n        return true;\n    }\n    if (!isValidHostLabel(value)) {\n        return false;\n    }\n    if (value.length < 3 || value.length > 63) {\n        return false;\n    }\n    if (value !== value.toLowerCase()) {\n        return false;\n    }\n    if (isIpAddress(value)) {\n        return false;\n    }\n    return true;\n};\n","import partitionsInfo from \"./partitions.json\";\nlet selectedPartitionsInfo = partitionsInfo;\nlet selectedUserAgentPrefix = \"\";\nexport const partition = (value) => {\n    const { partitions } = selectedPartitionsInfo;\n    for (const partition of partitions) {\n        const { regions, outputs } = partition;\n        for (const [region, regionData] of Object.entries(regions)) {\n            if (region === value) {\n                return {\n                    ...outputs,\n                    ...regionData,\n                };\n            }\n        }\n    }\n    for (const partition of partitions) {\n        const { regionRegex, outputs } = partition;\n        if (new RegExp(regionRegex).test(value)) {\n            return {\n                ...outputs,\n            };\n        }\n    }\n    const DEFAULT_PARTITION = partitions.find((partition) => partition.id === \"aws\");\n    if (!DEFAULT_PARTITION) {\n        throw new Error(\"Provided region was not found in the partition array or regex,\" +\n            \" and default partition with id 'aws' doesn't exist.\");\n    }\n    return {\n        ...DEFAULT_PARTITION.outputs,\n    };\n};\nexport const setPartitionInfo = (partitionsInfo, userAgentPrefix = \"\") => {\n    selectedPartitionsInfo = partitionsInfo;\n    selectedUserAgentPrefix = userAgentPrefix;\n};\nexport const useDefaultPartitionInfo = () => {\n    setPartitionInfo(partitionsInfo, \"\");\n};\nexport const getUserAgentPrefix = () => selectedUserAgentPrefix;\n","import { customEndpointFunctions } from \"@smithy/util-endpoints\";\nimport { isVirtualHostableS3Bucket } from \"./lib/aws/isVirtualHostableS3Bucket\";\nimport { parseArn } from \"./lib/aws/parseArn\";\nimport { partition } from \"./lib/aws/partition\";\nexport const awsEndpointFunctions = {\n    isVirtualHostableS3Bucket: isVirtualHostableS3Bucket,\n    parseArn: parseArn,\n    partition: partition,\n};\ncustomEndpointFunctions.aws = awsEndpointFunctions;\n","const ARN_DELIMITER = \":\";\nconst RESOURCE_DELIMITER = \"/\";\nexport const parseArn = (value) => {\n    const segments = value.split(ARN_DELIMITER);\n    if (segments.length < 6)\n        return null;\n    const [arn, partition, service, region, accountId, ...resourcePath] = segments;\n    if (arn !== \"arn\" || partition === \"\" || service === \"\" || resourcePath.join(ARN_DELIMITER) === \"\")\n        return null;\n    const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat();\n    return {\n        partition,\n        service,\n        region,\n        accountId,\n        resourceId,\n    };\n};\n","export function setFeature(context, feature, value) {\n    if (!context.__aws_sdk_context) {\n        context.__aws_sdk_context = {\n            features: {},\n        };\n    }\n    else if (!context.__aws_sdk_context.features) {\n        context.__aws_sdk_context.features = {};\n    }\n    context.__aws_sdk_context.features[feature] = value;\n}\n","import { setFeature } from \"@aws-sdk/core\";\nimport { RETRY_MODES } from \"@smithy/util-retry\";\nconst ACCOUNT_ID_ENDPOINT_REGEX = /\\d{12}\\.ddb/;\nexport async function checkFeatures(context, config, args) {\n    const request = args.request;\n    if (request?.headers?.[\"smithy-protocol\"] === \"rpc-v2-cbor\") {\n        setFeature(context, \"PROTOCOL_RPC_V2_CBOR\", \"M\");\n    }\n    if (typeof config.retryStrategy === \"function\") {\n        const retryStrategy = await config.retryStrategy();\n        if (typeof retryStrategy.mode === \"string\") {\n            switch (retryStrategy.mode) {\n                case RETRY_MODES.ADAPTIVE:\n                    setFeature(context, \"RETRY_MODE_ADAPTIVE\", \"F\");\n                    break;\n                case RETRY_MODES.STANDARD:\n                    setFeature(context, \"RETRY_MODE_STANDARD\", \"E\");\n                    break;\n            }\n        }\n    }\n    if (typeof config.accountIdEndpointMode === \"function\") {\n        const endpointV2 = context.endpointV2;\n        if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) {\n            setFeature(context, \"ACCOUNT_ID_ENDPOINT\", \"O\");\n        }\n        switch (await config.accountIdEndpointMode?.()) {\n            case \"disabled\":\n                setFeature(context, \"ACCOUNT_ID_MODE_DISABLED\", \"Q\");\n                break;\n            case \"preferred\":\n                setFeature(context, \"ACCOUNT_ID_MODE_PREFERRED\", \"P\");\n                break;\n            case \"required\":\n                setFeature(context, \"ACCOUNT_ID_MODE_REQUIRED\", \"R\");\n                break;\n        }\n    }\n    const identity = context.__smithy_context?.selectedHttpAuthScheme?.identity;\n    if (identity?.$source) {\n        const credentials = identity;\n        if (credentials.accountId) {\n            setFeature(context, \"RESOLVED_ACCOUNT_ID\", \"T\");\n        }\n        for (const [key, value] of Object.entries(credentials.$source ?? {})) {\n            setFeature(context, key, value);\n        }\n    }\n}\n","export const USER_AGENT = \"user-agent\";\nexport const X_AMZ_USER_AGENT = \"x-amz-user-agent\";\nexport const SPACE = \" \";\nexport const UA_NAME_SEPARATOR = \"/\";\nexport const UA_NAME_ESCAPE_REGEX = /[^!$%&'*+\\-.^_`|~\\w]/g;\nexport const UA_VALUE_ESCAPE_REGEX = /[^!$%&'*+\\-.^_`|~\\w#]/g;\nexport const UA_ESCAPE_CHAR = \"-\";\n","import { getUserAgentPrefix } from \"@aws-sdk/util-endpoints\";\nimport { HttpRequest } from \"@smithy/protocol-http\";\nimport { checkFeatures } from \"./check-features\";\nimport { SPACE, UA_ESCAPE_CHAR, UA_NAME_ESCAPE_REGEX, UA_NAME_SEPARATOR, UA_VALUE_ESCAPE_REGEX, USER_AGENT, X_AMZ_USER_AGENT, } from \"./constants\";\nimport { encodeFeatures } from \"./encode-features\";\nexport const userAgentMiddleware = (options) => (next, context) => async (args) => {\n    const { request } = args;\n    if (!HttpRequest.isInstance(request)) {\n        return next(args);\n    }\n    const { headers } = request;\n    const userAgent = context?.userAgent?.map(escapeUserAgent) || [];\n    const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent);\n    await checkFeatures(context, options, args);\n    const awsContext = context;\n    defaultUserAgent.push(`m/${encodeFeatures(Object.assign({}, context.__smithy_context?.features, awsContext.__aws_sdk_context?.features))}`);\n    const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || [];\n    const appId = await options.userAgentAppId();\n    if (appId) {\n        defaultUserAgent.push(escapeUserAgent([`app`, `${appId}`]));\n    }\n    const prefix = getUserAgentPrefix();\n    const sdkUserAgentValue = (prefix ? [prefix] : [])\n        .concat([...defaultUserAgent, ...userAgent, ...customUserAgent])\n        .join(SPACE);\n    const normalUAValue = [\n        ...defaultUserAgent.filter((section) => section.startsWith(\"aws-sdk-\")),\n        ...customUserAgent,\n    ].join(SPACE);\n    if (options.runtime !== \"browser\") {\n        if (normalUAValue) {\n            headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT]\n                ? `${headers[USER_AGENT]} ${normalUAValue}`\n                : normalUAValue;\n        }\n        headers[USER_AGENT] = sdkUserAgentValue;\n    }\n    else {\n        headers[X_AMZ_USER_AGENT] = sdkUserAgentValue;\n    }\n    return next({\n        ...args,\n        request,\n    });\n};\nconst escapeUserAgent = (userAgentPair) => {\n    const name = userAgentPair[0]\n        .split(UA_NAME_SEPARATOR)\n        .map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR))\n        .join(UA_NAME_SEPARATOR);\n    const version = userAgentPair[1]?.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR);\n    const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR);\n    const prefix = name.substring(0, prefixSeparatorIndex);\n    let uaName = name.substring(prefixSeparatorIndex + 1);\n    if (prefix === \"api\") {\n        uaName = uaName.toLowerCase();\n    }\n    return [prefix, uaName, version]\n        .filter((item) => item && item.length > 0)\n        .reduce((acc, item, index) => {\n        switch (index) {\n            case 0:\n                return item;\n            case 1:\n                return `${acc}/${item}`;\n            default:\n                return `${acc}#${item}`;\n        }\n    }, \"\");\n};\nexport const getUserAgentMiddlewareOptions = {\n    name: \"getUserAgentMiddleware\",\n    step: \"build\",\n    priority: \"low\",\n    tags: [\"SET_USER_AGENT\", \"USER_AGENT\"],\n    override: true,\n};\nexport const getUserAgentPlugin = (config) => ({\n    applyToStack: (clientStack) => {\n        clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions);\n    },\n});\n","const BYTE_LIMIT = 1024;\nexport function encodeFeatures(features) {\n    let buffer = \"\";\n    for (const key in features) {\n        const val = features[key];\n        if (buffer.length + val.length + 1 <= BYTE_LIMIT) {\n            if (buffer.length) {\n                buffer += \",\" + val;\n            }\n            else {\n                buffer += val;\n            }\n            continue;\n        }\n        break;\n    }\n    return buffer;\n}\n","export const getAwsRegionExtensionConfiguration = (runtimeConfig) => {\n    return {\n        setRegion(region) {\n            runtimeConfig.region = region;\n        },\n        region() {\n            return runtimeConfig.region;\n        },\n    };\n};\nexport const resolveAwsRegionExtensionConfiguration = (awsRegionExtensionConfiguration) => {\n    return {\n        region: awsRegionExtensionConfiguration.region(),\n    };\n};\n","import { isValidHostLabel } from \"@smithy/util-endpoints\";\nimport { isIpAddress } from \"../isIpAddress\";\nexport const isVirtualHostableS3Bucket = (value, allowSubDomains = false) => {\n    if (allowSubDomains) {\n        for (const label of value.split(\".\")) {\n            if (!isVirtualHostableS3Bucket(label)) {\n                return false;\n            }\n        }\n        return true;\n    }\n    if (!isValidHostLabel(value)) {\n        return false;\n    }\n    if (value.length < 3 || value.length > 63) {\n        return false;\n    }\n    if (value !== value.toLowerCase()) {\n        return false;\n    }\n    if (isIpAddress(value)) {\n        return false;\n    }\n    return true;\n};\n","import partitionsInfo from \"./partitions.json\";\nlet selectedPartitionsInfo = partitionsInfo;\nlet selectedUserAgentPrefix = \"\";\nexport const partition = (value) => {\n    const { partitions } = selectedPartitionsInfo;\n    for (const partition of partitions) {\n        const { regions, outputs } = partition;\n        for (const [region, regionData] of Object.entries(regions)) {\n            if (region === value) {\n                return {\n                    ...outputs,\n                    ...regionData,\n                };\n            }\n        }\n    }\n    for (const partition of partitions) {\n        const { regionRegex, outputs } = partition;\n        if (new RegExp(regionRegex).test(value)) {\n            return {\n                ...outputs,\n            };\n        }\n    }\n    const DEFAULT_PARTITION = partitions.find((partition) => partition.id === \"aws\");\n    if (!DEFAULT_PARTITION) {\n        throw new Error(\"Provided region was not found in the partition array or regex,\" +\n            \" and default partition with id 'aws' doesn't exist.\");\n    }\n    return {\n        ...DEFAULT_PARTITION.outputs,\n    };\n};\nexport const setPartitionInfo = (partitionsInfo, userAgentPrefix = \"\") => {\n    selectedPartitionsInfo = partitionsInfo;\n    selectedUserAgentPrefix = userAgentPrefix;\n};\nexport const useDefaultPartitionInfo = () => {\n    setPartitionInfo(partitionsInfo, \"\");\n};\nexport const getUserAgentPrefix = () => selectedUserAgentPrefix;\n","import { customEndpointFunctions } from \"@smithy/util-endpoints\";\nimport { isVirtualHostableS3Bucket } from \"./lib/aws/isVirtualHostableS3Bucket\";\nimport { parseArn } from \"./lib/aws/parseArn\";\nimport { partition } from \"./lib/aws/partition\";\nexport const awsEndpointFunctions = {\n    isVirtualHostableS3Bucket: isVirtualHostableS3Bucket,\n    parseArn: parseArn,\n    partition: partition,\n};\ncustomEndpointFunctions.aws = awsEndpointFunctions;\n","const ARN_DELIMITER = \":\";\nconst RESOURCE_DELIMITER = \"/\";\nexport const parseArn = (value) => {\n    const segments = value.split(ARN_DELIMITER);\n    if (segments.length < 6)\n        return null;\n    const [arn, partition, service, region, accountId, ...resourcePath] = segments;\n    if (arn !== \"arn\" || partition === \"\" || service === \"\" || resourcePath.join(ARN_DELIMITER) === \"\")\n        return null;\n    const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat();\n    return {\n        partition,\n        service,\n        region,\n        accountId,\n        resourceId,\n    };\n};\n","const SHORT_TO_HEX = {};\nconst HEX_TO_SHORT = {};\nfor (let i = 0; i < 256; i++) {\n    let encodedByte = i.toString(16).toLowerCase();\n    if (encodedByte.length === 1) {\n        encodedByte = `0${encodedByte}`;\n    }\n    SHORT_TO_HEX[i] = encodedByte;\n    HEX_TO_SHORT[encodedByte] = i;\n}\nexport function fromHex(encoded) {\n    if (encoded.length % 2 !== 0) {\n        throw new Error(\"Hex encoded strings must have an even number length\");\n    }\n    const out = new Uint8Array(encoded.length / 2);\n    for (let i = 0; i < encoded.length; i += 2) {\n        const encodedByte = encoded.slice(i, i + 2).toLowerCase();\n        if (encodedByte in HEX_TO_SHORT) {\n            out[i / 2] = HEX_TO_SHORT[encodedByte];\n        }\n        else {\n            throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);\n        }\n    }\n    return out;\n}\nexport function toHex(bytes) {\n    let out = \"\";\n    for (let i = 0; i < bytes.byteLength; i++) {\n        out += SHORT_TO_HEX[bytes[i]];\n    }\n    return out;\n}\n","const fallbackWindow = {};\nexport function locateWindow() {\n    if (typeof window !== \"undefined\") {\n        return window;\n    }\n    else if (typeof self !== \"undefined\") {\n        return self;\n    }\n    return fallbackWindow;\n}\n","export { createUserAgentStringParsingProvider } from \"./createUserAgentStringParsingProvider\";\nexport const createDefaultUserAgentProvider = ({ serviceId, clientVersion }) => async (config) => {\n    const navigator = typeof window !== \"undefined\" ? window.navigator : undefined;\n    const uaString = navigator?.userAgent ?? \"\";\n    const osName = navigator?.userAgentData?.platform ?? fallback.os(uaString) ?? \"other\";\n    const osVersion = undefined;\n    const brands = navigator?.userAgentData?.brands ?? [];\n    const brand = brands[brands.length - 1];\n    const browserName = brand?.brand ?? fallback.browser(uaString) ?? \"unknown\";\n    const browserVersion = brand?.version ?? \"unknown\";\n    const sections = [\n        [\"aws-sdk-js\", clientVersion],\n        [\"ua\", \"2.1\"],\n        [`os/${osName}`, osVersion],\n        [\"lang/js\"],\n        [\"md/browser\", `${browserName}_${browserVersion}`],\n    ];\n    if (serviceId) {\n        sections.push([`api/${serviceId}`, clientVersion]);\n    }\n    const appId = await config?.userAgentAppId?.();\n    if (appId) {\n        sections.push([`app/${appId}`]);\n    }\n    return sections;\n};\nexport const fallback = {\n    os(ua) {\n        if (/iPhone|iPad|iPod/.test(ua))\n            return \"iOS\";\n        if (/Macintosh|Mac OS X/.test(ua))\n            return \"macOS\";\n        if (/Windows NT/.test(ua))\n            return \"Windows\";\n        if (/Android/.test(ua))\n            return \"Android\";\n        if (/Linux/.test(ua))\n            return \"Linux\";\n        return undefined;\n    },\n    browser(ua) {\n        if (/EdgiOS|EdgA|Edg\\//.test(ua))\n            return \"Microsoft Edge\";\n        if (/Firefox\\//.test(ua))\n            return \"Firefox\";\n        if (/Chrome\\//.test(ua))\n            return \"Chrome\";\n        if (/Safari\\//.test(ua))\n            return \"Safari\";\n        return undefined;\n    },\n};\nexport const defaultUserAgent = createDefaultUserAgentProvider;\n","import { fromUtf8 as jsFromUtf8, toUtf8 as jsToUtf8 } from \"./pureJs\";\nimport { fromUtf8 as textEncoderFromUtf8, toUtf8 as textEncoderToUtf8 } from \"./whatwgEncodingApi\";\nexport const fromUtf8 = (input) => typeof TextEncoder === \"function\" ? textEncoderFromUtf8(input) : jsFromUtf8(input);\nexport const toUtf8 = (input) => typeof TextDecoder === \"function\" ? textEncoderToUtf8(input) : jsToUtf8(input);\n","export function fromUtf8(input) {\n    return new TextEncoder().encode(input);\n}\nexport function toUtf8(input) {\n    return new TextDecoder(\"utf-8\").decode(input);\n}\n","export const fromUtf8 = (input) => {\n    const bytes = [];\n    for (let i = 0, len = input.length; i < len; i++) {\n        const value = input.charCodeAt(i);\n        if (value < 0x80) {\n            bytes.push(value);\n        }\n        else if (value < 0x800) {\n            bytes.push((value >> 6) | 0b11000000, (value & 0b111111) | 0b10000000);\n        }\n        else if (i + 1 < input.length && (value & 0xfc00) === 0xd800 && (input.charCodeAt(i + 1) & 0xfc00) === 0xdc00) {\n            const surrogatePair = 0x10000 + ((value & 0b1111111111) << 10) + (input.charCodeAt(++i) & 0b1111111111);\n            bytes.push((surrogatePair >> 18) | 0b11110000, ((surrogatePair >> 12) & 0b111111) | 0b10000000, ((surrogatePair >> 6) & 0b111111) | 0b10000000, (surrogatePair & 0b111111) | 0b10000000);\n        }\n        else {\n            bytes.push((value >> 12) | 0b11100000, ((value >> 6) & 0b111111) | 0b10000000, (value & 0b111111) | 0b10000000);\n        }\n    }\n    return Uint8Array.from(bytes);\n};\nexport const toUtf8 = (input) => {\n    let decoded = \"\";\n    for (let i = 0, len = input.length; i < len; i++) {\n        const byte = input[i];\n        if (byte < 0x80) {\n            decoded += String.fromCharCode(byte);\n        }\n        else if (0b11000000 <= byte && byte < 0b11100000) {\n            const nextByte = input[++i];\n            decoded += String.fromCharCode(((byte & 0b11111) << 6) | (nextByte & 0b111111));\n        }\n        else if (0b11110000 <= byte && byte < 0b101101101) {\n            const surrogatePair = [byte, input[++i], input[++i], input[++i]];\n            const encoded = \"%\" + surrogatePair.map((byteValue) => byteValue.toString(16)).join(\"%\");\n            decoded += decodeURIComponent(encoded);\n        }\n        else {\n            decoded += String.fromCharCode(((byte & 0b1111) << 12) | ((input[++i] & 0b111111) << 6) | (input[++i] & 0b111111));\n        }\n    }\n    return decoded;\n};\n","function _classCallCheck(a, n) {\n  if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\");\n}\nexport { _classCallCheck as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(e, r) {\n  for (var t = 0; t < r.length; t++) {\n    var o = r[t];\n    o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);\n  }\n}\nfunction _createClass(e, r, t) {\n  return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", {\n    writable: !1\n  }), e;\n}\nexport { _createClass as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n    value: t,\n    enumerable: !0,\n    configurable: !0,\n    writable: !0\n  }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","function _arrayLikeToArray(r, a) {\n  (null == a || a > r.length) && (a = r.length);\n  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n  return n;\n}\nexport { _arrayLikeToArray as default };","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nfunction _slicedToArray(r, e) {\n  return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();\n}\nexport { _slicedToArray as default };","function _arrayWithHoles(r) {\n  if (Array.isArray(r)) return r;\n}\nexport { _arrayWithHoles as default };","function _iterableToArrayLimit(r, l) {\n  var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n  if (null != t) {\n    var e,\n      n,\n      i,\n      u,\n      a = [],\n      f = !0,\n      o = !1;\n    try {\n      if (i = (t = t.call(r)).next, 0 === l) {\n        if (Object(t) !== t) return;\n        f = !1;\n      } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n    } catch (r) {\n      o = !0, n = r;\n    } finally {\n      try {\n        if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n      } finally {\n        if (o) throw n;\n      }\n    }\n    return a;\n  }\n}\nexport { _iterableToArrayLimit as default };","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nfunction _unsupportedIterableToArray(r, a) {\n  if (r) {\n    if (\"string\" == typeof r) return arrayLikeToArray(r, a);\n    var t = {}.toString.call(r).slice(8, -1);\n    return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;\n  }\n}\nexport { _unsupportedIterableToArray as default };","function _nonIterableRest() {\n  throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nexport { _nonIterableRest as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n  var i = toPrimitive(t, \"string\");\n  return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n  if (\"object\" != _typeof(t) || !t) return t;\n  var e = t[Symbol.toPrimitive];\n  if (void 0 !== e) {\n    var i = e.call(t, r || \"default\");\n    if (\"object\" != _typeof(i)) return i;\n    throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n  }\n  return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","function _typeof(o) {\n  \"@babel/helpers - typeof\";\n\n  return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n    return typeof o;\n  } : function (o) {\n    return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n  }, _typeof(o);\n}\nexport { _typeof as default };"],"names":[],"sourceRoot":""}